| 77 |
77 |
| 78 |
78 |
| 79 G_BEGIN_DECLS |
79 G_BEGIN_DECLS |
| 80 |
80 |
| 81 /** |
81 /** |
| |
82 * pidgin_setup_webview: |
| |
83 * @webview: The gtkwebview widget to setup. |
| |
84 * |
| 82 * Sets up a gtkwebview widget, loads it with smileys, and sets the |
85 * Sets up a gtkwebview widget, loads it with smileys, and sets the |
| 83 * default signal handlers. |
86 * default signal handlers. |
| 84 * |
|
| 85 * @webview: The gtkwebview widget to setup. |
|
| 86 */ |
87 */ |
| 87 void pidgin_setup_webview(GtkWidget *webview); |
88 void pidgin_setup_webview(GtkWidget *webview); |
| 88 |
89 |
| 89 /** |
90 /** |
| 90 * Create an GtkWebView widget and associated GtkWebViewToolbar widget. This |
91 * pidgin_create_webview: |
| 91 * function puts both widgets in a nice GtkFrame. They're separated by an |
|
| 92 * attractive GtkSeparator. |
|
| 93 * |
|
| 94 * @editable: %TRUE if this webview should be editable. If this is |
92 * @editable: %TRUE if this webview should be editable. If this is |
| 95 * %FALSE, then the toolbar will NOT be created. If this webview |
93 * %FALSE, then the toolbar will NOT be created. If this webview |
| 96 * should be read-only at first, but may become editable later, then |
94 * should be read-only at first, but may become editable later, then |
| 97 * pass in %TRUE here and then manually call gtk_webview_set_editable() |
95 * pass in %TRUE here and then manually call gtk_webview_set_editable() |
| 98 * later. |
96 * later. |
| 99 * @webview_ret: A pointer to a pointer to a GtkWidget. This pointer |
97 * @webview_ret: A pointer to a pointer to a GtkWidget. This pointer |
| 100 * will be set to the webview when this function exits. |
98 * will be set to the webview when this function exits. |
| 101 * @sw_ret: This will be filled with a pointer to the scrolled window |
99 * @sw_ret: This will be filled with a pointer to the scrolled window |
| 102 * widget which contains the webview. |
100 * widget which contains the webview. |
| 103 * |
101 * |
| |
102 * Create an GtkWebView widget and associated GtkWebViewToolbar widget. This |
| |
103 * function puts both widgets in a nice GtkFrame. They're separated by an |
| |
104 * attractive GtkSeparator. |
| |
105 * |
| 104 * Returns: The GtkFrame containing the toolbar and webview. |
106 * Returns: The GtkFrame containing the toolbar and webview. |
| 105 */ |
107 */ |
| 106 GtkWidget *pidgin_create_webview(gboolean editable, GtkWidget **webview_ret, GtkWidget **sw_ret); |
108 GtkWidget *pidgin_create_webview(gboolean editable, GtkWidget **webview_ret, GtkWidget **sw_ret); |
| 107 |
109 |
| 108 /** |
110 /** |
| |
111 * pidgin_create_small_button: |
| |
112 * @image: A button image. |
| |
113 * |
| 109 * Creates a small button |
114 * Creates a small button |
| 110 * |
115 * |
| 111 * @image: A button image. |
|
| 112 * |
|
| 113 * Returns: A GtkButton created from the image. |
116 * Returns: A GtkButton created from the image. |
| 114 */ |
117 */ |
| 115 GtkWidget *pidgin_create_small_button(GtkWidget *image); |
118 GtkWidget *pidgin_create_small_button(GtkWidget *image); |
| 116 |
119 |
| 117 /** |
120 /** |
| 118 * Creates a new window |
121 * pidgin_create_window: |
| 119 * |
|
| 120 * @title: The window title, or %NULL |
122 * @title: The window title, or %NULL |
| 121 * @border_width: The window's desired border width |
123 * @border_width: The window's desired border width |
| 122 * @role: A string indicating what the window is responsible for doing, or %NULL |
124 * @role: A string indicating what the window is responsible for doing, or %NULL |
| 123 * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE) |
125 * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE) |
| |
126 * |
| |
127 * Creates a new window |
| 124 */ |
128 */ |
| 125 GtkWidget *pidgin_create_window(const char *title, guint border_width, const char *role, gboolean resizable); |
129 GtkWidget *pidgin_create_window(const char *title, guint border_width, const char *role, gboolean resizable); |
| 126 |
130 |
| 127 /** |
131 /** |
| 128 * Creates a new dialog window |
132 * pidgin_create_dialog: |
| 129 * |
|
| 130 * @title: The window title, or %NULL |
133 * @title: The window title, or %NULL |
| 131 * @border_width: The window's desired border width |
134 * @border_width: The window's desired border width |
| 132 * @role: A string indicating what the window is responsible for doing, or %NULL |
135 * @role: A string indicating what the window is responsible for doing, or %NULL |
| 133 * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE) |
136 * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE) |
| |
137 * |
| |
138 * Creates a new dialog window |
| 134 */ |
139 */ |
| 135 GtkWidget *pidgin_create_dialog(const char *title, guint border_width, const char *role, gboolean resizable); |
140 GtkWidget *pidgin_create_dialog(const char *title, guint border_width, const char *role, gboolean resizable); |
| 136 |
141 |
| 137 /** |
142 /** |
| 138 * Retrieves the main content box (vbox) from a pidgin dialog window |
143 * pidgin_dialog_get_vbox_with_properties: |
| 139 * |
|
| 140 * @dialog: The dialog window |
144 * @dialog: The dialog window |
| 141 * @homogeneous: TRUE if all children are to be given equal space allotments. |
145 * @homogeneous: TRUE if all children are to be given equal space allotments. |
| 142 * @spacing: the number of pixels to place by default between children |
146 * @spacing: the number of pixels to place by default between children |
| |
147 * |
| |
148 * Retrieves the main content box (vbox) from a pidgin dialog window |
| 143 */ |
149 */ |
| 144 GtkWidget *pidgin_dialog_get_vbox_with_properties(GtkDialog *dialog, gboolean homogeneous, gint spacing); |
150 GtkWidget *pidgin_dialog_get_vbox_with_properties(GtkDialog *dialog, gboolean homogeneous, gint spacing); |
| 145 |
151 |
| 146 /** |
152 /** |
| |
153 * pidgin_dialog_get_vbox: |
| |
154 * @dialog: The dialog window |
| |
155 * |
| 147 * Retrieves the main content box (vbox) from a pidgin dialog window |
156 * Retrieves the main content box (vbox) from a pidgin dialog window |
| 148 * |
|
| 149 * @dialog: The dialog window |
|
| 150 */ |
157 */ |
| 151 GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog); |
158 GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog); |
| 152 |
159 |
| 153 /** |
160 /** |
| 154 * Add a button to a dialog created by #pidgin_create_dialog. |
161 * pidgin_dialog_add_button: |
| 155 * |
|
| 156 * @dialog: The dialog window |
162 * @dialog: The dialog window |
| 157 * @label: The stock-id or the label for the button |
163 * @label: The stock-id or the label for the button |
| 158 * @callback: The callback function for the button |
164 * @callback: The callback function for the button |
| 159 * @callbackdata: The user data for the callback function |
165 * @callbackdata: The user data for the callback function |
| 160 * |
166 * |
| |
167 * Add a button to a dialog created by #pidgin_create_dialog. |
| |
168 * |
| 161 * Returns: The created button. |
169 * Returns: The created button. |
| 162 */ |
170 */ |
| 163 GtkWidget *pidgin_dialog_add_button(GtkDialog *dialog, const char *label, |
171 GtkWidget *pidgin_dialog_add_button(GtkDialog *dialog, const char *label, |
| 164 GCallback callback, gpointer callbackdata); |
172 GCallback callback, gpointer callbackdata); |
| 165 |
173 |
| 166 /** |
174 /** |
| |
175 * pidgin_dialog_get_action_area: |
| |
176 * @dialog: The dialog window |
| |
177 * |
| 167 * Retrieves the action area (button box) from a pidgin dialog window |
178 * Retrieves the action area (button box) from a pidgin dialog window |
| 168 * |
|
| 169 * @dialog: The dialog window |
|
| 170 */ |
179 */ |
| 171 GtkWidget *pidgin_dialog_get_action_area(GtkDialog *dialog); |
180 GtkWidget *pidgin_dialog_get_action_area(GtkDialog *dialog); |
| 172 |
181 |
| 173 /** |
182 /** |
| 174 * Toggles the sensitivity of a widget. |
183 * pidgin_toggle_sensitive: |
| 175 * |
|
| 176 * @widget: %NULL. Used for signal handlers. |
184 * @widget: %NULL. Used for signal handlers. |
| 177 * @to_toggle: The widget to toggle. |
185 * @to_toggle: The widget to toggle. |
| |
186 * |
| |
187 * Toggles the sensitivity of a widget. |
| 178 */ |
188 */ |
| 179 void pidgin_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle); |
189 void pidgin_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle); |
| 180 |
190 |
| 181 /** |
191 /** |
| |
192 * pidgin_set_sensitive_if_input: |
| |
193 * @entry: The text entry widget. |
| |
194 * @dialog: The dialog containing the text entry widget. |
| |
195 * |
| 182 * Checks if text has been entered into a GtkTextEntry widget. If |
196 * Checks if text has been entered into a GtkTextEntry widget. If |
| 183 * so, the GTK_RESPONSE_OK on the given dialog is set to TRUE. |
197 * so, the GTK_RESPONSE_OK on the given dialog is set to TRUE. |
| 184 * Otherwise GTK_RESPONSE_OK is set to FALSE. |
198 * Otherwise GTK_RESPONSE_OK is set to FALSE. |
| 185 * |
|
| 186 * @entry: The text entry widget. |
|
| 187 * @dialog: The dialog containing the text entry widget. |
|
| 188 */ |
199 */ |
| 189 void pidgin_set_sensitive_if_input(GtkWidget *entry, GtkWidget *dialog); |
200 void pidgin_set_sensitive_if_input(GtkWidget *entry, GtkWidget *dialog); |
| 190 |
201 |
| 191 /** |
202 /** |
| 192 * Toggles the sensitivity of all widgets in a pointer array. |
203 * pidgin_toggle_sensitive_array: |
| 193 * |
|
| 194 * @w: %NULL. Used for signal handlers. |
204 * @w: %NULL. Used for signal handlers. |
| 195 * @data: The array containing the widgets to toggle. |
205 * @data: The array containing the widgets to toggle. |
| |
206 * |
| |
207 * Toggles the sensitivity of all widgets in a pointer array. |
| 196 */ |
208 */ |
| 197 void pidgin_toggle_sensitive_array(GtkWidget *w, GPtrArray *data); |
209 void pidgin_toggle_sensitive_array(GtkWidget *w, GPtrArray *data); |
| 198 |
210 |
| 199 /** |
211 /** |
| 200 * Toggles the visibility of a widget. |
212 * pidgin_toggle_showhide: |
| 201 * |
|
| 202 * @widget: %NULL. Used for signal handlers. |
213 * @widget: %NULL. Used for signal handlers. |
| 203 * @to_toggle: The widget to toggle. |
214 * @to_toggle: The widget to toggle. |
| |
215 * |
| |
216 * Toggles the visibility of a widget. |
| 204 */ |
217 */ |
| 205 void pidgin_toggle_showhide(GtkWidget *widget, GtkWidget *to_toggle); |
218 void pidgin_toggle_showhide(GtkWidget *widget, GtkWidget *to_toggle); |
| 206 |
219 |
| 207 /** |
220 /** |
| |
221 * pidgin_separator: |
| |
222 * @menu: The menu to add a separator to. |
| |
223 * |
| 208 * Adds a separator to a menu. |
224 * Adds a separator to a menu. |
| 209 * |
225 * |
| 210 * @menu: The menu to add a separator to. |
|
| 211 * |
|
| 212 * Returns: The separator. |
226 * Returns: The separator. |
| 213 */ |
227 */ |
| 214 GtkWidget *pidgin_separator(GtkWidget *menu); |
228 GtkWidget *pidgin_separator(GtkWidget *menu); |
| 215 |
229 |
| 216 /** |
230 /** |
| 217 * Creates a menu item. |
231 * pidgin_new_item: |
| 218 * |
|
| 219 * @menu: The menu to which to append the menu item. |
232 * @menu: The menu to which to append the menu item. |
| 220 * @str: The title to use for the newly created menu item. |
233 * @str: The title to use for the newly created menu item. |
| 221 * |
234 * |
| |
235 * Creates a menu item. |
| |
236 * |
| 222 * Returns: The newly created menu item. |
237 * Returns: The newly created menu item. |
| 223 */ |
238 */ |
| 224 GtkWidget *pidgin_new_item(GtkWidget *menu, const char *str); |
239 GtkWidget *pidgin_new_item(GtkWidget *menu, const char *str); |
| 225 |
240 |
| 226 /** |
241 /** |
| 227 * Creates a check menu item. |
242 * pidgin_new_check_item: |
| 228 * |
|
| 229 * @menu: The menu to which to append the check menu item. |
243 * @menu: The menu to which to append the check menu item. |
| 230 * @str: The title to use for the newly created menu item. |
244 * @str: The title to use for the newly created menu item. |
| 231 * @cb: A function to call when the menu item is activated. |
245 * @cb: A function to call when the menu item is activated. |
| 232 * @data: Data to pass to the signal function. |
246 * @data: Data to pass to the signal function. |
| 233 * @checked: The initial state of the check item |
247 * @checked: The initial state of the check item |
| 234 * |
248 * |
| |
249 * Creates a check menu item. |
| |
250 * |
| 235 * Returns: The newly created menu item. |
251 * Returns: The newly created menu item. |
| 236 */ |
252 */ |
| 237 GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str, |
253 GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str, |
| 238 GCallback cb, gpointer data, gboolean checked); |
254 GCallback cb, gpointer data, gboolean checked); |
| 239 |
255 |
| 240 /** |
256 /** |
| 241 * Creates a menu item. |
257 * pidgin_new_item_from_stock: |
| 242 * |
|
| 243 * @menu: The menu to which to append the menu item. |
258 * @menu: The menu to which to append the menu item. |
| 244 * @str: The title for the menu item. |
259 * @str: The title for the menu item. |
| 245 * @icon: An icon to place to the left of the menu item, |
260 * @icon: An icon to place to the left of the menu item, |
| 246 * or %NULL for no icon. |
261 * or %NULL for no icon. |
| 247 * @cb: A function to call when the menu item is activated. |
262 * @cb: A function to call when the menu item is activated. |
| 248 * @data: Data to pass to the signal function. |
263 * @data: Data to pass to the signal function. |
| 249 * @accel_key: Something. |
264 * @accel_key: Something. |
| 250 * @accel_mods: Something. |
265 * @accel_mods: Something. |
| 251 * @mod: Something. |
266 * @mod: Something. |
| 252 * |
267 * |
| |
268 * Creates a menu item. |
| |
269 * |
| 253 * Returns: The newly created menu item. |
270 * Returns: The newly created menu item. |
| 254 */ |
271 */ |
| 255 GtkWidget *pidgin_new_item_from_stock(GtkWidget *menu, const char *str, |
272 GtkWidget *pidgin_new_item_from_stock(GtkWidget *menu, const char *str, |
| 256 const char *icon, GCallback cb, |
273 const char *icon, GCallback cb, |
| 257 gpointer data, guint accel_key, |
274 gpointer data, guint accel_key, |
| 258 guint accel_mods, char *mod); |
275 guint accel_mods, char *mod); |
| 259 |
276 |
| 260 /** |
277 /** |
| 261 * Creates a button with the specified text and stock icon. |
278 * pidgin_pixbuf_button_from_stock: |
| 262 * |
|
| 263 * @text: The text for the button. |
279 * @text: The text for the button. |
| 264 * @icon: The stock icon name. |
280 * @icon: The stock icon name. |
| 265 * @style: The orientation of the button. |
281 * @style: The orientation of the button. |
| 266 * |
282 * |
| |
283 * Creates a button with the specified text and stock icon. |
| |
284 * |
| 267 * Returns: The button. |
285 * Returns: The button. |
| 268 */ |
286 */ |
| 269 GtkWidget *pidgin_pixbuf_button_from_stock(const char *text, const char *icon, |
287 GtkWidget *pidgin_pixbuf_button_from_stock(const char *text, const char *icon, |
| 270 PidginButtonOrientation style); |
288 PidginButtonOrientation style); |
| 271 |
289 |
| 272 /** |
290 /** |
| |
291 * pidgin_pixbuf_toolbar_button_from_stock: |
| |
292 * @stock: The stock icon name. |
| |
293 * |
| 273 * Creates a toolbar button with the stock icon. |
294 * Creates a toolbar button with the stock icon. |
| 274 * |
295 * |
| 275 * @stock: The stock icon name. |
|
| 276 * |
|
| 277 * Returns: The button. |
296 * Returns: The button. |
| 278 */ |
297 */ |
| 279 GtkWidget *pidgin_pixbuf_toolbar_button_from_stock(const char *stock); |
298 GtkWidget *pidgin_pixbuf_toolbar_button_from_stock(const char *stock); |
| 280 |
299 |
| 281 /** |
300 /** |
| 282 * Creates a HIG preferences frame. |
301 * pidgin_make_frame: |
| 283 * |
|
| 284 * @parent: The widget to put the frame into. |
302 * @parent: The widget to put the frame into. |
| 285 * @title: The title for the frame. |
303 * @title: The title for the frame. |
| 286 * |
304 * |
| |
305 * Creates a HIG preferences frame. |
| |
306 * |
| 287 * Returns: The vbox to put things into. |
307 * Returns: The vbox to put things into. |
| 288 */ |
308 */ |
| 289 GtkWidget *pidgin_make_frame(GtkWidget *parent, const char *title); |
309 GtkWidget *pidgin_make_frame(GtkWidget *parent, const char *title); |
| 290 |
310 |
| 291 /** |
311 /** |
| 292 * Creates a drop-down option menu filled with protocols. |
312 * pidgin_protocol_option_menu_new: |
| 293 * |
|
| 294 * @id: The protocol to select by default. |
313 * @id: The protocol to select by default. |
| 295 * @cb: The callback to call when a protocol is selected. |
314 * @cb: The callback to call when a protocol is selected. |
| 296 * @user_data: Data to pass to the callback function. |
315 * @user_data: Data to pass to the callback function. |
| 297 * |
316 * |
| |
317 * Creates a drop-down option menu filled with protocols. |
| |
318 * |
| 298 * Returns: The drop-down option menu. |
319 * Returns: The drop-down option menu. |
| 299 */ |
320 */ |
| 300 GtkWidget *pidgin_protocol_option_menu_new(const char *id, |
321 GtkWidget *pidgin_protocol_option_menu_new(const char *id, |
| 301 GCallback cb, |
322 GCallback cb, |
| 302 gpointer user_data); |
323 gpointer user_data); |
| 303 |
324 |
| 304 /** |
325 /** |
| 305 * Gets the currently selected protocol from a protocol drop down box. |
326 * pidgin_protocol_option_menu_get_selected: |
| 306 * |
|
| 307 * @optmenu: The drop-down option menu created by |
327 * @optmenu: The drop-down option menu created by |
| 308 * pidgin_account_option_menu_new. |
328 * pidgin_account_option_menu_new. |
| |
329 * |
| |
330 * Gets the currently selected protocol from a protocol drop down box. |
| |
331 * |
| 309 * Returns: Returns the protocol ID that is currently selected. |
332 * Returns: Returns the protocol ID that is currently selected. |
| 310 */ |
333 */ |
| 311 const char *pidgin_protocol_option_menu_get_selected(GtkWidget *optmenu); |
334 const char *pidgin_protocol_option_menu_get_selected(GtkWidget *optmenu); |
| 312 |
335 |
| 313 /** |
336 /** |
| 314 * Creates a drop-down option menu filled with accounts. |
337 * pidgin_account_option_menu_new: |
| 315 * |
|
| 316 * @default_account: The account to select by default. |
338 * @default_account: The account to select by default. |
| 317 * @show_all: Whether or not to show all accounts, or just |
339 * @show_all: Whether or not to show all accounts, or just |
| 318 * active accounts. |
340 * active accounts. |
| 319 * @cb: The callback to call when an account is selected. |
341 * @cb: The callback to call when an account is selected. |
| 320 * @filter_func: A function for checking if an account should |
342 * @filter_func: A function for checking if an account should |
| 321 * be shown. This can be NULL. |
343 * be shown. This can be NULL. |
| 322 * @user_data: Data to pass to the callback function. |
344 * @user_data: Data to pass to the callback function. |
| 323 * |
345 * |
| |
346 * Creates a drop-down option menu filled with accounts. |
| |
347 * |
| 324 * Returns: The drop-down option menu. |
348 * Returns: The drop-down option menu. |
| 325 */ |
349 */ |
| 326 GtkWidget *pidgin_account_option_menu_new(PurpleAccount *default_account, |
350 GtkWidget *pidgin_account_option_menu_new(PurpleAccount *default_account, |
| 327 gboolean show_all, GCallback cb, |
351 gboolean show_all, GCallback cb, |
| 328 PurpleFilterAccountFunc filter_func, gpointer user_data); |
352 PurpleFilterAccountFunc filter_func, gpointer user_data); |
| 329 |
353 |
| 330 /** |
354 /** |
| 331 * Gets the currently selected account from an account drop down box. |
355 * pidgin_account_option_menu_get_selected: |
| 332 * |
|
| 333 * @optmenu: The drop-down option menu created by |
356 * @optmenu: The drop-down option menu created by |
| 334 * pidgin_account_option_menu_new. |
357 * pidgin_account_option_menu_new. |
| |
358 * |
| |
359 * Gets the currently selected account from an account drop down box. |
| |
360 * |
| 335 * Returns: Returns the PurpleAccount that is currently selected. |
361 * Returns: Returns the PurpleAccount that is currently selected. |
| 336 */ |
362 */ |
| 337 PurpleAccount *pidgin_account_option_menu_get_selected(GtkWidget *optmenu); |
363 PurpleAccount *pidgin_account_option_menu_get_selected(GtkWidget *optmenu); |
| 338 |
364 |
| 339 /** |
365 /** |
| 340 * Sets the currently selected account for an account drop down box. |
366 * pidgin_account_option_menu_set_selected: |
| 341 * |
|
| 342 * @optmenu: The GtkOptionMenu created by |
367 * @optmenu: The GtkOptionMenu created by |
| 343 * pidgin_account_option_menu_new. |
368 * pidgin_account_option_menu_new. |
| 344 * @account: The PurpleAccount to select. |
369 * @account: The PurpleAccount to select. |
| |
370 * |
| |
371 * Sets the currently selected account for an account drop down box. |
| 345 */ |
372 */ |
| 346 void pidgin_account_option_menu_set_selected(GtkWidget *optmenu, PurpleAccount *account); |
373 void pidgin_account_option_menu_set_selected(GtkWidget *optmenu, PurpleAccount *account); |
| 347 |
374 |
| 348 /** |
375 /** |
| 349 * Add autocompletion of screenames to an entry, supporting a filtering function. |
376 * pidgin_setup_screenname_autocomplete: |
| 350 * |
|
| 351 * @entry: The GtkEntry on which to setup autocomplete. |
377 * @entry: The GtkEntry on which to setup autocomplete. |
| 352 * @optmenu: A menu for accounts, returned by pidgin_account_option_menu_new(). |
378 * @optmenu: A menu for accounts, returned by pidgin_account_option_menu_new(). |
| 353 * If @a optmenu is not %NULL, it'll be updated when a username is chosen |
379 * If @optmenu is not %NULL, it'll be updated when a username is chosen |
| 354 * from the autocomplete list. |
380 * from the autocomplete list. |
| 355 * @filter_func: A function for checking if an autocomplete entry |
381 * @filter_func: A function for checking if an autocomplete entry |
| 356 * should be shown. This can be %NULL. |
382 * should be shown. This can be %NULL. |
| 357 * @user_data: The data to be passed to the filter_func function. |
383 * @user_data: The data to be passed to the filter_func function. |
| |
384 * |
| |
385 * Add autocompletion of screenames to an entry, supporting a filtering function. |
| 358 */ |
386 */ |
| 359 void pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data); |
387 void pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data); |
| 360 |
388 |
| 361 /** |
389 /** |
| 362 * The default filter function for username autocomplete. |
390 * pidgin_screenname_autocomplete_default_filter: |
| 363 * |
|
| 364 * @completion_entry: The completion entry to filter. |
391 * @completion_entry: The completion entry to filter. |
| 365 * @all_accounts: If this is %FALSE, only the autocompletion entries |
392 * @all_accounts: If this is %FALSE, only the autocompletion entries |
| 366 * which belong to an online account will be filtered. |
393 * which belong to an online account will be filtered. |
| |
394 * |
| |
395 * The default filter function for username autocomplete. |
| |
396 * |
| 367 * Returns: Returns %TRUE if the autocompletion entry is filtered. |
397 * Returns: Returns %TRUE if the autocompletion entry is filtered. |
| 368 */ |
398 */ |
| 369 gboolean pidgin_screenname_autocomplete_default_filter(const PidginBuddyCompletionEntry *completion_entry, gpointer all_accounts); |
399 gboolean pidgin_screenname_autocomplete_default_filter(const PidginBuddyCompletionEntry *completion_entry, gpointer all_accounts); |
| 370 |
400 |
| 371 /** |
401 /** |
| |
402 * pidgin_setup_gtkspell: |
| |
403 * @textview: The textview widget to setup spellchecking for. |
| |
404 * |
| 372 * Sets up GtkSpell for the given GtkTextView, reporting errors |
405 * Sets up GtkSpell for the given GtkTextView, reporting errors |
| 373 * if encountered. |
406 * if encountered. |
| 374 * |
407 * |
| 375 * This does nothing if Pidgin is not compiled with GtkSpell support. |
408 * This does nothing if Pidgin is not compiled with GtkSpell support. |
| 376 * |
|
| 377 * @textview: The textview widget to setup spellchecking for. |
|
| 378 */ |
409 */ |
| 379 void pidgin_setup_gtkspell(GtkTextView *textview); |
410 void pidgin_setup_gtkspell(GtkTextView *textview); |
| 380 |
411 |
| 381 /** |
412 /** |
| |
413 * pidgin_save_accels_cb: |
| |
414 * |
| 382 * Save menu accelerators callback |
415 * Save menu accelerators callback |
| 383 */ |
416 */ |
| 384 void pidgin_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, |
417 void pidgin_save_accels_cb(GtkAccelGroup *accel_group, guint arg1, |
| 385 GdkModifierType arg2, GClosure *arg3, |
418 GdkModifierType arg2, GClosure *arg3, |
| 386 gpointer data); |
419 gpointer data); |
| 387 |
420 |
| 388 /** |
421 /** |
| |
422 * pidgin_save_accels: |
| |
423 * |
| 389 * Save menu accelerators |
424 * Save menu accelerators |
| 390 */ |
425 */ |
| 391 gboolean pidgin_save_accels(gpointer data); |
426 gboolean pidgin_save_accels(gpointer data); |
| 392 |
427 |
| 393 /** |
428 /** |
| |
429 * pidgin_load_accels: |
| |
430 * |
| 394 * Load menu accelerators |
431 * Load menu accelerators |
| 395 */ |
432 */ |
| 396 void pidgin_load_accels(void); |
433 void pidgin_load_accels(void); |
| 397 |
434 |
| 398 /** |
435 /** |
| 399 * Get information about a user. Show immediate feedback. |
436 * pidgin_retrieve_user_info: |
| 400 * |
|
| 401 * @conn: The connection to get information from. |
437 * @conn: The connection to get information from. |
| 402 * @name: The user to get information about. |
438 * @name: The user to get information about. |
| |
439 * |
| |
440 * Get information about a user. Show immediate feedback. |
| 403 */ |
441 */ |
| 404 void pidgin_retrieve_user_info(PurpleConnection *conn, const char *name); |
442 void pidgin_retrieve_user_info(PurpleConnection *conn, const char *name); |
| 405 |
443 |
| 406 /** |
444 /** |
| 407 * Get information about a user in a chat. Show immediate feedback. |
445 * pidgin_retrieve_user_info_in_chat: |
| 408 * |
|
| 409 * @conn: The connection to get information from. |
446 * @conn: The connection to get information from. |
| 410 * @name: The user to get information about. |
447 * @name: The user to get information about. |
| 411 * @chatid: The chat id. |
448 * @chatid: The chat id. |
| |
449 * |
| |
450 * Get information about a user in a chat. Show immediate feedback. |
| 412 */ |
451 */ |
| 413 void pidgin_retrieve_user_info_in_chat(PurpleConnection *conn, const char *name, int chatid); |
452 void pidgin_retrieve_user_info_in_chat(PurpleConnection *conn, const char *name, int chatid); |
| 414 |
453 |
| 415 /** |
454 /** |
| 416 * Parses an application/x-im-contact MIME message and returns the |
455 * pidgin_parse_x_im_contact: |
| 417 * data inside. |
|
| 418 * |
|
| 419 * @msg: The MIME message. |
456 * @msg: The MIME message. |
| 420 * @all_accounts: If TRUE, check all compatible accounts, online or |
457 * @all_accounts: If TRUE, check all compatible accounts, online or |
| 421 * offline. If FALSE, check only online accounts. |
458 * offline. If FALSE, check only online accounts. |
| 422 * @ret_account: The best guess at a compatible protocol, |
459 * @ret_account: The best guess at a compatible protocol, |
| 423 * based on ret_protocol. If NULL, no account was found. |
460 * based on ret_protocol. If NULL, no account was found. |
| 424 * @ret_protocol: The returned protocol type. |
461 * @ret_protocol: The returned protocol type. |
| 425 * @ret_username: The returned username. |
462 * @ret_username: The returned username. |
| 426 * @ret_alias: The returned alias. |
463 * @ret_alias: The returned alias. |
| 427 * |
464 * |
| |
465 * Parses an application/x-im-contact MIME message and returns the |
| |
466 * data inside. |
| |
467 * |
| 428 * Returns: TRUE if the message was parsed for the minimum necessary data. |
468 * Returns: TRUE if the message was parsed for the minimum necessary data. |
| 429 * FALSE otherwise. |
469 * FALSE otherwise. |
| 430 */ |
470 */ |
| 431 gboolean pidgin_parse_x_im_contact(const char *msg, gboolean all_accounts, |
471 gboolean pidgin_parse_x_im_contact(const char *msg, gboolean all_accounts, |
| 432 PurpleAccount **ret_account, |
472 PurpleAccount **ret_account, |
| 433 char **ret_protocol, char **ret_username, |
473 char **ret_protocol, char **ret_username, |
| 434 char **ret_alias); |
474 char **ret_alias); |
| 435 |
475 |
| 436 /** |
476 /** |
| |
477 * pidgin_set_accessible_label: |
| |
478 * @w: The widget that we want to name. |
| |
479 * @l: A GtkLabel that we want to use as the ATK name for the widget. |
| |
480 * |
| 437 * Sets an ATK name for a given widget. Also sets the labelled-by |
481 * Sets an ATK name for a given widget. Also sets the labelled-by |
| 438 * and label-for ATK relationships. |
482 * and label-for ATK relationships. |
| 439 * |
|
| 440 * @w: The widget that we want to name. |
|
| 441 * @l: A GtkLabel that we want to use as the ATK name for the widget. |
|
| 442 */ |
483 */ |
| 443 void pidgin_set_accessible_label(GtkWidget *w, GtkWidget *l); |
484 void pidgin_set_accessible_label(GtkWidget *w, GtkWidget *l); |
| 444 |
485 |
| 445 /** |
486 /** |
| 446 * Sets the labelled-by and label-for ATK relationships. |
487 * pidgin_set_accessible_relations: |
| 447 * |
|
| 448 * @w: The widget that we want to label. |
488 * @w: The widget that we want to label. |
| 449 * @l: A GtkLabel that we want to use as the label for the widget. |
489 * @l: A GtkLabel that we want to use as the label for the widget. |
| |
490 * |
| |
491 * Sets the labelled-by and label-for ATK relationships. |
| 450 */ |
492 */ |
| 451 void pidgin_set_accessible_relations(GtkWidget *w, GtkWidget *l); |
493 void pidgin_set_accessible_relations(GtkWidget *w, GtkWidget *l); |
| 452 |
494 |
| 453 /** |
495 /** |
| 454 * A helper function for GtkMenuPositionFuncs. This ensures the menu will |
496 * pidgin_menu_position_func_helper: |
| 455 * be kept on screen if possible. |
|
| 456 * |
|
| 457 * @menu: The menu we are positioning. |
497 * @menu: The menu we are positioning. |
| 458 * @x: Address of the gint representing the horizontal position |
498 * @x: Address of the gint representing the horizontal position |
| 459 * where the menu shall be drawn. This is an output parameter. |
499 * where the menu shall be drawn. This is an output parameter. |
| 460 * @y: Address of the gint representing the vertical position |
500 * @y: Address of the gint representing the vertical position |
| 461 * where the menu shall be drawn. This is an output parameter. |
501 * where the menu shall be drawn. This is an output parameter. |
| 462 * @push_in: This is an output parameter? |
502 * @push_in: This is an output parameter? |
| 463 * @data: Not used by this particular position function. |
503 * @data: Not used by this particular position function. |
| |
504 * |
| |
505 * A helper function for GtkMenuPositionFuncs. This ensures the menu will |
| |
506 * be kept on screen if possible. |
| 464 */ |
507 */ |
| 465 void pidgin_menu_position_func_helper(GtkMenu *menu, gint *x, gint *y, |
508 void pidgin_menu_position_func_helper(GtkMenu *menu, gint *x, gint *y, |
| 466 gboolean *push_in, gpointer data); |
509 gboolean *push_in, gpointer data); |
| 467 |
510 |
| 468 /** |
511 /** |
| 469 * A valid GtkMenuPositionFunc. This is used to determine where |
512 * pidgin_treeview_popup_menu_position_func: |
| 470 * to draw context menus when the menu is activated with the |
|
| 471 * keyboard (shift+F10). If the menu is activated with the mouse, |
|
| 472 * then you should just use GTK's built-in position function, |
|
| 473 * because it does a better job of positioning the menu. |
|
| 474 * |
|
| 475 * @menu: The menu we are positioning. |
513 * @menu: The menu we are positioning. |
| 476 * @x: Address of the gint representing the horizontal position |
514 * @x: Address of the gint representing the horizontal position |
| 477 * where the menu shall be drawn. This is an output parameter. |
515 * where the menu shall be drawn. This is an output parameter. |
| 478 * @y: Address of the gint representing the vertical position |
516 * @y: Address of the gint representing the vertical position |
| 479 * where the menu shall be drawn. This is an output parameter. |
517 * where the menu shall be drawn. This is an output parameter. |
| 480 * @push_in: This is an output parameter? |
518 * @push_in: This is an output parameter? |
| 481 * @user_data: Not used by this particular position function. |
519 * @user_data: Not used by this particular position function. |
| |
520 * |
| |
521 * A valid GtkMenuPositionFunc. This is used to determine where |
| |
522 * to draw context menus when the menu is activated with the |
| |
523 * keyboard (shift+F10). If the menu is activated with the mouse, |
| |
524 * then you should just use GTK's built-in position function, |
| |
525 * because it does a better job of positioning the menu. |
| 482 */ |
526 */ |
| 483 void pidgin_treeview_popup_menu_position_func(GtkMenu *menu, |
527 void pidgin_treeview_popup_menu_position_func(GtkMenu *menu, |
| 484 gint *x, |
528 gint *x, |
| 485 gint *y, |
529 gint *y, |
| 486 gboolean *push_in, |
530 gboolean *push_in, |
| 487 gpointer user_data); |
531 gpointer user_data); |
| 488 |
532 |
| 489 /** |
533 /** |
| 490 * Manages drag'n'drop of files. |
534 * pidgin_dnd_file_manage: |
| 491 * |
|
| 492 * @sd: GtkSelectionData for managing drag'n'drop |
535 * @sd: GtkSelectionData for managing drag'n'drop |
| 493 * @account: Account to be used (may be NULL if conv is not NULL) |
536 * @account: Account to be used (may be NULL if conv is not NULL) |
| 494 * @who: Buddy name (may be NULL if conv is not NULL) |
537 * @who: Buddy name (may be NULL if conv is not NULL) |
| |
538 * |
| |
539 * Manages drag'n'drop of files. |
| 495 */ |
540 */ |
| 496 void pidgin_dnd_file_manage(GtkSelectionData *sd, PurpleAccount *account, const char *who); |
541 void pidgin_dnd_file_manage(GtkSelectionData *sd, PurpleAccount *account, const char *who); |
| 497 |
542 |
| 498 /** |
543 /** |
| |
544 * pidgin_buddy_icon_get_scale_size: |
| |
545 * |
| 499 * Convenience wrapper for purple_buddy_icon_spec_get_scaled_size |
546 * Convenience wrapper for purple_buddy_icon_spec_get_scaled_size |
| 500 */ |
547 */ |
| 501 void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleIconScaleRules rules, int *width, int *height); |
548 void pidgin_buddy_icon_get_scale_size(GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleIconScaleRules rules, int *width, int *height); |
| 502 |
549 |
| 503 /** |
550 /** |
| |
551 * pidgin_create_protocol_icon: |
| |
552 * @account: The account. |
| |
553 * @size: The size of the icon to return. |
| |
554 * |
| 504 * Returns the base image to represent the account, based on |
555 * Returns the base image to represent the account, based on |
| 505 * the currently selected theme. |
556 * the currently selected theme. |
| 506 * |
|
| 507 * @account: The account. |
|
| 508 * @size: The size of the icon to return. |
|
| 509 * |
557 * |
| 510 * Returns: A newly-created pixbuf with a reference count of 1, |
558 * Returns: A newly-created pixbuf with a reference count of 1, |
| 511 * or NULL if any of several error conditions occurred: |
559 * or NULL if any of several error conditions occurred: |
| 512 * the file could not be opened, there was no loader |
560 * the file could not be opened, there was no loader |
| 513 * for the file's format, there was not enough memory |
561 * for the file's format, there was not enough memory |
| 515 * contained invalid data. |
563 * contained invalid data. |
| 516 */ |
564 */ |
| 517 GdkPixbuf *pidgin_create_protocol_icon(PurpleAccount *account, PidginProtocolIconSize size); |
565 GdkPixbuf *pidgin_create_protocol_icon(PurpleAccount *account, PidginProtocolIconSize size); |
| 518 |
566 |
| 519 /** |
567 /** |
| 520 * Creates a status icon for a given primitve |
568 * pidgin_create_status_icon: |
| 521 * |
|
| 522 * @primitive: The status primitive |
569 * @primitive: The status primitive |
| 523 * @w: The widget to render this |
570 * @w: The widget to render this |
| 524 * @size: The icon size to render at |
571 * @size: The icon size to render at |
| |
572 * |
| |
573 * Creates a status icon for a given primitve |
| |
574 * |
| 525 * Returns: A GdkPixbuf, created from stock |
575 * Returns: A GdkPixbuf, created from stock |
| 526 */ |
576 */ |
| 527 GdkPixbuf * pidgin_create_status_icon(PurpleStatusPrimitive primitive, GtkWidget *w, const char *size); |
577 GdkPixbuf * pidgin_create_status_icon(PurpleStatusPrimitive primitive, GtkWidget *w, const char *size); |
| 528 |
578 |
| 529 /** |
579 /** |
| |
580 * pidgin_stock_id_from_status_primitive: |
| |
581 * @prim: The status primitive |
| |
582 * |
| 530 * Returns an appropriate stock-id for a status primitive. |
583 * Returns an appropriate stock-id for a status primitive. |
| 531 * |
584 * |
| 532 * @prim: The status primitive |
|
| 533 * |
|
| 534 * Returns: The stock-id |
585 * Returns: The stock-id |
| 535 */ |
586 */ |
| 536 const char *pidgin_stock_id_from_status_primitive(PurpleStatusPrimitive prim); |
587 const char *pidgin_stock_id_from_status_primitive(PurpleStatusPrimitive prim); |
| 537 |
588 |
| 538 /** |
589 /** |
| |
590 * pidgin_stock_id_from_presence: |
| |
591 * @presence: The presence. |
| |
592 * |
| 539 * Returns an appropriate stock-id for a PurplePresence. |
593 * Returns an appropriate stock-id for a PurplePresence. |
| 540 * |
594 * |
| 541 * @presence: The presence. |
|
| 542 * |
|
| 543 * Returns: The stock-id |
595 * Returns: The stock-id |
| 544 */ |
596 */ |
| 545 const char *pidgin_stock_id_from_presence(PurplePresence *presence); |
597 const char *pidgin_stock_id_from_presence(PurplePresence *presence); |
| 546 |
598 |
| 547 /** |
599 /** |
| 548 * Append a PurpleMenuAction to a menu. |
600 * pidgin_append_menu_action: |
| 549 * |
|
| 550 * @menu: The menu to append to. |
601 * @menu: The menu to append to. |
| 551 * @act: The PurpleMenuAction to append. |
602 * @act: The PurpleMenuAction to append. |
| 552 * @gobject: The object to be passed to the action callback. |
603 * @gobject: The object to be passed to the action callback. |
| 553 * |
604 * |
| |
605 * Append a PurpleMenuAction to a menu. |
| |
606 * |
| 554 * Returns: The menuitem added. |
607 * Returns: The menuitem added. |
| 555 */ |
608 */ |
| 556 GtkWidget *pidgin_append_menu_action(GtkWidget *menu, PurpleMenuAction *act, |
609 GtkWidget *pidgin_append_menu_action(GtkWidget *menu, PurpleMenuAction *act, |
| 557 gpointer gobject); |
610 gpointer gobject); |
| 558 |
611 |
| 559 /** |
612 /** |
| |
613 * pidgin_set_cursor: |
| |
614 * @widget: The widget for which to set the mouse pointer |
| |
615 * @cursor_type: The type of cursor to set |
| |
616 * |
| 560 * Sets the mouse pointer for a GtkWidget. |
617 * Sets the mouse pointer for a GtkWidget. |
| 561 * |
618 * |
| 562 * After setting the cursor, the display is flushed, so the change will |
619 * After setting the cursor, the display is flushed, so the change will |
| 563 * take effect immediately. |
620 * take effect immediately. |
| 564 * |
621 * |
| 565 * If the window for @a widget is %NULL, this function simply returns. |
622 * If the window for @widget is %NULL, this function simply returns. |
| 566 * |
|
| 567 * @widget: The widget for which to set the mouse pointer |
|
| 568 * @cursor_type: The type of cursor to set |
|
| 569 */ |
623 */ |
| 570 void pidgin_set_cursor(GtkWidget *widget, GdkCursorType cursor_type); |
624 void pidgin_set_cursor(GtkWidget *widget, GdkCursorType cursor_type); |
| 571 |
625 |
| 572 /** |
626 /** |
| |
627 * pidgin_clear_cursor: |
| |
628 * |
| 573 * Sets the mouse point for a GtkWidget back to that of its parent window. |
629 * Sets the mouse point for a GtkWidget back to that of its parent window. |
| 574 * |
630 * |
| 575 * If @a widget is %NULL, this function simply returns. |
631 * If @widget is %NULL, this function simply returns. |
| 576 * |
632 * |
| 577 * If the window for @a widget is %NULL, this function simply returns. |
633 * If the window for @widget is %NULL, this function simply returns. |
| 578 * |
634 * |
| 579 * Note: The display is not flushed from this function. |
635 * Note: The display is not flushed from this function. |
| 580 */ |
636 */ |
| 581 void pidgin_clear_cursor(GtkWidget *widget); |
637 void pidgin_clear_cursor(GtkWidget *widget); |
| 582 |
638 |
| 583 /** |
639 /** |
| 584 * Creates a File Selection widget for choosing a buddy icon |
640 * pidgin_buddy_icon_chooser_new: |
| 585 * |
|
| 586 * @parent: The parent window |
641 * @parent: The parent window |
| 587 * @callback: The callback to call when the window is closed. If the user chose an icon, the char* argument will point to its path |
642 * @callback: The callback to call when the window is closed. If the user chose an icon, the char* argument will point to its path |
| 588 * @data: Data to pass to @a callback |
643 * @data: Data to pass to @callback |
| |
644 * |
| |
645 * Creates a File Selection widget for choosing a buddy icon |
| |
646 * |
| 589 * Returns: The file dialog |
647 * Returns: The file dialog |
| 590 */ |
648 */ |
| 591 GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data); |
649 GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data); |
| 592 |
650 |
| 593 /** |
651 /** |
| 594 * Converts a buddy icon to the required size and format |
652 * pidgin_convert_buddy_icon: |
| 595 * |
|
| 596 * @protocol: The protocol to convert the icon |
653 * @protocol: The protocol to convert the icon |
| 597 * @path: The path of a file to convert |
654 * @path: The path of a file to convert |
| 598 * @len: If not %NULL, the length of the returned data will be set here. |
655 * @len: If not %NULL, the length of the returned data will be set here. |
| 599 * |
656 * |
| |
657 * Converts a buddy icon to the required size and format |
| |
658 * |
| 600 * Returns: The converted image data, or %NULL if an error occurred. |
659 * Returns: The converted image data, or %NULL if an error occurred. |
| 601 */ |
660 */ |
| 602 gpointer pidgin_convert_buddy_icon(PurpleProtocol *protocol, const char *path, size_t *len); |
661 gpointer pidgin_convert_buddy_icon(PurpleProtocol *protocol, const char *path, size_t *len); |
| 603 |
662 |
| 604 /** |
663 /** |
| |
664 * pidgin_make_pretty_arrows: |
| |
665 * @str: The text to convert |
| |
666 * |
| 605 * Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing |
667 * Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing |
| 606 * menu items. |
668 * menu items. |
| 607 * |
669 * |
| 608 * @str: The text to convert |
|
| 609 * Returns: A newly allocated string with unicode arrow characters |
670 * Returns: A newly allocated string with unicode arrow characters |
| 610 */ |
671 */ |
| 611 char *pidgin_make_pretty_arrows(const char *str); |
672 char *pidgin_make_pretty_arrows(const char *str); |
| 612 |
673 |
| 613 /** |
674 /** |
| |
675 * PidginUtilMiniDialogCallback: |
| |
676 * |
| 614 * The type of callbacks passed to pidgin_make_mini_dialog(). |
677 * The type of callbacks passed to pidgin_make_mini_dialog(). |
| 615 */ |
678 */ |
| 616 typedef void (*PidginUtilMiniDialogCallback)(gpointer user_data, GtkButton *); |
679 typedef void (*PidginUtilMiniDialogCallback)(gpointer user_data, GtkButton *); |
| 617 |
680 |
| 618 /** |
681 /** |
| 619 * Creates a #PidginMiniDialog, tied to a #PurpleConnection, suitable for |
682 * pidgin_make_mini_dialog: |
| 620 * embedding in the buddy list scrollbook with pidgin_blist_add_alert(). |
|
| 621 * |
|
| 622 * @handle: The #PurpleConnection to which this mini-dialog |
683 * @handle: The #PurpleConnection to which this mini-dialog |
| 623 * refers, or %NULL if it does not refer to a |
684 * refers, or %NULL if it does not refer to a |
| 624 * connection. If @a handle is supplied, the mini-dialog |
685 * connection. If @handle is supplied, the mini-dialog |
| 625 * will be automatically removed and destroyed when the |
686 * will be automatically removed and destroyed when the |
| 626 * connection signs off. |
687 * connection signs off. |
| 627 * @stock_id: The ID of a stock image to use in the mini dialog. |
688 * @stock_id: The ID of a stock image to use in the mini dialog. |
| 628 * @primary: The primary text |
689 * @primary: The primary text |
| 629 * @secondary: The secondary text, or %NULL for no description. |
690 * @secondary: The secondary text, or %NULL for no description. |
| 630 * @user_data: Data to pass to the callbacks |
691 * @user_data: Data to pass to the callbacks |
| 631 * @...: a <tt>NULL</tt>-terminated list of button labels |
692 * @...: a <tt>NULL</tt>-terminated list of button labels |
| 632 * (<tt>char *</tt>) and callbacks |
693 * (<tt>char *</tt>) and callbacks |
| 633 * (#PidginUtilMiniDialogCallback). @a user_data will be |
694 * (#PidginUtilMiniDialogCallback). @user_data will be |
| 634 * passed as the first argument. (Callbacks may lack a |
695 * passed as the first argument. (Callbacks may lack a |
| 635 * second argument, or be %NULL to take no action when |
696 * second argument, or be %NULL to take no action when |
| 636 * the corresponding button is pressed.) When a button is |
697 * the corresponding button is pressed.) When a button is |
| 637 * pressed, the callback (if any) will be called; when |
698 * pressed, the callback (if any) will be called; when |
| 638 * the callback returns the dialog will be destroyed. |
699 * the callback returns the dialog will be destroyed. |
| |
700 * |
| |
701 * Creates a #PidginMiniDialog, tied to a #PurpleConnection, suitable for |
| |
702 * embedding in the buddy list scrollbook with pidgin_blist_add_alert(). |
| |
703 * |
| |
704 * @see pidginstock.h |
| |
705 * |
| 639 * Returns: A #PidginMiniDialog, suitable for passing to |
706 * Returns: A #PidginMiniDialog, suitable for passing to |
| 640 * pidgin_blist_add_alert(). |
707 * pidgin_blist_add_alert(). |
| 641 * @see pidginstock.h |
|
| 642 */ |
708 */ |
| 643 GtkWidget *pidgin_make_mini_dialog(PurpleConnection *handle, |
709 GtkWidget *pidgin_make_mini_dialog(PurpleConnection *handle, |
| 644 const char* stock_id, const char *primary, const char *secondary, |
710 const char* stock_id, const char *primary, const char *secondary, |
| 645 void *user_data, ...) G_GNUC_NULL_TERMINATED; |
711 void *user_data, ...) G_GNUC_NULL_TERMINATED; |
| 646 |
712 |
| 647 /** |
713 /** |
| |
714 * pidgin_make_mini_dialog_with_custom_icon: |
| |
715 * |
| 648 * Does exactly what pidgin_make_mini_dialog() does, except you can specify |
716 * Does exactly what pidgin_make_mini_dialog() does, except you can specify |
| 649 * a custom icon for the dialog. |
717 * a custom icon for the dialog. |
| 650 */ |
718 */ |
| 651 GtkWidget *pidgin_make_mini_dialog_with_custom_icon(PurpleConnection *gc, |
719 GtkWidget *pidgin_make_mini_dialog_with_custom_icon(PurpleConnection *gc, |
| 652 GdkPixbuf *custom_icon, |
720 GdkPixbuf *custom_icon, |
| 665 */ |
735 */ |
| 666 gboolean pidgin_tree_view_search_equal_func(GtkTreeModel *model, gint column, |
736 gboolean pidgin_tree_view_search_equal_func(GtkTreeModel *model, gint column, |
| 667 const gchar *key, GtkTreeIter *iter, gpointer data); |
737 const gchar *key, GtkTreeIter *iter, gpointer data); |
| 668 |
738 |
| 669 /** |
739 /** |
| |
740 * pidgin_set_urgent: |
| |
741 * @window: The window to draw attention to |
| |
742 * @urgent: Whether to set the urgent hint or not |
| |
743 * |
| 670 * Sets or resets a window to 'urgent,' by setting the URGENT hint in X |
744 * Sets or resets a window to 'urgent,' by setting the URGENT hint in X |
| 671 * or blinking in the win32 taskbar |
745 * or blinking in the win32 taskbar |
| 672 * |
|
| 673 * @window: The window to draw attention to |
|
| 674 * @urgent: Whether to set the urgent hint or not |
|
| 675 */ |
746 */ |
| 676 void pidgin_set_urgent(GtkWindow *window, gboolean urgent); |
747 void pidgin_set_urgent(GtkWindow *window, gboolean urgent); |
| 677 |
748 |
| 678 /** |
749 /** |
| |
750 * pidgin_gdk_pixbuf_is_opaque: |
| |
751 * @pixbuf: The pixbug |
| |
752 * |
| 679 * Returns TRUE if the GdkPixbuf is opaque, as determined by no |
753 * Returns TRUE if the GdkPixbuf is opaque, as determined by no |
| 680 * alpha at any of the edge pixels. |
754 * alpha at any of the edge pixels. |
| 681 * |
755 * |
| 682 * @pixbuf: The pixbug |
|
| 683 * Returns: TRUE if the pixbuf is opaque around the edges, FALSE otherwise |
756 * Returns: TRUE if the pixbuf is opaque around the edges, FALSE otherwise |
| 684 */ |
757 */ |
| 685 gboolean pidgin_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf); |
758 gboolean pidgin_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf); |
| 686 |
759 |
| 687 /** |
760 /** |
| |
761 * pidgin_gdk_pixbuf_make_round: |
| |
762 * @pixbuf: The buddy icon to transform |
| |
763 * |
| 688 * Rounds the corners of a 32x32 GdkPixbuf in place |
764 * Rounds the corners of a 32x32 GdkPixbuf in place |
| 689 * |
|
| 690 * @pixbuf: The buddy icon to transform |
|
| 691 */ |
765 */ |
| 692 void pidgin_gdk_pixbuf_make_round(GdkPixbuf *pixbuf); |
766 void pidgin_gdk_pixbuf_make_round(GdkPixbuf *pixbuf); |
| 693 |
767 |
| 694 /** |
768 /** |
| |
769 * pidgin_get_dim_grey_string: |
| |
770 * @widget: The widget to return dim grey for |
| |
771 * |
| 695 * Returns an HTML-style color string for use as a dim grey |
772 * Returns an HTML-style color string for use as a dim grey |
| 696 * string |
773 * string |
| 697 * |
774 * |
| 698 * @widget: The widget to return dim grey for |
|
| 699 * Returns: The dim grey string |
775 * Returns: The dim grey string |
| 700 */ |
776 */ |
| 701 const char *pidgin_get_dim_grey_string(GtkWidget *widget); |
777 const char *pidgin_get_dim_grey_string(GtkWidget *widget); |
| 702 |
778 |
| 703 /** |
779 /** |
| 704 * Create a simple text GtkComboBoxEntry equivalent |
780 * pidgin_text_combo_box_entry_new: |
| 705 * |
|
| 706 * @default_item: Initial contents of GtkEntry |
781 * @default_item: Initial contents of GtkEntry |
| 707 * @items: GList containing strings to add to GtkComboBox |
782 * @items: GList containing strings to add to GtkComboBox |
| 708 * |
783 * |
| |
784 * Create a simple text GtkComboBoxEntry equivalent |
| |
785 * |
| 709 * Returns: A newly created text GtkComboBox containing a GtkEntry |
786 * Returns: A newly created text GtkComboBox containing a GtkEntry |
| 710 * child. |
787 * child. |
| 711 */ |
788 */ |
| 712 GtkWidget *pidgin_text_combo_box_entry_new(const char *default_item, GList *items); |
789 GtkWidget *pidgin_text_combo_box_entry_new(const char *default_item, GList *items); |
| 713 |
790 |
| 714 /** |
791 /** |
| |
792 * pidgin_text_combo_box_entry_get_text: |
| |
793 * @widget: The simple text GtkComboBoxEntry equivalent widget |
| |
794 * |
| 715 * Retrieve the text from the entry of the simple text GtkComboBoxEntry equivalent |
795 * Retrieve the text from the entry of the simple text GtkComboBoxEntry equivalent |
| 716 * |
796 * |
| 717 * @widget: The simple text GtkComboBoxEntry equivalent widget |
|
| 718 * |
|
| 719 * Returns: The text in the widget's entry. It must not be freed |
797 * Returns: The text in the widget's entry. It must not be freed |
| 720 */ |
798 */ |
| 721 const char *pidgin_text_combo_box_entry_get_text(GtkWidget *widget); |
799 const char *pidgin_text_combo_box_entry_get_text(GtkWidget *widget); |
| 722 |
800 |
| 723 /** |
801 /** |
| 724 * Set the text in the entry of the simple text GtkComboBoxEntry equivalent |
802 * pidgin_text_combo_box_entry_set_text: |
| 725 * |
|
| 726 * @widget: The simple text GtkComboBoxEntry equivalent widget |
803 * @widget: The simple text GtkComboBoxEntry equivalent widget |
| 727 * @text: The text to set |
804 * @text: The text to set |
| |
805 * |
| |
806 * Set the text in the entry of the simple text GtkComboBoxEntry equivalent |
| 728 */ |
807 */ |
| 729 void pidgin_text_combo_box_entry_set_text(GtkWidget *widget, const char *text); |
808 void pidgin_text_combo_box_entry_set_text(GtkWidget *widget, const char *text); |
| 730 |
809 |
| 731 /** |
810 /** |
| |
811 * pidgin_auto_parent_window: |
| |
812 * @window: The window to make transient. |
| |
813 * |
| 732 * Automatically make a window transient to a suitable parent window. |
814 * Automatically make a window transient to a suitable parent window. |
| 733 * |
815 * |
| 734 * @window: The window to make transient. |
|
| 735 * |
|
| 736 * Returns: Whether the window was made transient or not. |
816 * Returns: Whether the window was made transient or not. |
| 737 */ |
817 */ |
| 738 gboolean pidgin_auto_parent_window(GtkWidget *window); |
818 gboolean pidgin_auto_parent_window(GtkWidget *window); |
| 739 |
819 |
| 740 /** |
820 /** |
| 741 * Add a labelled widget to a GtkVBox |
821 * pidgin_add_widget_to_vbox: |
| 742 * |
|
| 743 * @vbox: The GtkVBox to add the widget to. |
822 * @vbox: The GtkVBox to add the widget to. |
| 744 * @widget_label: The label to give the widget, can be %NULL. |
823 * @widget_label: The label to give the widget, can be %NULL. |
| 745 * @sg: The GtkSizeGroup to add the label to, can be %NULL. |
824 * @sg: The GtkSizeGroup to add the label to, can be %NULL. |
| 746 * @widget: The GtkWidget to add. |
825 * @widget: The GtkWidget to add. |
| 747 * @expand: Whether to expand the widget horizontally. |
826 * @expand: Whether to expand the widget horizontally. |
| 748 * @p_label: Place to store a pointer to the GtkLabel, or %NULL if you don't care. |
827 * @p_label: Place to store a pointer to the GtkLabel, or %NULL if you don't care. |
| 749 * |
828 * |
| |
829 * Add a labelled widget to a GtkVBox |
| |
830 * |
| 750 * Returns: A GtkHBox already added to the GtkVBox containing the GtkLabel and the GtkWidget. |
831 * Returns: A GtkHBox already added to the GtkVBox containing the GtkLabel and the GtkWidget. |
| 751 */ |
832 */ |
| 752 GtkWidget *pidgin_add_widget_to_vbox(GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label); |
833 GtkWidget *pidgin_add_widget_to_vbox(GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label); |
| 753 |
834 |
| 754 /** |
835 /** |
| 755 * Create a GdkPixbuf from a chunk of image data. |
836 * pidgin_pixbuf_from_data: |
| 756 * |
|
| 757 * @buf: The raw binary image data. |
837 * @buf: The raw binary image data. |
| 758 * @count: The length of buf in bytes. |
838 * @count: The length of buf in bytes. |
| 759 * |
839 * |
| |
840 * Create a GdkPixbuf from a chunk of image data. |
| |
841 * |
| 760 * Returns: A GdkPixbuf created from the image data, or NULL if |
842 * Returns: A GdkPixbuf created from the image data, or NULL if |
| 761 * there was an error parsing the data. |
843 * there was an error parsing the data. |
| 762 */ |
844 */ |
| 763 GdkPixbuf *pidgin_pixbuf_from_data(const guchar *buf, gsize count); |
845 GdkPixbuf *pidgin_pixbuf_from_data(const guchar *buf, gsize count); |
| 764 |
846 |
| 765 /** |
847 /** |
| 766 * Create a GdkPixbufAnimation from a chunk of image data. |
848 * pidgin_pixbuf_anim_from_data: |
| 767 * |
|
| 768 * @buf: The raw binary image data. |
849 * @buf: The raw binary image data. |
| 769 * @count: The length of buf in bytes. |
850 * @count: The length of buf in bytes. |
| 770 * |
851 * |
| |
852 * Create a GdkPixbufAnimation from a chunk of image data. |
| |
853 * |
| 771 * Returns: A GdkPixbufAnimation created from the image data, or NULL if |
854 * Returns: A GdkPixbufAnimation created from the image data, or NULL if |
| 772 * there was an error parsing the data. |
855 * there was an error parsing the data. |
| 773 */ |
856 */ |
| 774 GdkPixbufAnimation *pidgin_pixbuf_anim_from_data(const guchar *buf, gsize count); |
857 GdkPixbufAnimation *pidgin_pixbuf_anim_from_data(const guchar *buf, gsize count); |
| 775 |
858 |
| 776 /** |
859 /** |
| |
860 * pidgin_pixbuf_from_imgstore: |
| |
861 * @image: A PurpleStoredImage. |
| |
862 * |
| 777 * Create a GdkPixbuf from a PurpleStoredImage. |
863 * Create a GdkPixbuf from a PurpleStoredImage. |
| 778 * |
864 * |
| 779 * @image: A PurpleStoredImage. |
|
| 780 * |
|
| 781 * Returns: A GdkPixbuf created from the stored image. |
865 * Returns: A GdkPixbuf created from the stored image. |
| 782 */ |
866 */ |
| 783 GdkPixbuf *pidgin_pixbuf_from_imgstore(PurpleStoredImage *image); |
867 GdkPixbuf *pidgin_pixbuf_from_imgstore(PurpleStoredImage *image); |
| 784 |
868 |
| 785 /** |
869 /** |
| |
870 * pidgin_pixbuf_new_from_file: |
| |
871 * @filename: Name of file to load, in the GLib file name encoding |
| |
872 * |
| 786 * Helper function that calls gdk_pixbuf_new_from_file() and checks both |
873 * Helper function that calls gdk_pixbuf_new_from_file() and checks both |
| 787 * the return code and the GError and returns NULL if either one failed. |
874 * the return code and the GError and returns NULL if either one failed. |
| 788 * |
875 * |
| 789 * The gdk-pixbuf documentation implies that it is sufficient to check |
876 * The gdk-pixbuf documentation implies that it is sufficient to check |
| 790 * the return value of gdk_pixbuf_new_from_file() to determine |
877 * the return value of gdk_pixbuf_new_from_file() to determine |