annotate src/request.h @ 5916:a51b709b2b3e

[gaim-migrate @ 6348] Kyung-uk Son updated the Korean translation again :-) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 18 Jun 2003 01:32:39 +0000
parents 0a661f6d65e3
children 158196b2db19
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,
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
135 gboolean multiline,
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
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
163 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
164 /** @name Field List API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
165 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
166 /*@{*/
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
169 * Creates a list of fields to pass to gaim_request_fields().
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 * @return A GaimRequestFields structure.
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 GaimRequestFields *gaim_request_fields_new(void);
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
176 * Destroys a list of fields.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
177 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
178 * @param fields The list of fields to destroy.
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 void gaim_request_fields_destroy(GaimRequestFields *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
183 * Adds a group of fields to the list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
184 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
185 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
186 * @param group The group to add.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
187 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
188 void gaim_request_fields_add_group(GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
189 GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
190
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
191 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
192 * Returns a list of all groups in a field list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
193 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
194 * @param fields The fields list.
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 * @return A list of groups.
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 GList *gaim_request_fields_get_groups(const GaimRequestFields *fields);
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
201 * Return the field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
202 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
203 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
204 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
205 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
206 * @return The field, if found.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
207 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
208 GaimRequestField *gaim_request_fields_get_field(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
209 const GaimRequestFields *fields, const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
210
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
211 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
212 * Returns the string value of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
213 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
214 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
215 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
216 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
217 * @return The string value, if found, or @c NULL otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
218 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
219 const char *gaim_request_fields_get_string(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
220 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
221
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
222 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
223 * Returns the integer value of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
224 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
225 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
226 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
227 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
228 * @return The integer value, if found, or 0 otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
229 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
230 int gaim_request_fields_get_integer(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
231 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
232
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
233 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
234 * Returns the boolean value of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
235 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
236 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
237 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
238 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
239 * @return The boolean value, if found, or @c FALSE otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
240 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
241 gboolean gaim_request_fields_get_bool(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
242 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
243
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
244 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
245 * Returns the choice index of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
246 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
247 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
248 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
249 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
250 * @return The choice index, if found, or -1 otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
251 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
252 int gaim_request_fields_get_choice(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
253 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
254
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
255 /*@}*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
256
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
257 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
258 /** @name Fields Group API */
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
263 * Creates a fields group with an optional title.
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 * @param title The optional title to give the group.
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 * @return A new fields group
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 GaimRequestFieldGroup *gaim_request_field_group_new(const char *title);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
270
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
271 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
272 * Destroys a fields group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
273 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
274 * @param group The group to destroy.
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 void gaim_request_field_group_destroy(GaimRequestFieldGroup *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
279 * Adds a field to the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
280 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
281 * @param group The group to add the field to.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
282 * @param field The field to add to the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
283 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
284 void gaim_request_field_group_add_field(GaimRequestFieldGroup *group,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
285 GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
286
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
287 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
288 * Returns the title of a fields group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
289 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
290 * @param group The group.
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 * @return The title, if set.
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 const char *gaim_request_field_group_get_title(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
295 const GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
296
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
297 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
298 * Returns a list of all fields in a group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
299 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
300 * @param group The group.
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 * @return The list of fields in the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
303 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
304 GList *gaim_request_field_group_get_fields(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
305 const GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
306
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
307 /*@}*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
308
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
309 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
310 /** @name Field API */
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
315 * Creates a field of the specified type.
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 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
318 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
319 * @param type The type of field.
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 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
322 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
323 GaimRequestField *gaim_request_field_new(const char *id, const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
324 GaimRequestFieldType type);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
325
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
326 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
327 * Destroys a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
328 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
329 * @param field The field to destroy.
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 void gaim_request_field_destroy(GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
334 * Sets the label text of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
335 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
336 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
337 * @param label The text label.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
338 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
339 void gaim_request_field_set_label(GaimRequestField *field, const char *label);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
340
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
341 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
342 * Returns the type of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
343 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
344 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
345 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
346 * @return The field's type.
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 GaimRequestFieldType gaim_request_field_get_type(const GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
351 * Returns the ID of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
352 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
353 * @param field The field.
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 * @return The ID
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 const char *gaim_request_field_get_id(const GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
360 * Returns the label text of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
361 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
362 * @param field The field.
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 * @return The label text.
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 const char *gaim_request_field_get_label(const GaimRequestField *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 /*@}*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
369
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
370 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
371 /** @name String Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
372 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
373 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
374
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
375 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
376 * Creates a string request field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
377 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
378 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
379 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
380 * @param default_value The optional default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
381 * @param multiline Whether or not this should be a multiline string.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
382 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
383 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
384 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
385 GaimRequestField *gaim_request_field_string_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
386 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
387 const char *default_value,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
388 gboolean multiline);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
389
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
390 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
391 * Sets the default value in a string field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
392 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
393 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
394 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
395 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
396 void gaim_request_field_string_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
397 const char *default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
398
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
399 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
400 * Sets the value in a string field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
401 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
402 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
403 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
404 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
405 void gaim_request_field_string_set_value(GaimRequestField *field,
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
406 const char *value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
407
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
408 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
409 * Returns the default value in a string field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
410 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
411 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
412 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
413 * @return The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
414 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
415 const char *gaim_request_field_string_get_default_value(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
416 const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
417
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
418 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
419 * Returns the user-entered value in a string field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
420 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
421 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
422 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
423 * @return The value.
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 const char *gaim_request_field_string_get_value(const GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
428 * Returns whether or not a string field is multi-line.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
429 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
430 * @param field The field.
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 * @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
433 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
434 gboolean gaim_request_field_string_is_multiline(const GaimRequestField *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 /*@}*/
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 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
439 /** @name Integer Field API */
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
444 * Creates an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
445 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
446 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
447 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
448 * @param default_value The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
449 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
450 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
451 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
452 GaimRequestField *gaim_request_field_int_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
453 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
454 int default_value);
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
457 * Sets the default value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
458 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
459 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
460 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
461 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
462 void gaim_request_field_int_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
463 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
464
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
465 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
466 * Sets the value in an integer field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
467 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
468 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
469 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
470 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
471 void gaim_request_field_int_set_value(GaimRequestField *field, int value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
472
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
473 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
474 * Returns the default value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
475 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
476 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
477 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
478 * @return The default value.
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 int gaim_request_field_int_get_default_value(const GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
483 * Returns the user-entered value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
484 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
485 * @param field The field.
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 * @return The value.
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 int gaim_request_field_int_get_value(const GaimRequestField *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 /*@}*/
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 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
494 /** @name Boolean Field API */
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
499 * Creates a boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
500 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
501 * This is often represented as a checkbox.
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 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
504 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
505 * @param default_value The default value.
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 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
508 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
509 GaimRequestField *gaim_request_field_bool_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
510 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
511 gboolean default_value);
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
514 * Sets the default value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
515 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
516 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
517 * @param value The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
518 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
519 void gaim_request_field_bool_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
520 gboolean default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
521
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
522 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
523 * Sets the value in an boolean field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
524 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
525 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
526 * @param default_value The default value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
527 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
528 void gaim_request_field_bool_set_value(GaimRequestField *field,
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
529 gboolean value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
530
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
531 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
532 * Returns the default value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
533 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
534 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
535 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
536 * @return The default value.
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 gboolean gaim_request_field_bool_get_default_value(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
539 const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
540
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 * Returns the user-entered value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
543 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
544 * @param field The field.
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 * @return The value.
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 gboolean gaim_request_field_bool_get_value(const GaimRequestField *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 /*@}*/
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 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
553 /** @name Choice Field API */
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
558 * Creates a multiple choice field.
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 * This is often represented as a group of radio buttons.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
561 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
562 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
563 * @param text The optional label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
564 * @param default_value The default choice.
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 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
567 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
568 GaimRequestField *gaim_request_field_choice_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
569 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
570 int default_value);
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
573 * Adds a choice to a multiple choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
574 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
575 * @param field The choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
576 * @param label The choice label.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
577 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
578 void gaim_request_field_choice_add(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
579 const char *label);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
580
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 * Sets the default value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
583 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
584 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
585 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
586 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
587 void gaim_request_field_choice_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
588 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
589
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
590 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
591 * Sets the value in an choice field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
592 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
593 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
594 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
595 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
596 void gaim_request_field_choice_set_value(GaimRequestField *field, int value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
597
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
598 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
599 * Returns the default value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
600 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
601 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
602 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
603 * @return The default value.
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 int gaim_request_field_choice_get_default_value(const GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
608 * Returns the user-entered value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
609 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
610 * @param field The field.
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 * @return The value.
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 int gaim_request_field_choice_get_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
615
5809
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
616 /**
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
617 * Returns a list of labels in a choice field.
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
618 *
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
619 * @param field The field.
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 * @return The list of labels.
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 GList *gaim_request_field_choice_get_labels(const GaimRequestField *field);
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
624
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
625 /*@}*/
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
626
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
627 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
628 /** @name Request API */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
629 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
630 /*@{*/
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 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
633 * Prompts the user for text input.
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 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
636 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
637 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
638 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
639 * @param default_value The default value.
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
640 * @param multiline TRUE if the inputted text can span multiple lines.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
641 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
642 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
643 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
644 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
645 * @param user_data The data to pass to the callback.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
646 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
647 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
648 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
649 void *gaim_request_input(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
650 const char *primary, const char *secondary,
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
651 const char *default_value, gboolean multiline,
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
652 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
653 const char *cancel_text, GCallback cancel_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
654 void *user_data);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
655
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
656 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
657 * Prompts the user for multiple-choice input.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
658 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
659 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
660 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
661 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
662 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
663 * @param default_value The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
664 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
665 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
666 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
667 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
668 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
669 * @param choice_count The number of choices.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
670 * @param choice The choices.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
671 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
672 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
673 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
674 void *gaim_request_choice(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
675 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
676 unsigned int default_value,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
677 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
678 const char *cancel_text, GCallback cancel_cb,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
679 void *user_data, size_t choice_count, ...);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
680
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
681 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
682 * Prompts the user for multiple-choice input.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
683 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
684 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
685 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
686 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
687 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
688 * @param default_value The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
689 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
690 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
691 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
692 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
693 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
694 * @param choice_count The number of choices.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
695 * @param choices The choices.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
696 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
697 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
698 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
699 void *gaim_request_choice_varg(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
700 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
701 unsigned int default_value,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
702 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
703 const char *cancel_text, GCallback cancel_cb,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
704 void *user_data, size_t choice_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
705 va_list choices);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
706
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
707 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
708 * Prompts the user for an action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
709 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
710 * 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
711 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
712 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
713 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
714 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
715 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
716 * @param default_action The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
717 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
718 * @param action_count The number of actions.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
719 * @param action The first action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
720 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
721 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
722 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
723 void *gaim_request_action(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
724 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
725 unsigned int default_action,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
726 void *user_data, size_t action_count, ...);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
727
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 * Prompts the user for an action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
730 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
731 * 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
732 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
733 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
734 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
735 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
736 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
737 * @param default_action The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
738 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
739 * @param action_count The number of actions.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
740 * @param actions A list of actions and callbacks.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
741 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
742 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
743 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
744 void *gaim_request_action_varg(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
745 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
746 unsigned int default_action,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
747 void *user_data, size_t action_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
748 va_list actions);
5477
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 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
751 * Displays groups of fields for the user to fill in.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
752 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
753 * @param handle The plugin or connection handle.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
754 * @param title The title of the message.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
755 * @param primary The main point of the message.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
756 * @param secondary The secondary information.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
757 * @param fields The list of fields.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
758 * @param ok_text The text for the OK button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
759 * @param ok_cb The callback for the OK button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
760 * @param cancel_text The text for the cancel button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
761 * @param cancel_cb The callback for the cancel button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
762 * @param user_data The data to pass to the callback.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
763 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
764 * @return A UI-specific handle.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
765 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
766 void *gaim_request_fields(void *handle, const char *title,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
767 const char *primary, const char *secondary,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
768 GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
769 const char *ok_text, GCallback ok_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
770 const char *cancel_text, GCallback cancel_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
771 void *user_data);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
772
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
773 /**
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
774 * Closes a request.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
775 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
776 * 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
777 * core.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
778 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
779 * @param type The request type.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
780 * @param uihandle The request UI handle.
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 void gaim_request_close(GaimRequestType type, void *uihandle);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
783
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 * Closes all requests registered with the specified handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
786 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
787 * @param handle The handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
788 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
789 void gaim_request_close_with_handle(void *handle);
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 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
792 * A wrapper for gaim_request_action() that uses Yes and No buttons.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
793 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
794 #define gaim_request_yes_no(handle, title, primary, secondary, \
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
795 default_action, user_data, yes_cb, no_cb) \
5498
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
796 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
797 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
798 _("Yes"), (yes_cb), _("No"), (no_cb))
5477
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 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
801 * A wrapper for gaim_request_action() that uses OK and Cancel buttons.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
802 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
803 #define gaim_request_ok_cancel(handle, title, primary, secondary, \
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
804 default_action, user_data, ok_cb, cancel_cb) \
5498
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
805 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
806 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
807 _("OK"), (ok_cb), _("Cancel"), (cancel_cb))
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
808
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
809 /**
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
810 * 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
811 */
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
812 #define gaim_request_accept_cancel(handle, title, primary, secondary, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
813 default_action, user_data, accept_cb, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
814 cancel_cb) \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
815 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
816 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
817 _("Accept"), (accept_cb), _("Cancel"), (cancel_cb))
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
818
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
819 /*@}*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
820
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
821 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
822 /** @name UI Operations API */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
823 /**************************************************************************/
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 * Sets the UI operations structure to be used when displaying a
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
828 * request.
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 * @param ops The UI operations structure.
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 void gaim_set_request_ui_ops(GaimRequestUiOps *ops);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
833
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
834 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
835 * Returns the UI operations structure to be used when displaying a
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
836 * request.
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 * @param ops The UI operations structure.
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 GaimRequestUiOps *gaim_get_request_ui_ops(void);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
841
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
842 /*@}*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
843
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
844 #endif /* _GAIM_REQUEST_H_ */