Data Structures | Macros | Typedefs | Enumerations | Functions
gntwm.h File Reference

Window-manager API. More...

#include "gntwidget.h"
#include "gntmenu.h"
#include "gntws.h"
#include <panel.h>
#include <time.h>

Go to the source code of this file.

Data Structures

struct  _GntNode
 
struct  _GntPosition
 
struct  _GntAction
 An application can register actions which will show up in a 'start-menu' like popup. More...
 
struct  _GntWM
 
struct  _GntWMClass
 

Macros

#define GNT_TYPE_WM   (gnt_wm_get_gtype())
 
#define GNT_WM(obj)   (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WM, GntWM))
 
#define GNT_WM_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_WM, GntWMClass))
 
#define GNT_IS_WM(obj)   (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WM))
 
#define GNT_IS_WM_CLASS(klass)   (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WM))
 
#define GNT_WM_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WM, GntWMClass))
 

Typedefs

typedef enum _GntKeyPressMode GntKeyPressMode
 
typedef struct _GntNode GntNode
 
typedef struct _GntWM GntWM
 
typedef struct _GntPosition GntPosition
 
typedef struct _GntAction GntAction
 An application can register actions which will show up in a 'start-menu' like popup.
 
typedef struct _GntWMClass GntWMClass
 

Enumerations

enum  _GntKeyPressMode { GNT_KP_MODE_NORMAL, GNT_KP_MODE_RESIZE, GNT_KP_MODE_MOVE, GNT_KP_MODE_WAIT_ON_CHILD }
 

Functions

G_BEGIN_DECLS GType gnt_wm_get_gtype (void)
 
void gnt_wm_add_workspace (GntWM *wm, GntWS *ws)
 Add a workspace. More...
 
gboolean gnt_wm_switch_workspace (GntWM *wm, gint n)
 Switch to a workspace. More...
 
gboolean gnt_wm_switch_workspace_prev (GntWM *wm)
 Switch to the previous workspace from the current one. More...
 
gboolean gnt_wm_switch_workspace_next (GntWM *wm)
 Switch to the next workspace from the current one. More...
 
void gnt_wm_widget_move_workspace (GntWM *wm, GntWS *neww, GntWidget *widget)
 Move a window to a specific workspace. More...
 
void gnt_wm_set_workspaces (GntWM *wm, GList *workspaces)
 Set the list of workspaces . More...
 
GntWSgnt_wm_widget_find_workspace (GntWM *wm, GntWidget *widget)
 Find the workspace that contains a specific widget. More...
 
void gnt_wm_new_window (GntWM *wm, GntWidget *widget)
 Process a new window. More...
 
void gnt_wm_window_decorate (GntWM *wm, GntWidget *widget)
 Decorate a window. More...
 
void gnt_wm_window_close (GntWM *wm, GntWidget *widget)
 Close a window. More...
 
gboolean gnt_wm_process_input (GntWM *wm, const char *string)
 Process input. More...
 
gboolean gnt_wm_process_click (GntWM *wm, GntMouseEvent event, int x, int y, GntWidget *widget)
 Process a click event. More...
 
void gnt_wm_resize_window (GntWM *wm, GntWidget *widget, int width, int height)
 Resize a window. More...
 
void gnt_wm_move_window (GntWM *wm, GntWidget *widget, int x, int y)
 Move a window. More...
 
void gnt_wm_update_window (GntWM *wm, GntWidget *widget)
 Update a window. More...
 
void gnt_wm_raise_window (GntWM *wm, GntWidget *widget)
 Raise a window. More...
 
void gnt_wm_set_event_stack (GntWM *wm, gboolean set)
 
void gnt_wm_copy_win (GntWidget *widget, GntNode *node)
 
time_t gnt_wm_get_idle_time (void)
 

Detailed Description

Window-manager API.

Definition in file gntwm.h.

Function Documentation

void gnt_wm_add_workspace ( GntWM wm,
GntWS ws 
)

Add a workspace.

Parameters
wmThe window-manager.
wsThe workspace to add.
G_BEGIN_DECLS GType gnt_wm_get_gtype ( void  )
Returns
GType for GntWM.
time_t gnt_wm_get_idle_time ( void  )
Returns
The idle time of the user.
void gnt_wm_move_window ( GntWM wm,
GntWidget widget,
int  x,
int  y 
)

Move a window.

Parameters
wmThe window manager.
widgetThe window to move.
xThe desired x-coordinate of the window.
yThe desired y-coordinate of the window.
void gnt_wm_new_window ( GntWM wm,
GntWidget widget 
)

Process a new window.

Parameters
wmThe window-manager.
widgetThe new window.
gboolean gnt_wm_process_click ( GntWM wm,
GntMouseEvent  event,
int  x,
int  y,
GntWidget widget 
)

Process a click event.

Parameters
wmThe window manager.
eventThe mouse event.
xThe x-coordinate of the mouse.
yThe y-coordinate of the mouse.
widgetThe widget under the mouse.
Returns
TRUE if the event was handled, FALSE otherwise.
gboolean gnt_wm_process_input ( GntWM wm,
const char *  string 
)

Process input.

Parameters
wmThe window-manager.
stringThe input string to process.
Returns
TRUE of the string was processed, FALSE otherwise.
void gnt_wm_raise_window ( GntWM wm,
GntWidget widget 
)

Raise a window.

Parameters
wmThe window-manager.
widgetThe window to raise.
void gnt_wm_resize_window ( GntWM wm,
GntWidget widget,
int  width,
int  height 
)

Resize a window.

Parameters
wmThe window manager.
widgetThe window to resize.
widthThe desired width of the window.
heightThe desired height of the window.
void gnt_wm_set_workspaces ( GntWM wm,
GList *  workspaces 
)

Set the list of workspaces .

Parameters
wmThe window manager.
workspacesThe list of workspaces.
gboolean gnt_wm_switch_workspace ( GntWM wm,
gint  n 
)

Switch to a workspace.

Parameters
wmThe window-manager.
nIndex of the workspace to switch to.
Returns
TRUE if the switch was successful.
gboolean gnt_wm_switch_workspace_next ( GntWM wm)

Switch to the next workspace from the current one.

Parameters
wmThe window-manager.
gboolean gnt_wm_switch_workspace_prev ( GntWM wm)

Switch to the previous workspace from the current one.

Parameters
wmThe window-manager.
void gnt_wm_update_window ( GntWM wm,
GntWidget widget 
)

Update a window.

Parameters
wmThe window-manager.
widgetThe window to update.
GntWS* gnt_wm_widget_find_workspace ( GntWM wm,
GntWidget widget 
)

Find the workspace that contains a specific widget.

Parameters
wmThe window-manager.
widgetThe widget to find.
Returns
The workspace that has the widget.
void gnt_wm_widget_move_workspace ( GntWM wm,
GntWS neww,
GntWidget widget 
)

Move a window to a specific workspace.

Parameters
wmThe window manager.
newwThe new workspace.
widgetThe widget to move.
void gnt_wm_window_close ( GntWM wm,
GntWidget widget 
)

Close a window.

Parameters
wmThe window-manager.
widgetThe window to close.
void gnt_wm_window_decorate ( GntWM wm,
GntWidget widget 
)

Decorate a window.

Parameters
wmThe window-manager.
widgetThe widget to decorate.