gntws.h
Go to the documentation of this file.
1
5 /*
6 * GNT - The GLib Ncurses Toolkit
7 *
8 * GNT is the legal property of its developers, whose names are too numerous
9 * to list here. Please refer to the COPYRIGHT file distributed with this
10 * source distribution.
11 *
12 * This library is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
25 */
26
27 #ifndef GNTWS_H
28 #define GNTWS_H
29
30 #include "gntwidget.h"
31
32 #include <panel.h>
33
34 #define GNT_TYPE_WS (gnt_ws_get_gtype())
35 #define GNT_WS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WS, GntWS))
36 #define GNT_IS_WS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WS))
37 #define GNT_IS_WS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WS))
38 #define GNT_WS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WS, GntWSClass))
39
40 typedef struct _GntWS GntWS;
41
42 struct _GntWS
43 {
44 GntBindable inherit;
45 char *name;
46 GList *list;
47 GList *ordered;
48 gpointer ui_data;
49
50 void *res1;
51 void *res2;
52 void *res3;
53 void *res4;
54 };
55
56 typedef struct _GntWSClass GntWSClass;
57
58 struct _GntWSClass
59 {
60 GntBindableClass parent;
61
62 void (*draw_taskbar)(GntWS *ws, gboolean );
63
64 void (*res1)(void);
65 void (*res2)(void);
66 void (*res3)(void);
67 void (*res4)(void);
68 };
69
70 G_BEGIN_DECLS
71
77 GType gnt_ws_get_gtype(void);
78
88 GntWS *gnt_ws_new(const char *name);
89
98 void gnt_ws_set_name(GntWS *ws, const gchar *name);
99
108 void gnt_ws_add_widget(GntWS *ws, GntWidget *widget);
109
118 void gnt_ws_remove_widget(GntWS *ws, GntWidget *widget);
119
128 void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes);
129
138 void gnt_ws_widget_show(GntWidget *widget, GHashTable *nodes);
139
148 void gnt_ws_draw_taskbar(GntWS *ws, gboolean reposition);
149
158 void gnt_ws_hide(GntWS *ws, GHashTable *table);
159
168 void gnt_ws_show(GntWS *ws, GHashTable *table);
169
178 const char * gnt_ws_get_name(GntWS *ws);
179
180 #endif
gnt_ws_set_name
void gnt_ws_set_name(GntWS *ws, const gchar *name)
Set the name of a workspace.
gnt_ws_draw_taskbar
void gnt_ws_draw_taskbar(GntWS *ws, gboolean reposition)
Draw the taskbar in a workspace.
gnt_ws_hide
void gnt_ws_hide(GntWS *ws, GHashTable *table)
Hide a workspace.
gnt_ws_get_name
const char * gnt_ws_get_name(GntWS *ws)
Get the name of a workspace.
gntwidget.h
Widget API.
_GntWSClass
Definition: gntws.h:58
_GntBindable
Definition: gntbindable.h:47
gnt_ws_remove_widget
void gnt_ws_remove_widget(GntWS *ws, GntWidget *widget)
Remove a widget from a workspace.
_GntWS
Definition: gntws.h:42
gnt_ws_show
void gnt_ws_show(GntWS *ws, GHashTable *table)
Show a workspace.
gnt_ws_add_widget
void gnt_ws_add_widget(GntWS *ws, GntWidget *widget)
Add a widget to a workspace.
gnt_ws_get_gtype
G_BEGIN_DECLS GType gnt_ws_get_gtype(void)
gnt_ws_new
GntWS * gnt_ws_new(const char *name)
Create a new workspace with the specified name.
_GntBindableClass
Definition: gntbindable.h:52
gnt_ws_widget_show
void gnt_ws_widget_show(GntWidget *widget, GHashTable *nodes)
Show a widget in a workspace.
gnt_ws_widget_hide
void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes)
Hide a widget in a workspace.
_GntWidget
Definition: gntwidget.h:98