Update to 24f58c58bb8d22c0e8e6c5ce43c536c47b719bc6
[gnt.git] / gntbutton.h
blobc285cb7fcd371c08c0c220412f838455c0af2232
1 /**
2 * @file gntbutton.h Button API
3 * @ingroup gnt
4 */
5 /*
6 * GNT - The GLib Ncurses Toolkit
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.
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.
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.
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
27 #ifndef GNT_BUTTON_H
28 #define GNT_BUTTON_H
30 #include <glib.h>
31 #include <glib-object.h>
32 #include "gnt.h"
33 #include "gntwidget.h"
35 #define GNT_TYPE_BUTTON (gnt_button_get_gtype())
36 #define GNT_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_BUTTON, GntButton))
37 #define GNT_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_BUTTON, GntButtonClass))
38 #define GNT_IS_BUTTON(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_BUTTON))
39 #define GNT_IS_BUTTON_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_BUTTON))
40 #define GNT_BUTTON_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_BUTTON, GntButtonClass))
42 typedef struct _GntButton GntButton;
43 typedef struct _GntButtonPriv GntButtonPriv;
44 typedef struct _GntButtonClass GntButtonClass;
46 struct _GntButtonPriv
48 char *text;
51 struct _GntButton
53 GntWidget parent;
55 GntButtonPriv *priv;
57 void (*gnt_reserved1)(void);
58 void (*gnt_reserved2)(void);
59 void (*gnt_reserved3)(void);
60 void (*gnt_reserved4)(void);
63 struct _GntButtonClass
65 GntWidgetClass parent;
67 void (*gnt_reserved1)(void);
68 void (*gnt_reserved2)(void);
69 void (*gnt_reserved3)(void);
70 void (*gnt_reserved4)(void);
73 G_BEGIN_DECLS
75 /**
76 * @return GType for Gntbutton
78 GType gnt_button_get_gtype(void);
80 /**
81 * Create a new button.
83 * @param text The text for the button.
85 * @return The newly created button.
87 GntWidget * gnt_button_new(const char *text);
89 G_END_DECLS
91 #endif /* GNT_BUTTON_H */