annotate 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
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,
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 };
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 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
11 following arguments:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
13 enum gaim_event, void *, void *
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15 The first arg is hopefully obvious.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 The second arg is a pointer to a function that takes various args
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 depending on which event you're dealing with.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 The third arg is any data you want to send to your function, as a final
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 argument.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
20
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 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
22
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 event_signon:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 char *name
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 'name' is your username. (Note that this can be returned through
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27 other methods.)
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
28
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
29 event_signoff:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
30 (none)
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
31
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
32 event_im_recv:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
33 char **who, char **text
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
35 'who' is the username of the person who sent the message.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
36 '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
37 message they sent.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
38
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
39 Note that you can modify these values. (You are encouraged to do so!)
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
40
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
41 event_im_send:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
42 char **who, char **text
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 '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
45 '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
46 message you're sending.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
47
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
48 Note that you can modify these values. (You are _not_ encouraged to
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
49 do so ;-) .)
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 event_buddy_signon:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
52 char *who
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 'who' is who signed on.
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
55
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
56 event_buddy_signoff:
5ca21b68eb29 [gaim-migrate @ 103]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
57 char *who
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 'who' is who signed off.