Wed, 21 Mar 2007 09:00:54 +0000
Re-sed the copyright notices so they don't all talk about Purple.
| 5228 | 1 | /** |
|
5248
f4f944f4dbe0
[gaim-migrate @ 5620]
Mark Doliner <markdoliner@pidgin.im>
parents:
5234
diff
changeset
|
2 | * @file gtkblist.h GTK+ Buddy List API |
| 5228 | 3 | * @ingroup gtkui |
| 4 | * | |
|
15931
716b5fac1895
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@pidgin.im>
parents:
15884
diff
changeset
|
5 | * pidgin |
| 5228 | 6 | * |
| 15572 | 7 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 8046 | 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 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
25 | #ifndef _PIDGINBLIST_H_ |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
26 | #define _PIDGINBLIST_H_ |
| 5228 | 27 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
28 | typedef struct _PidginBuddyList PidginBuddyList; |
|
5872
754c63f29b77
[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 | IDLE_COLUMN, | |
| 14471 | 35 | IDLE_VISIBLE_COLUMN, |
| 5228 | 36 | BUDDY_ICON_COLUMN, |
| 14471 | 37 | BUDDY_ICON_VISIBLE_COLUMN, |
| 5228 | 38 | NODE_COLUMN, |
| 14471 | 39 | BGCOLOR_COLUMN, |
| 40 | GROUP_EXPANDER_COLUMN, | |
| 41 | CONTACT_EXPANDER_COLUMN, | |
| 42 | CONTACT_EXPANDER_VISIBLE_COLUMN, | |
| 15524 | 43 | EMBLEM_COLUMN, |
| 44 | EMBLEM_VISIBLE_COLUMN, | |
| 5228 | 45 | BLIST_COLUMNS |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
46 | |
|
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
47 | }; |
| 5228 | 48 | |
| 49 | typedef enum { | |
|
15569
e85adc8d3b5c
gtkblist changes to pidgin
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
50 | PIDGIN_STATUS_ICON_LARGE, |
|
e85adc8d3b5c
gtkblist changes to pidgin
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
51 | PIDGIN_STATUS_ICON_SMALL |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
52 | |
|
15569
e85adc8d3b5c
gtkblist changes to pidgin
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
53 | } PidginStatusIconSize; |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
54 | |
| 15577 | 55 | #include "pidgin.h" |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
56 | #include "blist.h" |
|
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
57 | |
| 5228 | 58 | /************************************************************************** |
| 59 | * @name Structures | |
| 60 | **************************************************************************/ | |
| 61 | /** | |
| 62 | * Like, everything you need to know about the gtk buddy list | |
| 63 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
64 | struct _PidginBuddyList { |
| 5228 | 65 | GtkWidget *window; |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
66 | GtkWidget *notebook; /**< The notebook that switches between the real buddy list and the helpful |
| 15086 | 67 | instructions page */ |
| 68 | GtkWidget *main_vbox; /**< This vbox contains the menu and notebook */ | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
69 | GtkWidget *vbox; /**< This is the vbox that everything important gets packed into. |
| 15086 | 70 | Your plugin might want to pack something in it itself. Go, plugins! */ |
| 5228 | 71 | |
| 72 | GtkWidget *treeview; /**< It's a treeview... d'uh. */ | |
| 73 | GtkTreeStore *treemodel; /**< This is the treemodel. */ | |
| 14518 | 74 | GtkTreeViewColumn *text_column; /**< Column */ |
| 11016 | 75 | |
| 76 | GtkCellRenderer *text_rend; | |
| 5228 | 77 | |
|
5427
a45fa07ef20d
[gaim-migrate @ 5806]
Mark Doliner <markdoliner@pidgin.im>
parents:
5422
diff
changeset
|
78 | GtkItemFactory *ift; |
|
12116
17bf39d2678f
[gaim-migrate @ 14416]
Casey Harkins <charkins@pidgin.im>
parents:
12080
diff
changeset
|
79 | GtkWidget *menutray; /**< The menu tray widget. */ |
|
17bf39d2678f
[gaim-migrate @ 14416]
Casey Harkins <charkins@pidgin.im>
parents:
12080
diff
changeset
|
80 | GtkWidget *menutrayicon; /**< The menu tray icon. */ |
| 5228 | 81 | |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
82 | GHashTable *connection_errors; /**< Caches connection error messages and accounts. */ |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
83 | |
| 5228 | 84 | guint refresh_timer; /**< The timer for refreshing every 30 seconds */ |
| 85 | ||
| 86 | guint timeout; /**< The timeout for the tooltip. */ | |
| 10354 | 87 | guint drag_timeout; /**< The timeout for expanding contacts on drags */ |
| 7636 | 88 | GdkRectangle tip_rect; /**< This is the bounding rectangle of the |
| 89 | cell we're currently hovering over. This is | |
| 90 | used for tooltips. */ | |
| 91 | GdkRectangle contact_rect; /**< This is the bounding rectangle of the contact node | |
| 92 | and its children. This is used for auto-expand on | |
| 93 | mouseover. */ | |
| 15884 | 94 | PurpleBlistNode *mouseover_contact; /**< This is the contact currently mouse-over expanded */ |
| 7636 | 95 | |
| 5228 | 96 | GtkWidget *tipwindow; /**< The window used by the tooltip */ |
| 11890 | 97 | GList *tooltipdata; /**< The data for each "chunk" of the tooltip */ |
| 5228 | 98 | |
| 15884 | 99 | PurpleBlistNode *selected_node; /**< The currently selected node */ |
| 15243 | 100 | |
| 101 | GdkCursor *hand_cursor; /**< Hand cursor */ | |
| 102 | GdkCursor *arrow_cursor; /**< Arrow cursor */ | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
103 | |
| 15094 | 104 | GtkWidget *scrollbook; /**< Scrollbook for alerts */ |
| 15243 | 105 | GtkWidget *headline_hbox; /**< Hbox for headline notification */ |
| 106 | GtkWidget *headline_label; /**< Label for headline notifications */ | |
| 107 | GtkWidget *headline_image; /**< Image for headline notifications */ | |
|
15300
454ddc38e700
[gaim-migrate @ 18028]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15246
diff
changeset
|
108 | GdkPixbuf *headline_close; /**< Close image for closing the headline without triggering the callback */ |
| 15243 | 109 | GCallback headline_callback; /**< Callback for headline notifications */ |
| 110 | gpointer headline_data; /**< User data for headline notifications */ | |
|
15386
2cfff7893ed0
[gaim-migrate @ 18115]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15380
diff
changeset
|
111 | GDestroyNotify headline_destroy; /**< Callback to use for destroying the headline-data */ |
| 15246 | 112 | gboolean changing_style; /**< True when changing GTK+ theme style */ |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
113 | |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
114 | GtkWidget *error_buttons; /**< Box containing the connection error buttons */ |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
115 | GtkWidget *statusbox; /**< The status selector dropdown */ |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
116 | GdkPixbuf *empty_avatar; /**< A 32x32 transparent pixbuf */ |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
117 | }; |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
118 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
119 | #define PIDGIN_BLIST(list) ((PidginBuddyList *)(list)->ui_data) |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
120 | #define PIDGIN_IS_PIDGIN_BLIST(list) \ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
121 | ((list)->ui_ops == pidgin_blist_get_ui_ops()) |
| 5228 | 122 | |
| 123 | /************************************************************************** | |
| 5422 | 124 | * @name GTK+ Buddy List API |
| 5228 | 125 | **************************************************************************/ |
| 5906 | 126 | |
| 127 | /** | |
| 8815 | 128 | * Get the handle for the GTK+ blist system. |
| 129 | * | |
| 130 | * @return the handle to the blist system | |
| 131 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
132 | void *pidgin_blist_get_handle(void); |
| 8815 | 133 | |
| 134 | /** | |
| 5906 | 135 | * Initializes the GTK+ blist system. |
| 136 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
137 | void pidgin_blist_init(void); |
| 5906 | 138 | |
| 5228 | 139 | /** |
| 8815 | 140 | * Uninitializes the GTK+ blist system. |
| 141 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
142 | void pidgin_blist_uninit(void); |
| 8815 | 143 | |
| 144 | /** | |
| 5228 | 145 | * Returns the UI operations structure for the buddy list. |
| 146 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10643
diff
changeset
|
147 | * @return The GTK+ list operations structure. |
| 5228 | 148 | */ |
| 15884 | 149 | PurpleBlistUiOps *pidgin_blist_get_ui_ops(void); |
| 5228 | 150 | |
| 151 | /** | |
| 10643 | 152 | * Returns the default gtk buddy list |
| 11732 | 153 | * |
| 10643 | 154 | * There's normally only one buddy list window, but that isn't a necessity. This function |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
155 | * returns the PidginBuddyList we're most likely wanting to work with. This is slightly |
| 10643 | 156 | * cleaner than an externed global. |
| 11732 | 157 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10643
diff
changeset
|
158 | * @return The default GTK+ buddy list |
| 10643 | 159 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
160 | PidginBuddyList *pidgin_blist_get_default_gtk_blist(void); |
| 10643 | 161 | |
| 162 | /** | |
| 9774 | 163 | * Populates a menu with the items shown on the buddy list for a buddy. |
| 164 | * | |
| 165 | * @param menu The menu to populate | |
|
14200
799dfae258cf
[gaim-migrate @ 16780]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13015
diff
changeset
|
166 | * @param buddy The buddy whose menu to get |
| 10484 | 167 | * @param sub TRUE if this is a sub-menu, FALSE otherwise |
| 9774 | 168 | */ |
| 15884 | 169 | void pidgin_blist_make_buddy_menu(GtkWidget *menu, PurpleBuddy *buddy, gboolean sub); |
| 9774 | 170 | |
| 171 | /** | |
| 5228 | 172 | * Refreshes all the nodes of the buddy list. |
| 173 | * This should only be called when something changes to affect most of the nodes (such as a ui preference changing) | |
| 174 | * | |
| 175 | * @param list This is the core list that gets updated from | |
| 176 | */ | |
| 15884 | 177 | void pidgin_blist_refresh(PurpleBuddyList *list); |
| 5228 | 178 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
179 | void pidgin_blist_update_columns(void); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
180 | void pidgin_blist_update_refresh_timeout(void); |
| 5228 | 181 | |
| 182 | /** | |
| 15524 | 183 | * Returns the blist emblem |
| 184 | * | |
| 185 | * @param node The node to return an emblem for | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
186 | * |
| 15524 | 187 | * @return A newly created GdkPixbuf, or NULL |
| 188 | */ | |
| 189 | GdkPixbuf * | |
| 15884 | 190 | pidgin_blist_get_emblem(PurpleBlistNode *node); |
| 15524 | 191 | |
| 192 | /** | |
| 5228 | 193 | * Useful for the buddy ticker |
| 194 | */ | |
| 15884 | 195 | GdkPixbuf *pidgin_blist_get_status_icon(PurpleBlistNode *node, |
|
15569
e85adc8d3b5c
gtkblist changes to pidgin
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
196 | PidginStatusIconSize size); |
| 5228 | 197 | |
|
11018
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
198 | /** |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
199 | * Returns a boolean indicating if @a node is part of an expanded contact. |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
200 | * |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
201 | * This only makes sense for contact and buddy nodes. @c FALSE is returned |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
202 | * for other types of nodes. |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
203 | * |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
204 | * @param node The node in question. |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
205 | * @return A boolean indicating if @a node is part of an expanded contact. |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
206 | */ |
| 15884 | 207 | gboolean pidgin_blist_node_is_contact_expanded(PurpleBlistNode *node); |
|
11018
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
208 | |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
209 | /** |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
210 | * Intelligently toggles the visibility of the buddy list. If the buddy |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
211 | * list is obscured, it is brought to the front. If it is not obscured, |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
212 | * it is hidden. If it is hidden it is shown. |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
213 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
214 | void pidgin_blist_toggle_visibility(void); |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
215 | |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
216 | /** |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
217 | * Increases the reference count of visibility managers. Callers should |
|
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
218 | * call the complementary remove function when no longer managing |
|
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
219 | * visibility. |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
220 | * |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
221 | * A visibility manager is something that provides some method for |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
222 | * showing the buddy list after it is hidden (e.g. docklet plugin). |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
223 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
224 | void pidgin_blist_visibility_manager_add(void); |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
225 | |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
226 | /** |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
227 | * Decreases the reference count of visibility managers. If the count |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
228 | * drops below zero, the buddy list is shown. |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
229 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
230 | void pidgin_blist_visibility_manager_remove(void); |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
231 | |
| 15094 | 232 | /** |
| 233 | * Adds a mini-alert to the blist scrollbook | |
| 234 | * | |
| 235 | * @param widget The widget to add | |
| 236 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
237 | void pidgin_blist_add_alert(GtkWidget *widget); |
| 15094 | 238 | |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
239 | |
| 5422 | 240 | /************************************************************************** |
| 241 | * @name GTK+ Buddy List sorting functions | |
| 242 | **************************************************************************/ | |
| 243 | ||
| 15884 | 244 | typedef void (*pidgin_blist_sort_function)(PurpleBlistNode *new, PurpleBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur, GtkTreeIter *iter); |
| 5422 | 245 | |
| 11796 | 246 | /** |
| 247 | * Gets the current list of sort methods. | |
| 248 | * | |
| 249 | * @return A GSlist of sort methods | |
| 250 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
251 | GList *pidgin_blist_get_sort_methods(void); |
| 5422 | 252 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
253 | struct pidgin_blist_sort_method { |
| 5631 | 254 | char *id; |
| 5422 | 255 | char *name; |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
256 | pidgin_blist_sort_function func; |
| 5422 | 257 | }; |
| 258 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
259 | typedef struct pidgin_blist_sort_method PidginBlistSortMethod; |
| 11796 | 260 | |
| 5422 | 261 | /** |
| 262 | * Registers a buddy list sorting method. | |
| 263 | * | |
| 5631 | 264 | * @param id The unique ID of the sorting method |
| 5422 | 265 | * @param name The method's name. |
| 266 | * @param func A pointer to the function. | |
| 267 | * | |
| 268 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
269 | void pidgin_blist_sort_method_reg(const char *id, const char *name, pidgin_blist_sort_function func); |
| 5422 | 270 | |
| 271 | /** | |
| 272 | * Unregisters a buddy list sorting method. | |
| 273 | * | |
| 5631 | 274 | * @param id The method's id |
| 5422 | 275 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
276 | void pidgin_blist_sort_method_unreg(const char *id); |
| 5422 | 277 | |
| 278 | /** | |
| 279 | * Sets a buddy list sorting method. | |
| 280 | * | |
| 5631 | 281 | * @param id The method's id. |
| 5422 | 282 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
283 | void pidgin_blist_sort_method_set(const char *id); |
| 5422 | 284 | |
| 285 | /** | |
| 286 | * Sets up the programs default sort methods | |
| 287 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
288 | void pidgin_blist_setup_sort_methods(void); |
| 5422 | 289 | |
|
5936
4bac764cc792
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
290 | /** |
| 12296 | 291 | * Updates the accounts menu on the GTK+ buddy list window. |
|
5936
4bac764cc792
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
292 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
293 | void pidgin_blist_update_accounts_menu(void); |
| 5422 | 294 | |
|
8305
5a6d1168a8b3
[gaim-migrate @ 9029]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
295 | /** |
|
8986
30ba617356bb
[gaim-migrate @ 9761]
Christopher O'Brien <siege@pidgin.im>
parents:
8940
diff
changeset
|
296 | * Updates the plugin actions menu on the GTK+ buddy list window. |
|
30ba617356bb
[gaim-migrate @ 9761]
Christopher O'Brien <siege@pidgin.im>
parents:
8940
diff
changeset
|
297 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
298 | void pidgin_blist_update_plugin_actions(void); |
|
8986
30ba617356bb
[gaim-migrate @ 9761]
Christopher O'Brien <siege@pidgin.im>
parents:
8940
diff
changeset
|
299 | |
|
30ba617356bb
[gaim-migrate @ 9761]
Christopher O'Brien <siege@pidgin.im>
parents:
8940
diff
changeset
|
300 | /** |
| 11796 | 301 | * Updates the Sorting menu on the GTK+ buddy list window. |
| 302 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
303 | void pidgin_blist_update_sort_methods(void); |
| 11796 | 304 | |
| 305 | /** | |
|
8940
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
306 | * Determines if showing the join chat dialog is a valid action. |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
307 | * |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
308 | * @return Returns TRUE if there are accounts online capable of |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
309 | * joining chat rooms. Otherwise returns FALSE. |
|
8305
5a6d1168a8b3
[gaim-migrate @ 9029]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
310 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
311 | gboolean pidgin_blist_joinchat_is_showable(void); |
|
8940
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
312 | |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
313 | /** |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
314 | * Shows the join chat dialog. |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
315 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
316 | void pidgin_blist_joinchat_show(void); |
| 5422 | 317 | |
| 9051 | 318 | /** |
| 15884 | 319 | * Appends the privacy menu items for a PurpleBlistNode |
|
15380
1171796358b3
[gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15300
diff
changeset
|
320 | * TODO: Rename these. |
|
1171796358b3
[gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15300
diff
changeset
|
321 | */ |
| 15884 | 322 | void pidgin_append_blist_node_privacy_menu(GtkWidget *menu, PurpleBlistNode *node); |
|
15380
1171796358b3
[gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15300
diff
changeset
|
323 | |
|
1171796358b3
[gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15300
diff
changeset
|
324 | /** |
| 15884 | 325 | * Appends the protocol specific menu items for a PurpleBlistNode |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
326 | * TODO: Rename these. |
| 9051 | 327 | */ |
| 15884 | 328 | void pidgin_append_blist_node_proto_menu (GtkWidget *menu, PurpleConnection *gc, PurpleBlistNode *node); |
| 9051 | 329 | |
| 330 | /** | |
| 15884 | 331 | * Appends the extended menu items for a PurpleBlistNode |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
332 | * TODO: Rename these. |
| 9051 | 333 | */ |
| 15884 | 334 | void pidgin_append_blist_node_extended_menu(GtkWidget *menu, PurpleBlistNode *node); |
| 9051 | 335 | |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
336 | /** |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
337 | * Used by the connection API to tell the blist if an account |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
338 | * has a connection error or no longer has a connection error. |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
339 | * |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
340 | * @param account The account that either has a connection error |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
341 | * or no longer has a connection error. |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
342 | * @param message The connection error message, or NULL if this |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
343 | * account is no longer in an error state. |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
344 | */ |
| 15884 | 345 | void pidgin_blist_update_account_error_state(PurpleAccount *account, const char *message); |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
346 | |
| 15243 | 347 | /** |
| 348 | * Sets a headline notification | |
| 349 | * | |
| 350 | * This is currently used for mail notification, but could theoretically be used for anything. | |
| 351 | * Only the most recent headline will be shown. | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
352 | * |
| 15243 | 353 | * @param text Pango Markup for the label text |
| 354 | * @param pixbuf The GdkPixbuf for the icon | |
| 355 | * @param callback The callback to call when headline is clicked | |
| 356 | * @param user_data The userdata to include in the callback | |
|
15386
2cfff7893ed0
[gaim-migrate @ 18115]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15380
diff
changeset
|
357 | * @param destroy The callback to call when headline is closed or replaced by another headline. |
| 15243 | 358 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
359 | void pidgin_blist_set_headline(const char *text, GdkPixbuf *pixbuf, GCallback callback, gpointer user_data, |
|
15386
2cfff7893ed0
[gaim-migrate @ 18115]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15380
diff
changeset
|
360 | GDestroyNotify destroy); |
| 15243 | 361 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
362 | #endif /* _PIDGINBLIST_H_ */ |