Top |
#define | GNT_MENU_ITEM_FLAGS() |
#define | GNT_MENU_ITEM_SET_FLAGS() |
#define | GNT_MENU_ITEM_UNSET_FLAGS() |
void | (*GntMenuItemCallback) () |
GType | gnt_menuitem_get_gtype () |
GntMenuItem * | gnt_menuitem_new () |
void | gnt_menuitem_set_callback () |
void | gnt_menuitem_set_submenu () |
GntMenu * | gnt_menuitem_get_submenu () |
void | gnt_menuitem_set_trigger () |
char | gnt_menuitem_get_trigger () |
void | gnt_menuitem_set_id () |
const char * | gnt_menuitem_get_id () |
gboolean | gnt_menuitem_activate () |
#define GNT_MENU_ITEM_FLAGS(obj) (GNT_MENU_ITEM(obj)->priv.flags)
GNT_MENU_ITEM_FLAGS
has been deprecated since version 2.14.0 and should not be used in newly-written code.
This is an internal implementation detail.
#define GNT_MENU_ITEM_SET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) |= flags)
GNT_MENU_ITEM_SET_FLAGS
has been deprecated since version 2.14.0 and should not be used in newly-written code.
This is an internal implementation detail.
#define GNT_MENU_ITEM_UNSET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) &= ~(flags))
GNT_MENU_ITEM_UNSET_FLAGS
has been deprecated since version 2.14.0 and should not be used in newly-written code.
This is an internal implementation detail.
void gnt_menuitem_set_callback (GntMenuItem *item
,GntMenuItemCallback callback
,gpointer data
);
Set a callback function for a menuitem.
void gnt_menuitem_set_submenu (GntMenuItem *item
,GntMenu *menu
);
Set a submenu for a menuitem. A menuitem with a submenu cannot have a callback.
GntMenu *
gnt_menuitem_get_submenu (GntMenuItem *item
);
Get the submenu for a menuitem.
Since: 2.3.0
void gnt_menuitem_set_trigger (GntMenuItem *item
,char trigger
);
Set a trigger key for the item.
char
gnt_menuitem_get_trigger (GntMenuItem *item
);
Get the trigger key for a menuitem.
void gnt_menuitem_set_id (GntMenuItem *item
,const char *id
);
Set an ID for the menuitem.
Since: 2.3.0
const char *
gnt_menuitem_get_id (GntMenuItem *item
);
Get the ID of the menuitem.
Since: 2.3.0
gboolean
gnt_menuitem_activate (GntMenuItem *item
);
Activate a menuitem. Activating the menuitem will first trigger the 'activate' signal for the menuitem. Then the callback for the menuitem is triggered, if there is one.
Since: 2.3.0
struct GntMenuItemPriv { /* These will be used to determine the position of the submenu */ int GNTSEAL(x); int GNTSEAL(y); char GNTSEAL(trigger); /* Use gnt_menuitem_get_trigger(). */ char *GNTSEAL(id); /* Use gnt_menuitem_get_id(). */ };
GntMenuItemPriv
has been deprecated since version 2.14.0 and should not be used in newly-written code.
This is an internal implementation detail. See inline comments for replacements.
struct GntMenuItem { GObject parent; struct _GntMenuItemPriv GNTSEAL(priv); char *GNTSEAL(text); /* A GntMenuItem can have a callback associated with it. * The callback will be activated whenever the suer selects it and presses enter (or clicks). * However, if the GntMenuItem has some child, then the callback and callbackdata will be ignored. */ gpointer GNTSEAL(callbackdata); GntMenuItemCallback GNTSEAL(callback); GntMenu *GNTSEAL(submenu); };
Access to any fields is deprecated. See inline comments for replacements.