Mercurial > pidgin
annotate src/notify.h @ 12263:8190a70d2c34
[gaim-migrate @ 14565]
removed GMP dependancy for sametime support. fixed some buddy status issues
as noted in bug #1368136. sametime seems to be working just fine now, and I'm
trying to use HEAD as my primary client for a while to get things going.
committer: Tailor Script <tailor@pidgin.im>
author | Christopher O'Brien <siege@pidgin.im> |
---|---|
date | Tue, 29 Nov 2005 23:37:05 +0000 |
parents | 0c82fd31628b |
children | fc464a0abccc |
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 /** |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
35 * Notification close callbacks. |
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
36 */ |
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
37 typedef void (*GaimNotifyCloseCallback) (gpointer user_data); |
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
38 |
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
39 /** |
5437 | 40 * Notification types. |
41 */ | |
42 typedef enum | |
43 { | |
10439 | 44 GAIM_NOTIFY_MESSAGE = 0, /**< Message notification. */ |
45 GAIM_NOTIFY_EMAIL, /**< Single e-mail notification. */ | |
46 GAIM_NOTIFY_EMAILS, /**< Multiple e-mail notification. */ | |
47 GAIM_NOTIFY_FORMATTED, /**< Formatted text. */ | |
48 GAIM_NOTIFY_SEARCHRESULTS, /**< Buddy search results. */ | |
49 GAIM_NOTIFY_USERINFO, /**< Formatted userinfo text. */ | |
50 GAIM_NOTIFY_URI /**< URI notification or display. */ | |
5437 | 51 |
52 } GaimNotifyType; | |
53 | |
54 /** | |
55 * Notification message types. | |
56 */ | |
57 typedef enum | |
58 { | |
59 GAIM_NOTIFY_MSG_ERROR = 0, /**< Error notification. */ | |
60 GAIM_NOTIFY_MSG_WARNING, /**< Warning notification. */ | |
61 GAIM_NOTIFY_MSG_INFO /**< Information notification. */ | |
62 | |
63 } GaimNotifyMsgType; | |
64 | |
65 /** | |
11359 | 66 * The types of buttons |
67 */ | |
68 typedef enum | |
69 { | |
70 GAIM_NOTIFY_BUTTON_CONTINUE = 0, | |
71 GAIM_NOTIFY_BUTTON_ADD_BUDDY | |
72 | |
73 } GaimNotifySearchButtonType; | |
74 | |
75 /** | |
76 * Search results object. | |
77 */ | |
78 typedef struct | |
79 { | |
80 GList *columns; /**< List of the search column objects. */ | |
81 GList *rows; /**< List of rows in the result. */ | |
82 GList *buttons; /**< List of buttons to display. */ | |
83 | |
84 } GaimNotifySearchResults; | |
85 | |
86 /** | |
87 * Single column of a search result. | |
88 */ | |
89 typedef struct | |
90 { | |
91 char *title; /**< Title of the column. */ | |
92 | |
93 } GaimNotifySearchColumn; | |
94 | |
95 typedef void (*GaimNotifySearchResultsCallback)(GaimConnection *, GList *); | |
96 | |
97 | |
98 /** | |
99 * Definition of a button. | |
100 */ | |
101 typedef struct | |
102 { | |
103 GaimNotifySearchButtonType type; | |
104 GaimNotifySearchResultsCallback callback; /**< Function to be called when clicked. */ | |
105 | |
106 } GaimNotifySearchButton; | |
107 | |
108 /** | |
5437 | 109 * Notification UI operations. |
110 */ | |
111 typedef struct | |
112 { | |
113 void *(*notify_message)(GaimNotifyMsgType type, const char *title, | |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
114 const char *primary, const char *secondary); |
5437 | 115 void *(*notify_email)(const char *subject, const char *from, |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
116 const char *to, const char *url); |
5522
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
117 void *(*notify_emails)(size_t count, gboolean detailed, |
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
118 const char **subjects, const char **froms, |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
119 const char **tos, const char **urls); |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
120 void *(*notify_formatted)(const char *title, const char *primary, |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
121 const char *secondary, const char *text); |
10439 | 122 void *(*notify_searchresults)(GaimConnection *gc, const char *title, |
123 const char *primary, const char *secondary, | |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
124 GaimNotifySearchResults *results); |
11359 | 125 void (*notify_searchresults_new_rows)(GaimConnection *gc, |
126 GaimNotifySearchResults *results, | |
12220
64254fbabc7b
[gaim-migrate @ 14522]
Richard Laager <rlaager@wiktel.com>
parents:
12129
diff
changeset
|
127 void *data, gpointer user_data); |
9797 | 128 void *(*notify_userinfo)(GaimConnection *gc, const char *who, |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
129 const char *text); |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
130 void *(*notify_uri)(const char *uri); |
5437 | 131 |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
132 void (*close_notify)(GaimNotifyType type, void *ui_handle); |
5437 | 133 |
134 } GaimNotifyUiOps; | |
135 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
136 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
137 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
138 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
139 |
5437 | 140 /**************************************************************************/ |
11359 | 141 /** Search results notification API */ |
142 /**************************************************************************/ | |
143 /*@{*/ | |
144 | |
145 /** | |
146 * Displays results from a buddy search. This can be, for example, | |
147 * a window with a list of all found buddies, where you are given the | |
148 * option of adding buddies to your buddy list. | |
149 * | |
150 * @param gc The GaimConnection handle associated with the information. | |
151 * @param title The title of the message. If this is NULL, the title | |
12259
0c82fd31628b
[gaim-migrate @ 14561]
Richard Laager <rlaager@wiktel.com>
parents:
12257
diff
changeset
|
152 * will be "Search Results." |
11359 | 153 * @param primary The main point of the message. |
154 * @param secondary The secondary information. | |
155 * @param results The GaimNotifySearchResults instance. | |
156 * @param cb The callback to call when the user closes | |
157 * the notification. | |
158 * @param user_data The data to pass to the callback. | |
159 * | |
160 * @return A UI-specific handle. | |
161 */ | |
162 void *gaim_notify_searchresults(GaimConnection *gc, const char *title, | |
163 const char *primary, const char *secondary, | |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
164 GaimNotifySearchResults *results, GaimNotifyCloseCallback cb, |
12220
64254fbabc7b
[gaim-migrate @ 14522]
Richard Laager <rlaager@wiktel.com>
parents:
12129
diff
changeset
|
165 gpointer user_data); |
11359 | 166 |
167 void gaim_notify_searchresults_free(GaimNotifySearchResults *results); | |
168 | |
169 /** | |
170 * Replace old rows with the new. Reuse an existing window. | |
171 * | |
172 * @param gc The GaimConnection structure. | |
173 * @param results The GaimNotifySearchResults structure. | |
174 * @param data Data returned by the gaim_notify_searchresults(). | |
175 * @param user_data User defined data. | |
176 */ | |
177 void gaim_notify_searchresults_new_rows(GaimConnection *gc, | |
178 GaimNotifySearchResults *results, | |
12220
64254fbabc7b
[gaim-migrate @ 14522]
Richard Laager <rlaager@wiktel.com>
parents:
12129
diff
changeset
|
179 void *data, gpointer user_data); |
11359 | 180 |
181 /** | |
182 * Adds a button that will be displayed in the search results dialog. | |
183 * | |
184 * @param results The search results object. | |
185 * @param type Type of the button. (TODO: Only one button of a given type can be displayed.) | |
186 * @param cb Function that will be called on the click event. | |
187 */ | |
188 void gaim_notify_searchresults_button_add(GaimNotifySearchResults *results, | |
189 GaimNotifySearchButtonType type, | |
190 GaimNotifySearchResultsCallback cb); | |
191 | |
192 /** | |
193 * Returns a newly created search results object. | |
194 * | |
195 * @return The new search results object. | |
196 */ | |
197 GaimNotifySearchResults *gaim_notify_searchresults_new(); | |
198 | |
199 /** | |
200 * Returns a newly created search result column object. | |
201 * | |
202 * @param title Title of the column. NOTE: Title will get g_strdup()ed. | |
203 * | |
204 * @return The new search column object. | |
205 */ | |
206 GaimNotifySearchColumn *gaim_notify_searchresults_column_new(const char *title); | |
207 | |
208 /** | |
209 * Adds a new column to the search result object. | |
210 * | |
211 * @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
|
212 * @param column The column that will be added to the result object. |
11359 | 213 */ |
214 void gaim_notify_searchresults_column_add(GaimNotifySearchResults *results, | |
215 GaimNotifySearchColumn *column); | |
216 | |
217 /** | |
218 * Adds a new row of the results to the search results object. | |
219 * | |
220 * @param results The search results object. | |
221 * @param row The row of the results. | |
222 */ | |
223 void gaim_notify_searchresults_row_add(GaimNotifySearchResults *results, | |
224 GList *row); | |
225 | |
226 /** | |
227 * Returns a number of the rows in the search results object. | |
228 * | |
229 * @param results The search results object. | |
230 * | |
12257
ca27de274225
[gaim-migrate @ 14559]
Richard Laager <rlaager@wiktel.com>
parents:
12242
diff
changeset
|
231 * @return Number of the result rows. |
11359 | 232 */ |
12257
ca27de274225
[gaim-migrate @ 14559]
Richard Laager <rlaager@wiktel.com>
parents:
12242
diff
changeset
|
233 guint gaim_notify_searchresults_get_rows_count(GaimNotifySearchResults *results); |
11359 | 234 |
235 /** | |
236 * Returns a number of the columns in the search results object. | |
237 * | |
238 * @param results The search results object. | |
239 * | |
12257
ca27de274225
[gaim-migrate @ 14559]
Richard Laager <rlaager@wiktel.com>
parents:
12242
diff
changeset
|
240 * @return Number of the columns. |
11359 | 241 */ |
12257
ca27de274225
[gaim-migrate @ 14559]
Richard Laager <rlaager@wiktel.com>
parents:
12242
diff
changeset
|
242 guint gaim_notify_searchresults_get_columns_count(GaimNotifySearchResults *results); |
11359 | 243 |
244 /** | |
245 * Returns a row of the results from the search results object. | |
246 * | |
247 * @param results The search results object. | |
248 * @param row_id Index of the row to be returned. | |
249 * | |
250 * @return Row of the results. | |
251 */ | |
252 GList *gaim_notify_searchresults_row_get(GaimNotifySearchResults *results, | |
253 unsigned int row_id); | |
254 | |
255 /** | |
256 * Returns a title of the search results object's column. | |
257 * | |
258 * @param results The search results object. | |
259 * @param column_id Index of the column. | |
260 * | |
261 * @return Title of the column. | |
262 */ | |
263 char *gaim_notify_searchresults_column_get_title(GaimNotifySearchResults *results, | |
264 unsigned int column_id); | |
265 | |
266 /*@}*/ | |
267 | |
268 /**************************************************************************/ | |
5437 | 269 /** @name Notification API */ |
270 /**************************************************************************/ | |
271 /*@{*/ | |
272 | |
273 /** | |
274 * Displays a notification message to the user. | |
275 * | |
276 * @param handle The plugin or connection handle. | |
277 * @param type The notification type. | |
278 * @param title The title of the message. | |
279 * @param primary The main point of the message. | |
280 * @param secondary The secondary information. | |
281 * @param cb The callback to call when the user closes | |
282 * the notification. | |
283 * @param user_data The data to pass to the callback. | |
284 * | |
285 * @return A UI-specific handle. | |
286 */ | |
6356
ee0044f3e377
[gaim-migrate @ 6855]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
287 void *gaim_notify_message(void *handle, GaimNotifyMsgType type, |
5437 | 288 const char *title, const char *primary, |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
289 const char *secondary, GaimNotifyCloseCallback cb, |
12220
64254fbabc7b
[gaim-migrate @ 14522]
Richard Laager <rlaager@wiktel.com>
parents:
12129
diff
changeset
|
290 gpointer user_data); |
5437 | 291 |
292 /** | |
293 * Displays a single e-mail notification to the user. | |
294 * | |
295 * @param handle The plugin or connection handle. | |
296 * @param subject The subject of the e-mail. | |
297 * @param from The from address. | |
298 * @param to The destination address. | |
299 * @param url The URL where the message can be read. | |
300 * @param cb The callback to call when the user closes | |
301 * the notification. | |
302 * @param user_data The data to pass to the callback. | |
303 * | |
304 * @return A UI-specific handle. | |
305 */ | |
306 void *gaim_notify_email(void *handle, const char *subject, | |
307 const char *from, const char *to, | |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
308 const char *url, GaimNotifyCloseCallback cb, |
12220
64254fbabc7b
[gaim-migrate @ 14522]
Richard Laager <rlaager@wiktel.com>
parents:
12129
diff
changeset
|
309 gpointer user_data); |
5437 | 310 |
311 /** | |
312 * Displays a notification for multiple e-mails to the user. | |
313 * | |
314 * @param handle The plugin or connection handle. | |
315 * @param count The number of e-mails. | |
5522
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
316 * @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
|
317 * arrays. |
5437 | 318 * @param subjects The array of subjects. |
319 * @param froms The array of from addresses. | |
320 * @param tos The array of destination addresses. | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
321 * @param urls The URLs where the messages can be read. |
5437 | 322 * @param cb The callback to call when the user closes |
323 * the notification. | |
324 * @param user_data The data to pass to the callback. | |
325 * | |
326 * @return A UI-specific handle. | |
327 */ | |
5522
a3e6a5ef49b5
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
328 void *gaim_notify_emails(void *handle, size_t count, gboolean detailed, |
5437 | 329 const char **subjects, const char **froms, |
330 const char **tos, const char **urls, | |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
331 GaimNotifyCloseCallback cb, gpointer user_data); |
5437 | 332 |
333 /** | |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
334 * Displays a notification with formatted text. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
335 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
336 * 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
|
337 * IMs may send. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
338 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
339 * @param handle The plugin or connection handle. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
340 * @param title The title of the message. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
341 * @param primary The main point of the message. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
342 * @param secondary The secondary information. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
343 * @param text The formatted text. |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
344 * @param cb The callback to call when the user closes |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
345 * the notification. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
346 * @param user_data The data to pass to the callback. |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
347 * |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
348 * @return A UI-specific handle. |
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 void *gaim_notify_formatted(void *handle, const char *title, |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
351 const char *primary, const char *secondary, |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
352 const char *text, GaimNotifyCloseCallback cb, gpointer user_data); |
6381
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
353 |
e006685f75aa
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
354 /** |
9800 | 355 * Displays user information with formatted text, passing information giving |
356 * the connection and username from which the user information came. | |
9797 | 357 * |
358 * The text is essentially a stripped-down format of HTML, the same that | |
359 * IMs may send. | |
360 * | |
11533
c9b815aeddc1
[gaim-migrate @ 13782]
Richard Laager <rlaager@wiktel.com>
parents:
11531
diff
changeset
|
361 * @param gc The GaimConnection handle associated with the information. |
c9b815aeddc1
[gaim-migrate @ 13782]
Richard Laager <rlaager@wiktel.com>
parents:
11531
diff
changeset
|
362 * @param who The username associated with the information. |
9797 | 363 * @param text The formatted text. |
364 * @param cb The callback to call when the user closes | |
365 * the notification. | |
366 * @param user_data The data to pass to the callback. | |
367 * | |
368 * @return A UI-specific handle. | |
369 */ | |
370 void *gaim_notify_userinfo(GaimConnection *gc, const char *who, | |
12242
976677e67239
[gaim-migrate @ 14544]
Richard Laager <rlaager@wiktel.com>
parents:
12220
diff
changeset
|
371 const char *text, GaimNotifyCloseCallback cb, |
12220
64254fbabc7b
[gaim-migrate @ 14522]
Richard Laager <rlaager@wiktel.com>
parents:
12129
diff
changeset
|
372 gpointer user_data); |
9797 | 373 |
374 /** | |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
375 * Opens a URI or somehow presents it to the user. |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
376 * |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
377 * @param handle The plugin or connection handle. |
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
378 * @param uri The URI to display or go to. |
6465
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
379 * |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
380 * @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
|
381 * 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
|
382 * similar. |
fb64cc87bc96
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
383 */ |
10240
95ca0db2d01d
[gaim-migrate @ 11377]
Herman Bloggs <hermanator12002@yahoo.com>
parents:
10209
diff
changeset
|
384 void *gaim_notify_uri(void *handle, const char *uri); |
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 /** |
5437 | 387 * Closes a notification. |
388 * | |
389 * This should be used only by the UI operation functions and part of the | |
390 * core. | |
391 * | |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
392 * @param type The notification type. |
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
393 * @param ui_handle The notification UI handle. |
5437 | 394 */ |
5476
9bcd8cd625ae
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
395 void gaim_notify_close(GaimNotifyType type, void *ui_handle); |
5437 | 396 |
397 /** | |
398 * Closes all notifications registered with the specified handle. | |
399 * | |
400 * @param handle The handle. | |
401 */ | |
402 void gaim_notify_close_with_handle(void *handle); | |
403 | |
404 /** | |
405 * A wrapper for gaim_notify_message that displays an information message. | |
406 */ | |
407 #define gaim_notify_info(handle, title, primary, secondary) \ | |
408 gaim_notify_message((handle), GAIM_NOTIFY_MSG_INFO, (title), \ | |
409 (primary), (secondary), NULL, NULL) | |
410 | |
411 /** | |
412 * A wrapper for gaim_notify_message that displays a warning message. | |
413 */ | |
414 #define gaim_notify_warning(handle, title, primary, secondary) \ | |
415 gaim_notify_message((handle), GAIM_NOTIFY_MSG_WARNING, (title), \ | |
416 (primary), (secondary), NULL, NULL) | |
417 | |
418 /** | |
419 * A wrapper for gaim_notify_message that displays an error message. | |
420 */ | |
421 #define gaim_notify_error(handle, title, primary, secondary) \ | |
422 gaim_notify_message((handle), GAIM_NOTIFY_MSG_ERROR, (title), \ | |
423 (primary), (secondary), NULL, NULL) | |
424 | |
425 /*@}*/ | |
426 | |
427 /**************************************************************************/ | |
10566
62fc579810f4
[gaim-migrate @ 11949]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10443
diff
changeset
|
428 /** @name UI Registration Functions */ |
5437 | 429 /**************************************************************************/ |
430 /*@{*/ | |
431 | |
432 /** | |
433 * Sets the UI operations structure to be used when displaying a | |
434 * notification. | |
435 * | |
436 * @param ops The UI operations structure. | |
437 */ | |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
438 void gaim_notify_set_ui_ops(GaimNotifyUiOps *ops); |
5437 | 439 |
440 /** | |
441 * Returns the UI operations structure to be used when displaying a | |
442 * notification. | |
443 * | |
6467
aabb0b331ac8
[gaim-migrate @ 6976]
Christian Hammond <chipx86@chipx86.com>
parents:
6465
diff
changeset
|
444 * @return The UI operations structure. |
5437 | 445 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
446 GaimNotifyUiOps *gaim_notify_get_ui_ops(void); |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
447 |
5497 | 448 /*@}*/ |
5437 | 449 |
12129
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
450 /**************************************************************************/ |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
451 /** @name Notify Subsystem */ |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
452 /**************************************************************************/ |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
453 /*@{*/ |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
454 |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
455 /** |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
456 * Returns the notify subsystem handle. |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
457 * |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
458 * @return The notify subsystem handle. |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
459 */ |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
460 void *gaim_notify_get_handle(void); |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
461 |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
462 /** |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
463 * Initializes the notify subsystem. |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
464 */ |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
465 void gaim_notify_init(void); |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
466 |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
467 /** |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
468 * Uninitializes the notify subsystem. |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
469 */ |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
470 void gaim_notify_uninit(void); |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
471 |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
472 /*@}*/ |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
473 |
216988c717da
[gaim-migrate @ 14429]
Richard Laager <rlaager@wiktel.com>
parents:
11533
diff
changeset
|
474 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
475 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
476 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
477 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
478 |
5437 | 479 #endif /* _GAIM_NOTIFY_H_ */ |