Add missing AUTHORS and ChangeLog.
[gnt.git] / gntmenuitemcheck.h
blob289d123f228ba4970769f2ae06afe0e54629df1f
1 /**
2 * @file gntmenuitemcheck.h Check Menuitem 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_MENU_ITEM_CHECK_H
28 #define GNT_MENU_ITEM_CHECK_H
30 #include "gnt.h"
31 #include "gntcolors.h"
32 #include "gntkeys.h"
33 #include "gntmenuitem.h"
35 #define GNT_TYPE_MENU_ITEM_CHECK (gnt_menuitem_check_get_gtype())
36 #define GNT_MENU_ITEM_CHECK(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_MENU_ITEM_CHECK, GntMenuItemCheck))
37 #define GNT_MENU_ITEM_CHECK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_MENU_ITEM_CHECK, GntMenuItemCheckClass))
38 #define GNT_IS_MENU_ITEM_CHECK(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_MENU_ITEM_CHECK))
39 #define GNT_IS_MENU_ITEM_CHECK_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENU_ITEM_CHECK))
40 #define GNT_MENU_ITEM_CHECK_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU_ITEM_CHECK, GntMenuItemCheckClass))
42 #define GNT_MENU_ITEM_CHECK_FLAGS(obj) (GNT_MENU_ITEM_CHECK(obj)->priv.flags)
43 #define GNT_MENU_ITEM_CHECK_SET_FLAGS(obj, flags) (GNT_MENU_ITEM_CHECK_FLAGS(obj) |= flags)
44 #define GNT_MENU_ITEM_CHECK_UNSET_FLAGS(obj, flags) (GNT_MENU_ITEM_CHECK_FLAGS(obj) &= ~(flags))
46 typedef struct _GntMenuItemCheck GntMenuItemCheck;
47 typedef struct _GntMenuItemCheckPriv GntMenuItemCheckPriv;
48 typedef struct _GntMenuItemCheckClass GntMenuItemCheckClass;
50 struct _GntMenuItemCheck
52 GntMenuItem parent;
53 gboolean checked;
56 struct _GntMenuItemCheckClass
58 GntMenuItemClass parent;
60 void (*gnt_reserved1)(void);
61 void (*gnt_reserved2)(void);
62 void (*gnt_reserved3)(void);
63 void (*gnt_reserved4)(void);
66 G_BEGIN_DECLS
68 /**
69 * @return GType for GntMenuItemCheck.
71 GType gnt_menuitem_check_get_gtype(void);
73 /**
74 * Create a new menuitem.
76 * @param text The text for the menuitem.
78 * @return The newly created menuitem.
80 GntMenuItem * gnt_menuitem_check_new(const char *text);
82 /**
83 * Check whether the menuitem is checked or not.
85 * @param item The menuitem.
87 * @return @c TRUE if the item is checked, @c FALSE otherwise.
89 gboolean gnt_menuitem_check_get_checked(GntMenuItemCheck *item);
91 /**
92 * Set whether the menuitem is checked or not.
94 * @param item The menuitem.
95 * @param set @c TRUE if the item should be checked, @c FALSE otherwise.
97 void gnt_menuitem_check_set_checked(GntMenuItemCheck *item, gboolean set);
99 G_END_DECLS
101 #endif /* GNT_MENU_ITEM_CHECK_H */