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