| 102 * |
102 * |
| 103 * Create an PidginWebView widget and associated PidginWebViewToolbar widget. This |
103 * Create an PidginWebView widget and associated PidginWebViewToolbar widget. This |
| 104 * function puts both widgets in a nice GtkFrame. They're separated by an |
104 * function puts both widgets in a nice GtkFrame. They're separated by an |
| 105 * attractive GtkSeparator. |
105 * attractive GtkSeparator. |
| 106 * |
106 * |
| 107 * Returns: The GtkFrame containing the toolbar and webview. |
107 * Returns: (transfer full): The GtkFrame containing the toolbar and webview. |
| 108 */ |
108 */ |
| 109 GtkWidget *pidgin_create_webview(gboolean editable, GtkWidget **webview_ret, GtkWidget **sw_ret); |
109 GtkWidget *pidgin_create_webview(gboolean editable, GtkWidget **webview_ret, GtkWidget **sw_ret); |
| 110 |
110 |
| 111 /** |
111 /** |
| 112 * pidgin_create_small_button: |
112 * pidgin_create_small_button: |
| 113 * @image: A button image. |
113 * @image: A button image. |
| 114 * |
114 * |
| 115 * Creates a small button |
115 * Creates a small button |
| 116 * |
116 * |
| 117 * Returns: A GtkButton created from the image. |
117 * Returns: (transfer full): A GtkButton created from the image. |
| 118 */ |
118 */ |
| 119 GtkWidget *pidgin_create_small_button(GtkWidget *image); |
119 GtkWidget *pidgin_create_small_button(GtkWidget *image); |
| 120 |
120 |
| 121 /** |
121 /** |
| 122 * pidgin_create_window: |
122 * pidgin_create_window: |
| 124 * @border_width: The window's desired border width |
124 * @border_width: The window's desired border width |
| 125 * @role: A string indicating what the window is responsible for doing, or %NULL |
125 * @role: A string indicating what the window is responsible for doing, or %NULL |
| 126 * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE) |
126 * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE) |
| 127 * |
127 * |
| 128 * Creates a new window |
128 * Creates a new window |
| |
129 * |
| |
130 * Returns: (transfer full): A new window. |
| 129 */ |
131 */ |
| 130 GtkWidget *pidgin_create_window(const char *title, guint border_width, const char *role, gboolean resizable); |
132 GtkWidget *pidgin_create_window(const char *title, guint border_width, const char *role, gboolean resizable); |
| 131 |
133 |
| 132 /** |
134 /** |
| 133 * pidgin_create_dialog: |
135 * pidgin_create_dialog: |
| 135 * @border_width: The window's desired border width |
137 * @border_width: The window's desired border width |
| 136 * @role: A string indicating what the window is responsible for doing, or %NULL |
138 * @role: A string indicating what the window is responsible for doing, or %NULL |
| 137 * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE) |
139 * @resizable: Whether the window should be resizable (%TRUE) or not (%FALSE) |
| 138 * |
140 * |
| 139 * Creates a new dialog window |
141 * Creates a new dialog window |
| |
142 * |
| |
143 * Returns: (transfer full): A new dialog window. |
| 140 */ |
144 */ |
| 141 GtkWidget *pidgin_create_dialog(const char *title, guint border_width, const char *role, gboolean resizable); |
145 GtkWidget *pidgin_create_dialog(const char *title, guint border_width, const char *role, gboolean resizable); |
| 142 |
146 |
| 143 /** |
147 /** |
| 144 * pidgin_create_video_widget: |
148 * pidgin_create_video_widget: |
| 145 * |
149 * |
| 146 * Creates a new drawing area suitable for displaying a video |
150 * Creates a new drawing area suitable for displaying a video |
| |
151 * |
| |
152 * Returns: (transfer full): A new drawing area for displaying video. |
| 147 */ |
153 */ |
| 148 GtkWidget *pidgin_create_video_widget(void); |
154 GtkWidget *pidgin_create_video_widget(void); |
| 149 |
155 |
| 150 /** |
156 /** |
| 151 * pidgin_dialog_get_vbox_with_properties: |
157 * pidgin_dialog_get_vbox_with_properties: |
| 152 * @dialog: The dialog window |
158 * @dialog: The dialog window |
| 153 * @homogeneous: TRUE if all children are to be given equal space allotments. |
159 * @homogeneous: TRUE if all children are to be given equal space allotments. |
| 154 * @spacing: the number of pixels to place by default between children |
160 * @spacing: the number of pixels to place by default between children |
| 155 * |
161 * |
| 156 * Retrieves the main content box (vbox) from a pidgin dialog window |
162 * Retrieves the main content box (vbox) from a pidgin dialog window |
| |
163 * |
| |
164 * Returns: (transfer none): The main vbox from @dialog. |
| 157 */ |
165 */ |
| 158 GtkWidget *pidgin_dialog_get_vbox_with_properties(GtkDialog *dialog, gboolean homogeneous, gint spacing); |
166 GtkWidget *pidgin_dialog_get_vbox_with_properties(GtkDialog *dialog, gboolean homogeneous, gint spacing); |
| 159 |
167 |
| 160 /** |
168 /** |
| 161 * pidgin_dialog_get_vbox: |
169 * pidgin_dialog_get_vbox: |
| 162 * @dialog: The dialog window |
170 * @dialog: The dialog window |
| 163 * |
171 * |
| 164 * Retrieves the main content box (vbox) from a pidgin dialog window |
172 * Retrieves the main content box (vbox) from a pidgin dialog window |
| |
173 * |
| |
174 * Returns: (transfer none): the main vbox from @dialog. |
| 165 */ |
175 */ |
| 166 GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog); |
176 GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog); |
| 167 |
177 |
| 168 /** |
178 /** |
| 169 * pidgin_dialog_add_button: |
179 * pidgin_dialog_add_button: |
| 170 * @dialog: The dialog window |
180 * @dialog: The dialog window |
| 171 * @label: The stock-id or the label for the button |
181 * @label: The stock-id or the label for the button |
| 172 * @callback: The callback function for the button |
182 * @callback: (scope call): The callback function for the button |
| 173 * @callbackdata: The user data for the callback function |
183 * @callbackdata: The user data for the callback function |
| 174 * |
184 * |
| 175 * Add a button to a dialog created by #pidgin_create_dialog. |
185 * Add a button to a dialog created by #pidgin_create_dialog. |
| 176 * |
186 * |
| 177 * Returns: The created button. |
187 * Returns: (transfer full): The created button. |
| 178 */ |
188 */ |
| 179 GtkWidget *pidgin_dialog_add_button(GtkDialog *dialog, const char *label, |
189 GtkWidget *pidgin_dialog_add_button(GtkDialog *dialog, const char *label, |
| 180 GCallback callback, gpointer callbackdata); |
190 GCallback callback, gpointer callbackdata); |
| 181 |
191 |
| 182 /** |
192 /** |
| 183 * pidgin_dialog_get_action_area: |
193 * pidgin_dialog_get_action_area: |
| 184 * @dialog: The dialog window |
194 * @dialog: The dialog window |
| 185 * |
195 * |
| 186 * Retrieves the action area (button box) from a pidgin dialog window |
196 * Retrieves the action area (button box) from a pidgin dialog window |
| |
197 * |
| |
198 * Returns: (transfer none): The action area (button box) from @dialog. |
| 187 */ |
199 */ |
| 188 GtkWidget *pidgin_dialog_get_action_area(GtkDialog *dialog); |
200 GtkWidget *pidgin_dialog_get_action_area(GtkDialog *dialog); |
| 189 |
201 |
| 190 /** |
202 /** |
| 191 * pidgin_toggle_sensitive: |
203 * pidgin_toggle_sensitive: |
| 229 * pidgin_separator: |
241 * pidgin_separator: |
| 230 * @menu: The menu to add a separator to. |
242 * @menu: The menu to add a separator to. |
| 231 * |
243 * |
| 232 * Adds a separator to a menu. |
244 * Adds a separator to a menu. |
| 233 * |
245 * |
| 234 * Returns: The separator. |
246 * Returns: (transfer full): The separator. |
| 235 */ |
247 */ |
| 236 GtkWidget *pidgin_separator(GtkWidget *menu); |
248 GtkWidget *pidgin_separator(GtkWidget *menu); |
| 237 |
249 |
| 238 /** |
250 /** |
| 239 * pidgin_new_check_item: |
251 * pidgin_new_check_item: |
| 240 * @menu: The menu to which to append the check menu item. |
252 * @menu: The menu to which to append the check menu item. |
| 241 * @str: The title to use for the newly created menu item. |
253 * @str: The title to use for the newly created menu item. |
| 242 * @cb: A function to call when the menu item is activated. |
254 * @cb: (scope call): A function to call when the menu item is activated. |
| 243 * @data: Data to pass to the signal function. |
255 * @data: Data to pass to the signal function. |
| 244 * @checked: The initial state of the check item |
256 * @checked: The initial state of the check item |
| 245 * |
257 * |
| 246 * Creates a check menu item. |
258 * Creates a check menu item. |
| 247 * |
259 * |
| 248 * Returns: The newly created menu item. |
260 * Returns: (transfer full): The newly created menu item. |
| 249 */ |
261 */ |
| 250 GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str, |
262 GtkWidget *pidgin_new_check_item(GtkWidget *menu, const char *str, |
| 251 GCallback cb, gpointer data, gboolean checked); |
263 GCallback cb, gpointer data, gboolean checked); |
| 252 |
264 |
| 253 /** |
265 /** |
| 254 * pidgin_new_menu_item: |
266 * pidgin_new_menu_item: |
| 255 * @menu: The menu to which to append the menu item. |
267 * @menu: The menu to which to append the menu item. |
| 256 * @mnemonic: The title for the menu item. |
268 * @mnemonic: The title for the menu item. |
| 257 * @icon: An icon to place to the left of the menu item, |
269 * @icon: An icon to place to the left of the menu item, |
| 258 * or %NULL for no icon. |
270 * or %NULL for no icon. |
| 259 * @cb: A function to call when the menu item is activated. |
271 * @cb: (scope call): A function to call when the menu item is activated. |
| 260 * @data: Data to pass to the signal function. |
272 * @data: Data to pass to the signal function. |
| 261 * |
273 * |
| 262 * Creates a menu item. |
274 * Creates a menu item. |
| 263 * |
275 * |
| 264 * Returns: The newly created menu item. |
276 * Returns: (transfer full): The newly created menu item. |
| 265 */ |
277 */ |
| 266 GtkWidget *pidgin_new_menu_item(GtkWidget *menu, const char *mnemonic, |
278 GtkWidget *pidgin_new_menu_item(GtkWidget *menu, const char *mnemonic, |
| 267 const char *icon, GCallback cb, gpointer data); |
279 const char *icon, GCallback cb, gpointer data); |
| 268 |
280 |
| 269 /** |
281 /** |
| 272 * @icon: The stock icon name. |
284 * @icon: The stock icon name. |
| 273 * @style: The orientation of the button. |
285 * @style: The orientation of the button. |
| 274 * |
286 * |
| 275 * Creates a button with the specified text and stock icon. |
287 * Creates a button with the specified text and stock icon. |
| 276 * |
288 * |
| 277 * Returns: The button. |
289 * Returns: (transfer full): The button. |
| 278 */ |
290 */ |
| 279 GtkWidget *pidgin_pixbuf_button_from_stock(const char *text, const char *icon, |
291 GtkWidget *pidgin_pixbuf_button_from_stock(const char *text, const char *icon, |
| 280 PidginButtonOrientation style); |
292 PidginButtonOrientation style); |
| 281 |
293 |
| 282 /** |
294 /** |
| 283 * pidgin_pixbuf_toolbar_button_from_stock: |
295 * pidgin_pixbuf_toolbar_button_from_stock: |
| 284 * @stock: The stock icon name. |
296 * @stock: The stock icon name. |
| 285 * |
297 * |
| 286 * Creates a toolbar button with the stock icon. |
298 * Creates a toolbar button with the stock icon. |
| 287 * |
299 * |
| 288 * Returns: The button. |
300 * Returns: (transfer full): The button. |
| 289 */ |
301 */ |
| 290 GtkWidget *pidgin_pixbuf_toolbar_button_from_stock(const char *stock); |
302 GtkWidget *pidgin_pixbuf_toolbar_button_from_stock(const char *stock); |
| 291 |
303 |
| 292 /** |
304 /** |
| 293 * pidgin_make_frame: |
305 * pidgin_make_frame: |
| 294 * @parent: The widget to put the frame into. |
306 * @parent: The widget to put the frame into. |
| 295 * @title: The title for the frame. |
307 * @title: The title for the frame. |
| 296 * |
308 * |
| 297 * Creates a HIG preferences frame. |
309 * Creates a HIG preferences frame. |
| 298 * |
310 * |
| 299 * Returns: The vbox to put things into. |
311 * Returns: (transfer full): The vbox to put things into. |
| 300 */ |
312 */ |
| 301 GtkWidget *pidgin_make_frame(GtkWidget *parent, const char *title); |
313 GtkWidget *pidgin_make_frame(GtkWidget *parent, const char *title); |
| 302 |
314 |
| 303 /** |
315 /** |
| 304 * pidgin_protocol_option_menu_new: |
316 * pidgin_protocol_option_menu_new: |
| 305 * @id: The protocol to select by default. |
317 * @id: The protocol to select by default. |
| 306 * @cb: The callback to call when a protocol is selected. |
318 * @cb: (scope call): The callback to call when a protocol is selected. |
| 307 * @user_data: Data to pass to the callback function. |
319 * @user_data: Data to pass to the callback function. |
| 308 * |
320 * |
| 309 * Creates a drop-down option menu filled with protocols. |
321 * Creates a drop-down option menu filled with protocols. |
| 310 * |
322 * |
| 311 * Returns: The drop-down option menu. |
323 * Returns: (transfer full): The drop-down option menu. |
| 312 */ |
324 */ |
| 313 GtkWidget *pidgin_protocol_option_menu_new(const char *id, |
325 GtkWidget *pidgin_protocol_option_menu_new(const char *id, |
| 314 GCallback cb, |
326 GCallback cb, |
| 315 gpointer user_data); |
327 gpointer user_data); |
| 316 |
328 |
| 326 const char *pidgin_protocol_option_menu_get_selected(GtkWidget *optmenu); |
338 const char *pidgin_protocol_option_menu_get_selected(GtkWidget *optmenu); |
| 327 |
339 |
| 328 /** |
340 /** |
| 329 * pidgin_account_option_menu_new: |
341 * pidgin_account_option_menu_new: |
| 330 * @default_account: The account to select by default. |
342 * @default_account: The account to select by default. |
| 331 * @show_all: Whether or not to show all accounts, or just |
343 * @show_all: Whether or not to show all accounts, or just |
| 332 * active accounts. |
344 * active accounts. |
| 333 * @cb: The callback to call when an account is selected. |
345 * @cb: (scope call): The callback to call when an account is selected. |
| 334 * @filter_func: A function for checking if an account should |
346 * @filter_func: (scope call): A function for checking if an account should |
| 335 * be shown. This can be NULL. |
347 * be shown. This can be NULL. |
| 336 * @user_data: Data to pass to the callback function. |
348 * @user_data: Data to pass to the callback function. |
| 337 * |
349 * |
| 338 * Creates a drop-down option menu filled with accounts. |
350 * Creates a drop-down option menu filled with accounts. |
| 339 * |
351 * |
| 340 * Returns: The drop-down option menu. |
352 * Returns: (transfer full): The drop-down option menu. |
| 341 */ |
353 */ |
| 342 GtkWidget *pidgin_account_option_menu_new(PurpleAccount *default_account, |
354 GtkWidget *pidgin_account_option_menu_new(PurpleAccount *default_account, |
| 343 gboolean show_all, GCallback cb, |
355 gboolean show_all, GCallback cb, |
| 344 PurpleFilterAccountFunc filter_func, gpointer user_data); |
356 PurpleFilterAccountFunc filter_func, gpointer user_data); |
| 345 |
357 |
| 368 * pidgin_setup_screenname_autocomplete: |
380 * pidgin_setup_screenname_autocomplete: |
| 369 * @entry: The GtkEntry on which to setup autocomplete. |
381 * @entry: The GtkEntry on which to setup autocomplete. |
| 370 * @optmenu: A menu for accounts, returned by pidgin_account_option_menu_new(). |
382 * @optmenu: A menu for accounts, returned by pidgin_account_option_menu_new(). |
| 371 * If @optmenu is not %NULL, it'll be updated when a username is chosen |
383 * If @optmenu is not %NULL, it'll be updated when a username is chosen |
| 372 * from the autocomplete list. |
384 * from the autocomplete list. |
| 373 * @filter_func: A function for checking if an autocomplete entry |
385 * @filter_func: (scope call): A function for checking if an autocomplete entry |
| 374 * should be shown. This can be %NULL. |
386 * should be shown. This can be %NULL. |
| 375 * @user_data: The data to be passed to the filter_func function. |
387 * @user_data: The data to be passed to the filter_func function. |
| 376 * |
388 * |
| 377 * Add autocompletion of screenames to an entry, supporting a filtering function. |
389 * Add autocompletion of screenames to an entry, supporting a filtering function. |
| 378 */ |
390 */ |
| 523 * @size: The size of the icon to return. |
535 * @size: The size of the icon to return. |
| 524 * |
536 * |
| 525 * Returns the base image to represent the account, based on |
537 * Returns the base image to represent the account, based on |
| 526 * the currently selected theme. |
538 * the currently selected theme. |
| 527 * |
539 * |
| 528 * Returns: A newly-created pixbuf with a reference count of 1, |
540 * Returns: (transfer full): A newly-created pixbuf with a reference count of 1, |
| 529 * or NULL if any of several error conditions occurred: |
541 * or NULL if any of several error conditions occurred: |
| 530 * the file could not be opened, there was no loader |
542 * the file could not be opened, there was no loader |
| 531 * for the file's format, there was not enough memory |
543 * for the file's format, there was not enough memory |
| 532 * to allocate the image buffer, or the image file |
544 * to allocate the image buffer, or the image file |
| 533 * contained invalid data. |
545 * contained invalid data. |
| 612 * @callback: The callback to call when the window is closed. If the user chose an icon, the char* argument will point to its path |
624 * @callback: The callback to call when the window is closed. If the user chose an icon, the char* argument will point to its path |
| 613 * @data: Data to pass to @callback |
625 * @data: Data to pass to @callback |
| 614 * |
626 * |
| 615 * Creates a File Selection widget for choosing a buddy icon |
627 * Creates a File Selection widget for choosing a buddy icon |
| 616 * |
628 * |
| 617 * Returns: The file dialog |
629 * Returns: (transfer full): The file dialog |
| 618 */ |
630 */ |
| 619 GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data); |
631 GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data); |
| 620 |
632 |
| 621 /** |
633 /** |
| 622 * pidgin_convert_buddy_icon: |
634 * pidgin_convert_buddy_icon: |
| 671 * Creates a #PidginMiniDialog, tied to a #PurpleConnection, suitable for |
683 * Creates a #PidginMiniDialog, tied to a #PurpleConnection, suitable for |
| 672 * embedding in the buddy list scrollbook with pidgin_blist_add_alert(). |
684 * embedding in the buddy list scrollbook with pidgin_blist_add_alert(). |
| 673 * |
685 * |
| 674 * See <link linkend="pidgin-pidginstock">Stock Resources</link>. |
686 * See <link linkend="pidgin-pidginstock">Stock Resources</link>. |
| 675 * |
687 * |
| 676 * Returns: A #PidginMiniDialog, suitable for passing to |
688 * Returns: (transfer full) A #PidginMiniDialog, suitable for passing to |
| 677 * pidgin_blist_add_alert(). |
689 * pidgin_blist_add_alert(). |
| 678 */ |
690 */ |
| 679 GtkWidget *pidgin_make_mini_dialog(PurpleConnection *handle, |
691 GtkWidget *pidgin_make_mini_dialog(PurpleConnection *handle, |
| 680 const char* stock_id, const char *primary, const char *secondary, |
692 const char* stock_id, const char *primary, const char *secondary, |
| 681 void *user_data, ...) G_GNUC_NULL_TERMINATED; |
693 void *user_data, ...) G_GNUC_NULL_TERMINATED; |
| 682 |
694 |
| 683 /** |
695 /** |
| 684 * pidgin_make_mini_dialog_with_custom_icon: |
696 * pidgin_make_mini_dialog_with_custom_icon: |
| |
697 * @custom_icon: A custom GdkPixbuf to use. |
| |
698 * @primary: The primary text |
| |
699 * @secondary: The secondary text, or %NULL for no description. |
| |
700 * @user_data: Data to pass to the callbacks |
| |
701 * @...: a %NULL-terminated list of button labels |
| |
702 * (<type>char *</type>) and callbacks |
| |
703 * (#PidginUtilMiniDialogCallback). @user_data will be |
| |
704 * passed as the first argument. (Callbacks may lack a |
| |
705 * second argument, or be %NULL to take no action when |
| |
706 * the corresponding button is pressed.) When a button is |
| |
707 * pressed, the callback (if any) will be called; when |
| |
708 * the callback returns the dialog will be destroyed. |
| 685 * |
709 * |
| 686 * Does exactly what pidgin_make_mini_dialog() does, except you can specify |
710 * Does exactly what pidgin_make_mini_dialog() does, except you can specify |
| 687 * a custom icon for the dialog. |
711 * a custom icon for the dialog. |
| |
712 * |
| |
713 * Returns: (transfer full): A #PidginMiniDialog, suitable for passing to |
| |
714 * pidgin_blist_add_alert(). |
| 688 */ |
715 */ |
| 689 GtkWidget *pidgin_make_mini_dialog_with_custom_icon(PurpleConnection *gc, |
716 GtkWidget *pidgin_make_mini_dialog_with_custom_icon(PurpleConnection *gc, |
| 690 GdkPixbuf *custom_icon, |
717 GdkPixbuf *custom_icon, |
| 691 const char *primary, |
718 const char *primary, |
| 692 const char *secondary, |
719 const char *secondary, |
| 746 */ |
773 */ |
| 747 const char *pidgin_get_dim_grey_string(GtkWidget *widget); |
774 const char *pidgin_get_dim_grey_string(GtkWidget *widget); |
| 748 |
775 |
| 749 /** |
776 /** |
| 750 * pidgin_text_combo_box_entry_new: |
777 * pidgin_text_combo_box_entry_new: |
| 751 * @default_item: Initial contents of GtkEntry |
778 * @default_item: Initial contents of GtkEntry |
| 752 * @items: GList containing strings to add to GtkComboBox |
779 * @items: (element-type utf8): GList containing strings to add to GtkComboBox |
| 753 * |
780 * |
| 754 * Create a simple text GtkComboBoxEntry equivalent |
781 * Create a simple text GtkComboBoxEntry equivalent |
| 755 * |
782 * |
| 756 * Returns: A newly created text GtkComboBox containing a GtkEntry |
783 * Returns: (transfer full): A newly created text GtkComboBox containing a GtkEntry |
| 757 * child. |
784 * child. |
| 758 */ |
785 */ |
| 759 GtkWidget *pidgin_text_combo_box_entry_new(const char *default_item, GList *items); |
786 GtkWidget *pidgin_text_combo_box_entry_new(const char *default_item, GList *items); |
| 760 |
787 |
| 761 /** |
788 /** |
| 762 * pidgin_text_combo_box_entry_get_text: |
789 * pidgin_text_combo_box_entry_get_text: |
| 796 * @expand: Whether to expand the widget horizontally. |
823 * @expand: Whether to expand the widget horizontally. |
| 797 * @p_label: Place to store a pointer to the GtkLabel, or %NULL if you don't care. |
824 * @p_label: Place to store a pointer to the GtkLabel, or %NULL if you don't care. |
| 798 * |
825 * |
| 799 * Add a labelled widget to a GtkBox |
826 * Add a labelled widget to a GtkBox |
| 800 * |
827 * |
| 801 * Returns: A GtkBox already added to the GtkBox containing the GtkLabel and the GtkWidget. |
828 * Returns: (transfer full): A GtkBox already added to the GtkBox containing the GtkLabel and the GtkWidget. |
| 802 */ |
829 */ |
| 803 GtkWidget *pidgin_add_widget_to_vbox(GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label); |
830 GtkWidget *pidgin_add_widget_to_vbox(GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label); |
| 804 |
831 |
| 805 /** |
832 /** |
| 806 * pidgin_pixbuf_from_data: |
833 * pidgin_pixbuf_from_data: |
| 807 * @buf: The raw binary image data. |
834 * @buf: The raw binary image data. |
| 808 * @count: The length of buf in bytes. |
835 * @count: The length of buf in bytes. |
| 809 * |
836 * |
| 810 * Create a GdkPixbuf from a chunk of image data. |
837 * Create a GdkPixbuf from a chunk of image data. |
| 811 * |
838 * |
| 812 * Returns: A GdkPixbuf created from the image data, or NULL if |
839 * Returns: (transfer full): A GdkPixbuf created from the image data, or NULL if |
| 813 * there was an error parsing the data. |
840 * there was an error parsing the data. |
| 814 */ |
841 */ |
| 815 GdkPixbuf *pidgin_pixbuf_from_data(const guchar *buf, gsize count); |
842 GdkPixbuf *pidgin_pixbuf_from_data(const guchar *buf, gsize count); |
| 816 |
843 |
| 817 /** |
844 /** |
| 819 * @buf: The raw binary image data. |
846 * @buf: The raw binary image data. |
| 820 * @count: The length of buf in bytes. |
847 * @count: The length of buf in bytes. |
| 821 * |
848 * |
| 822 * Create a GdkPixbufAnimation from a chunk of image data. |
849 * Create a GdkPixbufAnimation from a chunk of image data. |
| 823 * |
850 * |
| 824 * Returns: A GdkPixbufAnimation created from the image data, or NULL if |
851 * Returns: (transfer full): A GdkPixbufAnimation created from the image data, or NULL if |
| 825 * there was an error parsing the data. |
852 * there was an error parsing the data. |
| 826 */ |
853 */ |
| 827 GdkPixbufAnimation *pidgin_pixbuf_anim_from_data(const guchar *buf, gsize count); |
854 GdkPixbufAnimation *pidgin_pixbuf_anim_from_data(const guchar *buf, gsize count); |
| 828 |
855 |
| 829 /** |
856 /** |
| 830 * pidgin_pixbuf_from_image: |
857 * pidgin_pixbuf_from_image: |
| 831 * @image: a PurpleImage. |
858 * @image: a PurpleImage. |
| 832 * |
859 * |
| 833 * Create a GdkPixbuf from a PurpleImage. |
860 * Create a GdkPixbuf from a PurpleImage. |
| 834 * |
861 * |
| 835 * Returns: a GdkPixbuf created from the @image. |
862 * Returns: (transfer full): a GdkPixbuf created from the @image. |
| 836 */ |
863 */ |
| 837 GdkPixbuf * |
864 GdkPixbuf * |
| 838 pidgin_pixbuf_from_image(PurpleImage *image); |
865 pidgin_pixbuf_from_image(PurpleImage *image); |
| 839 |
866 |
| 840 /** |
867 /** |
| 880 * |
907 * |
| 881 * This function shouldn't be necessary once Pidgin requires a version of |
908 * This function shouldn't be necessary once Pidgin requires a version of |
| 882 * gdk-pixbuf where the aforementioned bug is fixed. However, it might be |
909 * gdk-pixbuf where the aforementioned bug is fixed. However, it might be |
| 883 * nice to keep this function around for the debug message that it logs. |
910 * nice to keep this function around for the debug message that it logs. |
| 884 * |
911 * |
| 885 * Returns: The GdkPixbuf if successful. Otherwise NULL is returned and |
912 * Returns: (transfer full): The GdkPixbuf if successful. Otherwise NULL is returned and |
| 886 * a warning is logged. |
913 * a warning is logged. |
| 887 */ |
914 */ |
| 888 GdkPixbuf *pidgin_pixbuf_new_from_file_at_size(const char *filename, int width, int height); |
915 GdkPixbuf *pidgin_pixbuf_new_from_file_at_size(const char *filename, int width, int height); |
| 889 |
916 |
| 890 /** |
917 /** |
| 907 * |
934 * |
| 908 * This function shouldn't be necessary once Pidgin requires a version of |
935 * This function shouldn't be necessary once Pidgin requires a version of |
| 909 * gdk-pixbuf where the aforementioned bug is fixed. However, it might be |
936 * gdk-pixbuf where the aforementioned bug is fixed. However, it might be |
| 910 * nice to keep this function around for the debug message that it logs. |
937 * nice to keep this function around for the debug message that it logs. |
| 911 * |
938 * |
| 912 * Returns: The GdkPixbuf if successful. Otherwise NULL is returned and |
939 * Returns: (transfer full): The GdkPixbuf if successful. Otherwise NULL is returned and |
| 913 * a warning is logged. |
940 * a warning is logged. |
| 914 */ |
941 */ |
| 915 GdkPixbuf *pidgin_pixbuf_new_from_file_at_scale(const char *filename, int width, int height, gboolean preserve_aspect_ratio); |
942 GdkPixbuf *pidgin_pixbuf_new_from_file_at_scale(const char *filename, int width, int height, gboolean preserve_aspect_ratio); |
| 916 |
943 |
| 917 /** |
944 /** |
| 926 * returned without modifications. |
953 * returned without modifications. |
| 927 * |
954 * |
| 928 * If new image is created, @src reference cound will be decreased and new image |
955 * If new image is created, @src reference cound will be decreased and new image |
| 929 * with a ref count of 1 will be returned. |
956 * with a ref count of 1 will be returned. |
| 930 * |
957 * |
| 931 * Returns: The image with proper sizing. %NULL in case of error. |
958 * Returns: (transfer full): The image with proper sizing. %NULL in case of error. |
| 932 */ |
959 */ |
| 933 GdkPixbuf * |
960 GdkPixbuf * |
| 934 pidgin_pixbuf_scale_down(GdkPixbuf *src, guint max_width, guint max_height, |
961 pidgin_pixbuf_scale_down(GdkPixbuf *src, guint max_width, guint max_height, |
| 935 GdkInterpType interp_type, gboolean preserve_ratio); |
962 GdkInterpType interp_type, gboolean preserve_ratio); |
| 936 |
963 |
| 942 * @shadow_type: Shadow type |
969 * @shadow_type: Shadow type |
| 943 * @width: Desired widget width, or -1 for default |
970 * @width: Desired widget width, or -1 for default |
| 944 * @height: Desired widget height, or -1 for default |
971 * @height: Desired widget height, or -1 for default |
| 945 * |
972 * |
| 946 * Add scrollbars to a widget |
973 * Add scrollbars to a widget |
| |
974 * |
| |
975 * Returns: (transfer full): A scrolled window with @child packed inside of it. |
| 947 */ |
976 */ |
| 948 GtkWidget *pidgin_make_scrollable(GtkWidget *child, GtkPolicyType hscrollbar_policy, GtkPolicyType vscrollbar_policy, GtkShadowType shadow_type, int width, int height); |
977 GtkWidget *pidgin_make_scrollable(GtkWidget *child, GtkPolicyType hscrollbar_policy, GtkPolicyType vscrollbar_policy, GtkShadowType shadow_type, int width, int height); |
| 949 |
978 |
| 950 /** |
979 /** |
| 951 * pidgin_utils_init: |
980 * pidgin_utils_init: |