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