gntwindow.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 GNT_WINDOW_H
00028 #define GNT_WINDOW_H
00029 
00030 #include "gnt.h"
00031 #include "gntbox.h"
00032 #include "gntcolors.h"
00033 #include "gntkeys.h"
00034 #include "gntmenu.h"
00035 
00036 #define GNT_TYPE_WINDOW             (gnt_window_get_gtype())
00037 #define GNT_WINDOW(obj)             (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_WINDOW, GntWindow))
00038 #define GNT_WINDOW_CLASS(klass)     (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_WINDOW, GntWindowClass))
00039 #define GNT_IS_WINDOW(obj)          (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_WINDOW))
00040 #define GNT_IS_WINDOW_CLASS(klass)  (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_WINDOW))
00041 #define GNT_WINDOW_GET_CLASS(obj)   (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_WINDOW, GntWindowClass))
00042 
00043 #define GNT_WINDOW_FLAGS(obj)               (GNT_WINDOW(obj)->priv.flags)
00044 #define GNT_WINDOW_SET_FLAGS(obj, flags)        (GNT_WINDOW_FLAGS(obj) |= flags)
00045 #define GNT_WINDOW_UNSET_FLAGS(obj, flags)  (GNT_WINDOW_FLAGS(obj) &= ~(flags))
00046 
00047 typedef struct _GntWindow           GntWindow;
00048 typedef struct _GntWindowPriv       GntWindowPriv;
00049 typedef struct _GntWindowClass      GntWindowClass;
00050 
00051 typedef enum
00052 {
00053     GNT_WINDOW_MAXIMIZE_X = 1 << 0,
00054     GNT_WINDOW_MAXIMIZE_Y = 1 << 1,
00055 } GntWindowFlags;
00056 
00057 struct _GntWindow
00058 {
00059     GntBox parent;
00060     GntMenu *menu;
00061     GntWindowPriv *priv;
00062 };
00063 
00064 struct _GntWindowClass
00065 {
00066     GntBoxClass parent;
00067 
00068     void (*gnt_reserved1)(void);
00069     void (*gnt_reserved2)(void);
00070     void (*gnt_reserved3)(void);
00071     void (*gnt_reserved4)(void);
00072 };
00073 
00074 G_BEGIN_DECLS
00075 
00079 GType gnt_window_get_gtype(void);
00080 
00081 #define gnt_vwindow_new(homo) gnt_window_box_new(homo, TRUE)
00082 #define gnt_hwindow_new(homo) gnt_window_box_new(homo, FALSE)
00083 
00089 GntWidget * gnt_window_new(void);
00090 
00099 GntWidget * gnt_window_box_new(gboolean homo, gboolean vert);
00100 
00107 void gnt_window_set_menu(GntWindow *window, GntMenu *menu);
00108 
00119 const char * gnt_window_get_accel_item(GntWindow *window, const char *key);
00120 
00129 void gnt_window_set_maximize(GntWindow *window, GntWindowFlags maximize);
00130 
00140 GntWindowFlags gnt_window_get_maximize(GntWindow *window);
00141 
00142 void gnt_window_workspace_hiding(GntWindow *);
00143 void gnt_window_workspace_showing(GntWindow *);
00144 
00145 G_END_DECLS
00146 
00147 #endif /* GNT_WINDOW_H */