diff options
author | Jason Conti <jason.conti@gmail.com> | 2012-02-26 14:39:01 -0500 |
---|---|---|
committer | Jason Conti <jason.conti@gmail.com> | 2012-02-26 14:39:01 -0500 |
commit | 1bcf41c76dce04648d842ab47bc9d17b2e735e79 (patch) | |
tree | 6e7d9496ec7b447584b80d2987dbf8139ab788a5 /src/notification-menuitem.h | |
parent | df8ae866eb73d9f58938e8eb710a3931d6d8b6b7 (diff) | |
download | ayatana-indicator-notifications-1bcf41c76dce04648d842ab47bc9d17b2e735e79.tar.gz ayatana-indicator-notifications-1bcf41c76dce04648d842ab47bc9d17b2e735e79.tar.bz2 ayatana-indicator-notifications-1bcf41c76dce04648d842ab47bc9d17b2e735e79.zip |
* Move the notification menuitem to a separate class.
Diffstat (limited to 'src/notification-menuitem.h')
-rw-r--r-- | src/notification-menuitem.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/src/notification-menuitem.h b/src/notification-menuitem.h new file mode 100644 index 0000000..f76704a --- /dev/null +++ b/src/notification-menuitem.h @@ -0,0 +1,48 @@ +/* + * notification-menuitem.h - A menuitem to display notifications. + */ + +#ifndef __NOTIFICATION_MENUITEM_H__ +#define __NOTIFICATION_MENUITEM_H__ + +#include <gtk/gtk.h> +#include "notification.h" + +G_BEGIN_DECLS + +#define NOTIFICATION_MENUITEM_TYPE (notification_menuitem_get_type ()) +#define NOTIFICATION_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), NOTIFICATION_MENUITEM_TYPE, NotificationMenuItem)) +#define NOTIFICATION_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), NOTIFICATION_MENUITEM_TYPE, NotificationMenuItemClass)) +#define IS_NOTIFICATION_MENUITEM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NOTIFICATION_MENUITEM_TYPE)) +#define IS_NOTIFICATION_MENUITEM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NOTIFICATION_MENUITEM_TYPE)) + +typedef struct _NotificationMenuItem NotificationMenuItem; +typedef struct _NotificationMenuItemClass NotificationMenuItemClass; +typedef struct _NotificationMenuItemPrivate NotificationMenuItemPrivate; + +struct _NotificationMenuItem +{ + GtkMenuItem parent_instance; + NotificationMenuItemPrivate *priv; +}; + +struct _NotificationMenuItemClass +{ + GtkMenuItemClass parent_class; +}; + +struct _NotificationMenuItemPrivate { + GtkWidget *label; + GtkWidget *close_image; +}; + +#define NOTIFICATION_MENUITEM_GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), NOTIFICATION_MENUITEM_TYPE, NotificationMenuItemPrivate)) + +GType notification_menuitem_get_type(void); +GtkWidget *notification_menuitem_new(void); +void notification_menuitem_set_from_notification(NotificationMenuItem *self, Notification *note); + +G_END_DECLS + +#endif /* __NOTIFICATION_MENUITEM_H__ */ |