| 1 <?xml version='1.0' encoding="ISO-8859-1"?> |
1 <?xml version='1.0' encoding="ISO-8859-1"?> |
| 2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" |
2 <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ |
3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ |
| 4 ]> |
4 ]> |
| 5 <chapter id="chapter-signals-gtkconv"> |
5 <chapter id="chapter-signals-gtkconv"> |
| 6 <title>Conversation signals</title> |
6 <title>Conversation signals</title> |
| 7 |
7 |
| 8 <programlisting> |
8 <refsect1 id="gtkconvs.signals" role="signal_proto"> |
| 9 @signals |
9 <title role="signal_proto.title">List of signals</title> |
| 10 @signal conversation-dragging |
10 <synopsis> |
| 11 @signal conversation-timestamp |
11 "<link linkend="gtkconvs-conversation-dragging">conversation-dragging</link>" |
| 12 @signal displaying-im-msg |
12 "<link linkend="gtkconvs-conversation-timestamp">conversation-timestamp</link>" |
| 13 @signal displayed-im-msg |
13 "<link linkend="gtkconvs-displaying-im-msg">displaying-im-msg</link>" |
| 14 @signal displaying-chat-msg |
14 "<link linkend="gtkconvs-displayed-im-msg">displayed-im-msg</link>" |
| 15 @signal displayed-chat-msg |
15 "<link linkend="gtkconvs-displaying-chat-msg">displaying-chat-msg</link>" |
| 16 @signal conversation-switched |
16 "<link linkend="gtkconvs-displayed-chat-msg">displayed-chat-msg</link>" |
| 17 @signal conversation-hiding |
17 "<link linkend="gtkconvs-conversation-switched">conversation-switched</link>" |
| 18 @signal conversation-displayed |
18 "<link linkend="gtkconvs-conversation-hiding">conversation-hiding</link>" |
| 19 @endsignals |
19 "<link linkend="gtkconvs-conversation-displayed">conversation-displayed</link>" |
| 20 |
20 </synopsis> |
| 21 @see gtkconv.h |
21 </refsect1> |
| 22 |
22 |
| 23 @signaldef conversation-dragging |
23 <refsect1 id="gtkconvs.signal-details" role="signals"> |
| 24 @signalproto |
24 <title role="signals.title">Signal details</title> |
| 25 void (*conversation_dragging)(PidginWindow *source, PidginWindow *destination); |
25 |
| 26 @endsignalproto |
26 <refsect2 id="gtkconvs-conversation-dragging" role="signal"> |
| 27 @signaldesc |
27 <title>The <literal>"conversation-dragging"</literal> signal</title> |
| 28 Emitted when a conversation is being drag and dropped between windows. |
28 <programlisting> |
| 29 @param source The window where the conversation is. |
29 void user_function (PidginWindow *source, |
| 30 @param destination The window where the conversation will be moved to. |
30 PidginWindow *destination, |
| 31 @endsignaldef |
31 gpointer user_data)</programlisting> |
| 32 |
32 <para> |
| 33 @signaldef conversation-timestamp |
33 Emitted when a conversation is being drag and dropped between windows. |
| 34 @signalproto |
34 </para> |
| 35 char *(*conversation_timestamp)(PurpleConversation *conv, time_t when, |
35 <variablelist role="params"> |
| 36 gboolean show_date); |
36 <varlistentry> |
| 37 @endsignalproto |
37 <term><parameter>source</parameter> :</term> |
| 38 @signaldesc |
38 <listitem><simpara>The window where the conversation is.</simpara></listitem> |
| 39 Emitted to allow plugins to customize the timestamp on a message. |
39 </varlistentry> |
| 40 @param conv The conversation the message belongs to. |
40 <varlistentry> |
| 41 @param when The time to be converted to a string. |
41 <term><parameter>destination</parameter> :</term> |
| 42 @param show_date Whether the date should be displayed. |
42 <listitem><simpara>The window where the conversation will be moved to.</simpara></listitem> |
| 43 @return A textual representation of the time, or @c NULL to use a |
43 </varlistentry> |
| 44 default format. |
44 <varlistentry> |
| 45 @endsignaldef |
45 <term><parameter>user_data</parameter> :</term> |
| 46 |
46 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| 47 |
47 </varlistentry> |
| 48 @signaldef displaying-im-msg |
48 </variablelist> |
| 49 @signalproto |
49 </refsect2> |
| 50 gboolean (*displaying_im_msg)(PurpleAccount *account, const char *who, |
50 |
| 51 char **message, PurpleConversation *conv, |
51 <refsect2 id="gtkconvs-conversation-timestamp" role="signal"> |
| 52 PurpleMessageFlags flags); |
52 <title>The <literal>"conversation-timestamp"</literal> signal</title> |
| 53 @endsignalproto |
53 <programlisting> |
| 54 @signaldesc |
54 char * user_function (PurpleConversation *conv, |
| 55 Emitted just before a message is displayed in an IM conversation. |
55 time_t when, |
| 56 @a message is a pointer to a string, so the plugin can replace the |
56 gboolean show_date, |
| 57 message that will be displayed. This can also be used to cancel displaying |
57 gpointer user_data)</programlisting> |
| 58 a message by returning @c TRUE. |
58 <para> |
| 59 @note |
59 Emitted to allow plugins to customize the timestamp on a message. |
| 60 Make sure to free @a *message before you replace it! |
60 </para> |
| 61 @param account The account. |
61 <variablelist role="params"> |
| 62 @param who The name of the user. |
62 <varlistentry> |
| 63 @param message A pointer to the message. |
63 <term><parameter>conv</parameter> :</term> |
| 64 @param conv The conversation. |
64 <listitem><simpara>The conversation the message belongs to.</simpara></listitem> |
| 65 @param flags Flags for this message. |
65 </varlistentry> |
| 66 @return @c TRUE if the message should be canceled, or @c FALSE otherwise. |
66 <varlistentry> |
| 67 @endsignaldef |
67 <term><parameter>when</parameter> :</term> |
| 68 |
68 <listitem><simpara>The time to be converted to a string.</simpara></listitem> |
| 69 @signaldef displayed-im-msg |
69 </varlistentry> |
| 70 @signalproto |
70 <varlistentry> |
| 71 void (*displayed_im_msg)(PurpleAccount *account, const char *who, |
71 <term><parameter>show_date</parameter> :</term> |
| 72 char *message, PurpleConversation *conv, |
72 <listitem><simpara>Whether the date should be displayed.</simpara></listitem> |
| 73 PurpleMessageFlags flags); |
73 </varlistentry> |
| 74 @endsignalproto |
74 <varlistentry> |
| 75 @signaldesc |
75 <term><parameter>user_data</parameter> :</term> |
| 76 Emitted after a message is displayed in an IM conversation. |
76 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| 77 @param account The account. |
77 </varlistentry> |
| 78 @param who The name of the user. |
78 <varlistentry> |
| 79 @param message The message. |
79 <term><emphasis>Returns</emphasis> :</term> |
| 80 @param conv The conversation. |
80 <listitem><simpara>A textual representation of the time, or <literal>NULL</literal> to use a default format.</simpara></listitem> |
| 81 @param flags Flags for this message. |
81 </varlistentry> |
| 82 @endsignaldef |
82 </variablelist> |
| 83 |
83 </refsect2> |
| 84 @signaldef displaying-chat-msg |
84 |
| 85 @signalproto |
85 <refsect2 id="gtkconvs-displaying-im-msg" role="signal"> |
| 86 gboolean (*displaying_chat_msg)(PurpleAccount *account, const char *who, |
86 <title>The <literal>"displaying-im-msg"</literal> signal</title> |
| 87 char **message, PurpleConversation *conv, |
87 <programlisting> |
| 88 PurpleMessageFlags flags); |
88 gboolean user_function (PurpleAccount *account, |
| 89 @endsignalproto |
89 const char *who, |
| 90 @signaldesc |
90 char **message, |
| 91 Emitted just before a message is displayed in a chat. |
91 PurpleConversation *conv, |
| 92 @a message is a pointer to a string, so the plugin can replace the |
92 PurpleMessageFlags flags, |
| 93 message that will be displayed. This can also be used to cancel displaying |
93 gpointer user_data)</programlisting> |
| 94 a message by returning @c TRUE. |
94 <para> |
| 95 @note |
95 Emitted just before a message is displayed in an IM conversation. <literal>message</literal> is a pointer to a string, so the plugin can replace the message that will be displayed. This can also be used to cancel displaying a message by returning <literal>TRUE</literal>. |
| 96 Make sure to free @a *message before you replace it! |
96 </para> |
| 97 @param account The account the message is being displayed and sent on. |
97 <para><emphasis>Note</emphasis> : |
| 98 @param who The name of the user. |
98 Make sure to free <literal>*message</literal> before you replace it! |
| 99 @param message A pointer to the message that will be displayed and sent. |
99 </para> |
| 100 @param conv The conversation the message is being displayed and sent on. |
100 <variablelist role="params"> |
| 101 @param flags Flags for this message. |
101 <varlistentry> |
| 102 @return @c TRUE if the message should be canceled, or @c FALSE otherwise. |
102 <term><parameter>account</parameter> :</term> |
| 103 @endsignaldef |
103 <listitem><simpara>The account.</simpara></listitem> |
| 104 |
104 </varlistentry> |
| 105 @signaldef displayed-chat-msg |
105 <varlistentry> |
| 106 @signalproto |
106 <term><parameter>who</parameter> :</term> |
| 107 void (*displayed_chat_msg)(PurpleAccount *account, const char *who, |
107 <listitem><simpara>The name of the user.</simpara></listitem> |
| 108 char *message, PurpleConversation *conv, |
108 </varlistentry> |
| 109 PurpleMessageFlags flags); |
109 <varlistentry> |
| 110 @endsignalproto |
110 <term><parameter>message</parameter> :</term> |
| 111 @signaldesc |
111 <listitem><simpara>A pointer to the message.</simpara></listitem> |
| 112 Emitted after a message is displayed in a chat conversation. |
112 </varlistentry> |
| 113 @param account The account the message is being displayed and sent on. |
113 <varlistentry> |
| 114 @param who The name of the user. |
114 <term><parameter>conv</parameter> :</term> |
| 115 @param message A pointer to the message that will be displayed and sent. |
115 <listitem><simpara>The conversation.</simpara></listitem> |
| 116 @param conv The conversation the message is being displayed and sent on. |
116 </varlistentry> |
| 117 @param flags Flags for this message. |
117 <varlistentry> |
| 118 @endsignaldef |
118 <term><parameter>flags</parameter> :</term> |
| 119 |
119 <listitem><simpara>Flags for this message.</simpara></listitem> |
| 120 @signaldef conversation-switched |
120 </varlistentry> |
| 121 @signalproto |
121 <varlistentry> |
| 122 void (*conversation_switched)(PurpleConversation *conv); |
122 <term><parameter>user_data</parameter> :</term> |
| 123 @endsignalproto |
123 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| 124 @signaldesc |
124 </varlistentry> |
| 125 Emitted when a window switched from one conversation to another. |
125 <varlistentry> |
| 126 @param new_conv The now active conversation. |
126 <term><emphasis>Returns</emphasis> :</term> |
| 127 @endsignaldef |
127 <listitem><simpara><literal>TRUE</literal> if the message should be canceled, or <literal>FALSE</literal> otherwise.</simpara></listitem> |
| 128 |
128 </varlistentry> |
| 129 @signaldef conversation-hiding |
129 </variablelist> |
| 130 @signalproto |
130 </refsect2> |
| 131 void (*conversation_hiding)(PidginConversation *gtkconv); |
131 |
| 132 @endsignalproto |
132 <refsect2 id="gtkconvs-displayed-im-msg" role="signal"> |
| 133 @signaldesc |
133 <title>The <literal>"displayed-im-msg"</literal> signal</title> |
| 134 Emitted immediately before an existing conversation is hidden. |
134 <programlisting> |
| 135 @param gtkconv The PidginConversation |
135 void user_function (PurpleAccount *account, |
| 136 @endsignaldef |
136 const char *who, |
| 137 |
137 char *message, |
| 138 @signaldef conversation-displayed |
138 PurpleConversation *conv, |
| 139 @signalproto |
139 PurpleMessageFlags flags, |
| 140 void (*conversation_displayed)(PidginConversation *gtkconv); |
140 gpointer user_data)</programlisting> |
| 141 @endsignalproto |
141 <para> |
| 142 @signaldesc |
142 Emitted after a message is displayed in an IM conversation. |
| 143 Emitted right after the Pidgin UI is attached to a new or a hidden conversation. |
143 </para> |
| 144 @param gtkconv The PidginConversation |
144 <variablelist role="params"> |
| 145 @endsignaldef |
145 <varlistentry> |
| 146 |
146 <term><parameter>account</parameter> :</term> |
| 147 </programlisting> |
147 <listitem><simpara>The account.</simpara></listitem> |
| |
148 </varlistentry> |
| |
149 <varlistentry> |
| |
150 <term><parameter>who</parameter> :</term> |
| |
151 <listitem><simpara>The name of the user.</simpara></listitem> |
| |
152 </varlistentry> |
| |
153 <varlistentry> |
| |
154 <term><parameter>message</parameter> :</term> |
| |
155 <listitem><simpara>The message.</simpara></listitem> |
| |
156 </varlistentry> |
| |
157 <varlistentry> |
| |
158 <term><parameter>conv</parameter> :</term> |
| |
159 <listitem><simpara>The conversation.</simpara></listitem> |
| |
160 </varlistentry> |
| |
161 <varlistentry> |
| |
162 <term><parameter>flags</parameter> :</term> |
| |
163 <listitem><simpara>Flags for this message.</simpara></listitem> |
| |
164 </varlistentry> |
| |
165 <varlistentry> |
| |
166 <term><parameter>user_data</parameter> :</term> |
| |
167 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| |
168 </varlistentry> |
| |
169 </variablelist> |
| |
170 </refsect2> |
| |
171 |
| |
172 <refsect2 id="gtkconvs-displaying-chat-msg" role="signal"> |
| |
173 <title>The <literal>"displaying-chat-msg"</literal> signal</title> |
| |
174 <programlisting> |
| |
175 gboolean user_function (PurpleAccount *account, |
| |
176 const char *who, |
| |
177 char **message, |
| |
178 PurpleConversation *conv, |
| |
179 PurpleMessageFlags flags, |
| |
180 gpointer user_data)</programlisting> |
| |
181 <para> |
| |
182 Emitted just before a message is displayed in a chat. <literal>message</literal> is a pointer to a string, so the plugin can replace the message that will be displayed. This can also be used to cancel displaying a message by returning <literal>TRUE</literal>. |
| |
183 </para> |
| |
184 <para><emphasis>Note</emphasis> : |
| |
185 Make sure to free <literal>*message</literal> before you replace it! |
| |
186 </para> |
| |
187 <variablelist role="params"> |
| |
188 <varlistentry> |
| |
189 <term><parameter>account</parameter> :</term> |
| |
190 <listitem><simpara>The account the message is being displayed and sent on.</simpara></listitem> |
| |
191 </varlistentry> |
| |
192 <varlistentry> |
| |
193 <term><parameter>who</parameter> :</term> |
| |
194 <listitem><simpara>The name of the user.</simpara></listitem> |
| |
195 </varlistentry> |
| |
196 <varlistentry> |
| |
197 <term><parameter>message</parameter> :</term> |
| |
198 <listitem><simpara>A pointer to the message that will be displayed and sent.</simpara></listitem> |
| |
199 </varlistentry> |
| |
200 <varlistentry> |
| |
201 <term><parameter>conv</parameter> :</term> |
| |
202 <listitem><simpara>The conversation the message is being displayed and sent on.</simpara></listitem> |
| |
203 </varlistentry> |
| |
204 <varlistentry> |
| |
205 <term><parameter>flags</parameter> :</term> |
| |
206 <listitem><simpara>Flags for this message.</simpara></listitem> |
| |
207 </varlistentry> |
| |
208 <varlistentry> |
| |
209 <term><parameter>user_data</parameter> :</term> |
| |
210 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| |
211 </varlistentry> |
| |
212 <varlistentry> |
| |
213 <term><emphasis>Returns</emphasis> :</term> |
| |
214 <listitem><simpara><literal>TRUE</literal> if the message should be canceled, or <literal>FALSE</literal> otherwise.</simpara></listitem> |
| |
215 </varlistentry> |
| |
216 </variablelist> |
| |
217 </refsect2> |
| |
218 |
| |
219 <refsect2 id="gtkconvs-displayed-chat-msg" role="signal"> |
| |
220 <title>The <literal>"displayed-chat-msg"</literal> signal</title> |
| |
221 <programlisting> |
| |
222 void user_function (PurpleAccount *account, |
| |
223 const char *who, |
| |
224 char *message, |
| |
225 PurpleConversation *conv, |
| |
226 PurpleMessageFlags flags, |
| |
227 gpointer user_data)</programlisting> |
| |
228 <para> |
| |
229 Emitted after a message is displayed in a chat conversation. |
| |
230 </para> |
| |
231 <variablelist role="params"> |
| |
232 <varlistentry> |
| |
233 <term><parameter>account</parameter> :</term> |
| |
234 <listitem><simpara>The account the message is being displayed and sent on.</simpara></listitem> |
| |
235 </varlistentry> |
| |
236 <varlistentry> |
| |
237 <term><parameter>who</parameter> :</term> |
| |
238 <listitem><simpara>The name of the user.</simpara></listitem> |
| |
239 </varlistentry> |
| |
240 <varlistentry> |
| |
241 <term><parameter>message</parameter> :</term> |
| |
242 <listitem><simpara>A pointer to the message that will be displayed and sent.</simpara></listitem> |
| |
243 </varlistentry> |
| |
244 <varlistentry> |
| |
245 <term><parameter>conv</parameter> :</term> |
| |
246 <listitem><simpara>The conversation the message is being displayed and sent on.</simpara></listitem> |
| |
247 </varlistentry> |
| |
248 <varlistentry> |
| |
249 <term><parameter>flags</parameter> :</term> |
| |
250 <listitem><simpara>Flags for this message.</simpara></listitem> |
| |
251 </varlistentry> |
| |
252 <varlistentry> |
| |
253 <term><parameter>user_data</parameter> :</term> |
| |
254 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| |
255 </varlistentry> |
| |
256 </variablelist> |
| |
257 </refsect2> |
| |
258 |
| |
259 <refsect2 id="gtkconvs-conversation-switched" role="signal"> |
| |
260 <title>The <literal>"conversation-switched"</literal> signal</title> |
| |
261 <programlisting> |
| |
262 void user_function (PurpleConversation *conv, |
| |
263 gpointer user_data)</programlisting> |
| |
264 <para> |
| |
265 Emitted when a window switched from one conversation to another. |
| |
266 </para> |
| |
267 <variablelist role="params"> |
| |
268 <varlistentry> |
| |
269 <term><parameter>new_conv</parameter> :</term> |
| |
270 <listitem><simpara>The now active conversation.</simpara></listitem> |
| |
271 </varlistentry> |
| |
272 <varlistentry> |
| |
273 <term><parameter>user_data</parameter> :</term> |
| |
274 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| |
275 </varlistentry> |
| |
276 </variablelist> |
| |
277 </refsect2> |
| |
278 |
| |
279 <refsect2 id="gtkconvs-conversation-hiding" role="signal"> |
| |
280 <title>The <literal>"conversation-hiding"</literal> signal</title> |
| |
281 <programlisting> |
| |
282 void user_function (PidginConversation *gtkconv, |
| |
283 gpointer user_data)</programlisting> |
| |
284 <para> |
| |
285 Emitted immediately before an existing conversation is hidden. |
| |
286 </para> |
| |
287 <variablelist role="params"> |
| |
288 <varlistentry> |
| |
289 <term><parameter>gtkconv</parameter> :</term> |
| |
290 <listitem><simpara>The PidginConversation.</simpara></listitem> |
| |
291 </varlistentry> |
| |
292 <varlistentry> |
| |
293 <term><parameter>user_data</parameter> :</term> |
| |
294 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| |
295 </varlistentry> |
| |
296 </variablelist> |
| |
297 </refsect2> |
| |
298 |
| |
299 <refsect2 id="gtkconvs-conversation-displayed" role="signal"> |
| |
300 <title>The <literal>"conversation-displayed"</literal> signal</title> |
| |
301 <programlisting> |
| |
302 void user_function (PidginConversation *gtkconv, |
| |
303 gpointer user_data)</programlisting> |
| |
304 <para> |
| |
305 Emitted right after the Pidgin UI is attached to a new or a hidden conversation. |
| |
306 </para> |
| |
307 <variablelist role="params"> |
| |
308 <varlistentry> |
| |
309 <term><parameter>gtkconv</parameter> :</term> |
| |
310 <listitem><simpara>The PidginConversation.</simpara></listitem> |
| |
311 </varlistentry> |
| |
312 <varlistentry> |
| |
313 <term><parameter>user_data</parameter> :</term> |
| |
314 <listitem><simpara>user data set when the signal handler was connected.</simpara></listitem> |
| |
315 </varlistentry> |
| |
316 </variablelist> |
| |
317 </refsect2> |
| |
318 |
| |
319 </refsect1> |
| |
320 |
| 148 </chapter> |
321 </chapter> |