From 7a2748dfec79a0ce7ee26e0fb382a713ab8bae21 Mon Sep 17 00:00:00 2001 From: Ted Gould Date: Mon, 22 Aug 2011 13:26:52 -0500 Subject: Adding an enum for the the disposition and functions to set and get it --- libdbusmenu-gtk/genericmenuitem.h | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/libdbusmenu-gtk/genericmenuitem.h b/libdbusmenu-gtk/genericmenuitem.h index 5e3c640..17759e3 100644 --- a/libdbusmenu-gtk/genericmenuitem.h +++ b/libdbusmenu-gtk/genericmenuitem.h @@ -42,11 +42,12 @@ G_BEGIN_DECLS #define IS_GENERICMENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GENERICMENUITEM_TYPE)) #define GENERICMENUITEM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GENERICMENUITEM_TYPE, GenericmenuitemClass)) -typedef struct _Genericmenuitem Genericmenuitem; -typedef struct _GenericmenuitemClass GenericmenuitemClass; -typedef struct _GenericmenuitemPrivate GenericmenuitemPrivate; -typedef enum _GenericmenuitemCheckType GenericmenuitemCheckType; -typedef enum _GenericmenuitemState GenericmenuitemState; +typedef struct _Genericmenuitem Genericmenuitem; +typedef struct _GenericmenuitemClass GenericmenuitemClass; +typedef struct _GenericmenuitemPrivate GenericmenuitemPrivate; +typedef enum _GenericmenuitemCheckType GenericmenuitemCheckType; +typedef enum _GenericmenuitemState GenericmenuitemState; +typedef enum _GenericmenuitemDisposition GenericmenuitemDisposition; /* GenericmenuitemClass: @@ -77,14 +78,24 @@ enum _GenericmenuitemState { GENERICMENUITEM_STATE_INDETERMINATE }; -GType genericmenuitem_get_type (void); -void genericmenuitem_set_check_type (Genericmenuitem * item, - GenericmenuitemCheckType check_type); -void genericmenuitem_set_state (Genericmenuitem * item, - GenericmenuitemState state); -void genericmenuitem_set_image (Genericmenuitem * item, - GtkWidget * image); -GtkWidget * genericmenuitem_get_image (Genericmenuitem * item); +enum _GenericmenuitemDisposition { + GENERICMENUITEM_DISPOSITION_NORMAL, + GENERICMENUITEM_DISPOSITION_INFORMATIONAL, + GENERICMENUITEM_DISPOSITION_WARNING, + GENERICMENUITEM_DISPOSITION_ALERT +}; + +GType genericmenuitem_get_type (void); +void genericmenuitem_set_check_type (Genericmenuitem * item, + GenericmenuitemCheckType check_type); +void genericmenuitem_set_state (Genericmenuitem * item, + GenericmenuitemState state); +void genericmenuitem_set_image (Genericmenuitem * item, + GtkWidget * image); +GtkWidget * genericmenuitem_get_image (Genericmenuitem * item); +void genericmenuitem_set_disposition (Genericmenuitem * item, + GenericmenuitemDisposition disposition); +GenericmenuitemDisposition genericmenuitem_get_disposition (Genericmenuitem * item); G_END_DECLS -- cgit v1.2.3