]> git.draconx.ca Git - gob-dx.git/blobdiff - doc/gob.1.in
Release 1.0.6
[gob-dx.git] / doc / gob.1.in
index 7d0c285f5053538208a5c90ccc699af8e811083d..d5d817bccfa295ea146339d1b09f5462f308d244 100644 (file)
@@ -382,18 +382,18 @@ value part of the argument.  So for setting an argument of height, one would
 use (for object type My:Object):
 .nf
 
-  gtk_object_set(GTK_OBJECT(object),
-                 MY_OBJECT_ARG_HEIGHT(7),
-                 NULL);
+  gtk_object_set (GTK_OBJECT (object),
+                  MY_OBJECT_ARG_HEIGHT (7),
+                  NULL);
 
 .fi
 And for getting, you would use:
 .nf
 
   int height;
-  gtk_object_set(GTK_OBJECT(object),
-                 MY_OBJECT_GET_ARG_HEIGHT(&height),
-                 NULL);
+  gtk_object_set (GTK_OBJECT (object),
+                  MY_OBJECT_GET_ARG_HEIGHT (&height),
+                  NULL);
 
 .fi
 Note however that the type safety only works completely on GNU C compilers.
@@ -654,6 +654,21 @@ flags, although this is probably very rare.  These are the GTK_RUN_* flags,
 and you can add them without the GTK_RUN_ prefix into a parenthesis, just
 after the "signal" keyword.  By default all public signals are GTK_RUN_ACTION.
 .PP
+Since 1.0.6, gob creates wrapper signal macros for signal connection
+typesafety, at least on gnu compilers.  These macros are named
+<type>_SIGNAL_<signal name>(func), where func is the function pointer.  This
+pointer must be of the correct type, or you will get an initialization from
+wrong pointer type warning.  This macro, much like the argument macros, wraps
+both the name and the function pointer parameters.  For example to connect a
+signal "changed" to a function "foo", you would do:
+.nf
+
+  gtk_signal_connect (GTK_OBJECT (object),
+                      MY_OBJECT_SIGNAL_CHANGED (foo),
+                      NULL);
+
+.fi
+.PP
 Override methods:
 .PP
 If you need to override some method (a signal or a virtual method