Fri, 18 Jul 2008 00:46:22 +0000
disapproval of revision 'a39a33c79a3f235c5e1acf5602d7896f829623ba'
| 5228 | 1 | /** |
|
5248
f4f944f4dbe0
[gaim-migrate @ 5620]
Mark Doliner <markdoliner@pidgin.im>
parents:
5234
diff
changeset
|
2 | * @file gtkblist.h GTK+ Buddy List API |
|
16254
eeb2bba4dc94
Rename the Doxygen group from gtkui to pidgin.
Richard Laager <rlaager@pidgin.im>
parents:
16182
diff
changeset
|
3 | * @ingroup pidgin |
|
20890
c4253dc37ac0
ChangeLog by resiak@soc.pidgin.im:
Will Thompson <resiak@pidgin.im>
parents:
20147
diff
changeset
|
4 | * @see @ref gtkblist-signals |
|
20147
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19862
diff
changeset
|
5 | */ |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19862
diff
changeset
|
6 | |
|
66f05a854eee
applied changes from 8a731bbd0197fbcc91a705c2d8f528154216defa
Richard Laager <rlaager@pidgin.im>
parents:
19862
diff
changeset
|
7 | /* pidgin |
| 5228 | 8 | * |
| 15572 | 9 | * Pidgin is the legal property of its developers, whose names are too numerous |
| 8046 | 10 | * to list here. Please refer to the COPYRIGHT file distributed with this |
| 11 | * source distribution. | |
| 5906 | 12 | * |
| 5228 | 13 | * This program is free software; you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by | |
| 15 | * the Free Software Foundation; either version 2 of the License, or | |
| 16 | * (at your option) any later version. | |
| 17 | * | |
| 18 | * This program is distributed in the hope that it will be useful, | |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 21 | * GNU General Public License for more details. | |
| 22 | * | |
| 23 | * You should have received a copy of the GNU General Public License | |
| 24 | * along with this program; if not, write to the Free Software | |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19652
diff
changeset
|
25 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
| 5228 | 26 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
27 | #ifndef _PIDGINBLIST_H_ |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
28 | #define _PIDGINBLIST_H_ |
| 5228 | 29 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
30 | typedef struct _PidginBuddyList PidginBuddyList; |
|
5872
754c63f29b77
[gaim-migrate @ 6304]
Christian Hammond <chipx86@chipx86.com>
parents:
5631
diff
changeset
|
31 | |
| 5228 | 32 | enum { |
| 33 | STATUS_ICON_COLUMN, | |
| 34 | STATUS_ICON_VISIBLE_COLUMN, | |
| 35 | NAME_COLUMN, | |
| 36 | IDLE_COLUMN, | |
| 14471 | 37 | IDLE_VISIBLE_COLUMN, |
| 5228 | 38 | BUDDY_ICON_COLUMN, |
| 14471 | 39 | BUDDY_ICON_VISIBLE_COLUMN, |
| 5228 | 40 | NODE_COLUMN, |
| 14471 | 41 | BGCOLOR_COLUMN, |
| 42 | GROUP_EXPANDER_COLUMN, | |
|
16182
88b7040408c8
Set the disable maximize button hint on the blist. I couldn't find a window manager that supports this, but I bet win32 does.
Sean Egan <seanegan@pidgin.im>
parents:
15931
diff
changeset
|
43 | GROUP_EXPANDER_VISIBLE_COLUMN, |
| 14471 | 44 | CONTACT_EXPANDER_COLUMN, |
| 45 | CONTACT_EXPANDER_VISIBLE_COLUMN, | |
| 15524 | 46 | EMBLEM_COLUMN, |
| 47 | EMBLEM_VISIBLE_COLUMN, | |
|
19652
b0a14d85e2e5
Fixes #2146. Adds a Show Protocol Icon option and groups related Show menu items into a submenu. Patch from Justin Heiner
Sean Egan <seanegan@pidgin.im>
parents:
19057
diff
changeset
|
48 | PROTOCOL_ICON_COLUMN, |
|
b0a14d85e2e5
Fixes #2146. Adds a Show Protocol Icon option and groups related Show menu items into a submenu. Patch from Justin Heiner
Sean Egan <seanegan@pidgin.im>
parents:
19057
diff
changeset
|
49 | PROTOCOL_ICON_VISIBLE_COLUMN, |
| 5228 | 50 | BLIST_COLUMNS |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
51 | |
|
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
52 | }; |
| 5228 | 53 | |
| 54 | typedef enum { | |
|
15569
e85adc8d3b5c
gtkblist changes to pidgin
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
55 | PIDGIN_STATUS_ICON_LARGE, |
|
e85adc8d3b5c
gtkblist changes to pidgin
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
56 | PIDGIN_STATUS_ICON_SMALL |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
57 | |
|
15569
e85adc8d3b5c
gtkblist changes to pidgin
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
58 | } PidginStatusIconSize; |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
59 | |
| 15577 | 60 | #include "pidgin.h" |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
61 | #include "blist.h" |
|
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
62 | |
| 5228 | 63 | /************************************************************************** |
| 64 | * @name Structures | |
| 65 | **************************************************************************/ | |
| 66 | /** | |
| 67 | * Like, everything you need to know about the gtk buddy list | |
| 68 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
69 | struct _PidginBuddyList { |
| 5228 | 70 | GtkWidget *window; |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
71 | GtkWidget *notebook; /**< The notebook that switches between the real buddy list and the helpful |
| 15086 | 72 | instructions page */ |
| 73 | GtkWidget *main_vbox; /**< This vbox contains the menu and notebook */ | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
74 | GtkWidget *vbox; /**< This is the vbox that everything important gets packed into. |
| 15086 | 75 | Your plugin might want to pack something in it itself. Go, plugins! */ |
| 5228 | 76 | |
| 77 | GtkWidget *treeview; /**< It's a treeview... d'uh. */ | |
| 78 | GtkTreeStore *treemodel; /**< This is the treemodel. */ | |
| 14518 | 79 | GtkTreeViewColumn *text_column; /**< Column */ |
| 11016 | 80 | |
| 81 | GtkCellRenderer *text_rend; | |
| 5228 | 82 | |
|
5427
a45fa07ef20d
[gaim-migrate @ 5806]
Mark Doliner <markdoliner@pidgin.im>
parents:
5422
diff
changeset
|
83 | GtkItemFactory *ift; |
|
12116
17bf39d2678f
[gaim-migrate @ 14416]
Casey Harkins <charkins@pidgin.im>
parents:
12080
diff
changeset
|
84 | GtkWidget *menutray; /**< The menu tray widget. */ |
|
17bf39d2678f
[gaim-migrate @ 14416]
Casey Harkins <charkins@pidgin.im>
parents:
12080
diff
changeset
|
85 | GtkWidget *menutrayicon; /**< The menu tray icon. */ |
| 5228 | 86 | |
|
21296
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
87 | /** Caches connection error messages; keys are #PurpleAccount and |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
88 | * values are non-@c NULL <tt>const char *</tt>s containing localised |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
89 | * error messages. (If an account does not have an error, it will not |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
90 | * appear in the table.) |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
91 | * @deprecated in favour of purple_account_get_current_error(), which also |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
92 | * gives you the #PurpleConnectionError value. |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
93 | */ |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
94 | GHashTable *connection_errors; |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
95 | |
| 5228 | 96 | guint refresh_timer; /**< The timer for refreshing every 30 seconds */ |
| 97 | ||
| 98 | guint timeout; /**< The timeout for the tooltip. */ | |
| 10354 | 99 | guint drag_timeout; /**< The timeout for expanding contacts on drags */ |
| 7636 | 100 | GdkRectangle tip_rect; /**< This is the bounding rectangle of the |
| 101 | cell we're currently hovering over. This is | |
| 102 | used for tooltips. */ | |
| 103 | GdkRectangle contact_rect; /**< This is the bounding rectangle of the contact node | |
| 104 | and its children. This is used for auto-expand on | |
| 105 | mouseover. */ | |
| 15884 | 106 | PurpleBlistNode *mouseover_contact; /**< This is the contact currently mouse-over expanded */ |
| 7636 | 107 | |
| 5228 | 108 | GtkWidget *tipwindow; /**< The window used by the tooltip */ |
| 11890 | 109 | GList *tooltipdata; /**< The data for each "chunk" of the tooltip */ |
| 5228 | 110 | |
| 15884 | 111 | PurpleBlistNode *selected_node; /**< The currently selected node */ |
| 15243 | 112 | |
| 113 | GdkCursor *hand_cursor; /**< Hand cursor */ | |
| 114 | GdkCursor *arrow_cursor; /**< Arrow cursor */ | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
115 | |
| 15094 | 116 | GtkWidget *scrollbook; /**< Scrollbook for alerts */ |
| 15243 | 117 | GtkWidget *headline_hbox; /**< Hbox for headline notification */ |
| 118 | GtkWidget *headline_label; /**< Label for headline notifications */ | |
| 119 | GtkWidget *headline_image; /**< Image for headline notifications */ | |
|
15300
454ddc38e700
[gaim-migrate @ 18028]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15246
diff
changeset
|
120 | GdkPixbuf *headline_close; /**< Close image for closing the headline without triggering the callback */ |
| 15243 | 121 | GCallback headline_callback; /**< Callback for headline notifications */ |
| 122 | gpointer headline_data; /**< User data for headline notifications */ | |
|
15386
2cfff7893ed0
[gaim-migrate @ 18115]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15380
diff
changeset
|
123 | GDestroyNotify headline_destroy; /**< Callback to use for destroying the headline-data */ |
| 15246 | 124 | gboolean changing_style; /**< True when changing GTK+ theme style */ |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
125 | |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
126 | GtkWidget *error_buttons; /**< Box containing the connection error buttons */ |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
127 | GtkWidget *statusbox; /**< The status selector dropdown */ |
|
15458
39c79dc7c965
A lot of status icon changes:
Sean Egan <seanegan@pidgin.im>
parents:
15435
diff
changeset
|
128 | GdkPixbuf *empty_avatar; /**< A 32x32 transparent pixbuf */ |
|
21307
63bb9b16256e
Group all NAME_IN_USE errors together into one neat mini-dialog on the buddy
Will Thompson <resiak@pidgin.im>
parents:
21296
diff
changeset
|
129 | |
|
63bb9b16256e
Group all NAME_IN_USE errors together into one neat mini-dialog on the buddy
Will Thompson <resiak@pidgin.im>
parents:
21296
diff
changeset
|
130 | gpointer priv; /**< Pointer to opaque private data */ |
|
10008
1de3454a0dca
[gaim-migrate @ 10925]
Mark Doliner <markdoliner@pidgin.im>
parents:
9791
diff
changeset
|
131 | }; |
|
7098
22eabd4f5ed4
[gaim-migrate @ 7663]
Christian Hammond <chipx86@chipx86.com>
parents:
7035
diff
changeset
|
132 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
133 | #define PIDGIN_BLIST(list) ((PidginBuddyList *)(list)->ui_data) |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
134 | #define PIDGIN_IS_PIDGIN_BLIST(list) \ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
135 | ((list)->ui_ops == pidgin_blist_get_ui_ops()) |
| 5228 | 136 | |
| 137 | /************************************************************************** | |
| 5422 | 138 | * @name GTK+ Buddy List API |
| 5228 | 139 | **************************************************************************/ |
| 5906 | 140 | |
| 141 | /** | |
| 8815 | 142 | * Get the handle for the GTK+ blist system. |
| 143 | * | |
| 144 | * @return the handle to the blist system | |
| 145 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
146 | void *pidgin_blist_get_handle(void); |
| 8815 | 147 | |
| 148 | /** | |
| 5906 | 149 | * Initializes the GTK+ blist system. |
| 150 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
151 | void pidgin_blist_init(void); |
| 5906 | 152 | |
| 5228 | 153 | /** |
| 8815 | 154 | * Uninitializes the GTK+ blist system. |
| 155 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
156 | void pidgin_blist_uninit(void); |
| 8815 | 157 | |
| 158 | /** | |
| 5228 | 159 | * Returns the UI operations structure for the buddy list. |
| 160 | * | |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10643
diff
changeset
|
161 | * @return The GTK+ list operations structure. |
| 5228 | 162 | */ |
| 15884 | 163 | PurpleBlistUiOps *pidgin_blist_get_ui_ops(void); |
| 5228 | 164 | |
| 165 | /** | |
| 10643 | 166 | * Returns the default gtk buddy list |
| 11732 | 167 | * |
| 10643 | 168 | * 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
|
169 | * returns the PidginBuddyList we're most likely wanting to work with. This is slightly |
| 10643 | 170 | * cleaner than an externed global. |
| 11732 | 171 | * |
|
10814
7e17cb56b019
[gaim-migrate @ 12468]
Luke Schierer <lschiere@pidgin.im>
parents:
10643
diff
changeset
|
172 | * @return The default GTK+ buddy list |
| 10643 | 173 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
174 | PidginBuddyList *pidgin_blist_get_default_gtk_blist(void); |
| 10643 | 175 | |
| 176 | /** | |
| 9774 | 177 | * Populates a menu with the items shown on the buddy list for a buddy. |
| 178 | * | |
| 179 | * @param menu The menu to populate | |
|
14200
799dfae258cf
[gaim-migrate @ 16780]
Aaron Sheldon <aaronsheldon@users.sourceforge.net>
parents:
13015
diff
changeset
|
180 | * @param buddy The buddy whose menu to get |
| 10484 | 181 | * @param sub TRUE if this is a sub-menu, FALSE otherwise |
| 9774 | 182 | */ |
| 15884 | 183 | void pidgin_blist_make_buddy_menu(GtkWidget *menu, PurpleBuddy *buddy, gboolean sub); |
| 9774 | 184 | |
| 185 | /** | |
| 5228 | 186 | * Refreshes all the nodes of the buddy list. |
| 187 | * This should only be called when something changes to affect most of the nodes (such as a ui preference changing) | |
| 188 | * | |
| 189 | * @param list This is the core list that gets updated from | |
| 190 | */ | |
| 15884 | 191 | void pidgin_blist_refresh(PurpleBuddyList *list); |
| 5228 | 192 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
193 | void pidgin_blist_update_columns(void); |
|
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
194 | void pidgin_blist_update_refresh_timeout(void); |
| 5228 | 195 | |
| 196 | /** | |
| 15524 | 197 | * Returns the blist emblem |
| 198 | * | |
| 199 | * @param node The node to return an emblem for | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
200 | * |
| 15524 | 201 | * @return A newly created GdkPixbuf, or NULL |
| 202 | */ | |
| 203 | GdkPixbuf * | |
| 15884 | 204 | pidgin_blist_get_emblem(PurpleBlistNode *node); |
| 15524 | 205 | |
| 206 | /** | |
| 5228 | 207 | * Useful for the buddy ticker |
| 208 | */ | |
| 15884 | 209 | GdkPixbuf *pidgin_blist_get_status_icon(PurpleBlistNode *node, |
|
15569
e85adc8d3b5c
gtkblist changes to pidgin
Sean Egan <seanegan@pidgin.im>
parents:
15562
diff
changeset
|
210 | PidginStatusIconSize size); |
| 5228 | 211 | |
|
11018
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
212 | /** |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
213 | * 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
|
214 | * |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
215 | * 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
|
216 | * for other types of nodes. |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
217 | * |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
218 | * @param node The node in question. |
|
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
219 | * @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
|
220 | */ |
| 15884 | 221 | gboolean pidgin_blist_node_is_contact_expanded(PurpleBlistNode *node); |
|
11018
a3843543f132
[gaim-migrate @ 12888]
Richard Laager <rlaager@pidgin.im>
parents:
11016
diff
changeset
|
222 | |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
223 | /** |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
224 | * Intelligently toggles the visibility of the buddy list. If the buddy |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
225 | * 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
|
226 | * it is hidden. If it is hidden it is shown. |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
227 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
228 | void pidgin_blist_toggle_visibility(void); |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
229 | |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
230 | /** |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
231 | * Increases the reference count of visibility managers. Callers should |
|
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
232 | * call the complementary remove function when no longer managing |
|
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
233 | * visibility. |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
234 | * |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
235 | * A visibility manager is something that provides some method for |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
236 | * 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
|
237 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
238 | void pidgin_blist_visibility_manager_add(void); |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
239 | |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
240 | /** |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
241 | * Decreases the reference count of visibility managers. If the count |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
242 | * drops below zero, the buddy list is shown. |
|
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
243 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
244 | void pidgin_blist_visibility_manager_remove(void); |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
245 | |
| 15094 | 246 | /** |
| 247 | * Adds a mini-alert to the blist scrollbook | |
| 248 | * | |
| 249 | * @param widget The widget to add | |
| 250 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
251 | void pidgin_blist_add_alert(GtkWidget *widget); |
| 15094 | 252 | |
|
12017
576096d84889
[gaim-migrate @ 14310]
Daniel Atallah <datallah@pidgin.im>
parents:
11890
diff
changeset
|
253 | |
| 5422 | 254 | /************************************************************************** |
| 255 | * @name GTK+ Buddy List sorting functions | |
| 256 | **************************************************************************/ | |
| 257 | ||
| 15884 | 258 | typedef void (*pidgin_blist_sort_function)(PurpleBlistNode *new, PurpleBuddyList *blist, GtkTreeIter group, GtkTreeIter *cur, GtkTreeIter *iter); |
| 5422 | 259 | |
| 11796 | 260 | /** |
| 261 | * Gets the current list of sort methods. | |
| 262 | * | |
| 263 | * @return A GSlist of sort methods | |
| 264 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
265 | GList *pidgin_blist_get_sort_methods(void); |
| 5422 | 266 | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
267 | struct pidgin_blist_sort_method { |
| 5631 | 268 | char *id; |
| 5422 | 269 | char *name; |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
270 | pidgin_blist_sort_function func; |
| 5422 | 271 | }; |
| 272 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
273 | typedef struct pidgin_blist_sort_method PidginBlistSortMethod; |
| 11796 | 274 | |
| 5422 | 275 | /** |
| 276 | * Registers a buddy list sorting method. | |
| 277 | * | |
| 5631 | 278 | * @param id The unique ID of the sorting method |
| 5422 | 279 | * @param name The method's name. |
| 280 | * @param func A pointer to the function. | |
| 281 | * | |
| 282 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
283 | void pidgin_blist_sort_method_reg(const char *id, const char *name, pidgin_blist_sort_function func); |
| 5422 | 284 | |
| 285 | /** | |
| 286 | * Unregisters a buddy list sorting method. | |
| 287 | * | |
| 5631 | 288 | * @param id The method's id |
| 5422 | 289 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
290 | void pidgin_blist_sort_method_unreg(const char *id); |
| 5422 | 291 | |
| 292 | /** | |
| 293 | * Sets a buddy list sorting method. | |
| 294 | * | |
| 5631 | 295 | * @param id The method's id. |
| 5422 | 296 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
297 | void pidgin_blist_sort_method_set(const char *id); |
| 5422 | 298 | |
| 299 | /** | |
| 300 | * Sets up the programs default sort methods | |
| 301 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
302 | void pidgin_blist_setup_sort_methods(void); |
| 5422 | 303 | |
|
5936
4bac764cc792
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
304 | /** |
| 12296 | 305 | * Updates the accounts menu on the GTK+ buddy list window. |
|
5936
4bac764cc792
[gaim-migrate @ 6376]
Christian Hammond <chipx86@chipx86.com>
parents:
5906
diff
changeset
|
306 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
307 | void pidgin_blist_update_accounts_menu(void); |
| 5422 | 308 | |
|
8305
5a6d1168a8b3
[gaim-migrate @ 9029]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
309 | /** |
|
8986
30ba617356bb
[gaim-migrate @ 9761]
Christopher O'Brien <siege@pidgin.im>
parents:
8940
diff
changeset
|
310 | * 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
|
311 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
312 | void pidgin_blist_update_plugin_actions(void); |
|
8986
30ba617356bb
[gaim-migrate @ 9761]
Christopher O'Brien <siege@pidgin.im>
parents:
8940
diff
changeset
|
313 | |
|
30ba617356bb
[gaim-migrate @ 9761]
Christopher O'Brien <siege@pidgin.im>
parents:
8940
diff
changeset
|
314 | /** |
| 11796 | 315 | * Updates the Sorting menu on the GTK+ buddy list window. |
| 316 | */ | |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
317 | void pidgin_blist_update_sort_methods(void); |
| 11796 | 318 | |
| 319 | /** | |
|
8940
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
320 | * Determines if showing the join chat dialog is a valid action. |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
321 | * |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
322 | * @return Returns TRUE if there are accounts online capable of |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
323 | * joining chat rooms. Otherwise returns FALSE. |
|
8305
5a6d1168a8b3
[gaim-migrate @ 9029]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
324 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
325 | gboolean pidgin_blist_joinchat_is_showable(void); |
|
8940
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
326 | |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
327 | /** |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
328 | * Shows the join chat dialog. |
|
3e22cf150db0
[gaim-migrate @ 9710]
Mark Doliner <markdoliner@pidgin.im>
parents:
8815
diff
changeset
|
329 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
330 | void pidgin_blist_joinchat_show(void); |
| 5422 | 331 | |
| 9051 | 332 | /** |
| 15884 | 333 | * Appends the privacy menu items for a PurpleBlistNode |
|
15380
1171796358b3
[gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15300
diff
changeset
|
334 | * TODO: Rename these. |
|
1171796358b3
[gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15300
diff
changeset
|
335 | */ |
| 15884 | 336 | 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
|
337 | |
|
1171796358b3
[gaim-migrate @ 18109]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
15300
diff
changeset
|
338 | /** |
| 15884 | 339 | * Appends the protocol specific menu items for a PurpleBlistNode |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
340 | * TODO: Rename these. |
| 9051 | 341 | */ |
| 15884 | 342 | void pidgin_append_blist_node_proto_menu (GtkWidget *menu, PurpleConnection *gc, PurpleBlistNode *node); |
| 9051 | 343 | |
| 344 | /** | |
| 15884 | 345 | * Appends the extended menu items for a PurpleBlistNode |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
346 | * TODO: Rename these. |
| 9051 | 347 | */ |
| 15884 | 348 | void pidgin_append_blist_node_extended_menu(GtkWidget *menu, PurpleBlistNode *node); |
| 9051 | 349 | |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
350 | /** |
|
21296
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
351 | * Was used by the connection API to tell the blist if an account has a |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
352 | * connection error or no longer has a connection error, but the blist now does |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
353 | * this itself with the @ref account-error-changed signal. |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
354 | * |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
355 | * @param account The account that either has a connection error |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
356 | * or no longer has a connection error. |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
357 | * @param message The connection error message, or NULL if this |
|
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
358 | * account is no longer in an error state. |
|
21296
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
359 | * @deprecated There was no good reason for code other than gtkconn to call |
|
406dbf97ff66
Deprecate pidgin_blist_update_account_error_state() and
Will Thompson <resiak@pidgin.im>
parents:
20940
diff
changeset
|
360 | * this. |
|
13015
79ca1e6153bd
[gaim-migrate @ 15368]
Mark Doliner <markdoliner@pidgin.im>
parents:
12583
diff
changeset
|
361 | */ |
| 15884 | 362 | 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
|
363 | |
| 15243 | 364 | /** |
| 365 | * Sets a headline notification | |
| 366 | * | |
| 367 | * This is currently used for mail notification, but could theoretically be used for anything. | |
| 368 | * Only the most recent headline will be shown. | |
|
15692
ecda27df58b9
Some more pidgininfication
Daniel Atallah <datallah@pidgin.im>
parents:
15577
diff
changeset
|
369 | * |
| 15243 | 370 | * @param text Pango Markup for the label text |
| 371 | * @param pixbuf The GdkPixbuf for the icon | |
| 372 | * @param callback The callback to call when headline is clicked | |
| 373 | * @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
|
374 | * @param destroy The callback to call when headline is closed or replaced by another headline. |
| 15243 | 375 | */ |
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
376 | 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
|
377 | GDestroyNotify destroy); |
| 15243 | 378 | |
|
18253
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
379 | /** |
|
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
380 | * Returns a buddy's Pango markup appropriate for setting in a GtkCellRenderer. |
|
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
381 | * |
|
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
382 | * @param buddy The buddy to return markup from |
|
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
383 | * @param selected Whether this buddy is selected. If TRUE, the markup will not change the color. |
|
19057
59fae1cbeee6
show status messages in infopane even if not in buddy list. Fixes #2321
Sean Egan <seanegan@pidgin.im>
parents:
18970
diff
changeset
|
384 | * @param aliased TRUE to return the appropriate alias of this buddy, FALSE to return its screenname and status information |
|
18253
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
385 | * @return The markup for this buddy |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
386 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
387 | * @since 2.1.0 |
|
18253
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
388 | */ |
|
18274
b4eb1720fddf
Show screenname instead of alias in conversation infopanes
Sean Egan <seanegan@pidgin.im>
parents:
18253
diff
changeset
|
389 | gchar *pidgin_blist_get_name_markup(PurpleBuddy *buddy, gboolean selected, gboolean aliased); |
|
18253
e25dd002e0be
Start work on blist pane in conversation. Looks like: http://pidgin.im/~seanegan/infopane.png Certainly much to be done yet.
Sean Egan <seanegan@pidgin.im>
parents:
16254
diff
changeset
|
390 | |
| 18970 | 391 | /** |
| 392 | * Creates the Buddy List tooltip at the current pointer location for the given buddy list node. | |
| 393 | * | |
| 394 | * This tooltip will be destroyed the next time this function is called, or when XXXX | |
| 395 | * is called | |
| 396 | * | |
|
19862
3aa48ac21c45
This will silence a few warnings when building the Doxygen docs.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
397 | * @param node The buddy list node to show a tooltip for |
| 18970 | 398 | * @param widget The widget to draw the tooltip on |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
399 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
400 | * @since 2.1.0 |
| 18970 | 401 | */ |
| 402 | void pidgin_blist_draw_tooltip(PurpleBlistNode *node, GtkWidget *widget); | |
| 403 | ||
| 404 | /** | |
| 405 | * Destroys the current (if any) Buddy List tooltip | |
|
20940
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
406 | * |
|
925d3d68b3af
Doxygen @since tags for libpurple and pidgin.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents:
20890
diff
changeset
|
407 | * @since 2.1.0 |
| 18970 | 408 | */ |
| 409 | void pidgin_blist_tooltip_destroy(void); | |
| 410 | ||
| 411 | ||
|
15562
8c8249fe5e3c
gaim_gtk to pidgin. I hope
Sean Egan <seanegan@pidgin.im>
parents:
15524
diff
changeset
|
412 | #endif /* _PIDGINBLIST_H_ */ |