Mercurial > pidgin.yaz
annotate plugins/SIGNALS @ 1392:dc6ba774bfc5
[gaim-migrate @ 1402]
erg
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 07 Jan 2001 20:39:03 +0000 |
parents | 4927ce25d8cc |
children | 96e93119268d |
rev | line source |
---|---|
93 | 1 enum gaim_event { |
2 event_signon = 0, | |
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 | 6 event_im_recv, |
7 event_im_send, | |
8 event_buddy_signon, | |
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, |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
12 event_buddy_idle, |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
13 event_buddy_unidle, |
1058
4927ce25d8cc
[gaim-migrate @ 1068]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1038
diff
changeset
|
14 event_blist_update, |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
15 event_chat_invited, |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
16 event_chat_join, |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
17 event_chat_leave, |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
18 event_chat_buddy_join, |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
19 event_chat_buddy_leave, |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
20 event_chat_recv, |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
21 event_chat_send, |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
22 event_warned, |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
23 event_error, |
808
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
24 event_quit, |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
25 event_new_conversation |
93 | 26 }; |
27 | |
28 To add a signal handler, call the fuction gaim_signal_connect with the | |
29 following arguments: | |
30 | |
94
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
31 void *, enum gaim_event, void *, void * |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
32 |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
33 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
|
34 save it, right? |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
35 The second arg is hopefully obvious. |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
36 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
|
37 depending on which event you're dealing with. |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
38 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
|
39 argument. |
93 | 40 |
94
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
41 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
|
42 following arguments: |
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 void *, enum gaim_event, void * |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
45 |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
46 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
|
47 The second arg is hopefully obvious. |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
48 The third arg is a pointer to the function you attached. |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
49 |
9f6ce50ffb78
[gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
93
diff
changeset
|
50 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
|
51 one. Sorry, that's just the way it works. |
93 | 52 |
53 So here are the args that get passed to your functions in various events: | |
54 | |
55 event_signon: | |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
56 struct gaim_connection *gc |
93 | 57 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
58 'gc' is the new connection. |
93 | 59 |
60 event_signoff: | |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
61 struct gaim_connection *gc |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
62 |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
63 'gc' is the connection that is about to go offline. This is called before |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
64 serv_close is, so you still have a chance to get one last message out. |
93 | 65 |
133
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
117
diff
changeset
|
66 event_away: |
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
117
diff
changeset
|
67 (none) |
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
117
diff
changeset
|
68 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
69 This is fucked up for now. Currently all connections are told to use the |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
70 same away message when the user wants to be Away. The away message that |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
71 is used can be obtained from global variables. |
136
4e91b92f91a7
[gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
72 |
4e91b92f91a7
[gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
73 event_back: |
4e91b92f91a7
[gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
74 (none) |
4e91b92f91a7
[gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
75 |
93 | 76 event_im_recv: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
77 struct gaim_connection *gc, char **who, char **text |
93 | 78 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
79 'gc' is the connection that received the message. |
93 | 80 'who' is the username of the person who sent the message. |
81 'text' is the actual strict text (with HTML tags and all) of the | |
82 message they sent. | |
83 | |
84 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
|
85 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
|
86 check that they are not NULL, and try not to leave them as NULL. |
93 | 87 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
88 gc was placed as the first arg as opposed to the third for intuitiveness. |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
89 Unfortunately, it means that most plugins that use this event need to be |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
90 slightly modified and then recompiled. |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
91 |
93 | 92 event_im_send: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
93 struct gaim_connection *gc, char *who, char **text |
93 | 94 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
95 'gc' is the connection that you are about to send the message through. |
93 | 96 'who' is the username of the person you're sending the message to. |
97 'text' is the actual strict text (with HTML tags and all) of the | |
98 message you're sending. | |
99 | |
1392
dc6ba774bfc5
[gaim-migrate @ 1402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1058
diff
changeset
|
100 Note that you can modify outgoing text. The **text points to a g_malloc'd |
dc6ba774bfc5
[gaim-migrate @ 1402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1058
diff
changeset
|
101 data chunk that contains the text. If your plugin changes it, it should |
dc6ba774bfc5
[gaim-migrate @ 1402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1058
diff
changeset
|
102 either not add length to the string, or g_free *text and g_malloc a new |
dc6ba774bfc5
[gaim-migrate @ 1402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1058
diff
changeset
|
103 segment. Since plugins can modify this, you should not try and remember it |
dc6ba774bfc5
[gaim-migrate @ 1402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1058
diff
changeset
|
104 in your plugin. |
93 | 105 |
106 event_buddy_signon: | |
1038
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1000
diff
changeset
|
107 struct gaim_connection *gc, char *who |
93 | 108 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
109 'who' is who signed on. (There is currently no way to see which connection |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
110 reported that the buddy came online. Hopefully this will happen soon.) |
93 | 111 |
112 event_buddy_signoff: | |
1038
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1000
diff
changeset
|
113 struct gaim_connection *gc, char *who |
93 | 114 |
115 'who' is who signed off. | |
116 | 116 |
133
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
117
diff
changeset
|
117 event_buddy_away: |
1038
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1000
diff
changeset
|
118 struct gaim_connection *gc, char *who |
133
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
117
diff
changeset
|
119 |
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
117
diff
changeset
|
120 'who' is who went away. |
e277d5f0c1dd
[gaim-migrate @ 143]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
117
diff
changeset
|
121 |
136
4e91b92f91a7
[gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
122 event_buddy_back: |
1038
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1000
diff
changeset
|
123 struct gaim_connection *gc, char *who |
136
4e91b92f91a7
[gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
124 |
4e91b92f91a7
[gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
125 'who' is who is no longer away. |
4e91b92f91a7
[gaim-migrate @ 146]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
133
diff
changeset
|
126 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
127 event_buddy_idle: |
1038
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1000
diff
changeset
|
128 struct gaim_connection *gc, char *who |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
129 |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
130 'who' is who went idle. |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
131 |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
132 event_buddy_unidle: |
1038
daad2440a642
[gaim-migrate @ 1048]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1000
diff
changeset
|
133 struct gaim_connection *gc, char *who |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
134 |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
135 'who' is who is no longer idle. |
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
136 |
1058
4927ce25d8cc
[gaim-migrate @ 1068]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1038
diff
changeset
|
137 event_blist_update: |
4927ce25d8cc
[gaim-migrate @ 1068]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1038
diff
changeset
|
138 (none) |
4927ce25d8cc
[gaim-migrate @ 1068]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1038
diff
changeset
|
139 |
4927ce25d8cc
[gaim-migrate @ 1068]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1038
diff
changeset
|
140 called when the idle times are updated in the buddy list |
4927ce25d8cc
[gaim-migrate @ 1068]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1038
diff
changeset
|
141 |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
142 event_chat_invited: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
143 struct gaim_connection *gc, char *who, char *room, char *message |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
144 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
145 'gc' is the connection that received the invitation. |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
146 'who' is who invited you to a chat room. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
147 'room' is the room they invited you to. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
148 '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
|
149 an empty string. |
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 event_chat_join: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
152 struct gaim_connection *gc, char *room |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
153 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
154 'gc' is the connection that joined the room. |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
155 'room' is the chat room that you have just joined. |
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 event_chat_leave: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
158 struct gaim_connection *gc, char *room |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
159 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
160 'gc' is the connection that joined the room. |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
161 'room' is the chat room that you have just left. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
162 |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
163 event_chat_buddy_join: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
164 struct gaim_connection *gc, char *room, char *who |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
165 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
166 'gc' is the connection that the chat room is attached to. |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
167 'room' is the room the person joined. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
168 'who' is the screenname of the person who joined. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
169 |
404
3d94cc1dc424
[gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
401
diff
changeset
|
170 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
|
171 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
|
172 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
|
173 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
|
174 for though.) |
3d94cc1dc424
[gaim-migrate @ 414]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
401
diff
changeset
|
175 |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
176 event_chat_buddy_leave: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
177 struct gaim_connection *gc, char *room, char *who |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
178 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
179 'gc' is the connection that the chat room is attached to. |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
180 'room' is the room the person left. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
181 'who' is the screenname of the person who left. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
182 |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
183 event_chat_recv: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
184 struct gaim_connection *gc, char *room, char *who, char *text |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
185 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
186 'gc' is the connection that received the message. |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
187 'room' should be obvious by now. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
188 'who' should be too. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
189 'text' is the message that got sent. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
190 |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
191 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
|
192 messages that you send. I didn't design it, AOL did. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
193 |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
194 event_chat_send: |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
195 struct gaim_connection *gc, char *room, char **text |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
196 |
1000
91b7377e7b45
[gaim-migrate @ 1010]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
836
diff
changeset
|
197 'gc' is the connection that the message is about to be sent on. |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
198 'room'. Need I say more. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
199 '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
|
200 TOC-escaped. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
201 |
401
7c74e2f579b5
[gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
392
diff
changeset
|
202 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
|
203 event will be called before you actually send the message though. |
1392
dc6ba774bfc5
[gaim-migrate @ 1402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1058
diff
changeset
|
204 The **text pointer behaves the same as the **text pointer for the |
dc6ba774bfc5
[gaim-migrate @ 1402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
1058
diff
changeset
|
205 event_im_send event above; so read the note about it there. |
401
7c74e2f579b5
[gaim-migrate @ 411]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
392
diff
changeset
|
206 |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
207 event_warned: |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
208 char *who, int level |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
209 |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
210 '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
|
211 an anonymous warning, or your warning level has dropped. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
212 'level' is your new warning level. |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
213 |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
214 event_error: |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
215 int error |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
216 |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
217 '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
|
218 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
|
219 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
|
220 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
|
221 Experiment to find what is reliable. |
391
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
222 |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
223 event_quit: |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
224 (none) |
be408b41c172
[gaim-migrate @ 401]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
136
diff
changeset
|
225 |
392
df5127560034
[gaim-migrate @ 402]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
391
diff
changeset
|
226 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
|
227 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
|
228 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
|
229 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
|
230 fault, it's Seg's. |
808
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
231 |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
232 event_new_conversation: |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
233 char *who |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
234 |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
235 '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
|
236 conversation window is created. You can use find_conversation(char *) |
9d61f3d01046
[gaim-migrate @ 818]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
425
diff
changeset
|
237 to then find the struct conversation * and modify those values. |