pidgin 2.14.14dev
|
GTK+ Buddy List API. More...
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 |
Macros | |
#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 |
Like, everything you need to know about the gtk buddy list. | |
typedef void(* | pidgin_blist_sort_function) (PurpleBlistNode *new, PurpleBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur, GtkTreeIter *iter) |
typedef struct pidgin_blist_sort_method | PidginBlistSortMethod |
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. | |
#define PIDGIN_BLIST | ( | list | ) | ((PidginBuddyList *)purple_blist_get_ui_data()) |
Definition at line 135 of file gtkblist.h.
#define PIDGIN_IS_PIDGIN_BLIST | ( | list | ) | (purple_blist_get_ui_ops() == pidgin_blist_get_ui_ops()) |
Definition at line 136 of file gtkblist.h.
typedef void(* pidgin_blist_sort_function) (PurpleBlistNode *new, PurpleBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur, GtkTreeIter *iter) |
Definition at line 280 of file gtkblist.h.
typedef struct pidgin_blist_sort_method PidginBlistSortMethod |
Definition at line 295 of file gtkblist.h.
typedef struct _PidginBuddyList PidginBuddyList |
Like, everything you need to know about the gtk buddy list.
Definition at line 31 of file gtkblist.h.
anonymous enum |
Definition at line 33 of file gtkblist.h.
enum PidginStatusIconSize |
Definition at line 55 of file gtkblist.h.
void pidgin_blist_add_alert | ( | GtkWidget * | widget | ) |
Adds a mini-alert to the blist scrollbook.
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
node | The buddy list node to show a tooltip for |
widget | The widget to draw the tooltip on |
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.
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.
node | The node to return an emblem for |
void * pidgin_blist_get_handle | ( | void | ) |
Get the handle for the GTK+ 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.
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 |
GList * pidgin_blist_get_sort_methods | ( | void | ) |
Gets the current list of sort methods.
PidginBlistTheme * pidgin_blist_get_theme | ( | void | ) |
Gets Pidgin's current buddy list theme.
PurpleBlistUiOps * pidgin_blist_get_ui_ops | ( | void | ) |
Returns the UI operations structure for the buddy list.
gboolean pidgin_blist_joinchat_is_showable | ( | void | ) |
Determines if showing the join chat dialog is a valid action.
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.
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.
node | The node in question. |
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)
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.
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.
theme | the new theme to use |
void pidgin_blist_sort_method_reg | ( | const char * | id, |
const char * | name, | ||
pidgin_blist_sort_function | func | ||
) |
Registers a buddy list sorting method.
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.
id | The method's id. |
void pidgin_blist_sort_method_unreg | ( | const char * | id | ) |
Unregisters a buddy list sorting method.
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.
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.
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. |
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.