annotate plugins/SIGNALS @ 116:8c982b7f18d4

[gaim-migrate @ 126] Hmm committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Fri, 14 Apr 2000 08:36:36 +0000
parents c5a1a1b05c26
children 395a8593918f
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,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 event_im_recv,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 event_im_send,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 event_buddy_signon,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 event_buddy_signoff,
116
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
8 event_blist_update
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 };
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11 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
12 following arguments:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
14 void *, enum gaim_event, void *, void *
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
15
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
16 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
17 save it, right?
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
18 The second arg is hopefully obvious.
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
19 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
20 depending on which event you're dealing with.
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
21 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
22 argument.
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
24 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
25 following arguments:
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
26
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
27 void *, enum gaim_event, void *
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
28
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
29 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
30 The second arg is hopefully obvious.
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
31 The third arg is a pointer to the function you attached.
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 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
34 one. Sorry, that's just the way it works.
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 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
37
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38 event_signon:
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
39 (none)
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40
94
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
41 Note that you can get the username (which would probably be the only
9f6ce50ffb78 [gaim-migrate @ 104]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 93
diff changeset
42 useful information here) from other places. (Read gaim.h for details).
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
43
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
44 event_signoff:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45 (none)
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
46
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47 event_im_recv:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
48 char **who, char **text
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
50 'who' is the username of the person who sent the message.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
51 '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
52 message they sent.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
53
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
54 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
55 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
56 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
57
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
58 event_im_send:
103
c5a1a1b05c26 [gaim-migrate @ 113]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 94
diff changeset
59 char *who, char **text
93
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
60
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
61 '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
62 '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
63 message you're sending.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
64
103
c5a1a1b05c26 [gaim-migrate @ 113]
Eric Warmenhoven <eric@warmenhoven.org>
parents: 94
diff changeset
65 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
66 do so ;-) .)
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
67
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
68 event_buddy_signon:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
69 char *who
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
70
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
71 'who' is who signed on.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
72
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
73 event_buddy_signoff:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
74 char *who
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
75
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
76 'who' is who signed off.
116
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
77
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
78 event_blist_update:
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
79 (none)
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
80
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
81 This event is called when the buddylist is updated (automatically every 20 seconds)
8c982b7f18d4 [gaim-migrate @ 126]
Rob Flynn <gaim@robflynn.com>
parents: 103
diff changeset
82