Mercurial > pidgin
annotate finch/libgnt/gntmenuitem.h @ 23194:66ccd61eaff6
merge of 'd993fb67df1d01ad9a8a18fef3e8a5de90823875'
and 'da43d67131d318f67d21afc95a349c3ab8ef8c92'
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Sun, 25 May 2008 23:48:57 +0000 |
parents | 6de09629f091 |
children |
rev | line source |
---|---|
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
1 /** |
18303
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17928
diff
changeset
|
2 * @file gntmenuitem.h Menuitem API |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17928
diff
changeset
|
3 * @ingroup gnt |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17928
diff
changeset
|
4 */ |
5c6f019e48f8
Generate doxy-help files for libgnt. And make it actually work.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17928
diff
changeset
|
5 /* |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
6 * GNT - The GLib Ncurses Toolkit |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
7 * |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
8 * GNT is the legal property of its developers, whose names are too numerous |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
9 * to list here. Please refer to the COPYRIGHT file distributed with this |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
10 * source distribution. |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
11 * |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
12 * This library is free software; you can redistribute it and/or modify |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
13 * it under the terms of the GNU General Public License as published by |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
14 * the Free Software Foundation; either version 2 of the License, or |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
15 * (at your option) any later version. |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
16 * |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
17 * This program is distributed in the hope that it will be useful, |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
20 * GNU General Public License for more details. |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
21 * |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
22 * You should have received a copy of the GNU General Public License |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
23 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18440
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
25 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
26 |
15817 | 27 #ifndef GNT_MENUITEM_H |
28 #define GNT_MENUITEM_H | |
29 | |
30 #include <glib.h> | |
31 #include <glib-object.h> | |
32 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
33 #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
|
34 #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
|
35 #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
|
36 #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
|
37 #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
|
38 #define GNT_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU_ITEM, GntMenuItemClass)) |
15817 | 39 |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
40 #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
|
41 #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
|
42 #define GNT_MENU_ITEM_UNSET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) &= ~(flags)) |
15817 | 43 |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
44 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
|
45 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
|
46 typedef struct _GntMenuItemClass GntMenuItemClass; |
15817 | 47 |
48 #include "gntmenu.h" | |
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 _GntMenuItemPriv |
15817 | 51 { |
52 /* These will be used to determine the position of the submenu */ | |
53 int x; | |
54 int y; | |
18440
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
55 char trigger; |
21212
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
56 char *id; |
15817 | 57 }; |
58 | |
59 typedef void (*GntMenuItemCallback)(GntMenuItem *item, gpointer data); | |
60 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
61 struct _GntMenuItem |
15817 | 62 { |
63 GObject parent; | |
64 GntMenuItemPriv priv; | |
65 | |
66 char *text; | |
67 | |
68 /* A GntMenuItem can have a callback associated with it. | |
69 * The callback will be activated whenever the suer selects it and presses enter (or clicks). | |
70 * However, if the GntMenuItem has some child, then the callback and callbackdata will be ignored. */ | |
71 gpointer callbackdata; | |
72 GntMenuItemCallback callback; | |
73 | |
74 GntMenu *submenu; | |
75 }; | |
76 | |
15928
f00f2e283ffb
Some define changes. This helps in generating the python bindings.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
15817
diff
changeset
|
77 struct _GntMenuItemClass |
15817 | 78 { |
79 GObjectClass parent; | |
80 | |
81 void (*gnt_reserved1)(void); | |
82 void (*gnt_reserved2)(void); | |
83 void (*gnt_reserved3)(void); | |
84 void (*gnt_reserved4)(void); | |
85 }; | |
86 | |
87 G_BEGIN_DECLS | |
88 | |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
89 /** |
21161
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
90 * @return GType for GntMenuItem. |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
91 */ |
15817 | 92 GType gnt_menuitem_get_gtype(void); |
93 | |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
94 /** |
21161
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
95 * Create a new menuitem. |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
96 * |
21161
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
97 * @param text Label for the menuitem. |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
98 * |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
99 * @return The newly created menuitem. |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
100 */ |
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
101 GntMenuItem * gnt_menuitem_new(const char *text); |
15817 | 102 |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
103 /** |
21161
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
104 * Set a callback function for a menuitem. |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
105 * |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
106 * @param item The menuitem. |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
107 * @param callback The callback function. |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
108 * @param data Data to send to the callback function. |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
109 */ |
15817 | 110 void gnt_menuitem_set_callback(GntMenuItem *item, GntMenuItemCallback callback, gpointer data); |
111 | |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
112 /** |
21161
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
113 * Set a submenu for a menuitem. A menuitem with a submenu cannot have a callback. |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
114 * |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
115 * @param item The menuitem. |
e119edfc0fb0
applied changes from 172a59b41412c4630834d66f2e7ec3be970cc36b
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21158
diff
changeset
|
116 * @param menu The submenu. |
17928
8410511f4dbb
applied changes from 016401bd409e6229fae0ab1e80d9fef9365511b3
Eric Polino <aluink@pidgin.im>
parents:
15928
diff
changeset
|
117 */ |
15817 | 118 void gnt_menuitem_set_submenu(GntMenuItem *item, GntMenu *menu); |
119 | |
18440
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
120 /** |
21212
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
121 * Get the submenu for a menuitem. |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
122 * |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
123 * @param item The menuitem. |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
124 * |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
125 * @return The submenu, or @c NULL. |
21252
d275275a011c
Missing changelog entries and @since tags from 3f567df17490f68b4feb8cf26ad004a34eb7cc9a.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21212
diff
changeset
|
126 * |
d275275a011c
Missing changelog entries and @since tags from 3f567df17490f68b4feb8cf26ad004a34eb7cc9a.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21212
diff
changeset
|
127 * @since 2.3.0 |
21212
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
128 */ |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
129 GntMenu *gnt_menuitem_get_submenu(GntMenuItem *item); |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
130 |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
131 /** |
18440
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
132 * Set a trigger key for the item. |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
133 * |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
134 * @param item The menuitem |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
135 * @param trigger The key that will trigger the item when the parent manu is visible |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
136 */ |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
137 void gnt_menuitem_set_trigger(GntMenuItem *item, char trigger); |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
138 |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
139 /** |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
140 * Get the trigger key for a menuitem. |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
141 * |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
142 * @param item The menuitem |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
143 * |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
144 * @return The trigger key for the menuitem. |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
145 * |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
146 * @see gnt_menuitem_set_trigger |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
147 */ |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
148 char gnt_menuitem_get_trigger(GntMenuItem *item); |
be10fc22d649
Allow trigger keys for menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
18303
diff
changeset
|
149 |
21212
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
150 /** |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
151 * Set an ID for the menuitem. |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
152 * |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
153 * @param item The menuitem. |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
154 * @param id The ID for the menuitem. |
21252
d275275a011c
Missing changelog entries and @since tags from 3f567df17490f68b4feb8cf26ad004a34eb7cc9a.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21212
diff
changeset
|
155 * |
d275275a011c
Missing changelog entries and @since tags from 3f567df17490f68b4feb8cf26ad004a34eb7cc9a.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21212
diff
changeset
|
156 * @since 2.3.0 |
21212
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
157 */ |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
158 void gnt_menuitem_set_id(GntMenuItem *item, const char *id); |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
159 |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
160 /** |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
161 * Get the ID of the menuitem. |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
162 * |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
163 * @param item The menuitem. |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
164 * |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
165 * @return The ID for the menuitem. |
21252
d275275a011c
Missing changelog entries and @since tags from 3f567df17490f68b4feb8cf26ad004a34eb7cc9a.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21212
diff
changeset
|
166 * |
d275275a011c
Missing changelog entries and @since tags from 3f567df17490f68b4feb8cf26ad004a34eb7cc9a.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21212
diff
changeset
|
167 * @since 2.3.0 |
21212
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
168 */ |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
169 const char * gnt_menuitem_get_id(GntMenuItem *item); |
b65f1bff6412
Allow binding key-shortcuts to menuitems.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
19681
diff
changeset
|
170 |
21256
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
171 /** |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
172 * Activate a menuitem. |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
173 * Activating the menuitem will first trigger the 'activate' signal for the |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
174 * menuitem. Then the callback for the menuitem is triggered, if there is one. |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
175 * |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
176 * @param item The menuitem. |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
177 * |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
178 * @return Whether the callback for the menuitem was called. |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
179 * |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
180 * @since 2.3.0 |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
181 */ |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
182 gboolean gnt_menuitem_activate(GntMenuItem *item); |
e8b0f224483f
Add gnt_menuitem_activate, and 'activate' signal for GntMenuItem.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
21252
diff
changeset
|
183 |
15817 | 184 G_END_DECLS |
185 | |
186 #endif /* GNT_MENUITEM_H */ |