gtkblist.h File Reference
GTK+ Buddy List API. More...
#include "pidgin.h"
#include "blist.h"
#include "gtkblist-theme.h"

Go to the source code of this file.
Data Structures | |
| struct | _PidginBuddyList |
| Like, everything you need to know about the gtk buddy list. More... | |
| struct | pidgin_blist_sort_method |
Defines | |
| #define | PIDGIN_BLIST(list) ((PidginBuddyList *)purple_blist_get_ui_data()) |
| #define | PIDGIN_IS_PIDGIN_BLIST(list) (purple_blist_get_ui_ops() == pidgin_blist_get_ui_ops()) |
Typedefs | |
| typedef struct _PidginBuddyList | PidginBuddyList |
| typedef void(* | pidgin_blist_sort_function )(PurpleBlistNode *new, PurpleBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur, GtkTreeIter *iter) |
|
typedef struct pidgin_blist_sort_method | PidginBlistSortMethod |
Enumerations | |
| enum | { STATUS_ICON_COLUMN, STATUS_ICON_VISIBLE_COLUMN, NAME_COLUMN, IDLE_COLUMN, IDLE_VISIBLE_COLUMN, BUDDY_ICON_COLUMN, BUDDY_ICON_VISIBLE_COLUMN, NODE_COLUMN, BGCOLOR_COLUMN, GROUP_EXPANDER_COLUMN, GROUP_EXPANDER_VISIBLE_COLUMN, CONTACT_EXPANDER_COLUMN, CONTACT_EXPANDER_VISIBLE_COLUMN, EMBLEM_COLUMN, EMBLEM_VISIBLE_COLUMN, PROTOCOL_ICON_COLUMN, PROTOCOL_ICON_VISIBLE_COLUMN, BLIST_COLUMNS } |
| enum | PidginStatusIconSize { PIDGIN_STATUS_ICON_LARGE, PIDGIN_STATUS_ICON_SMALL } |
Functions | |
| void * | pidgin_blist_get_handle (void) |
| Get the handle for the GTK+ blist system. | |
| void | pidgin_blist_init (void) |
| Initializes the GTK+ blist system. | |
| void | pidgin_blist_uninit (void) |
| Uninitializes the GTK+ blist system. | |
| PurpleBlistUiOps * | pidgin_blist_get_ui_ops (void) |
| Returns the UI operations structure for the buddy list. | |
| PidginBuddyList * | pidgin_blist_get_default_gtk_blist (void) |
| Returns the default gtk buddy list. | |
| void | pidgin_blist_make_buddy_menu (GtkWidget *menu, PurpleBuddy *buddy, gboolean sub) |
| Populates a menu with the items shown on the buddy list for a buddy. | |
| void | pidgin_blist_refresh (PurpleBuddyList *list) |
| Refreshes all the nodes of the buddy list. | |
| void | pidgin_blist_update_columns (void) |
| void | pidgin_blist_update_refresh_timeout (void) |
| GdkPixbuf * | pidgin_blist_get_emblem (PurpleBlistNode *node) |
| Returns the blist emblem. | |
| GdkPixbuf * | pidgin_blist_get_status_icon (PurpleBlistNode *node, PidginStatusIconSize size) |
| Useful for the buddy ticker. | |
| gboolean | pidgin_blist_node_is_contact_expanded (PurpleBlistNode *node) |
| Returns a boolean indicating if node is part of an expanded contact. | |
| void | pidgin_blist_toggle_visibility (void) |
| Intelligently toggles the visibility of the buddy list. | |
| void | pidgin_blist_visibility_manager_add (void) |
| Increases the reference count of visibility managers. | |
| void | pidgin_blist_visibility_manager_remove (void) |
| Decreases the reference count of visibility managers. | |
| void | pidgin_blist_add_alert (GtkWidget *widget) |
| Adds a mini-alert to the blist scrollbook. | |
| void | pidgin_blist_set_theme (PidginBlistTheme *theme) |
| Sets the current theme for Pidgin to use. | |
| PidginBlistTheme * | pidgin_blist_get_theme (void) |
| Gets Pidgin's current buddy list theme. | |
| GList * | pidgin_blist_get_sort_methods (void) |
| Gets the current list of sort methods. | |
| void | pidgin_blist_sort_method_reg (const char *id, const char *name, pidgin_blist_sort_function func) |
| Registers a buddy list sorting method. | |
| void | pidgin_blist_sort_method_unreg (const char *id) |
| Unregisters a buddy list sorting method. | |
| void | pidgin_blist_sort_method_set (const char *id) |
| Sets a buddy list sorting method. | |
| void | pidgin_blist_setup_sort_methods (void) |
| Sets up the programs default sort methods. | |
| void | pidgin_blist_update_accounts_menu (void) |
| Updates the accounts menu on the GTK+ buddy list window. | |
| void | pidgin_blist_update_plugin_actions (void) |
| Updates the plugin actions menu on the GTK+ buddy list window. | |
| void | pidgin_blist_update_sort_methods (void) |
| Updates the Sorting menu on the GTK+ buddy list window. | |
| gboolean | pidgin_blist_joinchat_is_showable (void) |
| Determines if showing the join chat dialog is a valid action. | |
| void | pidgin_blist_joinchat_show (void) |
| Shows the join chat dialog. | |
| void | pidgin_append_blist_node_privacy_menu (GtkWidget *menu, PurpleBlistNode *node) |
| Appends the privacy menu items for a PurpleBlistNode TODO: Rename these. | |
| void | pidgin_append_blist_node_proto_menu (GtkWidget *menu, PurpleConnection *gc, PurpleBlistNode *node) |
| Appends the protocol specific menu items for a PurpleBlistNode TODO: Rename these. | |
| void | pidgin_append_blist_node_extended_menu (GtkWidget *menu, PurpleBlistNode *node) |
| Appends the extended menu items for a PurpleBlistNode TODO: Rename these. | |
| void | pidgin_blist_update_account_error_state (PurpleAccount *account, const char *message) |
| Was used by the connection API to tell the blist if an account has a connection error or no longer has a connection error, but the blist now does this itself with the account-error-changed signal. | |
| void | pidgin_blist_set_headline (const char *text, GdkPixbuf *pixbuf, GCallback callback, gpointer user_data, GDestroyNotify destroy) |
| Sets a headline notification. | |
| gchar * | pidgin_blist_get_name_markup (PurpleBuddy *buddy, gboolean selected, gboolean aliased) |
| Returns a buddy's Pango markup appropriate for setting in a GtkCellRenderer. | |
| void | pidgin_blist_draw_tooltip (PurpleBlistNode *node, GtkWidget *widget) |
| Creates the Buddy List tooltip at the current pointer location for the given buddy list node. | |
| void | pidgin_blist_tooltip_destroy (void) |
| Destroys the current (if any) Buddy List tooltip. | |
Detailed Description
GTK+ Buddy List API.
- See also:
- GtkBlist Signals
Definition in file gtkblist.h.
Typedef Documentation
| typedef struct _PidginBuddyList PidginBuddyList |
Like, everything you need to know about the gtk buddy list.
Definition at line 31 of file gtkblist.h.
Function Documentation
| void pidgin_blist_add_alert | ( | GtkWidget * | widget | ) |
Adds a mini-alert to the blist scrollbook.
- Parameters:
-
widget The widget to add
| void pidgin_blist_draw_tooltip | ( | PurpleBlistNode * | node, | |
| GtkWidget * | widget | |||
| ) |
Creates the Buddy List tooltip at the current pointer location for the given buddy list node.
This tooltip will be destroyed the next time this function is called, or when XXXX is called
- Parameters:
-
node The buddy list node to show a tooltip for widget The widget to draw the tooltip on
- Since:
- 2.1.0
| PidginBuddyList* pidgin_blist_get_default_gtk_blist | ( | void | ) |
Returns the default gtk buddy list.
There's normally only one buddy list window, but that isn't a necessity. This function returns the PidginBuddyList we're most likely wanting to work with. This is slightly cleaner than an externed global.
- Returns:
- The default GTK+ buddy list
| GdkPixbuf* pidgin_blist_get_emblem | ( | PurpleBlistNode * | node | ) |
Returns the blist emblem.
This may be an existing pixbuf that has been given an additional ref, so it shouldn't be modified.
- Parameters:
-
node The node to return an emblem for
- Returns:
- A GdkPixbuf for the emblem to show, or NULL
| void* pidgin_blist_get_handle | ( | void | ) |
Get the handle for the GTK+ blist system.
- Returns:
- the handle to the blist system
| gchar* pidgin_blist_get_name_markup | ( | PurpleBuddy * | buddy, | |
| gboolean | selected, | |||
| gboolean | aliased | |||
| ) |
Returns a buddy's Pango markup appropriate for setting in a GtkCellRenderer.
- Parameters:
-
buddy The buddy to return markup from selected Whether this buddy is selected. If TRUE, the markup will not change the color. aliased TRUE to return the appropriate alias of this buddy, FALSE to return its username and status information
- Returns:
- The markup for this buddy
- Since:
- 2.1.0
| GList* pidgin_blist_get_sort_methods | ( | void | ) |
Gets the current list of sort methods.
- Returns:
- A GSlist of sort methods
| PidginBlistTheme* pidgin_blist_get_theme | ( | void | ) |
Gets Pidgin's current buddy list theme.
- Returns:
- the current theme
- Since:
- 2.6.0
| PurpleBlistUiOps* pidgin_blist_get_ui_ops | ( | void | ) |
Returns the UI operations structure for the buddy list.
- Returns:
- The GTK+ list operations structure.
| gboolean pidgin_blist_joinchat_is_showable | ( | void | ) |
Determines if showing the join chat dialog is a valid action.
- Returns:
- Returns TRUE if there are accounts online capable of joining chat rooms. Otherwise returns FALSE.
| void pidgin_blist_make_buddy_menu | ( | GtkWidget * | menu, | |
| PurpleBuddy * | buddy, | |||
| gboolean | sub | |||
| ) |
Populates a menu with the items shown on the buddy list for a buddy.
- Parameters:
-
menu The menu to populate buddy The buddy whose menu to get sub TRUE if this is a sub-menu, FALSE otherwise
| gboolean pidgin_blist_node_is_contact_expanded | ( | PurpleBlistNode * | node | ) |
Returns a boolean indicating if node is part of an expanded contact.
This only makes sense for contact and buddy nodes. FALSE is returned for other types of nodes.
- Parameters:
-
node The node in question.
- Returns:
- A boolean indicating if node is part of an expanded contact.
| void pidgin_blist_refresh | ( | PurpleBuddyList * | list | ) |
Refreshes all the nodes of the buddy list.
This should only be called when something changes to affect most of the nodes (such as a ui preference changing)
- Parameters:
-
list This is the core list that gets updated from
| void pidgin_blist_set_headline | ( | const char * | text, | |
| GdkPixbuf * | pixbuf, | |||
| GCallback | callback, | |||
| gpointer | user_data, | |||
| GDestroyNotify | destroy | |||
| ) |
Sets a headline notification.
This is currently used for mail notification, but could theoretically be used for anything. Only the most recent headline will be shown.
- Parameters:
-
text Pango Markup for the label text pixbuf The GdkPixbuf for the icon callback The callback to call when headline is clicked user_data The userdata to include in the callback destroy The callback to call when headline is closed or replaced by another headline.
| void pidgin_blist_set_theme | ( | PidginBlistTheme * | theme | ) |
Sets the current theme for Pidgin to use.
- Parameters:
-
theme the new theme to use
- Since:
- 2.6.0
| void pidgin_blist_sort_method_reg | ( | const char * | id, | |
| const char * | name, | |||
| pidgin_blist_sort_function | func | |||
| ) |
Registers a buddy list sorting method.
- Parameters:
-
id The unique ID of the sorting method name The method's name. func A pointer to the function.
| void pidgin_blist_sort_method_set | ( | const char * | id | ) |
Sets a buddy list sorting method.
- Parameters:
-
id The method's id.
| void pidgin_blist_sort_method_unreg | ( | const char * | id | ) |
Unregisters a buddy list sorting method.
- Parameters:
-
id The method's id
| void pidgin_blist_toggle_visibility | ( | void | ) |
Intelligently toggles the visibility of the buddy list.
If the buddy list is obscured, it is brought to the front. If it is not obscured, it is hidden. If it is hidden it is shown.
| void pidgin_blist_tooltip_destroy | ( | void | ) |
Destroys the current (if any) Buddy List tooltip.
- Since:
- 2.1.0
| void pidgin_blist_update_account_error_state | ( | PurpleAccount * | account, | |
| const char * | message | |||
| ) |
Was used by the connection API to tell the blist if an account has a connection error or no longer has a connection error, but the blist now does this itself with the account-error-changed signal.
- Parameters:
-
account The account that either has a connection error or no longer has a connection error. message The connection error message, or NULL if this account is no longer in an error state.
- Deprecated:
- There was no good reason for code other than gtkconn to call this.
| void pidgin_blist_visibility_manager_add | ( | void | ) |
Increases the reference count of visibility managers.
Callers should call the complementary remove function when no longer managing visibility.
A visibility manager is something that provides some method for showing the buddy list after it is hidden (e.g. docklet plugin).
| void pidgin_blist_visibility_manager_remove | ( | void | ) |
Decreases the reference count of visibility managers.
If the count drops below zero, the buddy list is shown.

