pidgin/gtkutils.h

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

mercurial