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