comparison plugins/SIGNALS @ 93:5ca21b68eb29

[gaim-migrate @ 103] Notes on how to do plugins with gaim (note that this hasn't been implemented completely yet, this is just how it *should* work). committer: Tailor Script <tailor@pidgin.im>
author Eric Warmenhoven <eric@warmenhoven.org>
date Sun, 09 Apr 2000 08:25:15 +0000
parents
children 9f6ce50ffb78
comparison
equal deleted inserted replaced
92:f3c6cf79f651 93:5ca21b68eb29
1 enum gaim_event {
2 event_signon = 0,
3 event_signoff,
4 event_im_recv,
5 event_im_send,
6 event_buddy_signon,
7 event_buddy_signoff,
8 };
9
10 To add a signal handler, call the fuction gaim_signal_connect with the
11 following arguments:
12
13 enum gaim_event, void *, void *
14
15 The first arg is hopefully obvious.
16 The second arg is a pointer to a function that takes various args
17 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
19 argument.
20
21 So here are the args that get passed to your functions in various events:
22
23 event_signon:
24 char *name
25
26 'name' is your username. (Note that this can be returned through
27 other methods.)
28
29 event_signoff:
30 (none)
31
32 event_im_recv:
33 char **who, char **text
34
35 '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
37 message they sent.
38
39 Note that you can modify these values. (You are encouraged to do so!)
40
41 event_im_send:
42 char **who, char **text
43
44 'who' is the username of the person you're sending the message to.
45 'text' is the actual strict text (with HTML tags and all) of the
46 message you're sending.
47
48 Note that you can modify these values. (You are _not_ encouraged to
49 do so ;-) .)
50
51 event_buddy_signon:
52 char *who
53
54 'who' is who signed on.
55
56 event_buddy_signoff:
57 char *who
58
59 'who' is who signed off.