[glib] gsignal: improve g_signal_new docs.



commit 3d98c449b1638a4dc242279737c36fa3e37cb8ce
Author: Stefan Kost <ensonic users sf net>
Date:   Sat Mar 6 14:15:25 2010 +0200

    gsignal: improve g_signal_new docs.
    
    Using 0 for class_offset is only a means to be able to add signal when running
    out of slots in the lass structure.

 gobject/gsignal.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/gobject/gsignal.c b/gobject/gsignal.c
index c7c1679..a5d35eb 100644
--- a/gobject/gsignal.c
+++ b/gobject/gsignal.c
@@ -1285,7 +1285,7 @@ g_signal_query (guint         signal_id,
  *  %G_SIGNAL_RUN_FIRST or %G_SIGNAL_RUN_LAST.
  * @class_offset: The offset of the function pointer in the class structure
  *  for this type. Used to invoke a class method generically. Pass 0 to
- *  not associate a class method with this signal.
+ *  not associate a class method slot with this signal.
  * @accumulator: the accumulator for this signal; may be %NULL.
  * @accu_data: user data for the @accumulator.
  * @c_marshaller: the function to translate arrays of parameter values to
@@ -1305,6 +1305,11 @@ g_signal_query (guint         signal_id,
  * When registering a signal and looking up a signal, either separator can
  * be used, but they cannot be mixed.
  *
+ * If 0 is used for @class_offset subclasses cannot override the class handler
+ * in their <code>class_init</code> method by doing
+ * <code>super_class->signal_handler = my_signal_handler</code>. Instead they
+ * will have to use g_signal_override_class_handler().
+ *
  * Returns: the signal id
  */
 guint



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]