Mercurial > pidgin
changeset 12054:2cb1beb9da51
[gaim-migrate @ 14349]
oops, didn't mean to commit that
committer: Tailor Script <tailor@pidgin.im>
author | Nathan Walp <nwalp@pidgin.im> |
---|---|
date | Sat, 12 Nov 2005 16:55:47 +0000 |
parents | 1ec93dd2f359 |
children | 0747647faca1 |
files | src/blist.h |
diffstat | 1 files changed, 48 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/blist.h Sat Nov 12 16:49:10 2005 +0000 +++ b/src/blist.h Sat Nov 12 16:55:47 2005 +0000 @@ -151,10 +151,37 @@ struct _GaimBuddyList { GaimBlistNode *root; /**< The first node in the buddy list */ GHashTable *buddies; /**< Every buddy in this list */ + GaimBlistUiOps *ui_ops; /**< The UI operations for the buddy list */ void *ui_data; /**< UI-specific data. */ }; +/** + * Buddy list UI operations. + * + * Any UI representing a buddy list must assign a filled-out GaimBlistUiOps + * structure to the buddy list core. + */ +struct _GaimBlistUiOps +{ + void (*new_list)(GaimBuddyList *list); /**< Sets UI-specific data on a buddy list. */ + void (*new_node)(GaimBlistNode *node); /**< Sets UI-specific data on a node. */ + void (*show)(GaimBuddyList *list); /**< The core will call this when it's finished doing its core stuff */ + void (*update)(GaimBuddyList *list, + GaimBlistNode *node); /**< This will update a node in the buddy list. */ + void (*remove)(GaimBuddyList *list, + GaimBlistNode *node); /**< This removes a node from the list */ + void (*destroy)(GaimBuddyList *list); /**< When the list gets destroyed, this gets called to destroy the UI. */ + void (*set_visible)(GaimBuddyList *list, + gboolean show); /**< Hides or unhides the buddy list */ + void (*request_add_buddy)(GaimAccount *account, const char *username, + const char *group, const char *alias); + void (*request_add_chat)(GaimAccount *account, GaimGroup *group, + const char *alias, const char *name); + void (*request_add_group)(void); +}; + + struct _GaimBlistNodeAction { char *label; void (*callback)(GaimBlistNode *, gpointer); @@ -827,6 +854,27 @@ /**************************************************************************/ +/** @name UI Registration Functions */ +/**************************************************************************/ +/*@{*/ + +/** + * Sets the UI operations structure to be used for the buddy list. + * + * @param ops The ops struct. + */ +void gaim_blist_set_ui_ops(GaimBlistUiOps *ops); + +/** + * Returns the UI operations structure to be used for the buddy list. + * + * @return The UI operations structure. + */ +GaimBlistUiOps *gaim_blist_get_ui_ops(void); + +/*@}*/ + +/**************************************************************************/ /** @name Buddy List Subsystem */ /**************************************************************************/ /*@{*/