comparison src/notify.h @ 12220:64254fbabc7b

[gaim-migrate @ 14522] SF Patch #1363787 from Bartosz Oler "This is a fix to the 'Find buddies' command in which, after the search results window was closed, prpl's internal state was not cleared. A minor modification in the notify API was required. This patch also adds a few more notifications for the user." There also appears to be a few unrelated GG prpl updates in here. I noticed that more strings are marked for translation now. I made several changes to this patch. I also found out that we're not honoring the callbacks passed in to the notify API. That's a bug since we document them. I'm not in the mood to fix it. I changed GCallback to GHookFunc as it has the right type (whereas GCallback did not). The name isn't too bad either. I didn't really want to create a new callback function typedef. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Fri, 25 Nov 2005 01:33:10 +0000
parents 216988c717da
children 976677e67239
comparison
equal deleted inserted replaced
12219:f23ebb7b2dfd 12220:64254fbabc7b
105 */ 105 */
106 typedef struct 106 typedef struct
107 { 107 {
108 void *(*notify_message)(GaimNotifyMsgType type, const char *title, 108 void *(*notify_message)(GaimNotifyMsgType type, const char *title,
109 const char *primary, const char *secondary, 109 const char *primary, const char *secondary,
110 GCallback cb, void *user_data); 110 GHookFunc cb, gpointer user_data);
111 void *(*notify_email)(const char *subject, const char *from, 111 void *(*notify_email)(const char *subject, const char *from,
112 const char *to, const char *url, 112 const char *to, const char *url,
113 GCallback cb, void *user_data); 113 GHookFunc cb, gpointer user_data);
114 void *(*notify_emails)(size_t count, gboolean detailed, 114 void *(*notify_emails)(size_t count, gboolean detailed,
115 const char **subjects, const char **froms, 115 const char **subjects, const char **froms,
116 const char **tos, const char **urls, 116 const char **tos, const char **urls,
117 GCallback cb, void *user_data); 117 GHookFunc cb, gpointer user_data);
118 void *(*notify_formatted)(const char *title, const char *primary, 118 void *(*notify_formatted)(const char *title, const char *primary,
119 const char *secondary, const char *text, 119 const char *secondary, const char *text,
120 GCallback cb, void *user_data); 120 GHookFunc cb, gpointer user_data);
121 void *(*notify_searchresults)(GaimConnection *gc, const char *title, 121 void *(*notify_searchresults)(GaimConnection *gc, const char *title,
122 const char *primary, const char *secondary, 122 const char *primary, const char *secondary,
123 GaimNotifySearchResults *results, GCallback cb, 123 GaimNotifySearchResults *results, GHookFunc cb,
124 void *user_data); 124 gpointer user_data);
125 void (*notify_searchresults_new_rows)(GaimConnection *gc, 125 void (*notify_searchresults_new_rows)(GaimConnection *gc,
126 GaimNotifySearchResults *results, 126 GaimNotifySearchResults *results,
127 void *data, void *user_data); 127 void *data, gpointer user_data);
128 void *(*notify_userinfo)(GaimConnection *gc, const char *who, 128 void *(*notify_userinfo)(GaimConnection *gc, const char *who,
129 const char *text, 129 const char *text,
130 GCallback cb, void *user_data); 130 GHookFunc cb, gpointer user_data);
131 void *(*notify_uri)(const char *uri); 131 void *(*notify_uri)(const char *uri);
132 132
133 void (*close_notify)(GaimNotifyType type, void *ui_handle); 133 void (*close_notify)(GaimNotifyType type, void *ui_handle);
134 134
135 } GaimNotifyUiOps; 135 } GaimNotifyUiOps;
160 * 160 *
161 * @return A UI-specific handle. 161 * @return A UI-specific handle.
162 */ 162 */
163 void *gaim_notify_searchresults(GaimConnection *gc, const char *title, 163 void *gaim_notify_searchresults(GaimConnection *gc, const char *title,
164 const char *primary, const char *secondary, 164 const char *primary, const char *secondary,
165 GaimNotifySearchResults *results, GCallback cb, 165 GaimNotifySearchResults *results, GHookFunc cb,
166 void *user_data); 166 gpointer user_data);
167 167
168 void gaim_notify_searchresults_free(GaimNotifySearchResults *results); 168 void gaim_notify_searchresults_free(GaimNotifySearchResults *results);
169 169
170 /** 170 /**
171 * Replace old rows with the new. Reuse an existing window. 171 * Replace old rows with the new. Reuse an existing window.
175 * @param data Data returned by the gaim_notify_searchresults(). 175 * @param data Data returned by the gaim_notify_searchresults().
176 * @param user_data User defined data. 176 * @param user_data User defined data.
177 */ 177 */
178 void gaim_notify_searchresults_new_rows(GaimConnection *gc, 178 void gaim_notify_searchresults_new_rows(GaimConnection *gc,
179 GaimNotifySearchResults *results, 179 GaimNotifySearchResults *results,
180 void *data, void *user_data); 180 void *data, gpointer user_data);
181 181
182 /** 182 /**
183 * Adds a button that will be displayed in the search results dialog. 183 * Adds a button that will be displayed in the search results dialog.
184 * 184 *
185 * @param results The search results object. 185 * @param results The search results object.
285 * 285 *
286 * @return A UI-specific handle. 286 * @return A UI-specific handle.
287 */ 287 */
288 void *gaim_notify_message(void *handle, GaimNotifyMsgType type, 288 void *gaim_notify_message(void *handle, GaimNotifyMsgType type,
289 const char *title, const char *primary, 289 const char *title, const char *primary,
290 const char *secondary, GCallback cb, 290 const char *secondary, GHookFunc cb,
291 void *user_data); 291 gpointer user_data);
292 292
293 /** 293 /**
294 * Displays a single e-mail notification to the user. 294 * Displays a single e-mail notification to the user.
295 * 295 *
296 * @param handle The plugin or connection handle. 296 * @param handle The plugin or connection handle.
304 * 304 *
305 * @return A UI-specific handle. 305 * @return A UI-specific handle.
306 */ 306 */
307 void *gaim_notify_email(void *handle, const char *subject, 307 void *gaim_notify_email(void *handle, const char *subject,
308 const char *from, const char *to, 308 const char *from, const char *to,
309 const char *url, GCallback cb, 309 const char *url, GHookFunc cb,
310 void *user_data); 310 gpointer user_data);
311 311
312 /** 312 /**
313 * Displays a notification for multiple e-mails to the user. 313 * Displays a notification for multiple e-mails to the user.
314 * 314 *
315 * @param handle The plugin or connection handle. 315 * @param handle The plugin or connection handle.
327 * @return A UI-specific handle. 327 * @return A UI-specific handle.
328 */ 328 */
329 void *gaim_notify_emails(void *handle, size_t count, gboolean detailed, 329 void *gaim_notify_emails(void *handle, size_t count, gboolean detailed,
330 const char **subjects, const char **froms, 330 const char **subjects, const char **froms,
331 const char **tos, const char **urls, 331 const char **tos, const char **urls,
332 GCallback cb, void *user_data); 332 GHookFunc cb, gpointer user_data);
333 333
334 /** 334 /**
335 * Displays a notification with formatted text. 335 * Displays a notification with formatted text.
336 * 336 *
337 * The text is essentially a stripped-down format of HTML, the same that 337 * The text is essentially a stripped-down format of HTML, the same that
348 * 348 *
349 * @return A UI-specific handle. 349 * @return A UI-specific handle.
350 */ 350 */
351 void *gaim_notify_formatted(void *handle, const char *title, 351 void *gaim_notify_formatted(void *handle, const char *title,
352 const char *primary, const char *secondary, 352 const char *primary, const char *secondary,
353 const char *text, GCallback cb, void *user_data); 353 const char *text, GHookFunc cb, gpointer user_data);
354 354
355 /** 355 /**
356 * Displays user information with formatted text, passing information giving 356 * Displays user information with formatted text, passing information giving
357 * the connection and username from which the user information came. 357 * the connection and username from which the user information came.
358 * 358 *
367 * @param user_data The data to pass to the callback. 367 * @param user_data The data to pass to the callback.
368 * 368 *
369 * @return A UI-specific handle. 369 * @return A UI-specific handle.
370 */ 370 */
371 void *gaim_notify_userinfo(GaimConnection *gc, const char *who, 371 void *gaim_notify_userinfo(GaimConnection *gc, const char *who,
372 const char *text, GCallback cb, 372 const char *text, GHookFunc cb,
373 void *user_data); 373 gpointer user_data);
374 374
375 /** 375 /**
376 * Opens a URI or somehow presents it to the user. 376 * Opens a URI or somehow presents it to the user.
377 * 377 *
378 * @param handle The plugin or connection handle. 378 * @param handle The plugin or connection handle.