Mercurial > pidgin.yaz
diff pidgin/gtkutils.h @ 32779:d72f2f13b60f
merge of 'c8c73eea7431e6f940916315ace40a41c8da3faa'
and 'fec428131bde0ae8247941bd6a3d996c984c9189'
author | Ethan Blanton <elb@pidgin.im> |
---|---|
date | Fri, 21 Oct 2011 14:36:18 +0000 |
parents | 02a2e8183b1d |
children | 0f94ec89f0bc |
line wrap: on
line diff
--- a/pidgin/gtkutils.h Fri Oct 21 14:36:06 2011 +0000 +++ b/pidgin/gtkutils.h Fri Oct 21 14:36:18 2011 +0000 @@ -109,12 +109,34 @@ GtkWidget *pidgin_create_imhtml(gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret); /** + * Create an GtkWebView widget and associated GtkIMHtmlToolbar widget. This + * function puts both widgets in a nice GtkFrame. They're separated by an + * attractive GtkSeparator. + * TODO WEBKIT: editable isn't supported yet + * + * @param editable @c TRUE if this webview should be editable. If this is + * @c FALSE, then the toolbar will NOT be created. If this webview + * should be read-only at first, but may become editable later, then + * pass in @c TRUE here and then manually call gtk_webview_set_editable() + * later. + * @param webview_ret A pointer to a pointer to a GtkWidget. This pointer + * will be set to the webview when this function exits. + * @param toolbar_ret A pointer to a pointer to a GtkWidget. If editable is + * TRUE then this will be set to the toolbar when this function exits. + * Otherwise this will be set to @c NULL. + * @param sw_ret This will be filled with a pointer to the scrolled window + * widget which contains the webview. + * + * @return The GtkFrame containing the toolbar and webview. + */ +GtkWidget *pidgin_create_webview(gboolean editable, GtkWidget **webview_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret); + +/** * Creates a small button * * @param image A button image. * * @return A GtkButton created from the image. - * @since 2.7.0 */ GtkWidget *pidgin_create_small_button(GtkWidget *image); @@ -125,8 +147,6 @@ * @param border_width The window's desired border width * @param role A string indicating what the window is responsible for doing, or @c NULL * @param resizable Whether the window should be resizable (@c TRUE) or not (@c FALSE) - * - * @since 2.1.0 */ GtkWidget *pidgin_create_window(const char *title, guint border_width, const char *role, gboolean resizable); @@ -137,8 +157,6 @@ * @param border_width The window's desired border width * @param role A string indicating what the window is responsible for doing, or @c NULL * @param resizable Whether the window should be resizable (@c TRUE) or not (@c FALSE) - * - * @since 2.4.0 */ GtkWidget *pidgin_create_dialog(const char *title, guint border_width, const char *role, gboolean resizable); @@ -148,8 +166,6 @@ * @param dialog The dialog window * @param homogeneous TRUE if all children are to be given equal space allotments. * @param spacing the number of pixels to place by default between children - * - * @since 2.4.0 */ GtkWidget *pidgin_dialog_get_vbox_with_properties(GtkDialog *dialog, gboolean homogeneous, gint spacing); @@ -157,8 +173,6 @@ * Retrieves the main content box (vbox) from a pidgin dialog window * * @param dialog The dialog window - * - * @since 2.4.0 */ GtkWidget *pidgin_dialog_get_vbox(GtkDialog *dialog); @@ -171,7 +185,6 @@ * @param callbackdata The user data for the callback function * * @return The created button. - * @since 2.4.0 */ GtkWidget *pidgin_dialog_add_button(GtkDialog *dialog, const char *label, GCallback callback, gpointer callbackdata); @@ -180,8 +193,6 @@ * Retrieves the action area (button box) from a pidgin dialog window * * @param dialog The dialog window - * - * @since 2.4.0 */ GtkWidget *pidgin_dialog_get_action_area(GtkDialog *dialog); @@ -384,39 +395,6 @@ gboolean pidgin_screenname_autocomplete_default_filter(const PidginBuddyCompletionEntry *completion_entry, gpointer all_accounts); /** - * Add autocompletion of screenames to an entry. - * - * @deprecated - * For new code, use the equivalent: - * #pidgin_setup_screenname_autocomplete_with_filter(@a entry, @a optmenu, - * #pidgin_screenname_autocomplete_default_filter, <tt>GINT_TO_POINTER(@a - * all)</tt>) - * - * @param entry The GtkEntry on which to setup autocomplete. - * @param optmenu A menu for accounts, returned by - * pidgin_account_option_menu_new(). If @a optmenu is not @c - * NULL, it'll be updated when a username is chosen from the - * autocomplete list. - * @param all Whether to include usernames from disconnected accounts. - */ -void pidgin_setup_screenname_autocomplete(GtkWidget *entry, GtkWidget *optmenu, gboolean all); - -/** - * Check if the given path is a directory or not. If it is, then modify - * the given GtkFileSelection dialog so that it displays the given path. - * If the given path is not a directory, then do nothing. - * - * @param path The path entered in the file selection window by the user. - * @param filesel The file selection window. - * - * @return TRUE if given path is a directory, FALSE otherwise. - * @deprecated Pidgin no longer uses GtkFileSelection internally. It has also - * been deprecated by GTK+. Use GtkFileChooser instead and ignore - * this function. - */ -gboolean pidgin_check_if_dir(const char *path, GtkFileSelection *filesel); - -/** * Sets up GtkSpell for the given GtkTextView, reporting errors * if encountered. * @@ -448,8 +426,6 @@ * * @param conn The connection to get information from. * @param name The user to get information about. - * - * @since 2.1.0 */ void pidgin_retrieve_user_info(PurpleConnection *conn, const char *name); @@ -459,8 +435,6 @@ * @param conn The connection to get information from. * @param name The user to get information about. * @param chatid The chat id. - * - * @since 2.1.0 */ void pidgin_retrieve_user_info_in_chat(PurpleConnection *conn, const char *name, int chatid); @@ -499,8 +473,6 @@ * * @param w The widget that we want to label. * @param l A GtkLabel that we want to use as the label for the widget. - * - * @since 2.2.0 */ void pidgin_set_accessible_relations(GtkWidget *w, GtkWidget *l); @@ -515,8 +487,6 @@ * where the menu shall be drawn. This is an output parameter. * @param push_in This is an output parameter? * @param data Not used by this particular position function. - * - * @since 2.1.0 */ void pidgin_menu_position_func_helper(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data); @@ -588,8 +558,6 @@ * @param prim The status primitive * * @return The stock-id - * - * @since 2.6.0 */ const char *pidgin_stock_id_from_status_primitive(PurpleStatusPrimitive prim); @@ -599,8 +567,6 @@ * @param presence The presence. * * @return The stock-id - * - * @since 2.6.0 */ const char *pidgin_stock_id_from_presence(PurplePresence *presence); @@ -661,19 +627,6 @@ */ gpointer pidgin_convert_buddy_icon(PurplePlugin *plugin, const char *path, size_t *len); -#if !(defined PIDGIN_DISABLE_DEPRECATED) || (defined _PIDGIN_GTKUTILS_C_) -/** - * Set or unset a custom buddyicon for a user. - * - * @param account The account the user belongs to. - * @param who The name of the user. - * @param filename The path of the custom icon. If this is @c NULL, then any - * previously set custom buddy icon for the user is removed. - * @deprecated See purple_buddy_icons_node_set_custom_icon_from_file() - */ -void pidgin_set_custom_buddy_icon(PurpleAccount *account, const char *who, const char *filename); -#endif - /** * Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing * menu items. @@ -781,8 +734,6 @@ * * @return A newly created text GtkComboBox containing a GtkEntry * child. - * - * @since 2.2.0 */ GtkWidget *pidgin_text_combo_box_entry_new(const char *default_item, GList *items); @@ -792,8 +743,6 @@ * @param widget The simple text GtkComboBoxEntry equivalent widget * * @return The text in the widget's entry. It must not be freed - * - * @since 2.2.0 */ const char *pidgin_text_combo_box_entry_get_text(GtkWidget *widget); @@ -802,8 +751,6 @@ * * @param widget The simple text GtkComboBoxEntry equivalent widget * @param text The text to set - * - * @since 2.2.0 */ void pidgin_text_combo_box_entry_set_text(GtkWidget *widget, const char *text); @@ -813,8 +760,6 @@ * @param window The window to make transient. * * @return Whether the window was made transient or not. - * - * @since 2.4.0 */ gboolean pidgin_auto_parent_window(GtkWidget *window); @@ -829,7 +774,6 @@ * @param p_label Place to store a pointer to the GtkLabel, or @c NULL if you don't care. * * @return A GtkHBox already added to the GtkVBox containing the GtkLabel and the GtkWidget. - * @since 2.4.0 */ GtkWidget *pidgin_add_widget_to_vbox(GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label); @@ -841,8 +785,6 @@ * * @return A GdkPixbuf created from the image data, or NULL if * there was an error parsing the data. - * - * @since 2.9.0 */ GdkPixbuf *pidgin_pixbuf_from_data(const guchar *buf, gsize count); @@ -854,8 +796,6 @@ * * @return A GdkPixbufAnimation created from the image data, or NULL if * there was an error parsing the data. - * - * @since 2.9.0 */ GdkPixbufAnimation *pidgin_pixbuf_anim_from_data(const guchar *buf, gsize count); @@ -865,8 +805,6 @@ * @param image A PurpleStoredImage. * * @return A GdkPixbuf created from the stored image. - * - * @since 2.5.0 */ GdkPixbuf *pidgin_pixbuf_from_imgstore(PurpleStoredImage *image); @@ -890,8 +828,6 @@ * * @return The GdkPixbuf if successful. Otherwise NULL is returned and * a warning is logged. - * - * @since 2.9.0 */ GdkPixbuf *pidgin_pixbuf_new_from_file(const char *filename); @@ -917,8 +853,6 @@ * * @return The GdkPixbuf if successful. Otherwise NULL is returned and * a warning is logged. - * - * @since 2.9.0 */ GdkPixbuf *pidgin_pixbuf_new_from_file_at_size(const char *filename, int width, int height); @@ -945,35 +879,27 @@ * * @return The GdkPixbuf if successful. Otherwise NULL is returned and * a warning is logged. - * - * @since 2.9.0 */ GdkPixbuf *pidgin_pixbuf_new_from_file_at_scale(const char *filename, int width, int height, gboolean preserve_aspect_ratio); /** * Add scrollbars to a widget - * @param widget The child widget - * @hscrollbar_policy Horizontal scrolling policy - * @vscrollbar_policy Vertical scrolling policy - * @shadow Shadow type - * @width Desired widget width, or -1 for default - * @height Desired widget height, or -1 for default - * - * @since 2.8.0 + * @param child The child widget + * @param hscrollbar_policy Horizontal scrolling policy + * @param vscrollbar_policy Vertical scrolling policy + * @param shadow_type Shadow type + * @param width Desired widget width, or -1 for default + * @param height Desired widget height, or -1 for default */ GtkWidget *pidgin_make_scrollable(GtkWidget *child, GtkPolicyType hscrollbar_policy, GtkPolicyType vscrollbar_policy, GtkShadowType shadow_type, int width, int height); /** * Initialize some utility functions. - * - * @since 2.6.0 */ void pidgin_utils_init(void); /** * Uninitialize some utility functions. - * - * @since 2.6.0 */ void pidgin_utils_uninit(void);