pidgin  2.14.10
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
 

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. More...
 
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. More...
 
void pidgin_blist_init (void)
 Initializes the GTK+ blist system.
 
void pidgin_blist_uninit (void)
 Uninitializes the GTK+ blist system.
 
PurpleBlistUiOpspidgin_blist_get_ui_ops (void)
 Returns the UI operations structure for the buddy list. More...
 
PidginBuddyListpidgin_blist_get_default_gtk_blist (void)
 Returns the default gtk buddy list. More...
 
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. More...
 
void pidgin_blist_refresh (PurpleBuddyList *list)
 Refreshes all the nodes of the buddy list. More...
 
void pidgin_blist_update_columns (void)
 
void pidgin_blist_update_refresh_timeout (void)
 
GdkPixbuf * pidgin_blist_get_emblem (PurpleBlistNode *node)
 Returns the blist emblem. More...
 
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. More...
 
void pidgin_blist_toggle_visibility (void)
 Intelligently toggles the visibility of the buddy list. More...
 
void pidgin_blist_visibility_manager_add (void)
 Increases the reference count of visibility managers. More...
 
void pidgin_blist_visibility_manager_remove (void)
 Decreases the reference count of visibility managers. More...
 
void pidgin_blist_add_alert (GtkWidget *widget)
 Adds a mini-alert to the blist scrollbook. More...
 
void pidgin_blist_set_theme (PidginBlistTheme *theme)
 Sets the current theme for Pidgin to use. More...
 
PidginBlistThemepidgin_blist_get_theme (void)
 Gets Pidgin's current buddy list theme. More...
 
GList * pidgin_blist_get_sort_methods (void)
 Gets the current list of sort methods. More...
 
void pidgin_blist_sort_method_reg (const char *id, const char *name, pidgin_blist_sort_function func)
 Registers a buddy list sorting method. More...
 
void pidgin_blist_sort_method_unreg (const char *id)
 Unregisters a buddy list sorting method. More...
 
void pidgin_blist_sort_method_set (const char *id)
 Sets a buddy list sorting method. More...
 
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. More...
 
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. More...
 
void pidgin_blist_set_headline (const char *text, GdkPixbuf *pixbuf, GCallback callback, gpointer user_data, GDestroyNotify destroy)
 Sets a headline notification. More...
 
gchar * pidgin_blist_get_name_markup (PurpleBuddy *buddy, gboolean selected, gboolean aliased)
 Returns a buddy's Pango markup appropriate for setting in a GtkCellRenderer. More...
 
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. More...
 
void pidgin_blist_tooltip_destroy (void)
 Destroys the current (if any) Buddy List tooltip. More...
 

Detailed Description

GTK+ Buddy List API.

See also
GtkBlist Signals

Definition in file gtkblist.h.

Typedef Documentation

◆ PidginBuddyList

Like, everything you need to know about the gtk buddy list.

Definition at line 1 of file gtkblist.h.

Function Documentation

◆ pidgin_blist_add_alert()

void pidgin_blist_add_alert ( GtkWidget *  widget)

Adds a mini-alert to the blist scrollbook.

Parameters
widgetThe widget to add

◆ pidgin_blist_draw_tooltip()

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
nodeThe buddy list node to show a tooltip for
widgetThe widget to draw the tooltip on
Since
2.1.0

◆ pidgin_blist_get_default_gtk_blist()

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

◆ pidgin_blist_get_emblem()

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
nodeThe node to return an emblem for
Returns
A GdkPixbuf for the emblem to show, or NULL

◆ pidgin_blist_get_handle()

void* pidgin_blist_get_handle ( void  )

Get the handle for the GTK+ blist system.

Returns
the handle to the blist system

◆ pidgin_blist_get_name_markup()

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
buddyThe buddy to return markup from
selectedWhether this buddy is selected. If TRUE, the markup will not change the color.
aliasedTRUE 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

◆ pidgin_blist_get_sort_methods()

GList* pidgin_blist_get_sort_methods ( void  )

Gets the current list of sort methods.

Returns
A GSlist of sort methods

◆ pidgin_blist_get_theme()

PidginBlistTheme* pidgin_blist_get_theme ( void  )

Gets Pidgin's current buddy list theme.

Returns
the current theme
Since
2.6.0

◆ pidgin_blist_get_ui_ops()

PurpleBlistUiOps* pidgin_blist_get_ui_ops ( void  )

Returns the UI operations structure for the buddy list.

Returns
The GTK+ list operations structure.

◆ pidgin_blist_joinchat_is_showable()

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.

◆ pidgin_blist_make_buddy_menu()

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
menuThe menu to populate
buddyThe buddy whose menu to get
subTRUE if this is a sub-menu, FALSE otherwise

◆ pidgin_blist_node_is_contact_expanded()

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
nodeThe node in question.
Returns
A boolean indicating if node is part of an expanded contact.

◆ pidgin_blist_refresh()

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
listThis is the core list that gets updated from

◆ pidgin_blist_set_headline()

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
textPango Markup for the label text
pixbufThe GdkPixbuf for the icon
callbackThe callback to call when headline is clicked
user_dataThe userdata to include in the callback
destroyThe callback to call when headline is closed or replaced by another headline.

◆ pidgin_blist_set_theme()

void pidgin_blist_set_theme ( PidginBlistTheme theme)

Sets the current theme for Pidgin to use.

Parameters
themethe new theme to use
Since
2.6.0

◆ pidgin_blist_sort_method_reg()

void pidgin_blist_sort_method_reg ( const char *  id,
const char *  name,
pidgin_blist_sort_function  func 
)

Registers a buddy list sorting method.

Parameters
idThe unique ID of the sorting method
nameThe method's name.
funcA pointer to the function.

◆ pidgin_blist_sort_method_set()

void pidgin_blist_sort_method_set ( const char *  id)

Sets a buddy list sorting method.

Parameters
idThe method's id.

◆ pidgin_blist_sort_method_unreg()

void pidgin_blist_sort_method_unreg ( const char *  id)

Unregisters a buddy list sorting method.

Parameters
idThe method's id

◆ pidgin_blist_toggle_visibility()

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.

◆ pidgin_blist_tooltip_destroy()

void pidgin_blist_tooltip_destroy ( void  )

Destroys the current (if any) Buddy List tooltip.

Since
2.1.0

◆ pidgin_blist_update_account_error_state()

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
accountThe account that either has a connection error or no longer has a connection error.
messageThe 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.

◆ pidgin_blist_visibility_manager_add()

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).

◆ pidgin_blist_visibility_manager_remove()

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.