Data Structures | Macros | Typedefs | Functions
gntws.h File Reference
GNT (GLib Ncurses Toolkit)

Workspace API. More...

`#include "gntwidget.h"`
`#include <panel.h>`

Go to the source code of this file.

## Data Structures
struct | _GntWS
struct | _GntWSClass

## Macros
#define | GNT_TYPE_WS (gnt_ws_get_gtype())
#define | GNT_WS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WS, GntWS))
#define | GNT_IS_WS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WS))
#define | GNT_IS_WS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WS))
#define | GNT_WS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WS, GntWSClass))

## Typedefs
typedef struct _GntWS | GntWS
typedef struct _GntWSClass | GntWSClass

## Functions
G_BEGIN_DECLS GType | gnt_ws_get_gtype (void)
GntWS * | gnt_ws_new (const char *name)
| Create a new workspace with the specified name. More...
void | gnt_ws_set_name (GntWS *ws, const gchar *name)
| Set the name of a workspace. More...
void | gnt_ws_add_widget (GntWS *ws, GntWidget *widget)
| Add a widget to a workspace. More...
void | gnt_ws_remove_widget (GntWS *ws, GntWidget *widget)
| Remove a widget from a workspace. More...
void | gnt_ws_widget_hide (GntWidget *widget, GHashTable *nodes)
| Hide a widget in a workspace. More...
void | gnt_ws_widget_show (GntWidget *widget, GHashTable *nodes)
| Show a widget in a workspace. More...
void | gnt_ws_draw_taskbar (GntWS *ws, gboolean reposition)
| Draw the taskbar in a workspace. More...
void | gnt_ws_hide (GntWS *ws, GHashTable *table)
| Hide a workspace. More...
void | gnt_ws_show (GntWS *ws, GHashTable *table)
| Show a workspace. More...
const char * | gnt_ws_get_name (GntWS *ws)
| Get the name of a workspace. More...

## Detailed Description

Workspace API.

Definition in file gntws.h.

## Function Documentation

## ◆ gnt_ws_add_widget()

void gnt_ws_add_widget | ( | GntWS * | ws,
|  | GntWidget * | widget
| ) |  |

Add a widget to a workspace.

Parameters

  ws | The workspace.
  widget | The widget to add.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_draw_taskbar()

void gnt_ws_draw_taskbar | ( | GntWS * | ws,
|  | gboolean | reposition
| ) |  |

Draw the taskbar in a workspace.

Parameters

  ws | The workspace.
  reposition | Whether the workspace should reposition the taskbar.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_get_gtype()

G_BEGIN_DECLS GType gnt_ws_get_gtype | ( | void |  | ) |

Returns
  The GType for GntWS.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_get_name()

const char* gnt_ws_get_name | ( | GntWS * | ws | ) |

Get the name of a workspace.

Parameters

  ws | The workspace.

Returns
  The name of the workspace (can be `NULL`).

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_hide()

void gnt_ws_hide | ( | GntWS * | ws,
|  | GHashTable * | table
| ) |  |

Hide a workspace.

Parameters

  ws | The workspace to hide.
  table | A hashtable containing information about the widgets.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_new()

GntWS* gnt_ws_new | ( | const char * | name | ) |

Create a new workspace with the specified name.

Parameters

  name | The desired name of the workspace, or `NULL`.

Returns
  The newly created workspace.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_remove_widget()

void gnt_ws_remove_widget | ( | GntWS * | ws,
|  | GntWidget * | widget
| ) |  |

Remove a widget from a workspace.

Parameters

  ws | The workspace
  widget | The widget to remove from the workspace.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_set_name()

void gnt_ws_set_name | ( | GntWS * | ws,
|  | const gchar * | name
| ) |  |

Set the name of a workspace.

Parameters

  ws | The workspace to rename.
  name | The new name of the workspace.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_show()

void gnt_ws_show | ( | GntWS * | ws,
|  | GHashTable * | table
| ) |  |

Show a workspace.

Parameters

  ws | The workspace to hide.
  table | A hashtable containing information about the widgets.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_widget_hide()

void gnt_ws_widget_hide | ( | GntWidget * | widget,
|  | GHashTable * | nodes
| ) |  |

Hide a widget in a workspace.

Parameters

  widget | The widget to hide.
  nodes | A hashtable containing information about the widgets.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)

## ◆ gnt_ws_widget_show()

void gnt_ws_widget_show | ( | GntWidget * | widget,
|  | GHashTable * | nodes
| ) |  |

Show a widget in a workspace.

Parameters

  widget | The widget to show.
  nodes | A hashtable containing information about the widgets.

Since
  2.0.0 (gnt), 2.1.0 (pidgin)