annotate src/gtkblist.h @ 7606:08c9d0dcf906

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