Main Page | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

notification.h

Go to the documentation of this file.
00001 
00022 #ifndef _NOTIFY_NOTIFICATION_H_
00023 #define _NOTIFY_NOTIFICATION_H_
00024 
00025 #include <glib.h>
00026 #include <glib-object.h>
00027 #include <gtk/gtk.h>
00028 
00029 G_BEGIN_DECLS
00030 
00031 #define NOTIFY_EXPIRES_DEFAULT -1
00032 #define NOTIFY_EXPIRES_NEVER    0
00033 
00034 #define NOTIFY_TYPE_NOTIFICATION (notify_notification_get_type ())
00035 #define NOTIFY_NOTIFICATION(o) \
00036     (G_TYPE_CHECK_INSTANCE_CAST ((o), NOTIFY_TYPE_NOTIFICATION, \
00037                                  NotifyNotification))
00038 #define NOTIFY_NOTIFICATION_CLASS(k) \
00039     (G_TYPE_CHECK_CLASS_CAST((k), NOTIFY_TYPE_NOTIFICATION, \
00040                              NotifyNotificationClass))
00041 #define NOTIFY_IS_NOTIFICATION(o) \
00042     (G_TYPE_CHECK_INSTANCE_TYPE ((o), NOTIFY_TYPE_NOTIFICATION))
00043 #define NOTIFY_IS_NOTIFICATION_CLASS(k) \
00044     (G_TYPE_CHECK_CLASS_TYPE ((k), NOTIFY_TYPE_NOTIFICATION))
00045 #define NOTIFY_NOTIFICATION_GET_CLASS(o) \
00046     (G_TYPE_INSTANCE_GET_CLASS ((o), NOTIFY_TYPE_NOTIFICATION, \
00047                                 NotifyNotificationClass))
00048 
00049 
00050 typedef struct _NotifyNotification        NotifyNotification;
00051 typedef struct _NotifyNotificationClass   NotifyNotificationClass;
00052 typedef struct _NotifyNotificationPrivate NotifyNotificationPrivate;
00053 
00054 struct _NotifyNotification
00055 {
00056     GObject parent;
00057     NotifyNotificationPrivate *priv;
00058 };
00059 
00060 struct _NotifyNotificationClass
00061 {
00062     GObjectClass parent_class;
00063 
00064     /* Signals */
00065     void (*closed)(NotifyNotification *notification);
00066 };
00067 
00071 typedef enum
00072 {
00073     NOTIFY_URGENCY_LOW,       
00074     NOTIFY_URGENCY_NORMAL,    
00075     NOTIFY_URGENCY_CRITICAL,  
00077 } NotifyUrgency;
00078 
00079 typedef void (*NotifyActionCallback)(NotifyNotification *, gchar *, gpointer);
00080 
00081 #define NOTIFY_ACTION_CALLBACK(func) ((NotifyActionCallback)(func))
00082 
00083 GType notify_notification_get_type();
00084 
00085 NotifyNotification *notify_notification_new(const gchar *summary,
00086                                             const gchar *message,
00087                                             const gchar *icon,
00088                                             GtkWidget *attach);
00089 
00090 gboolean notify_notification_update(NotifyNotification *notification,
00091                                     const gchar *summary,
00092                                     const gchar *message,
00093                                     const gchar *icon);
00094 
00095 void notify_notification_attach_to_widget(NotifyNotification* notification,
00096                                           GtkWidget *attach);
00097 
00098 gboolean notify_notification_show(NotifyNotification *notification,
00099                                   GError **error);
00100 
00101 void notify_notification_set_timeout(NotifyNotification *notification,
00102                                      gint timeout);
00103 
00104 void notify_notification_set_category(NotifyNotification *notification,
00105                                       const char *category);
00106 
00107 void notify_notification_set_urgency(NotifyNotification *notification,
00108                                      NotifyUrgency l);
00109 
00110 void notify_notification_set_icon_from_pixbuf(
00111     NotifyNotification *notification, GdkPixbuf *icon);
00112 
00113 void notify_notification_set_hint_int32(NotifyNotification *notification,
00114                                         const gchar *key, gint value);
00115 
00116 void notify_notification_set_hint_double(NotifyNotification *notification,
00117                                          const gchar *key, gdouble value);
00118 
00119 void notify_notification_set_hint_string(NotifyNotification *notification,
00120                                          const gchar *key,
00121                                          const gchar *value);
00122 
00123 void notify_notification_set_hint_byte(NotifyNotification *notification,
00124                                        const gchar *key, guchar value);
00125 
00126 void notify_notification_set_hint_byte_array(NotifyNotification *notification,
00127                                              const gchar *key,
00128                                              const guchar *value, gsize len);
00129 
00130 void notify_notification_clear_hints(NotifyNotification *notification);
00131 
00132 void notify_notification_add_action(NotifyNotification *notification,
00133                                     const char *action, const char *label,
00134                                     NotifyActionCallback callback,
00135                                     gpointer user_data, GFreeFunc free_func);
00136 
00137 void notify_notification_clear_actions(NotifyNotification *notification);
00138 gboolean notify_notification_close(NotifyNotification *notification,
00139                                    GError **error);
00140 
00141 #endif /* NOTIFY_NOTIFICATION_H */

Generated on Sun Jan 29 13:25:00 2006 for libnotify by  doxygen 1.4.4