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