gntws.h

Go to the documentation of this file.
00001 
00005 /*
00006  * GNT - The GLib Ncurses Toolkit
00007  *
00008  * GNT is the legal property of its developers, whose names are too numerous
00009  * to list here.  Please refer to the COPYRIGHT file distributed with this
00010  * source distribution.
00011  *
00012  * This library is free software; you can redistribute it and/or modify
00013  * it under the terms of the GNU General Public License as published by
00014  * the Free Software Foundation; either version 2 of the License, or
00015  * (at your option) any later version.
00016  *
00017  * This program is distributed in the hope that it will be useful,
00018  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00019  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020  * GNU General Public License for more details.
00021  *
00022  * You should have received a copy of the GNU General Public License
00023  * along with this program; if not, write to the Free Software
00024  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
00025  */
00026 
00027 #ifndef GNTWS_H
00028 #define GNTWS_H
00029 
00030 #include "gntwidget.h"
00031 
00032 #include <panel.h>
00033 
00034 #define GNT_TYPE_WS             (gnt_ws_get_gtype())
00035 #define GNT_WS(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WS, GntWS))
00036 #define GNT_IS_WS(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WS))
00037 #define GNT_IS_WS_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WS))
00038 #define GNT_WS_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WS, GntWSClass))
00039 
00040 typedef struct _GntWS GntWS;
00041 
00042 struct _GntWS
00043 {
00044     GntBindable inherit;
00045     char *name;
00046     GList *list;
00047     GList *ordered;
00048     gpointer ui_data;
00049     
00050     void *res1;
00051     void *res2;
00052     void *res3;
00053     void *res4;
00054 };
00055 
00056 typedef struct _GntWSClass GntWSClass;
00057 
00058 struct _GntWSClass
00059 {
00060     GntBindableClass parent;
00061 
00062     void (*draw_taskbar)(GntWS *ws, gboolean );
00063 
00064     void (*res1)(void);
00065     void (*res2)(void);
00066     void (*res3)(void);
00067     void (*res4)(void);
00068 };
00069 
00070 G_BEGIN_DECLS
00071 
00077 GType gnt_ws_get_gtype(void);
00078 
00088 GntWS *gnt_ws_new(const char *name);
00089 
00098 void gnt_ws_set_name(GntWS *ws, const gchar *name);
00099 
00108 void gnt_ws_add_widget(GntWS *ws, GntWidget *widget);
00109 
00118 void gnt_ws_remove_widget(GntWS *ws, GntWidget *widget);
00119 
00128 void gnt_ws_widget_hide(GntWidget *widget, GHashTable *nodes);
00129 
00138 void gnt_ws_widget_show(GntWidget *widget, GHashTable *nodes);
00139 
00148 void gnt_ws_draw_taskbar(GntWS *ws, gboolean reposition);
00149 
00158 void gnt_ws_hide(GntWS *ws, GHashTable *table);
00159 
00168 void gnt_ws_show(GntWS *ws, GHashTable *table);
00169 
00178 const char * gnt_ws_get_name(GntWS *ws);
00179 
00180 #endif