gntbutton.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 GNT_BUTTON_H
28 #define GNT_BUTTON_H
29 
30 #include <glib.h>
31 #include <glib-object.h>
32 #include "gnt.h"
33 #include "gntwidget.h"
34 
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))
41 
42 typedef struct _GntButton GntButton;
43 typedef struct _GntButtonPriv GntButtonPriv;
44 typedef struct _GntButtonClass GntButtonClass;
45 
47 {
48  char *text;
49 };
50 
51 struct _GntButton
52 {
53  GntWidget parent;
54 
55  GntButtonPriv *priv;
56 
57  void (*gnt_reserved1)(void);
58  void (*gnt_reserved2)(void);
59  void (*gnt_reserved3)(void);
60  void (*gnt_reserved4)(void);
61 };
62 
64 {
65  GntWidgetClass parent;
66 
67  void (*gnt_reserved1)(void);
68  void (*gnt_reserved2)(void);
69  void (*gnt_reserved3)(void);
70  void (*gnt_reserved4)(void);
71 };
72 
73 G_BEGIN_DECLS
74 
78 GType gnt_button_get_gtype(void);
79 
87 GntWidget * gnt_button_new(const char *text);
88 
89 G_END_DECLS
90 
91 #endif /* GNT_BUTTON_H */
Widget API.
GNT API.
GntWidget * gnt_button_new(const char *text)
Create a new button.
G_BEGIN_DECLS GType gnt_button_get_gtype(void)