Mercurial > pidgin
annotate finch/gntblist.h @ 24334:06a4e268b9f5
merge of '843d513c3da12026fc35af070a23a3d11844824c'
and 'b630f3305c53ab0eb32b948911940959cc873699'
author | John Bailey <rekkanoryo@rekkanoryo.org> |
---|---|
date | Thu, 30 Oct 2008 03:58:19 +0000 |
parents | f1441c4e4d2f |
children | 02a2e8183b1d |
rev | line source |
---|---|
15817 | 1 /** |
2 * @file gntblist.h GNT BuddyList API | |
16194
0f0832c13fcb
Rename the Doxygen group from gntui to finch and define the finch group
Richard Laager <rlaager@wiktel.com>
parents:
15870
diff
changeset
|
3 * @ingroup finch |
20074
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
4 */ |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
5 |
6bf32c9e15a7
remove gpl boilerplate from doxygen docs
Sean Egan <seanegan@gmail.com>
parents:
19681
diff
changeset
|
6 /* finch |
15817 | 7 * |
15870
66dff3dfdea6
Re-sed the copyright notices so they don't all talk about Purple.
Richard Laager <rlaager@wiktel.com>
parents:
15822
diff
changeset
|
8 * Finch is the legal property of its developers, whose names are too numerous |
15817 | 9 * to list here. Please refer to the COPYRIGHT file distributed with this |
10 * source distribution. | |
11 * | |
12 * This program is free software; you can redistribute it and/or modify | |
13 * it under the terms of the GNU General Public License as published by | |
14 * the Free Software Foundation; either version 2 of the License, or | |
15 * (at your option) any later version. | |
16 * | |
17 * This program is distributed in the hope that it will be useful, | |
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
20 * GNU General Public License for more details. | |
21 * | |
22 * You should have received a copy of the GNU General Public License | |
23 * along with this program; if not, write to the Free Software | |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
17804
diff
changeset
|
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15817 | 25 */ |
26 #ifndef _GNT_BLIST_H | |
27 #define _GNT_BLIST_H | |
28 | |
29 #include "blist.h" | |
22171
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
30 #include "gnttree.h" |
15817 | 31 |
32 /********************************************************************** | |
33 * @name GNT BuddyList API | |
34 **********************************************************************/ | |
35 /*@{*/ | |
36 | |
23254
f1441c4e4d2f
Add doxygen foo for FinchBlistManager.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22190
diff
changeset
|
37 /** |
f1441c4e4d2f
Add doxygen foo for FinchBlistManager.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22190
diff
changeset
|
38 * Buddylist manager for finch. This decides the visility, ordering and hierarchy |
f1441c4e4d2f
Add doxygen foo for FinchBlistManager.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22190
diff
changeset
|
39 * of the buddylist nodes. This also manages the creation of tooltips. |
f1441c4e4d2f
Add doxygen foo for FinchBlistManager.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22190
diff
changeset
|
40 */ |
22171
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
41 typedef struct |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
42 { |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
43 const char *id; /**< An identifier for the manager. */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
44 const char *name; /**< Displayable name for the manager. */ |
22190
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22171
diff
changeset
|
45 gboolean (*init)(void); /**< Called right before it's being used. */ |
bcaf4a037704
Init and uninit the buddylist managers at appropriate times.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
22171
diff
changeset
|
46 gboolean (*uninit)(void); /**< Called right after it's not being used any more. */ |
22171
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
47 gboolean (*can_add_node)(PurpleBlistNode *node); /**< Whether a node should be added to the view. */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
48 gpointer (*find_parent)(PurpleBlistNode *node); /**< Find the parent row for a node. */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
49 gboolean (*create_tooltip)(gpointer selected_row, GString **body, char **title); /**< Create tooltip for a selected row. */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
50 gpointer reserved[4]; |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
51 } FinchBlistManager; |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
52 |
15817 | 53 /** |
54 * Get the ui-functions. | |
55 * | |
15822 | 56 * @return The PurpleBlistUiOps structure populated with the appropriate functions. |
15817 | 57 */ |
15822 | 58 PurpleBlistUiOps * finch_blist_get_ui_ops(void); |
15817 | 59 |
60 /** | |
61 * Perform necessary initializations. | |
62 */ | |
63 void finch_blist_init(void); | |
64 | |
65 /** | |
66 * Perform necessary uninitializations. | |
67 */ | |
68 void finch_blist_uninit(void); | |
69 | |
70 /** | |
71 * Show the buddy list. | |
72 */ | |
73 void finch_blist_show(void); | |
74 | |
75 /** | |
76 * Get the position of the buddy list. | |
77 * | |
78 * @param x The x-coordinate is set here if not @ NULL. | |
79 * @param y The y-coordinate is set here if not @c NULL. | |
80 * | |
81 * @return Returns @c TRUE if the values were set, @c FALSE otherwise. | |
82 */ | |
83 gboolean finch_blist_get_position(int *x, int *y); | |
84 | |
85 /** | |
86 * Set the position of the buddy list. | |
87 * | |
88 * @param x The x-coordinate of the buddy list. | |
89 * @param y The y-coordinate of the buddy list. | |
90 */ | |
91 void finch_blist_set_position(int x, int y); | |
92 | |
93 /** | |
94 * Get the size of the buddy list. | |
95 * | |
96 * @param width The width is set here if not @ NULL. | |
97 * @param height The height is set here if not @c NULL. | |
98 * | |
99 * @return Returns @c TRUE if the values were set, @c FALSE otherwise. | |
100 */ | |
101 gboolean finch_blist_get_size(int *width, int *height); | |
102 | |
103 /** | |
104 * Set the size of the buddy list. | |
105 * | |
106 * @param width The width of the buddy list. | |
107 * @param height The height of the buddy list. | |
108 */ | |
109 void finch_blist_set_size(int width, int height); | |
110 | |
17750
319bcb73eb4e
Use utility functions to get user info. Closes #964.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16194
diff
changeset
|
111 /** |
319bcb73eb4e
Use utility functions to get user info. Closes #964.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16194
diff
changeset
|
112 * Get information about a user. Show immediate feedback. |
319bcb73eb4e
Use utility functions to get user info. Closes #964.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16194
diff
changeset
|
113 * |
319bcb73eb4e
Use utility functions to get user info. Closes #964.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16194
diff
changeset
|
114 * @param conn The connection to get information fro |
319bcb73eb4e
Use utility functions to get user info. Closes #964.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16194
diff
changeset
|
115 * @param name The user to get information about. |
17804
464840043c66
Show information about the user requesting authorization.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17750
diff
changeset
|
116 * |
464840043c66
Show information about the user requesting authorization.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17750
diff
changeset
|
117 * @return Returns the ui-handle for the userinfo notification. |
20874
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20074
diff
changeset
|
118 * |
acf284962b40
Add @since doxygen tags for finch/libgnt.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20074
diff
changeset
|
119 * @since 2.1.0 |
17750
319bcb73eb4e
Use utility functions to get user info. Closes #964.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16194
diff
changeset
|
120 */ |
17804
464840043c66
Show information about the user requesting authorization.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
17750
diff
changeset
|
121 gpointer finch_retrieve_user_info(PurpleConnection *conn, const char *name); |
17750
319bcb73eb4e
Use utility functions to get user info. Closes #964.
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
16194
diff
changeset
|
122 |
22171
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
123 /** |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
124 * Get the tree list of the buddy list. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
125 * @return The GntTree widget. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
126 * @since 2.4.0 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
127 */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
128 GntTree * finch_blist_get_tree(void); |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
129 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
130 /** |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
131 * Add an alternate buddy list manager. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
132 * |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
133 * @param manager The alternate buddylist manager. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
134 * @since 2.4.0 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
135 */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
136 void finch_blist_install_manager(const FinchBlistManager *manager); |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
137 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
138 /** |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
139 * Remove an alternate buddy list manager. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
140 * |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
141 * @param manager The buddy list manager to remove. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
142 * @since 2.4.0 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
143 */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
144 void finch_blist_uninstall_manager(const FinchBlistManager *manager); |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
145 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
146 /** |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
147 * Find a buddy list manager. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
148 * |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
149 * @param id The identifier for the desired buddy list manager. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
150 * |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
151 * @return The manager with the requested identifier, if available. @c NULL otherwise. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
152 * @since 2.4.0 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
153 */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
154 FinchBlistManager * finch_blist_manager_find(const char *id); |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
155 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
156 /** |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
157 * Request the active buddy list manager to add a node. |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
158 * |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
159 * @param node The node to add |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
160 * @since 2.4.0 |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
161 */ |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
162 void finch_blist_manager_add_node(PurpleBlistNode *node); |
2c9646c55369
Add a buddy list manager for finch. This allows plugins to show the buddylist
Sadrul Habib Chowdhury <imadil@gmail.com>
parents:
20874
diff
changeset
|
163 |
15817 | 164 /*@}*/ |
165 | |
166 #endif |