diff 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
line wrap: on
line diff
--- a/plugins/SIGNALS	Sun Apr 09 08:25:15 2000 +0000
+++ b/plugins/SIGNALS	Sun Apr 09 11:18:25 2000 +0000
@@ -10,21 +10,35 @@
 To add a signal handler, call the fuction gaim_signal_connect with the
 following arguments:
 
-enum gaim_event, void *, void *
+void *, enum gaim_event, void *, void *
+
+The first arg is the handle that was passed to gaim_signal_init. You did
+	save it, right?
+The second arg is hopefully obvious.
+The third arg is a pointer to a function that takes various args
+	depending on which event you're dealing with.
+The fourth arg is any data you want to send to your function, as a final
+	argument.
 
-The first arg is hopefully obvious.
-The second arg is a pointer to a function that takes various args
-	depending on which event you're dealing with.
-The third arg is any data you want to send to your function, as a final
-	argument.
+To remove a signal handler, call the function gaim_signal_disconnect with the
+following arguments:
+
+void *, enum gaim_event, void *
+
+The first arg is the handle that was passed to gaim_signal_init.
+The second arg is hopefully obvious.
+The third arg is a pointer to the function you attached.
+
+Note that it deletes *all* functions matching the function you pass, not just
+one. Sorry, that's just the way it works.
 
 So here are the args that get passed to your functions in various events:
 
 event_signon:
-	char *name
+	(none)
 
-	'name' is your username. (Note that this can be returned through
-		other methods.)
+	Note that you can get the username (which would probably be the only
+	useful information here) from other places. (Read gaim.h for details).
 
 event_signoff:
 	(none)
@@ -37,6 +51,8 @@
 		message they sent.
 	
 	Note that you can modify these values. (You are encouraged to do so!)
+	Note that *other* plugins can also modify these values, so you should
+	check that they are not NULL, and try not to leave them as NULL.
 
 event_im_send:
 	char **who, char **text