Mercurial > pidgin.yaz
comparison plugins/SIGNALS @ 94:9f6ce50ffb78
[gaim-migrate @ 104]
Woohoo, the landing of the plugins. Nearly everything necessary is here. The
only thing missing is that you can't load a plugin without signing on first
(at least, not without some trickery).
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Sun, 09 Apr 2000 11:18:25 +0000 |
parents | 5ca21b68eb29 |
children | c5a1a1b05c26 |
comparison
equal
deleted
inserted
replaced
93:5ca21b68eb29 | 94:9f6ce50ffb78 |
---|---|
8 }; | 8 }; |
9 | 9 |
10 To add a signal handler, call the fuction gaim_signal_connect with the | 10 To add a signal handler, call the fuction gaim_signal_connect with the |
11 following arguments: | 11 following arguments: |
12 | 12 |
13 enum gaim_event, void *, void * | 13 void *, enum gaim_event, void *, void * |
14 | 14 |
15 The first arg is hopefully obvious. | 15 The first arg is the handle that was passed to gaim_signal_init. You did |
16 The second arg is a pointer to a function that takes various args | 16 save it, right? |
17 The second arg is hopefully obvious. | |
18 The third arg is a pointer to a function that takes various args | |
17 depending on which event you're dealing with. | 19 depending on which event you're dealing with. |
18 The third arg is any data you want to send to your function, as a final | 20 The fourth arg is any data you want to send to your function, as a final |
19 argument. | 21 argument. |
22 | |
23 To remove a signal handler, call the function gaim_signal_disconnect with the | |
24 following arguments: | |
25 | |
26 void *, enum gaim_event, void * | |
27 | |
28 The first arg is the handle that was passed to gaim_signal_init. | |
29 The second arg is hopefully obvious. | |
30 The third arg is a pointer to the function you attached. | |
31 | |
32 Note that it deletes *all* functions matching the function you pass, not just | |
33 one. Sorry, that's just the way it works. | |
20 | 34 |
21 So here are the args that get passed to your functions in various events: | 35 So here are the args that get passed to your functions in various events: |
22 | 36 |
23 event_signon: | 37 event_signon: |
24 char *name | 38 (none) |
25 | 39 |
26 'name' is your username. (Note that this can be returned through | 40 Note that you can get the username (which would probably be the only |
27 other methods.) | 41 useful information here) from other places. (Read gaim.h for details). |
28 | 42 |
29 event_signoff: | 43 event_signoff: |
30 (none) | 44 (none) |
31 | 45 |
32 event_im_recv: | 46 event_im_recv: |
35 'who' is the username of the person who sent the message. | 49 'who' is the username of the person who sent the message. |
36 'text' is the actual strict text (with HTML tags and all) of the | 50 'text' is the actual strict text (with HTML tags and all) of the |
37 message they sent. | 51 message they sent. |
38 | 52 |
39 Note that you can modify these values. (You are encouraged to do so!) | 53 Note that you can modify these values. (You are encouraged to do so!) |
54 Note that *other* plugins can also modify these values, so you should | |
55 check that they are not NULL, and try not to leave them as NULL. | |
40 | 56 |
41 event_im_send: | 57 event_im_send: |
42 char **who, char **text | 58 char **who, char **text |
43 | 59 |
44 'who' is the username of the person you're sending the message to. | 60 'who' is the username of the person you're sending the message to. |