]> git.draconx.ca Git - gob-dx.git/blobdiff - doc/gob2.1.in
Expand --no-touch-headers to include the private header.
[gob-dx.git] / doc / gob2.1.in
index 31f7bfb260dfc9d5c610804e3c85e0c7ce5fe1c5..dfd4016dab1493f82596ddc3672c648d4559efc6 100644 (file)
@@ -57,10 +57,9 @@ changed (implies \-\-no\-touch\-headers).  Be careful with automake, see section
 PREVENTING SPURIOUS BUILDS.
 .TP
 .B \-\-no\-touch\-headers
-Don\'t touch the generated header file unless it really changed, this avoids
-spurious rebuilds, but can confuse some make systems (automake in particular),
-so it is not enabled by default.  Private header is still touched even if
-unchanged however.
+Don\'t touch any generated header file unless that file really changed.
+This avoids spurious rebuilds, but can confuse some make systems so it is not
+enabled by default.
 .TP
 .B \-\-always\-private\-header
 Always create a \fB<basename>-private.h\fR file, even if it would be empty.
@@ -106,6 +105,9 @@ The directory into which output should be placed.
 .B \-\-file\-sep[=c]
 Replace default \'\-\' file name separator.  If no separator character
 is given then none is used.  Only one character can be used.
+.TP
+.B \-\-gtk3
+Use gtk3.
 
 .SH TYPENAMES
 .PP
@@ -235,6 +237,17 @@ For example:
 To make an abstract class (to pass G_TYPE_FLAG_ABSTRACT) add \'(abstract)\'
 before the curly braces above.  This works since version 2.0.13.
 
+.PP
+To make a simple dynamic class which can be registered with a GTypeModule,
+add \`(dynamic)\' to the class header.
+This will cause a type registration method to be defined, which you would
+normally call from the load method of a GTypeModule.
+In the above example, the registration function will look like
+.nf
+
+  void gtk_new_button_register_type(GTypeModule *type_module)
+
+.fi
 .SH DATA MEMBERS
 .PP
 There are five types of data members.  Three of them are normal data members,
@@ -425,7 +438,9 @@ be synchronized with a private integer data member also of the name \'height\'.
 
   private int height;
   property INT height
-         (nick = _("Short nickname"),
+         (
+          name = "height",
+          nick = _("Short nickname"),
           blurb = _("Long description"),
           minimum = 10,
           maximum = 200,
@@ -440,7 +455,13 @@ of them.
 All property types have a \'nick\' and a \'blurb\' attribute and you should
 set those accordingly.  This will make runtime querying the object
 nicer as things such as gui editors and class browsers can be more
-verbose about the class itself.  You can use the \'_("string")\' notation
+verbose about the class itself.
+.PP
+The \'name\' property is canonical name of property. It is useful when you try to
+implement properties with no C names like \'vertical-scroll\'. The \'name\'
+property can be omitted.
+.PP
+You can use the \'_("string")\' notation
 instead of just "string", and that will mark the string for translation.
 .PP
 Almost all types also have a \'default_value\' attribute which sets the initial
@@ -782,6 +803,17 @@ or
 
   signal last NONE (NONE) void foo (self);
 
+.fi
+.PP
+You can include name of signal, if this name is not a C variable name. Example:
+.nf
+
+  signal first INT "do-something" (POINTER, INT)
+  int do_something (self, Gtk:Widget *w (check null type), int length)
+  {
+         ...
+  }
+  
 .fi
 .PP
 If you don\'t want the wrapper that emits the signal to be public, you can
@@ -1032,6 +1064,21 @@ a specific method of the interface, just add \'interface <typename>\'
 before the method definition.  The method can, and probably should be,
 private.
 .PP
+Interface methods behave very similarly to virtual/override methods.
+As with override methods, you can use PARENT_HANDLER in the definition of an
+interface method to call the implementation of the same interface method in
+a parent class.
+.PP
+The NAME_parent_iface variable may be used to access the complete interface
+structure from a parent class, where NAME is the implemented interface (with
+colons replaced by underscores).
+This enables access to the full parent implementation of an interface.
+For example, if a class implements the Gtk:Tree:Model interface then the
+implementation of the same interface in the parent class is available via
+the Gtk_Tree_Model_parent_iface pointer.
+If an interface is not implemented in the parent class, then the corresponding
+parent_iface value will be a null pointer.
+.PP
 The following example implements a new object, that implements the
 Gtk:Tree:Model interface and implements the get_flags method of that
 interface.  Do note that except for standard (GTK+ and glib) specific