[gtkmm-documentation] Wrapping Section: Initializations: Add comment about type substitution.



commit edc05020bdd734552e09c988a1f8b4bd0a9ab153
Author: José Alburquerque <jaalburqu svn gnome org>
Date:   Mon Jun 13 16:29:55 2011 -0400

    Wrapping Section: Initializations: Add comment about type substitution.
    
    	* docs/tutorial/C/gtkmm-tutorial-in.xml (Wrapping Section): Add a
    	comment in the m4 Initializations section about substituting the C++
    	and the C type by using $1 and $2 respectively.

 ChangeLog                             |    8 ++++++++
 docs/tutorial/C/gtkmm-tutorial-in.xml |   14 ++++++++++----
 2 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c14ad46..d156cba 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-06-13  José Alburquerque  <jaalburqu svn gnome org>
+
+	Wrapping Section: Initializations: Add comment about type substitution.
+
+	* docs/tutorial/C/gtkmm-tutorial-in.xml (Wrapping Section): Add a
+	comment in the m4 Initializations section about substituting the C++
+	and the C type by using $1 and $2 respectively.
+
 2011-06-12  José Alburquerque  <jaalburqu svn gnome org>
 
 	Wrapping Section: Also mention gmmproc's new caps for _WRAP_CREATE().
diff --git a/docs/tutorial/C/gtkmm-tutorial-in.xml b/docs/tutorial/C/gtkmm-tutorial-in.xml
index cc7d597..cfcf9ea 100644
--- a/docs/tutorial/C/gtkmm-tutorial-in.xml
+++ b/docs/tutorial/C/gtkmm-tutorial-in.xml
@@ -8531,7 +8531,9 @@ _CONVERSION(`const Glib::RefPtr&lt;Printer&gt;&amp;',`GtkPrinter*',__CONVERT_REF
 <para>
   <literal>$3</literal> will be replaced by the output parameter name of the
   C++ method and <literal>$4</literal> will be replaced by the return of the C
-  function when this initialization is used by gmmproc.
+  function when this initialization is used by gmmproc.  For convinience,
+  <literal>$1</literal> will also be replaced by the C++ type without the
+  ampersand (&amp;) and <literal>$2</literal> will be replaced by the C type.
 </para>
 </sect2>
 
@@ -8831,9 +8833,9 @@ _WRAP_METHOD(void set_text(const Glib::ustring&amp; text), gtk_entry_set_text)
   <programlisting>
     WRAP_METHOD(void get_preferred_size(Requisition&amp; minimum_size, Requisition&amp; natural_size{?}) const, gtk_widget_get_preferred_size)
   </programlisting>
-  Would indicate that the <parameter>natural_size</parameter> is optional
-  because its name ends with <literal>{?}</literal>.  In this case, gmmproc
-  would generate a method overload without that parameter.
+  Would indicate that the <parameter>natural_size</parameter> parameter is
+  optional because its name ends with <literal>{?}</literal>.  In this case,
+  gmmproc would generate a method overload without that parameter.
 </para>
 <para>
   Also, as with <function>_WRAP_CTOR()</function>, it is possible to reorder
@@ -8883,6 +8885,10 @@ _WRAP_METHOD(void set_text(const Glib::ustring&amp; text), gtk_entry_set_text)
   <programlisting>
     _INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = (SizeRequestMode)($4)')
   </programlisting>
+  Which could also be written as:
+  <programlisting>
+    _INITIALIZATION(`SizeRequestMode&amp;',`GtkSizeRequestMode',`$3 = ($1)($4)')
+  </programlisting>
 </para>
 <para>Though it's usually obvious what C++ types should be used in the C++ method, here are some hints:
 <itemizedlist>



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