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