Mercurial > pidgin
annotate src/request.h @ 8015:5f86d21b6232
[gaim-migrate @ 8695]
chat aliases in tabs/titles (like the add/remove button, these don't update when they should)
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Mon, 05 Jan 2004 22:09:29 +0000 |
parents | a5c70e43ee43 |
children | fa6395637e2c |
rev | line source |
---|---|
5477 | 1 /** |
2 * @file request.h Request API | |
3 * @ingroup core | |
4 * | |
5 * gaim | |
6 * | |
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org> | |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
8 * |
5477 | 9 * This program is free software; you can redistribute it and/or modify |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
23 #ifndef _GAIM_REQUEST_H_ | |
24 #define _GAIM_REQUEST_H_ | |
25 | |
26 #include <stdlib.h> | |
27 #include <glib-object.h> | |
28 #include <glib.h> | |
29 | |
30 /** | |
31 * Request types. | |
32 */ | |
33 typedef enum | |
34 { | |
35 GAIM_REQUEST_INPUT = 0, /**< Text input request. */ | |
36 GAIM_REQUEST_CHOICE, /**< Multiple-choice request. */ | |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
37 GAIM_REQUEST_ACTION, /**< Action request. */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
38 GAIM_REQUEST_FIELDS /**< Multiple fields request. */ |
5477 | 39 |
40 } GaimRequestType; | |
41 | |
42 /** | |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
43 * A type of field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
44 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
45 typedef enum |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
46 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
47 GAIM_REQUEST_FIELD_NONE, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
48 GAIM_REQUEST_FIELD_STRING, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
49 GAIM_REQUEST_FIELD_INTEGER, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
50 GAIM_REQUEST_FIELD_BOOLEAN, |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
51 GAIM_REQUEST_FIELD_CHOICE, |
7905
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
52 GAIM_REQUEST_FIELD_LIST, |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
53 GAIM_REQUEST_FIELD_LABEL |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
54 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
55 } GaimRequestFieldType; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
56 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
57 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
58 * A request field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
59 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
60 typedef struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
61 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
62 GaimRequestFieldType type; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
63 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
64 char *id; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
65 char *label; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
66 |
7904
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
67 gboolean visible; |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
68 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
69 union |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
70 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
71 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
72 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
73 gboolean multiline; |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
74 gboolean masked; |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
75 gboolean editable; |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
76 char *default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
77 char *value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
78 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
79 } string; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
80 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
81 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
82 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
83 int default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
84 int value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
85 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
86 } integer; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
87 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
88 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
89 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
90 gboolean default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
91 gboolean value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
92 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
93 } boolean; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
94 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
95 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
96 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
97 int default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
98 int value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
99 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
100 GList *labels; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
101 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
102 } choice; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
103 |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
104 struct |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
105 { |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
106 GList *items; |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
107 GHashTable *item_data; |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
108 GList *selected; |
7964
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
109 GHashTable *selected_table; |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
110 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
111 gboolean multiple_selection; |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
112 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
113 } list; |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
114 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
115 } u; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
116 |
5809
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
117 void *ui_data; |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
118 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
119 } GaimRequestField; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
120 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
121 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
122 * Multiple fields request data. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
123 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
124 typedef struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
125 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
126 GList *groups; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
127 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
128 GHashTable *fields; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
129 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
130 } GaimRequestFields; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
131 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
132 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
133 * A group of fields with a title. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
134 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
135 typedef struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
136 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
137 GaimRequestFields *fields_list; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
138 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
139 char *title; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
140 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
141 GList *fields; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
142 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
143 } GaimRequestFieldGroup; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
144 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
145 /** |
5477 | 146 * Request UI operations. |
147 */ | |
148 typedef struct | |
149 { | |
150 void *(*request_input)(const char *title, const char *primary, | |
151 const char *secondary, const char *default_value, | |
6035
8c44020a958e
[gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
152 gboolean multiline, gboolean masked, |
5477 | 153 const char *ok_text, GCallback ok_cb, |
154 const char *cancel_text, GCallback cancel_cb, | |
155 void *user_data); | |
156 void *(*request_choice)(const char *title, const char *primary, | |
157 const char *secondary, unsigned int default_value, | |
158 const char *ok_text, GCallback ok_cb, | |
159 const char *cancel_text, GCallback cancel_cb, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
160 void *user_data, size_t choice_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
161 va_list choices); |
5477 | 162 void *(*request_action)(const char *title, const char *primary, |
163 const char *secondary, unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
164 void *user_data, size_t action_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
165 va_list actions); |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
166 void *(*request_fields)(const char *title, const char *primary, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
167 const char *secondary, GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
168 const char *ok_text, GCallback ok_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
169 const char *cancel_text, GCallback cancel_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
170 void *user_data); |
5477 | 171 |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
172 void (*close_request)(GaimRequestType type, void *ui_handle); |
5477 | 173 |
174 } GaimRequestUiOps; | |
175 | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
176 typedef void (*GaimRequestInputCb)(void *, const char *); |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
177 typedef void (*GaimRequestActionCb)(void *, int); |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
178 typedef void (*GaimRequestFieldsCb)(void *, GaimRequestFields *fields); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
179 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
180 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
181 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
182 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
183 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
184 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
185 /** @name Field List API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
186 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
187 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
188 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
189 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
190 * Creates a list of fields to pass to gaim_request_fields(). |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
191 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
192 * @return A GaimRequestFields structure. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
193 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
194 GaimRequestFields *gaim_request_fields_new(void); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
195 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
196 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
197 * Destroys a list of fields. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
198 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
199 * @param fields The list of fields to destroy. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
200 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
201 void gaim_request_fields_destroy(GaimRequestFields *fields); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
202 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
203 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
204 * Adds a group of fields to the list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
205 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
206 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
207 * @param group The group to add. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
208 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
209 void gaim_request_fields_add_group(GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
210 GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
211 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
212 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
213 * Returns a list of all groups in a field list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
214 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
215 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
216 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
217 * @return A list of groups. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
218 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
219 GList *gaim_request_fields_get_groups(const GaimRequestFields *fields); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
220 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
221 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
222 * Return the field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
223 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
224 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
225 * @param id The ID of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
226 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
227 * @return The field, if found. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
228 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
229 GaimRequestField *gaim_request_fields_get_field( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
230 const GaimRequestFields *fields, const char *id); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
231 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
232 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
233 * Returns the string value of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
234 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
235 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
236 * @param id The ID of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
237 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
238 * @return The string value, if found, or @c NULL otherwise. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
239 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
240 const char *gaim_request_fields_get_string(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
241 const char *id); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
242 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
243 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
244 * Returns the integer value of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
245 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
246 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
247 * @param id The ID of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
248 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
249 * @return The integer value, if found, or 0 otherwise. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
250 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
251 int gaim_request_fields_get_integer(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
252 const char *id); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
253 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
254 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
255 * Returns the boolean value of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
256 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
257 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
258 * @param id The ID of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
259 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
260 * @return The boolean value, if found, or @c FALSE otherwise. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
261 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
262 gboolean gaim_request_fields_get_bool(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
263 const char *id); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
264 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
265 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
266 * Returns the choice index of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
267 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
268 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
269 * @param id The ID of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
270 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
271 * @return The choice index, if found, or -1 otherwise. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
272 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
273 int gaim_request_fields_get_choice(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
274 const char *id); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
275 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
276 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
277 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
278 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
279 /** @name Fields Group API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
280 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
281 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
282 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
283 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
284 * Creates a fields group with an optional title. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
285 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
286 * @param title The optional title to give the group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
287 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
288 * @return A new fields group |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
289 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
290 GaimRequestFieldGroup *gaim_request_field_group_new(const char *title); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
291 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
292 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
293 * Destroys a fields group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
294 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
295 * @param group The group to destroy. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
296 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
297 void gaim_request_field_group_destroy(GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
298 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
299 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
300 * Adds a field to the group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
301 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
302 * @param group The group to add the field to. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
303 * @param field The field to add to the group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
304 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
305 void gaim_request_field_group_add_field(GaimRequestFieldGroup *group, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
306 GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
307 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
308 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
309 * Returns the title of a fields group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
310 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
311 * @param group The group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
312 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
313 * @return The title, if set. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
314 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
315 const char *gaim_request_field_group_get_title( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
316 const GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
317 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
318 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
319 * Returns a list of all fields in a group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
320 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
321 * @param group The group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
322 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
323 * @return The list of fields in the group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
324 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
325 GList *gaim_request_field_group_get_fields( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
326 const GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
327 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
328 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
329 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
330 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
331 /** @name Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
332 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
333 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
334 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
335 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
336 * Creates a field of the specified type. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
337 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
338 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
339 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
340 * @param type The type of field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
341 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
342 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
343 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
344 GaimRequestField *gaim_request_field_new(const char *id, const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
345 GaimRequestFieldType type); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
346 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
347 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
348 * Destroys a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
349 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
350 * @param field The field to destroy. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
351 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
352 void gaim_request_field_destroy(GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
353 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
354 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
355 * Sets the label text of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
356 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
357 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
358 * @param label The text label. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
359 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
360 void gaim_request_field_set_label(GaimRequestField *field, const char *label); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
361 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
362 /** |
7904
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
363 * Sets whether or not a field is visible. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
364 * |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
365 * @param field The field. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
366 * @param visible TRUE if visible, or FALSE if not. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
367 */ |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
368 void gaim_request_field_set_visible(GaimRequestField *field, gboolean visible); |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
369 |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
370 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
371 * Returns the type of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
372 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
373 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
374 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
375 * @return The field's type. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
376 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
377 GaimRequestFieldType gaim_request_field_get_type(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
378 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
379 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
380 * Returns the ID of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
381 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
382 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
383 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
384 * @return The ID |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
385 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
386 const char *gaim_request_field_get_id(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
387 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
388 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
389 * Returns the label text of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
390 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
391 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
392 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
393 * @return The label text. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
394 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
395 const char *gaim_request_field_get_label(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
396 |
7904
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
397 /** |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
398 * Returns whether or not a field is visible. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
399 * |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
400 * @param field The field. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
401 * |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
402 * @return TRUE if the field is visible. FALSE otherwise. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
403 */ |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
404 gboolean gaim_request_field_is_visible(const GaimRequestField *field); |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
405 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
406 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
407 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
408 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
409 /** @name String Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
410 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
411 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
412 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
413 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
414 * Creates a string request field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
415 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
416 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
417 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
418 * @param default_value The optional default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
419 * @param multiline Whether or not this should be a multiline string. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
420 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
421 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
422 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
423 GaimRequestField *gaim_request_field_string_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
424 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
425 const char *default_value, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
426 gboolean multiline); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
427 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
428 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
429 * Sets the default value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
430 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
431 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
432 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
433 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
434 void gaim_request_field_string_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
435 const char *default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
436 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
437 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
438 * Sets the value in a string field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
439 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
440 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
441 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
442 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
443 void gaim_request_field_string_set_value(GaimRequestField *field, |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
444 const char *value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
445 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
446 /** |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
447 * Sets whether or not a string field is masked |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
448 * (commonly used for password fields). |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
449 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
450 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
451 * @param masked The masked value. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
452 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
453 void gaim_request_field_string_set_masked(GaimRequestField *field, |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
454 gboolean masked); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
455 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
456 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
457 * Sets whether or not a string field is editable. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
458 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
459 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
460 * @param editable The editable value. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
461 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
462 void gaim_request_field_string_set_editable(GaimRequestField *field, |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
463 gboolean editable); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
464 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
465 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
466 * Returns the default value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
467 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
468 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
469 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
470 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
471 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
472 const char *gaim_request_field_string_get_default_value( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
473 const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
474 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
475 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
476 * Returns the user-entered value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
477 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
478 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
479 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
480 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
481 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
482 const char *gaim_request_field_string_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
483 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
484 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
485 * Returns whether or not a string field is multi-line. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
486 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
487 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
488 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
489 * @return @c TRUE if the field is mulit-line, or @c FALSE otherwise. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
490 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
491 gboolean gaim_request_field_string_is_multiline(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
492 |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
493 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
494 * Returns whether or not a string field is masked. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
495 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
496 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
497 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
498 * @return @c TRUE if the field is masked, or @c FALSE otherwise. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
499 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
500 gboolean gaim_request_field_string_is_masked(const GaimRequestField *field); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
501 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
502 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
503 * Returns whether or not a string field is editable. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
504 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
505 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
506 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
507 * @return @c TRUE if the field is editable, or @c FALSE otherwise. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
508 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
509 gboolean gaim_request_field_string_is_editable(const GaimRequestField *field); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
510 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
511 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
512 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
513 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
514 /** @name Integer Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
515 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
516 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
517 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
518 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
519 * Creates an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
520 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
521 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
522 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
523 * @param default_value The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
524 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
525 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
526 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
527 GaimRequestField *gaim_request_field_int_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
528 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
529 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
530 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
531 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
532 * Sets the default value in an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
533 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
534 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
535 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
536 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
537 void gaim_request_field_int_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
538 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
539 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
540 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
541 * Sets the value in an integer field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
542 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
543 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
544 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
545 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
546 void gaim_request_field_int_set_value(GaimRequestField *field, int value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
547 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
548 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
549 * Returns the default value in an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
550 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
551 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
552 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
553 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
554 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
555 int gaim_request_field_int_get_default_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
556 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
557 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
558 * Returns the user-entered value in an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
559 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
560 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
561 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
562 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
563 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
564 int gaim_request_field_int_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
565 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
566 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
567 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
568 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
569 /** @name Boolean Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
570 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
571 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
572 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
573 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
574 * Creates a boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
575 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
576 * This is often represented as a checkbox. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
577 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
578 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
579 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
580 * @param default_value The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
581 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
582 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
583 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
584 GaimRequestField *gaim_request_field_bool_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
585 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
586 gboolean default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
587 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
588 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
589 * Sets the default value in an boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
590 * |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
591 * @param field The field. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
592 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
593 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
594 void gaim_request_field_bool_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
595 gboolean default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
596 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
597 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
598 * Sets the value in an boolean field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
599 * |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
600 * @param field The field. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
601 * @param value The value. |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
602 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
603 void gaim_request_field_bool_set_value(GaimRequestField *field, |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
604 gboolean value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
605 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
606 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
607 * Returns the default value in an boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
608 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
609 * @param field The field. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
610 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
611 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
612 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
613 gboolean gaim_request_field_bool_get_default_value( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
614 const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
615 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
616 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
617 * Returns the user-entered value in an boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
618 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
619 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
620 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
621 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
622 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
623 gboolean gaim_request_field_bool_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
624 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
625 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
626 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
627 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
628 /** @name Choice Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
629 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
630 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
631 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
632 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
633 * Creates a multiple choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
634 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
635 * This is often represented as a group of radio buttons. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
636 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
637 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
638 * @param text The optional label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
639 * @param default_value The default choice. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
640 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
641 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
642 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
643 GaimRequestField *gaim_request_field_choice_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
644 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
645 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
646 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
647 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
648 * Adds a choice to a multiple choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
649 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
650 * @param field The choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
651 * @param label The choice label. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
652 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
653 void gaim_request_field_choice_add(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
654 const char *label); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
655 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
656 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
657 * Sets the default value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
658 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
659 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
660 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
661 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
662 void gaim_request_field_choice_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
663 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
664 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
665 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
666 * Sets the value in an choice field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
667 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
668 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
669 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
670 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
671 void gaim_request_field_choice_set_value(GaimRequestField *field, int value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
672 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
673 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
674 * Returns the default value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
675 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
676 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
677 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
678 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
679 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
680 int gaim_request_field_choice_get_default_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
681 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
682 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
683 * Returns the user-entered value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
684 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
685 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
686 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
687 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
688 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
689 int gaim_request_field_choice_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
690 |
5809
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
691 /** |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
692 * Returns a list of labels in a choice field. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
693 * |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
694 * @param field The field. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
695 * |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
696 * @return The list of labels. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
697 */ |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
698 GList *gaim_request_field_choice_get_labels(const GaimRequestField *field); |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
699 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
700 /*@}*/ |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
701 |
5477 | 702 /**************************************************************************/ |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
703 /** @name List Field API */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
704 /**************************************************************************/ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
705 /*@{*/ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
706 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
707 /** |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
708 * Creates a multiple list item field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
709 * |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
710 * @param id The field ID. |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
711 * @param text The optional label of the field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
712 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
713 * @return The new field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
714 */ |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
715 GaimRequestField *gaim_request_field_list_new(const char *id, const char *text); |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
716 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
717 /** |
7899
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
718 * Sets whether or not a list field allows multiple selection. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
719 * |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
720 * @param field The list field. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
721 * @param multi_select TRUE if multiple selection is enabled, |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
722 * or FALSE otherwise. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
723 */ |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
724 void gaim_request_field_list_set_multi_select(GaimRequestField *field, |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
725 gboolean multi_select); |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
726 |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
727 /** |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
728 * Returns whether or not a list field allows multiple selection. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
729 * |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
730 * @param field The list field. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
731 * |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
732 * @return TRUE if multiple selection is enabled, or FALSE otherwise. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
733 */ |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
734 gboolean gaim_request_field_list_get_multi_select( |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
735 const GaimRequestField *field); |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
736 |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
737 /** |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
738 * Returns the data for a particular item. |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
739 * |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
740 * @param field The list field. |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
741 * @param item The item text. |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
742 * |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
743 * @return The data associated with the item. |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
744 */ |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
745 void *gaim_request_field_list_get_data(const GaimRequestField *field, |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
746 const char *text); |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
747 |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
748 /** |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
749 * Adds an item to a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
750 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
751 * @param field The list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
752 * @param item The list item. |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
753 * @param data The associated data. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
754 */ |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
755 void gaim_request_field_list_add(GaimRequestField *field, |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
756 const char *item, void *data); |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
757 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
758 /** |
7902
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
759 * Adds a selected item to the list field. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
760 * |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
761 * @param field The field. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
762 * @param item The item to add. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
763 */ |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
764 void gaim_request_field_list_add_selected(GaimRequestField *field, |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
765 const char *item); |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
766 |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
767 /** |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
768 * Clears the list of selected items in a list field. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
769 * |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
770 * @param field The field. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
771 */ |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
772 void gaim_request_field_list_clear_selected(GaimRequestField *field); |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
773 |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
774 /** |
7901
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
775 * Sets a list of selected items in a list field. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
776 * |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
777 * @param field The field. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
778 * @param items The list of selected items. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
779 */ |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
780 void gaim_request_field_list_set_selected(GaimRequestField *field, |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
781 GList *items); |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
782 |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
783 /** |
7964
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
784 * Returns whether or not a particular item is selected in a list field. |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
785 * |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
786 * @param field The field. |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
787 * @param item The item. |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
788 * |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
789 * @return TRUE if the item is selected. FALSE otherwise. |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
790 */ |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
791 gboolean gaim_request_field_list_is_selected(const GaimRequestField *field, |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
792 const char *item); |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
793 |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
794 /** |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
795 * Returns a list of selected items in a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
796 * |
7963
96b71ea64386
[gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents:
7909
diff
changeset
|
797 * To retrieve the data for each item, use |
96b71ea64386
[gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents:
7909
diff
changeset
|
798 * gaim_request_field_list_get_data(). |
96b71ea64386
[gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents:
7909
diff
changeset
|
799 * |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
800 * @param field The field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
801 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
802 * @return The list of selected items. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
803 */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
804 const GList *gaim_request_field_list_get_selected( |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
805 const GaimRequestField *field); |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
806 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
807 /** |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
808 * Returns a list of items in a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
809 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
810 * @param field The field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
811 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
812 * @return The list of items. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
813 */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
814 const GList *gaim_request_field_list_get_items(const GaimRequestField *field); |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
815 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
816 /*@}*/ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
817 |
7905
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
818 /**************************************************************************/ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
819 /** @name Label Field API */ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
820 /**************************************************************************/ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
821 /*@{*/ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
822 |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
823 /** |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
824 * Creates a label field. |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
825 * |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
826 * @param id The field ID. |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
827 * @param text The optional label of the field. |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
828 * |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
829 * @return The new field. |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
830 */ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
831 GaimRequestField *gaim_request_field_label_new(const char *id, |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
832 const char *text); |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
833 |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
834 /*@}*/ |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
835 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
836 /**************************************************************************/ |
5477 | 837 /** @name Request API */ |
838 /**************************************************************************/ | |
839 /*@{*/ | |
840 | |
841 /** | |
842 * Prompts the user for text input. | |
843 * | |
844 * @param handle The plugin or connection handle. | |
845 * @param title The title of the message. | |
846 * @param primary The main point of the message. | |
847 * @param secondary The secondary information. | |
848 * @param default_value The default value. | |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
849 * @param multiline TRUE if the inputted text can span multiple lines. |
6035
8c44020a958e
[gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
850 * @param masked TRUE if the inputted text should be masked in some way. |
5477 | 851 * @param ok_text The text for the OK button. |
852 * @param ok_cb The callback for the OK button. | |
853 * @param cancel_text The text for the cancel button. | |
854 * @param cancel_cb The callback for the cancel button. | |
855 * @param user_data The data to pass to the callback. | |
856 * | |
857 * @return A UI-specific handle. | |
858 */ | |
859 void *gaim_request_input(void *handle, const char *title, | |
860 const char *primary, const char *secondary, | |
6035
8c44020a958e
[gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
861 const char *default_value, |
8c44020a958e
[gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
862 gboolean multiline, gboolean masked, |
5477 | 863 const char *ok_text, GCallback ok_cb, |
864 const char *cancel_text, GCallback cancel_cb, | |
865 void *user_data); | |
866 | |
867 /** | |
868 * Prompts the user for multiple-choice input. | |
869 * | |
870 * @param handle The plugin or connection handle. | |
871 * @param title The title of the message. | |
872 * @param primary The main point of the message. | |
873 * @param secondary The secondary information. | |
874 * @param default_value The default value. | |
875 * @param ok_text The text for the OK button. | |
876 * @param ok_cb The callback for the OK button. | |
877 * @param cancel_text The text for the cancel button. | |
878 * @param cancel_cb The callback for the cancel button. | |
879 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
880 * @param choice_count The number of choices. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
881 * @param ... The choices. |
5477 | 882 * |
883 * @return A UI-specific handle. | |
884 */ | |
885 void *gaim_request_choice(void *handle, const char *title, | |
886 const char *primary, const char *secondary, | |
887 unsigned int default_value, | |
888 const char *ok_text, GCallback ok_cb, | |
889 const char *cancel_text, GCallback cancel_cb, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
890 void *user_data, size_t choice_count, ...); |
5477 | 891 |
892 /** | |
893 * Prompts the user for multiple-choice input. | |
894 * | |
895 * @param handle The plugin or connection handle. | |
896 * @param title The title of the message. | |
897 * @param primary The main point of the message. | |
898 * @param secondary The secondary information. | |
899 * @param default_value The default value. | |
900 * @param ok_text The text for the OK button. | |
901 * @param ok_cb The callback for the OK button. | |
902 * @param cancel_text The text for the cancel button. | |
903 * @param cancel_cb The callback for the cancel button. | |
904 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
905 * @param choice_count The number of choices. |
5477 | 906 * @param choices The choices. |
907 * | |
908 * @return A UI-specific handle. | |
909 */ | |
910 void *gaim_request_choice_varg(void *handle, const char *title, | |
911 const char *primary, const char *secondary, | |
912 unsigned int default_value, | |
913 const char *ok_text, GCallback ok_cb, | |
914 const char *cancel_text, GCallback cancel_cb, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
915 void *user_data, size_t choice_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
916 va_list choices); |
5477 | 917 |
918 /** | |
919 * Prompts the user for an action. | |
920 * | |
921 * This is often represented as a dialog with a button for each action. | |
922 * | |
923 * @param handle The plugin or connection handle. | |
924 * @param title The title of the message. | |
925 * @param primary The main point of the message. | |
926 * @param secondary The secondary information. | |
927 * @param default_action The default value. | |
928 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
929 * @param action_count The number of actions. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
930 * @param ... A list of actions. |
5477 | 931 * |
932 * @return A UI-specific handle. | |
933 */ | |
934 void *gaim_request_action(void *handle, const char *title, | |
935 const char *primary, const char *secondary, | |
936 unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
937 void *user_data, size_t action_count, ...); |
5477 | 938 |
939 /** | |
940 * Prompts the user for an action. | |
941 * | |
942 * This is often represented as a dialog with a button for each action. | |
943 * | |
944 * @param handle The plugin or connection handle. | |
945 * @param title The title of the message. | |
946 * @param primary The main point of the message. | |
947 * @param secondary The secondary information. | |
948 * @param default_action The default value. | |
949 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
950 * @param action_count The number of actions. |
5477 | 951 * @param actions A list of actions and callbacks. |
952 * | |
953 * @return A UI-specific handle. | |
954 */ | |
955 void *gaim_request_action_varg(void *handle, const char *title, | |
956 const char *primary, const char *secondary, | |
957 unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
958 void *user_data, size_t action_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
959 va_list actions); |
5477 | 960 |
961 /** | |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
962 * Displays groups of fields for the user to fill in. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
963 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
964 * @param handle The plugin or connection handle. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
965 * @param title The title of the message. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
966 * @param primary The main point of the message. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
967 * @param secondary The secondary information. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
968 * @param fields The list of fields. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
969 * @param ok_text The text for the OK button. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
970 * @param ok_cb The callback for the OK button. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
971 * @param cancel_text The text for the cancel button. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
972 * @param cancel_cb The callback for the cancel button. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
973 * @param user_data The data to pass to the callback. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
974 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
975 * @return A UI-specific handle. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
976 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
977 void *gaim_request_fields(void *handle, const char *title, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
978 const char *primary, const char *secondary, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
979 GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
980 const char *ok_text, GCallback ok_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
981 const char *cancel_text, GCallback cancel_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
982 void *user_data); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
983 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
984 /** |
5477 | 985 * Closes a request. |
986 * | |
987 * This should be used only by the UI operation functions and part of the | |
988 * core. | |
989 * | |
990 * @param type The request type. | |
991 * @param uihandle The request UI handle. | |
992 */ | |
993 void gaim_request_close(GaimRequestType type, void *uihandle); | |
994 | |
995 /** | |
996 * Closes all requests registered with the specified handle. | |
997 * | |
998 * @param handle The handle. | |
999 */ | |
1000 void gaim_request_close_with_handle(void *handle); | |
1001 | |
1002 /** | |
1003 * A wrapper for gaim_request_action() that uses Yes and No buttons. | |
1004 */ | |
1005 #define gaim_request_yes_no(handle, title, primary, secondary, \ | |
1006 default_action, user_data, yes_cb, no_cb) \ | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1007 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1008 (default_action), (user_data), 2, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1009 _("Yes"), (yes_cb), _("No"), (no_cb)) |
5477 | 1010 |
1011 /** | |
1012 * A wrapper for gaim_request_action() that uses OK and Cancel buttons. | |
1013 */ | |
1014 #define gaim_request_ok_cancel(handle, title, primary, secondary, \ | |
1015 default_action, user_data, ok_cb, cancel_cb) \ | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1016 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1017 (default_action), (user_data), 2, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1018 _("OK"), (ok_cb), _("Cancel"), (cancel_cb)) |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1019 |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1020 /** |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1021 * A wrapper for gaim_request_action() that uses Accept and Cancel buttons. |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1022 */ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1023 #define gaim_request_accept_cancel(handle, title, primary, secondary, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1024 default_action, user_data, accept_cb, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1025 cancel_cb) \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1026 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1027 (default_action), (user_data), 2, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1028 _("Accept"), (accept_cb), _("Cancel"), (cancel_cb)) |
5477 | 1029 |
1030 /*@}*/ | |
1031 | |
1032 /**************************************************************************/ | |
1033 /** @name UI Operations API */ | |
1034 /**************************************************************************/ | |
1035 /*@{*/ | |
1036 | |
1037 /** | |
1038 * Sets the UI operations structure to be used when displaying a | |
1039 * request. | |
1040 * | |
1041 * @param ops The UI operations structure. | |
1042 */ | |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
1043 void gaim_request_set_ui_ops(GaimRequestUiOps *ops); |
5477 | 1044 |
1045 /** | |
1046 * Returns the UI operations structure to be used when displaying a | |
1047 * request. | |
1048 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
1049 * @return The UI operations structure. |
5477 | 1050 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
1051 GaimRequestUiOps *gaim_request_get_ui_ops(void); |
5477 | 1052 |
1053 /*@}*/ | |
1054 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
1055 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
1056 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
1057 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
1058 |
5477 | 1059 #endif /* _GAIM_REQUEST_H_ */ |