pidgin/gtkutils.h

changeset 26378
e85d894af8a5
parent 25889
26d9ca30335c
child 26821
ad2ea323d0f2
equal deleted inserted replaced
26377:9124a345ed3a 26378:e85d894af8a5
134 134
135 /** 135 /**
136 * Retrieves the main content box (vbox) from a pidgin dialog window 136 * Retrieves the main content box (vbox) from a pidgin dialog window
137 * 137 *
138 * @param dialog The dialog window 138 * @param dialog The dialog window
139 * @param homogeneous TRUE if all children are to be given equal space allotments. 139 * @param homogeneous TRUE if all children are to be given equal space allotments.
140 * @param spacing the number of pixels to place by default between children 140 * @param spacing the number of pixels to place by default between children
141 * 141 *
142 * @since 2.4.0 142 * @since 2.4.0
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);
182 * @param to_toggle The widget to toggle. 182 * @param to_toggle The widget to toggle.
183 */ 183 */
184 void pidgin_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle); 184 void pidgin_toggle_sensitive(GtkWidget *widget, GtkWidget *to_toggle);
185 185
186 /** 186 /**
187 * Checks if text has been entered into a GtkTextEntry widget. If 187 * Checks if text has been entered into a GtkTextEntry widget. If
188 * so, the GTK_RESPONSE_OK on the given dialog is set to TRUE. 188 * so, the GTK_RESPONSE_OK on the given dialog is set to TRUE.
189 * Otherwise GTK_RESPONSE_OK is set to FALSE. 189 * Otherwise GTK_RESPONSE_OK is set to FALSE.
190 * 190 *
191 * @param entry The text entry widget. 191 * @param entry The text entry widget.
192 * @param dialog The dialog containing the text entry widget. 192 * @param dialog The dialog containing the text entry widget.
193 */ 193 */
353 /** 353 /**
354 * Add autocompletion of screenames to an entry, supporting a filtering function. 354 * Add autocompletion of screenames to an entry, supporting a filtering function.
355 * 355 *
356 * @param entry The GtkEntry on which to setup autocomplete. 356 * @param entry The GtkEntry on which to setup autocomplete.
357 * @param optmenu A menu for accounts, returned by gaim_gtk_account_option_menu_new(). 357 * @param optmenu A menu for accounts, returned by gaim_gtk_account_option_menu_new().
358 * If @a optmenu is not @c NULL, it'll be updated when a screenname is chosen 358 * If @a optmenu is not @c NULL, it'll be updated when a username is chosen
359 * from the autocomplete list. 359 * from the autocomplete list.
360 * @param filter_func A function for checking if an autocomplete entry 360 * @param filter_func A function for checking if an autocomplete entry
361 * should be shown. This can be @c NULL. 361 * should be shown. This can be @c NULL.
362 * @param user_data The data to be passed to the filter_func function. 362 * @param user_data The data to be passed to the filter_func function.
363 */ 363 */
364 void pidgin_setup_screenname_autocomplete_with_filter(GtkWidget *entry, GtkWidget *optmenu, PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data); 364 void pidgin_setup_screenname_autocomplete_with_filter(GtkWidget *entry, GtkWidget *optmenu, PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data);
365 365
366 /** 366 /**
367 * The default filter function for screenname autocomplete. 367 * The default filter function for username autocomplete.
368 * 368 *
369 * @param completion_entry The completion entry to filter. 369 * @param completion_entry The completion entry to filter.
370 * @param all_accounts If this is @c FALSE, only the autocompletion entries 370 * @param all_accounts If this is @c FALSE, only the autocompletion entries
371 * which belong to an online account will be filtered. 371 * which belong to an online account will be filtered.
372 * @return Returns @c TRUE if the autocompletion entry is filtered. 372 * @return Returns @c TRUE if the autocompletion entry is filtered.
383 * all)</tt>) 383 * all)</tt>)
384 * 384 *
385 * @param entry The GtkEntry on which to setup autocomplete. 385 * @param entry The GtkEntry on which to setup autocomplete.
386 * @param optmenu A menu for accounts, returned by 386 * @param optmenu A menu for accounts, returned by
387 * pidgin_account_option_menu_new(). If @a optmenu is not @c 387 * pidgin_account_option_menu_new(). If @a optmenu is not @c
388 * NULL, it'll be updated when a screenname is chosen from the 388 * NULL, it'll be updated when a username is chosen from the
389 * autocomplete list. 389 * autocomplete list.
390 * @param all Whether to include screennames from disconnected accounts. 390 * @param all Whether to include usernames from disconnected accounts.
391 */ 391 */
392 void pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, gboolean all); 392 void pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, gboolean all);
393 393
394 /** 394 /**
395 * Check if the given path is a directory or not. If it is, then modify 395 * Check if the given path is a directory or not. If it is, then modify
471 PurpleAccount **ret_account, 471 PurpleAccount **ret_account,
472 char **ret_protocol, char **ret_username, 472 char **ret_protocol, char **ret_username,
473 char **ret_alias); 473 char **ret_alias);
474 474
475 /** 475 /**
476 * Sets an ATK name for a given widget. Also sets the labelled-by 476 * Sets an ATK name for a given widget. Also sets the labelled-by
477 * and label-for ATK relationships. 477 * and label-for ATK relationships.
478 * 478 *
479 * @param w The widget that we want to name. 479 * @param w The widget that we want to name.
480 * @param l A GtkLabel that we want to use as the ATK name for the widget. 480 * @param l A GtkLabel that we want to use as the ATK name for the widget.
481 */ 481 */
507 */ 507 */
508 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,
509 gboolean *push_in, gpointer data); 509 gboolean *push_in, gpointer data);
510 510
511 /** 511 /**
512 * A valid GtkMenuPositionFunc. This is used to determine where 512 * A valid GtkMenuPositionFunc. This is used to determine where
513 * to draw context menus when the menu is activated with the 513 * to draw context menus when the menu is activated with the
514 * keyboard (shift+F10). If the menu is activated with the mouse, 514 * keyboard (shift+F10). If the menu is activated with the mouse,
515 * then you should just use GTK's built-in position function, 515 * then you should just use GTK's built-in position function,
516 * because it does a better job of positioning the menu. 516 * because it does a better job of positioning the menu.
517 * 517 *
518 * @param menu The menu we are positioning. 518 * @param menu The menu we are positioning.
519 * @param x Address of the gint representing the horizontal position 519 * @param x Address of the gint representing the horizontal position
520 * where the menu shall be drawn. This is an output parameter. 520 * where the menu shall be drawn. This is an output parameter.
610 * Creates a File Selection widget for choosing a buddy icon 610 * Creates a File Selection widget for choosing a buddy icon
611 * 611 *
612 * @param parent The parent window 612 * @param parent The parent window
613 * @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 613 * @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
614 * @param data Data to pass to @a callback 614 * @param data Data to pass to @a callback
615 * @return The file dialog 615 * @return The file dialog
616 */ 616 */
617 GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data); 617 GtkWidget *pidgin_buddy_icon_chooser_new(GtkWindow *parent, void(*callback)(const char*,gpointer), gpointer data);
618 618
619 /** 619 /**
620 * Converts a buddy icon to the required size and format 620 * Converts a buddy icon to the required size and format
621 * 621 *
622 * @param plugin The prpl to convert the icon 622 * @param plugin The prpl to convert the icon
623 * @param path The path of a file to convert 623 * @param path The path of a file to convert
624 * @param len If not @c NULL, the length of the returned data will be set here. 624 * @param len If not @c NULL, the length of the returned data will be set here.
625 * 625 *
626 * @return The converted image data, or @c NULL if an error occurred. 626 * @return The converted image data, or @c NULL if an error occurred.
704 */ 704 */
705 gboolean pidgin_tree_view_search_equal_func(GtkTreeModel *model, gint column, 705 gboolean pidgin_tree_view_search_equal_func(GtkTreeModel *model, gint column,
706 const gchar *key, GtkTreeIter *iter, gpointer data); 706 const gchar *key, GtkTreeIter *iter, gpointer data);
707 707
708 /** 708 /**
709 * Sets or resets a window to 'urgent,' by setting the URGENT hint in X 709 * Sets or resets a window to 'urgent,' by setting the URGENT hint in X
710 * or blinking in the win32 taskbar 710 * or blinking in the win32 taskbar
711 * 711 *
712 * @param window The window to draw attention to 712 * @param window The window to draw attention to
713 * @param urgent Whether to set the urgent hint or not 713 * @param urgent Whether to set the urgent hint or not
714 */ 714 */
790 /** 790 /**
791 * Automatically make a window transient to a suitable parent window. 791 * Automatically make a window transient to a suitable parent window.
792 * 792 *
793 * @param window The window to make transient. 793 * @param window The window to make transient.
794 * 794 *
795 * @return Whether the window was made transient or not. 795 * @return Whether the window was made transient or not.
796 *
796 * @since 2.4.0 797 * @since 2.4.0
797 */ 798 */
798 gboolean pidgin_auto_parent_window(GtkWidget *window); 799 gboolean pidgin_auto_parent_window(GtkWidget *window);
799 800
800 /** 801 /**
816 * Create a GdkPixbuf from a PurpleStoredImage. 817 * Create a GdkPixbuf from a PurpleStoredImage.
817 * 818 *
818 * @param image A PurpleStoredImage. 819 * @param image A PurpleStoredImage.
819 * 820 *
820 * @return A GdkPixbuf created from the stored image. 821 * @return A GdkPixbuf created from the stored image.
822 *
821 * @since 2.5.0 823 * @since 2.5.0
822 */ 824 */
823 GdkPixbuf * pidgin_pixbuf_from_imgstore(PurpleStoredImage *image); 825 GdkPixbuf *pidgin_pixbuf_from_imgstore(PurpleStoredImage *image);
826
827 /**
828 * Initialize some utility functions.
829 *
830 * @since 2.6.0
831 */
832 void pidgin_utils_init(void);
833
834 /**
835 * Uninitialize some utility functions.
836 *
837 * @since 2.6.0
838 */
839 void pidgin_utils_uninit(void);
824 840
825 #endif /* _PIDGINUTILS_H_ */ 841 #endif /* _PIDGINUTILS_H_ */
826 842

mercurial