#include "gtkconv.h"
#include "pidgin.h"
#include "prpl.h"
#include "util.h"
Include dependency graph for gtkutils.h:
Go to the source code of this file.
Data Structures | |
struct | PidginBuddyCompletionEntry |
Typedefs | |
typedef gboolean(* | PidginFilterBuddyCompletionEntryFunc )(const PidginBuddyCompletionEntry *completion_entry, gpointer user_data) |
typedef void(* | PidginUtilMiniDialogCallback )(gpointer user_data, GtkButton *) |
The type of callbacks passed to pidgin_make_mini_dialog(). | |
Enumerations | |
enum | PidginButtonOrientation { PIDGIN_BUTTON_HORIZONTAL, PIDGIN_BUTTON_VERTICAL } |
enum | PidginButtonStyle { PIDGIN_BUTTON_NONE = 0, PIDGIN_BUTTON_TEXT, PIDGIN_BUTTON_IMAGE, PIDGIN_BUTTON_TEXT_IMAGE } |
enum | PidginPrplIconSize { PIDGIN_PRPL_ICON_SMALL, PIDGIN_PRPL_ICON_MEDIUM, PIDGIN_PRPL_ICON_LARGE } |
enum | PidginBrowserPlace { PIDGIN_BROWSER_DEFAULT = 0, PIDGIN_BROWSER_CURRENT, PIDGIN_BROWSER_NEW_WINDOW, PIDGIN_BROWSER_NEW_TAB } |
Functions | |
void | pidgin_setup_imhtml (GtkWidget *imhtml) |
Sets up a gtkimhtml widget, loads it with smileys, and sets the default signal handlers. | |
GtkWidget * | pidgin_create_imhtml (gboolean editable, GtkWidget **imhtml_ret, GtkWidget **toolbar_ret, GtkWidget **sw_ret) |
Create an GtkIMHtml widget and associated GtkIMHtmlToolbar widget. | |
GtkWidget * | pidgin_create_window (const char *title, guint border_width, const char *role, gboolean resizable) |
Creates a new window. | |
GtkWidget * | pidgin_create_dialog (const char *title, guint border_width, const char *role, gboolean resizable) |
Creates a new dialog window. | |
GtkWidget * | pidgin_dialog_get_vbox_with_properties (GtkDialog *dialog, gboolean homogeneous, gint spacing) |
Retrieves the main content box (vbox) from a pidgin dialog window. | |
GtkWidget * | pidgin_dialog_get_vbox (GtkDialog *dialog) |
Retrieves the main content box (vbox) from a pidgin dialog window. | |
GtkWidget * | pidgin_dialog_add_button (GtkDialog *dialog, const char *label, GCallback callback, gpointer callbackdata) |
Add a button to a dialog created by pidgin_create_dialog. | |
GtkWidget * | pidgin_dialog_get_action_area (GtkDialog *dialog) |
Retrieves the action area (button box) from a pidgin dialog window. | |
void | pidgin_toggle_sensitive (GtkWidget *widget, GtkWidget *to_toggle) |
Toggles the sensitivity of a widget. | |
void | pidgin_set_sensitive_if_input (GtkWidget *entry, GtkWidget *dialog) |
Checks if text has been entered into a GtkTextEntry widget. | |
void | pidgin_toggle_sensitive_array (GtkWidget *w, GPtrArray *data) |
Toggles the sensitivity of all widgets in a pointer array. | |
void | pidgin_toggle_showhide (GtkWidget *widget, GtkWidget *to_toggle) |
Toggles the visibility of a widget. | |
GtkWidget * | pidgin_separator (GtkWidget *menu) |
Adds a separator to a menu. | |
GtkWidget * | pidgin_new_item (GtkWidget *menu, const char *str) |
Creates a menu item. | |
GtkWidget * | pidgin_new_check_item (GtkWidget *menu, const char *str, GtkSignalFunc sf, gpointer data, gboolean checked) |
Creates a check menu item. | |
GtkWidget * | pidgin_new_item_from_stock (GtkWidget *menu, const char *str, const char *icon, GtkSignalFunc sf, gpointer data, guint accel_key, guint accel_mods, char *mod) |
Creates a menu item. | |
GtkWidget * | pidgin_pixbuf_button_from_stock (const char *text, const char *icon, PidginButtonOrientation style) |
Creates a button with the specified text and stock icon. | |
GtkWidget * | pidgin_pixbuf_toolbar_button_from_stock (const char *stock) |
Creates a toolbar button with the stock icon. | |
GtkWidget * | pidgin_make_frame (GtkWidget *parent, const char *title) |
Creates a HIG preferences frame. | |
GtkWidget * | pidgin_protocol_option_menu_new (const char *id, GCallback cb, gpointer user_data) |
Creates a drop-down option menu filled with protocols. | |
const char * | pidgin_protocol_option_menu_get_selected (GtkWidget *optmenu) |
Gets the currently selected protocol from a protocol drop down box. | |
GtkWidget * | pidgin_account_option_menu_new (PurpleAccount *default_account, gboolean show_all, GCallback cb, PurpleFilterAccountFunc filter_func, gpointer user_data) |
Creates a drop-down option menu filled with accounts. | |
PurpleAccount * | pidgin_account_option_menu_get_selected (GtkWidget *optmenu) |
Gets the currently selected account from an account drop down box. | |
void | pidgin_account_option_menu_set_selected (GtkWidget *optmenu, PurpleAccount *account) |
Sets the currently selected account for an account drop down box. | |
void | pidgin_setup_screenname_autocomplete_with_filter (GtkWidget *entry, GtkWidget *optmenu, PidginFilterBuddyCompletionEntryFunc filter_func, gpointer user_data) |
Add autocompletion of screenames to an entry, supporting a filtering function. | |
gboolean | pidgin_screenname_autocomplete_default_filter (const PidginBuddyCompletionEntry *completion_entry, gpointer all_accounts) |
The default filter function for screenname autocomplete. | |
void | pidgin_setup_screenname_autocomplete (GtkWidget *entry, GtkWidget *optmenu, gboolean all) |
Add autocompletion of screenames to an entry. | |
gboolean | pidgin_check_if_dir (const char *path, GtkFileSelection *filesel) |
Check if the given path is a directory or not. | |
void | pidgin_setup_gtkspell (GtkTextView *textview) |
Sets up GtkSpell for the given GtkTextView, reporting errors if encountered. | |
void | pidgin_save_accels_cb (GtkAccelGroup *accel_group, guint arg1, GdkModifierType arg2, GClosure *arg3, gpointer data) |
Save menu accelerators callback. | |
gboolean | pidgin_save_accels (gpointer data) |
Save menu accelerators. | |
void | pidgin_load_accels (void) |
Load menu accelerators. | |
void | pidgin_retrieve_user_info (PurpleConnection *conn, const char *name) |
Get information about a user. | |
void | pidgin_retrieve_user_info_in_chat (PurpleConnection *conn, const char *name, int chatid) |
Get information about a user in a chat. | |
gboolean | pidgin_parse_x_im_contact (const char *msg, gboolean all_accounts, PurpleAccount **ret_account, char **ret_protocol, char **ret_username, char **ret_alias) |
Parses an application/x-im-contact MIME message and returns the data inside. | |
void | pidgin_set_accessible_label (GtkWidget *w, GtkWidget *l) |
Sets an ATK name for a given widget. | |
void | pidgin_set_accessible_relations (GtkWidget *w, GtkWidget *l) |
Sets the labelled-by and label-for ATK relationships. | |
void | pidgin_menu_position_func_helper (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer data) |
A helper function for GtkMenuPositionFuncs. | |
void | pidgin_treeview_popup_menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) |
A valid GtkMenuPositionFunc. | |
void | pidgin_dnd_file_manage (GtkSelectionData *sd, PurpleAccount *account, const char *who) |
Manages drag'n'drop of files. | |
void | pidgin_buddy_icon_get_scale_size (GdkPixbuf *buf, PurpleBuddyIconSpec *spec, PurpleIconScaleRules rules, int *width, int *height) |
Convenience wrapper for purple_buddy_icon_get_scale_size. | |
GdkPixbuf * | pidgin_create_prpl_icon (PurpleAccount *account, PidginPrplIconSize size) |
Returns the base image to represent the account, based on the currently selected theme. | |
GdkPixbuf * | pidgin_create_status_icon (PurpleStatusPrimitive primitive, GtkWidget *w, const char *size) |
Creates a status icon for a given primitve. | |
GtkWidget * | pidgin_append_menu_action (GtkWidget *menu, PurpleMenuAction *act, gpointer gobject) |
Append a PurpleMenuAction to a menu. | |
void | pidgin_set_cursor (GtkWidget *widget, GdkCursorType cursor_type) |
Sets the mouse pointer for a GtkWidget. | |
void | pidgin_clear_cursor (GtkWidget *widget) |
Sets the mouse point for a GtkWidget back to that of its parent window. | |
GtkWidget * | pidgin_buddy_icon_chooser_new (GtkWindow *parent, void(*callback)(const char *, gpointer), gpointer data) |
Creates a File Selection widget for choosing a buddy icon. | |
gpointer | pidgin_convert_buddy_icon (PurplePlugin *plugin, const char *path, size_t *len) |
Converts a buddy icon to the required size and format. | |
GdkPixbuf * | gdk_pixbuf_new_from_file_at_scale (const char *filename, int width, int height, gboolean preserve_aspect_ratio, GError **error) |
Creates a new pixbuf by loading an image from a file. | |
void | pidgin_set_custom_buddy_icon (PurpleAccount *account, const char *who, const char *filename) |
Set or unset a custom buddyicon for a user. | |
char * | pidgin_make_pretty_arrows (const char *str) |
Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing menu items. | |
GtkWidget * | pidgin_make_mini_dialog (PurpleConnection *handle, const char *stock_id, const char *primary, const char *secondary, void *user_data,...) G_GNUC_NULL_TERMINATED |
Creates a PidginMiniDialog, tied to a PurpleConnection, suitable for embedding in the buddy list scrollbook with pidgin_blist_add_alert(). | |
gboolean | pidgin_tree_view_search_equal_func (GtkTreeModel *model, gint column, const gchar *key, GtkTreeIter *iter, gpointer data) |
This is a callback function to be used for Ctrl+F searching in treeviews. | |
void | pidgin_set_urgent (GtkWindow *window, gboolean urgent) |
Sets or resets a window to 'urgent,' by setting the URGENT hint in X or blinking in the win32 taskbar. | |
gboolean | pidgin_gdk_pixbuf_is_opaque (GdkPixbuf *pixbuf) |
Returns TRUE if the GdkPixbuf is opaque, as determined by no alpha at any of the edge pixels. | |
void | pidgin_gdk_pixbuf_make_round (GdkPixbuf *pixbuf) |
Rounds the corners of a 32x32 GdkPixbuf in place. | |
const char * | pidgin_get_dim_grey_string (GtkWidget *widget) |
Returns an HTML-style color string for use as a dim grey string. | |
GtkTreePath * | gtk_tree_path_new_from_indices (gint first_index,...) |
This is copied from Gtk to support Gtk 2.0. | |
GtkWidget * | pidgin_text_combo_box_entry_new (const char *default_item, GList *items) |
Create a simple text GtkComboBoxEntry equivalent. | |
const char * | pidgin_text_combo_box_entry_get_text (GtkWidget *widget) |
Retrieve the text from the entry of the simple text GtkComboBoxEntry equivalent. | |
void | pidgin_text_combo_box_entry_set_text (GtkWidget *widget, const char *text) |
Set the text in the entry of the simple text GtkComboBoxEntry equivalent. | |
gboolean | pidgin_auto_parent_window (GtkWidget *window) |
Automatically make a window transient to a suitable parent window. | |
GtkWidget * | pidgin_add_widget_to_vbox (GtkBox *vbox, const char *widget_label, GtkSizeGroup *sg, GtkWidget *widget, gboolean expand, GtkWidget **p_label) |
Add a labelled widget to a GtkVBox. | |
GdkPixbuf * | pidgin_pixbuf_from_imgstore (PurpleStoredImage *image) |
Create a GdkPixbuf from a PurpleStoredImage. |
Definition in file gtkutils.h.
|
Creates a new pixbuf by loading an image from a file. The image will be scaled to fit in the requested size, optionally preserving the image's aspect ratio. |
|
This is copied from Gtk to support Gtk 2.0. Creates a new path with first_index and the varargs as indices.
|
|
Gets the currently selected account from an account drop down box.
|
|
Creates a drop-down option menu filled with accounts.
|
|
Sets the currently selected account for an account drop down box.
|
|
Add a labelled widget to a GtkVBox.
|
|
Append a PurpleMenuAction to a menu.
|
|
Automatically make a window transient to a suitable parent window.
|
|
Creates a File Selection widget for choosing a buddy icon.
|
|
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.
|
|
Sets the mouse point for a GtkWidget back to that of its parent window.
If widget is
If the window for widget is
|
|
Converts a buddy icon to the required size and format.
|
|
Creates a new dialog window.
|
|
Create an GtkIMHtml widget and associated GtkIMHtmlToolbar widget. This functions puts both widgets in a nice GtkFrame. They're separate by an attractive GtkSeparator.
|
|
Returns the base image to represent the account, based on the currently selected theme.
|
|
Creates a status icon for a given primitve.
|
|
Creates a new window.
|
|
Add a button to a dialog created by pidgin_create_dialog.
|
|
Retrieves the action area (button box) from a pidgin dialog window.
|
|
Retrieves the main content box (vbox) from a pidgin dialog window.
|
|
Retrieves the main content box (vbox) from a pidgin dialog window.
|
|
Manages drag'n'drop of files.
|
|
Returns TRUE if the GdkPixbuf is opaque, as determined by no alpha at any of the edge pixels.
|
|
Rounds the corners of a 32x32 GdkPixbuf in place.
|
|
Returns an HTML-style color string for use as a dim grey string.
|
|
Creates a HIG preferences frame.
|
|
Creates a PidginMiniDialog, tied to a PurpleConnection, suitable for embedding in the buddy list scrollbook with pidgin_blist_add_alert().
|
|
Converts "->" and "<-" in strings to Unicode arrow characters, for use in referencing menu items.
|
|
A helper function for GtkMenuPositionFuncs. This ensures the menu will be kept on screen if possible.
|
|
Creates a check menu item.
|
|
Creates a menu item.
|
|
Creates a menu item.
|
|
Parses an application/x-im-contact MIME message and returns the data inside.
|
|
Creates a button with the specified text and stock icon.
|
|
Create a GdkPixbuf from a PurpleStoredImage.
|
|
Creates a toolbar button with the stock icon.
|
|
Gets the currently selected protocol from a protocol drop down box.
|
|
Creates a drop-down option menu filled with protocols.
|
|
Get information about a user. Show immediate feedback.
|
|
Get information about a user in a chat. Show immediate feedback.
|
|
The default filter function for screenname autocomplete.
|
|
Adds a separator to a menu.
|
|
Sets an ATK name for a given widget. Also sets the labelled-by and label-for ATK relationships.
|
|
Sets the labelled-by and label-for ATK relationships.
|
|
Sets the mouse pointer for a GtkWidget. After setting the cursor, the display is flushed, so the change will take effect immediately.
If the window for widget is
|
|
Set or unset a custom buddyicon for a user.
|
|
Checks if text has been entered into a GtkTextEntry widget. If so, the GTK_RESPONSE_OK on the given dialog is set to TRUE. Otherwise GTK_RESPONSE_OK is set to FALSE.
|
|
Sets or resets a window to 'urgent,' by setting the URGENT hint in X or blinking in the win32 taskbar.
|
|
Sets up GtkSpell for the given GtkTextView, reporting errors if encountered. This does nothing if Pidgin is not compiled with GtkSpell support.
|
|
Sets up a gtkimhtml widget, loads it with smileys, and sets the default signal handlers.
|
|
Add autocompletion of screenames to an entry.
|
|
Add autocompletion of screenames to an entry, supporting a filtering function.
|
|
Retrieve the text from the entry of the simple text GtkComboBoxEntry equivalent.
|
|
Create a simple text GtkComboBoxEntry equivalent.
|
|
Set the text in the entry of the simple text GtkComboBoxEntry equivalent.
|
|
Toggles the sensitivity of a widget.
|
|
Toggles the sensitivity of all widgets in a pointer array.
|
|
Toggles the visibility of a widget.
|
|
This is a callback function to be used for Ctrl+F searching in treeviews. Sample Use: gtk_tree_view_set_search_equal_func(treeview, pidgin_tree_view_search_equal_func, search_data, search_data_destroy_cb); |
|
A valid GtkMenuPositionFunc. This is used to determine where to draw context menus when the menu is activated with the keyboard (shift+F10). If the menu is activated with the mouse, then you should just use GTK's built-in position function, because it does a better job of positioning the menu.
|