annotate src/request.h @ 6949:49aa5a968f04

[gaim-migrate @ 7496] 2 updated translations committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 24 Sep 2003 21:26:36 +0000
parents 41120df7ed94
children feb3d21a7794
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
2 * @file request.h Request API
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
3 * @ingroup core
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
5 * gaim
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
6 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
7 * Copyright (C) 2003 Christian Hammond <chipx86@gnupdate.org>
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
8 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * (at your option) any later version.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * GNU General Public License for more details.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 * along with this program; if not, write to the Free Software
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 #ifndef _GAIM_REQUEST_H_
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 #define _GAIM_REQUEST_H_
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 #include <stdlib.h>
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27 #include <glib-object.h>
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 #include <glib.h>
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31 * Request types.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
32 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
33 typedef enum
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
34 {
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
35 GAIM_REQUEST_INPUT = 0, /**< Text input request. */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 GAIM_REQUEST_CHOICE, /**< Multiple-choice request. */
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
37 GAIM_REQUEST_ACTION, /**< Action request. */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
38 GAIM_REQUEST_FIELDS /**< Multiple fields request. */
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 } GaimRequestType;
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
41
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
42 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
43 * A type of field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
44 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
45 typedef enum
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
46 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
47 GAIM_REQUEST_FIELD_NONE,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
48 GAIM_REQUEST_FIELD_STRING,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
49 GAIM_REQUEST_FIELD_INTEGER,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
50 GAIM_REQUEST_FIELD_BOOLEAN,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
51 GAIM_REQUEST_FIELD_CHOICE
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 } GaimRequestFieldType;
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
56 * A request field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
57 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
58 typedef struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
59 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
60 GaimRequestFieldType type;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
61
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
62 char *id;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
63 char *label;
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 union
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 struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
68 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
69 gboolean multiline;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
70 char *default_value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
71 char *value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
72
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
73 } string;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
74
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
75 struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
76 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
77 int default_value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
78 int value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
79
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
80 } integer;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
81
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
82 struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
83 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
84 gboolean default_value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
85 gboolean value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
86
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
87 } boolean;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
88
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
89 struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
90 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
91 int default_value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
92 int value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
93
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
94 GList *labels;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
95
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
96 } choice;
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 } u;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
99
5809
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
100 void *ui_data;
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
101
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
102 } GaimRequestField;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
103
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
104 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
105 * Multiple fields request data.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
106 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
107 typedef struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
108 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
109 GList *groups;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
110
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
111 GHashTable *fields;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
112
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
113 } GaimRequestFields;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
114
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
115 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
116 * A group of fields with a title.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
117 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
118 typedef struct
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 GaimRequestFields *fields_list;
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 char *title;
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 GList *fields;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
125
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
126 } GaimRequestFieldGroup;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
127
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
128 /**
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
129 * Request UI operations.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
130 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
131 typedef struct
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
132 {
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
133 void *(*request_input)(const char *title, const char *primary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
134 const char *secondary, const char *default_value,
6035
8c44020a958e [gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
135 gboolean multiline, gboolean masked,
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
136 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
137 const char *cancel_text, GCallback cancel_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
138 void *user_data);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
139 void *(*request_choice)(const char *title, const char *primary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
140 const char *secondary, unsigned int default_value,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
141 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
142 const char *cancel_text, GCallback cancel_cb,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
143 void *user_data, size_t choice_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
144 va_list choices);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
145 void *(*request_action)(const char *title, const char *primary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
146 const char *secondary, unsigned int default_action,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
147 void *user_data, size_t action_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
148 va_list actions);
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
149 void *(*request_fields)(const char *title, const char *primary,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
150 const char *secondary, GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
151 const char *ok_text, GCallback ok_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
152 const char *cancel_text, GCallback cancel_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
153 void *user_data);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
154
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
155 void (*close_request)(GaimRequestType type, void *ui_handle);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
156
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
157 } GaimRequestUiOps;
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
158
5498
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
159 typedef void (*GaimRequestInputCb)(void *, const char *);
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
160 typedef void (*GaimRequestActionCb)(void *, int);
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
161 typedef void (*GaimRequestFieldsCb)(void *, GaimRequestFields *fields);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
162
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
163 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
164 extern "C" {
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
165 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
166
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
167 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
168 /** @name Field List API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
169 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
170 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
171
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
172 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
173 * Creates a list of fields to pass to gaim_request_fields().
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
174 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
175 * @return A GaimRequestFields structure.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
176 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
177 GaimRequestFields *gaim_request_fields_new(void);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
178
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 * Destroys a list of fields.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
181 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
182 * @param fields The list of fields to destroy.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
183 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
184 void gaim_request_fields_destroy(GaimRequestFields *fields);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
185
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
186 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
187 * Adds a group of fields to the list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
188 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
189 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
190 * @param group The group to add.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
191 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
192 void gaim_request_fields_add_group(GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
193 GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
194
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
195 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
196 * Returns a list of all groups in a field list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
197 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
198 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
199 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
200 * @return A list of groups.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
201 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
202 GList *gaim_request_fields_get_groups(const GaimRequestFields *fields);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
203
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
204 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
205 * Return the field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
206 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
207 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
208 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
209 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
210 * @return The field, if found.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
211 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
212 GaimRequestField *gaim_request_fields_get_field(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
213 const GaimRequestFields *fields, const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
214
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
215 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
216 * Returns the string value of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
217 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
218 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
219 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
220 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
221 * @return The string value, if found, or @c NULL otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
222 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
223 const char *gaim_request_fields_get_string(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
224 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
225
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
226 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
227 * Returns the integer value of a field with the specified ID.
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 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
230 * @param id The ID of the field.
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 The integer value, if found, or 0 otherwise.
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 int gaim_request_fields_get_integer(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
235 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
236
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
237 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
238 * Returns the boolean value of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
239 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
240 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
241 * @param id The ID of the field.
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 * @return The boolean value, if found, or @c FALSE otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
244 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
245 gboolean gaim_request_fields_get_bool(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
246 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
247
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
248 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
249 * Returns the choice index of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
250 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
251 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
252 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
253 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
254 * @return The choice index, if found, or -1 otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
255 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
256 int gaim_request_fields_get_choice(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
257 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
258
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
259 /*@}*/
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 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
262 /** @name Fields Group API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
263 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
264 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
265
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
266 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
267 * Creates a fields group with an optional title.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
268 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
269 * @param title The optional title to give the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
270 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
271 * @return A new fields group
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
272 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
273 GaimRequestFieldGroup *gaim_request_field_group_new(const char *title);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
274
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
275 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
276 * Destroys a fields group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
277 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
278 * @param group The group to destroy.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
279 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
280 void gaim_request_field_group_destroy(GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
281
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
282 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
283 * Adds a field to the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
284 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
285 * @param group The group to add the field to.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
286 * @param field The field to add to the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
287 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
288 void gaim_request_field_group_add_field(GaimRequestFieldGroup *group,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
289 GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
290
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
291 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
292 * Returns the title of a fields group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
293 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
294 * @param group The group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
295 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
296 * @return The title, if set.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
297 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
298 const char *gaim_request_field_group_get_title(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
299 const GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
300
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
301 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
302 * Returns a list of all fields in a group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
303 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
304 * @param group The group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
305 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
306 * @return The list of fields in the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
307 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
308 GList *gaim_request_field_group_get_fields(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
309 const GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
310
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
311 /*@}*/
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 /** @name Field API */
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 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
317
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
318 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
319 * Creates a field of the specified type.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
320 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
321 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
322 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
323 * @param type The type of field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
324 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
325 * @return The new field.
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 GaimRequestField *gaim_request_field_new(const char *id, const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
328 GaimRequestFieldType type);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
329
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
330 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
331 * Destroys a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
332 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
333 * @param field The field to destroy.
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 void gaim_request_field_destroy(GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
336
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
337 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
338 * Sets the label text of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
339 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
340 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
341 * @param label The text label.
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 void gaim_request_field_set_label(GaimRequestField *field, const char *label);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
344
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
345 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
346 * Returns the type of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
347 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
348 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
349 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
350 * @return The field's type.
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 GaimRequestFieldType gaim_request_field_get_type(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
353
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
354 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
355 * Returns the ID of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
356 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
357 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
358 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
359 * @return The ID
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
360 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
361 const char *gaim_request_field_get_id(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
362
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
363 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
364 * Returns the label text of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
365 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
366 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
367 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
368 * @return The label text.
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 const char *gaim_request_field_get_label(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
371
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 /** @name String Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
376 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
377 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
378
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
379 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
380 * Creates a string request field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
381 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
382 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
383 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
384 * @param default_value The optional default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
385 * @param multiline Whether or not this should be a multiline string.
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 * @return The new field.
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 GaimRequestField *gaim_request_field_string_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
390 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
391 const char *default_value,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
392 gboolean multiline);
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
395 * Sets the default value in a string field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
396 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
397 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
398 * @param default_value The default value.
5807
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 void gaim_request_field_string_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
401 const char *default_value);
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 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
404 * Sets the value in a string field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
405 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
406 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
407 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
408 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
409 void gaim_request_field_string_set_value(GaimRequestField *field,
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
410 const char *value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
411
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
412 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
413 * Returns the default value in a string field.
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 * @param field The field.
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 * @return The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
418 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
419 const char *gaim_request_field_string_get_default_value(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
420 const GaimRequestField *field);
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 * Returns the user-entered value in a string field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
424 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
425 * @param field The field.
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 * @return The value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
428 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
429 const char *gaim_request_field_string_get_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
430
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
431 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
432 * Returns whether or not a string field is multi-line.
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 * @param field The 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 * @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
437 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
438 gboolean gaim_request_field_string_is_multiline(const GaimRequestField *field);
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 /*@}*/
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 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
443 /** @name Integer Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
444 /**************************************************************************/
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
448 * Creates an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
449 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
450 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
451 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
452 * @param default_value The default value.
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 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
455 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
456 GaimRequestField *gaim_request_field_int_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
457 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
458 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
459
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
460 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
461 * Sets the default value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
462 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
463 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
464 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
465 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
466 void gaim_request_field_int_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
467 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
468
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
469 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
470 * Sets the value in an integer field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
471 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
472 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
473 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
474 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
475 void gaim_request_field_int_set_value(GaimRequestField *field, int value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
476
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
477 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
478 * Returns the default value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
479 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
480 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
481 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
482 * @return The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
483 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
484 int gaim_request_field_int_get_default_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
485
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
486 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
487 * Returns the user-entered value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
488 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
489 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
490 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
491 * @return The value.
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 int gaim_request_field_int_get_value(const GaimRequestField *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 /*@}*/
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 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
498 /** @name Boolean Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
499 /**************************************************************************/
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
503 * Creates a boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
504 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
505 * This is often represented as a checkbox.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
506 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
507 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
508 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
509 * @param default_value The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
510 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
511 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
512 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
513 GaimRequestField *gaim_request_field_bool_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
514 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
515 gboolean default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
516
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
517 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
518 * Sets the default value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
519 *
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
520 * @param field The field.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
521 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
522 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
523 void gaim_request_field_bool_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
524 gboolean default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
525
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
526 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
527 * Sets the value in an boolean field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
528 *
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
529 * @param field The field.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
530 * @param value The value.
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
531 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
532 void gaim_request_field_bool_set_value(GaimRequestField *field,
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
533 gboolean value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
534
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
535 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
536 * Returns the default value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
537 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
538 * @param field The field.
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
539 *
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
540 * @return The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
541 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
542 gboolean gaim_request_field_bool_get_default_value(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
543 const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
544
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
545 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
546 * Returns the user-entered value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
547 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
548 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
549 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
550 * @return The value.
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 gboolean gaim_request_field_bool_get_value(const GaimRequestField *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 /*@}*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
555
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
556 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
557 /** @name Choice Field API */
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
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
561 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
562 * Creates a multiple choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
563 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
564 * This is often represented as a group of radio buttons.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
565 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
566 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
567 * @param text The optional label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
568 * @param default_value The default choice.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
569 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
570 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
571 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
572 GaimRequestField *gaim_request_field_choice_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
573 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
574 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
575
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
576 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
577 * Adds a choice to a multiple choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
578 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
579 * @param field The choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
580 * @param label The choice label.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
581 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
582 void gaim_request_field_choice_add(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
583 const char *label);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
584
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
585 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
586 * Sets the default value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
587 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
588 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
589 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
590 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
591 void gaim_request_field_choice_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
592 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
593
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
594 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
595 * Sets the value in an choice field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
596 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
597 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
598 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
599 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
600 void gaim_request_field_choice_set_value(GaimRequestField *field, int value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
601
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
602 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
603 * Returns the default value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
604 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
605 * @param field The field.
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 * @return The default value.
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 int gaim_request_field_choice_get_default_value(const GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
612 * Returns the user-entered value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
613 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
614 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
615 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
616 * @return The value.
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 int gaim_request_field_choice_get_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
619
5809
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
620 /**
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
621 * Returns a list of labels in a choice field.
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
622 *
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
623 * @param field The field.
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
624 *
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
625 * @return The list of labels.
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
626 */
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
627 GList *gaim_request_field_choice_get_labels(const GaimRequestField *field);
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
628
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
629 /*@}*/
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
630
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
631 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
632 /** @name Request API */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
633 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
634 /*@{*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
635
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
636 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
637 * Prompts the user for text input.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
638 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
639 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
640 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
641 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
642 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
643 * @param default_value The default value.
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
644 * @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
645 * @param masked TRUE if the inputted text should be masked in some way.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
646 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
647 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
648 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
649 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
650 * @param user_data The data to pass to the callback.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
651 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
652 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
653 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
654 void *gaim_request_input(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
655 const char *primary, const char *secondary,
6035
8c44020a958e [gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
656 const char *default_value,
8c44020a958e [gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
657 gboolean multiline, gboolean masked,
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
658 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
659 const char *cancel_text, GCallback cancel_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
660 void *user_data);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
661
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
662 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
663 * Prompts the user for multiple-choice input.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
664 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
665 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
666 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
667 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
668 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
669 * @param default_value The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
670 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
671 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
672 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
673 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
674 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
675 * @param choice_count The number of choices.
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
676 * @param ... The choices.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
677 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
678 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
679 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
680 void *gaim_request_choice(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
681 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
682 unsigned int default_value,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
683 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
684 const char *cancel_text, GCallback cancel_cb,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
685 void *user_data, size_t choice_count, ...);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
686
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
687 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
688 * Prompts the user for multiple-choice input.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
689 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
690 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
691 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
692 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
693 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
694 * @param default_value The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
695 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
696 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
697 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
698 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
699 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
700 * @param choice_count The number of choices.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
701 * @param choices The choices.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
702 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
703 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
704 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
705 void *gaim_request_choice_varg(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
706 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
707 unsigned int default_value,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
708 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
709 const char *cancel_text, GCallback cancel_cb,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
710 void *user_data, size_t choice_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
711 va_list choices);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
712
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
713 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
714 * Prompts the user for an action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
715 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
716 * This is often represented as a dialog with a button for each action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
717 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
718 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
719 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
720 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
721 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
722 * @param default_action The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
723 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
724 * @param action_count The number of actions.
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
725 * @param ... A list of actions.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
726 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
727 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
728 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
729 void *gaim_request_action(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
730 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
731 unsigned int default_action,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
732 void *user_data, size_t action_count, ...);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
733
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
734 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
735 * Prompts the user for an action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
736 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
737 * This is often represented as a dialog with a button for each action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
738 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
739 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
740 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
741 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
742 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
743 * @param default_action The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
744 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
745 * @param action_count The number of actions.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
746 * @param actions A list of actions and callbacks.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
747 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
748 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
749 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
750 void *gaim_request_action_varg(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
751 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
752 unsigned int default_action,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
753 void *user_data, size_t action_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
754 va_list actions);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
755
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
756 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
757 * Displays groups of fields for the user to fill in.
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 * @param handle The plugin or connection handle.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
760 * @param title The title of the message.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
761 * @param primary The main point of the message.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
762 * @param secondary The secondary information.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
763 * @param fields The list of fields.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
764 * @param ok_text The text for the OK button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
765 * @param ok_cb The callback for the OK button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
766 * @param cancel_text The text for the cancel button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
767 * @param cancel_cb The callback for the cancel button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
768 * @param user_data The data to pass to the callback.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
769 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
770 * @return A UI-specific handle.
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 void *gaim_request_fields(void *handle, const char *title,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
773 const char *primary, const char *secondary,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
774 GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
775 const char *ok_text, GCallback ok_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
776 const char *cancel_text, GCallback cancel_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
777 void *user_data);
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 /**
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
780 * Closes a request.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
781 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
782 * This should be used only by the UI operation functions and part of the
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
783 * core.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
784 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
785 * @param type The request type.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
786 * @param uihandle The request UI handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
787 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
788 void gaim_request_close(GaimRequestType type, void *uihandle);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
789
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
790 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
791 * Closes all requests registered with the specified handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
792 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
793 * @param handle The handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
794 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
795 void gaim_request_close_with_handle(void *handle);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
796
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
797 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
798 * A wrapper for gaim_request_action() that uses Yes and No buttons.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
799 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
800 #define gaim_request_yes_no(handle, title, primary, secondary, \
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
801 default_action, user_data, yes_cb, no_cb) \
5498
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
802 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
803 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
804 _("Yes"), (yes_cb), _("No"), (no_cb))
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
805
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
806 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
807 * A wrapper for gaim_request_action() that uses OK and Cancel buttons.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
808 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
809 #define gaim_request_ok_cancel(handle, title, primary, secondary, \
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
810 default_action, user_data, ok_cb, cancel_cb) \
5498
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
811 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
812 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
813 _("OK"), (ok_cb), _("Cancel"), (cancel_cb))
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
814
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
815 /**
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
816 * 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
817 */
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
818 #define gaim_request_accept_cancel(handle, title, primary, secondary, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
819 default_action, user_data, accept_cb, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
820 cancel_cb) \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
821 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
822 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
823 _("Accept"), (accept_cb), _("Cancel"), (cancel_cb))
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
824
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
825 /*@}*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
826
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
827 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
828 /** @name UI Operations API */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
829 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
830 /*@{*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
831
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
832 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
833 * Sets the UI operations structure to be used when displaying a
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
834 * request.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
835 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
836 * @param ops The UI operations structure.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
837 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
838 void gaim_set_request_ui_ops(GaimRequestUiOps *ops);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
839
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
840 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
841 * Returns the UI operations structure to be used when displaying a
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
842 * request.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
843 *
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
844 * @return The UI operations structure.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
845 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
846 GaimRequestUiOps *gaim_get_request_ui_ops(void);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
847
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
848 /*@}*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
849
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
850 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
851 }
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
852 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
853
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
854 #endif /* _GAIM_REQUEST_H_ */