Mercurial > pidgin
annotate finch/libgnt/gntmenu.h @ 18015:f8fc41570bf1
propagate from branch 'org.maemo.garage.pidgin.pidgin.pidgin-create-window' (head aa14d4a155af76ab7e3be4b5a92082e3bb2daa21)
to branch 'im.pidgin.rlaager.merging.for_2_1_0' (head c8c2bc1f0dd3a0a30b7be8b90114f176ab8c7943)
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 20 May 2007 14:53:41 +0000 |
parents | f00f2e283ffb |
children | 8410511f4dbb |
rev | line source |
---|---|
15817 | 1 #ifndef GNT_MENU_H |
2 #define GNT_MENU_H | |
3 | |
4 #include "gnttree.h" | |
5 #include "gntcolors.h" | |
6 #include "gntkeys.h" | |
7 | |
8 #define GNT_TYPE_MENU (gnt_menu_get_gtype()) | |
9 #define GNT_MENU(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_MENU, GntMenu)) | |
10 #define GNT_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_MENU, GntMenuClass)) | |
11 #define GNT_IS_MENU(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_MENU)) | |
12 #define GNT_IS_MENU_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENU)) | |
13 #define GNT_MENU_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU, GntMenuClass)) | |
14 | |
15 #define GNT_MENU_FLAGS(obj) (GNT_MENU(obj)->priv.flags) | |
16 #define GNT_MENU_SET_FLAGS(obj, flags) (GNT_MENU_FLAGS(obj) |= flags) | |
17 #define GNT_MENU_UNSET_FLAGS(obj, flags) (GNT_MENU_FLAGS(obj) &= ~(flags)) | |
18 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
19 typedef struct _GntMenu GntMenu; |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
20 typedef struct _GntMenuPriv GntMenuPriv; |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
21 typedef struct _GntMenuClass GntMenuClass; |
15817 | 22 |
23 #include "gntmenuitem.h" | |
24 | |
25 /** | |
26 * A toplevel-menu is displayed at the top of the screen, and it spans accross | |
27 * the entire width of the screen. | |
28 * A popup-menu could be displayed, for example, as a context menu for widgets. | |
29 */ | |
30 typedef enum | |
31 { | |
32 GNT_MENU_TOPLEVEL = 1, /* Menu for a toplevel window */ | |
33 GNT_MENU_POPUP, /* A popup menu */ | |
34 } GntMenuType; | |
35 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
36 struct _GntMenu |
15817 | 37 { |
38 GntTree parent; | |
39 GntMenuType type; | |
40 | |
41 GList *list; | |
42 int selected; | |
43 | |
44 /* This will keep track of its immediate submenu which is visible so that | |
45 * keystrokes can be passed to it. */ | |
46 GntMenu *submenu; | |
47 GntMenu *parentmenu; | |
48 }; | |
49 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
50 struct _GntMenuClass |
15817 | 51 { |
52 GntTreeClass parent; | |
53 | |
54 void (*gnt_reserved1)(void); | |
55 void (*gnt_reserved2)(void); | |
56 void (*gnt_reserved3)(void); | |
57 void (*gnt_reserved4)(void); | |
58 }; | |
59 | |
60 G_BEGIN_DECLS | |
61 | |
62 GType gnt_menu_get_gtype(void); | |
63 | |
64 GntWidget *gnt_menu_new(GntMenuType type); | |
65 | |
66 void gnt_menu_add_item(GntMenu *menu, GntMenuItem *item); | |
67 | |
68 G_END_DECLS | |
69 | |
70 #endif /* GNT_MENU_H */ |