[glib] docs: Link to the GObject how-to from the GType tutorial



commit a86ef242e4f2907ec1399057f194699f2fe28c94
Author: Philip Withnall <philip withnall collabora co uk>
Date:   Thu Feb 19 14:12:50 2015 +0000

    docs: Link to the GObject how-to from the GType tutorial
    
    So that first-time users don’t fall into the trap of reading about the
    gory memory layout details of GType and GObject when all they wanted to
    do was derive a class.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=744060

 docs/reference/gobject/tut_gtype.xml |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/gobject/tut_gtype.xml b/docs/reference/gobject/tut_gtype.xml
index 2acc263..9dbde9a 100644
--- a/docs/reference/gobject/tut_gtype.xml
+++ b/docs/reference/gobject/tut_gtype.xml
@@ -342,11 +342,13 @@ G_DEFINE_TYPE (MamanBar, maman_bar, G_TYPE_OBJECT)
         <para>
           A lot of types are not instantiable by the type system and do not have
           a class. Most of these types are fundamental trivial types such as <emphasis>gchar</emphasis>, 
-          registered in <function>_g_value_types_init</function> (in <filename>gvaluetypes.c</filename>).
+          and are already registered in <function>_g_value_types_init</function>
+          (in <filename>gvaluetypes.c</filename>).
         </para>
 
         <para>
-          To register such a type in the type system, you just need to fill the 
+          In the rare case of needing to register such a type in the type
+          system, fill a
           <link linkend="GTypeInfo"><type>GTypeInfo</type></link> structure with zeros since these types are 
also most of the time
           fundamental:
           <informalexample><programlisting>
@@ -393,6 +395,12 @@ G_DEFINE_TYPE (MamanBar, maman_bar, G_TYPE_OBJECT)
         <title>Instantiable classed types: objects</title>
 
         <para>
+          This section covers the theory behind objects. See
+          <xref linkend="howto-gobject"/> for the recommended way to define a
+          GObject.
+        </para>
+
+        <para>
           Types which are registered with a class and are declared instantiable are
           what most closely resembles an <emphasis>object</emphasis>. 
           Although <link linkend="GObject"><type>GObject</type></link>s (detailed in <xref 
linkend="chapter-gobject"/>) 
@@ -658,6 +666,12 @@ void           g_type_free_instance   (GTypeInstance *instance);
         <title>Non-instantiable classed types: interfaces</title>
 
         <para>
+          This section covers the theory behind interfaces. See
+          <xref linkend="howto-interface"/> for the recommended way to define an
+          interface.
+        </para>
+
+        <para>
           GType's interfaces are very similar to Java's interfaces. They allow
           to describe a common API that several classes will adhere to.
           Imagine the play, pause and stop buttons on hi-fi equipment - those can


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