gtkblist.h
Go to the documentation of this file.00001
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _PIDGINBLIST_H_
00028 #define _PIDGINBLIST_H_
00029
00030 typedef struct _PidginBuddyList PidginBuddyList;
00031
00032 enum {
00033 STATUS_ICON_COLUMN,
00034 STATUS_ICON_VISIBLE_COLUMN,
00035 NAME_COLUMN,
00036 IDLE_COLUMN,
00037 IDLE_VISIBLE_COLUMN,
00038 BUDDY_ICON_COLUMN,
00039 BUDDY_ICON_VISIBLE_COLUMN,
00040 NODE_COLUMN,
00041 BGCOLOR_COLUMN,
00042 GROUP_EXPANDER_COLUMN,
00043 GROUP_EXPANDER_VISIBLE_COLUMN,
00044 CONTACT_EXPANDER_COLUMN,
00045 CONTACT_EXPANDER_VISIBLE_COLUMN,
00046 EMBLEM_COLUMN,
00047 EMBLEM_VISIBLE_COLUMN,
00048 PROTOCOL_ICON_COLUMN,
00049 PROTOCOL_ICON_VISIBLE_COLUMN,
00050 BLIST_COLUMNS
00051
00052 };
00053
00054 typedef enum {
00055 PIDGIN_STATUS_ICON_LARGE,
00056 PIDGIN_STATUS_ICON_SMALL
00057
00058 } PidginStatusIconSize;
00059
00060 #include "pidgin.h"
00061 #include "blist.h"
00062
00063
00064
00065
00069 struct _PidginBuddyList {
00070 GtkWidget *window;
00071 GtkWidget *notebook;
00073 GtkWidget *main_vbox;
00074 GtkWidget *vbox;
00077 GtkWidget *treeview;
00078 GtkTreeStore *treemodel;
00079 GtkTreeViewColumn *text_column;
00081 GtkCellRenderer *text_rend;
00082
00083 GtkItemFactory *ift;
00084 GtkWidget *menutray;
00085 GtkWidget *menutrayicon;
00094 GHashTable *connection_errors;
00095
00096 guint refresh_timer;
00098 guint timeout;
00099 guint drag_timeout;
00100 GdkRectangle tip_rect;
00103 GdkRectangle contact_rect;
00106 PurpleBlistNode *mouseover_contact;
00108 GtkWidget *tipwindow;
00109 GList *tooltipdata;
00111 PurpleBlistNode *selected_node;
00113 GdkCursor *hand_cursor;
00114 GdkCursor *arrow_cursor;
00116 GtkWidget *scrollbook;
00117 GtkWidget *headline_hbox;
00118 GtkWidget *headline_label;
00119 GtkWidget *headline_image;
00120 GdkPixbuf *headline_close;
00121 GCallback headline_callback;
00122 gpointer headline_data;
00123 GDestroyNotify headline_destroy;
00124 gboolean changing_style;
00126 GtkWidget *error_buttons;
00127 GtkWidget *statusbox;
00128 GdkPixbuf *empty_avatar;
00130 gpointer priv;
00131 };
00132
00133 #define PIDGIN_BLIST(list) ((PidginBuddyList *)(list)->ui_data)
00134 #define PIDGIN_IS_PIDGIN_BLIST(list) \
00135 ((list)->ui_ops == pidgin_blist_get_ui_ops())
00136
00137
00138
00139
00140
00146 void *pidgin_blist_get_handle(void);
00147
00151 void pidgin_blist_init(void);
00152
00156 void pidgin_blist_uninit(void);
00157
00163 PurpleBlistUiOps *pidgin_blist_get_ui_ops(void);
00164
00174 PidginBuddyList *pidgin_blist_get_default_gtk_blist(void);
00175
00183 void pidgin_blist_make_buddy_menu(GtkWidget *menu, PurpleBuddy *buddy, gboolean sub);
00184
00191 void pidgin_blist_refresh(PurpleBuddyList *list);
00192
00193 void pidgin_blist_update_columns(void);
00194 void pidgin_blist_update_refresh_timeout(void);
00195
00203 GdkPixbuf *
00204 pidgin_blist_get_emblem(PurpleBlistNode *node);
00205
00209 GdkPixbuf *pidgin_blist_get_status_icon(PurpleBlistNode *node,
00210 PidginStatusIconSize size);
00211
00221 gboolean pidgin_blist_node_is_contact_expanded(PurpleBlistNode *node);
00222
00228 void pidgin_blist_toggle_visibility(void);
00229
00238 void pidgin_blist_visibility_manager_add(void);
00239
00244 void pidgin_blist_visibility_manager_remove(void);
00245
00251 void pidgin_blist_add_alert(GtkWidget *widget);
00252
00253
00254
00255
00256
00257
00258 typedef void (*pidgin_blist_sort_function)(PurpleBlistNode *new, PurpleBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur, GtkTreeIter *iter);
00259
00265 GList *pidgin_blist_get_sort_methods(void);
00266
00267 struct pidgin_blist_sort_method {
00268 char *id;
00269 char *name;
00270 pidgin_blist_sort_function func;
00271 };
00272
00273 typedef struct pidgin_blist_sort_method PidginBlistSortMethod;
00274
00283 void pidgin_blist_sort_method_reg(const char *id, const char *name, pidgin_blist_sort_function func);
00284
00290 void pidgin_blist_sort_method_unreg(const char *id);
00291
00297 void pidgin_blist_sort_method_set(const char *id);
00298
00302 void pidgin_blist_setup_sort_methods(void);
00303
00307 void pidgin_blist_update_accounts_menu(void);
00308
00312 void pidgin_blist_update_plugin_actions(void);
00313
00317 void pidgin_blist_update_sort_methods(void);
00318
00325 gboolean pidgin_blist_joinchat_is_showable(void);
00326
00330 void pidgin_blist_joinchat_show(void);
00331
00336 void pidgin_append_blist_node_privacy_menu(GtkWidget *menu, PurpleBlistNode *node);
00337
00342 void pidgin_append_blist_node_proto_menu (GtkWidget *menu, PurpleConnection *gc, PurpleBlistNode *node);
00343
00348 void pidgin_append_blist_node_extended_menu(GtkWidget *menu, PurpleBlistNode *node);
00349
00362 void pidgin_blist_update_account_error_state(PurpleAccount *account, const char *message);
00363
00376 void pidgin_blist_set_headline(const char *text, GdkPixbuf *pixbuf, GCallback callback, gpointer user_data,
00377 GDestroyNotify destroy);
00378
00389 gchar *pidgin_blist_get_name_markup(PurpleBuddy *buddy, gboolean selected, gboolean aliased);
00390
00402 void pidgin_blist_draw_tooltip(PurpleBlistNode *node, GtkWidget *widget);
00403
00409 void pidgin_blist_tooltip_destroy(void);
00410
00411
00412 #endif