Mercurial > pidgin
annotate src/notify.h @ 11464:610a243b4504
[gaim-migrate @ 13704]
Fix Gaim's crash-on-exit bug in CVS HEAD
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 07 Sep 2005 04:37:02 +0000 |
parents | 9480e0d0f563 |
children | 9563b768e8e2 |
rev | line source |
---|---|
5437 | 1 /** |
2 * @file notify.h Notification API | |
3 * @ingroup core | |
4 * | |
5 * gaim | |
6 * | |
8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
10 * |
5437 | 11 * This program is free software; you can redistribute it and/or modify |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
25 #ifndef _GAIM_NOTIFY_H_ | |
26 #define _GAIM_NOTIFY_H_ | |
27 | |
28 #include <stdlib.h> | |
29 #include <glib-object.h> | |
30 #include <glib.h> | |
31 | |
9797 | 32 #include "connection.h" |
33 | |
5437 | 34 /** |
35 * Notification types. | |
36 */ | |
37 typedef enum | |
38 { | |
10439 | 39 GAIM_NOTIFY_MESSAGE = 0, /**< Message notification. */ |
40 GAIM_NOTIFY_EMAIL, /**< Single e-mail notification. */ | |
41 GAIM_NOTIFY_EMAILS, /**< Multiple e-mail notification. */ | |
42 GAIM_NOTIFY_FORMATTED, /**< Formatted text. */ | |
43 GAIM_NOTIFY_SEARCHRESULTS, /**< Buddy search results. */ | |
44 GAIM_NOTIFY_USERINFO, /**< Formatted userinfo text. */ | |
45 GAIM_NOTIFY_URI /**< URI notification or display. */ | |
5437 | 46 |
47 } GaimNotifyType; | |
48 | |
49 /** | |
50 * Notification message types. | |
51 */ | |
52 typedef enum | |
53 { | |
54 GAIM_NOTIFY_MSG_ERROR = 0, /**< Error notification. */ | |
55 GAIM_NOTIFY_MSG_WARNING, /**< Warning notification. */ | |
56 GAIM_NOTIFY_MSG_INFO /**< Information notification. */ | |
57 | |
58 } GaimNotifyMsgType; | |
59 | |
60 /** | |
11359 | 61 * The types of buttons |
62 */ | |
63 typedef enum | |
64 { | |
65 GAIM_NOTIFY_BUTTON_CONTINUE = 0, | |
66 GAIM_NOTIFY_BUTTON_ADD_BUDDY | |
67 | |
68 } GaimNotifySearchButtonType; | |
69 | |
70 /** | |
71 * Search results object. | |
72 */ | |
73 typedef struct | |
74 { | |
75 GList *columns; /**< List of the search column objects. */ | |
76 GList *rows; /**< List of rows in the result. */ | |
77 GList *buttons; /**< List of buttons to display. */ | |
78 | |
79 } GaimNotifySearchResults; | |
80 | |
81 /** | |
82 * Single column of a search result. | |
83 */ | |
84 typedef struct | |
85 { | |
86 char *title; /**< Title of the column. */ | |
87 | |
88 } GaimNotifySearchColumn; | |
89 | |
90 typedef void (*GaimNotifySearchResultsCallback)(GaimConnection *, GList *); | |
91 | |
92 | |
93 /** | |
94 * Definition of a button. | |
95 */ | |
96 typedef struct | |
97 { | |
98 GaimNotifySearchButtonType type; | |
99 GaimNotifySearchResultsCallback callback; /**< Function to be called when clicked. */ | |
100 | |
101 } GaimNotifySearchButton; | |
102 | |
103 /** | |
5437 | 104 * Notification UI operations. |
105 */ | |
106 typedef struct | |
107 { | |
108 void *(*notify_message)(GaimNotifyMsgType type, const char *title, | |
109 const char *primary, const char *secondary, | |
110 GCallback cb, void *user_data); | |
111 void *(*notify_email)(const char *subject, const char *from, | |
112 const char *to, const char *url, | |
113 GCallback cb, void *user_data); | |
5522
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
114 void *(*notify_emails)(size_t count, gboolean detailed, |
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
115 const char **subjects, const char **froms, |
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
116 const char **tos, const char **urls, |
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
117 GCallback cb, void *user_data); |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
118 void *(*notify_formatted)(const char *title, const char *primary, |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
119 const char *secondary, const char *text, |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
120 GCallback cb, void *user_data); |
10439 | 121 void *(*notify_searchresults)(GaimConnection *gc, const char *title, |
122 const char *primary, const char *secondary, | |
11359 | 123 GaimNotifySearchResults *results, GCallback cb, |
10439 | 124 void *user_data); |
11359 | 125 void (*notify_searchresults_new_rows)(GaimConnection *gc, |
126 GaimNotifySearchResults *results, | |
127 void *data, void *user_data); | |
9797 | 128 void *(*notify_userinfo)(GaimConnection *gc, const char *who, |
129 const char *title, const char *primary, | |
130 const char *secondary, const char *text, | |
131 GCallback cb, void *user_data); | |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
132 void *(*notify_uri)(const char *uri); |
5437 | 133 |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
134 void (*close_notify)(GaimNotifyType type, void *ui_handle); |
5437 | 135 |
136 } GaimNotifyUiOps; | |
137 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
138 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
139 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
140 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
141 |
5437 | 142 /**************************************************************************/ |
11359 | 143 /** Search results notification API */ |
144 /**************************************************************************/ | |
145 /*@{*/ | |
146 | |
147 /** | |
148 * Displays results from a buddy search. This can be, for example, | |
149 * a window with a list of all found buddies, where you are given the | |
150 * option of adding buddies to your buddy list. | |
151 * | |
152 * @param gc The GaimConnection handle associated with the information. | |
153 * @param title The title of the message. If this is NULL, the title | |
154 * will be "Search Results." | |
155 * @param primary The main point of the message. | |
156 * @param secondary The secondary information. | |
157 * @param results The GaimNotifySearchResults instance. | |
158 * @param cb The callback to call when the user closes | |
159 * the notification. | |
160 * @param user_data The data to pass to the callback. | |
161 * | |
162 * @return A UI-specific handle. | |
163 */ | |
164 void *gaim_notify_searchresults(GaimConnection *gc, const char *title, | |
165 const char *primary, const char *secondary, | |
166 GaimNotifySearchResults *results, GCallback cb, | |
167 void *user_data); | |
168 | |
169 void gaim_notify_searchresults_free(GaimNotifySearchResults *results); | |
170 | |
171 /** | |
172 * Replace old rows with the new. Reuse an existing window. | |
173 * | |
174 * @param gc The GaimConnection structure. | |
175 * @param results The GaimNotifySearchResults structure. | |
176 * @param data Data returned by the gaim_notify_searchresults(). | |
177 * @param user_data User defined data. | |
178 */ | |
179 void gaim_notify_searchresults_new_rows(GaimConnection *gc, | |
180 GaimNotifySearchResults *results, | |
181 void *data, void *user_data); | |
182 | |
183 /** | |
184 * Adds a button that will be displayed in the search results dialog. | |
185 * | |
186 * @param results The search results object. | |
187 * @param type Type of the button. (TODO: Only one button of a given type can be displayed.) | |
188 * @param cb Function that will be called on the click event. | |
189 */ | |
190 void gaim_notify_searchresults_button_add(GaimNotifySearchResults *results, | |
191 GaimNotifySearchButtonType type, | |
192 GaimNotifySearchResultsCallback cb); | |
193 | |
194 /** | |
195 * Returns a newly created search results object. | |
196 * | |
197 * @return The new search results object. | |
198 */ | |
199 GaimNotifySearchResults *gaim_notify_searchresults_new(); | |
200 | |
201 /** | |
202 * Returns a newly created search result column object. | |
203 * | |
204 * @param title Title of the column. NOTE: Title will get g_strdup()ed. | |
205 * | |
206 * @return The new search column object. | |
207 */ | |
208 GaimNotifySearchColumn *gaim_notify_searchresults_column_new(const char *title); | |
209 | |
210 /** | |
211 * Adds a new column to the search result object. | |
212 * | |
213 * @param results The result object to which the column will be added. | |
214 * @param columnt The column that will be added to the result object. | |
215 */ | |
216 void gaim_notify_searchresults_column_add(GaimNotifySearchResults *results, | |
217 GaimNotifySearchColumn *column); | |
218 | |
219 /** | |
220 * Adds a new row of the results to the search results object. | |
221 * | |
222 * @param results The search results object. | |
223 * @param row The row of the results. | |
224 */ | |
225 void gaim_notify_searchresults_row_add(GaimNotifySearchResults *results, | |
226 GList *row); | |
227 | |
228 /** | |
229 * Returns a number of the rows in the search results object. | |
230 * | |
231 * @param results The search results object. | |
232 * | |
233 * @return Number of the result rows. Or -1 if an error occurrs. | |
234 */ | |
235 int gaim_notify_searchresults_get_rows_count(GaimNotifySearchResults *results); | |
236 | |
237 /** | |
238 * Returns a number of the columns in the search results object. | |
239 * | |
240 * @param results The search results object. | |
241 * | |
242 * @return Number of the columns. Or -1 if an error occurrs. | |
243 */ | |
244 int gaim_notify_searchresults_get_columns_count(GaimNotifySearchResults *results); | |
245 | |
246 /** | |
247 * Returns a row of the results from the search results object. | |
248 * | |
249 * @param results The search results object. | |
250 * @param row_id Index of the row to be returned. | |
251 * | |
252 * @return Row of the results. | |
253 */ | |
254 GList *gaim_notify_searchresults_row_get(GaimNotifySearchResults *results, | |
255 unsigned int row_id); | |
256 | |
257 /** | |
258 * Returns a title of the search results object's column. | |
259 * | |
260 * @param results The search results object. | |
261 * @param column_id Index of the column. | |
262 * | |
263 * @return Title of the column. | |
264 */ | |
265 char *gaim_notify_searchresults_column_get_title(GaimNotifySearchResults *results, | |
266 unsigned int column_id); | |
267 | |
268 /*@}*/ | |
269 | |
270 /**************************************************************************/ | |
5437 | 271 /** @name Notification API */ |
272 /**************************************************************************/ | |
273 /*@{*/ | |
274 | |
275 /** | |
276 * Displays a notification message to the user. | |
277 * | |
278 * @param handle The plugin or connection handle. | |
279 * @param type The notification type. | |
280 * @param title The title of the message. | |
281 * @param primary The main point of the message. | |
282 * @param secondary The secondary information. | |
283 * @param cb The callback to call when the user closes | |
284 * the notification. | |
285 * @param user_data The data to pass to the callback. | |
286 * | |
287 * @return A UI-specific handle. | |
288 */ | |
6356
ee0044f3e377
[gaim-migrate @ 6855]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
289 void *gaim_notify_message(void *handle, GaimNotifyMsgType type, |
5437 | 290 const char *title, const char *primary, |
291 const char *secondary, GCallback cb, | |
292 void *user_data); | |
293 | |
294 /** | |
295 * Displays a single e-mail notification to the user. | |
296 * | |
297 * @param handle The plugin or connection handle. | |
298 * @param subject The subject of the e-mail. | |
299 * @param from The from address. | |
300 * @param to The destination address. | |
301 * @param url The URL where the message can be read. | |
302 * @param cb The callback to call when the user closes | |
303 * the notification. | |
304 * @param user_data The data to pass to the callback. | |
305 * | |
306 * @return A UI-specific handle. | |
307 */ | |
308 void *gaim_notify_email(void *handle, const char *subject, | |
309 const char *from, const char *to, | |
310 const char *url, GCallback cb, | |
311 void *user_data); | |
312 | |
313 /** | |
314 * Displays a notification for multiple e-mails to the user. | |
315 * | |
316 * @param handle The plugin or connection handle. | |
317 * @param count The number of e-mails. | |
5522
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
318 * @param detailed @c TRUE if there is information for each e-mail in the |
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
319 * arrays. |
5437 | 320 * @param subjects The array of subjects. |
321 * @param froms The array of from addresses. | |
322 * @param tos The array of destination addresses. | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
323 * @param urls The URLs where the messages can be read. |
5437 | 324 * @param cb The callback to call when the user closes |
325 * the notification. | |
326 * @param user_data The data to pass to the callback. | |
327 * | |
328 * @return A UI-specific handle. | |
329 */ | |
5522
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
330 void *gaim_notify_emails(void *handle, size_t count, gboolean detailed, |
5437 | 331 const char **subjects, const char **froms, |
332 const char **tos, const char **urls, | |
333 GCallback cb, void *user_data); | |
334 | |
335 /** | |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
336 * Displays a notification with formatted text. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
337 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
338 * The text is essentially a stripped-down format of HTML, the same that |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
339 * IMs may send. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
340 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
341 * @param handle The plugin or connection handle. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
342 * @param title The title of the message. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
343 * @param primary The main point of the message. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
344 * @param secondary The secondary information. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
345 * @param text The formatted text. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
346 * @param cb The callback to call when the user closes |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
347 * the notification. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
348 * @param user_data The data to pass to the callback. |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
349 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
350 * @return A UI-specific handle. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
351 */ |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
352 void *gaim_notify_formatted(void *handle, const char *title, |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
353 const char *primary, const char *secondary, |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
354 const char *text, GCallback cb, void *user_data); |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
355 |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
356 /** |
9800 | 357 * Displays user information with formatted text, passing information giving |
358 * the connection and username from which the user information came. | |
9797 | 359 * |
360 * The text is essentially a stripped-down format of HTML, the same that | |
361 * IMs may send. | |
362 * | |
363 * @param gc The GaimConnection handle associated with the information. | |
364 * @param who The username associated with the information. | |
365 * @param title The title of the message. | |
366 * @param primary The main point of the message. | |
367 * @param secondary The secondary information. | |
368 * @param text The formatted text. | |
369 * @param cb The callback to call when the user closes | |
370 * the notification. | |
371 * @param user_data The data to pass to the callback. | |
372 * | |
373 * @return A UI-specific handle. | |
374 */ | |
375 void *gaim_notify_userinfo(GaimConnection *gc, const char *who, | |
376 const char *title, const char *primary, | |
377 const char *secondary, const char *text, | |
378 GCallback cb, void *user_data); | |
379 | |
380 /** | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
381 * Opens a URI or somehow presents it to the user. |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
382 * |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
383 * @param handle The plugin or connection handle. |
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
384 * @param uri The URI to display or go to. |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
385 * |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
386 * @return A UI-specific handle, if any. This may only be presented if |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
387 * the UI code displays a dialog instead of a webpage, or something |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
388 * similar. |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
389 */ |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
390 void *gaim_notify_uri(void *handle, const char *uri); |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
391 |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
392 /** |
5437 | 393 * Closes a notification. |
394 * | |
395 * This should be used only by the UI operation functions and part of the | |
396 * core. | |
397 * | |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
398 * @param type The notification type. |
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
399 * @param ui_handle The notification UI handle. |
5437 | 400 */ |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
401 void gaim_notify_close(GaimNotifyType type, void *ui_handle); |
5437 | 402 |
403 /** | |
404 * Closes all notifications registered with the specified handle. | |
405 * | |
406 * @param handle The handle. | |
407 */ | |
408 void gaim_notify_close_with_handle(void *handle); | |
409 | |
410 /** | |
411 * A wrapper for gaim_notify_message that displays an information message. | |
412 */ | |
413 #define gaim_notify_info(handle, title, primary, secondary) \ | |
414 gaim_notify_message((handle), GAIM_NOTIFY_MSG_INFO, (title), \ | |
415 (primary), (secondary), NULL, NULL) | |
416 | |
417 /** | |
418 * A wrapper for gaim_notify_message that displays a warning message. | |
419 */ | |
420 #define gaim_notify_warning(handle, title, primary, secondary) \ | |
421 gaim_notify_message((handle), GAIM_NOTIFY_MSG_WARNING, (title), \ | |
422 (primary), (secondary), NULL, NULL) | |
423 | |
424 /** | |
425 * A wrapper for gaim_notify_message that displays an error message. | |
426 */ | |
427 #define gaim_notify_error(handle, title, primary, secondary) \ | |
428 gaim_notify_message((handle), GAIM_NOTIFY_MSG_ERROR, (title), \ | |
429 (primary), (secondary), NULL, NULL) | |
430 | |
431 /*@}*/ | |
432 | |
433 /**************************************************************************/ | |
10566
62fc579810f4
[gaim-migrate @ 11949]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10443
diff
changeset
|
434 /** @name UI Registration Functions */ |
5437 | 435 /**************************************************************************/ |
436 /*@{*/ | |
437 | |
438 /** | |
439 * Sets the UI operations structure to be used when displaying a | |
440 * notification. | |
441 * | |
442 * @param ops The UI operations structure. | |
443 */ | |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
444 void gaim_notify_set_ui_ops(GaimNotifyUiOps *ops); |
5437 | 445 |
446 /** | |
447 * Returns the UI operations structure to be used when displaying a | |
448 * notification. | |
449 * | |
6467
aabb0b331ac8
[gaim-migrate @ 6976]
Christian Hammond <chipx86@chipx86.com>
parents:
6465
diff
changeset
|
450 * @return The UI operations structure. |
5437 | 451 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
452 GaimNotifyUiOps *gaim_notify_get_ui_ops(void); |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
453 |
5497 | 454 /*@}*/ |
5437 | 455 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
456 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
457 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
458 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
459 |
5437 | 460 #endif /* _GAIM_NOTIFY_H_ */ |