--- a/pidgin/gtkutils.h Sat May 26 13:48:41 2007 +0000 +++ b/pidgin/gtkutils.h Sun Jul 01 00:55:03 2007 +0000 @@ -93,6 +93,18 @@ GtkWidget *pidgin_create_imhtml(gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret); /** + * Creates a new window + * + * @param title The window title, or @c NULL + * @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); + +/** * Toggles the sensitivity of a widget. * * @param widget @c NULL. Used for signal handlers. @@ -130,8 +142,10 @@ * Adds a separator to a menu. * * @param menu The menu to add a separator to. + * + * @return The separator. */ -void pidgin_separator(GtkWidget *menu); +GtkWidget *pidgin_separator(GtkWidget *menu); /** * Creates a menu item. @@ -307,6 +321,23 @@ void pidgin_load_accels(void); /** + * Get information about a user. Show immediate feedback. + * + * @param conn The connection to get information from. + * @param name The user to get information about. + */ +void pidgin_retrieve_user_info(PurpleConnection *conn, const char *name); + +/** + * Get information about a user in a chat. Show immediate feedback. + * + * @param conn The connection to get information from. + * @param name The user to get information about. + * @param chatid The chat id. + */ +void pidgin_retrieve_user_info_in_chat(PurpleConnection *conn, const char *name, int chatid); + +/** * Parses an application/x-im-contact MIME message and returns the * data inside. * @@ -337,6 +368,21 @@ void pidgin_set_accessible_label(GtkWidget *w, GtkWidget *l); /** + * A helper function for GtkMenuPositionFuncs. This ensures the menu will + * be kept on screen if possible. + * + * @param menu The menu we are positioning. + * @param x Address of the gint representing the horizontal position + * where the menu shall be drawn. This is an output parameter. + * @param y Address of the gint representing the vertical position + * where the menu shall be drawn. This is an output parameter. + * @param push_in This is an output parameter? + * @param user_data Not used by this particular position function. + */ +void pidgin_menu_position_func_helper(GtkMenu *menu, gint *x, gint *y, + gboolean *push_in, gpointer data); + +/** * A valid GtkMenuPositionFunc. This is used to determine where * to draw context menu's when the menu is activated with the * keyboard (shift+F10). If the menu is activated with the mouse, @@ -404,8 +450,10 @@ * @param menu The menu to append to. * @param act The PurpleMenuAction to append. * @param gobject The object to be passed to the action callback. + * + * @return The menuitem added. */ -void pidgin_append_menu_action(GtkWidget *menu, PurpleMenuAction *act, +GtkWidget *pidgin_append_menu_action(GtkWidget *menu, PurpleMenuAction *act, gpointer gobject); /** @@ -526,6 +574,22 @@ */ gboolean pidgin_gdk_pixbuf_is_opaque(GdkPixbuf *pixbuf); +/** + * Rounds the corners of a 32x32 GdkPixbuf in place + * + * @param pixbuf The buddy icon to transform + */ +void pidgin_gdk_pixbuf_make_round(GdkPixbuf *pixbuf); + +/** + * Returns an HTML-style color string for use as a dim grey + * string + * + * @param widget The widget to return dim grey for + * @return The dim grey string + */ +const char *pidgin_get_dim_grey_string(GtkWidget *widget); + #if !GTK_CHECK_VERSION(2,2,0) /** * This is copied from Gtk to support Gtk 2.0