## GntWM GntWM — A window manager |

## Functions

void | (*callback) ()
GType | gnt_wm_get_gtype ()
void | gnt_wm_add_workspace ()
gboolean | gnt_wm_switch_workspace ()
gboolean | gnt_wm_switch_workspace_prev ()
gboolean | gnt_wm_switch_workspace_next ()
void | gnt_wm_widget_move_workspace ()
void | gnt_wm_set_workspaces ()
GntWS * | gnt_wm_widget_find_workspace ()
void | gnt_wm_new_window ()
void | gnt_wm_window_decorate ()
void | gnt_wm_window_close ()
gboolean | gnt_wm_process_input ()
gboolean | gnt_wm_process_click ()
void | gnt_wm_resize_window ()
void | gnt_wm_move_window ()
void | gnt_wm_update_window ()
void | gnt_wm_raise_window ()
void | gnt_wm_set_event_stack ()
void | gnt_wm_copy_win ()
time_t | gnt_wm_get_idle_time ()

## Types and Values

enum | GntKeyPressMode
struct | GntWM

## Description

## Functions

### callback ()

    void
    (*callback) (void);

### gnt_wm_get_gtype ()

    GType
    gnt_wm_get_gtype (void);

#### Returns

GType for GntWM.

### gnt_wm_add_workspace ()

    void
    gnt_wm_add_workspace (GntWM *wm,
                          GntWS *ws);

Add a workspace.

#### Parameters

wm | The window-manager. |
ws | The workspace to add. |

### gnt_wm_switch_workspace ()

    gboolean
    gnt_wm_switch_workspace (GntWM *wm,
                             gint n);

Switch to a workspace.

#### Parameters

wm | The window-manager. |
n | Index of the workspace to switch to. |

#### Returns

`TRUE` if the switch was successful.

### gnt_wm_switch_workspace_prev ()

    gboolean
    gnt_wm_switch_workspace_prev (GntWM *wm);

Switch to the previous workspace from the current one.

#### Parameters

wm | The window-manager. |

### gnt_wm_switch_workspace_next ()

    gboolean
    gnt_wm_switch_workspace_next (GntWM *wm);

Switch to the next workspace from the current one.

#### Parameters

wm | The window-manager. |

### 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

wm | The window manager. |
neww | The new workspace. |
widget | The widget to move. |

### gnt_wm_set_workspaces ()

    void
    gnt_wm_set_workspaces (GntWM *wm,
                           GList *workspaces);

Set the list of workspaces .

#### Parameters

wm | The window manager. |
workspaces | The list of workspaces. | [element-type Gnt.WS]

### gnt_wm_widget_find_workspace ()

    GntWS *
    gnt_wm_widget_find_workspace (GntWM *wm,
                                  GntWidget *widget);

Find the workspace that contains a specific widget.

#### Parameters

wm | The window-manager. |
widget | The widget to find. |

#### Returns

The workspace that has the widget.

[transfer none]

### gnt_wm_new_window ()

    void
    gnt_wm_new_window (GntWM *wm,
                       GntWidget *widget);

Process a new window.

#### Parameters

wm | The window-manager. |
widget | The new window. |

### gnt_wm_window_decorate ()

    void
    gnt_wm_window_decorate (GntWM *wm,
                            GntWidget *widget);

Decorate a window.

#### Parameters

wm | The window-manager. |
widget | The widget to decorate. |

### gnt_wm_window_close ()

    void
    gnt_wm_window_close (GntWM *wm,
                         GntWidget *widget);

Close a window.

#### Parameters

wm | The window-manager. |
widget | The window to close. |

### gnt_wm_process_input ()

    gboolean
    gnt_wm_process_input (GntWM *wm,
                          const char *string);

Process input.

#### Parameters

wm | The window-manager. |
string | The input string to process. |

#### Returns

`TRUE` of the string was processed, `FALSE` otherwise.

### gnt_wm_process_click ()

    gboolean
    gnt_wm_process_click (GntWM *wm,
                          GntMouseEvent event,
                          int x,
                          int y,
                          GntWidget *widget);

Process a click event.

#### Parameters

wm | The window manager. |
event | The mouse event. |
x | The x-coordinate of the mouse. |
y | The y-coordinate of the mouse. |
widget | The widget under the mouse. |

#### Returns

`TRUE` if the event was handled, `FALSE` otherwise.

### gnt_wm_resize_window ()

    void
    gnt_wm_resize_window (GntWM *wm,
                          GntWidget *widget,
                          int width,
                          int height);

Resize a window.

#### Parameters

wm | The window manager. |
widget | The window to resize. |
width | The desired width of the window. |
height | The desired height of the window. |

### gnt_wm_move_window ()

    void
    gnt_wm_move_window (GntWM *wm,
                        GntWidget *widget,
                        int x,
                        int y);

Move a window.

#### Parameters

wm | The window manager. |
widget | The window to move. |
x | The desired x-coordinate of the window. |
y | The desired y-coordinate of the window. |

### gnt_wm_update_window ()

    void
    gnt_wm_update_window (GntWM *wm,
                          GntWidget *widget);

Update a window.

#### Parameters

wm | The window-manager. |
widget | The window to update. |

### gnt_wm_raise_window ()

    void
    gnt_wm_raise_window (GntWM *wm,
                         GntWidget *widget);

Raise a window.

#### Parameters

wm | The window-manager. |
widget | The window to raise. |

### gnt_wm_set_event_stack ()

    void
    gnt_wm_set_event_stack (GntWM *wm,
                            gboolean set);

`gnt_wm_set_event_stack` has been deprecated since version 2.14.0 and should not be used in newly-written code.

Internal function -- do not use.

### gnt_wm_copy_win ()

    void
    gnt_wm_copy_win (GntWidget *widget,
                     GntNode *node);

`gnt_wm_copy_win` has been deprecated since version 2.14.0 and should not be used in newly-written code.

Internal function -- do not use.

### gnt_wm_get_idle_time ()

    time_t
    gnt_wm_get_idle_time (void);

#### Returns

The idle time of the user.

## Types and Values

### enum GntKeyPressMode

`GntKeyPressMode` has been deprecated since version 2.14.0 and should not be used in newly-written code.

This is an internal implementation detail.

#### Members

GNT_KP_MODE_NORMAL |  |
GNT_KP_MODE_RESIZE |  |
GNT_KP_MODE_MOVE |  |
GNT_KP_MODE_WAIT_ON_CHILD |  |

### struct GntWM

    struct GntWM {
    	GntBindable inherit;

    	GMainLoop *GNTSEAL(loop);

    	GList *GNTSEAL(workspaces);
    	GList *GNTSEAL(tagged); /* tagged windows */
    	GntWS *GNTSEAL(cws);

    	struct {
    		GntWidget *GNTSEAL(window);
    		GntWidget *GNTSEAL(tree);
    	} GNTSEAL(_list),
    		*GNTSEAL(windows),         /* Window-list window */
    		*GNTSEAL(actions);         /* Action-list window */

    	GHashTable *GNTSEAL(nodes);    /* GntWidget -> GntNode */
    	GHashTable *GNTSEAL(name_places);    /* window name -> ws*/
    	GHashTable *GNTSEAL(title_places);    /* window title -> ws */

    	GList *GNTSEAL(acts);

    	GntMenu *GNTSEAL(menu);

    	gboolean GNTSEAL(event_stack);

    	GntKeyPressMode GNTSEAL(mode);

    	GHashTable *GNTSEAL(positions);
    };

Access to any fields is deprecated. See inline comments for replacements.

#### Members

GntBindable `inherit`; |  |