diff src/signals.h @ 6564:800ef4a51096

[gaim-migrate @ 7086] gaim_signal_register now takes a GaimValue return value and param types. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Thu, 21 Aug 2003 21:54:36 +0000
parents c53a3f0649eb
children 41120df7ed94
line wrap: on
line diff
--- a/src/signals.h	Thu Aug 21 21:21:21 2003 +0000
+++ b/src/signals.h	Thu Aug 21 21:54:36 2003 +0000
@@ -24,6 +24,7 @@
 #define _GAIM_SIGNAL_H_
 
 #include <glib.h>
+#include "value.h"
 
 #define GAIM_CALLBACK(func) ((GaimCallback)func)
 
@@ -43,15 +44,21 @@
 /**
  * Registers a signal in an instance.
  *
- * @param instance The instance to register the signal for.
- * @param signal   The signal name.
- * @param marshal  The marshal function.
+ * @param instance  The instance to register the signal for.
+ * @param signal    The signal name.
+ * @param marshal   The marshal function.
+ * @param ret_value The return value type, or NULL for no return value.
+ * @param num_types The number of values to be passed to the callbacks.
+ * @param ...       The values to pass to the callbacks.
  *
  * @return The signal ID local to that instance, or 0 if the signal
  *         couldn't be registered.
+ *
+ * @see GaimValue
  */
 gulong gaim_signal_register(void *instance, const char *signal,
-							GaimSignalMarshalFunc marshal);
+							GaimSignalMarshalFunc marshal,
+							GaimValue *ret_value, int num_values, ...);
 
 /**
  * Unregisters a signal in an instance.
@@ -69,6 +76,18 @@
 void gaim_signals_unregister_by_instance(void *instance);
 
 /**
+ * Returns a list of value types used for a signal.
+ *
+ * @param instance   The instance the signal is registered to.
+ * @param signal     The signal.
+ * @param num_values The returned number of values.
+ * @param values     The returned list of values.
+ */
+void gaim_signal_get_values(void *instance, const char *signal,
+							GaimValue **ret_value,
+							int *num_values, GaimValue ***values);
+
+/**
  * Connects a signal handler to a signal for a particular object.
  *
  * Take care not to register a handler function twice. Gaim will