Mercurial > pidgin
annotate src/request.h @ 7901:4344f7fad009
[gaim-migrate @ 8561]
A function for setting the list of items currently selected would also be
nifty.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 21 Dec 2003 08:30:53 +0000 |
parents | 7b64108b8ae3 |
children | 3ca501305ac5 |
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, |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
52 GAIM_REQUEST_FIELD_LIST |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
53 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
54 } GaimRequestFieldType; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
55 |
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 * A request field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
58 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
59 typedef struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
60 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
61 GaimRequestFieldType type; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
62 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
63 char *id; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
64 char *label; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
65 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
66 union |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
67 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
68 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
69 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
70 gboolean multiline; |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
71 gboolean masked; |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
72 gboolean editable; |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
73 char *default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
74 char *value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
75 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
76 } string; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
77 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
78 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
79 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
80 int default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
81 int value; |
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 } integer; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
84 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
85 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
86 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
87 gboolean default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
88 gboolean value; |
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 } boolean; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
91 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
92 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
93 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
94 int default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
95 int value; |
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 GList *labels; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
98 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
99 } choice; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
100 |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
101 struct |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
102 { |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
103 GList *items; |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
104 GList *selected; |
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 gboolean multiple_selection; |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
107 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
108 } list; |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
109 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
110 } u; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
111 |
5809
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
112 void *ui_data; |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
113 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
114 } GaimRequestField; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
115 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
116 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
117 * Multiple fields request data. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
118 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
119 typedef struct |
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 GList *groups; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
122 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
123 GHashTable *fields; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
124 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
125 } GaimRequestFields; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
126 |
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 * A group of fields with a title. |
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 typedef struct |
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 GaimRequestFields *fields_list; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
133 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
134 char *title; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
135 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
136 GList *fields; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
137 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
138 } GaimRequestFieldGroup; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
139 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
140 /** |
5477 | 141 * Request UI operations. |
142 */ | |
143 typedef struct | |
144 { | |
145 void *(*request_input)(const char *title, const char *primary, | |
146 const char *secondary, const char *default_value, | |
6035
8c44020a958e
[gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
147 gboolean multiline, gboolean masked, |
5477 | 148 const char *ok_text, GCallback ok_cb, |
149 const char *cancel_text, GCallback cancel_cb, | |
150 void *user_data); | |
151 void *(*request_choice)(const char *title, const char *primary, | |
152 const char *secondary, unsigned int default_value, | |
153 const char *ok_text, GCallback ok_cb, | |
154 const char *cancel_text, GCallback cancel_cb, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
155 void *user_data, size_t choice_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
156 va_list choices); |
5477 | 157 void *(*request_action)(const char *title, const char *primary, |
158 const char *secondary, unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
159 void *user_data, size_t action_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
160 va_list actions); |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
161 void *(*request_fields)(const char *title, const char *primary, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
162 const char *secondary, GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
163 const char *ok_text, GCallback ok_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
164 const char *cancel_text, GCallback cancel_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
165 void *user_data); |
5477 | 166 |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
167 void (*close_request)(GaimRequestType type, void *ui_handle); |
5477 | 168 |
169 } GaimRequestUiOps; | |
170 | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
171 typedef void (*GaimRequestInputCb)(void *, const char *); |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
172 typedef void (*GaimRequestActionCb)(void *, int); |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
173 typedef void (*GaimRequestFieldsCb)(void *, GaimRequestFields *fields); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
174 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
175 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
176 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
177 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
178 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
179 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
180 /** @name Field List API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
181 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
182 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
183 |
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 * Creates a list of fields to pass to gaim_request_fields(). |
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 * @return A GaimRequestFields structure. |
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 GaimRequestFields *gaim_request_fields_new(void); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
190 |
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 * Destroys a list of fields. |
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 * @param fields The list of fields to destroy. |
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 void gaim_request_fields_destroy(GaimRequestFields *fields); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
197 |
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 * Adds a group of fields to the list. |
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 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
202 * @param group The group to add. |
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 void gaim_request_fields_add_group(GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
205 GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
206 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
207 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
208 * Returns a list of all groups in a field list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
209 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
210 * @param fields The fields list. |
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 * @return A list of groups. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
213 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
214 GList *gaim_request_fields_get_groups(const GaimRequestFields *fields); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
215 |
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 the field with the specified ID. |
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 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
220 * @param id The ID of the field. |
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, if found. |
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 GaimRequestField *gaim_request_fields_get_field( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
225 const GaimRequestFields *fields, const char *id); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
228 * Returns the string value of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
229 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
230 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
231 * @param id The ID of the field. |
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 * @return The string value, if found, or @c NULL otherwise. |
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 const char *gaim_request_fields_get_string(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
236 const char *id); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
239 * Returns the integer value of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
240 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
241 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
242 * @param id The ID of the field. |
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 * @return The integer value, if found, or 0 otherwise. |
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 int gaim_request_fields_get_integer(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
247 const char *id); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
250 * Returns the boolean value of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
251 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
252 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
253 * @param id The ID of the field. |
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 * @return The boolean value, if found, or @c FALSE otherwise. |
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 gboolean gaim_request_fields_get_bool(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
258 const char *id); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
261 * Returns the choice index of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
262 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
263 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
264 * @param id The ID of the field. |
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 * @return The choice index, if found, or -1 otherwise. |
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 int gaim_request_fields_get_choice(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
269 const char *id); |
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 /*@}*/ |
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 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
274 /** @name Fields Group API */ |
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 * Creates a fields group with an optional title. |
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 * @param title The optional title to give the group. |
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 * @return A new fields group |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
284 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
285 GaimRequestFieldGroup *gaim_request_field_group_new(const char *title); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
286 |
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 * Destroys a 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 * @param group The group to destroy. |
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 void gaim_request_field_group_destroy(GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
293 |
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 * Adds a field to the group. |
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 * @param group The group to add the field to. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
298 * @param field The field to add to the group. |
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 void gaim_request_field_group_add_field(GaimRequestFieldGroup *group, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
301 GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
302 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
303 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
304 * Returns the title of a fields group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
305 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
306 * @param group The group. |
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 * @return The title, if set. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
309 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
310 const char *gaim_request_field_group_get_title( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
311 const GaimRequestFieldGroup *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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
314 * Returns a list of all fields in a group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
315 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
316 * @param group The 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 * @return The list of fields in the group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
319 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
320 GList *gaim_request_field_group_get_fields( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
321 const GaimRequestFieldGroup *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 /*@}*/ |
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 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
326 /** @name Field API */ |
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 * Creates a field of the specified type. |
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 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
334 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
335 * @param type The type of field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
336 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
337 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
338 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
339 GaimRequestField *gaim_request_field_new(const char *id, const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
340 GaimRequestFieldType type); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
343 * Destroys a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
344 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
345 * @param field The field to destroy. |
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 void gaim_request_field_destroy(GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
348 |
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 * Sets the label text of a field. |
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 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
353 * @param label The text label. |
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 void gaim_request_field_set_label(GaimRequestField *field, const char *label); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
358 * Returns the type of a field. |
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 * @param field The field. |
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 * @return The field's type. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
363 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
364 GaimRequestFieldType gaim_request_field_get_type(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
365 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
366 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
367 * Returns the ID of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
368 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
369 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
370 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
371 * @return The ID |
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 const char *gaim_request_field_get_id(const GaimRequestField *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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
376 * Returns the label text of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
377 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
378 * @param field The field. |
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 * @return The label text. |
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 const char *gaim_request_field_get_label(const GaimRequestField *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 /*@}*/ |
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 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
387 /** @name String Field API */ |
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 /*@{*/ |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
392 * Creates a string request field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
393 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
394 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
395 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
396 * @param default_value The optional default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
397 * @param multiline Whether or not this should be a multiline string. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
398 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
399 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
400 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
401 GaimRequestField *gaim_request_field_string_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
402 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
403 const char *default_value, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
404 gboolean multiline); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
405 |
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 * Sets the default value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
408 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
409 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
410 * @param default_value The default value. |
5807
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 void gaim_request_field_string_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
413 const char *default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
414 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
415 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
416 * Sets the value in a string field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
417 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
418 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
419 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
420 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
421 void gaim_request_field_string_set_value(GaimRequestField *field, |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
422 const char *value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
423 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
424 /** |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
425 * Sets whether or not a string field is masked |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
426 * (commonly used for password fields). |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
427 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
428 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
429 * @param masked The masked value. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
430 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
431 void gaim_request_field_string_set_masked(GaimRequestField *field, |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
432 gboolean masked); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
433 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
434 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
435 * Sets whether or not a string field is editable. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
436 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
437 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
438 * @param editable The editable value. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
439 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
440 void gaim_request_field_string_set_editable(GaimRequestField *field, |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
441 gboolean editable); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
442 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
443 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
444 * Returns the default value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
445 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
446 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
447 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
448 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
449 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
450 const char *gaim_request_field_string_get_default_value( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
451 const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
452 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
453 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
454 * Returns the user-entered value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
455 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
456 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
457 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
458 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
459 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
460 const char *gaim_request_field_string_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
461 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
462 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
463 * Returns whether or not a string field is multi-line. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
464 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
465 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
466 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
467 * @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
|
468 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
469 gboolean gaim_request_field_string_is_multiline(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
470 |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
471 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
472 * Returns whether or not a string field is masked. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
473 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
474 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
475 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
476 * @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
|
477 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
478 gboolean gaim_request_field_string_is_masked(const GaimRequestField *field); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
479 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
480 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
481 * Returns whether or not a string field is editable. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
482 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
483 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
484 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
485 * @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
|
486 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
487 gboolean gaim_request_field_string_is_editable(const GaimRequestField *field); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
488 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
489 /*@}*/ |
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 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
492 /** @name Integer Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
493 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
494 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
495 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
496 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
497 * Creates an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
498 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
499 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
500 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
501 * @param default_value The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
502 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
503 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
504 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
505 GaimRequestField *gaim_request_field_int_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
506 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
507 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
508 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
509 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
510 * Sets the default value in an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
511 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
512 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
513 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
514 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
515 void gaim_request_field_int_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
516 int default_value); |
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 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
519 * Sets the value in an integer field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
520 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
521 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
522 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
523 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
524 void gaim_request_field_int_set_value(GaimRequestField *field, int value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
525 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
526 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
527 * Returns the default value in an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
528 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
529 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
530 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
531 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
532 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
533 int gaim_request_field_int_get_default_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
534 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
535 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
536 * Returns the user-entered value in an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
537 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
538 * @param field The field. |
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 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
541 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
542 int gaim_request_field_int_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
543 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
544 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
545 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
546 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
547 /** @name Boolean Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
548 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
549 /*@{*/ |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
552 * Creates a boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
553 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
554 * This is often represented as a checkbox. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
555 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
556 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
557 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
558 * @param default_value The default value. |
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 * @return The new 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 GaimRequestField *gaim_request_field_bool_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
563 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
564 gboolean default_value); |
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 * Sets the default value in an boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
568 * |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
569 * @param field The field. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
570 * @param default_value The default value. |
5807
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 void gaim_request_field_bool_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
573 gboolean default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
574 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
575 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
576 * Sets the value in an boolean field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
577 * |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
578 * @param field The field. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
579 * @param value The value. |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
580 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
581 void gaim_request_field_bool_set_value(GaimRequestField *field, |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
582 gboolean value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
583 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
584 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
585 * Returns the default value in an boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
586 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
587 * @param field The field. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
588 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
589 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
590 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
591 gboolean gaim_request_field_bool_get_default_value( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
592 const GaimRequestField *field); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
595 * Returns the user-entered value in an boolean field. |
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 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
598 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
599 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
600 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
601 gboolean gaim_request_field_bool_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
602 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
603 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
604 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
605 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
606 /** @name Choice Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
607 /**************************************************************************/ |
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 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
610 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
611 * Creates a multiple choice field. |
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 * This is often represented as a group of radio buttons. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
614 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
615 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
616 * @param text The optional label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
617 * @param default_value The default choice. |
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 * @return The new 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 GaimRequestField *gaim_request_field_choice_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
622 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
623 int default_value); |
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 * Adds a choice to a multiple choice field. |
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 * @param field The choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
629 * @param label The choice label. |
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 void gaim_request_field_choice_add(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
632 const char *label); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
633 |
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 * Sets the default value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
636 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
637 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
638 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
639 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
640 void gaim_request_field_choice_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
641 int default_value); |
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 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
644 * Sets the value in an choice field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
645 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
646 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
647 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
648 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
649 void gaim_request_field_choice_set_value(GaimRequestField *field, int value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
650 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
651 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
652 * Returns the default value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
653 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
654 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
655 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
656 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
657 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
658 int gaim_request_field_choice_get_default_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
659 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
660 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
661 * Returns the user-entered value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
662 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
663 * @param field The field. |
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 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
666 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
667 int gaim_request_field_choice_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
668 |
5809
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
669 /** |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
670 * Returns a list of labels in a choice field. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
671 * |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
672 * @param field The field. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
673 * |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
674 * @return The list of labels. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
675 */ |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
676 GList *gaim_request_field_choice_get_labels(const GaimRequestField *field); |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
677 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
678 /*@}*/ |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
679 |
5477 | 680 /**************************************************************************/ |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
681 /** @name List Field API */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
682 /**************************************************************************/ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
683 /*@{*/ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
684 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
685 /** |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
686 * Creates a multiple list item field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
687 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
688 * @param id The field ID. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
689 * @param text The optional label of the field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
690 * @param items The list of items. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
691 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
692 * @return The new field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
693 */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
694 GaimRequestField *gaim_request_field_list_new(const char *id, const char *text, |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
695 GList *items); |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
696 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
697 /** |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
698 * Sets the list of items in a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
699 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
700 * The items are not copied. The actual list passed is assigned to the field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
701 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
702 * @param field The list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
703 * @param items The items. |
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 void gaim_request_field_list_set_items(GaimRequestField *field, GList *items); |
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 /** |
7899
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
708 * Sets whether or not a list field allows multiple selection. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
709 * |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
710 * @param field The list field. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
711 * @param multi_select TRUE if multiple selection is enabled, |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
712 * or FALSE otherwise. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
713 */ |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
714 void gaim_request_field_list_set_multi_select(GaimRequestField *field, |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
715 gboolean multi_select); |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
716 |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
717 /** |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
718 * Returns 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 * |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
722 * @return TRUE if multiple selection is enabled, 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 gboolean gaim_request_field_list_get_multi_select( |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
725 const GaimRequestField *field); |
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 /** |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
728 * Adds an item to a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
729 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
730 * @param field The list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
731 * @param item The list item. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
732 */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
733 void gaim_request_field_list_add(GaimRequestField *field, const char *item); |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
734 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
735 /** |
7901
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
736 * Sets a list of selected items in a list field. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
737 * |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
738 * @param field The field. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
739 * @param items The list of selected items. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
740 */ |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
741 void gaim_request_field_list_set_selected(GaimRequestField *field, |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
742 GList *items); |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
743 |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
744 /** |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
745 * Returns a list of selected items in a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
746 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
747 * @param field The field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
748 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
749 * @return The list of selected items. |
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 const GList *gaim_request_field_list_get_selected( |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
752 const GaimRequestField *field); |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
753 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
754 /** |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
755 * Returns a list of items in a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
756 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
757 * @param field The field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
758 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
759 * @return The list of items. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
760 */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
761 const GList *gaim_request_field_list_get_items(const GaimRequestField *field); |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
762 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
763 /*@}*/ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
764 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
765 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
766 /**************************************************************************/ |
5477 | 767 /** @name Request API */ |
768 /**************************************************************************/ | |
769 /*@{*/ | |
770 | |
771 /** | |
772 * Prompts the user for text input. | |
773 * | |
774 * @param handle The plugin or connection handle. | |
775 * @param title The title of the message. | |
776 * @param primary The main point of the message. | |
777 * @param secondary The secondary information. | |
778 * @param default_value The default value. | |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
779 * @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
|
780 * @param masked TRUE if the inputted text should be masked in some way. |
5477 | 781 * @param ok_text The text for the OK button. |
782 * @param ok_cb The callback for the OK button. | |
783 * @param cancel_text The text for the cancel button. | |
784 * @param cancel_cb The callback for the cancel button. | |
785 * @param user_data The data to pass to the callback. | |
786 * | |
787 * @return A UI-specific handle. | |
788 */ | |
789 void *gaim_request_input(void *handle, const char *title, | |
790 const char *primary, const char *secondary, | |
6035
8c44020a958e
[gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
791 const char *default_value, |
8c44020a958e
[gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
792 gboolean multiline, gboolean masked, |
5477 | 793 const char *ok_text, GCallback ok_cb, |
794 const char *cancel_text, GCallback cancel_cb, | |
795 void *user_data); | |
796 | |
797 /** | |
798 * Prompts the user for multiple-choice input. | |
799 * | |
800 * @param handle The plugin or connection handle. | |
801 * @param title The title of the message. | |
802 * @param primary The main point of the message. | |
803 * @param secondary The secondary information. | |
804 * @param default_value The default value. | |
805 * @param ok_text The text for the OK button. | |
806 * @param ok_cb The callback for the OK button. | |
807 * @param cancel_text The text for the cancel button. | |
808 * @param cancel_cb The callback for the cancel button. | |
809 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
810 * @param choice_count The number of choices. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
811 * @param ... The choices. |
5477 | 812 * |
813 * @return A UI-specific handle. | |
814 */ | |
815 void *gaim_request_choice(void *handle, const char *title, | |
816 const char *primary, const char *secondary, | |
817 unsigned int default_value, | |
818 const char *ok_text, GCallback ok_cb, | |
819 const char *cancel_text, GCallback cancel_cb, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
820 void *user_data, size_t choice_count, ...); |
5477 | 821 |
822 /** | |
823 * Prompts the user for multiple-choice input. | |
824 * | |
825 * @param handle The plugin or connection handle. | |
826 * @param title The title of the message. | |
827 * @param primary The main point of the message. | |
828 * @param secondary The secondary information. | |
829 * @param default_value The default value. | |
830 * @param ok_text The text for the OK button. | |
831 * @param ok_cb The callback for the OK button. | |
832 * @param cancel_text The text for the cancel button. | |
833 * @param cancel_cb The callback for the cancel button. | |
834 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
835 * @param choice_count The number of choices. |
5477 | 836 * @param choices The choices. |
837 * | |
838 * @return A UI-specific handle. | |
839 */ | |
840 void *gaim_request_choice_varg(void *handle, const char *title, | |
841 const char *primary, const char *secondary, | |
842 unsigned int default_value, | |
843 const char *ok_text, GCallback ok_cb, | |
844 const char *cancel_text, GCallback cancel_cb, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
845 void *user_data, size_t choice_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
846 va_list choices); |
5477 | 847 |
848 /** | |
849 * Prompts the user for an action. | |
850 * | |
851 * This is often represented as a dialog with a button for each action. | |
852 * | |
853 * @param handle The plugin or connection handle. | |
854 * @param title The title of the message. | |
855 * @param primary The main point of the message. | |
856 * @param secondary The secondary information. | |
857 * @param default_action The default value. | |
858 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
859 * @param action_count The number of actions. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
860 * @param ... A list of actions. |
5477 | 861 * |
862 * @return A UI-specific handle. | |
863 */ | |
864 void *gaim_request_action(void *handle, const char *title, | |
865 const char *primary, const char *secondary, | |
866 unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
867 void *user_data, size_t action_count, ...); |
5477 | 868 |
869 /** | |
870 * Prompts the user for an action. | |
871 * | |
872 * This is often represented as a dialog with a button for each action. | |
873 * | |
874 * @param handle The plugin or connection handle. | |
875 * @param title The title of the message. | |
876 * @param primary The main point of the message. | |
877 * @param secondary The secondary information. | |
878 * @param default_action The default value. | |
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 action_count The number of actions. |
5477 | 881 * @param actions A list of actions and callbacks. |
882 * | |
883 * @return A UI-specific handle. | |
884 */ | |
885 void *gaim_request_action_varg(void *handle, const char *title, | |
886 const char *primary, const char *secondary, | |
887 unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
888 void *user_data, size_t action_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
889 va_list actions); |
5477 | 890 |
891 /** | |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
892 * Displays groups of fields for the user to fill in. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
893 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
894 * @param handle The plugin or connection handle. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
895 * @param title The title of the message. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
896 * @param primary The main point of the message. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
897 * @param secondary The secondary information. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
898 * @param fields The list of fields. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
899 * @param ok_text The text for the OK button. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
900 * @param ok_cb The callback for the OK button. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
901 * @param cancel_text The text for the cancel button. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
902 * @param cancel_cb The callback for the cancel button. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
903 * @param user_data The data to pass to the callback. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
904 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
905 * @return A UI-specific handle. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
906 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
907 void *gaim_request_fields(void *handle, const char *title, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
908 const char *primary, const char *secondary, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
909 GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
910 const char *ok_text, GCallback ok_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
911 const char *cancel_text, GCallback cancel_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
912 void *user_data); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
913 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
914 /** |
5477 | 915 * Closes a request. |
916 * | |
917 * This should be used only by the UI operation functions and part of the | |
918 * core. | |
919 * | |
920 * @param type The request type. | |
921 * @param uihandle The request UI handle. | |
922 */ | |
923 void gaim_request_close(GaimRequestType type, void *uihandle); | |
924 | |
925 /** | |
926 * Closes all requests registered with the specified handle. | |
927 * | |
928 * @param handle The handle. | |
929 */ | |
930 void gaim_request_close_with_handle(void *handle); | |
931 | |
932 /** | |
933 * A wrapper for gaim_request_action() that uses Yes and No buttons. | |
934 */ | |
935 #define gaim_request_yes_no(handle, title, primary, secondary, \ | |
936 default_action, user_data, yes_cb, no_cb) \ | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
937 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
938 (default_action), (user_data), 2, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
939 _("Yes"), (yes_cb), _("No"), (no_cb)) |
5477 | 940 |
941 /** | |
942 * A wrapper for gaim_request_action() that uses OK and Cancel buttons. | |
943 */ | |
944 #define gaim_request_ok_cancel(handle, title, primary, secondary, \ | |
945 default_action, user_data, ok_cb, cancel_cb) \ | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
946 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
947 (default_action), (user_data), 2, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
948 _("OK"), (ok_cb), _("Cancel"), (cancel_cb)) |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
949 |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
950 /** |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
951 * 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
|
952 */ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
953 #define gaim_request_accept_cancel(handle, title, primary, secondary, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
954 default_action, user_data, accept_cb, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
955 cancel_cb) \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
956 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
957 (default_action), (user_data), 2, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
958 _("Accept"), (accept_cb), _("Cancel"), (cancel_cb)) |
5477 | 959 |
960 /*@}*/ | |
961 | |
962 /**************************************************************************/ | |
963 /** @name UI Operations API */ | |
964 /**************************************************************************/ | |
965 /*@{*/ | |
966 | |
967 /** | |
968 * Sets the UI operations structure to be used when displaying a | |
969 * request. | |
970 * | |
971 * @param ops The UI operations structure. | |
972 */ | |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
973 void gaim_request_set_ui_ops(GaimRequestUiOps *ops); |
5477 | 974 |
975 /** | |
976 * Returns the UI operations structure to be used when displaying a | |
977 * request. | |
978 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
979 * @return The UI operations structure. |
5477 | 980 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
981 GaimRequestUiOps *gaim_request_get_ui_ops(void); |
5477 | 982 |
983 /*@}*/ | |
984 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
985 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
986 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
987 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
988 |
5477 | 989 #endif /* _GAIM_REQUEST_H_ */ |