Mercurial > pidgin
annotate src/gtkblist.h @ 6590:edda487ef5df
[gaim-migrate @ 7114]
Remove this file. It's not used.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Sun, 24 Aug 2003 01:57:38 +0000 |
parents | 1b56a833d665 |
children | 0c5637b5462e |
rev | line source |
---|---|
5228 | 1 /** |
5248 | 2 * @file gtkblist.h GTK+ Buddy List API |
5228 | 3 * @ingroup gtkui |
4 * | |
5 * gaim | |
6 * | |
7 * Copyright (C) 2002-2003, Sean Egan <sean.egan@binghamton.edu> | |
5906 | 8 * |
5228 | 9 * This program is free software; you can redistribute it and/or modify |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
23 | |
24 #ifndef _GAIM_GTK_LIST_H_ | |
25 #define _GAIM_GTK_LIST_H_ | |
26 | |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5631
diff
changeset
|
27 #include "blist.h" |
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5631
diff
changeset
|
28 |
5228 | 29 enum { |
30 STATUS_ICON_COLUMN, | |
31 STATUS_ICON_VISIBLE_COLUMN, | |
32 NAME_COLUMN, | |
33 WARNING_COLUMN, | |
34 IDLE_COLUMN, | |
35 BUDDY_ICON_COLUMN, | |
36 NODE_COLUMN, | |
37 BLIST_COLUMNS | |
38 }; | |
39 | |
40 typedef enum { | |
41 GAIM_STATUS_ICON_LARGE, | |
42 GAIM_STATUS_ICON_SMALL | |
43 } GaimStatusIconSize; | |
44 /************************************************************************** | |
45 * @name Structures | |
46 **************************************************************************/ | |
47 /** | |
48 * Like, everything you need to know about the gtk buddy list | |
49 */ | |
50 struct gaim_gtk_buddy_list { | |
51 GtkWidget *window; | |
52 GtkWidget *vbox; /**< This is the vbox that everything gets packed into. Your plugin might | |
53 want to pack something in it itself. Go, plugins! */ | |
54 | |
55 GtkWidget *treeview; /**< It's a treeview... d'uh. */ | |
56 GtkTreeStore *treemodel; /**< This is the treemodel. */ | |
57 GtkTreeViewColumn *idle_column, | |
58 *warning_column, | |
59 *buddy_icon_column; | |
60 | |
5427 | 61 GtkItemFactory *ift; |
5228 | 62 GtkWidget *bpmenu; /**< The buddy pounce menu. */ |
63 | |
64 GtkWidget *bbox; /**< A Button Box. */ | |
65 GtkTooltips *tooltips; /**< Tooltips for the buttons. */ | |
66 | |
67 guint refresh_timer; /**< The timer for refreshing every 30 seconds */ | |
68 | |
69 guint timeout; /**< The timeout for the tooltip. */ | |
70 GdkRectangle rect; /**< This is the bounding rectangle of the | |
71 cell we're currently hovering over. This is | |
72 used for tooltips. */ | |
73 GtkWidget *tipwindow; /**< The window used by the tooltip */ | |
74 | |
75 GaimBlistNode *selected_node; /**< The currently selected node */ | |
76 }; | |
77 | |
78 #define GAIM_GTK_BLIST(list) ((struct gaim_gtk_buddy_list *)(list)->ui_data) | |
79 #define GAIM_IS_GTK_BLIST(list) \ | |
80 ((list)->ui_ops == gaim_get_gtk_blist_ui_ops()) | |
81 | |
82 /************************************************************************** | |
5422 | 83 * @name GTK+ Buddy List API |
5228 | 84 **************************************************************************/ |
5906 | 85 |
86 /** | |
87 * Initializes the GTK+ blist system. | |
88 */ | |
89 void gaim_gtk_blist_init(void); | |
90 | |
5228 | 91 /** |
92 * Returns the UI operations structure for the buddy list. | |
93 * | |
94 * @return The GTK list operations structure. | |
95 */ | |
96 struct gaim_blist_ui_ops *gaim_get_gtk_blist_ui_ops(void); | |
97 | |
98 /** | |
99 * Returns the base image to represent the account, based on the currently selected theme | |
100 * | |
101 * @param account The account. | |
102 * | |
103 * @return The icon | |
104 */ | |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5427
diff
changeset
|
105 GdkPixbuf *create_prpl_icon(GaimAccount *account); |
5228 | 106 |
107 /** | |
108 * Refreshes all the nodes of the buddy list. | |
109 * This should only be called when something changes to affect most of the nodes (such as a ui preference changing) | |
110 * | |
111 * @param list This is the core list that gets updated from | |
112 */ | |
113 void gaim_gtk_blist_refresh(struct gaim_buddy_list *list); | |
114 | |
115 /** | |
116 * Tells the buddy list to update its toolbar based on the preferences | |
117 * | |
118 */ | |
119 void gaim_gtk_blist_update_toolbar(); | |
120 | |
121 /** | |
122 * Useful for the docklet plugin and also for the win32 tray icon | |
123 * This is called when one of those is clicked--it will show/hide the | |
124 * buddy list/login window--depending on which is active | |
125 */ | |
126 void gaim_gtk_blist_docklet_toggle(); | |
127 void gaim_gtk_blist_docklet_add(); | |
128 void gaim_gtk_blist_docklet_remove(); | |
129 void gaim_gtk_blist_update_columns(); | |
5411 | 130 void gaim_gtk_blist_update_refresh_timeout(); |
5228 | 131 |
132 /** | |
133 * Useful for the buddy ticker | |
134 */ | |
5234 | 135 GdkPixbuf *gaim_gtk_blist_get_status_icon(GaimBlistNode *node, |
5228 | 136 GaimStatusIconSize size); |
137 | |
5422 | 138 /************************************************************************** |
139 * @name GTK+ Buddy List sorting functions | |
140 **************************************************************************/ | |
141 | |
142 typedef GtkTreeIter (*gaim_gtk_blist_sort_function)(GaimBlistNode *new, struct gaim_buddy_list *blist, GtkTreeIter group, GtkTreeIter *cur); | |
143 | |
144 extern GSList *gaim_gtk_blist_sort_methods; | |
145 | |
146 struct gaim_gtk_blist_sort_method { | |
5631 | 147 char *id; |
5422 | 148 char *name; |
149 gaim_gtk_blist_sort_function func; | |
150 }; | |
151 | |
152 /** | |
153 * Registers a buddy list sorting method. | |
154 * | |
5631 | 155 * @param id The unique ID of the sorting method |
5422 | 156 * @param name The method's name. |
157 * @param func A pointer to the function. | |
158 * | |
159 */ | |
5631 | 160 void gaim_gtk_blist_sort_method_reg(const char *id, const char *name, gaim_gtk_blist_sort_function func); |
5422 | 161 |
162 /** | |
163 * Unregisters a buddy list sorting method. | |
164 * | |
5631 | 165 * @param id The method's id |
5422 | 166 */ |
5631 | 167 void gaim_gtk_blist_sort_method_unreg(const char *id); |
5422 | 168 |
169 /** | |
170 * Sets a buddy list sorting method. | |
171 * | |
5631 | 172 * @param id The method's id. |
5422 | 173 */ |
5631 | 174 void gaim_gtk_blist_sort_method_set(const char *id); |
5422 | 175 |
176 /** | |
177 * Sets up the programs default sort methods | |
178 */ | |
179 void gaim_gtk_blist_setup_sort_methods(); | |
180 | |
5936
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
181 /** |
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
182 * Updates the protocol actions menu on the GTK+ buddy list window. |
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
183 */ |
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
184 void gaim_gtk_blist_update_protocol_actions(); |
5422 | 185 |
186 | |
5228 | 187 #endif /* _GAIM_GTK_LIST_H_ */ |