1 /* Copyright (C) 2008 Bradley Smith <brad@brad-smith.co.uk> 2 * 3 * GNU Robots, ui-cmdwin.h 4 * 5 * GNU Robots is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (at your option) any later version. 9 * 10 * GNU Robots is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with GNU Robots. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef __UI_CMDWIN_H__ 20 #define __UI_CMDWIN_H__ 21 22 #include <gtk/gtk.h> 23 24 G_BEGIN_DECLS 25 26 #define UI_TYPE_CMDWIN \ 27 ui_cmdwin_get_type() 28 #define UI_CMDWIN(obj) \ 29 G_TYPE_CHECK_INSTANCE_CAST(obj, UI_TYPE_CMDWIN, UICmdWin) 30 #define UI_CMDWIN_CLASS(klass) \ 31 G_TYPE_CHECK_CLASS_CAST(klass, UI_CMDWIN_TYPE, UICmdWinClass) 32 #define IS_UI_CMDWIN(obj) \ 33 G_TYPE_CHECK_INSTANCE_TYPE(obj, UI_TYPE_CMDWIN) 34 #define IS_UI_CMDWIN_CLASS(klass) \ 35 G_TYPE_CHECK_CLASS_TYPE(klass, UI_TYPE_CMDWIN) 36 37 typedef struct _UICmdWin UICmdWin; 38 typedef struct _UICmdWinClass UICmdWinClass; 39 typedef struct _UICmdWinPrivate UICmdWinPrivate; 40 41 struct _UICmdWin 42 { 43 GtkVBox widget; 44 UICmdWinPrivate* priv; 45 }; 46 47 struct _UICmdWinClass 48 { 49 GtkVBoxClass parent_class; 50 }; 51 52 GType ui_cmdwin_get_type(void) G_GNUC_CONST; 53 54 GtkWidget *ui_cmdwin_new(void); 55 void ui_cmdwin_get_string(UICmdWin *cmdwin, gchar *prompt, gchar *buf, 56 gint len); 57 58 G_END_DECLS 59 60 #endif 61