Mercurial > pidgin.yaz
comparison src/request.h @ 5496:b7c0be69c749
[gaim-migrate @ 5892]
do_ask_dialog() will soon go the way of the something that goes away a lot.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Fri, 23 May 2003 00:48:20 +0000 |
parents | a41149ee8a29 |
children | cce2d7868c78 |
comparison
equal
deleted
inserted
replaced
5495:5b678994929b | 5496:b7c0be69c749 |
---|---|
51 void *user_data); | 51 void *user_data); |
52 void *(*request_choice)(const char *title, const char *primary, | 52 void *(*request_choice)(const char *title, const char *primary, |
53 const char *secondary, unsigned int default_value, | 53 const char *secondary, unsigned int default_value, |
54 const char *ok_text, GCallback ok_cb, | 54 const char *ok_text, GCallback ok_cb, |
55 const char *cancel_text, GCallback cancel_cb, | 55 const char *cancel_text, GCallback cancel_cb, |
56 void *user_data, va_list args); | 56 void *user_data, size_t choice_count, |
57 va_list choices); | |
57 void *(*request_action)(const char *title, const char *primary, | 58 void *(*request_action)(const char *title, const char *primary, |
58 const char *secondary, unsigned int default_action, | 59 const char *secondary, unsigned int default_action, |
59 void *user_data, va_list actions); | 60 void *user_data, size_t action_count, |
61 va_list actions); | |
60 | 62 |
61 void (*close_request)(GaimRequestType type, void *ui_handle); | 63 void (*close_request)(GaimRequestType type, void *ui_handle); |
62 | 64 |
63 } GaimRequestUiOps; | 65 } GaimRequestUiOps; |
64 | 66 |
65 typedef void (*GaimRequestInputCb)(const char *, void *); | 67 typedef void (*GaimRequestInputCb)(const char *, void *); |
68 typedef void (*GaimRequestActionCb)(int, void *); | |
66 | 69 |
67 /**************************************************************************/ | 70 /**************************************************************************/ |
68 /** @name Request API */ | 71 /** @name Request API */ |
69 /**************************************************************************/ | 72 /**************************************************************************/ |
70 /*@{*/ | 73 /*@{*/ |
104 * @param ok_text The text for the OK button. | 107 * @param ok_text The text for the OK button. |
105 * @param ok_cb The callback for the OK button. | 108 * @param ok_cb The callback for the OK button. |
106 * @param cancel_text The text for the cancel button. | 109 * @param cancel_text The text for the cancel button. |
107 * @param cancel_cb The callback for the cancel button. | 110 * @param cancel_cb The callback for the cancel button. |
108 * @param user_data The data to pass to the callback. | 111 * @param user_data The data to pass to the callback. |
112 * @param choice_count The number of choices. | |
109 * @param choice The choices. | 113 * @param choice The choices. |
110 * | 114 * |
111 * @return A UI-specific handle. | 115 * @return A UI-specific handle. |
112 */ | 116 */ |
113 void *gaim_request_choice(void *handle, const char *title, | 117 void *gaim_request_choice(void *handle, const char *title, |
114 const char *primary, const char *secondary, | 118 const char *primary, const char *secondary, |
115 unsigned int default_value, | 119 unsigned int default_value, |
116 const char *ok_text, GCallback ok_cb, | 120 const char *ok_text, GCallback ok_cb, |
117 const char *cancel_text, GCallback cancel_cb, | 121 const char *cancel_text, GCallback cancel_cb, |
118 void *user_data, | 122 void *user_data, size_t choice_count, ...); |
119 const char *choice, ...); | |
120 | 123 |
121 /** | 124 /** |
122 * Prompts the user for multiple-choice input. | 125 * Prompts the user for multiple-choice input. |
123 * | 126 * |
124 * @param handle The plugin or connection handle. | 127 * @param handle The plugin or connection handle. |
129 * @param ok_text The text for the OK button. | 132 * @param ok_text The text for the OK button. |
130 * @param ok_cb The callback for the OK button. | 133 * @param ok_cb The callback for the OK button. |
131 * @param cancel_text The text for the cancel button. | 134 * @param cancel_text The text for the cancel button. |
132 * @param cancel_cb The callback for the cancel button. | 135 * @param cancel_cb The callback for the cancel button. |
133 * @param user_data The data to pass to the callback. | 136 * @param user_data The data to pass to the callback. |
137 * @param choice_count The number of choices. | |
134 * @param choices The choices. | 138 * @param choices The choices. |
135 * | 139 * |
136 * @return A UI-specific handle. | 140 * @return A UI-specific handle. |
137 */ | 141 */ |
138 void *gaim_request_choice_varg(void *handle, const char *title, | 142 void *gaim_request_choice_varg(void *handle, const char *title, |
139 const char *primary, const char *secondary, | 143 const char *primary, const char *secondary, |
140 unsigned int default_value, | 144 unsigned int default_value, |
141 const char *ok_text, GCallback ok_cb, | 145 const char *ok_text, GCallback ok_cb, |
142 const char *cancel_text, GCallback cancel_cb, | 146 const char *cancel_text, GCallback cancel_cb, |
143 void *user_data, va_list choices); | 147 void *user_data, size_t choice_count, |
148 va_list choices); | |
144 | 149 |
145 /** | 150 /** |
146 * Prompts the user for an action. | 151 * Prompts the user for an action. |
147 * | 152 * |
148 * This is often represented as a dialog with a button for each action. | 153 * This is often represented as a dialog with a button for each action. |
151 * @param title The title of the message. | 156 * @param title The title of the message. |
152 * @param primary The main point of the message. | 157 * @param primary The main point of the message. |
153 * @param secondary The secondary information. | 158 * @param secondary The secondary information. |
154 * @param default_action The default value. | 159 * @param default_action The default value. |
155 * @param user_data The data to pass to the callback. | 160 * @param user_data The data to pass to the callback. |
161 * @param action_count The number of actions. | |
156 * @param action The first action. | 162 * @param action The first action. |
157 * | 163 * |
158 * @return A UI-specific handle. | 164 * @return A UI-specific handle. |
159 */ | 165 */ |
160 void *gaim_request_action(void *handle, const char *title, | 166 void *gaim_request_action(void *handle, const char *title, |
161 const char *primary, const char *secondary, | 167 const char *primary, const char *secondary, |
162 unsigned int default_action, | 168 unsigned int default_action, |
163 void *user_data, const char *action, ...); | 169 void *user_data, size_t action_count, ...); |
164 | 170 |
165 /** | 171 /** |
166 * Prompts the user for an action. | 172 * Prompts the user for an action. |
167 * | 173 * |
168 * This is often represented as a dialog with a button for each action. | 174 * This is often represented as a dialog with a button for each action. |
171 * @param title The title of the message. | 177 * @param title The title of the message. |
172 * @param primary The main point of the message. | 178 * @param primary The main point of the message. |
173 * @param secondary The secondary information. | 179 * @param secondary The secondary information. |
174 * @param default_action The default value. | 180 * @param default_action The default value. |
175 * @param user_data The data to pass to the callback. | 181 * @param user_data The data to pass to the callback. |
182 * @param action_count The number of actions. | |
176 * @param actions A list of actions and callbacks. | 183 * @param actions A list of actions and callbacks. |
177 * | 184 * |
178 * @return A UI-specific handle. | 185 * @return A UI-specific handle. |
179 */ | 186 */ |
180 void *gaim_request_action_varg(void *handle, const char *title, | 187 void *gaim_request_action_varg(void *handle, const char *title, |
181 const char *primary, const char *secondary, | 188 const char *primary, const char *secondary, |
182 unsigned int default_action, | 189 unsigned int default_action, |
183 void *user_data, va_list actions); | 190 void *user_data, size_t action_count, |
191 va_list actions); | |
184 | 192 |
185 /** | 193 /** |
186 * Closes a request. | 194 * Closes a request. |
187 * | 195 * |
188 * This should be used only by the UI operation functions and part of the | 196 * This should be used only by the UI operation functions and part of the |