Mercurial > pidgin.yaz
annotate src/conversation.h @ 5683:9befba33f7c8
[gaim-migrate @ 6102]
Moved the call to gtk_proxy_init() into main.c for now.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Tue, 03 Jun 2003 02:30:30 +0000 |
parents | dae79aefac8d |
children | 1d140b31d4b3 |
rev | line source |
---|---|
4359 | 1 /** |
2 * @file conversation.h Conversation API | |
5034
4691c5936c01
[gaim-migrate @ 5377]
Christian Hammond <chipx86@chipx86.com>
parents:
4890
diff
changeset
|
3 * @ingroup core |
4359 | 4 * |
5 * gaim | |
6 * | |
7 * Copyright (C) 2002-2003, Christian Hammond <chipx86@gnupdate.org> | |
8 * | |
9 * This program is free software; you can redistribute it and/or modify | |
10 * it under the terms of the GNU General Public License as published by | |
11 * the Free Software Foundation; either version 2 of the License, or | |
12 * (at your option) any later version. | |
13 * | |
14 * This program is distributed in the hope that it will be useful, | |
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 * GNU General Public License for more details. | |
18 * | |
19 * You should have received a copy of the GNU General Public License | |
20 * along with this program; if not, write to the Free Software | |
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
22 */ | |
23 | |
4890
89cb14edf8cf
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
24 #ifndef _GAIM_CONVERSATION_H_ |
89cb14edf8cf
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
25 #define _GAIM_CONVERSATION_H_ |
4359 | 26 |
27 /**************************************************************************/ | |
28 /** Data Structures */ | |
29 /**************************************************************************/ | |
30 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
31 typedef enum _GaimConversationType GaimConversationType; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
32 typedef enum _GaimUnseenState GaimUnseenState; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
33 typedef enum _GaimConvUpdateType GaimConvUpdateType; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
34 typedef struct _GaimWindowUiOps GaimWindowUiOps; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
35 typedef struct _GaimWindow GaimWindow; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
36 typedef struct _GaimConversationUiOps GaimConversationUiOps; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
37 typedef struct _GaimConversation GaimConversation; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
38 typedef struct _GaimIm GaimIm; |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
39 typedef struct _GaimChat GaimChat; |
4359 | 40 |
41 /** | |
42 * A type of conversation. | |
43 */ | |
44 enum _GaimConversationType | |
45 { | |
46 GAIM_CONV_UNKNOWN = 0, /**< Unknown conversation type. */ | |
47 GAIM_CONV_IM, /**< Instant Message. */ | |
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
48 GAIM_CONV_CHAT, /**< Chat room. */ |
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
49 GAIM_CONV_MISC /**< A misc. conversation. */ |
4359 | 50 }; |
51 | |
52 /** | |
53 * Unseen text states. | |
54 */ | |
55 enum _GaimUnseenState | |
56 { | |
57 GAIM_UNSEEN_NONE = 0, /**< No unseen text in the conversation. */ | |
58 GAIM_UNSEEN_TEXT, /**< Unseen text in the conversation. */ | |
59 GAIM_UNSEEN_NICK, /**< Unseen text and the nick was said. */ | |
60 }; | |
61 | |
62 /** | |
63 * Conversation update type. | |
64 */ | |
65 enum _GaimConvUpdateType | |
66 { | |
67 GAIM_CONV_UPDATE_ADD = 0, /**< The buddy associated with the conversation | |
68 was added. */ | |
69 GAIM_CONV_UPDATE_REMOVE, /**< The buddy associated with the conversation | |
70 was removed. */ | |
4491 | 71 GAIM_CONV_UPDATE_ACCOUNT, /**< The gaim_account was changed. */ |
4359 | 72 GAIM_CONV_UPDATE_TYPING, /**< The typing state was updated. */ |
73 GAIM_CONV_UPDATE_UNSEEN, /**< The unseen state was updated. */ | |
74 GAIM_CONV_UPDATE_LOGGING, /**< Logging for this conversation was | |
75 enabled or disabled. */ | |
76 GAIM_CONV_UPDATE_TOPIC, /**< The topic for a chat was updated. */ | |
77 | |
78 /* | |
79 * XXX These need to go when we implement a more generic core/UI event | |
80 * system. | |
81 */ | |
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
82 GAIM_CONV_ACCOUNT_ONLINE, /**< One of the user's accounts went online. */ |
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
83 GAIM_CONV_ACCOUNT_OFFLINE, /**< One of the user's accounts went offline. */ |
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
84 GAIM_CONV_UPDATE_AWAY /**< The other user went away. */ |
4359 | 85 }; |
86 | |
87 /* Yeah, this has to be included here. Ugh. */ | |
88 #include "gaim.h" | |
89 | |
90 /** | |
91 * Conversation window operations. | |
92 * | |
93 * Any UI representing a window must assign a filled-out gaim_window_ops | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
94 * structure to the GaimWindow. |
4359 | 95 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
96 struct _GaimWindowUiOps |
4359 | 97 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
98 GaimConversationUiOps *(*get_conversation_ui_ops)(void); |
4359 | 99 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
100 void (*new_window)(GaimWindow *win); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
101 void (*destroy_window)(GaimWindow *win); |
4359 | 102 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
103 void (*show)(GaimWindow *win); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
104 void (*hide)(GaimWindow *win); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
105 void (*raise)(GaimWindow *win); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
106 void (*flash)(GaimWindow *win); |
4359 | 107 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
108 void (*switch_conversation)(GaimWindow *win, unsigned int index); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
109 void (*add_conversation)(GaimWindow *win, GaimConversation *conv); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
110 void (*remove_conversation)(GaimWindow *win, GaimConversation *conv); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
111 void (*move_conversation)(GaimWindow *win, GaimConversation *conv, |
4359 | 112 unsigned int newIndex); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
113 int (*get_active_index)(const GaimWindow *win); |
4359 | 114 }; |
115 | |
116 /** | |
117 * Conversation operations and events. | |
118 * | |
119 * Any UI representing a conversation must assign a filled-out | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
120 * GaimConversationUiOps structure to the GaimConversation. |
4359 | 121 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
122 struct _GaimConversationUiOps |
4359 | 123 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
124 void (*destroy_conversation)(GaimConversation *conv); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
125 void (*write_chat)(GaimConversation *conv, const char *who, |
4359 | 126 const char *message, int flags, time_t mtime); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
127 void (*write_im)(GaimConversation *conv, const char *who, |
4359 | 128 const char *message, size_t len, int flags, time_t mtime); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
129 void (*write_conv)(GaimConversation *conv, const char *who, |
4359 | 130 const char *message, size_t length, int flags, |
131 time_t mtime); | |
132 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
133 void (*chat_add_user)(GaimConversation *conv, const char *user); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
134 void (*chat_rename_user)(GaimConversation *conv, |
4359 | 135 const char *old_name, const char *new_name); |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
136 void (*chat_remove_user)(GaimConversation *conv, const char *user); |
4359 | 137 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
138 void (*set_title)(GaimConversation *conv, const char *title); |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
139 void (*update_progress)(GaimConversation *conv, float percent); |
4359 | 140 |
141 /* Events */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
142 void (*updated)(GaimConversation *conv, GaimConvUpdateType type); |
4359 | 143 }; |
144 | |
145 /** | |
146 * A core representation of a graphical window containing one or more | |
147 * conversations. | |
148 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
149 struct _GaimWindow |
4359 | 150 { |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
151 GList *conversations; /**< The conversations in the window. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
152 size_t conversation_count; /**< The number of conversations. */ |
4359 | 153 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
154 GaimWindowUiOps *ui_ops; /**< UI-specific window operations. */ |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
155 void *ui_data; /**< UI-specific data. */ |
4359 | 156 }; |
157 | |
158 /** | |
159 * Data specific to Instant Messages. | |
160 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
161 struct _GaimIm |
4359 | 162 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
163 GaimConversation *conv; /**< The parent conversation. */ |
4359 | 164 |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
165 int typing_state; /**< The current typing state. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
166 guint typing_timeout; /**< The typing timer handle. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
167 time_t type_again; /**< The type again time. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
168 guint type_again_timeout; /**< The type again timer handle. */ |
4359 | 169 |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
170 GSList *images; /**< A list of images in the IM. */ |
4359 | 171 }; |
172 | |
173 /** | |
174 * Data specific to Chats. | |
175 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
176 struct _GaimChat |
4359 | 177 { |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
178 GaimConversation *conv; /**< The parent conversation. */ |
4359 | 179 |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
180 GList *in_room; /**< The users in the room. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
181 GList *ignored; /**< Ignored users. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
182 char *who; /**< The person who set the topic. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
183 char *topic; /**< The topic. */ |
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
184 int id; /**< The chat ID. */ |
4359 | 185 }; |
186 | |
187 /** | |
188 * A core representation of a conversation between two or more people. | |
189 * | |
190 * The conversation can be an IM or a chat. Each conversation is kept | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
191 * in a GaimWindow and has a UI representation. |
4359 | 192 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
193 struct _GaimConversation |
4359 | 194 { |
195 GaimConversationType type; /**< The type of conversation. */ | |
196 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
197 GaimAccount *account; /**< The user using this conversation. */ |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
198 GaimWindow *window; /**< The parent window. */ |
4359 | 199 |
200 int conversation_pos; /**< The position in the window's list. */ | |
201 | |
202 char *name; /**< The name of the conversation. */ | |
203 char *title; /**< The window title. */ | |
204 | |
205 gboolean logging; /**< The status of logging. */ | |
206 | |
207 GList *send_history; /**< The send history. */ | |
208 GString *history; /**< The conversation history. */ | |
209 | |
210 GaimUnseenState unseen; /**< The unseen tab state. */ | |
211 | |
212 union | |
213 { | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
214 GaimIm *im; /**< IM-specific data. */ |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
215 GaimChat *chat; /**< Chat-specific data. */ |
4378
194507c83612
[gaim-migrate @ 4644]
Christian Hammond <chipx86@chipx86.com>
parents:
4359
diff
changeset
|
216 void *misc; /**< Misc. data. */ |
4359 | 217 |
218 } u; | |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
219 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
220 GaimConversationUiOps *ui_ops; /**< UI-specific operations. */ |
4465
6e37eb000b7a
[gaim-migrate @ 4740]
Christian Hammond <chipx86@chipx86.com>
parents:
4378
diff
changeset
|
221 void *ui_data; /**< UI-specific data. */ |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
222 |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
223 GHashTable *data; /**< Plugin-specific data. */ |
4359 | 224 }; |
225 | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
226 typedef void (*GaimConvPlacementFunc)(GaimConversation *); |
4359 | 227 |
228 /**************************************************************************/ | |
229 /** @name Conversation Window API */ | |
230 /**************************************************************************/ | |
231 /*@{*/ | |
232 | |
233 /** | |
234 * Creates a new conversation window. | |
235 * | |
236 * This window is added to the list of windows, but is not shown until | |
237 * gaim_window_show() is called. | |
238 * | |
239 * @return The new conversation window. | |
240 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
241 GaimWindow *gaim_window_new(void); |
4359 | 242 |
243 /** | |
244 * Destroys the specified conversation window and all conversations in it. | |
245 * | |
246 * @param win The window to destroy. | |
247 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
248 void gaim_window_destroy(GaimWindow *win); |
4359 | 249 |
250 /** | |
251 * Shows the specified conversation window. | |
252 * | |
253 * @param win The window. | |
254 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
255 void gaim_window_show(GaimWindow *win); |
4359 | 256 |
257 /** | |
258 * Hides the specified conversation window. | |
259 * | |
260 * @param win The window. | |
261 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
262 void gaim_window_hide(GaimWindow *win); |
4359 | 263 |
264 /** | |
265 * Raises the specified conversation window. | |
266 * | |
267 * @param win The window. | |
268 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
269 void gaim_window_raise(GaimWindow *win); |
4359 | 270 |
271 /** | |
272 * Causes the window to flash for IM notification, if the UI supports this. | |
273 * | |
274 * @param win The window. | |
275 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
276 void gaim_window_flash(GaimWindow *win); |
4359 | 277 |
278 /** | |
279 * Sets the specified window's UI window operations structure. | |
280 * | |
281 * @param win The window. | |
282 * @param ops The UI window operations structure. | |
283 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
284 void gaim_window_set_ui_ops(GaimWindow *win, GaimWindowUiOps *ops); |
4359 | 285 |
286 /** | |
287 * Returns the specified window's UI window operations structure. | |
288 * | |
289 * @param win The window. | |
290 * | |
291 * @return The UI window operations structure. | |
292 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
293 GaimWindowUiOps *gaim_window_get_ui_ops(const GaimWindow *win); |
4359 | 294 |
295 /** | |
296 * Adds a conversation to this window. | |
297 * | |
298 * If the conversation already has a parent window, this will do nothing. | |
299 * | |
300 * @param win The window. | |
301 * @param conv The conversation. | |
302 * | |
303 * @return The new index of the conversation in the window. | |
304 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
305 int gaim_window_add_conversation(GaimWindow *win, GaimConversation *conv); |
4359 | 306 |
307 /** | |
308 * Removes the conversation at the specified index from the window. | |
309 * | |
310 * If there is no conversation at this index, this will do nothing. | |
311 * | |
312 * @param win The window. | |
313 * @param index The index of the conversation. | |
314 * | |
315 * @return The conversation removed. | |
316 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
317 GaimConversation *gaim_window_remove_conversation(GaimWindow *win, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
318 unsigned int index); |
4359 | 319 |
320 /** | |
321 * Moves the conversation at the specified index in a window to a new index. | |
322 * | |
323 * @param win The window. | |
324 * @param index The index of the conversation to move. | |
325 * @param new_index The new index. | |
326 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
327 void gaim_window_move_conversation(GaimWindow *win, unsigned int index, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
328 unsigned int new_index); |
4359 | 329 |
330 /** | |
331 * Returns the conversation in the window at the specified index. | |
332 * | |
333 * If the index is out of range, this returns @c NULL. | |
334 * | |
335 * @param win The window. | |
336 * @param index The index containing a conversation. | |
337 * | |
338 * @return The conversation at the specified index. | |
339 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
340 GaimConversation *gaim_window_get_conversation_at(const GaimWindow *win, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
341 unsigned int index); |
4359 | 342 |
343 /** | |
344 * Returns the number of conversations in the window. | |
345 * | |
346 * @param win The window. | |
347 * | |
348 * @return The number of conversations. | |
349 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
350 size_t gaim_window_get_conversation_count(const GaimWindow *win); |
4359 | 351 |
352 /** | |
353 * Switches the active conversation to the one at the specified index. | |
354 * | |
355 * If @a index is out of range, this does nothing. | |
356 * | |
357 * @param win The window. | |
358 * @param index The new index. | |
359 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
360 void gaim_window_switch_conversation(GaimWindow *win, unsigned int index); |
4359 | 361 |
362 /** | |
363 * Returns the active conversation in the window. | |
364 * | |
365 * @param win The window. | |
366 * | |
367 * @return The active conversation. | |
368 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
369 GaimConversation *gaim_window_get_active_conversation(const GaimWindow *win); |
4359 | 370 |
371 /** | |
372 * Returns the list of conversations in the specified window. | |
373 * | |
374 * @param win The window. | |
375 * | |
376 * @return The list of conversations. | |
377 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
378 GList *gaim_window_get_conversations(const GaimWindow *win); |
4359 | 379 |
380 /** | |
381 * Returns a list of all windows. | |
382 * | |
383 * @return A list of windows. | |
384 */ | |
385 GList *gaim_get_windows(void); | |
386 | |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
387 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
388 * Returns the first window containing a conversation of the specified type. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
389 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
390 * @param type The conversation type. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
391 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
392 * @return The window if found, or @c NULL if not found. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
393 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
394 GaimWindow *gaim_get_first_window_with_type(GaimConversationType type); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
395 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
396 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
397 * Returns the last window containing a conversation of the specified type. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
398 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
399 * @param type The conversation type. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
400 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
401 * @return The window if found, or @c NULL if not found. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
402 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
403 GaimWindow *gaim_get_last_window_with_type(GaimConversationType type); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
404 |
4359 | 405 /*@}*/ |
406 | |
407 /**************************************************************************/ | |
408 /** @name Conversation API */ | |
409 /**************************************************************************/ | |
410 /*@{*/ | |
411 | |
412 /** | |
413 * Creates a new conversation of the specified type. | |
414 * | |
415 * @param type The type of conversation. | |
4476
62c1e5e656d0
[gaim-migrate @ 4751]
Christian Hammond <chipx86@chipx86.com>
parents:
4469
diff
changeset
|
416 * @param user The account opening the conversation window on the gaim |
62c1e5e656d0
[gaim-migrate @ 4751]
Christian Hammond <chipx86@chipx86.com>
parents:
4469
diff
changeset
|
417 * user's end. |
4359 | 418 * @param name The name of the conversation. |
419 * | |
420 * @return The new conversation. | |
421 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
422 GaimConversation *gaim_conversation_new(GaimConversationType type, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
423 GaimAccount *account, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
424 const char *name); |
4359 | 425 |
426 /** | |
427 * Destroys the specified conversation and removes it from the parent | |
428 * window. | |
429 * | |
430 * If this conversation is the only one contained in the parent window, | |
431 * that window is also destroyed. | |
432 * | |
433 * @param conv The conversation to destroy. | |
434 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
435 void gaim_conversation_destroy(GaimConversation *conv); |
4359 | 436 |
437 /** | |
438 * Returns the specified conversation's type. | |
439 * | |
440 * @param conv The conversation. | |
441 * | |
442 * @return The conversation's type. | |
443 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
444 GaimConversationType gaim_conversation_get_type(const GaimConversation *conv); |
4359 | 445 |
446 /** | |
447 * Sets the specified conversation's UI operations structure. | |
448 * | |
449 * @param conv The conversation. | |
450 * @param ops The UI conversation operations structure. | |
451 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
452 void gaim_conversation_set_ui_ops(GaimConversation *conv, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
453 GaimConversationUiOps *ops); |
4359 | 454 |
455 /** | |
456 * Returns the specified conversation's UI operations structure. | |
457 * | |
458 * @param conv The conversation. | |
459 * | |
460 * @return The operations structure. | |
461 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
462 GaimConversationUiOps *gaim_conversation_get_ui_ops( |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
463 const GaimConversation *conv); |
4359 | 464 |
465 /** | |
4491 | 466 * Sets the specified conversation's gaim_account. |
4359 | 467 * |
4491 | 468 * This gaim_account represents the user using gaim, not the person the user |
4359 | 469 * is having a conversation/chat/flame with. |
470 * | |
471 * @param conv The conversation. | |
4491 | 472 * @param account The gaim_account. |
4359 | 473 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
474 void gaim_conversation_set_account(GaimConversation *conv, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
475 GaimAccount *account); |
4359 | 476 |
477 /** | |
4491 | 478 * Returns the specified conversation's gaim_account. |
4359 | 479 * |
4491 | 480 * This gaim_account represents the user using gaim, not the person the user |
4359 | 481 * is having a conversation/chat/flame with. |
482 * | |
483 * @param conv The conversation. | |
484 * | |
4491 | 485 * @return The conversation's gaim_account. |
4359 | 486 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
487 GaimAccount *gaim_conversation_get_account(const GaimConversation *conv); |
4359 | 488 |
489 /** | |
490 * Returns the specified conversation's gaim_connection. | |
491 * | |
492 * This is the same as gaim_conversation_get_user(conv)->gc. | |
493 * | |
494 * @param conv The conversation. | |
495 * | |
496 * @return The conversation's gaim_connection. | |
497 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
498 GaimConnection *gaim_conversation_get_gc(const GaimConversation *conv); |
4359 | 499 |
500 /** | |
501 * Sets the specified conversation's title. | |
502 * | |
503 * @param conv The conversation. | |
504 * @param title The title. | |
505 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
506 void gaim_conversation_set_title(GaimConversation *conv, const char *title); |
4359 | 507 |
508 /** | |
509 * Returns the specified conversation's title. | |
510 * | |
511 * @param win The conversation. | |
512 * | |
513 * @return The title. | |
514 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
515 const char *gaim_conversation_get_title(const GaimConversation *conv); |
4359 | 516 |
517 /** | |
518 * Automatically sets the specified conversation's title. | |
519 * | |
520 * This function takes OPT_IM_ALIAS_TAB into account, as well as the | |
521 * user's alias. | |
522 * | |
523 * @param conv The conversation. | |
524 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
525 void gaim_conversation_autoset_title(GaimConversation *conv); |
4359 | 526 |
527 /** | |
528 * Returns the specified conversation's index in the parent window. | |
529 * | |
530 * @param conv The conversation. | |
531 * | |
532 * @return The current index in the parent window. | |
533 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
534 int gaim_conversation_get_index(const GaimConversation *conv); |
4359 | 535 |
536 /** | |
537 * Sets the conversation's unseen state. | |
538 * | |
539 * @param conv The conversation. | |
540 * @param state The new unseen state. | |
541 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
542 void gaim_conversation_set_unseen(GaimConversation *conv, |
4359 | 543 GaimUnseenState state); |
544 | |
545 /** | |
546 * Returns the conversation's unseen state. | |
547 * | |
548 * @param conv The conversation. | |
549 * | |
550 * @param The conversation's unseen state. | |
551 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
552 GaimUnseenState gaim_conversation_get_unseen(const GaimConversation *conv); |
4359 | 553 |
554 /** | |
555 * Returns the specified conversation's name. | |
556 * | |
557 * @param conv The conversation. | |
558 * | |
559 * @return The conversation's name. | |
560 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
561 const char *gaim_conversation_get_name(const GaimConversation *conv); |
4359 | 562 |
563 /** | |
564 * Enables or disables logging for this conversation. | |
565 * | |
566 * @param log @c TRUE if logging should be enabled, or @c FALSE otherwise. | |
567 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
568 void gaim_conversation_set_logging(GaimConversation *conv, gboolean log); |
4359 | 569 |
570 /** | |
571 * Returns whether or not logging is enabled for this conversation. | |
572 * | |
573 * @return @c TRUE if logging is enabled, or @c FALSE otherwise. | |
574 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
575 gboolean gaim_conversation_is_logging(const GaimConversation *conv); |
4359 | 576 |
577 /** | |
578 * Returns the specified conversation's send history. | |
579 * | |
580 * @param conv The conversation. | |
581 * | |
582 * @return The conversation's send history. | |
583 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
584 GList *gaim_conversation_get_send_history(const GaimConversation *conv); |
4359 | 585 |
586 /** | |
587 * Sets the specified conversation's history. | |
588 * | |
589 * @param conv The conversation. | |
590 * @param history The history. | |
591 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
592 void gaim_conversation_set_history(GaimConversation *conv, GString *history); |
4359 | 593 |
594 /** | |
595 * Returns the specified conversation's history. | |
596 * | |
597 * @param conv The conversation. | |
598 * | |
599 * @return The conversation's history. | |
600 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
601 GString *gaim_conversation_get_history(const GaimConversation *conv); |
4359 | 602 |
603 /** | |
604 * Returns the specified conversation's parent window. | |
605 * | |
606 * @param conv The conversation. | |
607 * | |
608 * @return The conversation's parent window. | |
609 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
610 GaimWindow *gaim_conversation_get_window(const GaimConversation *conv); |
4359 | 611 |
612 /** | |
613 * Returns the specified conversation's IM-specific data. | |
614 * | |
615 * If the conversation type is not GAIM_CONV_IM, this will return @c NULL. | |
616 * | |
617 * @param conv The conversation. | |
618 * | |
619 * @return The IM-specific data. | |
620 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
621 GaimIm *gaim_conversation_get_im_data(const GaimConversation *conv); |
4359 | 622 |
623 #define GAIM_IM(c) (gaim_conversation_get_im_data(c)) | |
624 | |
625 /** | |
626 * Returns the specified conversation's chat-specific data. | |
627 * | |
628 * If the conversation type is not GAIM_CONV_CHAT, this will return @c NULL. | |
629 * | |
630 * @param conv The conversation. | |
631 * | |
632 * @return The chat-specific data. | |
633 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
634 GaimChat *gaim_conversation_get_chat_data(const GaimConversation *conv); |
4359 | 635 |
636 #define GAIM_CHAT(c) (gaim_conversation_get_chat_data(c)) | |
637 | |
638 /** | |
4877
249382064693
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
639 * Sets extra data for a conversation. |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
640 * |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
641 * @param conv The conversation. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
642 * @param key The unique key. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
643 * @param data The data to assign. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
644 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
645 void gaim_conversation_set_data(GaimConversation *conv, const char *key, |
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
646 gpointer data); |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
647 |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
648 /** |
4877
249382064693
[gaim-migrate @ 5207]
Christian Hammond <chipx86@chipx86.com>
parents:
4876
diff
changeset
|
649 * Returns extra data in a conversation. |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
650 * |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
651 * @param conv The conversation. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
652 * @param key The unqiue key. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
653 * |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
654 * @return The data associated with the key. |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
655 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
656 gpointer gaim_conversation_get_data(GaimConversation *conv, const char *key); |
4876
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
657 |
9567b13d0e98
[gaim-migrate @ 5206]
Christian Hammond <chipx86@chipx86.com>
parents:
4491
diff
changeset
|
658 /** |
4359 | 659 * Returns a list of all conversations. |
660 * | |
661 * This list includes both IMs and chats. | |
662 * | |
663 * @return A GList of all conversations. | |
664 */ | |
665 GList *gaim_get_conversations(void); | |
666 | |
667 /** | |
668 * Returns a list of all IMs. | |
669 * | |
670 * @return A GList of all IMs. | |
671 */ | |
672 GList *gaim_get_ims(void); | |
673 | |
674 /** | |
675 * Returns a list of all chats. | |
676 * | |
677 * @return A GList of all chats. | |
678 */ | |
679 GList *gaim_get_chats(void); | |
680 | |
681 /** | |
682 * Finds the conversation with the specified name. | |
683 * | |
684 * @param name The name of the conversation. | |
685 * | |
686 * @return The conversation if found, or @c NULL otherwise. | |
687 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
688 GaimConversation *gaim_find_conversation(const char *name); |
4359 | 689 |
690 /** | |
691 * Finds a conversation with the specified name and user. | |
692 * | |
693 * @param name The name of the conversation. | |
4491 | 694 * @param account The gaim_account associated with the conversation. |
4359 | 695 * |
696 * @return The conversation if found, or @c NULL otherwise. | |
697 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
698 GaimConversation *gaim_find_conversation_with_account( |
5563
9eb5b13fd412
[gaim-migrate @ 5965]
Christian Hammond <chipx86@chipx86.com>
parents:
5207
diff
changeset
|
699 const char *name, const GaimAccount *account); |
4359 | 700 |
701 /** | |
702 * Writes to a conversation window. | |
703 * | |
704 * This function should not be used to write IM or chat messages. Use | |
705 * gaim_im_write() and gaim_chat_write() instead. Those functions will | |
706 * most likely call this anyway, but they may do their own formatting, | |
707 * sound playback, etc. | |
708 * | |
709 * This can be used to write generic messages, such as "so and so closed | |
710 * the conversation window." | |
711 * | |
712 * @param conv The conversation. | |
713 * @param who The user who sent the message. | |
714 * @param message The message. | |
715 * @param length The length of the message. | |
716 * @param flags The flags. | |
717 * @param mtime The time the message was sent. | |
718 * | |
719 * @see gaim_im_write() | |
720 * @see gaim_chat_write() | |
721 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
722 void gaim_conversation_write(GaimConversation *conv, const char *who, |
4359 | 723 const char *message, size_t length, int flags, |
724 time_t mtime); | |
725 | |
726 /** | |
727 * Updates the progress bar on a conversation window | |
728 * (if one exists in the UI). | |
729 * | |
730 * This is used for loading images typically. | |
731 * | |
732 * @param conv The conversation. | |
733 * @param percent The percentage. | |
734 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
735 void gaim_conversation_update_progress(GaimConversation *conv, float percent); |
4359 | 736 |
737 /** | |
738 * Updates the visual status and UI of a conversation. | |
739 * | |
740 * @param conv The conversation. | |
741 * @param type The update type. | |
742 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
743 void gaim_conversation_update(GaimConversation *conv, GaimConvUpdateType type); |
4359 | 744 |
745 /** | |
746 * Calls a function on each conversation. | |
747 * | |
748 * @param func The function. | |
749 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
750 void gaim_conversation_foreach(void (*func)(GaimConversation *conv)); |
4359 | 751 |
752 /*@}*/ | |
753 | |
754 | |
755 /**************************************************************************/ | |
756 /** @name IM Conversation API */ | |
757 /**************************************************************************/ | |
758 /*@{*/ | |
759 | |
760 /** | |
761 * Gets an IM's parent conversation. | |
762 * | |
763 * @param im The IM. | |
764 * | |
765 * @return The parent conversation. | |
766 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
767 GaimConversation *gaim_im_get_conversation(const GaimIm *im); |
4359 | 768 |
769 /** | |
770 * Sets the IM's typing state. | |
771 * | |
772 * @param im The IM. | |
773 * @param state The typing state. | |
774 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
775 void gaim_im_set_typing_state(GaimIm *im, int state); |
4359 | 776 |
777 /** | |
778 * Returns the IM's typing state. | |
779 * | |
780 * @param im The IM. | |
781 * | |
782 * @return The IM's typing state. | |
783 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
784 int gaim_im_get_typing_state(const GaimIm *im); |
4359 | 785 |
786 /** | |
787 * Starts the IM's typing timeout. | |
788 * | |
789 * @param im The IM. | |
790 * @param timeout The timeout. | |
791 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
792 void gaim_im_start_typing_timeout(GaimIm *im, int timeout); |
4359 | 793 |
794 /** | |
795 * Stops the IM's typing timeout. | |
796 * | |
797 * @param im The IM. | |
798 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
799 void gaim_im_stop_typing_timeout(GaimIm *im); |
4359 | 800 |
801 /** | |
802 * Returns the IM's typing timeout. | |
803 * | |
804 * @param im The IM. | |
805 * | |
806 * @return The timeout. | |
807 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
808 guint gaim_im_get_typing_timeout(const GaimIm *im); |
4359 | 809 |
810 /** | |
811 * Sets the IM's time until it should send another typing notification. | |
812 * | |
813 * @param im The IM. | |
814 * @param val The time. | |
815 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
816 void gaim_im_set_type_again(GaimIm *im, time_t val); |
4359 | 817 |
818 /** | |
819 * Returns the IM's time until it should send another typing notification. | |
820 * | |
821 * @param im The IM. | |
822 * | |
823 * @return The time. | |
824 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
825 time_t gaim_im_get_type_again(const GaimIm *im); |
4359 | 826 |
827 /** | |
828 * Starts the IM's type again timeout. | |
829 * | |
830 * @param im The IM. | |
831 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
832 void gaim_im_start_type_again_timeout(GaimIm *im); |
4359 | 833 |
834 /** | |
835 * Stops the IM's type again timeout. | |
836 * | |
837 * @param im The IM. | |
838 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
839 void gaim_im_stop_type_again_timeout(GaimIm *im); |
4359 | 840 |
841 /** | |
842 * Returns the IM's type again timeout interval. | |
843 * | |
844 * @param im The IM. | |
845 * | |
846 * @return The type again timeout interval. | |
847 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
848 guint gaim_im_get_type_again_timeout(const GaimIm *im); |
4359 | 849 |
850 /** | |
851 * Updates the visual typing notification for an IM conversation. | |
852 * | |
853 * @param im The IM. | |
854 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
855 void gaim_im_update_typing(GaimIm *im); |
4359 | 856 |
857 /** | |
858 * Writes to an IM. | |
859 * | |
860 * The @a len parameter is used for writing binary data, such as an | |
861 * image. If @c message is text, specify -1 for @a len. | |
862 * | |
863 * @param im The IM. | |
864 * @param who The user who sent the message. | |
865 * @param message The message to write. | |
866 * @param len The length of the message, or -1 to specify the length | |
867 * of @a message. | |
868 * @param flag The flags. | |
869 * @param mtime The time the message was sent. | |
870 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
871 void gaim_im_write(GaimIm *im, const char *who, |
4359 | 872 const char *message, size_t len, int flag, time_t mtime); |
873 | |
874 /** | |
875 * Sends a message to this IM conversation. | |
876 * | |
877 * @param im The IM. | |
878 * @param message The message to send. | |
879 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
880 void gaim_im_send(GaimIm *im, const char *message); |
4359 | 881 |
882 /*@}*/ | |
883 | |
884 | |
885 /**************************************************************************/ | |
886 /** @name Chat Conversation API */ | |
887 /**************************************************************************/ | |
888 /*@{*/ | |
889 | |
890 /** | |
891 * Gets a chat's parent conversation. | |
892 * | |
893 * @param chat The chat. | |
894 * | |
895 * @return The parent conversation. | |
896 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
897 GaimConversation *gaim_chat_get_conversation(const GaimChat *chat); |
4359 | 898 |
899 /** | |
900 * Sets the list of users in the chat room. | |
901 * | |
902 * @param chat The chat. | |
903 * @param users The list of users. | |
904 * | |
905 * @return The list passed. | |
906 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
907 GList *gaim_chat_set_users(GaimChat *chat, GList *users); |
4359 | 908 |
909 /** | |
910 * Returns a list of users in the chat room. | |
911 * | |
912 * @param chat The chat. | |
913 * | |
914 * @return The list of users. | |
915 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
916 GList *gaim_chat_get_users(const GaimChat *chat); |
4359 | 917 |
918 /** | |
919 * Ignores a user in a chat room. | |
920 * | |
921 * @param chat The chat. | |
922 * @param name The name of the user. | |
923 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
924 void gaim_chat_ignore(GaimChat *chat, const char *name); |
4359 | 925 |
926 /** | |
927 * Unignores a user in a chat room. | |
928 * | |
929 * @param chat The chat. | |
930 * @param name The name of the user. | |
931 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
932 void gaim_chat_unignore(GaimChat *chat, const char *name); |
4359 | 933 |
934 /** | |
935 * Sets the list of ignored users in the chat room. | |
936 * | |
937 * @param chat The chat. | |
938 * @param ignored The list of ignored users. | |
939 * | |
940 * @return The list passed. | |
941 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
942 GList *gaim_chat_set_ignored(GaimChat *chat, GList *ignored); |
4359 | 943 |
944 /** | |
945 * Returns the list of ignored users in the chat room. | |
946 * | |
947 * @param chat The chat. | |
948 * | |
949 * @return The list of ignored users. | |
950 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
951 GList *gaim_chat_get_ignored(const GaimChat *chat); |
4359 | 952 |
953 /** | |
954 * Returns the actual name of the specified ignored user, if it exists in | |
955 * the ignore list. | |
956 * | |
957 * If the user found contains a prefix, such as '+' or '\@', this is also | |
958 * returned. The username passed to the function does not have to have this | |
959 * formatting. | |
960 * | |
961 * @param chat The chat. | |
962 * @param user The user to check in the ignore list. | |
963 * | |
964 * @return The ignored user if found, complete with prefixes, or @c NULL | |
965 * if not found. | |
966 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
967 const char *gaim_chat_get_ignored_user(const GaimChat *chat, |
4359 | 968 const char *user); |
969 | |
970 /** | |
971 * Returns @c TRUE if the specified user is ignored. | |
972 * | |
973 * @param chat The chat. | |
974 * @param user The user. | |
975 * | |
976 * @return @c TRUE if the user is in the ignore list; @c FALSE otherwise. | |
977 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
978 gboolean gaim_chat_is_user_ignored(const GaimChat *chat, |
4359 | 979 const char *user); |
980 | |
981 /** | |
982 * Sets the chat room's topic. | |
983 * | |
984 * @param chat The chat. | |
985 * @param who The user that set the topic. | |
986 * @param topic The topic. | |
987 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
988 void gaim_chat_set_topic(GaimChat *chat, const char *who, |
4359 | 989 const char *topic); |
990 | |
991 /** | |
992 * Returns the chat room's topic. | |
993 * | |
994 * @param chat The chat. | |
995 * | |
996 * @return The chat's topic. | |
997 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
998 const char *gaim_chat_get_topic(const GaimChat *chat); |
4359 | 999 |
1000 /** | |
1001 * Sets the chat room's ID. | |
1002 * | |
1003 * @param chat The chat. | |
1004 * @param id The ID. | |
1005 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1006 void gaim_chat_set_id(GaimChat *chat, int id); |
4359 | 1007 |
1008 /** | |
1009 * Returns the chat room's ID. | |
1010 * | |
1011 * @param chat The chat. | |
1012 * | |
1013 * @return The ID. | |
1014 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1015 int gaim_chat_get_id(const GaimChat *chat); |
4359 | 1016 |
1017 /** | |
1018 * Writes to a chat. | |
1019 * | |
1020 * @param chat The chat. | |
1021 * @param who The user who sent the message. | |
1022 * @param message The message to write. | |
1023 * @param flag The flags. | |
1024 * @param mtime The time the message was sent. | |
1025 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1026 void gaim_chat_write(GaimChat *chat, const char *who, |
4359 | 1027 const char *message, int flag, time_t mtime); |
1028 | |
1029 /** | |
1030 * Sends a message to this chat conversation. | |
1031 * | |
1032 * @param chat The chat. | |
1033 * @param message The message to send. | |
1034 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1035 void gaim_chat_send(GaimChat *chat, const char *message); |
4359 | 1036 |
1037 /** | |
1038 * Adds a user to a chat. | |
1039 * | |
1040 * @param chat The chat. | |
1041 * @param user The user to add. | |
1042 * @param extra_msg An extra message to display with the join message. | |
1043 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1044 void gaim_chat_add_user(GaimChat *chat, const char *user, |
4359 | 1045 const char *extra_msg); |
1046 | |
1047 /** | |
1048 * Renames a user in a chat. | |
1049 * | |
1050 * @param chat The chat. | |
1051 * @param old_user The old username. | |
1052 * @param new_user The new username. | |
1053 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1054 void gaim_chat_rename_user(GaimChat *chat, const char *old_user, |
4359 | 1055 const char *new_user); |
1056 | |
1057 /** | |
1058 * Removes a user from a chat, optionally with a reason. | |
1059 * | |
1060 * @param chat The chat. | |
1061 * @param user The user that is being removed. | |
1062 * @param reason The optional reason given for the removal. Can be @c NULL. | |
1063 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1064 void gaim_chat_remove_user(GaimChat *chat, const char *user, |
4359 | 1065 const char *reason); |
1066 | |
1067 /** | |
1068 * Finds a chat with the specified chat ID. | |
1069 * | |
1070 * @param gc The gaim_connection. | |
1071 * @param id The chat ID. | |
1072 * | |
1073 * @return The chat conversation. | |
1074 */ | |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1075 GaimConversation *gaim_find_chat(const GaimConnection *gc, int id); |
4359 | 1076 |
1077 /*@}*/ | |
1078 | |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1079 /**************************************************************************/ |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1080 /** @name Conversation Placement Functions */ |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1081 /**************************************************************************/ |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1082 /*@{*/ |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1083 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1084 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1085 * Adds a conversation placement function to the list of possible functions. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1086 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1087 * @param name The name of the function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1088 * @param fnc A pointer to the function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1089 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1090 * @return The index of this entry. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1091 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1092 int gaim_conv_placement_add_fnc(const char *name, GaimConvPlacementFunc fnc); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1093 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1094 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1095 * Removes a conversation placement function from the list of possible |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1096 * functions. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1097 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1098 * @param index The index of the function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1099 */ |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1100 void gaim_conv_placement_remove_fnc(int index); |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1101 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1102 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1103 * Returns the number of conversation placement functions. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1104 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1105 * @return The number of registered functions. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1106 */ |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1107 int gaim_conv_placement_get_fnc_count(void); |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1108 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1109 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1110 * Returns the name of the conversation placement function at the |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1111 * specified index. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1112 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1113 * @param index The index. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1114 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1115 * @return The name of the function, or @c NULL if this index is out of |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1116 * range. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1117 */ |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1118 const char *gaim_conv_placement_get_name(int index); |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1119 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1120 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1121 * Returns a pointer to the conversation placement function at the |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1122 * specified index. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1123 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1124 * @param index The index. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1125 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1126 * @return A pointer to the function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1127 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1128 GaimConvPlacementFunc gaim_conv_placement_get_fnc(int index); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1129 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1130 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1131 * Returns the index of the specified conversation placement function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1132 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1133 * @param fnc A pointer to the registered function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1134 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1135 * @return The index of the conversation, or -1 if the function is not |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1136 * registered. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1137 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1138 int gaim_conv_placement_get_fnc_index(GaimConvPlacementFunc fnc); |
4469
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1139 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1140 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1141 * Returns the index of the active conversation placement function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1142 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1143 * @param index The index of the active function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1144 */ |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1145 int gaim_conv_placement_get_active(void); |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1146 |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1147 /** |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1148 * Sets the active conversation placement function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1149 * |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1150 * @param index The index of the function. |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1151 */ |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1152 void gaim_conv_placement_set_active(int index); |
d76095396a0e
[gaim-migrate @ 4744]
Christian Hammond <chipx86@chipx86.com>
parents:
4465
diff
changeset
|
1153 |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1154 /*@}*/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1155 |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1156 /**************************************************************************/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1157 /** @name UI Registration Functions */ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1158 /**************************************************************************/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1159 /*@{*/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1160 |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1161 /** |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1162 * Sets the UI operations structure to be used in all gaim conversation |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1163 * windows. |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1164 * |
5207
2819f90a20ba
[gaim-migrate @ 5575]
Christian Hammond <chipx86@chipx86.com>
parents:
5034
diff
changeset
|
1165 * @param ops The UI operations structure. |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1166 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1167 void gaim_set_win_ui_ops(GaimWindowUiOps *ops); |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1168 |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1169 /** |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1170 * Returns the gaim window UI operations structure to be used in |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1171 * new windows. |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1172 * |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1173 * @return A filled-out GaimWindowUiOps structure. |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1174 */ |
5676
dae79aefac8d
[gaim-migrate @ 6094]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
1175 GaimWindowUiOps *gaim_get_win_ui_ops(void); |
4481
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1176 |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1177 /*@}*/ |
b30b0a02ada0
[gaim-migrate @ 4756]
Christian Hammond <chipx86@chipx86.com>
parents:
4476
diff
changeset
|
1178 |
4890
89cb14edf8cf
[gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
4877
diff
changeset
|
1179 #endif /* _GAIM_CONVERSATION_H_ */ |