Mercurial > pidgin
annotate finch/libgnt/gntmenuitem.h @ 17210:9ca9f87b4b47
Use gmail.com as the default domain for Google Talk accounts
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 24 May 2007 18:55:14 +0000 |
parents | f00f2e283ffb |
children | 8410511f4dbb |
rev | line source |
---|---|
15817 | 1 #ifndef GNT_MENUITEM_H |
2 #define GNT_MENUITEM_H | |
3 | |
4 #include <glib.h> | |
5 #include <glib-object.h> | |
6 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
7 #define GNT_TYPE_MENU_ITEM (gnt_menuitem_get_gtype()) |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
8 #define GNT_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_MENU_ITEM, GntMenuItem)) |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
9 #define GNT_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_MENU_ITEM, GntMenuItemClass)) |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
10 #define GNT_IS_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_MENU_ITEM)) |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
11 #define GNT_IS_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENU_ITEM)) |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
12 #define GNT_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU_ITEM, GntMenuItemClass)) |
15817 | 13 |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
14 #define GNT_MENU_ITEM_FLAGS(obj) (GNT_MENU_ITEM(obj)->priv.flags) |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
15 #define GNT_MENU_ITEM_SET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) |= flags) |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
16 #define GNT_MENU_ITEM_UNSET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) &= ~(flags)) |
15817 | 17 |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
18 typedef struct _GntMenuItem GntMenuItem; |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
19 typedef struct _GntMenuItemPriv GntMenuItemPriv; |
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
20 typedef struct _GntMenuItemClass GntMenuItemClass; |
15817 | 21 |
22 #include "gntmenu.h" | |
23 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
24 struct _GntMenuItemPriv |
15817 | 25 { |
26 /* These will be used to determine the position of the submenu */ | |
27 int x; | |
28 int y; | |
29 }; | |
30 | |
31 typedef void (*GntMenuItemCallback)(GntMenuItem *item, gpointer data); | |
32 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
33 struct _GntMenuItem |
15817 | 34 { |
35 GObject parent; | |
36 GntMenuItemPriv priv; | |
37 | |
38 char *text; | |
39 | |
40 /* A GntMenuItem can have a callback associated with it. | |
41 * The callback will be activated whenever the suer selects it and presses enter (or clicks). | |
42 * However, if the GntMenuItem has some child, then the callback and callbackdata will be ignored. */ | |
43 gpointer callbackdata; | |
44 GntMenuItemCallback callback; | |
45 | |
46 GntMenu *submenu; | |
47 }; | |
48 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
49 struct _GntMenuItemClass |
15817 | 50 { |
51 GObjectClass parent; | |
52 | |
53 void (*gnt_reserved1)(void); | |
54 void (*gnt_reserved2)(void); | |
55 void (*gnt_reserved3)(void); | |
56 void (*gnt_reserved4)(void); | |
57 }; | |
58 | |
59 G_BEGIN_DECLS | |
60 | |
61 GType gnt_menuitem_get_gtype(void); | |
62 | |
63 GntMenuItem *gnt_menuitem_new(const char *text); | |
64 | |
65 void gnt_menuitem_set_callback(GntMenuItem *item, GntMenuItemCallback callback, gpointer data); | |
66 | |
67 void gnt_menuitem_set_submenu(GntMenuItem *item, GntMenu *menu); | |
68 | |
69 G_END_DECLS | |
70 | |
71 #endif /* GNT_MENUITEM_H */ |