annotate src/request.h @ 9213:99abaef7ed34

[gaim-migrate @ 10008] Here's a first stab at /help Still some things that need work. Notice that help is listed twice, etc. I think I'll change it to make it automaticly tell you the args, instead of putting them in the help string. Also there's the question of if help strings should be considered html or plain text. (If plain text, we need to run gaim_escape_html on it in /help.) committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Sun, 06 Jun 2004 06:15:27 +0000
parents b540c735a6ad
children 578986136bac
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 *
8046
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7964
diff changeset
7 * Gaim is the legal property of its developers, whose names are too numerous
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7964
diff changeset
8 * to list here. Please refer to the COPYRIGHT file distributed with this
fa6395637e2c [gaim-migrate @ 8730]
Sean Egan <seanegan@gmail.com>
parents: 7964
diff changeset
9 * source distribution.
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
10 *
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * This program is free software; you can redistribute it and/or modify
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * 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
13 * the Free Software Foundation; either version 2 of the License, or
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * (at your option) any later version.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * This program is distributed in the hope that it will be useful,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * GNU General Public License for more details.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
20 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 * You should have received a copy of the GNU General Public License
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
22 * along with this program; if not, write to the Free Software
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
24 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
25 #ifndef _GAIM_REQUEST_H_
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
26 #define _GAIM_REQUEST_H_
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
27
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
28 #include <stdlib.h>
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29 #include <glib-object.h>
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
30 #include <glib.h>
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
31
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
32 #include "account.h"
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
33
5477
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 * Request types.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
36 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
37 typedef enum
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
38 {
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
39 GAIM_REQUEST_INPUT = 0, /**< Text input request. */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
40 GAIM_REQUEST_CHOICE, /**< Multiple-choice request. */
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
41 GAIM_REQUEST_ACTION, /**< Action request. */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
42 GAIM_REQUEST_FIELDS /**< Multiple fields request. */
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
43
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
44 } GaimRequestType;
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
45
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
46 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
47 * A type of field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
48 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
49 typedef enum
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
50 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
51 GAIM_REQUEST_FIELD_NONE,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
52 GAIM_REQUEST_FIELD_STRING,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
53 GAIM_REQUEST_FIELD_INTEGER,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
54 GAIM_REQUEST_FIELD_BOOLEAN,
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
55 GAIM_REQUEST_FIELD_CHOICE,
7905
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
56 GAIM_REQUEST_FIELD_LIST,
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
57 GAIM_REQUEST_FIELD_LABEL,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
58 GAIM_REQUEST_FIELD_ACCOUNT
5807
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;
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 /**
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
63 * Multiple fields request data.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
64 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
65 typedef struct
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
66 {
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
67 GList *groups;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
68
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
69 GHashTable *fields;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
70
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
71 GList *required_fields;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
72
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
73 void *ui_data;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
74
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
75 } GaimRequestFields;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
76
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
77 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
78 * A group of fields with a title.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
79 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
80 typedef struct
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
81 {
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
82 GaimRequestFields *fields_list;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
83
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
84 char *title;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
85
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
86 GList *fields;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
87
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
88 } GaimRequestFieldGroup;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
89
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
90 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
91 * A request field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
92 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
93 typedef struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
94 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
95 GaimRequestFieldType type;
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
96 GaimRequestFieldGroup *group;
5807
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 char *id;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
99 char *label;
8285
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
100 char *type_hint;
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
101
7904
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
102 gboolean visible;
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
103 gboolean required;
7904
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
104
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
105 union
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 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 gboolean multiline;
7047
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
110 gboolean masked;
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
111 gboolean editable;
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
112 char *default_value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
113 char *value;
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 } string;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
116
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
117 struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
118 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
119 int default_value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
120 int value;
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 } integer;
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 struct
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 gboolean default_value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
127 gboolean value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
128
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
129 } boolean;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
130
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
131 struct
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
132 {
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
133 int default_value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
134 int value;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
135
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
136 GList *labels;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
137
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
138 } choice;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
139
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
140 struct
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
141 {
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
142 GList *items;
7909
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
143 GHashTable *item_data;
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
144 GList *selected;
7964
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
145 GHashTable *selected_table;
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
146
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
147 gboolean multiple_selection;
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
148
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
149 } list;
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
150
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
151 struct
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
152 {
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
153 GaimAccount *default_account;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
154 GaimAccount *account;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
155 gboolean show_all;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
156
8289
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
157 GaimFilterAccountFunc filter_func;
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
158
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
159 } account;
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
160
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
161 } u;
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
162
5809
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
163 void *ui_data;
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
164
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
165 } GaimRequestField;
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 /**
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
168 * Request UI operations.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
169 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
170 typedef struct
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
171 {
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
172 void *(*request_input)(const char *title, const char *primary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
173 const char *secondary, const char *default_value,
8697
725413cc9fb9 [gaim-migrate @ 9450]
Mark Doliner <mark@kingant.net>
parents: 8395
diff changeset
174 gboolean multiline, gboolean masked, gchar *hint,
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
175 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
176 const char *cancel_text, GCallback cancel_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
177 void *user_data);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
178 void *(*request_choice)(const char *title, const char *primary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
179 const char *secondary, unsigned int default_value,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
180 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
181 const char *cancel_text, GCallback cancel_cb,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
182 void *user_data, size_t choice_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
183 va_list choices);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
184 void *(*request_action)(const char *title, const char *primary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
185 const char *secondary, unsigned int default_action,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
186 void *user_data, size_t action_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
187 va_list actions);
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
188 void *(*request_fields)(const char *title, const char *primary,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
189 const char *secondary, GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
190 const char *ok_text, GCallback ok_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
191 const char *cancel_text, GCallback cancel_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
192 void *user_data);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
193
8843
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
194 void *(*request_file)(const char *title, const char *filename,
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
195 GCallback ok_cb, GCallback cancel_cb,
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
196 void *user_data);
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
197 void (*close_request)(GaimRequestType type, void *ui_handle);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
198 } GaimRequestUiOps;
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
199
5498
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
200 typedef void (*GaimRequestInputCb)(void *, const char *);
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
201 typedef void (*GaimRequestActionCb)(void *, int);
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
202 typedef void (*GaimRequestFieldsCb)(void *, GaimRequestFields *fields);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
203
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
204 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
205 extern "C" {
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
206 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
207
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
208 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
209 /** @name Field List API */
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
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 * Creates a list of fields to pass to gaim_request_fields().
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
215 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
216 * @return A GaimRequestFields structure.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
217 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
218 GaimRequestFields *gaim_request_fields_new(void);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
219
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
220 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
221 * Destroys a list of fields.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
222 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
223 * @param fields The list of fields to destroy.
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 void gaim_request_fields_destroy(GaimRequestFields *fields);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
226
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
227 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
228 * Adds a group of fields to the list.
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 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
231 * @param group The group to add.
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 void gaim_request_fields_add_group(GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
234 GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
235
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
236 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
237 * Returns a list of all groups in a field list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
238 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
239 * @param fields The fields list.
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 * @return A list of groups.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
242 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
243 GList *gaim_request_fields_get_groups(const GaimRequestFields *fields);
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 /**
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
246 * Returns whether or not the field with the specified ID exists.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
247 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
248 * @param fields The fields list.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
249 * @param id The ID of the field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
250 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
251 * @return TRUE if the field exists, or FALSE.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
252 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
253 gboolean gaim_request_fields_exists(const GaimRequestFields *fields,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
254 const char *id);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
255
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
256 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
257 * Returns a list of all required fields.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
258 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
259 * @param fields The fields list.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
260 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
261 * @return The list of required fields.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
262 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
263 const GList *gaim_request_fields_get_required(const GaimRequestFields *fields);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
264
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
265 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
266 * Returns whether or not a field with the specified ID is required.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
267 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
268 * @param fields The fields list.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
269 * @param id The field ID.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
270 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
271 * @return TRUE if the specified field is required, or FALSE.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
272 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
273 gboolean gaim_request_fields_is_field_required(const GaimRequestFields *fields,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
274 const char *id);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
275
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
276 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
277 * Returns whether or not all required fields have values.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
278 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
279 * @param fields The fields list.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
280 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
281 * @return TRUE if all required fields have values, or FALSE.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
282 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
283 gboolean gaim_request_fields_all_required_filled(
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
284 const GaimRequestFields *fields);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
285
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
286 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
287 * Return the field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
288 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
289 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
290 * @param id The ID of the field.
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 field, if found.
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 GaimRequestField *gaim_request_fields_get_field(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
295 const GaimRequestFields *fields, const char *id);
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 the string value of a field with the specified ID.
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 fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
301 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
302 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
303 * @return The string value, if found, or @c NULL otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
304 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
305 const char *gaim_request_fields_get_string(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
306 const char *id);
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 * Returns the integer value of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
310 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
311 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
312 * @param id The ID of the field.
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 * @return The integer value, if found, or 0 otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
315 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
316 int gaim_request_fields_get_integer(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
317 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
318
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
319 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
320 * Returns the boolean value of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
321 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
322 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
323 * @param id The ID of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
324 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
325 * @return The boolean value, if found, or @c FALSE otherwise.
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 gboolean gaim_request_fields_get_bool(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
328 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
329
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
330 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
331 * Returns the choice index of a field with the specified ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
332 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
333 * @param fields The fields list.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
334 * @param id The ID of the 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 * @return The choice index, if found, or -1 otherwise.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
337 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
338 int gaim_request_fields_get_choice(const GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
339 const char *id);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
340
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
341 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
342 * Returns the account of a field with the specified ID.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
343 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
344 * @param fields The fields list.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
345 * @param id The ID of the field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
346 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
347 * @return The account value, if found, or NULL otherwise.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
348 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
349 GaimAccount *gaim_request_fields_get_account(const GaimRequestFields *fields,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
350 const char *id);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
351
5807
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
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 /** @name Fields Group API */
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 /*@{*/
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 * Creates a fields group with an optional title.
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 title The optional title to give the group.
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 A new fields group
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 GaimRequestFieldGroup *gaim_request_field_group_new(const char *title);
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 * Destroys a fields group.
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 * @param group The group to destroy.
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 void gaim_request_field_group_destroy(GaimRequestFieldGroup *group);
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 * Adds a field to the group.
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 group The group to add the field to.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
379 * @param field The field to add to the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
380 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
381 void gaim_request_field_group_add_field(GaimRequestFieldGroup *group,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
382 GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
383
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
384 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
385 * Returns the title of a fields group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
386 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
387 * @param group The group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
388 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
389 * @return The title, if set.
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 const char *gaim_request_field_group_get_title(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
392 const GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
393
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
394 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
395 * Returns a list of all fields in a group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
396 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
397 * @param group The group.
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 * @return The list of fields in the group.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
400 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
401 GList *gaim_request_field_group_get_fields(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
402 const GaimRequestFieldGroup *group);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
403
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
404 /*@}*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
405
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
406 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
407 /** @name Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
408 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
409 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
410
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
411 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
412 * Creates a field of the specified type.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
413 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
414 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
415 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
416 * @param type The type of 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 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
419 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
420 GaimRequestField *gaim_request_field_new(const char *id, const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
421 GaimRequestFieldType type);
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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
424 * Destroys a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
425 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
426 * @param field The field to destroy.
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 void gaim_request_field_destroy(GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
429
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
430 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
431 * Sets the label text of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
432 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
433 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
434 * @param label The text label.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
435 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
436 void gaim_request_field_set_label(GaimRequestField *field, const char *label);
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 /**
7904
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
439 * Sets whether or not a field is visible.
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
440 *
8285
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
441 * @param field The field.
7904
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
442 * @param visible TRUE if visible, or FALSE if not.
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
443 */
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
444 void gaim_request_field_set_visible(GaimRequestField *field, gboolean visible);
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
445
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
446 /**
8285
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
447 * Sets the type hint for the field.
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
448 *
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
449 * This is optionally used by the UIs to provide such features as
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
450 * auto-completion for type hints like "screenname."
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
451 *
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
452 * @param field The field.
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
453 * @param type_hint The type hint.
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
454 */
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
455 void gaim_request_field_set_type_hint(GaimRequestField *field,
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
456 const char *type_hint);
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
457
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
458 /**
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
459 * Sets whether or not a field is required.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
460 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
461 * @param field The field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
462 * @param required TRUE if required, or FALSE.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
463 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
464 void gaim_request_field_set_required(GaimRequestField *field,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
465 gboolean required);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
466
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
467 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
468 * Returns the type of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
469 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
470 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
471 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
472 * @return The field's type.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
473 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
474 GaimRequestFieldType gaim_request_field_get_type(const GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
477 * Returns the ID of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
478 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
479 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
480 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
481 * @return The ID
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 const char *gaim_request_field_get_id(const GaimRequestField *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 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
486 * Returns the label text of a field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
487 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
488 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
489 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
490 * @return The label text.
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 const char *gaim_request_field_get_label(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
493
7904
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
494 /**
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
495 * Returns whether or not a field is visible.
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
496 *
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
497 * @param field The field.
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
498 *
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
499 * @return TRUE if the field is visible. FALSE otherwise.
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
500 */
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
501 gboolean gaim_request_field_is_visible(const GaimRequestField *field);
9b478c6e0bfa [gaim-migrate @ 8564]
Christian Hammond <chipx86@chipx86.com>
parents: 7902
diff changeset
502
8285
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
503 /**
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
504 * Returns the field's type hint.
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
505 *
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
506 * @param field The field.
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
507 *
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
508 * @return The field's type hint.
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
509 */
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
510 const char *gaim_request_field_get_type_hint(const GaimRequestField *field);
d335cc7bca54 [gaim-migrate @ 9009]
Christian Hammond <chipx86@chipx86.com>
parents: 8046
diff changeset
511
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
512 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
513 * Returns whether or not a field is required.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
514 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
515 * @param field The field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
516 *
8735
92cbf9713795 [gaim-migrate @ 9490]
Christian Hammond <chipx86@chipx86.com>
parents: 8699
diff changeset
517 * @return TRUE if the field is required, or FALSE.
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
518 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
519 gboolean gaim_request_field_is_required(const GaimRequestField *field);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
520
5807
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
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
523 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
524 /** @name String Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
525 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
526 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
527
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
528 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
529 * Creates a string request field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
530 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
531 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
532 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
533 * @param default_value The optional default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
534 * @param multiline Whether or not this should be a multiline string.
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 new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
537 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
538 GaimRequestField *gaim_request_field_string_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
539 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
540 const char *default_value,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
541 gboolean multiline);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
542
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
543 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
544 * Sets the default value in a string field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
545 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
546 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
547 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
548 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
549 void gaim_request_field_string_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
550 const char *default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
551
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
552 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
553 * Sets the value in a string field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
554 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
555 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
556 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
557 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
558 void gaim_request_field_string_set_value(GaimRequestField *field,
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
559 const char *value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
560
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
561 /**
7047
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
562 * Sets whether or not a string field is masked
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
563 * (commonly used for password fields).
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
564 *
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
565 * @param field The field.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
566 * @param masked The masked value.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
567 */
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
568 void gaim_request_field_string_set_masked(GaimRequestField *field,
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
569 gboolean masked);
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
570
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
571 /**
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
572 * Sets whether or not a string field is editable.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
573 *
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
574 * @param field The field.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
575 * @param editable The editable value.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
576 */
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
577 void gaim_request_field_string_set_editable(GaimRequestField *field,
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
578 gboolean editable);
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
579
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
580 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
581 * Returns the default value in a string field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
582 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
583 * @param field The field.
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
584 *
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
585 * @return The default value.
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 const char *gaim_request_field_string_get_default_value(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
588 const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
589
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
590 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
591 * Returns the user-entered value in a string field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
592 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
593 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
594 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
595 * @return The value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
596 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
597 const char *gaim_request_field_string_get_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
598
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
599 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
600 * Returns whether or not a string field is multi-line.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
601 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
602 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
603 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
604 * @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
605 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
606 gboolean gaim_request_field_string_is_multiline(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
607
7047
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
608 /**
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
609 * Returns whether or not a string field is masked.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
610 *
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
611 * @param field The field.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
612 *
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
613 * @return @c TRUE if the field is masked, or @c FALSE otherwise.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
614 */
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
615 gboolean gaim_request_field_string_is_masked(const GaimRequestField *field);
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
616
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
617 /**
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
618 * Returns whether or not a string field is editable.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
619 *
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
620 * @param field The field.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
621 *
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
622 * @return @c TRUE if the field is editable, or @c FALSE otherwise.
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
623 */
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
624 gboolean gaim_request_field_string_is_editable(const GaimRequestField *field);
7d1909655fd0 [gaim-migrate @ 7610]
Christian Hammond <chipx86@chipx86.com>
parents: 7035
diff changeset
625
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
626 /*@}*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
627
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
628 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
629 /** @name Integer Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
630 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
631 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
632
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
633 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
634 * Creates an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
635 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
636 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
637 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
638 * @param default_value The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
639 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
640 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
641 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
642 GaimRequestField *gaim_request_field_int_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
643 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
644 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
645
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
646 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
647 * Sets the default value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
648 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
649 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
650 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
651 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
652 void gaim_request_field_int_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
653 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
654
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
655 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
656 * Sets the value in an integer field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
657 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
658 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
659 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
660 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
661 void gaim_request_field_int_set_value(GaimRequestField *field, int value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
662
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
663 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
664 * Returns the default value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
665 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
666 * @param field The field.
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
667 *
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
668 * @return The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
669 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
670 int gaim_request_field_int_get_default_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
671
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
672 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
673 * Returns the user-entered value in an integer field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
674 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
675 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
676 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
677 * @return The value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
678 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
679 int gaim_request_field_int_get_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
680
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
681 /*@}*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
682
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
683 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
684 /** @name Boolean Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
685 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
686 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
687
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
688 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
689 * Creates a boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
690 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
691 * This is often represented as a checkbox.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
692 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
693 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
694 * @param text The text label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
695 * @param default_value The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
696 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
697 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
698 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
699 GaimRequestField *gaim_request_field_bool_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
700 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
701 gboolean default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
702
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
703 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
704 * Sets the default value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
705 *
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
706 * @param field The field.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
707 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
708 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
709 void gaim_request_field_bool_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
710 gboolean default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
711
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
712 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
713 * Sets the value in an boolean field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
714 *
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
715 * @param field The field.
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
716 * @param value The value.
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
717 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
718 void gaim_request_field_bool_set_value(GaimRequestField *field,
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
719 gboolean value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
720
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
721 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
722 * Returns the default value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
723 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
724 * @param field The field.
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
725 *
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
726 * @return The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
727 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
728 gboolean gaim_request_field_bool_get_default_value(
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
729 const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
730
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
731 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
732 * Returns the user-entered value in an boolean field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
733 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
734 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
735 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
736 * @return The value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
737 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
738 gboolean gaim_request_field_bool_get_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
739
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
740 /*@}*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
741
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
742 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
743 /** @name Choice Field API */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
744 /**************************************************************************/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
745 /*@{*/
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
746
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
747 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
748 * Creates a multiple choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
749 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
750 * This is often represented as a group of radio buttons.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
751 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
752 * @param id The field ID.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
753 * @param text The optional label of the field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
754 * @param default_value The default choice.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
755 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
756 * @return The new field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
757 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
758 GaimRequestField *gaim_request_field_choice_new(const char *id,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
759 const char *text,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
760 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
761
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
762 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
763 * Adds a choice to a multiple choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
764 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
765 * @param field The choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
766 * @param label The choice label.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
767 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
768 void gaim_request_field_choice_add(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
769 const char *label);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
770
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
771 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
772 * Sets the default value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
773 *
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
774 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
775 * @param default_value The default value.
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
776 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
777 void gaim_request_field_choice_set_default_value(GaimRequestField *field,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
778 int default_value);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
779
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
780 /**
5808
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
781 * Sets the value in an choice field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
782 *
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
783 * @param field The field.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
784 * @param value The value.
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
785 */
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
786 void gaim_request_field_choice_set_value(GaimRequestField *field, int value);
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
787
133e86584f4b [gaim-migrate @ 6238]
Christian Hammond <chipx86@chipx86.com>
parents: 5807
diff changeset
788 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
789 * Returns the default value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
790 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
791 * @param field The field.
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
792 *
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
793 * @return The default value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
794 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
795 int gaim_request_field_choice_get_default_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
796
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
797 /**
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
798 * Returns the user-entered value in an choice field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
799 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
800 * @param field The field.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
801 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
802 * @return The value.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
803 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
804 int gaim_request_field_choice_get_value(const GaimRequestField *field);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
805
5809
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
806 /**
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
807 * Returns a list of labels in a choice field.
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
808 *
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
809 * @param field The field.
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
810 *
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
811 * @return The list of labels.
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
812 */
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
813 GList *gaim_request_field_choice_get_labels(const GaimRequestField *field);
0a661f6d65e3 [gaim-migrate @ 6239]
Christian Hammond <chipx86@chipx86.com>
parents: 5808
diff changeset
814
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
815 /*@}*/
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
816
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
817 /**************************************************************************/
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
818 /** @name List Field API */
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
819 /**************************************************************************/
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
820 /*@{*/
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
821
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
822 /**
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
823 * Creates a multiple list item field.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
824 *
7909
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
825 * @param id The field ID.
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
826 * @param text The optional label of the field.
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
827 *
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
828 * @return The new field.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
829 */
7909
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
830 GaimRequestField *gaim_request_field_list_new(const char *id, const char *text);
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
831
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
832 /**
7899
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
833 * Sets whether or not a list field allows multiple selection.
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
834 *
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
835 * @param field The list field.
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
836 * @param multi_select TRUE if multiple selection is enabled,
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
837 * or FALSE otherwise.
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
838 */
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
839 void gaim_request_field_list_set_multi_select(GaimRequestField *field,
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
840 gboolean multi_select);
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
841
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
842 /**
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
843 * Returns whether or not a list field allows multiple selection.
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
844 *
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
845 * @param field The list field.
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
846 *
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
847 * @return TRUE if multiple selection is enabled, or FALSE otherwise.
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
848 */
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
849 gboolean gaim_request_field_list_get_multi_select(
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
850 const GaimRequestField *field);
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
851
7b64108b8ae3 [gaim-migrate @ 8559]
Christian Hammond <chipx86@chipx86.com>
parents: 7898
diff changeset
852 /**
7909
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
853 * Returns the data for a particular item.
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
854 *
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
855 * @param field The list field.
9000
b540c735a6ad [gaim-migrate @ 9775]
Luke Schierer <lschiere@pidgin.im>
parents: 8843
diff changeset
856 * @param text The item text.
7909
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
857 *
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
858 * @return The data associated with the item.
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
859 */
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
860 void *gaim_request_field_list_get_data(const GaimRequestField *field,
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
861 const char *text);
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
862
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
863 /**
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
864 * Adds an item to a list field.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
865 *
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
866 * @param field The list field.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
867 * @param item The list item.
7909
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
868 * @param data The associated data.
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
869 */
7909
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
870 void gaim_request_field_list_add(GaimRequestField *field,
5be22af4ebfc [gaim-migrate @ 8569]
Christian Hammond <chipx86@chipx86.com>
parents: 7905
diff changeset
871 const char *item, void *data);
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
872
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
873 /**
7902
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
874 * Adds a selected item to the list field.
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
875 *
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
876 * @param field The field.
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
877 * @param item The item to add.
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
878 */
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
879 void gaim_request_field_list_add_selected(GaimRequestField *field,
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
880 const char *item);
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
881
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
882 /**
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
883 * Clears the list of selected items in a list field.
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
884 *
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
885 * @param field The field.
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
886 */
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
887 void gaim_request_field_list_clear_selected(GaimRequestField *field);
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
888
3ca501305ac5 [gaim-migrate @ 8562]
Christian Hammond <chipx86@chipx86.com>
parents: 7901
diff changeset
889 /**
7901
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
890 * Sets a list of selected items in a list field.
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
891 *
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
892 * @param field The field.
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
893 * @param items The list of selected items.
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
894 */
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
895 void gaim_request_field_list_set_selected(GaimRequestField *field,
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
896 GList *items);
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
897
4344f7fad009 [gaim-migrate @ 8561]
Christian Hammond <chipx86@chipx86.com>
parents: 7899
diff changeset
898 /**
7964
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
899 * Returns whether or not a particular item is selected in a list field.
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
900 *
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
901 * @param field The field.
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
902 * @param item The item.
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
903 *
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
904 * @return TRUE if the item is selected. FALSE otherwise.
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
905 */
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
906 gboolean gaim_request_field_list_is_selected(const GaimRequestField *field,
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
907 const char *item);
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
908
a5c70e43ee43 [gaim-migrate @ 8641]
Christian Hammond <chipx86@chipx86.com>
parents: 7963
diff changeset
909 /**
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
910 * Returns a list of selected items in a list field.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
911 *
7963
96b71ea64386 [gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents: 7909
diff changeset
912 * To retrieve the data for each item, use
96b71ea64386 [gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents: 7909
diff changeset
913 * gaim_request_field_list_get_data().
96b71ea64386 [gaim-migrate @ 8640]
Christian Hammond <chipx86@chipx86.com>
parents: 7909
diff changeset
914 *
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
915 * @param field The field.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
916 *
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
917 * @return The list of selected items.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
918 */
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
919 const GList *gaim_request_field_list_get_selected(
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
920 const GaimRequestField *field);
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
921
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
922 /**
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
923 * Returns a list of items in a list field.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
924 *
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
925 * @param field The field.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
926 *
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
927 * @return The list of items.
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
928 */
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
929 const GList *gaim_request_field_list_get_items(const GaimRequestField *field);
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
930
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
931 /*@}*/
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
932
7905
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
933 /**************************************************************************/
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
934 /** @name Label Field API */
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
935 /**************************************************************************/
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
936 /*@{*/
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
937
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
938 /**
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
939 * Creates a label field.
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
940 *
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
941 * @param id The field ID.
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
942 * @param text The label of the field.
7905
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
943 *
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
944 * @return The new field.
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
945 */
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
946 GaimRequestField *gaim_request_field_label_new(const char *id,
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
947 const char *text);
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
948
1d0bc32f8038 [gaim-migrate @ 8565]
Christian Hammond <chipx86@chipx86.com>
parents: 7904
diff changeset
949 /*@}*/
7898
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
950
9c0ea21997a9 [gaim-migrate @ 8558]
Christian Hammond <chipx86@chipx86.com>
parents: 7047
diff changeset
951 /**************************************************************************/
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
952 /** @name Account Field API */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
953 /**************************************************************************/
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
954 /*@{*/
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
955
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
956 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
957 * Creates an account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
958 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
959 * By default, this field will not show offline accounts.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
960 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
961 * @param id The field ID.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
962 * @param text The text label of the field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
963 * @param account The optional default account.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
964 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
965 * @return The new field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
966 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
967 GaimRequestField *gaim_request_field_account_new(const char *id,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
968 const char *text,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
969 GaimAccount *account);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
970
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
971 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
972 * Sets the default account on an account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
973 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
974 * @param field The account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
975 * @param default_value The default account.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
976 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
977 void gaim_request_field_account_set_default_value(GaimRequestField *field,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
978 GaimAccount *default_value);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
979
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
980 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
981 * Sets the account in an account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
982 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
983 * @param field The account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
984 * @param value The account.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
985 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
986 void gaim_request_field_account_set_value(GaimRequestField *field,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
987 GaimAccount *value);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
988
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
989 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
990 * Sets whether or not to show all accounts in an account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
991 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
992 * If TRUE, all accounts, online or offline, will be shown. If FALSE,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
993 * only online accounts will be shown.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
994 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
995 * @param field The account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
996 * @param show_all Whether or not to show all accounts.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
997 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
998 void gaim_request_field_account_set_show_all(GaimRequestField *field,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
999 gboolean show_all);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1000
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1001 /**
8289
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1002 * Sets the account filter function in an account field.
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1003 *
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1004 * This function will determine which accounts get displayed and which
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1005 * don't.
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1006 *
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1007 * @param field The account field.
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1008 * @param filter_func The account filter function.
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1009 */
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1010 void gaim_request_field_account_set_filter(GaimRequestField *field,
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1011 GaimFilterAccountFunc filter_func);
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1012
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1013 /**
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1014 * Returns the default account in an account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1015 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1016 * @param field The field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1017 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1018 * @return The default account.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1019 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1020 GaimAccount *gaim_request_field_account_get_default_value(
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1021 const GaimRequestField *field);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1022
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1023 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1024 * Returns the user-entered account in an account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1025 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1026 * @param field The field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1027 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1028 * @return The user-entered account.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1029 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1030 GaimAccount *gaim_request_field_account_get_value(
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1031 const GaimRequestField *field);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1032
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1033 /**
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1034 * Returns whether or not to show all accounts in an account field.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1035 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1036 * If TRUE, all accounts, online or offline, will be shown. If FALSE,
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1037 * only online accounts will be shown.
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1038 *
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1039 * @param field The account field.
9000
b540c735a6ad [gaim-migrate @ 9775]
Luke Schierer <lschiere@pidgin.im>
parents: 8843
diff changeset
1040 * @return Whether or not to show all accounts.
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1041 */
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1042 gboolean gaim_request_field_account_get_show_all(
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1043 const GaimRequestField *field);
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1044
8289
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1045 /**
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1046 * Returns the account filter function in an account field.
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1047 *
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1048 * This function will determine which accounts get displayed and which
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1049 * don't.
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1050 *
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1051 * @param field The account field.
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1052 *
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1053 * @return The account filter function.
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1054 */
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1055 GaimFilterAccountFunc gaim_request_field_account_get_filter(
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1056 const GaimRequestField *field);
e39ea2b4f6cd [gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents: 8286
diff changeset
1057
8286
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1058 /*@}*/
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1059
89d9d004e3f3 [gaim-migrate @ 9010]
Christian Hammond <chipx86@chipx86.com>
parents: 8285
diff changeset
1060 /**************************************************************************/
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1061 /** @name Request API */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1062 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1063 /*@{*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1064
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1065 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1066 * Prompts the user for text input.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1067 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1068 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1069 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1070 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1071 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1072 * @param default_value The default value.
5482
a41149ee8a29 [gaim-migrate @ 5878]
Christian Hammond <chipx86@chipx86.com>
parents: 5477
diff changeset
1073 * @param multiline TRUE if the inputted text can span multiple lines.
6035
8c44020a958e [gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
1074 * @param masked TRUE if the inputted text should be masked in some way.
8699
775bd10da7f2 [gaim-migrate @ 9452]
Mark Doliner <mark@kingant.net>
parents: 8697
diff changeset
1075 * @param hint Optionally suggest how the input box should appear.
775bd10da7f2 [gaim-migrate @ 9452]
Mark Doliner <mark@kingant.net>
parents: 8697
diff changeset
1076 * Use "html," for example, to allow the user to enter
775bd10da7f2 [gaim-migrate @ 9452]
Mark Doliner <mark@kingant.net>
parents: 8697
diff changeset
1077 * HTML.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1078 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1079 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1080 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1081 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1082 * @param user_data The data to pass to the callback.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1083 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1084 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1085 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1086 void *gaim_request_input(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1087 const char *primary, const char *secondary,
6035
8c44020a958e [gaim-migrate @ 6485]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
1088 const char *default_value,
8697
725413cc9fb9 [gaim-migrate @ 9450]
Mark Doliner <mark@kingant.net>
parents: 8395
diff changeset
1089 gboolean multiline, gboolean masked, gchar *hint,
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1090 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1091 const char *cancel_text, GCallback cancel_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1092 void *user_data);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1093
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1094 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1095 * Prompts the user for multiple-choice input.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1096 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1097 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1098 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1099 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1100 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1101 * @param default_value The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1102 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1103 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1104 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1105 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1106 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1107 * @param choice_count The number of choices.
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
1108 * @param ... The choices.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1109 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1110 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1111 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1112 void *gaim_request_choice(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1113 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1114 unsigned int default_value,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1115 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1116 const char *cancel_text, GCallback cancel_cb,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1117 void *user_data, size_t choice_count, ...);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1118
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1119 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1120 * Prompts the user for multiple-choice input.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1121 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1122 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1123 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1124 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1125 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1126 * @param default_value The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1127 * @param ok_text The text for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1128 * @param ok_cb The callback for the OK button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1129 * @param cancel_text The text for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1130 * @param cancel_cb The callback for the cancel button.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1131 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1132 * @param choice_count The number of choices.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1133 * @param choices The choices.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1134 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1135 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1136 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1137 void *gaim_request_choice_varg(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1138 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1139 unsigned int default_value,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1140 const char *ok_text, GCallback ok_cb,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1141 const char *cancel_text, GCallback cancel_cb,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1142 void *user_data, size_t choice_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1143 va_list choices);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1144
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1145 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1146 * Prompts the user for an action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1147 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1148 * 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
1149 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1150 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1151 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1152 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1153 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1154 * @param default_action The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1155 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1156 * @param action_count The number of actions.
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
1157 * @param ... A list of actions.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1158 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1159 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1160 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1161 void *gaim_request_action(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1162 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1163 unsigned int default_action,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1164 void *user_data, size_t action_count, ...);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1165
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1166 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1167 * Prompts the user for an action.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1168 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1169 * 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
1170 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1171 * @param handle The plugin or connection handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1172 * @param title The title of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1173 * @param primary The main point of the message.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1174 * @param secondary The secondary information.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1175 * @param default_action The default value.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1176 * @param user_data The data to pass to the callback.
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1177 * @param action_count The number of actions.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1178 * @param actions A list of actions and callbacks.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1179 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1180 * @return A UI-specific handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1181 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1182 void *gaim_request_action_varg(void *handle, const char *title,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1183 const char *primary, const char *secondary,
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1184 unsigned int default_action,
5496
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1185 void *user_data, size_t action_count,
b7c0be69c749 [gaim-migrate @ 5892]
Christian Hammond <chipx86@chipx86.com>
parents: 5482
diff changeset
1186 va_list actions);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1187
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1188 /**
5807
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1189 * Displays groups of fields for the user to fill in.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1190 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1191 * @param handle The plugin or connection handle.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1192 * @param title The title of the message.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1193 * @param primary The main point of the message.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1194 * @param secondary The secondary information.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1195 * @param fields The list of fields.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1196 * @param ok_text The text for the OK button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1197 * @param ok_cb The callback for the OK button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1198 * @param cancel_text The text for the cancel button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1199 * @param cancel_cb The callback for the cancel button.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1200 * @param user_data The data to pass to the callback.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1201 *
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1202 * @return A UI-specific handle.
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1203 */
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1204 void *gaim_request_fields(void *handle, const char *title,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1205 const char *primary, const char *secondary,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1206 GaimRequestFields *fields,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1207 const char *ok_text, GCallback ok_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1208 const char *cancel_text, GCallback cancel_cb,
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1209 void *user_data);
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1210
11001789cb22 [gaim-migrate @ 6237]
Christian Hammond <chipx86@chipx86.com>
parents: 5498
diff changeset
1211 /**
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1212 * Closes a request.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1213 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1214 * @param type The request type.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1215 * @param uihandle The request UI handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1216 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1217 void gaim_request_close(GaimRequestType type, void *uihandle);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1218
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1219 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1220 * Closes all requests registered with the specified handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1221 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1222 * @param handle The handle.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1223 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1224 void gaim_request_close_with_handle(void *handle);
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1225
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1226 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1227 * A wrapper for gaim_request_action() that uses Yes and No buttons.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1228 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1229 #define gaim_request_yes_no(handle, title, primary, secondary, \
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1230 default_action, user_data, yes_cb, no_cb) \
5498
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1231 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1232 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1233 _("Yes"), (yes_cb), _("No"), (no_cb))
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1234
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1235 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1236 * A wrapper for gaim_request_action() that uses OK and Cancel buttons.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1237 */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1238 #define gaim_request_ok_cancel(handle, title, primary, secondary, \
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1239 default_action, user_data, ok_cb, cancel_cb) \
5498
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1240 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1241 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1242 _("OK"), (ok_cb), _("Cancel"), (cancel_cb))
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1243
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1244 /**
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1245 * 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
1246 */
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1247 #define gaim_request_accept_cancel(handle, title, primary, secondary, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1248 default_action, user_data, accept_cb, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1249 cancel_cb) \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1250 gaim_request_action((handle), (title), (primary), (secondary), \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1251 (default_action), (user_data), 2, \
cce2d7868c78 [gaim-migrate @ 5894]
Christian Hammond <chipx86@chipx86.com>
parents: 5496
diff changeset
1252 _("Accept"), (accept_cb), _("Cancel"), (cancel_cb))
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1253
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1254 /*@}*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1255
8843
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1256 /**
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1257 * Displays file selector request dialog. Returns the selected filename into
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1258 * the callback.
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1259 *
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1260 * @param handle The plugin or connection handle.
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1261 * @param title The title for the dialog (may be NULL)
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1262 * @param filename The default filename (may be NULL)
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1263 * @param ok_cb The callback for the OK button.
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1264 * @param cancel_cb The callback for the cancel button.
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1265 * @param user_data The data to pass to the callback.
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1266 *
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1267 * @return A UI-specific handle.
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1268 */
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1269 void *gaim_request_file(void *handle, const char *title, const char *filename,
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1270 GCallback ok_cb, GCallback cancel_cb,
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1271 void *user_data);
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1272
1bbe99a07e36 [gaim-migrate @ 9610]
Ethan Blanton <elb@pidgin.im>
parents: 8735
diff changeset
1273
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1274 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1275 /** @name UI Operations API */
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1276 /**************************************************************************/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1277 /*@{*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1278
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1279 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1280 * Sets the UI operations structure to be used when displaying a
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1281 * request.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1282 *
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1283 * @param ops The UI operations structure.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1284 */
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
1285 void gaim_request_set_ui_ops(GaimRequestUiOps *ops);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1286
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1287 /**
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1288 * Returns the UI operations structure to be used when displaying a
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1289 * request.
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1290 *
6720
41120df7ed94 [gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents: 6035
diff changeset
1291 * @return The UI operations structure.
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1292 */
7035
feb3d21a7794 [gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents: 6720
diff changeset
1293 GaimRequestUiOps *gaim_request_get_ui_ops(void);
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1294
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1295 /*@}*/
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1296
5944
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
1297 #ifdef __cplusplus
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
1298 }
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
1299 #endif
158196b2db19 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5809
diff changeset
1300
5477
e8e498255369 [gaim-migrate @ 5873]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
1301 #endif /* _GAIM_REQUEST_H_ */