Fri, 28 Sep 2007 16:22:27 +0000
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
through 133f2968e112c003cac1320d1ca0128d5da74066
| 5437 | 1 | /** |
| 2 | * @file notify.h Notification API | |
| 3 | * @ingroup core | |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19868
diff
changeset
|
4 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19868
diff
changeset
|
5 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19868
diff
changeset
|
6 | /* purple |
| 5437 | 7 | * |
| 15884 | 8 | * Purple is the legal property of its developers, whose names are too numerous |
| 8046 | 9 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 10 | * source distribution. | |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
11 | * |
| 5437 | 12 | * This program is free software; you can redistribute it and/or modify |
| 13 | * it under the terms of the GNU General Public License as published by | |
| 14 | * the Free Software Foundation; either version 2 of the License, or | |
| 15 | * (at your option) any later version. | |
| 16 | * | |
| 17 | * This program is distributed in the hope that it will be useful, | |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 20 | * GNU General Public License for more details. | |
| 21 | * | |
| 22 | * You should have received a copy of the GNU General Public License | |
| 23 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
18412
diff
changeset
|
24 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
18412
6873322c380f
Add links to the signal documents in the API documents.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18190
diff
changeset
|
25 | * |
|
6873322c380f
Add links to the signal documents in the API documents.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
18190
diff
changeset
|
26 | * @see @ref notify-signals |
| 5437 | 27 | */ |
| 15884 | 28 | #ifndef _PURPLE_NOTIFY_H_ |
| 29 | #define _PURPLE_NOTIFY_H_ | |
| 5437 | 30 | |
| 31 | #include <stdlib.h> | |
| 32 | #include <glib-object.h> | |
| 33 | #include <glib.h> | |
| 34 | ||
| 15884 | 35 | typedef struct _PurpleNotifyUserInfoEntry PurpleNotifyUserInfoEntry; |
| 36 | typedef struct _PurpleNotifyUserInfo PurpleNotifyUserInfo; | |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
37 | |
| 9797 | 38 | #include "connection.h" |
| 39 | ||
| 5437 | 40 | /** |
|
12242
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12220
diff
changeset
|
41 | * Notification close callbacks. |
|
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12220
diff
changeset
|
42 | */ |
| 15884 | 43 | typedef void (*PurpleNotifyCloseCallback) (gpointer user_data); |
|
12242
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12220
diff
changeset
|
44 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
45 | |
|
12242
e7fc1748eb56
[gaim-migrate @ 14544]
Richard Laager <rlaager@pidgin.im>
parents:
12220
diff
changeset
|
46 | /** |
| 5437 | 47 | * Notification types. |
| 48 | */ | |
| 49 | typedef enum | |
| 50 | { | |
| 15884 | 51 | PURPLE_NOTIFY_MESSAGE = 0, /**< Message notification. */ |
| 52 | PURPLE_NOTIFY_EMAIL, /**< Single e-mail notification. */ | |
| 53 | PURPLE_NOTIFY_EMAILS, /**< Multiple e-mail notification. */ | |
| 54 | PURPLE_NOTIFY_FORMATTED, /**< Formatted text. */ | |
| 55 | PURPLE_NOTIFY_SEARCHRESULTS, /**< Buddy search results. */ | |
| 56 | PURPLE_NOTIFY_USERINFO, /**< Formatted userinfo text. */ | |
| 57 | PURPLE_NOTIFY_URI /**< URI notification or display. */ | |
| 5437 | 58 | |
| 15884 | 59 | } PurpleNotifyType; |
| 5437 | 60 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
61 | |
| 5437 | 62 | /** |
| 63 | * Notification message types. | |
| 64 | */ | |
| 65 | typedef enum | |
| 66 | { | |
| 15884 | 67 | PURPLE_NOTIFY_MSG_ERROR = 0, /**< Error notification. */ |
| 68 | PURPLE_NOTIFY_MSG_WARNING, /**< Warning notification. */ | |
| 69 | PURPLE_NOTIFY_MSG_INFO /**< Information notification. */ | |
| 5437 | 70 | |
| 15884 | 71 | } PurpleNotifyMsgType; |
| 5437 | 72 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
73 | |
| 5437 | 74 | /** |
| 11359 | 75 | * The types of buttons |
| 76 | */ | |
| 77 | typedef enum | |
| 78 | { | |
| 15884 | 79 | PURPLE_NOTIFY_BUTTON_LABELED = 0, /**< special use, see _button_add_labeled */ |
| 80 | PURPLE_NOTIFY_BUTTON_CONTINUE = 1, | |
| 81 | PURPLE_NOTIFY_BUTTON_ADD, | |
| 82 | PURPLE_NOTIFY_BUTTON_INFO, | |
| 83 | PURPLE_NOTIFY_BUTTON_IM, | |
| 84 | PURPLE_NOTIFY_BUTTON_JOIN, | |
| 85 | PURPLE_NOTIFY_BUTTON_INVITE | |
| 86 | } PurpleNotifySearchButtonType; | |
| 11359 | 87 | |
| 88 | ||
| 89 | /** | |
| 90 | * Search results object. | |
| 91 | */ | |
| 92 | typedef struct | |
| 93 | { | |
| 94 | GList *columns; /**< List of the search column objects. */ | |
| 95 | GList *rows; /**< List of rows in the result. */ | |
| 96 | GList *buttons; /**< List of buttons to display. */ | |
| 97 | ||
| 15884 | 98 | } PurpleNotifySearchResults; |
| 11359 | 99 | |
|
15211
bb75b7bc10a8
[gaim-migrate @ 17935]
Evan Schoenberg <evands@pidgin.im>
parents:
15205
diff
changeset
|
100 | /** |
| 15884 | 101 | * Types of PurpleNotifyUserInfoEntry objects |
|
15211
bb75b7bc10a8
[gaim-migrate @ 17935]
Evan Schoenberg <evands@pidgin.im>
parents:
15205
diff
changeset
|
102 | */ |
|
bb75b7bc10a8
[gaim-migrate @ 17935]
Evan Schoenberg <evands@pidgin.im>
parents:
15205
diff
changeset
|
103 | typedef enum |
|
bb75b7bc10a8
[gaim-migrate @ 17935]
Evan Schoenberg <evands@pidgin.im>
parents:
15205
diff
changeset
|
104 | { |
| 15884 | 105 | PURPLE_NOTIFY_USER_INFO_ENTRY_PAIR = 0, |
| 106 | PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_BREAK, | |
| 107 | PURPLE_NOTIFY_USER_INFO_ENTRY_SECTION_HEADER | |
| 108 | } PurpleNotifyUserInfoEntryType; | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
109 | |
| 11359 | 110 | /** |
| 111 | * Single column of a search result. | |
| 112 | */ | |
| 113 | typedef struct | |
| 114 | { | |
| 115 | char *title; /**< Title of the column. */ | |
| 116 | ||
| 15884 | 117 | } PurpleNotifySearchColumn; |
| 11359 | 118 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
119 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
120 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
121 | * Callback for a button in a search result. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
122 | * |
| 15884 | 123 | * @param c the PurpleConnection passed to purple_notify_searchresults |
| 13641 | 124 | * @param row the contents of the selected row |
| 125 | * @param user_data User defined data. | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
126 | */ |
| 15884 | 127 | typedef void (*PurpleNotifySearchResultsCallback)(PurpleConnection *c, GList *row, |
| 13641 | 128 | gpointer user_data); |
| 11359 | 129 | |
| 130 | ||
| 131 | /** | |
| 132 | * Definition of a button. | |
| 133 | */ | |
| 134 | typedef struct | |
| 135 | { | |
| 15884 | 136 | PurpleNotifySearchButtonType type; |
| 137 | PurpleNotifySearchResultsCallback callback; /**< Function to be called when clicked. */ | |
| 138 | char *label; /**< only for PURPLE_NOTIFY_BUTTON_LABELED */ | |
| 139 | } PurpleNotifySearchButton; | |
| 11359 | 140 | |
| 141 | ||
| 142 | /** | |
| 5437 | 143 | * Notification UI operations. |
| 144 | */ | |
| 145 | typedef struct | |
| 146 | { | |
| 15884 | 147 | void *(*notify_message)(PurpleNotifyMsgType type, const char *title, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
148 | const char *primary, const char *secondary); |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
149 | |
| 15884 | 150 | void *(*notify_email)(PurpleConnection *gc, |
|
12647
b00d9913117e
[gaim-migrate @ 14985]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12625
diff
changeset
|
151 | const char *subject, const char *from, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
152 | const char *to, const char *url); |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
153 | |
| 15884 | 154 | void *(*notify_emails)(PurpleConnection *gc, |
|
12647
b00d9913117e
[gaim-migrate @ 14985]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
12625
diff
changeset
|
155 | size_t count, gboolean detailed, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
156 | const char **subjects, const char **froms, |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
157 | const char **tos, const char **urls); |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
158 | |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
159 | void *(*notify_formatted)(const char *title, const char *primary, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
160 | const char *secondary, const char *text); |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
161 | |
| 15884 | 162 | void *(*notify_searchresults)(PurpleConnection *gc, const char *title, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
163 | const char *primary, const char *secondary, |
| 15884 | 164 | PurpleNotifySearchResults *results, gpointer user_data); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
165 | |
| 15884 | 166 | void (*notify_searchresults_new_rows)(PurpleConnection *gc, |
| 167 | PurpleNotifySearchResults *results, | |
| 13641 | 168 | void *data); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
169 | |
| 15884 | 170 | void *(*notify_userinfo)(PurpleConnection *gc, const char *who, |
| 171 | PurpleNotifyUserInfo *user_info); | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
172 | |
|
10240
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
173 | void *(*notify_uri)(const char *uri); |
| 5437 | 174 | |
| 15884 | 175 | void (*close_notify)(PurpleNotifyType type, void *ui_handle); |
| 5437 | 176 | |
|
16743
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15997
diff
changeset
|
177 | void (*_purple_reserved1)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15997
diff
changeset
|
178 | void (*_purple_reserved2)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15997
diff
changeset
|
179 | void (*_purple_reserved3)(void); |
|
1ce5ffe12e2a
Initial addition of padding for ui_ops and other class-like structs
Gary Kramlich <grim@reaperworld.com>
parents:
15997
diff
changeset
|
180 | void (*_purple_reserved4)(void); |
| 15884 | 181 | } PurpleNotifyUiOps; |
| 5437 | 182 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
183 | |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
184 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
185 | extern "C" { |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
186 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
187 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
188 | |
| 5437 | 189 | /**************************************************************************/ |
| 11359 | 190 | /** Search results notification API */ |
| 191 | /**************************************************************************/ | |
| 192 | /*@{*/ | |
| 193 | ||
| 194 | /** | |
| 195 | * Displays results from a buddy search. This can be, for example, | |
| 196 | * a window with a list of all found buddies, where you are given the | |
| 197 | * option of adding buddies to your buddy list. | |
| 198 | * | |
| 15884 | 199 | * @param gc The PurpleConnection handle associated with the information. |
| 11359 | 200 | * @param title The title of the message. If this is NULL, the title |
|
12259
23c20f8ffbef
[gaim-migrate @ 14561]
Richard Laager <rlaager@pidgin.im>
parents:
12257
diff
changeset
|
201 | * will be "Search Results." |
| 11359 | 202 | * @param primary The main point of the message. |
| 203 | * @param secondary The secondary information. | |
| 15884 | 204 | * @param results The PurpleNotifySearchResults instance. |
| 11359 | 205 | * @param cb The callback to call when the user closes |
| 206 | * the notification. | |
| 13641 | 207 | * @param user_data The data to pass to the close callback and any other |
| 208 | * callback associated with a button. | |
| 11359 | 209 | * |
| 210 | * @return A UI-specific handle. | |
| 211 | */ | |
| 15884 | 212 | void *purple_notify_searchresults(PurpleConnection *gc, const char *title, |
| 11359 | 213 | const char *primary, const char *secondary, |
| 15884 | 214 | PurpleNotifySearchResults *results, PurpleNotifyCloseCallback cb, |
| 12220 | 215 | gpointer user_data); |
| 11359 | 216 | |
|
19868
af326d8f70b1
This function wasn't documented in the Doxygen stuff. If I've documented
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
217 | /** |
|
af326d8f70b1
This function wasn't documented in the Doxygen stuff. If I've documented
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
218 | * Frees a PurpleNotifySearchResults object. |
|
af326d8f70b1
This function wasn't documented in the Doxygen stuff. If I've documented
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
219 | * |
|
af326d8f70b1
This function wasn't documented in the Doxygen stuff. If I've documented
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
220 | * @param results The PurpleNotifySearchResults to free. |
|
af326d8f70b1
This function wasn't documented in the Doxygen stuff. If I've documented
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
221 | */ |
| 15884 | 222 | void purple_notify_searchresults_free(PurpleNotifySearchResults *results); |
| 11359 | 223 | |
| 224 | /** | |
| 225 | * Replace old rows with the new. Reuse an existing window. | |
| 226 | * | |
| 15884 | 227 | * @param gc The PurpleConnection structure. |
| 228 | * @param results The PurpleNotifySearchResults structure. | |
| 229 | * @param data Data returned by the purple_notify_searchresults(). | |
| 11359 | 230 | */ |
| 15884 | 231 | void purple_notify_searchresults_new_rows(PurpleConnection *gc, |
| 232 | PurpleNotifySearchResults *results, | |
| 13641 | 233 | void *data); |
| 11359 | 234 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
235 | |
| 11359 | 236 | /** |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
237 | * Adds a stock button that will be displayed in the search results dialog. |
| 11359 | 238 | * |
| 239 | * @param results The search results object. | |
| 240 | * @param type Type of the button. (TODO: Only one button of a given type can be displayed.) | |
| 241 | * @param cb Function that will be called on the click event. | |
| 242 | */ | |
| 15884 | 243 | void purple_notify_searchresults_button_add(PurpleNotifySearchResults *results, |
| 244 | PurpleNotifySearchButtonType type, | |
| 245 | PurpleNotifySearchResultsCallback cb); | |
| 11359 | 246 | |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
247 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
248 | /** |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
249 | * Adds a plain labelled button that will be displayed in the search results dialog. |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
250 | * |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
251 | * @param results The search results object |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
252 | * @param label The label to display |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
253 | * @param cb Function that will be called on the click event |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
254 | */ |
| 15884 | 255 | void purple_notify_searchresults_button_add_labeled(PurpleNotifySearchResults *results, |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
256 | const char *label, |
| 15884 | 257 | PurpleNotifySearchResultsCallback cb); |
|
12624
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
258 | |
|
c1c92f08976b
[gaim-migrate @ 14960]
Christopher O'Brien <siege@pidgin.im>
parents:
12323
diff
changeset
|
259 | |
| 11359 | 260 | /** |
| 261 | * Returns a newly created search results object. | |
| 262 | * | |
| 263 | * @return The new search results object. | |
| 264 | */ | |
| 15884 | 265 | PurpleNotifySearchResults *purple_notify_searchresults_new(void); |
| 11359 | 266 | |
| 267 | /** | |
| 268 | * Returns a newly created search result column object. | |
| 269 | * | |
| 270 | * @param title Title of the column. NOTE: Title will get g_strdup()ed. | |
| 271 | * | |
| 272 | * @return The new search column object. | |
| 273 | */ | |
| 15884 | 274 | PurpleNotifySearchColumn *purple_notify_searchresults_column_new(const char *title); |
| 11359 | 275 | |
| 276 | /** | |
| 277 | * Adds a new column to the search result object. | |
| 278 | * | |
| 279 | * @param results The result object to which the column will be added. | |
|
11501
a8fc92026134
[gaim-migrate @ 13746]
Richard Laager <rlaager@pidgin.im>
parents:
11359
diff
changeset
|
280 | * @param column The column that will be added to the result object. |
| 11359 | 281 | */ |
| 15884 | 282 | void purple_notify_searchresults_column_add(PurpleNotifySearchResults *results, |
| 283 | PurpleNotifySearchColumn *column); | |
| 11359 | 284 | |
| 285 | /** | |
| 286 | * Adds a new row of the results to the search results object. | |
| 287 | * | |
| 288 | * @param results The search results object. | |
| 289 | * @param row The row of the results. | |
| 290 | */ | |
| 15884 | 291 | void purple_notify_searchresults_row_add(PurpleNotifySearchResults *results, |
| 11359 | 292 | GList *row); |
| 293 | ||
| 294 | /** | |
| 295 | * Returns a number of the rows in the search results object. | |
| 296 | * | |
| 297 | * @param results The search results object. | |
| 298 | * | |
| 12257 | 299 | * @return Number of the result rows. |
| 11359 | 300 | */ |
| 15884 | 301 | guint purple_notify_searchresults_get_rows_count(PurpleNotifySearchResults *results); |
| 11359 | 302 | |
| 303 | /** | |
| 304 | * Returns a number of the columns in the search results object. | |
| 305 | * | |
| 306 | * @param results The search results object. | |
| 307 | * | |
| 12257 | 308 | * @return Number of the columns. |
| 11359 | 309 | */ |
| 15884 | 310 | guint purple_notify_searchresults_get_columns_count(PurpleNotifySearchResults *results); |
| 11359 | 311 | |
| 312 | /** | |
| 313 | * Returns a row of the results from the search results object. | |
| 314 | * | |
| 315 | * @param results The search results object. | |
| 316 | * @param row_id Index of the row to be returned. | |
| 317 | * | |
| 318 | * @return Row of the results. | |
| 319 | */ | |
| 15884 | 320 | GList *purple_notify_searchresults_row_get(PurpleNotifySearchResults *results, |
| 11359 | 321 | unsigned int row_id); |
| 322 | ||
| 323 | /** | |
| 324 | * Returns a title of the search results object's column. | |
| 325 | * | |
| 326 | * @param results The search results object. | |
| 327 | * @param column_id Index of the column. | |
| 328 | * | |
| 329 | * @return Title of the column. | |
| 330 | */ | |
| 15884 | 331 | char *purple_notify_searchresults_column_get_title(PurpleNotifySearchResults *results, |
| 11359 | 332 | unsigned int column_id); |
| 333 | ||
| 334 | /*@}*/ | |
| 335 | ||
| 336 | /**************************************************************************/ | |
| 5437 | 337 | /** @name Notification API */ |
| 338 | /**************************************************************************/ | |
| 339 | /*@{*/ | |
| 340 | ||
| 341 | /** | |
| 342 | * Displays a notification message to the user. | |
| 343 | * | |
| 344 | * @param handle The plugin or connection handle. | |
| 345 | * @param type The notification type. | |
| 346 | * @param title The title of the message. | |
| 347 | * @param primary The main point of the message. | |
| 348 | * @param secondary The secondary information. | |
| 349 | * @param cb The callback to call when the user closes | |
| 350 | * the notification. | |
| 351 | * @param user_data The data to pass to the callback. | |
| 352 | * | |
| 353 | * @return A UI-specific handle. | |
| 354 | */ | |
| 15884 | 355 | void *purple_notify_message(void *handle, PurpleNotifyMsgType type, |
| 5437 | 356 | const char *title, const char *primary, |
| 15884 | 357 | const char *secondary, PurpleNotifyCloseCallback cb, |
| 12220 | 358 | gpointer user_data); |
| 5437 | 359 | |
| 360 | /** | |
| 361 | * Displays a single e-mail notification to the user. | |
| 362 | * | |
| 363 | * @param handle The plugin or connection handle. | |
| 364 | * @param subject The subject of the e-mail. | |
| 365 | * @param from The from address. | |
| 366 | * @param to The destination address. | |
| 367 | * @param url The URL where the message can be read. | |
| 368 | * @param cb The callback to call when the user closes | |
| 369 | * the notification. | |
| 370 | * @param user_data The data to pass to the callback. | |
| 371 | * | |
| 372 | * @return A UI-specific handle. | |
| 373 | */ | |
| 15884 | 374 | void *purple_notify_email(void *handle, const char *subject, |
| 5437 | 375 | const char *from, const char *to, |
| 15884 | 376 | const char *url, PurpleNotifyCloseCallback cb, |
| 12220 | 377 | gpointer user_data); |
| 5437 | 378 | |
| 379 | /** | |
| 380 | * Displays a notification for multiple e-mails to the user. | |
| 381 | * | |
| 382 | * @param handle The plugin or connection handle. | |
| 383 | * @param count The number of e-mails. | |
|
5522
faa69c8f503d
[gaim-migrate @ 5922]
Christian Hammond <chipx86@chipx86.com>
parents:
5497
diff
changeset
|
384 | * @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
|
385 | * arrays. |
| 5437 | 386 | * @param subjects The array of subjects. |
| 387 | * @param froms The array of from addresses. | |
| 388 | * @param tos The array of destination addresses. | |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
389 | * @param urls The URLs where the messages can be read. |
| 5437 | 390 | * @param cb The callback to call when the user closes |
| 391 | * the notification. | |
| 392 | * @param user_data The data to pass to the callback. | |
| 393 | * | |
| 394 | * @return A UI-specific handle. | |
| 395 | */ | |
| 15884 | 396 | void *purple_notify_emails(void *handle, size_t count, gboolean detailed, |
| 5437 | 397 | const char **subjects, const char **froms, |
| 398 | const char **tos, const char **urls, | |
| 15884 | 399 | PurpleNotifyCloseCallback cb, gpointer user_data); |
| 5437 | 400 | |
| 401 | /** | |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
402 | * Displays a notification with formatted text. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
403 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
404 | * 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
|
405 | * IMs may send. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
406 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
407 | * @param handle The plugin or connection handle. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
408 | * @param title The title of the message. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
409 | * @param primary The main point of the message. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
410 | * @param secondary The secondary information. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
411 | * @param text The formatted text. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
412 | * @param cb The callback to call when the user closes |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
413 | * the notification. |
|
6720
cdc5348dd848
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6467
diff
changeset
|
414 | * @param user_data The data to pass to the callback. |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
415 | * |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
416 | * @return A UI-specific handle. |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
417 | */ |
| 15884 | 418 | void *purple_notify_formatted(void *handle, const char *title, |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
419 | const char *primary, const char *secondary, |
| 15884 | 420 | const char *text, PurpleNotifyCloseCallback cb, gpointer user_data); |
|
6381
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
421 | |
|
53203c44c731
[gaim-migrate @ 6886]
Christian Hammond <chipx86@chipx86.com>
parents:
6356
diff
changeset
|
422 | /** |
|
9800
1115830011b8
[gaim-migrate @ 10668]
Mark Doliner <markdoliner@pidgin.im>
parents:
9797
diff
changeset
|
423 | * Displays user information with formatted text, passing information giving |
|
1115830011b8
[gaim-migrate @ 10668]
Mark Doliner <markdoliner@pidgin.im>
parents:
9797
diff
changeset
|
424 | * the connection and username from which the user information came. |
| 9797 | 425 | * |
| 426 | * The text is essentially a stripped-down format of HTML, the same that | |
| 427 | * IMs may send. | |
| 428 | * | |
| 15884 | 429 | * @param gc The PurpleConnection handle associated with the information. |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
430 | * @param who The username associated with the information. |
| 15884 | 431 | * @param user_info The PurpleNotifyUserInfo which contains the information |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
432 | * @param cb The callback to call when the user closes |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
433 | * the notification. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
434 | * @param user_data The data to pass to the callback. |
| 9797 | 435 | * |
| 436 | * @return A UI-specific handle. | |
| 437 | */ | |
| 15884 | 438 | void *purple_notify_userinfo(PurpleConnection *gc, const char *who, |
| 439 | PurpleNotifyUserInfo *user_info, PurpleNotifyCloseCallback cb, | |
| 12220 | 440 | gpointer user_data); |
| 9797 | 441 | |
| 442 | /** | |
| 15884 | 443 | * Create a new PurpleNotifyUserInfo which is suitable for passing to purple_notify_userinfo() |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
444 | * |
| 15884 | 445 | * @return A new PurpleNotifyUserInfo, which the caller must destroy when done |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
446 | */ |
| 15884 | 447 | PurpleNotifyUserInfo *purple_notify_user_info_new(void); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
448 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
449 | /** |
| 15884 | 450 | * Destroy a PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
451 | * |
| 15884 | 452 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
453 | */ |
| 15884 | 454 | void purple_notify_user_info_destroy(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
455 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
456 | /** |
| 15884 | 457 | * Retrieve the array of PurpleNotifyUserInfoEntry objects from a PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
458 | * |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
459 | * This GList may be manipulated directly with normal GList functions such as g_list_insert(). Only |
| 15884 | 460 | * PurpleNotifyUserInfoEntry are allowed in the list. If a PurpleNotifyUserInfoEntry item is added to the list, |
| 461 | * it should not be g_free()'d by the caller; PurpleNotifyUserInfo will g_free it when destroyed. | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
462 | * |
| 15884 | 463 | * To remove a PurpleNotifyUserInfoEntry, use purple_notify_user_info_remove_entry(). Do not use the GList directly. |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
464 | * |
| 15884 | 465 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
466 | * |
|
18190
bcf28ef7e8ff
Re-fix the DBus list handling code by killing const GList* / const GSList*
Richard Laager <rlaager@pidgin.im>
parents:
18122
diff
changeset
|
467 | * @constreturn A GList of PurpleNotifyUserInfoEntry objects |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
468 | */ |
|
18122
9bf9970c1b6a
disapproval of revision '2d8ea56b90971e7851442d96b7d74ecb4f052126'
Richard Laager <rlaager@pidgin.im>
parents:
18121
diff
changeset
|
469 | GList *purple_notify_user_info_get_entries(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
470 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
471 | /** |
| 15884 | 472 | * Create a textual representation of a PurpleNotifyUserInfo, separating entries with newline |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
473 | * |
| 15884 | 474 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
475 | * @param newline The separation character |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
476 | */ |
| 15884 | 477 | char *purple_notify_user_info_get_text_with_newline(PurpleNotifyUserInfo *user_info, const char *newline); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
478 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
479 | /** |
| 15884 | 480 | * Add a label/value pair to a PurpleNotifyUserInfo object. |
| 481 | * PurpleNotifyUserInfo keeps track of the order in which pairs are added. | |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
482 | * |
| 15884 | 483 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
484 | * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
485 | * If NULL, value will be displayed without a label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
486 | * @param value The value, which might be displayed by a UI after the label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
487 | * If NULL, label will still be displayed; the UI should then treat label as independent |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
488 | * and not include a colon if it would otherwise. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
489 | */ |
| 15884 | 490 | void purple_notify_user_info_add_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
491 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
492 | /** |
| 15884 | 493 | * Prepend a label/value pair to a PurpleNotifyUserInfo object |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
494 | * |
| 15884 | 495 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
496 | * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
497 | * If NULL, value will be displayed without a label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
498 | * @param value The value, which might be displayed by a UI after the label. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
499 | * If NULL, label will still be displayed; the UI should then treat label as independent |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
500 | * and not include a colon if it would otherwise. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
501 | */ |
| 15884 | 502 | void purple_notify_user_info_prepend_pair(PurpleNotifyUserInfo *user_info, const char *label, const char *value); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
503 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
504 | /** |
| 15884 | 505 | * Remove a PurpleNotifyUserInfoEntry from a PurpleNotifyUserInfo object |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
506 | * |
| 15884 | 507 | * @param user_info The PurpleNotifyUserInfo |
| 508 | * @param user_info_entry The PurpleNotifyUserInfoEntry | |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
509 | */ |
| 15884 | 510 | void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry); |
|
15328
113b0b520010
[gaim-migrate @ 18056]
Evan Schoenberg <evands@pidgin.im>
parents:
15325
diff
changeset
|
511 | /** |
| 15884 | 512 | * Create a new PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
513 | * |
| 15884 | 514 | * If added to a PurpleNotifyUserInfo object, this should not be free()'d, as PurpleNotifyUserInfo will do so |
| 515 | * when destroyed. purple_notify_user_info_add_pair() and purple_notify_user_info_prepend_pair() are convenience | |
| 516 | * methods for creating entries and adding them to a PurpleNotifyUserInfo. | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
517 | * |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
518 | * @param label A label, which for example might be displayed by a UI with a colon after it ("Status:"). Do not include a colon. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
519 | * If NULL, value will be displayed without a label. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
520 | * @param value The value, which might be displayed by a UI after the label. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
521 | * If NULL, label will still be displayed; the UI should then treat label as independent |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
522 | * and not include a colon if it would otherwise. |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
523 | * |
| 15884 | 524 | * @result A new PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
525 | */ |
| 15884 | 526 | PurpleNotifyUserInfoEntry *purple_notify_user_info_entry_new(const char *label, const char *value); |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
527 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
528 | /** |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
529 | * Add a section break. A UI might display this as a horizontal line. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
530 | * |
| 15884 | 531 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
532 | */ |
| 15884 | 533 | void purple_notify_user_info_add_section_break(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
534 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
535 | /** |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
536 | * Add a section header. A UI might display this in a different font from other text. |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
537 | * |
| 15884 | 538 | * @param user_info The PurpleNotifyUserInfo |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
539 | * @param label The name of the section |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
540 | */ |
| 15884 | 541 | void purple_notify_user_info_add_section_header(PurpleNotifyUserInfo *user_info, const char *label); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
542 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
543 | /** |
| 15884 | 544 | * Remove the last item which was added to a PurpleNotifyUserInfo. This could be used to remove a section header which is not needed. |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
545 | */ |
| 15884 | 546 | void purple_notify_user_info_remove_last_item(PurpleNotifyUserInfo *user_info); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
547 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
548 | /** |
| 15884 | 549 | * Get the label for a PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
550 | * |
| 15884 | 551 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
552 | * |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
553 | * @result The label |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
554 | */ |
| 15884 | 555 | gchar *purple_notify_user_info_entry_get_label(PurpleNotifyUserInfoEntry *user_info_entry); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
556 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
557 | /** |
| 15884 | 558 | * Set the label for a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
559 | * |
| 15884 | 560 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
561 | * @param label The label |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
562 | */ |
| 15884 | 563 | void purple_notify_user_info_entry_set_label(PurpleNotifyUserInfoEntry *user_info_entry, const char *label); |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
564 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
565 | /** |
| 15884 | 566 | * Get the value for a PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
567 | * |
| 15884 | 568 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
569 | * |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
570 | * @result The value |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
571 | */ |
| 15884 | 572 | gchar *purple_notify_user_info_entry_get_value(PurpleNotifyUserInfoEntry *user_info_entry); |
|
15205
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
573 | |
|
f642029b2f97
[gaim-migrate @ 17929]
Evan Schoenberg <evands@pidgin.im>
parents:
14254
diff
changeset
|
574 | /** |
| 15884 | 575 | * Set the value for a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
576 | * |
| 15884 | 577 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
578 | * @param value The value |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
579 | */ |
| 15884 | 580 | void purple_notify_user_info_entry_set_value(PurpleNotifyUserInfoEntry *user_info_entry, const char *value); |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
581 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
582 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
583 | /** |
| 15884 | 584 | * Get the type of a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
585 | * |
| 15884 | 586 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
587 | * |
| 15884 | 588 | * @result The PurpleNotifyUserInfoEntryType |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
589 | */ |
| 15884 | 590 | PurpleNotifyUserInfoEntryType purple_notify_user_info_entry_get_type(PurpleNotifyUserInfoEntry *user_info_entry); |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
591 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
592 | /** |
| 15884 | 593 | * Set the type of a PurpleNotifyUserInfoEntry |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
594 | * |
| 15884 | 595 | * @param user_info_entry The PurpleNotifyUserInfoEntry |
|
15997
ff97c5f69196
A little doxygen love and some tiny gaim->purpleisms
Mark Doliner <markdoliner@pidgin.im>
parents:
15884
diff
changeset
|
596 | * @param type The PurpleNotifyUserInfoEntryType |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
597 | */ |
| 15884 | 598 | void purple_notify_user_info_entry_set_type(PurpleNotifyUserInfoEntry *user_info_entry, |
| 599 | PurpleNotifyUserInfoEntryType type); | |
|
15325
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
600 | |
|
d1dcb41d845b
[gaim-migrate @ 18053]
Evan Schoenberg <evands@pidgin.im>
parents:
15215
diff
changeset
|
601 | /** |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
602 | * Opens a URI or somehow presents it to the user. |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
603 | * |
|
10240
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
604 | * @param handle The plugin or connection handle. |
|
09342bc554d9
[gaim-migrate @ 11377]
Herman Bloggs <herman@bluedigits.com>
parents:
10209
diff
changeset
|
605 | * @param uri The URI to display or go to. |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
606 | * |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
607 | * @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
|
608 | * 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
|
609 | * similar. |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
610 | */ |
| 15884 | 611 | void *purple_notify_uri(void *handle, const char *uri); |
|
6465
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
612 | |
|
bd201d637ff4
[gaim-migrate @ 6974]
Christian Hammond <chipx86@chipx86.com>
parents:
6381
diff
changeset
|
613 | /** |
| 5437 | 614 | * Closes a notification. |
| 615 | * | |
| 616 | * This should be used only by the UI operation functions and part of the | |
| 617 | * core. | |
| 618 | * | |
|
5476
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
619 | * @param type The notification type. |
|
6f863ea68018
[gaim-migrate @ 5872]
Christian Hammond <chipx86@chipx86.com>
parents:
5437
diff
changeset
|
620 | * @param ui_handle The notification UI handle. |
| 5437 | 621 | */ |
| 15884 | 622 | void purple_notify_close(PurpleNotifyType type, void *ui_handle); |
| 5437 | 623 | |
| 624 | /** | |
| 625 | * Closes all notifications registered with the specified handle. | |
| 626 | * | |
| 627 | * @param handle The handle. | |
| 628 | */ | |
| 15884 | 629 | void purple_notify_close_with_handle(void *handle); |
| 5437 | 630 | |
| 631 | /** | |
| 15884 | 632 | * A wrapper for purple_notify_message that displays an information message. |
| 5437 | 633 | */ |
| 15884 | 634 | #define purple_notify_info(handle, title, primary, secondary) \ |
| 635 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_INFO, (title), \ | |
| 5437 | 636 | (primary), (secondary), NULL, NULL) |
| 637 | ||
| 638 | /** | |
| 15884 | 639 | * A wrapper for purple_notify_message that displays a warning message. |
| 5437 | 640 | */ |
| 15884 | 641 | #define purple_notify_warning(handle, title, primary, secondary) \ |
| 642 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_WARNING, (title), \ | |
| 5437 | 643 | (primary), (secondary), NULL, NULL) |
| 644 | ||
| 645 | /** | |
| 15884 | 646 | * A wrapper for purple_notify_message that displays an error message. |
| 5437 | 647 | */ |
| 15884 | 648 | #define purple_notify_error(handle, title, primary, secondary) \ |
| 649 | purple_notify_message((handle), PURPLE_NOTIFY_MSG_ERROR, (title), \ | |
| 5437 | 650 | (primary), (secondary), NULL, NULL) |
| 651 | ||
| 652 | /*@}*/ | |
| 653 | ||
| 654 | /**************************************************************************/ | |
| 10566 | 655 | /** @name UI Registration Functions */ |
| 5437 | 656 | /**************************************************************************/ |
| 657 | /*@{*/ | |
| 658 | ||
| 659 | /** | |
| 660 | * Sets the UI operations structure to be used when displaying a | |
| 661 | * notification. | |
| 662 | * | |
| 663 | * @param ops The UI operations structure. | |
| 664 | */ | |
| 15884 | 665 | void purple_notify_set_ui_ops(PurpleNotifyUiOps *ops); |
| 5437 | 666 | |
| 667 | /** | |
| 668 | * Returns the UI operations structure to be used when displaying a | |
| 669 | * notification. | |
| 670 | * | |
|
6467
754d318cac4a
[gaim-migrate @ 6976]
Christian Hammond <chipx86@chipx86.com>
parents:
6465
diff
changeset
|
671 | * @return The UI operations structure. |
| 5437 | 672 | */ |
| 15884 | 673 | PurpleNotifyUiOps *purple_notify_get_ui_ops(void); |
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
674 | |
|
5497
da3c08f3af25
[gaim-migrate @ 5893]
Mark Doliner <markdoliner@pidgin.im>
parents:
5476
diff
changeset
|
675 | /*@}*/ |
| 5437 | 676 | |
| 12129 | 677 | /**************************************************************************/ |
| 678 | /** @name Notify Subsystem */ | |
| 679 | /**************************************************************************/ | |
| 680 | /*@{*/ | |
| 681 | ||
| 682 | /** | |
| 683 | * Returns the notify subsystem handle. | |
| 684 | * | |
| 685 | * @return The notify subsystem handle. | |
| 686 | */ | |
| 15884 | 687 | void *purple_notify_get_handle(void); |
| 12129 | 688 | |
| 689 | /** | |
| 690 | * Initializes the notify subsystem. | |
| 691 | */ | |
| 15884 | 692 | void purple_notify_init(void); |
| 12129 | 693 | |
| 694 | /** | |
| 695 | * Uninitializes the notify subsystem. | |
| 696 | */ | |
| 15884 | 697 | void purple_notify_uninit(void); |
| 12129 | 698 | |
| 699 | /*@}*/ | |
| 700 | ||
| 701 | ||
|
5944
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
702 | #ifdef __cplusplus |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
703 | } |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
704 | #endif |
|
f19df037ac58
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5522
diff
changeset
|
705 | |
| 15884 | 706 | #endif /* _PURPLE_NOTIFY_H_ */ |