From 9025561994ab31a85b47f825cd096be86dd57299 Mon Sep 17 00:00:00 2001 From: Lars Uebernickel Date: Sat, 14 Jan 2012 06:47:32 +0100 Subject: Use a custom menu item which shows printer status on the right --- src/indicator-menu-item.h | 54 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/indicator-menu-item.h (limited to 'src/indicator-menu-item.h') diff --git a/src/indicator-menu-item.h b/src/indicator-menu-item.h new file mode 100644 index 0000000..39c456a --- /dev/null +++ b/src/indicator-menu-item.h @@ -0,0 +1,54 @@ + +#ifndef INDICATOR_MENU_ITEM_H +#define INDICATOR_MENU_ITEM_H + +#include + +G_BEGIN_DECLS + +#define INDICATOR_TYPE_MENU_ITEM indicator_menu_item_get_type() + +#define INDICATOR_MENU_ITEM(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + INDICATOR_TYPE_MENU_ITEM, IndicatorMenuItem)) + +#define INDICATOR_MENU_ITEM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), \ + INDICATOR_TYPE_MENU_ITEM, IndicatorMenuItemClass)) + +#define INDICATOR_IS_MENU_ITEM(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + INDICATOR_TYPE_MENU_ITEM)) + +#define INDICATOR_IS_MENU_ITEM_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), \ + INDICATOR_TYPE_MENU_ITEM)) + +#define INDICATOR_MENU_ITEM_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + INDICATOR_TYPE_MENU_ITEM, IndicatorMenuItemClass)) + +typedef struct _IndicatorMenuItem IndicatorMenuItem; +typedef struct _IndicatorMenuItemClass IndicatorMenuItemClass; +typedef struct _IndicatorMenuItemPrivate IndicatorMenuItemPrivate; + +struct _IndicatorMenuItem +{ + GtkMenuItem parent; +}; + +struct _IndicatorMenuItemClass +{ + GtkMenuItemClass parent_class; +}; + +GType indicator_menu_item_get_type (void) G_GNUC_CONST; + +IndicatorMenuItem *indicator_menu_item_new (void); +void indicator_menu_item_set_right (IndicatorMenuItem *self, const gchar *text); +void indicator_menu_item_set_label (IndicatorMenuItem *self, const gchar *text); + +G_END_DECLS + +#endif + -- cgit v1.2.3