#include <glib.h>
#include <glib-object.h>
#include "gntmenu.h"
Go to the source code of this file.
Data Structures | |
| struct | _GntMenuItemPriv |
| struct | _GntMenuItem |
| struct | _GntMenuItemClass |
Defines | |
| #define | GNT_TYPE_MENU_ITEM (gnt_menuitem_get_gtype()) |
| #define | GNT_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GNT_TYPE_MENU_ITEM, GntMenuItem)) |
| #define | GNT_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GNT_TYPE_MENU_ITEM, GntMenuItemClass)) |
| #define | GNT_IS_MENU_ITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GNT_TYPE_MENU_ITEM)) |
| #define | GNT_IS_MENU_ITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GNT_TYPE_MENU_ITEM)) |
| #define | GNT_MENU_ITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GNT_TYPE_MENU_ITEM, GntMenuItemClass)) |
| #define | GNT_MENU_ITEM_FLAGS(obj) (GNT_MENU_ITEM(obj)->priv.flags) |
| #define | GNT_MENU_ITEM_SET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) |= flags) |
| #define | GNT_MENU_ITEM_UNSET_FLAGS(obj, flags) (GNT_MENU_ITEM_FLAGS(obj) &= ~(flags)) |
Typedefs | |
| typedef struct _GntMenuItem | GntMenuItem |
| typedef struct _GntMenuItemPriv | GntMenuItemPriv |
| typedef struct _GntMenuItemClass | GntMenuItemClass |
| typedef void(* | GntMenuItemCallback )(GntMenuItem *item, gpointer data) |
Functions | |
| G_BEGIN_DECLS GType | gnt_menuitem_get_gtype (void) |
| GntMenuItem * | gnt_menuitem_new (const char *text) |
| Create a new menuitem. | |
| 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. | |
| GntMenu * | gnt_menuitem_get_submenu (GntMenuItem *item) |
| Get the submenu for a menuitem. | |
| 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. | |
| const char * | gnt_menuitem_get_id (GntMenuItem *item) |
| Get the ID of the menuitem. | |
| gboolean | gnt_menuitem_activate (GntMenuItem *item) |
| Activate a menuitem. | |
Definition in file gntmenuitem.h.
| 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.
| item | The menuitem. |
| G_BEGIN_DECLS GType gnt_menuitem_get_gtype | ( | void | ) |
| const char* gnt_menuitem_get_id | ( | GntMenuItem * | item | ) |
Get the ID of the menuitem.
| item | The menuitem. |
| GntMenu* gnt_menuitem_get_submenu | ( | GntMenuItem * | item | ) |
Get the submenu for a menuitem.
| item | The menuitem. |
NULL.| char gnt_menuitem_get_trigger | ( | GntMenuItem * | item | ) |
Get the trigger key for a menuitem.
| item | The menuitem |
| GntMenuItem* gnt_menuitem_new | ( | const char * | text | ) |
Create a new menuitem.
| text | Label for the menuitem. |
| void gnt_menuitem_set_callback | ( | GntMenuItem * | item, | |
| GntMenuItemCallback | callback, | |||
| gpointer | data | |||
| ) |
Set a callback function for a menuitem.
| item | The menuitem. | |
| callback | The callback function. | |
| data | Data to send to the callback function. |
| void gnt_menuitem_set_id | ( | GntMenuItem * | item, | |
| const char * | id | |||
| ) |
Set an ID for the menuitem.
| item | The menuitem. | |
| id | The ID for the 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.
| item | The menuitem. | |
| menu | The submenu. |
| void gnt_menuitem_set_trigger | ( | GntMenuItem * | item, | |
| char | trigger | |||
| ) |
Set a trigger key for the item.
| item | The menuitem | |
| trigger | The key that will trigger the item when the parent manu is visible |