diff src/notify.h @ 12242:976677e67239

[gaim-migrate @ 14544] Rework the notify API close callbacks. They are now called by the core, instead of the UI. Prior to a couple days ago, they weren't actually implemented in the UI at all. As a side note, if anyone knows why gpointer is declared as a T_GaimObj instead of a T_PTR, please let me know. That seems wrong, especially since void * is a T_PTR and gconstpointer is a T_PTR. This may or may not cause problems for the notify change (void * -> gpointer) to user_data. NOTE: I did not change this, even though I think it's wrong. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 28 Nov 2005 01:50:56 +0000
parents 64254fbabc7b
children ca27de274225
line wrap: on
line diff
--- a/src/notify.h	Mon Nov 28 01:43:53 2005 +0000
+++ b/src/notify.h	Mon Nov 28 01:50:56 2005 +0000
@@ -32,6 +32,11 @@
 #include "connection.h"
 
 /**
+ * Notification close callbacks.
+ */
+typedef void  (*GaimNotifyCloseCallback) (gpointer user_data);
+
+/**
  * Notification types.
  */
 typedef enum
@@ -106,28 +111,22 @@
 typedef struct
 {
 	void *(*notify_message)(GaimNotifyMsgType type, const char *title,
-							const char *primary, const char *secondary,
-							GHookFunc cb, gpointer user_data);
+							const char *primary, const char *secondary);
 	void *(*notify_email)(const char *subject, const char *from,
-						  const char *to, const char *url,
-						  GHookFunc cb, gpointer user_data);
+						  const char *to, const char *url);
 	void *(*notify_emails)(size_t count, gboolean detailed,
 						   const char **subjects, const char **froms,
-						   const char **tos, const char **urls,
-						   GHookFunc cb, gpointer user_data);
+						   const char **tos, const char **urls);
 	void *(*notify_formatted)(const char *title, const char *primary,
-							  const char *secondary, const char *text,
-							  GHookFunc cb, gpointer user_data);
+							  const char *secondary, const char *text);
 	void *(*notify_searchresults)(GaimConnection *gc, const char *title,
 								  const char *primary, const char *secondary,
-								  GaimNotifySearchResults *results, GHookFunc cb,
-								  gpointer user_data);
+								  GaimNotifySearchResults *results);
 	void (*notify_searchresults_new_rows)(GaimConnection *gc,
 										  GaimNotifySearchResults *results,
 										  void *data, gpointer user_data);
 	void *(*notify_userinfo)(GaimConnection *gc, const char *who,
-							  const char *text,
-							  GHookFunc cb, gpointer user_data);
+							  const char *text);
 	void *(*notify_uri)(const char *uri);
 
 	void (*close_notify)(GaimNotifyType type, void *ui_handle);
@@ -162,7 +161,7 @@
  */
 void *gaim_notify_searchresults(GaimConnection *gc, const char *title,
 								const char *primary, const char *secondary,
-								GaimNotifySearchResults *results, GHookFunc cb,
+								GaimNotifySearchResults *results, GaimNotifyCloseCallback cb,
 								gpointer user_data);
 
 void gaim_notify_searchresults_free(GaimNotifySearchResults *results);
@@ -287,7 +286,7 @@
  */
 void *gaim_notify_message(void *handle, GaimNotifyMsgType type,
 						  const char *title, const char *primary,
-						  const char *secondary, GHookFunc cb,
+						  const char *secondary, GaimNotifyCloseCallback cb,
 						  gpointer user_data);
 
 /**
@@ -306,7 +305,7 @@
  */
 void *gaim_notify_email(void *handle, const char *subject,
 						const char *from, const char *to,
-						const char *url, GHookFunc cb,
+						const char *url, GaimNotifyCloseCallback cb,
 						gpointer user_data);
 
 /**
@@ -329,7 +328,7 @@
 void *gaim_notify_emails(void *handle, size_t count, gboolean detailed,
 						 const char **subjects, const char **froms,
 						 const char **tos, const char **urls,
-						 GHookFunc cb, gpointer user_data);
+						 GaimNotifyCloseCallback cb, gpointer user_data);
 
 /**
  * Displays a notification with formatted text.
@@ -350,7 +349,7 @@
  */
 void *gaim_notify_formatted(void *handle, const char *title,
 							const char *primary, const char *secondary,
-							const char *text, GHookFunc cb, gpointer user_data);
+							const char *text, GaimNotifyCloseCallback cb, gpointer user_data);
 
 /**
  * Displays user information with formatted text, passing information giving
@@ -369,7 +368,7 @@
  * @return A UI-specific handle.
  */
 void *gaim_notify_userinfo(GaimConnection *gc, const char *who,
-						   const char *text, GHookFunc cb,
+						   const char *text, GaimNotifyCloseCallback cb,
 						   gpointer user_data);
 
 /**