Mercurial > pidgin
annotate src/notify.h @ 11986:bfbb1798535e
[gaim-migrate @ 14279]
Switch to using the unicode character 0x25cf instead of an asterisk as
our password masking character.
In the words of the great Christian Hammond, "By the way, isn't it
about time we replace the asterisk in masked entries with that unicode
character for the round filled circle ("?")? The asterisk is so 1980s."
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 05 Nov 2005 23:42:35 +0000 |
parents | c9b815aeddc1 |
children | 216988c717da |
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, |
11533
c9b815aeddc1
[gaim-migrate @ 13782]
Richard Laager <rlaager@wiktel.com>
parents:
11531
diff
changeset
|
129 const char *text, |
9797 | 130 GCallback cb, void *user_data); |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
131 void *(*notify_uri)(const char *uri); |
5437 | 132 |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
133 void (*close_notify)(GaimNotifyType type, void *ui_handle); |
5437 | 134 |
135 } GaimNotifyUiOps; | |
136 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
137 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
138 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
139 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
140 |
5437 | 141 /**************************************************************************/ |
11359 | 142 /** Search results notification API */ |
143 /**************************************************************************/ | |
144 /*@{*/ | |
145 | |
146 /** | |
147 * Displays results from a buddy search. This can be, for example, | |
148 * a window with a list of all found buddies, where you are given the | |
149 * option of adding buddies to your buddy list. | |
150 * | |
151 * @param gc The GaimConnection handle associated with the information. | |
152 * @param title The title of the message. If this is NULL, the title | |
153 * will be "Search Results." | |
154 * @param primary The main point of the message. | |
155 * @param secondary The secondary information. | |
156 * @param results The GaimNotifySearchResults instance. | |
157 * @param cb The callback to call when the user closes | |
158 * the notification. | |
159 * @param user_data The data to pass to the callback. | |
160 * | |
161 * @return A UI-specific handle. | |
162 */ | |
163 void *gaim_notify_searchresults(GaimConnection *gc, const char *title, | |
164 const char *primary, const char *secondary, | |
165 GaimNotifySearchResults *results, GCallback cb, | |
166 void *user_data); | |
167 | |
168 void gaim_notify_searchresults_free(GaimNotifySearchResults *results); | |
169 | |
170 /** | |
171 * Replace old rows with the new. Reuse an existing window. | |
172 * | |
173 * @param gc The GaimConnection structure. | |
174 * @param results The GaimNotifySearchResults structure. | |
175 * @param data Data returned by the gaim_notify_searchresults(). | |
176 * @param user_data User defined data. | |
177 */ | |
178 void gaim_notify_searchresults_new_rows(GaimConnection *gc, | |
179 GaimNotifySearchResults *results, | |
180 void *data, void *user_data); | |
181 | |
182 /** | |
183 * Adds a button that will be displayed in the search results dialog. | |
184 * | |
185 * @param results The search results object. | |
186 * @param type Type of the button. (TODO: Only one button of a given type can be displayed.) | |
187 * @param cb Function that will be called on the click event. | |
188 */ | |
189 void gaim_notify_searchresults_button_add(GaimNotifySearchResults *results, | |
190 GaimNotifySearchButtonType type, | |
191 GaimNotifySearchResultsCallback cb); | |
192 | |
193 /** | |
194 * Returns a newly created search results object. | |
195 * | |
196 * @return The new search results object. | |
197 */ | |
198 GaimNotifySearchResults *gaim_notify_searchresults_new(); | |
199 | |
200 /** | |
201 * Returns a newly created search result column object. | |
202 * | |
203 * @param title Title of the column. NOTE: Title will get g_strdup()ed. | |
204 * | |
205 * @return The new search column object. | |
206 */ | |
207 GaimNotifySearchColumn *gaim_notify_searchresults_column_new(const char *title); | |
208 | |
209 /** | |
210 * Adds a new column to the search result object. | |
211 * | |
212 * @param results The result object to which the column will be added. | |
11501
9563b768e8e2
[gaim-migrate @ 13746]
Richard Laager <rlaager@wiktel.com>
parents:
11359
diff
changeset
|
213 * @param column The column that will be added to the result object. |
11359 | 214 */ |
215 void gaim_notify_searchresults_column_add(GaimNotifySearchResults *results, | |
216 GaimNotifySearchColumn *column); | |
217 | |
218 /** | |
219 * Adds a new row of the results to the search results object. | |
220 * | |
221 * @param results The search results object. | |
222 * @param row The row of the results. | |
223 */ | |
224 void gaim_notify_searchresults_row_add(GaimNotifySearchResults *results, | |
225 GList *row); | |
226 | |
227 /** | |
228 * Returns a number of the rows in the search results object. | |
229 * | |
230 * @param results The search results object. | |
231 * | |
232 * @return Number of the result rows. Or -1 if an error occurrs. | |
233 */ | |
234 int gaim_notify_searchresults_get_rows_count(GaimNotifySearchResults *results); | |
235 | |
236 /** | |
237 * Returns a number of the columns in the search results object. | |
238 * | |
239 * @param results The search results object. | |
240 * | |
241 * @return Number of the columns. Or -1 if an error occurrs. | |
242 */ | |
243 int gaim_notify_searchresults_get_columns_count(GaimNotifySearchResults *results); | |
244 | |
245 /** | |
246 * Returns a row of the results from the search results object. | |
247 * | |
248 * @param results The search results object. | |
249 * @param row_id Index of the row to be returned. | |
250 * | |
251 * @return Row of the results. | |
252 */ | |
253 GList *gaim_notify_searchresults_row_get(GaimNotifySearchResults *results, | |
254 unsigned int row_id); | |
255 | |
256 /** | |
257 * Returns a title of the search results object's column. | |
258 * | |
259 * @param results The search results object. | |
260 * @param column_id Index of the column. | |
261 * | |
262 * @return Title of the column. | |
263 */ | |
264 char *gaim_notify_searchresults_column_get_title(GaimNotifySearchResults *results, | |
265 unsigned int column_id); | |
266 | |
267 /*@}*/ | |
268 | |
269 /**************************************************************************/ | |
5437 | 270 /** @name Notification API */ |
271 /**************************************************************************/ | |
272 /*@{*/ | |
273 | |
274 /** | |
275 * Displays a notification message to the user. | |
276 * | |
277 * @param handle The plugin or connection handle. | |
278 * @param type The notification type. | |
279 * @param title The title of the message. | |
280 * @param primary The main point of the message. | |
281 * @param secondary The secondary information. | |
282 * @param cb The callback to call when the user closes | |
283 * the notification. | |
284 * @param user_data The data to pass to the callback. | |
285 * | |
286 * @return A UI-specific handle. | |
287 */ | |
6356
ee0044f3e377
[gaim-migrate @ 6855]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
288 void *gaim_notify_message(void *handle, GaimNotifyMsgType type, |
5437 | 289 const char *title, const char *primary, |
290 const char *secondary, GCallback cb, | |
291 void *user_data); | |
292 | |
293 /** | |
294 * Displays a single e-mail notification to the user. | |
295 * | |
296 * @param handle The plugin or connection handle. | |
297 * @param subject The subject of the e-mail. | |
298 * @param from The from address. | |
299 * @param to The destination address. | |
300 * @param url The URL where the message can be read. | |
301 * @param cb The callback to call when the user closes | |
302 * the notification. | |
303 * @param user_data The data to pass to the callback. | |
304 * | |
305 * @return A UI-specific handle. | |
306 */ | |
307 void *gaim_notify_email(void *handle, const char *subject, | |
308 const char *from, const char *to, | |
309 const char *url, GCallback cb, | |
310 void *user_data); | |
311 | |
312 /** | |
313 * Displays a notification for multiple e-mails to the user. | |
314 * | |
315 * @param handle The plugin or connection handle. | |
316 * @param count The number of e-mails. | |
5522
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
317 * @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
|
318 * arrays. |
5437 | 319 * @param subjects The array of subjects. |
320 * @param froms The array of from addresses. | |
321 * @param tos The array of destination addresses. | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
322 * @param urls The URLs where the messages can be read. |
5437 | 323 * @param cb The callback to call when the user closes |
324 * the notification. | |
325 * @param user_data The data to pass to the callback. | |
326 * | |
327 * @return A UI-specific handle. | |
328 */ | |
5522
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
329 void *gaim_notify_emails(void *handle, size_t count, gboolean detailed, |
5437 | 330 const char **subjects, const char **froms, |
331 const char **tos, const char **urls, | |
332 GCallback cb, void *user_data); | |
333 | |
334 /** | |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
335 * Displays a notification with formatted text. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
336 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
337 * 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
|
338 * IMs may send. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
339 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
340 * @param handle The plugin or connection handle. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
341 * @param title The title of the message. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
342 * @param primary The main point of the message. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
343 * @param secondary The secondary information. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
344 * @param text The formatted text. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
345 * @param cb The callback to call when the user closes |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
346 * the notification. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
347 * @param user_data The data to pass to the callback. |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
348 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
349 * @return A UI-specific handle. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
350 */ |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
351 void *gaim_notify_formatted(void *handle, const char *title, |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
352 const char *primary, const char *secondary, |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
353 const char *text, GCallback cb, void *user_data); |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
354 |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
355 /** |
9800 | 356 * Displays user information with formatted text, passing information giving |
357 * the connection and username from which the user information came. | |
9797 | 358 * |
359 * The text is essentially a stripped-down format of HTML, the same that | |
360 * IMs may send. | |
361 * | |
11533
c9b815aeddc1
[gaim-migrate @ 13782]
Richard Laager <rlaager@wiktel.com>
parents:
11531
diff
changeset
|
362 * @param gc The GaimConnection handle associated with the information. |
c9b815aeddc1
[gaim-migrate @ 13782]
Richard Laager <rlaager@wiktel.com>
parents:
11531
diff
changeset
|
363 * @param who The username associated with the information. |
9797 | 364 * @param text The formatted text. |
365 * @param cb The callback to call when the user closes | |
366 * the notification. | |
367 * @param user_data The data to pass to the callback. | |
368 * | |
369 * @return A UI-specific handle. | |
370 */ | |
371 void *gaim_notify_userinfo(GaimConnection *gc, const char *who, | |
11531
bf763a1b2454
[gaim-migrate @ 13780]
Luke Schierer <lschiere@pidgin.im>
parents:
11501
diff
changeset
|
372 const char *text, GCallback cb, |
bf763a1b2454
[gaim-migrate @ 13780]
Luke Schierer <lschiere@pidgin.im>
parents:
11501
diff
changeset
|
373 void *user_data); |
9797 | 374 |
375 /** | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
376 * Opens a URI or somehow presents it to the user. |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
377 * |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
378 * @param handle The plugin or connection handle. |
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
379 * @param uri The URI to display or go to. |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
380 * |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
381 * @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
|
382 * 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
|
383 * similar. |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
384 */ |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
385 void *gaim_notify_uri(void *handle, const char *uri); |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
386 |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
387 /** |
5437 | 388 * Closes a notification. |
389 * | |
390 * This should be used only by the UI operation functions and part of the | |
391 * core. | |
392 * | |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
393 * @param type The notification type. |
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
394 * @param ui_handle The notification UI handle. |
5437 | 395 */ |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
396 void gaim_notify_close(GaimNotifyType type, void *ui_handle); |
5437 | 397 |
398 /** | |
399 * Closes all notifications registered with the specified handle. | |
400 * | |
401 * @param handle The handle. | |
402 */ | |
403 void gaim_notify_close_with_handle(void *handle); | |
404 | |
405 /** | |
406 * A wrapper for gaim_notify_message that displays an information message. | |
407 */ | |
408 #define gaim_notify_info(handle, title, primary, secondary) \ | |
409 gaim_notify_message((handle), GAIM_NOTIFY_MSG_INFO, (title), \ | |
410 (primary), (secondary), NULL, NULL) | |
411 | |
412 /** | |
413 * A wrapper for gaim_notify_message that displays a warning message. | |
414 */ | |
415 #define gaim_notify_warning(handle, title, primary, secondary) \ | |
416 gaim_notify_message((handle), GAIM_NOTIFY_MSG_WARNING, (title), \ | |
417 (primary), (secondary), NULL, NULL) | |
418 | |
419 /** | |
420 * A wrapper for gaim_notify_message that displays an error message. | |
421 */ | |
422 #define gaim_notify_error(handle, title, primary, secondary) \ | |
423 gaim_notify_message((handle), GAIM_NOTIFY_MSG_ERROR, (title), \ | |
424 (primary), (secondary), NULL, NULL) | |
425 | |
426 /*@}*/ | |
427 | |
428 /**************************************************************************/ | |
10566
62fc579810f4
[gaim-migrate @ 11949]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10443
diff
changeset
|
429 /** @name UI Registration Functions */ |
5437 | 430 /**************************************************************************/ |
431 /*@{*/ | |
432 | |
433 /** | |
434 * Sets the UI operations structure to be used when displaying a | |
435 * notification. | |
436 * | |
437 * @param ops The UI operations structure. | |
438 */ | |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
439 void gaim_notify_set_ui_ops(GaimNotifyUiOps *ops); |
5437 | 440 |
441 /** | |
442 * Returns the UI operations structure to be used when displaying a | |
443 * notification. | |
444 * | |
6467
aabb0b331ac8
[gaim-migrate @ 6976]
Christian Hammond <chipx86@chipx86.com>
parents:
6465
diff
changeset
|
445 * @return The UI operations structure. |
5437 | 446 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
447 GaimNotifyUiOps *gaim_notify_get_ui_ops(void); |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
448 |
5497 | 449 /*@}*/ |
5437 | 450 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
451 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
452 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
453 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
454 |
5437 | 455 #endif /* _GAIM_NOTIFY_H_ */ |