annotate plugins/SIGNALS @ 937:189b780c1e07

[gaim-migrate @ 947] remove printf committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Thu, 28 Sep 2000 02:06:05 +0000
parents 15d005f8baaf
children 91b7377e7b45
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 enum gaim_event {
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 event_signon = 0,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 event_signoff,
133
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
4 event_away,
136
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
5 event_back,
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 event_im_recv,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 event_im_send,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 event_buddy_signon,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 event_buddy_signoff,
133
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
10 event_buddy_away,
136
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
11 event_buddy_back,
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
12 event_blist_update,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
13 event_chat_invited,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
14 event_chat_join,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
15 event_chat_leave,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
16 event_chat_buddy_join,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
17 event_chat_buddy_leave,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
18 event_chat_recv,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
19 event_chat_send,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
20 event_warned,
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
21 event_error,
808
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
22 event_quit,
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
23 event_new_conversation
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 };
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
25
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 To add a signal handler, call the fuction gaim_signal_connect with the
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 following arguments:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
29 void *, enum gaim_event, void *, void *
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
30
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
31 The first arg is the handle that was passed to gaim_signal_init. You did
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
32 save it, right?
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
33 The second arg is hopefully obvious.
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
34 The third arg is a pointer to a function that takes various args
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
35 depending on which event you're dealing with.
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
36 The fourth arg is any data you want to send to your function, as a final
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
37 argument.
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
39 To remove a signal handler, call the function gaim_signal_disconnect with the
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
40 following arguments:
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
41
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
42 void *, enum gaim_event, void *
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
43
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
44 The first arg is the handle that was passed to gaim_signal_init.
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
45 The second arg is hopefully obvious.
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
46 The third arg is a pointer to the function you attached.
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
47
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
48 Note that it deletes *all* functions matching the function you pass, not just
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
49 one. Sorry, that's just the way it works.
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
51 So here are the args that get passed to your functions in various events:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53 event_signon:
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
54 (none)
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
55
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
56 Note that you can get the username (which would probably be the only
136
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
57 useful information here) from other places. (Read gaim.h for details.)
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
58
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
59 event_signoff:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60 (none)
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61
133
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
62 event_away:
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
63 (none)
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
64
136
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
65 Note that the away message that's being used can be retrieved from a
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
66 global variable. (Read gaim.h for details.)
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
67
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
68 event_back:
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
69 (none)
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
70
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
71 event_im_recv:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
72 char **who, char **text
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
73
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
74 'who' is the username of the person who sent the message.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
75 'text' is the actual strict text (with HTML tags and all) of the
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
76 message they sent.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
77
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
78 Note that you can modify these values. (You are encouraged to do so!)
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
79 Note that *other* plugins can also modify these values, so you should
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
80 check that they are not NULL, and try not to leave them as NULL.
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
81
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
82 event_im_send:
103
c5a1a1b05c26 [gaim-migrate @ 113]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 94
diff changeset
83 char *who, char **text
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
84
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
85 'who' is the username of the person you're sending the message to.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
86 'text' is the actual strict text (with HTML tags and all) of the
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
87 message you're sending.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
88
103
c5a1a1b05c26 [gaim-migrate @ 113]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 94
diff changeset
89 Note that you can modify outgoing text. (You are _not_ encouraged to
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
90 do so ;-) .)
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
91
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
92 event_buddy_signon:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
93 char *who
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
94
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
95 'who' is who signed on.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
96
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
97 event_buddy_signoff:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
98 char *who
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
99
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
100 'who' is who signed off.
116
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
101
133
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
102 event_buddy_away:
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
103 char *who
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
104
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
105 'who' is who went away.
e277d5f0c1dd [gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 117
diff changeset
106
136
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
107 event_buddy_back:
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
108 char *who
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
109
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
110 'who' is who is no longer away.
4e91b92f91a7 [gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 133
diff changeset
111
116
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
112 event_blist_update:
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
113 (none)
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
114
117
395a8593918f [gaim-migrate @ 127]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 116
diff changeset
115 This event is called when the buddylist is updated (automatically every
395a8593918f [gaim-migrate @ 127]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 116
diff changeset
116 20 seconds)
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
117
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
118 event_chat_invited:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
119 char *who, char *room, char *message
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
120
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
121 'who' is who invited you to a chat room.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
122 'room' is the room they invited you to.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
123 'message' is the (optional) message they sent to invite you, and may be
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
124 an empty string.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
125
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
126 event_chat_join:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
127 char *room
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
128
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
129 'room' is the chat room that you have just joined.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
130
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
131 event_chat_leave:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
132 char *room
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
133
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
134 'room' is the chat room that you have just left.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
135
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
136 event_chat_buddy_join:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
137 char *room, char *who
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
138
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
139 'room' is the room the person joined.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
140 'who' is the screenname of the person who joined.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
141
404
3d94cc1dc424 [gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 401
diff changeset
142 This is also triggered upon entering the room for every person in the
3d94cc1dc424 [gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 401
diff changeset
143 room, including yourself. (E.g. if you join a room that already had 3
3d94cc1dc424 [gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 401
diff changeset
144 people in it this will be called 4 times, once for each of them and
3d94cc1dc424 [gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 401
diff changeset
145 once again for you. You will not always be the last one this is called
3d94cc1dc424 [gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 401
diff changeset
146 for though.)
3d94cc1dc424 [gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 401
diff changeset
147
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
148 event_chat_buddy_leave:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
149 char *room, char *who
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
150
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
151 'room' is the room the person left.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
152 'who' is the screenname of the person who left.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
153
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
154 event_chat_recv:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
155 char *room, char *who, char *text
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
156
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
157 'room' should be obvious by now.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
158 'who' should be too.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
159 'text' is the message that got sent.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
160
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
161 Note that because of the bizarre way chat works, you also receive
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
162 messages that you send. I didn't design it, AOL did.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
163
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
164 event_chat_send:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
165 char *room, char **text
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
166
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
167 'room'. Need I say more.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
168 'text' is what you're about to say, linkified/HTML-ized, but not
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
169 TOC-escaped.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
170
401
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
171 Be aware that you receive messages you send (as noted above). This
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
172 event will be called before you actually send the message though.
7c74e2f579b5 [gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 392
diff changeset
173
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
174 event_warned:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
175 char *who, int level
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
176
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
177 'who' is who warned you. Note that this can be NULL, indicating either
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
178 an anonymous warning, or your warning level has dropped.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
179 'level' is your new warning level.
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
180
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
181 event_error:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
182 int error
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
183
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
184 'error' is the number of the error as defined by the TOC PROTOCOL
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
185 document, which can be found in the docs/ directory of the source
836
15d005f8baaf [gaim-migrate @ 846]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
186 tree. Note that if the person is using Oscar, this number is often
15d005f8baaf [gaim-migrate @ 846]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
187 plain wrong, and this event may not always be triggered on error.
15d005f8baaf [gaim-migrate @ 846]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 808
diff changeset
188 Experiment to find what is reliable.
391
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
189
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
190 event_quit:
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
191 (none)
be408b41c172 [gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 136
diff changeset
192
392
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
193 Called when gaim quits normally. This can be called from either the
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
194 signed on state or the signed off state (from either the Cancel button
df5127560034 [gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 391
diff changeset
195 in the login window or the Quit option in the File menu on the buddy
425
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
196 list). If gaim dies or is murdered, this won't be called. It's not my
ae7c762775cd [gaim-migrate @ 435]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 404
diff changeset
197 fault, it's Seg's.
808
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
198
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
199 event_new_conversation:
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
200 char *who
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
201
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
202 'who' is who the conversation is with. This gets called when a new
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
203 conversation window is created. You can use find_conversation(char *)
9d61f3d01046 [gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 425
diff changeset
204 to then find the struct conversation * and modify those values.