Mercurial > pidgin.yaz
annotate src/gtkblist.h @ 10169:a0529cf29ad4
[gaim-migrate @ 11258]
Applying to HEAD.
This should fix bug number 1057811, where typing right before a previously
inserted smiley would lose the formatting. Since smileys aren't text,
the tags weren't getting applied to them (they're child anchors, btw) so
typing right before them picked up this lack of formatting.
So I fixed it by applying tags to child anchors like we do normal text.
committer: Tailor Script <tailor@pidgin.im>
author | Tim Ringenbach <marv@pidgin.im> |
---|---|
date | Thu, 11 Nov 2004 02:26:44 +0000 |
parents | f8e2e8ee9aa0 |
children | 0c985021a1d8 |
rev | line source |
---|---|
5228 | 1 /** |
5248 | 2 * @file gtkblist.h GTK+ Buddy List API |
5228 | 3 * @ingroup gtkui |
4 * | |
5 * gaim | |
6 * | |
8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
5906 | 10 * |
5228 | 11 * This program is free software; you can redistribute it and/or modify |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
24 */ | |
9713 | 25 #ifndef _GAIM_GTKBLIST_H_ |
26 #define _GAIM_GTKBLIST_H_ | |
5228 | 27 |
10008 | 28 typedef struct _GaimGtkBuddyList GaimGtkBuddyList; |
5872
059d95c67cda
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5631
diff
changeset
|
29 |
5228 | 30 enum { |
31 STATUS_ICON_COLUMN, | |
32 STATUS_ICON_VISIBLE_COLUMN, | |
33 NAME_COLUMN, | |
34 WARNING_COLUMN, | |
35 IDLE_COLUMN, | |
36 BUDDY_ICON_COLUMN, | |
37 NODE_COLUMN, | |
38 BLIST_COLUMNS | |
10008 | 39 |
40 }; | |
5228 | 41 |
42 typedef enum { | |
43 GAIM_STATUS_ICON_LARGE, | |
44 GAIM_STATUS_ICON_SMALL | |
7098
770233dad86c
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
45 |
5228 | 46 } GaimStatusIconSize; |
7098
770233dad86c
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
47 |
10008 | 48 #include "gtkgaim.h" |
49 #include "blist.h" | |
50 | |
5228 | 51 /************************************************************************** |
52 * @name Structures | |
53 **************************************************************************/ | |
54 /** | |
55 * Like, everything you need to know about the gtk buddy list | |
56 */ | |
10008 | 57 struct _GaimGtkBuddyList { |
5228 | 58 GtkWidget *window; |
59 GtkWidget *vbox; /**< This is the vbox that everything gets packed into. Your plugin might | |
60 want to pack something in it itself. Go, plugins! */ | |
61 | |
62 GtkWidget *treeview; /**< It's a treeview... d'uh. */ | |
63 GtkTreeStore *treemodel; /**< This is the treemodel. */ | |
6695 | 64 GtkTreeViewColumn *idle_column, |
65 *warning_column, | |
5228 | 66 *buddy_icon_column; |
67 | |
5427 | 68 GtkItemFactory *ift; |
5228 | 69 GtkWidget *bpmenu; /**< The buddy pounce menu. */ |
70 | |
71 guint refresh_timer; /**< The timer for refreshing every 30 seconds */ | |
72 | |
73 guint timeout; /**< The timeout for the tooltip. */ | |
7636 | 74 GdkRectangle tip_rect; /**< This is the bounding rectangle of the |
75 cell we're currently hovering over. This is | |
76 used for tooltips. */ | |
77 GdkRectangle contact_rect; /**< This is the bounding rectangle of the contact node | |
78 and its children. This is used for auto-expand on | |
79 mouseover. */ | |
80 GaimBlistNode *mouseover_contact; /**< This is the contact currently mouse-over expanded */ | |
81 | |
5228 | 82 GtkWidget *tipwindow; /**< The window used by the tooltip */ |
83 | |
84 GaimBlistNode *selected_node; /**< The currently selected node */ | |
85 | |
7304 | 86 GdkPixbuf *east, *south; /**< Drop shadow stuff */ |
87 GdkWindow *east_shadow, *south_shadow; /**< Drop shadow stuff */ | |
88 | |
10008 | 89 }; |
7098
770233dad86c
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
90 |
770233dad86c
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
91 #define GAIM_GTK_BLIST(list) ((GaimGtkBuddyList *)(list)->ui_data) |
5228 | 92 #define GAIM_IS_GTK_BLIST(list) \ |
7035
feb3d21a7794
[gaim-migrate @ 7598]
Christian Hammond <chipx86@chipx86.com>
parents:
6695
diff
changeset
|
93 ((list)->ui_ops == gaim_gtk_blist_get_ui_ops()) |
5228 | 94 |
95 /************************************************************************** | |
5422 | 96 * @name GTK+ Buddy List API |
5228 | 97 **************************************************************************/ |
5906 | 98 |
99 /** | |
8815 | 100 * Get the handle for the GTK+ blist system. |
101 * | |
102 * @return the handle to the blist system | |
103 */ | |
104 void *gaim_gtk_blist_get_handle(); | |
105 | |
106 /** | |
5906 | 107 * Initializes the GTK+ blist system. |
108 */ | |
109 void gaim_gtk_blist_init(void); | |
110 | |
5228 | 111 /** |
8815 | 112 * Uninitializes the GTK+ blist system. |
113 */ | |
114 void gaim_gtk_blist_uninit(void); | |
115 | |
116 /** | |
5228 | 117 * Returns the UI operations structure for the buddy list. |
118 * | |
119 * @return The GTK list operations structure. | |
120 */ | |
7098
770233dad86c
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
121 GaimBlistUiOps *gaim_gtk_blist_get_ui_ops(void); |
5228 | 122 |
123 /** | |
124 * Returns the base image to represent the account, based on the currently selected theme | |
125 * | |
126 * @param account The account. | |
6695 | 127 * |
5228 | 128 * @return The icon |
129 */ | |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5427
diff
changeset
|
130 GdkPixbuf *create_prpl_icon(GaimAccount *account); |
5228 | 131 |
132 /** | |
9774 | 133 * Populates a menu with the items shown on the buddy list for a buddy. |
134 * | |
135 * @param menu The menu to populate | |
136 * @param buddy The buddy who's menu to get | |
137 */ | |
138 void gaim_gtk_blist_make_buddy_menu(GtkWidget *menu, GaimBuddy *buddy); | |
139 | |
140 /** | |
5228 | 141 * Refreshes all the nodes of the buddy list. |
142 * This should only be called when something changes to affect most of the nodes (such as a ui preference changing) | |
143 * | |
144 * @param list This is the core list that gets updated from | |
145 */ | |
7098
770233dad86c
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
146 void gaim_gtk_blist_refresh(GaimBuddyList *list); |
5228 | 147 |
148 /** | |
149 * Tells the buddy list to update its toolbar based on the preferences | |
150 * | |
151 */ | |
152 void gaim_gtk_blist_update_toolbar(); | |
153 | |
154 /** | |
155 * Useful for the docklet plugin and also for the win32 tray icon | |
6695 | 156 * This is called when one of those is clicked--it will show/hide the |
157 * buddy list/login window--depending on which is active | |
5228 | 158 */ |
159 void gaim_gtk_blist_docklet_toggle(); | |
160 void gaim_gtk_blist_docklet_add(); | |
161 void gaim_gtk_blist_docklet_remove(); | |
162 void gaim_gtk_blist_update_columns(); | |
5411 | 163 void gaim_gtk_blist_update_refresh_timeout(); |
5228 | 164 |
165 /** | |
166 * Useful for the buddy ticker | |
167 */ | |
5234 | 168 GdkPixbuf *gaim_gtk_blist_get_status_icon(GaimBlistNode *node, |
5228 | 169 GaimStatusIconSize size); |
170 | |
5422 | 171 /************************************************************************** |
172 * @name GTK+ Buddy List sorting functions | |
173 **************************************************************************/ | |
174 | |
7098
770233dad86c
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
175 typedef GtkTreeIter (*gaim_gtk_blist_sort_function)(GaimBlistNode *new, GaimBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur); |
5422 | 176 |
177 extern GSList *gaim_gtk_blist_sort_methods; | |
178 | |
179 struct gaim_gtk_blist_sort_method { | |
5631 | 180 char *id; |
5422 | 181 char *name; |
182 gaim_gtk_blist_sort_function func; | |
183 }; | |
184 | |
185 /** | |
186 * Registers a buddy list sorting method. | |
187 * | |
5631 | 188 * @param id The unique ID of the sorting method |
5422 | 189 * @param name The method's name. |
190 * @param func A pointer to the function. | |
191 * | |
192 */ | |
5631 | 193 void gaim_gtk_blist_sort_method_reg(const char *id, const char *name, gaim_gtk_blist_sort_function func); |
5422 | 194 |
195 /** | |
196 * Unregisters a buddy list sorting method. | |
197 * | |
5631 | 198 * @param id The method's id |
5422 | 199 */ |
5631 | 200 void gaim_gtk_blist_sort_method_unreg(const char *id); |
5422 | 201 |
202 /** | |
203 * Sets a buddy list sorting method. | |
204 * | |
5631 | 205 * @param id The method's id. |
5422 | 206 */ |
5631 | 207 void gaim_gtk_blist_sort_method_set(const char *id); |
5422 | 208 |
209 /** | |
210 * Sets up the programs default sort methods | |
211 */ | |
212 void gaim_gtk_blist_setup_sort_methods(); | |
213 | |
5936
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
214 /** |
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
215 * Updates the protocol actions menu on the GTK+ buddy list window. |
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
216 */ |
1b56a833d665
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
217 void gaim_gtk_blist_update_protocol_actions(); |
5422 | 218 |
8305
57bdd25752c1
[gaim-migrate @ 9029]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
219 /** |
8986 | 220 * Updates the plugin actions menu on the GTK+ buddy list window. |
221 */ | |
222 void gaim_gtk_blist_update_plugin_actions(); | |
223 | |
224 /** | |
8940 | 225 * Determines if showing the join chat dialog is a valid action. |
226 * | |
227 * @return Returns TRUE if there are accounts online capable of | |
228 * joining chat rooms. Otherwise returns FALSE. | |
8305
57bdd25752c1
[gaim-migrate @ 9029]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
229 */ |
8940 | 230 gboolean gaim_gtk_blist_joinchat_is_showable(void); |
231 | |
232 /** | |
233 * Shows the join chat dialog. | |
234 */ | |
235 void gaim_gtk_blist_joinchat_show(void); | |
5422 | 236 |
9051 | 237 /** |
238 * Appends the protocol specific menu items for a GaimBlistNode | |
239 */ | |
240 void gaim_gtk_append_blist_node_proto_menu (GtkWidget *menu, GaimConnection *gc, GaimBlistNode *node); | |
241 | |
242 /** | |
243 * Appends the extended menu items for a GaimBlistNode | |
244 */ | |
245 void gaim_gtk_append_blist_node_extended_menu(GtkWidget *menu, GaimBlistNode *node); | |
246 | |
9713 | 247 #endif /* _GAIM_GTKBLIST_H_ */ |