pidgin  2.13.0
About: Pidgin is a chat program (multi-protocol instant messaging client) which lets you log in to accounts on multiple chat networks simultaneously (old name "gaim").
  Fossies Dox: pidgin-2.13.0.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

gntwm.h File Reference
#include "gntwidget.h"
#include "gntmenu.h"
#include "gntws.h"
#include <panel.h>
#include <time.h>
Include dependency graph for gntwm.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _GntNode
 
struct  _GntPosition
 
struct  _GntAction
 
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
 
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)
 
gboolean gnt_wm_switch_workspace (GntWM *wm, gint n)
 
gboolean gnt_wm_switch_workspace_prev (GntWM *wm)
 
gboolean gnt_wm_switch_workspace_next (GntWM *wm)
 
void gnt_wm_widget_move_workspace (GntWM *wm, GntWS *neww, GntWidget *widget)
 
void gnt_wm_set_workspaces (GntWM *wm, GList *workspaces)
 
GntWSgnt_wm_widget_find_workspace (GntWM *wm, GntWidget *widget)
 
void gnt_wm_new_window (GntWM *wm, GntWidget *widget)
 
void gnt_wm_window_decorate (GntWM *wm, GntWidget *widget)
 
void gnt_wm_window_close (GntWM *wm, GntWidget *widget)
 
gboolean gnt_wm_process_input (GntWM *wm, const char *string)
 
gboolean gnt_wm_process_click (GntWM *wm, GntMouseEvent event, int x, int y, GntWidget *widget)
 
void gnt_wm_resize_window (GntWM *wm, GntWidget *widget, int width, int height)
 
void gnt_wm_move_window (GntWM *wm, GntWidget *widget, int x, int y)
 
void gnt_wm_update_window (GntWM *wm, GntWidget *widget)
 
void gnt_wm_raise_window (GntWM *wm, GntWidget *widget)
 
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.

Macro Definition Documentation

◆ GNT_IS_WM

#define GNT_IS_WM (   obj)    (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WM))

Definition at line 40 of file gntwm.h.

◆ GNT_IS_WM_CLASS

#define GNT_IS_WM_CLASS (   klass)    (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WM))

Definition at line 41 of file gntwm.h.

◆ GNT_TYPE_WM

#define GNT_TYPE_WM   (gnt_wm_get_gtype())

Definition at line 37 of file gntwm.h.

◆ GNT_WM

#define GNT_WM (   obj)    (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WM, GntWM))

Definition at line 38 of file gntwm.h.

◆ GNT_WM_CLASS

#define GNT_WM_CLASS (   klass)    (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_WM, GntWMClass))

Definition at line 39 of file gntwm.h.

◆ GNT_WM_GET_CLASS

#define GNT_WM_GET_CLASS (   obj)    (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WM, GntWMClass))

Definition at line 42 of file gntwm.h.

Typedef Documentation

◆ GntAction

typedef struct _GntAction GntAction

An application can register actions which will show up in a 'start-menu' like popup

◆ GntKeyPressMode

◆ GntNode

typedef struct _GntNode GntNode

◆ GntPosition

typedef struct _GntPosition GntPosition

◆ GntWM

typedef struct _GntWM GntWM

Definition at line 62 of file gntwm.h.

◆ GntWMClass

typedef struct _GntWMClass GntWMClass

Definition at line 127 of file gntwm.h.

Enumeration Type Documentation

◆ _GntKeyPressMode

Enumerator
GNT_KP_MODE_NORMAL 
GNT_KP_MODE_RESIZE 
GNT_KP_MODE_MOVE 
GNT_KP_MODE_WAIT_ON_CHILD 

Definition at line 44 of file gntwm.h.

Function Documentation

◆ gnt_wm_add_workspace()

void gnt_wm_add_workspace ( GntWM wm,
GntWS ws 
)

Add a workspace.

Parameters
wmThe window-manager.
wsThe workspace to add.

Definition at line 1643 of file gntwm.c.

References wm, and _GntWM::workspaces.

Referenced by gnt_style_read_workspaces(), gnt_wm_init(), and workspace_new().

Here is the caller graph for this function:

◆ gnt_wm_copy_win()

◆ gnt_wm_get_gtype()

G_BEGIN_DECLS GType gnt_wm_get_gtype ( void  )
Returns
GType for GntWM.

Definition at line 1616 of file gntwm.c.

References GNT_TYPE_BINDABLE, gnt_wm_class_init(), gnt_wm_init(), info, NULL, and dbus-analyze-signals::type.

◆ gnt_wm_get_idle_time()

time_t gnt_wm_get_idle_time ( void  )
Returns
The idle time of the user.

Definition at line 1976 of file gntwm.c.

References last_active_time, NULL, and time().

Referenced by finch_get_idle_time().

Here is the caller graph for this function:

◆ gnt_wm_move_window()

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.

Definition at line 2184 of file gntwm.c.

References GNT_BOX, GNT_IS_BOX, gnt_style_get_bool(), GNT_STYLE_REMPOS, GNT_WIDGET_IS_FLAG_SET, gnt_widget_set_position(), GNT_WIDGET_TRANSIENT, dbus-buddyicons-example::node, _GntWM::nodes, _GntWM::positions, _GntWidget::priv, SIG_CONFIRM_MOVE, SIG_MOVED, signals, TRUE, update_screen(), widget, wm, write_positions_to_file(), _GntPosition::x, _GntWidgetPriv::x, _GntPosition::y, and _GntWidgetPriv::y.

