Sun, 03 Jul 2005 21:48:56 +0000
[gaim-migrate @ 12996]
Added preliminary DBUS support to gaim, the details are described in
README.dbus.
| 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
bd201d637ff4
[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
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
39 | GAIM_NOTIFY_MESSAGE = 0, /**< Message notification. */ |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
40 | GAIM_NOTIFY_EMAIL, /**< Single e-mail notification. */ |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
41 | GAIM_NOTIFY_EMAILS, /**< Multiple e-mail notification. */ |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
42 | GAIM_NOTIFY_FORMATTED, /**< Formatted text. */ |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
43 | GAIM_NOTIFY_SEARCHRESULTS, /**< Buddy search results. */ |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
44 | GAIM_NOTIFY_USERINFO, /**< Formatted userinfo text. */ |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
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 | /** | |
| 61 | * Notification UI operations. | |
| 62 | */ | |
| 63 | typedef struct | |
| 64 | { | |
| 65 | void *(*notify_message)(GaimNotifyMsgType type, const char *title, | |
| 66 | const char *primary, const char *secondary, | |
| 67 | GCallback cb, void *user_data); | |
| 68 | void *(*notify_email)(const char *subject, const char *from, | |
| 69 | const char *to, const char *url, | |
| 70 | GCallback cb, void *user_data); | |
|
5522
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
71 | void *(*notify_emails)(size_t count, gboolean detailed, |
|
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
72 | const char **subjects, const char **froms, |
|
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
73 | const char **tos, const char **urls, |
|
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
74 | GCallback cb, void *user_data); |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
75 | void *(*notify_formatted)(const char *title, const char *primary, |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
76 | const char *secondary, const char *text, |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
77 | GCallback cb, void *user_data); |
|
10439
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
78 | void *(*notify_searchresults)(GaimConnection *gc, const char *title, |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
79 | const char *primary, const char *secondary, |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
80 | const char **results, GCallback cb, |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
81 | void *user_data); |
| 9797 | 82 | void *(*notify_userinfo)(GaimConnection *gc, const char *who, |
| 83 | const char *title, const char *primary, | |
| 84 | const char *secondary, const char *text, | |
| 85 | GCallback cb, void *user_data); | |
|
10240
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
86 | void *(*notify_uri)(const char *uri); |
| 5437 | 87 | |
|
5476
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
88 | void (*close_notify)(GaimNotifyType type, void *ui_handle); |
| 5437 | 89 | |
| 90 | } GaimNotifyUiOps; | |
| 91 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
92 | |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
93 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
94 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
95 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
96 | |
| 5437 | 97 | /**************************************************************************/ |
| 98 | /** @name Notification API */ | |
| 99 | /**************************************************************************/ | |
| 100 | /*@{*/ | |
| 101 | ||
| 102 | /** | |
| 103 | * Displays a notification message to the user. | |
| 104 | * | |
| 105 | * @param handle The plugin or connection handle. | |
| 106 | * @param type The notification type. | |
| 107 | * @param title The title of the message. | |
| 108 | * @param primary The main point of the message. | |
| 109 | * @param secondary The secondary information. | |
| 110 | * @param cb The callback to call when the user closes | |
| 111 | * the notification. | |
| 112 | * @param user_data The data to pass to the callback. | |
| 113 | * | |
| 114 | * @return A UI-specific handle. | |
| 115 | */ | |
|
6356
27990c4f9a9f
[gaim-migrate @ 6855]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
116 | void *gaim_notify_message(void *handle, GaimNotifyMsgType type, |
| 5437 | 117 | const char *title, const char *primary, |
| 118 | const char *secondary, GCallback cb, | |
| 119 | void *user_data); | |
| 120 | ||
| 121 | /** | |
| 122 | * Displays a single e-mail notification to the user. | |
| 123 | * | |
| 124 | * @param handle The plugin or connection handle. | |
| 125 | * @param subject The subject of the e-mail. | |
| 126 | * @param from The from address. | |
| 127 | * @param to The destination address. | |
| 128 | * @param url The URL where the message can be read. | |
| 129 | * @param cb The callback to call when the user closes | |
| 130 | * the notification. | |
| 131 | * @param user_data The data to pass to the callback. | |
| 132 | * | |
| 133 | * @return A UI-specific handle. | |
| 134 | */ | |
| 135 | void *gaim_notify_email(void *handle, const char *subject, | |
| 136 | const char *from, const char *to, | |
| 137 | const char *url, GCallback cb, | |
| 138 | void *user_data); | |
| 139 | ||
| 140 | /** | |
| 141 | * Displays a notification for multiple e-mails to the user. | |
| 142 | * | |
| 143 | * @param handle The plugin or connection handle. | |
| 144 | * @param count The number of e-mails. | |
|
5522
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
145 | * @param detailed @c TRUE if there is information for each e-mail in the |
|
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
146 | * arrays. |
| 5437 | 147 | * @param subjects The array of subjects. |
| 148 | * @param froms The array of from addresses. | |
| 149 | * @param tos The array of destination addresses. | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
150 | * @param urls The URLs where the messages can be read. |
| 5437 | 151 | * @param cb The callback to call when the user closes |
| 152 | * the notification. | |
| 153 | * @param user_data The data to pass to the callback. | |
| 154 | * | |
| 155 | * @return A UI-specific handle. | |
| 156 | */ | |
|
5522
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
157 | void *gaim_notify_emails(void *handle, size_t count, gboolean detailed, |
| 5437 | 158 | const char **subjects, const char **froms, |
| 159 | const char **tos, const char **urls, | |
| 160 | GCallback cb, void *user_data); | |
| 161 | ||
| 162 | /** | |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
163 | * Displays a notification with formatted text. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
164 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
165 | * The text is essentially a stripped-down format of HTML, the same that |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
166 | * IMs may send. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
167 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
168 | * @param handle The plugin or connection handle. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
169 | * @param title The title of the message. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
170 | * @param primary The main point of the message. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
171 | * @param secondary The secondary information. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
172 | * @param text The formatted text. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
173 | * @param cb The callback to call when the user closes |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
174 | * the notification. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
175 | * @param user_data The data to pass to the callback. |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
176 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
177 | * @return A UI-specific handle. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
178 | */ |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
179 | void *gaim_notify_formatted(void *handle, const char *title, |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
180 | const char *primary, const char *secondary, |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
181 | const char *text, GCallback cb, void *user_data); |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
182 | |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
183 | /** |
|
10439
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
184 | * Displays results from a buddy search. This can be, for example, |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
185 | * a window with a list of all found buddies, where you are given the |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
186 | * option of adding buddies to your buddy list. |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
187 | * |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
188 | * @param gc The GaimConnection handle associated with the information. |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
189 | * @param title The title of the message. If this is NULL, the title |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
190 | * will be "Search Results." |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
191 | * @param primary The main point of the message. |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
192 | * @param secondary The secondary information. |
|
10443
aa7dcc1c796a
[gaim-migrate @ 11703]
Mark Doliner <markdoliner@pidgin.im>
parents:
10439
diff
changeset
|
193 | * @param results An null-terminated array of null-terminated buddy names. |
|
10439
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
194 | * @param cb The callback to call when the user closes |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
195 | * the notification. |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
196 | * @param user_data The data to pass to the callback. |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
197 | * |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
198 | * @return A UI-specific handle. |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
199 | */ |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
200 | void *gaim_notify_searchresults(GaimConnection *gc, const char *title, |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
201 | const char *primary, const char *secondary, |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
202 | const char **results, GCallback cb, |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
203 | void *user_data); |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
204 | |
|
5868d8f55fb1
[gaim-migrate @ 11697]
Alex Converse <alex.converse@gmail.com>
parents:
10240
diff
changeset
|
205 | /** |
|
9800
1115830011b8
[gaim-migrate @ 10668]
Mark Doliner <markdoliner@pidgin.im>
parents:
9797
diff
changeset
|
206 | * Displays user information with formatted text, passing information giving |
|
1115830011b8
[gaim-migrate @ 10668]
Mark Doliner <markdoliner@pidgin.im>
parents:
9797
diff
changeset
|
207 | * the connection and username from which the user information came. |
| 9797 | 208 | * |
| 209 | * The text is essentially a stripped-down format of HTML, the same that | |
| 210 | * IMs may send. | |
| 211 | * | |
| 212 | * @param gc The GaimConnection handle associated with the information. | |
| 213 | * @param who The username associated with the information. | |
| 214 | * @param title The title of the message. | |
| 215 | * @param primary The main point of the message. | |
| 216 | * @param secondary The secondary information. | |
| 217 | * @param text The formatted text. | |
| 218 | * @param cb The callback to call when the user closes | |
| 219 | * the notification. | |
| 220 | * @param user_data The data to pass to the callback. | |
| 221 | * | |
| 222 | * @return A UI-specific handle. | |
| 223 | */ | |
| 224 | void *gaim_notify_userinfo(GaimConnection *gc, const char *who, | |
| 225 | const char *title, const char *primary, | |
| 226 | const char *secondary, const char *text, | |
| 227 | GCallback cb, void *user_data); | |
| 228 | ||
| 229 | /** | |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
230 | * Opens a URI or somehow presents it to the user. |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
231 | * |
|
10240
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
232 | * @param handle The plugin or connection handle. |
|
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
233 | * @param uri The URI to display or go to. |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
234 | * |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
235 | * @return A UI-specific handle, if any. This may only be presented if |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
236 | * the UI code displays a dialog instead of a webpage, or something |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
237 | * similar. |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
238 | */ |
|
10240
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
239 | void *gaim_notify_uri(void *handle, const char *uri); |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
240 | |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
241 | /** |
| 5437 | 242 | * Closes a notification. |
| 243 | * | |
| 244 | * This should be used only by the UI operation functions and part of the | |
| 245 | * core. | |
| 246 | * | |
|
5476
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
247 | * @param type The notification type. |
|
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
248 | * @param ui_handle The notification UI handle. |
| 5437 | 249 | */ |
|
5476
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
250 | void gaim_notify_close(GaimNotifyType type, void *ui_handle); |
| 5437 | 251 | |
| 252 | /** | |
| 253 | * Closes all notifications registered with the specified handle. | |
| 254 | * | |
| 255 | * @param handle The handle. | |
| 256 | */ | |
| 257 | void gaim_notify_close_with_handle(void *handle); | |
| 258 | ||
| 259 | /** | |
| 260 | * A wrapper for gaim_notify_message that displays an information message. | |
| 261 | */ | |
| 262 | #define gaim_notify_info(handle, title, primary, secondary) \ | |
| 263 | gaim_notify_message((handle), GAIM_NOTIFY_MSG_INFO, (title), \ | |
| 264 | (primary), (secondary), NULL, NULL) | |
| 265 | ||
| 266 | /** | |
| 267 | * A wrapper for gaim_notify_message that displays a warning message. | |
| 268 | */ | |
| 269 | #define gaim_notify_warning(handle, title, primary, secondary) \ | |
| 270 | gaim_notify_message((handle), GAIM_NOTIFY_MSG_WARNING, (title), \ | |
| 271 | (primary), (secondary), NULL, NULL) | |
| 272 | ||
| 273 | /** | |
| 274 | * A wrapper for gaim_notify_message that displays an error message. | |
| 275 | */ | |
| 276 | #define gaim_notify_error(handle, title, primary, secondary) \ | |
| 277 | gaim_notify_message((handle), GAIM_NOTIFY_MSG_ERROR, (title), \ | |
| 278 | (primary), (secondary), NULL, NULL) | |
| 279 | ||
| 280 | /*@}*/ | |
| 281 | ||
| 282 | /**************************************************************************/ | |
| 10566 | 283 | /** @name UI Registration Functions */ |
| 5437 | 284 | /**************************************************************************/ |
| 285 | /*@{*/ | |
| 286 | ||
| 287 | /** | |
| 288 | * Sets the UI operations structure to be used when displaying a | |
| 289 | * notification. | |
| 290 | * | |
| 291 | * @param ops The UI operations structure. | |
| 292 | */ | |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
293 | void gaim_notify_set_ui_ops(GaimNotifyUiOps *ops); |
| 5437 | 294 | |
| 295 | /** | |
| 296 | * Returns the UI operations structure to be used when displaying a | |
| 297 | * notification. | |
| 298 | * | |
|
6467
754d318cac4a
[gaim-migrate @ 6976]
Christian Hammond <chipx86@chipx86.com>
parents:
6465
diff
changeset
|
299 | * @return The UI operations structure. |
| 5437 | 300 | */ |
|
7035
76bca80cd91d
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
301 | GaimNotifyUiOps *gaim_notify_get_ui_ops(void); |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
302 | |
|
5497
da3c08f3af25
[gaim-migrate @ 5893]
Mark Doliner <markdoliner@pidgin.im>
parents:
5476
diff
changeset
|
303 | /*@}*/ |
| 5437 | 304 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
305 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
306 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
307 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
308 | |
| 5437 | 309 | #endif /* _GAIM_NOTIFY_H_ */ |