comparison src/blist.h @ 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 980c877bd238
comparison
equal deleted inserted replaced
12053:1ec93dd2f359 12054:2cb1beb9da51
149 * The Buddy List 149 * The Buddy List
150 */ 150 */
151 struct _GaimBuddyList { 151 struct _GaimBuddyList {
152 GaimBlistNode *root; /**< The first node in the buddy list */ 152 GaimBlistNode *root; /**< The first node in the buddy list */
153 GHashTable *buddies; /**< Every buddy in this list */ 153 GHashTable *buddies; /**< Every buddy in this list */
154 GaimBlistUiOps *ui_ops; /**< The UI operations for the buddy list */
154 155
155 void *ui_data; /**< UI-specific data. */ 156 void *ui_data; /**< UI-specific data. */
156 }; 157 };
158
159 /**
160 * Buddy list UI operations.
161 *
162 * Any UI representing a buddy list must assign a filled-out GaimBlistUiOps
163 * structure to the buddy list core.
164 */
165 struct _GaimBlistUiOps
166 {
167 void (*new_list)(GaimBuddyList *list); /**< Sets UI-specific data on a buddy list. */
168 void (*new_node)(GaimBlistNode *node); /**< Sets UI-specific data on a node. */
169 void (*show)(GaimBuddyList *list); /**< The core will call this when it's finished doing its core stuff */
170 void (*update)(GaimBuddyList *list,
171 GaimBlistNode *node); /**< This will update a node in the buddy list. */
172 void (*remove)(GaimBuddyList *list,
173 GaimBlistNode *node); /**< This removes a node from the list */
174 void (*destroy)(GaimBuddyList *list); /**< When the list gets destroyed, this gets called to destroy the UI. */
175 void (*set_visible)(GaimBuddyList *list,
176 gboolean show); /**< Hides or unhides the buddy list */
177 void (*request_add_buddy)(GaimAccount *account, const char *username,
178 const char *group, const char *alias);
179 void (*request_add_chat)(GaimAccount *account, GaimGroup *group,
180 const char *alias, const char *name);
181 void (*request_add_group)(void);
182 };
183
157 184
158 struct _GaimBlistNodeAction { 185 struct _GaimBlistNodeAction {
159 char *label; 186 char *label;
160 void (*callback)(GaimBlistNode *, gpointer); 187 void (*callback)(GaimBlistNode *, gpointer);
161 gpointer data; 188 gpointer data;
825 void (*callback)(GaimBlistNode *, gpointer), gpointer data, 852 void (*callback)(GaimBlistNode *, gpointer), gpointer data,
826 GList *children); 853 GList *children);
827 854
828 855
829 /**************************************************************************/ 856 /**************************************************************************/
857 /** @name UI Registration Functions */
858 /**************************************************************************/
859 /*@{*/
860
861 /**
862 * Sets the UI operations structure to be used for the buddy list.
863 *
864 * @param ops The ops struct.
865 */
866 void gaim_blist_set_ui_ops(GaimBlistUiOps *ops);
867
868 /**
869 * Returns the UI operations structure to be used for the buddy list.
870 *
871 * @return The UI operations structure.
872 */
873 GaimBlistUiOps *gaim_blist_get_ui_ops(void);
874
875 /*@}*/
876
877 /**************************************************************************/
830 /** @name Buddy List Subsystem */ 878 /** @name Buddy List Subsystem */
831 /**************************************************************************/ 879 /**************************************************************************/
832 /*@{*/ 880 /*@{*/
833 881
834 /** 882 /**