Referenced by gnt_screen_move_widget(), move_direction(), and refresh_window().

Here is the caller graph for this function:

◆ gnt_wm_new_window()

◆ gnt_wm_process_click()

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.

Definition at line 2278 of file gntwm.c.

References idle_update, SIG_MOUSE_CLICK, signals, TRUE, widget, and wm.

Referenced by detect_mouse_action().

Here is the caller graph for this function:

◆ gnt_wm_process_input()

◆ gnt_wm_raise_window()

◆ gnt_wm_resize_window()

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.

Definition at line 2112 of file gntwm.c.

References gnt_widget_draw(), gnt_widget_set_size(), dbus-buddyicons-example::node, _GntWM::nodes, SIG_CONFIRM_RESIZE, SIG_RESIZED, signals, TRUE, update_screen(), widget, and wm.

Referenced by gnt_screen_resize_widget(), move_direction(), and refresh_window().

Here is the caller graph for this function:

◆ gnt_wm_set_event_stack()

void gnt_wm_set_event_stack ( GntWM wm,
gboolean  set 
)

Definition at line 2302 of file gntwm.c.

References _GntWM::event_stack, set(), and wm.

Referenced by io_invoke().

Here is the caller graph for this function:

◆ gnt_wm_set_workspaces()

void gnt_wm_set_workspaces ( GntWM wm,
GList *  workspaces 
)

Set the list of workspaces .

Parameters
wmThe window manager.
workspacesThe list of workspaces.

Definition at line 1747 of file gntwm.c.

References free_workspaces(), gnt_wm_switch_workspace(), NULL, wm, and _GntWM::workspaces.

◆ gnt_wm_switch_workspace()

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.

Definition at line 1649 of file gntwm.c.

References _GntWM::_list, act, _GntWM::cws, ensure_normal_mode(), FALSE, gnt_widget_destroy(), gnt_wm_raise_window(), gnt_ws_draw_taskbar(), gnt_ws_hide(), gnt_ws_show(), _GntWM::nodes, _GntWS::ordered, TRUE, update_act_msg(), update_screen(), _GntWM::window, wm, and _GntWM::workspaces.

Referenced by gnt_wm_init(), gnt_wm_raise_window(), gnt_wm_set_workspaces(), gnt_wm_switch_workspace_next(), gnt_wm_switch_workspace_prev(), window_list_activate(), and workspace_new().

Here is the caller graph for this function:

◆ gnt_wm_switch_workspace_next()

gboolean gnt_wm_switch_workspace_next ( GntWM wm)

Switch to the next workspace from the current one.

Parameters
wmThe window-manager.

Definition at line 1684 of file gntwm.c.

References _GntWM::cws, gnt_wm_switch_workspace(), wm, and _GntWM::workspaces.

Referenced by workspace_next().

Here is the caller graph for this function:

◆ gnt_wm_switch_workspace_prev()

gboolean gnt_wm_switch_workspace_prev ( GntWM wm)

Switch to the previous workspace from the current one.

Parameters
wmThe window-manager.

Definition at line 1677 of file gntwm.c.

References _GntWM::cws, gnt_wm_switch_workspace(), wm, and _GntWM::workspaces.

Referenced by workspace_prev().

Here is the caller graph for this function:

◆ gnt_wm_update_window()

◆ gnt_wm_widget_find_workspace()

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.

Definition at line 1733 of file gntwm.c.

References NULL, widget, widget_in_workspace(), wm, and _GntWM::workspaces.

Referenced by gnt_wm_raise_window(), gnt_wm_update_window(), gnt_wm_widget_move_workspace(), and gnt_wm_window_close().

Here is the caller graph for this function:

◆ gnt_wm_widget_move_workspace()

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.

Definition at line 1703 of file gntwm.c.

References _GntWM::cws, gnt_wm_widget_find_workspace(), gnt_ws_add_widget(), gnt_ws_remove_widget(), gnt_ws_widget_hide(), gnt_ws_widget_show(), dbus-buddyicons-example::node, _GntWM::nodes, widget, and wm.

Referenced by widget_move_ws().

Here is the caller graph for this function:

◆ gnt_wm_window_close()

void gnt_wm_window_close ( GntWM wm,
GntWidget widget 
)

Close a window.

Parameters
wmThe window-manager.
widgetThe window to close.

Definition at line 1940 of file gntwm.c.

References _GntWM::cws, FALSE, GNT_TREE, gnt_tree_remove(), GNT_WIDGET_IS_FLAG_SET, GNT_WIDGET_TRANSIENT, gnt_wm_raise_window(), gnt_wm_update_window(), gnt_wm_widget_find_workspace(), gnt_ws_draw_taskbar(), _GntWS::list, _GntWM::nodes, NULL, _GntWS::ordered, SIG_CLOSE_WIN, signals, _GntWM::tree, update_screen(), widget, _GntWM::windows, and wm.

Referenced by gnt_screen_release().

Here is the caller graph for this function:

◆ gnt_wm_window_decorate()

void gnt_wm_window_decorate ( GntWM wm,
GntWidget widget 
)

Decorate a window.

Parameters
wmThe window-manager.
widgetThe widget to decorate.

Definition at line 1935 of file gntwm.c.

References SIG_DECORATE_WIN, signals, widget, and wm.