Mercurial > pidgin
annotate src/request.h @ 13952:841a5ffbfee4
[gaim-migrate @ 16500]
uiops for GaimConnections. This only shows an error message for a disconnect.
uiops for GaimNotify. I have not done the notifications for searchresults
yet. That will require multi-column GntTree's, which will also allow for
improved email-notifications. I hope to complete it by next week.
committer: Tailor Script <tailor@pidgin.im>
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Mon, 17 Jul 2006 03:45:24 +0000 |
parents | a651bfe0a922 |
children | 29f03c8fba4a |
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 | |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
32 #include "account.h" |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
33 |
9948 | 34 #define GAIM_DEFAULT_ACTION_NONE -1 |
35 | |
5477 | 36 /** |
37 * Request types. | |
38 */ | |
39 typedef enum | |
40 { | |
9502 | 41 GAIM_REQUEST_INPUT = 0, /**< Text input request. */ |
42 GAIM_REQUEST_CHOICE, /**< Multiple-choice request. */ | |
43 GAIM_REQUEST_ACTION, /**< Action request. */ | |
44 GAIM_REQUEST_FIELDS, /**< Multiple fields request. */ | |
13282
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
45 GAIM_REQUEST_FILE, /**< File open or save request. */ |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
46 GAIM_REQUEST_FOLDER /**< Folder selection request. */ |
5477 | 47 |
48 } GaimRequestType; | |
49 | |
50 /** | |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
51 * A type of field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
52 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
53 typedef enum |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
54 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
55 GAIM_REQUEST_FIELD_NONE, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
56 GAIM_REQUEST_FIELD_STRING, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
57 GAIM_REQUEST_FIELD_INTEGER, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
58 GAIM_REQUEST_FIELD_BOOLEAN, |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
59 GAIM_REQUEST_FIELD_CHOICE, |
7905
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
60 GAIM_REQUEST_FIELD_LIST, |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
61 GAIM_REQUEST_FIELD_LABEL, |
11357 | 62 GAIM_REQUEST_FIELD_IMAGE, |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
63 GAIM_REQUEST_FIELD_ACCOUNT |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
64 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
65 } GaimRequestFieldType; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
66 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
67 /** |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
68 * Multiple fields request data. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
69 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
70 typedef struct |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
71 { |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
72 GList *groups; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
73 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
74 GHashTable *fields; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
75 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
76 GList *required_fields; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
77 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
78 void *ui_data; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
79 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
80 } GaimRequestFields; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
81 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
82 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
83 * A group of fields with a title. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
84 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
85 typedef struct |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
86 { |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
87 GaimRequestFields *fields_list; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
88 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
89 char *title; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
90 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
91 GList *fields; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
92 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
93 } GaimRequestFieldGroup; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
94 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
95 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
96 * A request field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
97 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
98 typedef struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
99 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
100 GaimRequestFieldType type; |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
101 GaimRequestFieldGroup *group; |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
102 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
103 char *id; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
104 char *label; |
8285
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
105 char *type_hint; |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
106 |
7904
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
107 gboolean visible; |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
108 gboolean required; |
7904
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
109 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
110 union |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
111 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
112 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
113 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
114 gboolean multiline; |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
115 gboolean masked; |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
116 gboolean editable; |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
117 char *default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
118 char *value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
119 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
120 } string; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
121 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
122 struct |
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 int default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
125 int value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
126 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
127 } integer; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
128 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
129 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
130 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
131 gboolean default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
132 gboolean value; |
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 } boolean; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
135 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
136 struct |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
137 { |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
138 int default_value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
139 int value; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
140 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
141 GList *labels; |
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 } choice; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
144 |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
145 struct |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
146 { |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
147 GList *items; |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
148 GHashTable *item_data; |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
149 GList *selected; |
7964
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
150 GHashTable *selected_table; |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
151 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
152 gboolean multiple_selection; |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
153 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
154 } list; |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
155 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
156 struct |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
157 { |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
158 GaimAccount *default_account; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
159 GaimAccount *account; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
160 gboolean show_all; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
161 |
8289
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
162 GaimFilterAccountFunc filter_func; |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
163 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
164 } account; |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
165 |
11357 | 166 struct |
167 { | |
168 unsigned int scale_x; | |
169 unsigned int scale_y; | |
170 const char *buffer; | |
171 gsize size; | |
172 } image; | |
173 | |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
174 } u; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
175 |
5809
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
176 void *ui_data; |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
177 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
178 } GaimRequestField; |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
179 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
180 /** |
5477 | 181 * Request UI operations. |
182 */ | |
183 typedef struct | |
184 { | |
185 void *(*request_input)(const char *title, const char *primary, | |
186 const char *secondary, const char *default_value, | |
8697 | 187 gboolean multiline, gboolean masked, gchar *hint, |
5477 | 188 const char *ok_text, GCallback ok_cb, |
189 const char *cancel_text, GCallback cancel_cb, | |
190 void *user_data); | |
191 void *(*request_choice)(const char *title, const char *primary, | |
192 const char *secondary, unsigned int default_value, | |
193 const char *ok_text, GCallback ok_cb, | |
194 const char *cancel_text, GCallback cancel_cb, | |
10229 | 195 void *user_data, va_list choices); |
5477 | 196 void *(*request_action)(const char *title, const char *primary, |
197 const char *secondary, unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
198 void *user_data, size_t action_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
199 va_list actions); |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
200 void *(*request_fields)(const char *title, const char *primary, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
201 const char *secondary, GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
202 const char *ok_text, GCallback ok_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
203 const char *cancel_text, GCallback cancel_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
204 void *user_data); |
8843 | 205 void *(*request_file)(const char *title, const char *filename, |
9502 | 206 gboolean savedialog, GCallback ok_cb, |
207 GCallback cancel_cb, void *user_data); | |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
208 void (*close_request)(GaimRequestType type, void *ui_handle); |
13282
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
209 void *(*request_folder)(const char *title, const char *dirname, |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
210 GCallback ok_cb, GCallback cancel_cb, |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
211 void *user_data); |
5477 | 212 } GaimRequestUiOps; |
213 | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
214 typedef void (*GaimRequestInputCb)(void *, const char *); |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
215 typedef void (*GaimRequestActionCb)(void *, int); |
10229 | 216 typedef void (*GaimRequestChoiceCb)(void *, int); |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
217 typedef void (*GaimRequestFieldsCb)(void *, GaimRequestFields *fields); |
9502 | 218 typedef void (*GaimRequestFileCb)(void *, const char *filename); |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
219 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
220 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
221 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
222 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
223 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
224 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
225 /** @name Field List API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
226 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
227 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
228 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
229 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
230 * Creates a list of fields to pass to gaim_request_fields(). |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
231 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
232 * @return A GaimRequestFields structure. |
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 GaimRequestFields *gaim_request_fields_new(void); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
235 |
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 * Destroys a list of fields. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
238 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
239 * @param fields The list of fields to destroy. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
240 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
241 void gaim_request_fields_destroy(GaimRequestFields *fields); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
242 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
243 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
244 * Adds a group of fields to the list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
245 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
246 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
247 * @param group The group to add. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
248 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
249 void gaim_request_fields_add_group(GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
250 GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
251 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
252 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
253 * Returns a list of all groups in a field list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
254 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
255 * @param fields The fields list. |
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 * @return A list of groups. |
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 GList *gaim_request_fields_get_groups(const GaimRequestFields *fields); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
260 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
261 /** |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
262 * Returns whether or not the field with the specified ID exists. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
263 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
264 * @param fields The fields list. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
265 * @param id The ID of the field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
266 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
267 * @return TRUE if the field exists, or FALSE. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
268 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
269 gboolean gaim_request_fields_exists(const GaimRequestFields *fields, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
270 const char *id); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
271 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
272 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
273 * Returns a list of all required fields. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
274 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
275 * @param fields The fields list. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
276 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
277 * @return The list of required fields. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
278 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
279 const GList *gaim_request_fields_get_required(const GaimRequestFields *fields); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
280 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
281 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
282 * Returns whether or not a field with the specified ID is required. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
283 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
284 * @param fields The fields list. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
285 * @param id The field ID. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
286 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
287 * @return TRUE if the specified field is required, or FALSE. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
288 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
289 gboolean gaim_request_fields_is_field_required(const GaimRequestFields *fields, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
290 const char *id); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
291 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
292 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
293 * Returns whether or not all required fields have values. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
294 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
295 * @param fields The fields list. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
296 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
297 * @return TRUE if all required fields have values, or FALSE. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
298 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
299 gboolean gaim_request_fields_all_required_filled( |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
300 const GaimRequestFields *fields); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
301 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
302 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
303 * Return the field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
304 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
305 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
306 * @param id The ID of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
307 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
308 * @return The field, if found. |
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 GaimRequestField *gaim_request_fields_get_field( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
311 const GaimRequestFields *fields, const char *id); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
312 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
313 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
314 * Returns the string value of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
315 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
316 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
317 * @param id The ID of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
318 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
319 * @return The string value, if found, or @c NULL otherwise. |
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 const char *gaim_request_fields_get_string(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
322 const char *id); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
323 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
324 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
325 * Returns the integer value of a field with the specified ID. |
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 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
328 * @param id The ID of the field. |
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 * @return The integer value, if found, or 0 otherwise. |
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 int gaim_request_fields_get_integer(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
333 const char *id); |
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 * Returns the boolean value of a field with the specified ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
337 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
338 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
339 * @param id The ID of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
340 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
341 * @return The boolean value, if found, or @c FALSE otherwise. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
342 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
343 gboolean gaim_request_fields_get_bool(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
344 const char *id); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
347 * Returns the choice index of a field with the specified ID. |
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 * @param fields The fields list. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
350 * @param id The ID of the 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 * @return The choice index, if found, or -1 otherwise. |
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 int gaim_request_fields_get_choice(const GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
355 const char *id); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
356 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
357 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
358 * Returns the account of a field with the specified ID. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
359 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
360 * @param fields The fields list. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
361 * @param id The ID of the field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
362 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
363 * @return The account value, if found, or NULL otherwise. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
364 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
365 GaimAccount *gaim_request_fields_get_account(const GaimRequestFields *fields, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
366 const char *id); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
367 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
368 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
369 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
370 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
371 /** @name Fields Group API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
372 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
373 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
374 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
375 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
376 * Creates a fields group with an optional title. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
377 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
378 * @param title The optional title to give the group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
379 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
380 * @return A new fields group |
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 GaimRequestFieldGroup *gaim_request_field_group_new(const char *title); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
383 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
384 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
385 * Destroys a fields group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
386 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
387 * @param group The group to destroy. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
388 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
389 void gaim_request_field_group_destroy(GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
390 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
391 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
392 * Adds a field to the group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
393 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
394 * @param group The group to add the field to. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
395 * @param field The field to add to the group. |
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 void gaim_request_field_group_add_field(GaimRequestFieldGroup *group, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
398 GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
399 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
400 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
401 * Returns the title of a fields group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
402 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
403 * @param group The group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
404 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
405 * @return The title, if set. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
406 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
407 const char *gaim_request_field_group_get_title( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
408 const GaimRequestFieldGroup *group); |
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 * Returns a list of all fields in a group. |
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 * @param group The group. |
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 * @return The list of fields in the group. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
416 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
417 GList *gaim_request_field_group_get_fields( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
418 const GaimRequestFieldGroup *group); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
419 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
420 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
421 |
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 /** @name Field API */ |
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 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
426 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
427 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
428 * Creates a field of the specified type. |
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 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
431 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
432 * @param type The type of field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
433 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
434 * @return The new field. |
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 GaimRequestField *gaim_request_field_new(const char *id, const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
437 GaimRequestFieldType type); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
440 * Destroys a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
441 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
442 * @param field The field to destroy. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
443 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
444 void gaim_request_field_destroy(GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
445 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
446 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
447 * Sets the label text of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
448 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
449 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
450 * @param label The text label. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
451 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
452 void gaim_request_field_set_label(GaimRequestField *field, const char *label); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
453 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
454 /** |
7904
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
455 * Sets whether or not a field is visible. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
456 * |
8285
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
457 * @param field The field. |
7904
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
458 * @param visible TRUE if visible, or FALSE if not. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
459 */ |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
460 void gaim_request_field_set_visible(GaimRequestField *field, gboolean visible); |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
461 |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
462 /** |
8285
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
463 * Sets the type hint for the field. |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
464 * |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
465 * This is optionally used by the UIs to provide such features as |
10791
2ab4b5acc8d1
[gaim-migrate @ 12433]
Luke Schierer <lschiere@pidgin.im>
parents:
10566
diff
changeset
|
466 * auto-completion for type hints like "account" and "screenname". |
8285
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
467 * |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
468 * @param field The field. |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
469 * @param type_hint The type hint. |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
470 */ |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
471 void gaim_request_field_set_type_hint(GaimRequestField *field, |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
472 const char *type_hint); |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
473 |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
474 /** |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
475 * Sets whether or not a field is required. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
476 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
477 * @param field The field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
478 * @param required TRUE if required, or FALSE. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
479 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
480 void gaim_request_field_set_required(GaimRequestField *field, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
481 gboolean required); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
482 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
483 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
484 * Returns the type of a 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 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
487 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
488 * @return The field's type. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
489 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
490 GaimRequestFieldType gaim_request_field_get_type(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
491 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
492 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
493 * Returns the ID of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
494 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
495 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
496 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
497 * @return The ID |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
498 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
499 const char *gaim_request_field_get_id(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
500 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
501 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
502 * Returns the label text of a field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
503 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
504 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
505 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
506 * @return The label text. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
507 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
508 const char *gaim_request_field_get_label(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
509 |
7904
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
510 /** |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
511 * Returns whether or not a field is visible. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
512 * |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
513 * @param field The field. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
514 * |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
515 * @return TRUE if the field is visible. FALSE otherwise. |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
516 */ |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
517 gboolean gaim_request_field_is_visible(const GaimRequestField *field); |
9b478c6e0bfa
[gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents:
7902
diff
changeset
|
518 |
8285
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
519 /** |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
520 * Returns the field's type hint. |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
521 * |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
522 * @param field The field. |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
523 * |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
524 * @return The field's type hint. |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
525 */ |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
526 const char *gaim_request_field_get_type_hint(const GaimRequestField *field); |
d335cc7bca54
[gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
527 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
528 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
529 * Returns whether or not a field is required. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
530 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
531 * @param field The field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
532 * |
8735
92cbf9713795
[gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents:
8699
diff
changeset
|
533 * @return TRUE if the field is required, or FALSE. |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
534 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
535 gboolean gaim_request_field_is_required(const GaimRequestField *field); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
536 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
537 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
538 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
539 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
540 /** @name String Field API */ |
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 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
543 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
544 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
545 * Creates a string request field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
546 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
547 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
548 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
549 * @param default_value The optional default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
550 * @param multiline Whether or not this should be a multiline string. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
551 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
552 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
553 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
554 GaimRequestField *gaim_request_field_string_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
555 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
556 const char *default_value, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
557 gboolean multiline); |
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 * Sets the default value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
561 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
562 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
563 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
564 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
565 void gaim_request_field_string_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
566 const char *default_value); |
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 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
569 * Sets the value in a string field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
570 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
571 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
572 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
573 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
574 void gaim_request_field_string_set_value(GaimRequestField *field, |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
575 const char *value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
576 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
577 /** |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
578 * Sets whether or not a string field is masked |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
579 * (commonly used for password fields). |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
580 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
581 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
582 * @param masked The masked value. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
583 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
584 void gaim_request_field_string_set_masked(GaimRequestField *field, |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
585 gboolean masked); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
586 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
587 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
588 * Sets whether or not a string field is editable. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
589 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
590 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
591 * @param editable The editable value. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
592 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
593 void gaim_request_field_string_set_editable(GaimRequestField *field, |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
594 gboolean editable); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
595 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
596 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
597 * Returns the default value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
598 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
599 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
600 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
601 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
602 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
603 const char *gaim_request_field_string_get_default_value( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
604 const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
605 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
606 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
607 * Returns the user-entered value in a string field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
608 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
609 * @param field The field. |
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 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
612 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
613 const char *gaim_request_field_string_get_value(const GaimRequestField *field); |
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 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
616 * Returns whether or not a string field is multi-line. |
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 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
619 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
620 * @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
|
621 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
622 gboolean gaim_request_field_string_is_multiline(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
623 |
7047
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
624 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
625 * Returns whether or not a string field is masked. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
626 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
627 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
628 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
629 * @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
|
630 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
631 gboolean gaim_request_field_string_is_masked(const GaimRequestField *field); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
632 |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
633 /** |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
634 * Returns whether or not a string field is editable. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
635 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
636 * @param field The field. |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
637 * |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
638 * @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
|
639 */ |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
640 gboolean gaim_request_field_string_is_editable(const GaimRequestField *field); |
7d1909655fd0
[gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
641 |
5807
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 |
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 /** @name Integer Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
646 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
647 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
648 |
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 * Creates an integer 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 id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
653 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
654 * @param default_value The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
655 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
656 * @return The new field. |
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 GaimRequestField *gaim_request_field_int_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
659 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
660 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
661 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
662 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
663 * Sets the default value in an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
664 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
665 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
666 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
667 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
668 void gaim_request_field_int_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
669 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
670 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
671 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
672 * Sets the value in an integer field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
673 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
674 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
675 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
676 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
677 void gaim_request_field_int_set_value(GaimRequestField *field, int value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
678 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
679 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
680 * Returns the default value in an integer field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
681 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
682 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
683 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
684 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
685 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
686 int gaim_request_field_int_get_default_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
687 |
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 * Returns the user-entered value in an integer field. |
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 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
692 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
693 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
694 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
695 int gaim_request_field_int_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
696 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
697 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
698 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
699 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
700 /** @name Boolean Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
701 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
702 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
703 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
704 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
705 * Creates a boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
706 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
707 * This is often represented as a checkbox. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
708 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
709 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
710 * @param text The text label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
711 * @param default_value The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
712 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
713 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
714 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
715 GaimRequestField *gaim_request_field_bool_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
716 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
717 gboolean default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
718 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
719 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
720 * Sets the default value in an boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
721 * |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
722 * @param field The field. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
723 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
724 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
725 void gaim_request_field_bool_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
726 gboolean default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
727 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
728 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
729 * Sets the value in an boolean field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
730 * |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
731 * @param field The field. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
732 * @param value The value. |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
733 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
734 void gaim_request_field_bool_set_value(GaimRequestField *field, |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
735 gboolean value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
736 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
737 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
738 * Returns the default value in an boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
739 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
740 * @param field The field. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
741 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
742 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
743 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
744 gboolean gaim_request_field_bool_get_default_value( |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
745 const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
746 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
747 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
748 * Returns the user-entered value in an boolean field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
749 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
750 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
751 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
752 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
753 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
754 gboolean gaim_request_field_bool_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
755 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
756 /*@}*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
757 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
758 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
759 /** @name Choice Field API */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
760 /**************************************************************************/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
761 /*@{*/ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
762 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
763 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
764 * Creates a multiple choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
765 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
766 * This is often represented as a group of radio buttons. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
767 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
768 * @param id The field ID. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
769 * @param text The optional label of the field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
770 * @param default_value The default choice. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
771 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
772 * @return The new field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
773 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
774 GaimRequestField *gaim_request_field_choice_new(const char *id, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
775 const char *text, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
776 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
777 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
778 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
779 * Adds a choice to a multiple choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
780 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
781 * @param field The choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
782 * @param label The choice label. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
783 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
784 void gaim_request_field_choice_add(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
785 const char *label); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
786 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
787 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
788 * Sets the default value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
789 * |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
790 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
791 * @param default_value The default value. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
792 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
793 void gaim_request_field_choice_set_default_value(GaimRequestField *field, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
794 int default_value); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
795 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
796 /** |
5808
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
797 * Sets the value in an choice field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
798 * |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
799 * @param field The field. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
800 * @param value The value. |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
801 */ |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
802 void gaim_request_field_choice_set_value(GaimRequestField *field, int value); |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
803 |
133e86584f4b
[gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents:
5807
diff
changeset
|
804 /** |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
805 * Returns the default value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
806 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
807 * @param field The field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
808 * |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
809 * @return The default value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
810 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
811 int gaim_request_field_choice_get_default_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
812 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
813 /** |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
814 * Returns the user-entered value in an choice field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
815 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
816 * @param field The field. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
817 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
818 * @return The value. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
819 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
820 int gaim_request_field_choice_get_value(const GaimRequestField *field); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
821 |
5809
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
822 /** |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
823 * Returns a list of labels in a choice field. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
824 * |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
825 * @param field The field. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
826 * |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
827 * @return The list of labels. |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
828 */ |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
829 GList *gaim_request_field_choice_get_labels(const GaimRequestField *field); |
0a661f6d65e3
[gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents:
5808
diff
changeset
|
830 |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
831 /*@}*/ |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
832 |
5477 | 833 /**************************************************************************/ |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
834 /** @name List Field API */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
835 /**************************************************************************/ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
836 /*@{*/ |
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 /** |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
839 * Creates a multiple list item field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
840 * |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
841 * @param id The field ID. |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
842 * @param text The optional label of the field. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
843 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
844 * @return The new field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
845 */ |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
846 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
|
847 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
848 /** |
7899
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
849 * Sets whether or not a list field allows multiple selection. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
850 * |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
851 * @param field The list field. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
852 * @param multi_select TRUE if multiple selection is enabled, |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
853 * or FALSE otherwise. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
854 */ |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
855 void gaim_request_field_list_set_multi_select(GaimRequestField *field, |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
856 gboolean multi_select); |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
857 |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
858 /** |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
859 * Returns whether or not a list field allows multiple selection. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
860 * |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
861 * @param field The list field. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
862 * |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
863 * @return TRUE if multiple selection is enabled, or FALSE otherwise. |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
864 */ |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
865 gboolean gaim_request_field_list_get_multi_select( |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
866 const GaimRequestField *field); |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
867 |
7b64108b8ae3
[gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents:
7898
diff
changeset
|
868 /** |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
869 * Returns the data for a particular item. |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
870 * |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
871 * @param field The list field. |
9000 | 872 * @param text The item text. |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
873 * |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
874 * @return The data associated with the item. |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
875 */ |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
876 void *gaim_request_field_list_get_data(const GaimRequestField *field, |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
877 const char *text); |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
878 |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
879 /** |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
880 * Adds an item to a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
881 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
882 * @param field The list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
883 * @param item The list item. |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
884 * @param data The associated data. |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
885 */ |
7909
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
886 void gaim_request_field_list_add(GaimRequestField *field, |
5be22af4ebfc
[gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents:
7905
diff
changeset
|
887 const char *item, void *data); |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
888 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
889 /** |
7902
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
890 * Adds a selected item to the list field. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
891 * |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
892 * @param field The field. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
893 * @param item The item to add. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
894 */ |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
895 void gaim_request_field_list_add_selected(GaimRequestField *field, |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
896 const char *item); |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
897 |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
898 /** |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
899 * Clears the list of selected items in a list field. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
900 * |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
901 * @param field The field. |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
902 */ |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
903 void gaim_request_field_list_clear_selected(GaimRequestField *field); |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
904 |
3ca501305ac5
[gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents:
7901
diff
changeset
|
905 /** |
7901
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
906 * Sets a list of selected items in a list field. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
907 * |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
908 * @param field The field. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
909 * @param items The list of selected items. |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
910 */ |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
911 void gaim_request_field_list_set_selected(GaimRequestField *field, |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
912 GList *items); |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
913 |
4344f7fad009
[gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents:
7899
diff
changeset
|
914 /** |
7964
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
915 * 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
|
916 * |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
917 * @param field The field. |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
918 * @param item The item. |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
919 * |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
920 * @return TRUE if the item is selected. FALSE otherwise. |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
921 */ |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
922 gboolean gaim_request_field_list_is_selected(const GaimRequestField *field, |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
923 const char *item); |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
924 |
a5c70e43ee43
[gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents:
7963
diff
changeset
|
925 /** |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
926 * Returns a list of selected items in a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
927 * |
7963
96b71ea64386
[gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents:
7909
diff
changeset
|
928 * To retrieve the data for each item, use |
96b71ea64386
[gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents:
7909
diff
changeset
|
929 * gaim_request_field_list_get_data(). |
96b71ea64386
[gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents:
7909
diff
changeset
|
930 * |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
931 * @param field The field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
932 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
933 * @return The list of selected items. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
934 */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
935 const GList *gaim_request_field_list_get_selected( |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
936 const GaimRequestField *field); |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
937 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
938 /** |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
939 * Returns a list of items in a list field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
940 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
941 * @param field The field. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
942 * |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
943 * @return The list of items. |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
944 */ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
945 const GList *gaim_request_field_list_get_items(const GaimRequestField *field); |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
946 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
947 /*@}*/ |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
948 |
7905
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
949 /**************************************************************************/ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
950 /** @name Label Field API */ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
951 /**************************************************************************/ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
952 /*@{*/ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
953 |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
954 /** |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
955 * Creates a label field. |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
956 * |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
957 * @param id The field ID. |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
958 * @param text The label of the field. |
7905
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
959 * |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
960 * @return The new field. |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
961 */ |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
962 GaimRequestField *gaim_request_field_label_new(const char *id, |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
963 const char *text); |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
964 |
1d0bc32f8038
[gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents:
7904
diff
changeset
|
965 /*@}*/ |
7898
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
966 |
9c0ea21997a9
[gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents:
7047
diff
changeset
|
967 /**************************************************************************/ |
11357 | 968 /** @name Image Field API */ |
969 /**************************************************************************/ | |
970 /*@{*/ | |
971 | |
972 /** | |
973 * Creates an image field. | |
974 * | |
975 * @param id The field ID. | |
976 * @param text The label of the field. | |
11502
b858f992b566
[gaim-migrate @ 13747]
Richard Laager <rlaager@wiktel.com>
parents:
11357
diff
changeset
|
977 * @param buf The image data. |
b858f992b566
[gaim-migrate @ 13747]
Richard Laager <rlaager@wiktel.com>
parents:
11357
diff
changeset
|
978 * @param size The size of the data in @a buffer. |
11357 | 979 * |
980 * @return The new field. | |
981 */ | |
982 GaimRequestField *gaim_request_field_image_new(const char *id, const char *text, | |
983 const char *buf, gsize size); | |
984 | |
985 /** | |
12399
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
986 * Sets the scale factors of an image field. |
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
987 * |
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
988 * @param field The image field. |
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
989 * @param x The x scale factor. |
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
990 * @param y The y scale factor. |
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
991 */ |
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
992 void gaim_request_field_image_set_scale(GaimRequestField *field, unsigned int x, unsigned int y); |
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
993 |
6cbffa7a9089
[gaim-migrate @ 14706]
Richard Laager <rlaager@wiktel.com>
parents:
11502
diff
changeset
|
994 /** |
11357 | 995 * Returns pointer to the image. |
996 * | |
997 * @param field The image field. | |
998 * | |
999 * @return Pointer to the image. | |
1000 */ | |
1001 const char *gaim_request_field_image_get_buffer(GaimRequestField *field); | |
1002 | |
1003 /** | |
1004 * Returns size (in bytes) of the image. | |
1005 * | |
1006 * @param field The image field. | |
1007 * | |
1008 * @return Size of the image. | |
1009 */ | |
1010 gsize gaim_request_field_image_get_size(GaimRequestField *field); | |
1011 | |
1012 /** | |
1013 * Returns X scale coefficient of the image. | |
1014 * | |
1015 * @param field The image field. | |
1016 * | |
1017 * @return X scale coefficient of the image. | |
1018 */ | |
1019 unsigned int gaim_request_field_image_get_scale_x(GaimRequestField *field); | |
1020 | |
1021 /** | |
1022 * Returns Y scale coefficient of the image. | |
1023 * | |
1024 * @param field The image field. | |
1025 * | |
1026 * @return Y scale coefficient of the image. | |
1027 */ | |
1028 unsigned int gaim_request_field_image_get_scale_y(GaimRequestField *field); | |
1029 | |
1030 /*@}*/ | |
1031 | |
1032 /**************************************************************************/ | |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1033 /** @name Account Field API */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1034 /**************************************************************************/ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1035 /*@{*/ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1036 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1037 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1038 * Creates an account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1039 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1040 * By default, this field will not show offline accounts. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1041 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1042 * @param id The field ID. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1043 * @param text The text label of the field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1044 * @param account The optional default account. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1045 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1046 * @return The new field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1047 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1048 GaimRequestField *gaim_request_field_account_new(const char *id, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1049 const char *text, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1050 GaimAccount *account); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1051 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1052 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1053 * Sets the default account on an account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1054 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1055 * @param field The account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1056 * @param default_value The default account. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1057 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1058 void gaim_request_field_account_set_default_value(GaimRequestField *field, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1059 GaimAccount *default_value); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1060 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1061 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1062 * Sets the account in an account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1063 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1064 * @param field The account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1065 * @param value The account. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1066 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1067 void gaim_request_field_account_set_value(GaimRequestField *field, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1068 GaimAccount *value); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1069 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1070 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1071 * Sets whether or not to show all accounts in an account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1072 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1073 * If TRUE, all accounts, online or offline, will be shown. If FALSE, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1074 * only online accounts will be shown. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1075 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1076 * @param field The account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1077 * @param show_all Whether or not to show all accounts. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1078 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1079 void gaim_request_field_account_set_show_all(GaimRequestField *field, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1080 gboolean show_all); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1081 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1082 /** |
8289
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1083 * Sets the account filter function in an account field. |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1084 * |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1085 * This function will determine which accounts get displayed and which |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1086 * don't. |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1087 * |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1088 * @param field The account field. |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1089 * @param filter_func The account filter function. |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1090 */ |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1091 void gaim_request_field_account_set_filter(GaimRequestField *field, |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1092 GaimFilterAccountFunc filter_func); |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1093 |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1094 /** |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1095 * Returns the default account in an account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1096 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1097 * @param field The field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1098 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1099 * @return The default account. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1100 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1101 GaimAccount *gaim_request_field_account_get_default_value( |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1102 const GaimRequestField *field); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1103 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1104 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1105 * Returns the user-entered account in an account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1106 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1107 * @param field The field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1108 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1109 * @return The user-entered account. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1110 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1111 GaimAccount *gaim_request_field_account_get_value( |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1112 const GaimRequestField *field); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1113 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1114 /** |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1115 * Returns whether or not to show all accounts in an account field. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1116 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1117 * If TRUE, all accounts, online or offline, will be shown. If FALSE, |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1118 * only online accounts will be shown. |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1119 * |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1120 * @param field The account field. |
9000 | 1121 * @return Whether or not to show all accounts. |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1122 */ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1123 gboolean gaim_request_field_account_get_show_all( |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1124 const GaimRequestField *field); |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1125 |
8289
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1126 /** |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1127 * Returns the account filter function in an account field. |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1128 * |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1129 * This function will determine which accounts get displayed and which |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1130 * don't. |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1131 * |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1132 * @param field The account field. |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1133 * |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1134 * @return The account filter function. |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1135 */ |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1136 GaimFilterAccountFunc gaim_request_field_account_get_filter( |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1137 const GaimRequestField *field); |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8286
diff
changeset
|
1138 |
8286
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1139 /*@}*/ |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1140 |
89d9d004e3f3
[gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents:
8285
diff
changeset
|
1141 /**************************************************************************/ |
5477 | 1142 /** @name Request API */ |
1143 /**************************************************************************/ | |
1144 /*@{*/ | |
1145 | |
1146 /** | |
1147 * Prompts the user for text input. | |
1148 * | |
11201 | 1149 * @param handle The plugin or connection handle. For some |
1150 * things this is EXTREMELY important. The | |
1151 * handle is used to programmatically close | |
1152 * the request dialog when it is no longer | |
1153 * needed. For PRPLs this is often a pointer | |
1154 * to the GaimConnection instance. For plugins | |
1155 * this should be a similar, unique memory | |
1156 * location. This value is important because | |
1157 * it allows a request to be closed, say, when | |
1158 * you sign offline. If the request is NOT | |
1159 * closed it is VERY likely to cause a crash | |
1160 * whenever the callback handler functions are | |
1161 * triggered. | |
5477 | 1162 * @param title The title of the message. |
1163 * @param primary The main point of the message. | |
1164 * @param secondary The secondary information. | |
1165 * @param default_value The default value. | |
5482
a41149ee8a29
[gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents:
5477
diff
changeset
|
1166 * @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
|
1167 * @param masked TRUE if the inputted text should be masked in some way. |
8699 | 1168 * @param hint Optionally suggest how the input box should appear. |
1169 * Use "html," for example, to allow the user to enter | |
1170 * HTML. | |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1171 * @param ok_text The text for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1172 * @param ok_cb The callback for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1173 * @param cancel_text The text for the @c Cancel button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1174 * @param cancel_cb The callback for the @c Cancel button. |
5477 | 1175 * @param user_data The data to pass to the callback. |
1176 * | |
1177 * @return A UI-specific handle. | |
1178 */ | |
1179 void *gaim_request_input(void *handle, const char *title, | |
1180 const char *primary, const char *secondary, | |
6035
8c44020a958e
[gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents:
5944
diff
changeset
|
1181 const char *default_value, |
8697 | 1182 gboolean multiline, gboolean masked, gchar *hint, |
5477 | 1183 const char *ok_text, GCallback ok_cb, |
1184 const char *cancel_text, GCallback cancel_cb, | |
1185 void *user_data); | |
1186 | |
1187 /** | |
1188 * Prompts the user for multiple-choice input. | |
1189 * | |
11201 | 1190 * @param handle The plugin or connection handle. For some |
1191 * things this is EXTREMELY important. See | |
1192 * the comments on gaim_request_input. | |
5477 | 1193 * @param title The title of the message. |
1194 * @param primary The main point of the message. | |
1195 * @param secondary The secondary information. | |
1196 * @param default_value The default value. | |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1197 * @param ok_text The text for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1198 * @param ok_cb The callback for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1199 * @param cancel_text The text for the @c Cancel button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1200 * @param cancel_cb The callback for the @c Cancel button. |
5477 | 1201 * @param user_data The data to pass to the callback. |
10233 | 1202 * @param ... The choices. This argument list should be |
1203 * terminated with a NULL parameter. | |
5477 | 1204 * |
1205 * @return A UI-specific handle. | |
1206 */ | |
1207 void *gaim_request_choice(void *handle, const char *title, | |
1208 const char *primary, const char *secondary, | |
1209 unsigned int default_value, | |
1210 const char *ok_text, GCallback ok_cb, | |
1211 const char *cancel_text, GCallback cancel_cb, | |
10229 | 1212 void *user_data, ...); |
5477 | 1213 |
1214 /** | |
1215 * Prompts the user for multiple-choice input. | |
1216 * | |
11201 | 1217 * @param handle The plugin or connection handle. For some |
1218 * things this is EXTREMELY important. See | |
1219 * the comments on gaim_request_input. | |
5477 | 1220 * @param title The title of the message. |
1221 * @param primary The main point of the message. | |
1222 * @param secondary The secondary information. | |
1223 * @param default_value The default value. | |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1224 * @param ok_text The text for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1225 * @param ok_cb The callback for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1226 * @param cancel_text The text for the @c Cancel button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1227 * @param cancel_cb The callback for the @c Cancel button. |
5477 | 1228 * @param user_data The data to pass to the callback. |
10233 | 1229 * @param choices The choices. This argument list should be |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1230 * terminated with a @c NULL parameter. |
5477 | 1231 * |
1232 * @return A UI-specific handle. | |
1233 */ | |
1234 void *gaim_request_choice_varg(void *handle, const char *title, | |
1235 const char *primary, const char *secondary, | |
1236 unsigned int default_value, | |
1237 const char *ok_text, GCallback ok_cb, | |
1238 const char *cancel_text, GCallback cancel_cb, | |
10229 | 1239 void *user_data, va_list choices); |
5477 | 1240 |
1241 /** | |
1242 * Prompts the user for an action. | |
1243 * | |
1244 * This is often represented as a dialog with a button for each action. | |
1245 * | |
11201 | 1246 * @param handle The plugin or connection handle. For some |
1247 * things this is EXTREMELY important. See | |
1248 * the comments on gaim_request_input. | |
5477 | 1249 * @param title The title of the message. |
1250 * @param primary The main point of the message. | |
1251 * @param secondary The secondary information. | |
1252 * @param default_action The default value. | |
1253 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
1254 * @param action_count The number of actions. |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
1255 * @param ... A list of actions. |
5477 | 1256 * |
1257 * @return A UI-specific handle. | |
1258 */ | |
1259 void *gaim_request_action(void *handle, const char *title, | |
1260 const char *primary, const char *secondary, | |
1261 unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
1262 void *user_data, size_t action_count, ...); |
5477 | 1263 |
1264 /** | |
1265 * Prompts the user for an action. | |
1266 * | |
1267 * This is often represented as a dialog with a button for each action. | |
1268 * | |
11201 | 1269 * @param handle The plugin or connection handle. For some |
1270 * things this is EXTREMELY important. See | |
1271 * the comments on gaim_request_input. | |
5477 | 1272 * @param title The title of the message. |
1273 * @param primary The main point of the message. | |
1274 * @param secondary The secondary information. | |
1275 * @param default_action The default value. | |
1276 * @param user_data The data to pass to the callback. | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
1277 * @param action_count The number of actions. |
5477 | 1278 * @param actions A list of actions and callbacks. |
1279 * | |
1280 * @return A UI-specific handle. | |
1281 */ | |
1282 void *gaim_request_action_varg(void *handle, const char *title, | |
1283 const char *primary, const char *secondary, | |
1284 unsigned int default_action, | |
5496
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
1285 void *user_data, size_t action_count, |
b7c0be69c749
[gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents:
5482
diff
changeset
|
1286 va_list actions); |
5477 | 1287 |
1288 /** | |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1289 * Displays groups of fields for the user to fill in. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1290 * |
11201 | 1291 * @param handle The plugin or connection handle. For some |
1292 * things this is EXTREMELY important. See | |
1293 * the comments on gaim_request_input. | |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1294 * @param title The title of the message. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1295 * @param primary The main point of the message. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1296 * @param secondary The secondary information. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1297 * @param fields The list of fields. |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1298 * @param ok_text The text for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1299 * @param ok_cb The callback for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1300 * @param cancel_text The text for the @c Cancel button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1301 * @param cancel_cb The callback for the @c Cancel button. |
5807
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1302 * @param user_data The data to pass to the callback. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1303 * |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1304 * @return A UI-specific handle. |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1305 */ |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1306 void *gaim_request_fields(void *handle, const char *title, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1307 const char *primary, const char *secondary, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1308 GaimRequestFields *fields, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1309 const char *ok_text, GCallback ok_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1310 const char *cancel_text, GCallback cancel_cb, |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1311 void *user_data); |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1312 |
11001789cb22
[gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents:
5498
diff
changeset
|
1313 /** |
5477 | 1314 * Closes a request. |
1315 * | |
1316 * @param type The request type. | |
1317 * @param uihandle The request UI handle. | |
1318 */ | |
1319 void gaim_request_close(GaimRequestType type, void *uihandle); | |
1320 | |
1321 /** | |
1322 * Closes all requests registered with the specified handle. | |
1323 * | |
1324 * @param handle The handle. | |
1325 */ | |
1326 void gaim_request_close_with_handle(void *handle); | |
1327 | |
1328 /** | |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1329 * A wrapper for gaim_request_action() that uses @c Yes and @c No buttons. |
5477 | 1330 */ |
1331 #define gaim_request_yes_no(handle, title, primary, secondary, \ | |
1332 default_action, user_data, yes_cb, no_cb) \ | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1333 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1334 (default_action), (user_data), 2, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1335 _("Yes"), (yes_cb), _("No"), (no_cb)) |
5477 | 1336 |
1337 /** | |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1338 * A wrapper for gaim_request_action() that uses @c OK and @c Cancel buttons. |
5477 | 1339 */ |
1340 #define gaim_request_ok_cancel(handle, title, primary, secondary, \ | |
1341 default_action, user_data, ok_cb, cancel_cb) \ | |
5498
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1342 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1343 (default_action), (user_data), 2, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1344 _("OK"), (ok_cb), _("Cancel"), (cancel_cb)) |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1345 |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1346 /** |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1347 * 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
|
1348 */ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1349 #define gaim_request_accept_cancel(handle, title, primary, secondary, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1350 default_action, user_data, accept_cb, \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1351 cancel_cb) \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1352 gaim_request_action((handle), (title), (primary), (secondary), \ |
cce2d7868c78
[gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents:
5496
diff
changeset
|
1353 (default_action), (user_data), 2, \ |
12716
c08fcbcc6a3e
[gaim-migrate @ 15060]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12399
diff
changeset
|
1354 _("_Accept"), (accept_cb), _("Cancel"), (cancel_cb)) |
5477 | 1355 |
8843 | 1356 /** |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1357 * Displays a file selector request dialog. Returns the selected filename to |
9502 | 1358 * the callback. Can be used for either opening a file or saving a file. |
8843 | 1359 * |
11201 | 1360 * @param handle The plugin or connection handle. For some |
1361 * things this is EXTREMELY important. See | |
1362 * the comments on gaim_request_input. | |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1363 * @param title The title for the dialog (may be @c NULL) |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1364 * @param filename The default filename (may be @c NULL) |
9502 | 1365 * @param savedialog True if this dialog is being used to save a file. |
1366 * False if it is being used to open a file. | |
13267
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1367 * @param ok_cb The callback for the @c OK button. |
f3ae450fb947
[gaim-migrate @ 15633]
Richard Laager <rlaager@wiktel.com>
parents:
12716
diff
changeset
|
1368 * @param cancel_cb The callback for the @c Cancel button. |
8843 | 1369 * @param user_data The data to pass to the callback. |
1370 * | |
1371 * @return A UI-specific handle. | |
1372 */ | |
1373 void *gaim_request_file(void *handle, const char *title, const char *filename, | |
9502 | 1374 gboolean savedialog, |
1375 GCallback ok_cb, GCallback cancel_cb, | |
1376 void *user_data); | |
8843 | 1377 |
13282
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1378 /** |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1379 * Displays a folder select dialog. Returns the selected filename to |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1380 * the callback. |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1381 * |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1382 * @param handle The plugin or connection handle. For some |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1383 * things this is EXTREMELY important. See |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1384 * the comments on gaim_request_input. |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1385 * @param title The title for the dialog (may be @c NULL) |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1386 * @param dirname The default directory name (may be @c NULL) |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1387 * @param ok_cb The callback for the @c OK button. |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1388 * @param cancel_cb The callback for the @c Cancel button. |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1389 * @param user_data The data to pass to the callback. |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1390 * |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1391 * @return A UI-specific handle. |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1392 */ |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1393 void *gaim_request_folder(void *handle, const char *title, const char *dirname, |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1394 GCallback ok_cb, GCallback cancel_cb, |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1395 void *user_data); |
a651bfe0a922
[gaim-migrate @ 15648]
Richard Laager <rlaager@wiktel.com>
parents:
13269
diff
changeset
|
1396 |
9502 | 1397 /*@}*/ |
8843 | 1398 |
5477 | 1399 /**************************************************************************/ |
10566
62fc579810f4
[gaim-migrate @ 11949]
Etan Reisner <pidgin@unreliablesource.net>
parents:
10233
diff
changeset
|
1400 /** @name UI Registration Functions */ |
5477 | 1401 /**************************************************************************/ |
1402 /*@{*/ | |
1403 | |
1404 /** | |
1405 * Sets the UI operations structure to be used when displaying a | |
1406 * request. | |
1407 * | |
1408 * @param ops The UI operations structure. | |
1409 */ | |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
1410 void gaim_request_set_ui_ops(GaimRequestUiOps *ops); |
5477 | 1411 |
1412 /** | |
1413 * Returns the UI operations structure to be used when displaying a | |
1414 * request. | |
1415 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6035
diff
changeset
|
1416 * @return The UI operations structure. |
5477 | 1417 */ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
1418 GaimRequestUiOps *gaim_request_get_ui_ops(void); |
5477 | 1419 |
1420 /*@}*/ | |
1421 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
1422 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
1423 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
1424 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5809
diff
changeset
|
1425 |
5477 | 1426 #endif /* _GAIM_REQUEST_H_ */ |