Mercurial > pidgin
annotate plugins/perl/common/Request.xs @ 12910:3097275dbbdd
[gaim-migrate @ 15263]
Fix the perl compilation. Hopefully somebody will evaluate if this is correct.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Tue, 17 Jan 2006 06:09:47 +0000 |
parents | 3ab3e68df807 |
children |
rev | line source |
---|---|
11118 | 1 #include "module.h" |
2 | |
11589 | 3 /* This breaks on faceprint's amd64 box |
4 void * | |
5 gaim_request_action_varg(handle, title, primary, secondary, default_action, user_data, action_count, actions) | |
6 void * handle | |
7 const char *title | |
8 const char *primary | |
9 const char *secondary | |
10 unsigned int default_action | |
11 void *user_data | |
12 size_t action_count | |
13 va_list actions | |
14 */ | |
15 | |
16 | |
11170 | 17 typedef struct { |
18 char *cancel_cb; | |
19 char *ok_cb; | |
20 } GaimPerlRequestData; | |
21 | |
22 /********************************************************/ | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
23 /* */ |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
24 /* Callback function that calls a perl subroutine */ |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
25 /* */ |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
26 /* The void * field data is being used as a way to hide */ |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
27 /* the perl sub's name in a GaimPerlRequestData */ |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
28 /* */ |
11170 | 29 /********************************************************/ |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
30 static void |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
31 gaim_perl_request_ok_cb(void * data, GaimRequestFields *fields) |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
32 { |
11170 | 33 GaimPerlRequestData *gpr = (GaimPerlRequestData *)data; |
34 | |
35 dSP; | |
36 ENTER; | |
37 SAVETMPS; | |
38 PUSHMARK(sp); | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
39 |
11170 | 40 XPUSHs(gaim_perl_bless_object(fields, "Gaim::Request::Fields")); |
41 PUTBACK; | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
42 |
11170 | 43 call_pv(gpr->ok_cb, G_EVAL | G_SCALAR); |
44 SPAGAIN; | |
45 | |
46 PUTBACK; | |
47 FREETMPS; | |
48 LEAVE; | |
49 } | |
50 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
51 static void |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
52 gaim_perl_request_cancel_cb(void * data, GaimRequestFields *fields) |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
53 { |
11170 | 54 |
55 GaimPerlRequestData *gpr = (GaimPerlRequestData *)data; | |
56 | |
57 dSP; | |
58 ENTER; | |
59 SAVETMPS; | |
60 PUSHMARK(sp); | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
61 |
11170 | 62 XPUSHs(gaim_perl_bless_object(fields, "Gaim::Request::Fields")); |
63 PUTBACK; | |
64 call_pv(gpr->cancel_cb, G_EVAL | G_SCALAR); | |
65 SPAGAIN; | |
66 | |
67 PUTBACK; | |
68 FREETMPS; | |
69 LEAVE; | |
70 } | |
71 | |
11290 | 72 MODULE = Gaim::Request PACKAGE = Gaim::Request PREFIX = gaim_request_ |
73 PROTOTYPES: ENABLE | |
11118 | 74 |
75 void * | |
11290 | 76 gaim_request_input(handle, title, primary, secondary, default_value, multiline, masked, hint, ok_text, ok_cb, cancel_text, cancel_cb) |
77 Gaim::Plugin handle | |
78 const char * title | |
79 const char * primary | |
80 const char * secondary | |
81 const char * default_value | |
82 gboolean multiline | |
83 gboolean masked | |
84 gchar * hint | |
85 const char * ok_text | |
86 SV * ok_cb | |
87 const char * cancel_text | |
88 SV * cancel_cb | |
89 CODE: | |
90 GaimPerlRequestData *gpr; | |
91 STRLEN len; | |
92 char *basename, *package; | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
93 |
11290 | 94 basename = g_path_get_basename(handle->path); |
95 gaim_perl_normalize_script_name(basename); | |
96 package = g_strdup_printf("Gaim::Script::%s", basename); | |
97 gpr = g_new(GaimPerlRequestData, 1); | |
98 gpr->ok_cb = g_strdup_printf("%s::%s", package, SvPV(ok_cb, len)); | |
99 gpr->cancel_cb = g_strdup_printf("%s::%s", package, SvPV(cancel_cb, len)); | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
100 |
11290 | 101 RETVAL = gaim_request_input(handle, title, primary, secondary, default_value, multiline, masked, hint, ok_text, G_CALLBACK(gaim_perl_request_ok_cb), cancel_text, G_CALLBACK(gaim_perl_request_cancel_cb), gpr); |
102 OUTPUT: | |
103 RETVAL | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
104 |
11118 | 105 void * |
11290 | 106 gaim_request_file(handle, title, filename, savedialog, ok_cb, cancel_cb) |
107 Gaim::Plugin handle | |
108 const char * title | |
109 const char * filename | |
110 gboolean savedialog | |
111 SV * ok_cb | |
112 SV * cancel_cb | |
113 CODE: | |
114 GaimPerlRequestData *gpr; | |
115 STRLEN len; | |
116 char *basename, *package; | |
11118 | 117 |
11290 | 118 basename = g_path_get_basename(handle->path); |
119 gaim_perl_normalize_script_name(basename); | |
120 package = g_strdup_printf("Gaim::Script::%s", basename); | |
121 gpr = g_new(GaimPerlRequestData, 1); | |
122 gpr->ok_cb = g_strdup_printf("%s::%s", package, SvPV(ok_cb, len)); | |
123 gpr->cancel_cb = g_strdup_printf("%s::%s", package, SvPV(cancel_cb, len)); | |
11118 | 124 |
11290 | 125 RETVAL = gaim_request_file(handle, title, filename, savedialog, G_CALLBACK(gaim_perl_request_ok_cb), G_CALLBACK(gaim_perl_request_cancel_cb), gpr); |
126 OUTPUT: | |
127 RETVAL | |
11118 | 128 |
11170 | 129 void * |
130 gaim_request_fields(handle, title, primary, secondary, fields, ok_text, ok_cb, cancel_text, cancel_cb) | |
131 Gaim::Plugin handle | |
132 const char * title | |
133 const char * primary | |
134 const char * secondary | |
135 Gaim::Request::Fields fields | |
136 const char * ok_text | |
137 SV * ok_cb | |
138 const char * cancel_text | |
139 SV * cancel_cb | |
140 CODE: | |
141 GaimPerlRequestData *gpr; | |
142 STRLEN len; | |
143 char *basename, *package; | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
144 |
11170 | 145 basename = g_path_get_basename(handle->path); |
146 gaim_perl_normalize_script_name(basename); | |
147 package = g_strdup_printf("Gaim::Script::%s", basename); | |
148 gpr = g_new(GaimPerlRequestData, 1); | |
149 gpr->ok_cb = g_strdup_printf("%s::%s", package, SvPV(ok_cb, len)); | |
150 gpr->cancel_cb = g_strdup_printf("%s::%s", package, SvPV(cancel_cb, len)); | |
11589 | 151 |
11170 | 152 RETVAL = gaim_request_fields(handle, title, primary, secondary, fields, ok_text, G_CALLBACK(gaim_perl_request_ok_cb), cancel_text, G_CALLBACK(gaim_perl_request_cancel_cb), gpr); |
153 OUTPUT: | |
154 RETVAL | |
155 | |
11589 | 156 void |
11118 | 157 gaim_request_close(type, uihandle) |
158 Gaim::RequestType type | |
11589 | 159 void * uihandle |
11118 | 160 |
11589 | 161 void |
11118 | 162 gaim_request_close_with_handle(handle) |
11589 | 163 void * handle |
11118 | 164 |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
165 MODULE = Gaim::Request PACKAGE = Gaim::Request::Field PREFIX = gaim_request_field_ |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
166 PROTOTYPES: ENABLE |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
167 |
11118 | 168 Gaim::Account |
169 gaim_request_field_account_get_default_value(field) | |
170 Gaim::Request::Field field | |
171 | |
11130 | 172 IV |
11118 | 173 gaim_request_field_account_get_filter(field) |
174 Gaim::Request::Field field | |
11130 | 175 CODE: |
176 RETVAL = PTR2IV(gaim_request_field_account_get_filter(field)); | |
177 OUTPUT: | |
178 RETVAL | |
11118 | 179 |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
180 gboolean |
11118 | 181 gaim_request_field_account_get_show_all(field) |
182 Gaim::Request::Field field | |
183 | |
184 Gaim::Account | |
185 gaim_request_field_account_get_value(field) | |
186 Gaim::Request::Field field | |
187 | |
188 Gaim::Request::Field | |
12866
43d8af815a9d
[gaim-migrate @ 15217]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12809
diff
changeset
|
189 gaim_request_field_account_new(id, text, account = NULL) |
11118 | 190 const char *id |
191 const char *text | |
192 Gaim::Account account | |
193 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
194 void |
11118 | 195 gaim_request_field_account_set_default_value(field, default_value) |
196 Gaim::Request::Field field | |
197 Gaim::Account default_value | |
198 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
199 void |
11118 | 200 gaim_request_field_account_set_show_all(field, show_all) |
201 Gaim::Request::Field field | |
202 gboolean show_all | |
203 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
204 void |
11118 | 205 gaim_request_field_account_set_value(field, value) |
206 Gaim::Request::Field field | |
207 Gaim::Account value | |
208 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
209 gboolean |
11118 | 210 gaim_request_field_bool_get_default_value(field) |
211 Gaim::Request::Field field | |
212 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
213 gboolean |
11118 | 214 gaim_request_field_bool_get_value(field) |
215 Gaim::Request::Field field | |
216 | |
217 Gaim::Request::Field | |
12866
43d8af815a9d
[gaim-migrate @ 15217]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12809
diff
changeset
|
218 gaim_request_field_bool_new(id, text, default_value = TRUE) |
11118 | 219 const char *id |
220 const char *text | |
221 gboolean default_value | |
222 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
223 void |
11118 | 224 gaim_request_field_bool_set_default_value(field, default_value) |
225 Gaim::Request::Field field | |
226 gboolean default_value | |
227 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
228 void |
11118 | 229 gaim_request_field_bool_set_value(field, value) |
230 Gaim::Request::Field field | |
231 gboolean value | |
232 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
233 void |
11118 | 234 gaim_request_field_choice_add(field, label) |
235 Gaim::Request::Field field | |
236 const char *label | |
237 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
238 int |
11118 | 239 gaim_request_field_choice_get_default_value(field) |
240 Gaim::Request::Field field | |
241 | |
242 void | |
243 gaim_request_field_choice_get_labels(field) | |
244 Gaim::Request::Field field | |
245 PREINIT: | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
246 GList *l; |
11118 | 247 PPCODE: |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
248 for (l = gaim_request_field_choice_get_labels(field); l != NULL; l = l->next) { |
12892
3ab3e68df807
[gaim-migrate @ 15245]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12866
diff
changeset
|
249 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
250 } |
11118 | 251 |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
252 int |
11118 | 253 gaim_request_field_choice_get_value(field) |
254 Gaim::Request::Field field | |
255 | |
256 Gaim::Request::Field | |
12866
43d8af815a9d
[gaim-migrate @ 15217]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12809
diff
changeset
|
257 gaim_request_field_choice_new(id, text, default_value = 0) |
11118 | 258 const char *id |
259 const char *text | |
260 int default_value | |
261 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
262 void |
11118 | 263 gaim_request_field_choice_set_default_value(field, default_value) |
264 Gaim::Request::Field field | |
265 int default_value | |
266 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
267 void |
11118 | 268 gaim_request_field_choice_set_value(field, value) |
269 Gaim::Request::Field field | |
270 int value | |
271 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
272 void |
11118 | 273 gaim_request_field_destroy(field) |
274 Gaim::Request::Field field | |
275 | |
276 const char * | |
277 gaim_request_field_get_id(field) | |
278 Gaim::Request::Field field | |
279 | |
280 const char * | |
281 gaim_request_field_get_label(field) | |
282 Gaim::Request::Field field | |
283 | |
284 Gaim::RequestFieldType | |
285 gaim_request_field_get_type(field) | |
286 Gaim::Request::Field field | |
287 | |
288 const char * | |
289 gaim_request_field_get_type_hint(field) | |
290 Gaim::Request::Field field | |
291 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
292 int |
11118 | 293 gaim_request_field_int_get_default_value(field) |
294 Gaim::Request::Field field | |
295 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
296 int |
11118 | 297 gaim_request_field_int_get_value(field) |
298 Gaim::Request::Field field | |
299 | |
300 Gaim::Request::Field | |
12866
43d8af815a9d
[gaim-migrate @ 15217]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12809
diff
changeset
|
301 gaim_request_field_int_new(id, text, default_value = 0) |
11118 | 302 const char *id |
303 const char *text | |
304 int default_value | |
305 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
306 void |
11118 | 307 gaim_request_field_int_set_default_value(field, default_value) |
308 Gaim::Request::Field field | |
309 int default_value | |
310 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
311 void |
11118 | 312 gaim_request_field_int_set_value(field, value) |
313 Gaim::Request::Field field | |
314 int value | |
315 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
316 gboolean |
11118 | 317 gaim_request_field_is_required(field) |
318 Gaim::Request::Field field | |
319 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
320 gboolean |
11118 | 321 gaim_request_field_is_visible(field) |
322 Gaim::Request::Field field | |
323 | |
324 Gaim::Request::Field | |
325 gaim_request_field_label_new(id, text) | |
326 const char *id | |
327 const char *text | |
328 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
329 void |
11118 | 330 gaim_request_field_list_add(field, item, data) |
331 Gaim::Request::Field field | |
332 const char *item | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
333 void * data |
11118 | 334 |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
335 void |
11118 | 336 gaim_request_field_list_add_selected(field, item) |
337 Gaim::Request::Field field | |
338 const char *item | |
339 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
340 void |
11118 | 341 gaim_request_field_list_clear_selected(field) |
342 Gaim::Request::Field field | |
343 | |
344 void * | |
345 gaim_request_field_list_get_data(field, text) | |
346 Gaim::Request::Field field | |
347 const char *text | |
348 | |
349 void | |
350 gaim_request_field_list_get_items(field) | |
351 Gaim::Request::Field field | |
352 PREINIT: | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
353 const GList *l; |
11118 | 354 PPCODE: |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
355 for (l = gaim_request_field_list_get_items(field); l != NULL; l = l->next) { |
12892
3ab3e68df807
[gaim-migrate @ 15245]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12866
diff
changeset
|
356 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
357 } |
11118 | 358 |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
359 gboolean |
11118 | 360 gaim_request_field_list_get_multi_select(field) |
361 Gaim::Request::Field field | |
362 | |
363 void | |
364 gaim_request_field_list_get_selected(field) | |
365 Gaim::Request::Field field | |
366 PREINIT: | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
367 const GList *l; |
11118 | 368 PPCODE: |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
369 for (l = gaim_request_field_list_get_selected(field); l != NULL; l = l->next) { |
12892
3ab3e68df807
[gaim-migrate @ 15245]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12866
diff
changeset
|
370 XPUSHs(sv_2mortal(newSVpv(l->data, 0))); |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
371 } |
11118 | 372 |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
373 gboolean |
11118 | 374 gaim_request_field_list_is_selected(field, item) |
375 Gaim::Request::Field field | |
376 const char *item | |
377 | |
378 Gaim::Request::Field | |
379 gaim_request_field_list_new(id, text) | |
380 const char *id | |
381 const char *text | |
382 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
383 void |
11118 | 384 gaim_request_field_list_set_multi_select(field, multi_select) |
385 Gaim::Request::Field field | |
386 gboolean multi_select | |
387 | |
388 Gaim::Request::Field | |
389 gaim_request_field_new(id, text, type) | |
390 const char *id | |
391 const char *text | |
392 Gaim::RequestFieldType type | |
393 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
394 void |
11118 | 395 gaim_request_field_set_label(field, label) |
396 Gaim::Request::Field field | |
397 const char *label | |
398 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
399 void |
11118 | 400 gaim_request_field_set_required(field, required) |
401 Gaim::Request::Field field | |
402 gboolean required | |
403 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
404 void |
11118 | 405 gaim_request_field_set_type_hint(field, type_hint) |
406 Gaim::Request::Field field | |
407 const char *type_hint | |
408 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
409 void |
11118 | 410 gaim_request_field_set_visible(field, visible) |
411 Gaim::Request::Field field | |
412 gboolean visible | |
413 | |
414 const char * | |
415 gaim_request_field_string_get_default_value(field) | |
416 Gaim::Request::Field field | |
417 | |
418 const char * | |
419 gaim_request_field_string_get_value(field) | |
420 Gaim::Request::Field field | |
421 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
422 gboolean |
11118 | 423 gaim_request_field_string_is_editable(field) |
424 Gaim::Request::Field field | |
425 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
426 gboolean |
11118 | 427 gaim_request_field_string_is_masked(field) |
428 Gaim::Request::Field field | |
429 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
430 gboolean |
11118 | 431 gaim_request_field_string_is_multiline(field) |
432 Gaim::Request::Field field | |
433 | |
434 Gaim::Request::Field | |
435 gaim_request_field_string_new(id, text, default_value, multiline) | |
436 const char *id | |
437 const char *text | |
438 const char *default_value | |
439 gboolean multiline | |
440 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
441 void |
11118 | 442 gaim_request_field_string_set_default_value(field, default_value) |
443 Gaim::Request::Field field | |
444 const char *default_value | |
445 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
446 void |
11118 | 447 gaim_request_field_string_set_editable(field, editable) |
448 Gaim::Request::Field field | |
449 gboolean editable | |
450 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
451 void |
11118 | 452 gaim_request_field_string_set_masked(field, masked) |
453 Gaim::Request::Field field | |
454 gboolean masked | |
455 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
456 void |
11118 | 457 gaim_request_field_string_set_value(field, value) |
458 Gaim::Request::Field field | |
459 const char *value | |
460 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
461 Gaim::Request::UiOps |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
462 gaim_request_get_ui_ops() |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
463 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
464 void |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
465 gaim_request_set_ui_ops(ops) |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
466 Gaim::Request::UiOps ops |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
467 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
468 MODULE = Gaim::Request PACKAGE = Gaim::Request::Field::Group PREFIX = gaim_request_field_group_ |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
469 PROTOTYPES: ENABLE |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
470 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
471 void |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
472 gaim_request_field_group_add_field(group, field) |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
473 Gaim::Request::Field::Group group |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
474 Gaim::Request::Field field |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
475 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
476 void |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
477 gaim_request_field_group_destroy(group) |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
478 Gaim::Request::Field::Group group |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
479 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
480 void |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
481 gaim_request_field_group_get_fields(group) |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
482 Gaim::Request::Field::Group group |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
483 PREINIT: |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
484 GList *l; |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
485 PPCODE: |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
486 for (l = gaim_request_field_group_get_fields(group); l != NULL; l = l->next) { |
12809
d43f374b352b
[gaim-migrate @ 15156]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12808
diff
changeset
|
487 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Request::Field"))); |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
488 } |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
489 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
490 const char * |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
491 gaim_request_field_group_get_title(group) |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
492 Gaim::Request::Field::Group group |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
493 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
494 Gaim::Request::Field::Group |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
495 gaim_request_field_group_new(title) |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
496 const char *title |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
497 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
498 MODULE = Gaim::Request PACKAGE = Gaim::Request::Fields PREFIX = gaim_request_fields_ |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
499 PROTOTYPES: ENABLE |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
500 |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
501 void |
11118 | 502 gaim_request_fields_add_group(fields, group) |
503 Gaim::Request::Fields fields | |
504 Gaim::Request::Field::Group group | |
505 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
506 gboolean |
11118 | 507 gaim_request_fields_all_required_filled(fields) |
508 Gaim::Request::Fields fields | |
509 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
510 void |
11118 | 511 gaim_request_fields_destroy(fields) |
512 Gaim::Request::Fields fields | |
513 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
514 gboolean |
11118 | 515 gaim_request_fields_exists(fields, id) |
516 Gaim::Request::Fields fields | |
517 const char *id | |
518 | |
519 Gaim::Account | |
520 gaim_request_fields_get_account(fields, id) | |
521 Gaim::Request::Fields fields | |
522 const char *id | |
523 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
524 gboolean |
11118 | 525 gaim_request_fields_get_bool(fields, id) |
526 Gaim::Request::Fields fields | |
527 const char *id | |
528 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
529 int |
11118 | 530 gaim_request_fields_get_choice(fields, id) |
531 Gaim::Request::Fields fields | |
532 const char *id | |
533 | |
534 Gaim::Request::Field | |
535 gaim_request_fields_get_field(fields, id) | |
536 Gaim::Request::Fields fields | |
537 const char *id | |
538 | |
539 void | |
540 gaim_request_fields_get_groups(fields) | |
541 Gaim::Request::Fields fields | |
542 PREINIT: | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
543 GList *l; |
11118 | 544 PPCODE: |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
545 for (l = gaim_request_fields_get_groups(fields); l != NULL; l = l->next) { |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
546 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Request::Field::Group"))); |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
547 } |
11118 | 548 |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
549 int |
11118 | 550 gaim_request_fields_get_integer(fields, id) |
551 Gaim::Request::Fields fields | |
552 const char *id | |
553 | |
554 void | |
555 gaim_request_fields_get_required(fields) | |
556 Gaim::Request::Fields fields | |
557 PREINIT: | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
558 const GList *l; |
11118 | 559 PPCODE: |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
560 for (l = gaim_request_fields_get_required(fields); l != NULL; l = l->next) { |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
561 XPUSHs(sv_2mortal(gaim_perl_bless_object(l->data, "Gaim::Request::Field"))); |
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
562 } |
11118 | 563 |
564 const char * | |
565 gaim_request_fields_get_string(fields, id) | |
566 Gaim::Request::Fields fields | |
567 const char *id | |
568 | |
12808
59ce7a35a22b
[gaim-migrate @ 15155]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12412
diff
changeset
|
569 gboolean |
11118 | 570 gaim_request_fields_is_field_required(fields, id) |
571 Gaim::Request::Fields fields | |
572 const char *id | |
573 | |
574 Gaim::Request::Fields | |
575 gaim_request_fields_new() |