Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

notify.h

Go to the documentation of this file.
00001 
00025 #ifndef _GAIM_NOTIFY_H_
00026 #define _GAIM_NOTIFY_H_
00027 
00028 #include <stdlib.h>
00029 #include <glib-object.h>
00030 #include <glib.h>
00031 
00035 typedef enum
00036 {
00037     GAIM_NOTIFY_MESSAGE = 0, 
00038     GAIM_NOTIFY_EMAIL,       
00039     GAIM_NOTIFY_EMAILS,      
00040     GAIM_NOTIFY_FORMATTED,   
00041     GAIM_NOTIFY_URI          
00043 } GaimNotifyType;
00044 
00048 typedef enum
00049 {
00050     GAIM_NOTIFY_MSG_ERROR   = 0, 
00051     GAIM_NOTIFY_MSG_WARNING,     
00052     GAIM_NOTIFY_MSG_INFO         
00054 } GaimNotifyMsgType;
00055 
00059 typedef struct
00060 {
00061     void *(*notify_message)(GaimNotifyMsgType type, const char *title,
00062                             const char *primary, const char *secondary,
00063                             GCallback cb, void *user_data);
00064     void *(*notify_email)(const char *subject, const char *from,
00065                           const char *to, const char *url,
00066                           GCallback cb, void *user_data);
00067     void *(*notify_emails)(size_t count, gboolean detailed,
00068                            const char **subjects, const char **froms,
00069                            const char **tos, const char **urls,
00070                            GCallback cb, void *user_data);
00071     void *(*notify_formatted)(const char *title, const char *primary,
00072                               const char *secondary, const char *text,
00073                               GCallback cb, void *user_data);
00074     void *(*notify_uri)(const char *uri);
00075 
00076     void (*close_notify)(GaimNotifyType type, void *ui_handle);
00077 
00078 } GaimNotifyUiOps;
00079 
00080 
00081 #ifdef __cplusplus
00082 extern "C" {
00083 #endif
00084 
00085 /**************************************************************************/
00087 /**************************************************************************/
00104 void *gaim_notify_message(void *handle, GaimNotifyMsgType type,
00105                           const char *title, const char *primary,
00106                           const char *secondary, GCallback cb,
00107                           void *user_data);
00108 
00123 void *gaim_notify_email(void *handle, const char *subject,
00124                         const char *from, const char *to,
00125                         const char *url, GCallback cb,
00126                         void *user_data);
00127 
00145 void *gaim_notify_emails(void *handle, size_t count, gboolean detailed,
00146                          const char **subjects, const char **froms,
00147                          const char **tos, const char **urls,
00148                          GCallback cb, void *user_data);
00149 
00167 void *gaim_notify_formatted(void *handle, const char *title,
00168                             const char *primary, const char *secondary,
00169                             const char *text, GCallback cb, void *user_data);
00170 
00181 void *gaim_notify_uri(void *handle, const char *uri);
00182 
00192 void gaim_notify_close(GaimNotifyType type, void *ui_handle);
00193 
00199 void gaim_notify_close_with_handle(void *handle);
00200 
00204 #define gaim_notify_info(handle, title, primary, secondary) \
00205     gaim_notify_message((handle), GAIM_NOTIFY_MSG_INFO, (title), \
00206                         (primary), (secondary), NULL, NULL)
00207 
00211 #define gaim_notify_warning(handle, title, primary, secondary) \
00212     gaim_notify_message((handle), GAIM_NOTIFY_MSG_WARNING, (title), \
00213                         (primary), (secondary), NULL, NULL)
00214 
00218 #define gaim_notify_error(handle, title, primary, secondary) \
00219     gaim_notify_message((handle), GAIM_NOTIFY_MSG_ERROR, (title), \
00220                         (primary), (secondary), NULL, NULL)
00221 
00224 /**************************************************************************/
00226 /**************************************************************************/
00235 void gaim_notify_set_ui_ops(GaimNotifyUiOps *ops);
00236 
00243 GaimNotifyUiOps *gaim_notify_get_ui_ops(void);
00244 
00247 #ifdef __cplusplus
00248 }
00249 #endif
00250 
00251 #endif /* _GAIM_NOTIFY_H_ */

Generated on Tue Aug 3 17:36:34 2004 for gaim by doxygen 1.3.4