Mercurial > pidgin
comparison libpurple/conversation.h @ 18866:e7314d58ebe6
merge of '568907d26b94a41acc8768523cdc469bdf385d2c'
and '90af3f4273c546393e7066ee5f281a8417cb3876'
author | Will Thompson <will.thompson@collabora.co.uk> |
---|---|
date | Fri, 10 Aug 2007 17:45:05 +0000 |
parents | d57926990768 |
children | deb9471d7142 |
comparison
equal
deleted
inserted
replaced
18829:7a594763c229 | 18866:e7314d58ebe6 |
---|---|
147 * Any UI representing a conversation must assign a filled-out | 147 * Any UI representing a conversation must assign a filled-out |
148 * PurpleConversationUiOps structure to the PurpleConversation. | 148 * PurpleConversationUiOps structure to the PurpleConversation. |
149 */ | 149 */ |
150 struct _PurpleConversationUiOps | 150 struct _PurpleConversationUiOps |
151 { | 151 { |
152 /** Called when @a conv is created (but before the @ref | |
153 * conversation-created signal is emitted). | |
154 */ | |
152 void (*create_conversation)(PurpleConversation *conv); | 155 void (*create_conversation)(PurpleConversation *conv); |
156 | |
157 /** Called just before @a conv is freed. */ | |
153 void (*destroy_conversation)(PurpleConversation *conv); | 158 void (*destroy_conversation)(PurpleConversation *conv); |
159 /** Write a message to a chat. If this field is @c NULL, libpurple will | |
160 * fall back to using #write_conv. | |
161 * @see purple_conv_chat_write() | |
162 */ | |
154 void (*write_chat)(PurpleConversation *conv, const char *who, | 163 void (*write_chat)(PurpleConversation *conv, const char *who, |
155 const char *message, PurpleMessageFlags flags, | 164 const char *message, PurpleMessageFlags flags, |
156 time_t mtime); | 165 time_t mtime); |
166 /** Write a message to an IM conversation. If this field is @c NULL, | |
167 * libpurple will fall back to using #write_conv. | |
168 * @see purple_conv_im_write() | |
169 */ | |
157 void (*write_im)(PurpleConversation *conv, const char *who, | 170 void (*write_im)(PurpleConversation *conv, const char *who, |
158 const char *message, PurpleMessageFlags flags, | 171 const char *message, PurpleMessageFlags flags, |
159 time_t mtime); | 172 time_t mtime); |
160 void (*write_conv)(PurpleConversation *conv, const char *name, const char *alias, | 173 /** Write a message to a conversation. This is used rather than |
161 const char *message, PurpleMessageFlags flags, | 174 * the chat- or im-specific ops for generic messages, such as system |
175 * messages like "x is now know as y". | |
176 * @see purple_conversation_write() | |
177 */ | |
178 void (*write_conv)(PurpleConversation *conv, | |
179 const char *name, | |
180 const char *alias, | |
181 const char *message, | |
182 PurpleMessageFlags flags, | |
162 time_t mtime); | 183 time_t mtime); |
163 | 184 |
164 void (*chat_add_users)(PurpleConversation *conv, GList *cbuddies, gboolean new_arrivals); | 185 /** Add @a cbuddies to a chat. |
165 | 186 * @param cbuddies A @C GList of #PurpleConvChatBuddy structs. |
187 * @param new_arrivals Whether join notices should be shown. | |
188 * (Join notices are actually written to the | |
189 * conversation by #purple_conv_chat_add_users().) | |
190 */ | |
191 void (*chat_add_users)(PurpleConversation *conv, | |
192 GList *cbuddies, | |
193 gboolean new_arrivals); | |
194 /** Rename the user in this chat named @a old_name to @a new_name. (The | |
195 * rename message is written to the conversation by libpurple.) | |
196 * @param new_alias @a new_name's new alias, if they have one. | |
197 * @see purple_conv_chat_add_users() | |
198 */ | |
166 void (*chat_rename_user)(PurpleConversation *conv, const char *old_name, | 199 void (*chat_rename_user)(PurpleConversation *conv, const char *old_name, |
167 const char *new_name, const char *new_alias); | 200 const char *new_name, const char *new_alias); |
201 /** Remove @a users from a chat. | |
202 * @param users A @C GList of <tt>const char *</tt>s. | |
203 * @see purple_conv_chat_rename_user() | |
204 */ | |
168 void (*chat_remove_users)(PurpleConversation *conv, GList *users); | 205 void (*chat_remove_users)(PurpleConversation *conv, GList *users); |
206 /** Called when a user's flags are changed. | |
207 * @see purple_conv_chat_user_set_flags() | |
208 */ | |
169 void (*chat_update_user)(PurpleConversation *conv, const char *user); | 209 void (*chat_update_user)(PurpleConversation *conv, const char *user); |
170 | 210 |
211 /** Present this conversation to the user; for example, by displaying | |
212 * the IM dialog. | |
213 */ | |
171 void (*present)(PurpleConversation *conv); | 214 void (*present)(PurpleConversation *conv); |
172 | 215 |
216 /** If this UI has a concept of focus (as in a windowing system) and | |
217 * this conversation has the focus, return @c TRUE; otherwise, return | |
218 * @c FALSE. | |
219 */ | |
173 gboolean (*has_focus)(PurpleConversation *conv); | 220 gboolean (*has_focus)(PurpleConversation *conv); |
174 | 221 |
175 /* Custom Smileys */ | 222 /* Custom Smileys */ |
176 gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote); | 223 gboolean (*custom_smiley_add)(PurpleConversation *conv, const char *smile, gboolean remote); |
177 void (*custom_smiley_write)(PurpleConversation *conv, const char *smile, | 224 void (*custom_smiley_write)(PurpleConversation *conv, const char *smile, |
178 const guchar *data, gsize size); | 225 const guchar *data, gsize size); |
179 void (*custom_smiley_close)(PurpleConversation *conv, const char *smile); | 226 void (*custom_smiley_close)(PurpleConversation *conv, const char *smile); |
180 | 227 |
228 /** Prompt the user for confirmation to send @a message. This function | |
229 * should arrange for the message to be sent if the user accepts. If | |
230 * this field is @c NULL, libpurple will fall back to using | |
231 * #purple_request_action(). | |
232 */ | |
181 void (*send_confirm)(PurpleConversation *conv, const char *message); | 233 void (*send_confirm)(PurpleConversation *conv, const char *message); |
182 | 234 |
183 void (*_purple_reserved1)(void); | 235 void (*_purple_reserved1)(void); |
184 void (*_purple_reserved2)(void); | 236 void (*_purple_reserved2)(void); |
185 void (*_purple_reserved3)(void); | 237 void (*_purple_reserved3)(void); |