summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Dew <marcoz@osource.org>2011-10-16 01:56:31 -0600
committerMatt Dew <marcoz@osource.org>2011-10-16 01:56:31 -0600
commit8a40b5e2a094742eff9cc5e48f4d2cd73e34c0a9 (patch)
treeee76252c97004d1392f9a80641b5ffc91de82ee2
parent61e3905e15fceddf72f1e8518ca5e2f4d5488355 (diff)
CH02 in progress
-rw-r--r--specs/CH02.xml.out286
-rw-r--r--specs/intrinsics.xml6
2 files changed, 147 insertions, 145 deletions
diff --git a/specs/CH02.xml.out b/specs/CH02.xml.out
index 2d55873..63ea7ef 100644
--- a/specs/CH02.xml.out
+++ b/specs/CH02.xml.out
@@ -1,7 +1,5 @@
-
-\&
-\s+1<function>Chapter</function>2\s-1
-\s+1<function>Widget Instantiation</function>\s-1
+<chapter id='Widget_Instantiation'>
+<title>Widget Instantiation</title>
<para>
A hierarchy of widget instances constitutes a widget tree.
The shell widget returned by
@@ -88,7 +86,7 @@ that require downward traversal below themselves.
In addition,
every widget has a pointer to an array of pop-up children.
</para>
-<sect2 id="Initializing_the_tk">
+<sect1 id="Initializing_the_tk">
<title>Initializing the (tk</title>
<para>
Before an application can call any Intrinsics function
@@ -584,9 +582,9 @@ See Section 7.12 for information regarding the use of
<function>XtCloseDisplay</function>
in multiple threads.
</para>
-</sect2>
+</sect1>
-<sect2 id="Establishing_the_Locale">
+<sect1 id="Establishing_the_Locale">
<title>Establishing the Locale</title>
<para>
Resource databases are specified to be created in the current process
@@ -601,10 +599,15 @@ The callout procedure provided by the application is of type
<function>XtLanguageProc</function>.
</para>
-typedef String (*XtLanguageProc)(Display*, String, XtPointer);
- Display *<emphasis remap='I'>display</emphasis>;
- String <emphasis remap='I'>language</emphasis>;
- XtPointer <emphasis remap='I'>client_data</emphasis>;
+<funcsynopsis>
+<funcprototype>
+ <funcdef>String <function>(*XtLanguageProc)</function></funcdef>
+ <paramdef>Display<parameter> display</parameter></paramdef>
+ <paramdef>String<parameter> language</parameter></paramdef>
+ <paramdef>XtPointer<parameter> client_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -658,10 +661,15 @@ use
<function>XtSetLanguageProc</function>.
</para>
-XtLanguageProc XtSetLanguageProc(<emphasis remap='I'>app_context</emphasis>, <emphasis remap='I'>proc</emphasis>, <emphasis remap='I'>client_data</emphasis>)
- XtAppContext <emphasis remap='I'>app_context</emphasis>;
- XtLanguageProc <emphasis remap='I'>proc</emphasis>;
- XtPointer <emphasis remap='I'>client_data</emphasis>;
+<funcsynopsis>
+<funcprototype>
+ <funcdef>XtLanguageProc<function>XtSetLanguageProc</function></funcdef>
+ <paramdef>XtAppContext<parameter> app_context</parameter></paramdef>
+ <paramdef>XtLanguageProc<parameter> proc</parameter></paramdef>
+ <paramdef>XtPointer<parameter> client_data</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -770,9 +778,9 @@ as in the following example.
top = XtOpenApplication(...);
...
</literallayout>
-</sect2>
+</sect1>
-<sect2 id="Loading_the_Resource_Database">
+<sect1 id="Loading_the_Resource_Database">
<title>Loading the Resource Database</title>
<para>
The
@@ -897,7 +905,7 @@ specified by the value of the
environment variable.
If this environment variable does not exist, the user's home directory
is searched for a file named
-<function>\&.Xdefaults-<emphasis remap='I'>host</emphasis></function>,
+<function>.Xdefaults-<emphasis remap='I'>host</emphasis></function>,
where <emphasis remap='I'>host</emphasis> is the host name of the machine on which the
application is running.
</para>
@@ -1133,9 +1141,9 @@ number of resources that will make the application usable (or at
least terminate with helpful diagnostic messages) when some problem
exists in finding and loading the application defaults file.
</para>
-</sect2>
+</sect1>
-<sect2 id="Parsing_the_Command_Line">
+<sect1 id="Parsing_the_Command_Line">
<title>Parsing the Command Line</title>
<para>
The
@@ -1210,65 +1218,12 @@ typedef struct {
<para>
The standard table contains the following entries:
<informaltable>
- <tgroup cols='' align='center'>
+ <tgroup cols='3' align='center'>
<tbody>
<row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
- </row>
- <row>
+ <entry></entry>
+ <entry></entry>
+ <entry></entry>
</row>
</tbody>
</tgroup>
@@ -1337,9 +1292,9 @@ both names are kept in the merged table.
The Intrinsics reserve all option names
beginning with the characters ``-xt'' for future standard uses.
</para>
-</sect2>
+</sect1>
-<sect2 id="Creating_Widgets">
+<sect1 id="Creating_Widgets">
<title>Creating Widgets</title>
<para>
The creation of widget instances is a three-phase process:
@@ -1419,7 +1374,7 @@ starts the third phase by making a preorder (top-down) traversal
of the widget tree, allocates an X window to each widget by means of
its realize procedure, and finally maps the widgets that are managed.
</para>
-<sect3 id="Creating_and_Merging_Argument_Lists">
+<sect2 id="Creating_and_Merging_Argument_Lists">
<title>Creating and Merging Argument Lists</title>
<para>
Many Intrinsics functions may be passed pairs of resource names and
@@ -1730,9 +1685,9 @@ Use of resource files and of the resource database is generally
encouraged over lengthy arglist or varargs lists whenever possible in
order to permit modification without recompilation.
</para>
-</sect3>
+</sect2>
-<sect3 id="Creating_a_Widget_Instance">
+<sect2 id="Creating_a_Widget_Instance">
<title>Creating a Widget Instance</title>
<para>
To create an instance of a widget, use
@@ -1970,9 +1925,9 @@ with the <emphasis remap='I'>args</emphasis> and <emphasis remap='I'>num_args</e
as described
in Section 2.5.1.
</para>
-</sect3>
+</sect2>
-<sect3 id="Creating_an_Application_Shell_Instance">
+<sect2 id="Creating_an_Application_Shell_Instance">
<title>Creating an Application Shell Instance</title>
<para>
An application can have multiple top-level widgets, each of which
@@ -2227,9 +2182,9 @@ procedure is identical in function to
with the <emphasis remap='I'>args</emphasis> and <emphasis remap='I'>num_args</emphasis> parameters replaced by a varargs list, as
described in Section 2.5.1.
</para>
-</sect3>
+</sect2>
-<sect3 id="Convenience_Procedure_to_Initialize_an_Application">
+<sect2 id="Convenience_Procedure_to_Initialize_an_Application">
<title>Convenience Procedure to Initialize an Application</title>
<para>
To initialize the Intrinsics internals, create an application context,
@@ -2508,9 +2463,9 @@ with the <emphasis remap='I'>args</emphasis> and <emphasis remap='I'>num_args</e
as described
in Section 2.5.1.
</para>
-</sect3>
+</sect2>
-<sect3 id="Widget_Instance_Allocation_The_allocate_Procedure">
+<sect2 id="Widget_Instance_Allocation_The_allocate_Procedure">
<title>Widget Instance Allocation: The allocate Procedure</title>
<para>
A widget class may optionally provide an instance allocation procedure
@@ -2706,20 +2661,25 @@ Under no circumstances should an allocation procedure that envelopes
its superclass allocation procedure modify fields in the
instance part of any superclass.
</para>
-</sect3>
+</sect2>
-<sect3 id="Widget_Instance_Initialization_The_initialize_Procedure">
+<sect2 id="Widget_Instance_Initialization_The_initialize_Procedure">
<title>Widget Instance Initialization: The initialize Procedure</title>
<para>
The initialize procedure pointer in a widget class is of type
<function>XtInitProc</function>.
</para>
-typedef void (*XtInitProc)(Widget, Widget, ArgList, Cardinal*);
- Widget <emphasis remap='I'>request</emphasis>;
- Widget <emphasis remap='I'>new</emphasis>;
- ArgList <emphasis remap='I'>args</emphasis>;
- Cardinal *<emphasis remap='I'>num_args</emphasis>;
+<funcsynopsis id='XtInitProc'>
+<funcprototype>
+ <funcdef>void<function>(*XtInitProc)</function></funcdef>
+ <paramdef>Widget<parameter> request</parameter></paramdef>
+ <paramdef>Widget<parameter> new</parameter></paramdef>
+ <paramdef>ArgList<parameter> args</parameter></paramdef>
+ <paramdef>Cardinal *<parameter> num_args</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -2888,9 +2848,9 @@ If the initialize procedure
needs to call any routines that operate on a widget,
it should specify <emphasis remap='I'>new</emphasis> as the widget instance.
</para>
-</sect3>
+</sect2>
-<sect3 id="Constraint_Instance_Initialization_The_ConstraintClassPart_initialize_Procedure">
+<sect2 id="Constraint_Instance_Initialization_The_ConstraintClassPart_initialize_Procedure">
<title>Constraint Instance Initialization: The ConstraintClassPart initialize Procedure</title>
<para>
The constraint initialization procedure pointer, found in the
@@ -2922,9 +2882,9 @@ it can specify NULL for the <emphasis remap='I'>initialize</emphasis> field of t
<function>ConstraintClassPart</function>
in the class record.
</para>
-</sect3>
+</sect2>
-<sect3 id="Nonwidget_Data_Initialization_The_initialize_hook_Procedure">
+<sect2 id="Nonwidget_Data_Initialization_The_initialize_hook_Procedure">
<title>Nonwidget Data Initialization: The initialize_hook Procedure</title>
<para>
The initialize_hook procedure is obsolete, as the same information
@@ -2937,10 +2897,15 @@ The initialize_hook procedure pointer is of type
<function>XtArgsProc</function>:
</para>
-typedef void (*XtArgsProc)(Widget, ArgList, Cardinal*);
- Widget <emphasis remap='I'>w</emphasis>;
- ArgList <emphasis remap='I'>args</emphasis>;
- Cardinal *<emphasis remap='I'>num_args</emphasis>;
+<funcsynopsis id='XtArgsProc'>
+<funcprototype>
+ <funcdef>void<function>(*XtArgsProc)</function></funcdef>
+ <paramdef>Widget<parameter> w</parameter></paramdef>
+ <paramdef>ArgList<parameter> args</parameter></paramdef>
+ <paramdef>Cardinal *<parameter> num_args</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -2991,10 +2956,10 @@ The initialize_hook procedure allows a widget instance to initialize
nonresource data using information from the specified argument list
as if it were a resource.
</para>
-</sect3>
</sect2>
+</sect1>
-<sect2 id="Realizing_Widgets">
+<sect1 id="Realizing_Widgets">
<title>Realizing Widgets</title>
<para>
To realize a widget instance, use
@@ -3129,8 +3094,13 @@ To check whether or not a widget has been realized, use
<function>XtIsRealized</function>.
</para>
-Boolean XtIsRealized(<emphasis remap='I'>w</emphasis>)
- Widget <emphasis remap='I'>w</emphasis>;
+<funcsynopsis id='XtIsRealized'>
+<funcprototype>
+ <funcdef>Boolean<function>XtIsRealized</function></funcdef>
+ <paramdef>Widget<parameter> w</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -3159,17 +3129,22 @@ Some widget procedures (for example, set_values) might wish to
operate differently
after the widget has been realized.
</para>
-<sect3 id="Widget_Instance_Window_Creation_The_realize_Procedure">
+<sect2 id="Widget_Instance_Window_Creation_The_realize_Procedure">
<title>Widget Instance Window Creation: The realize Procedure</title>
<para>
The realize procedure pointer in a widget class is of type
<function>XtRealizeProc</function>.
</para>
-typedef void (*XtRealizeProc)(Widget, XtValueMask*, XSetWindowAttributes*);
- Widget <emphasis remap='I'>w</emphasis>;
- XtValueMask *<emphasis remap='I'>value_mask</emphasis>;
- XSetWindowAttributes *<emphasis remap='I'>attributes</emphasis>;
+<funcsynopsis id='XtRealizeProc'>
+<funcprototype>
+ <funcdef>void<function>(*XtRealizeProc)</function></funcdef>
+ <paramdef>Widget<parameter> w</parameter></paramdef>
+ <paramdef>XtValueMask<parameter> value_mask</parameter></paramdef>
+ <paramdef>XSetWindowAttributes <parameter> attributes</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -3323,9 +3298,9 @@ on their children, usually from within the realize procedure.
<para>
Realize procedures cannot manage or unmanage their descendants.
</para>
-</sect3>
+</sect2>
-<sect3 id="Window_Creation_Convenience_Routine">
+<sect2 id="Window_Creation_Convenience_Routine">
<title>Window Creation Convenience Routine</title>
<para>
Rather than call the Xlib
@@ -3335,13 +3310,17 @@ function explicitly, a realize procedure should normally call the Intrinsics ana
which simplifies the creation of windows for widgets.
</para>
-void XtCreateWindow(<emphasis remap='I'>w</emphasis>, <emphasis remap='I'>window_class</emphasis>, <emphasis remap='I'>visual</emphasis>, \
-<emphasis remap='I'>value_mask</emphasis>, <emphasis remap='I'>attributes</emphasis>)
- Widget <emphasis remap='I'>w</emphasis>;
- unsigned int <emphasis remap='I'>window_class</emphasis>;
- Visual *<emphasis remap='I'>visual</emphasis>;
- XtValueMask <emphasis remap='I'>value_mask</emphasis>;
- XSetWindowAttributes *<emphasis remap='I'>attributes</emphasis>;
+<funcsynopsis id='XtCreateWindow'>
+<funcprototype>
+ <funcdef>void<function>XtCreateWindow</function></funcdef>
+ <paramdef>Widget<parameter> w</parameter></paramdef>
+ <paramdef>unsigned int<parameter> window_class</parameter></paramdef>
+ <paramdef>Visual *<parameter> visual</parameter></paramdef>
+ <paramdef>XtValueMask<parameter> value_mask</parameter></paramdef>
+ <paramdef>XSetWindowAttributes <parameter> attributes</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -3417,10 +3396,10 @@ structure: <emphasis remap='I'>depth</emphasis>, <emphasis remap='I'>screen</emp
<emphasis remap='I'>y</emphasis>, <emphasis remap='I'>width</emphasis>, <emphasis remap='I'>height</emphasis>, and
<emphasis remap='I'>border_width</emphasis>.
</para>
-</sect3>
</sect2>
+</sect1>
-<sect2 id="Obtaining_Window_Information_from_a_Widget">
+<sect1 id="Obtaining_Window_Information_from_a_Widget">
<title>Obtaining Window Information from a Widget</title>
<para>
The
@@ -3436,8 +3415,13 @@ and window of a widget are available to the widget writer by means of macros
and to the application writer by means of functions.
</para>
-Display *XtDisplay(<emphasis remap='I'>w</emphasis>)
- Widget <emphasis remap='I'>w</emphasis>;
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Display<function>XtDisplay</function></funcdef>
+ <paramdef>Widget<parameter> w</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -3455,8 +3439,13 @@ Specifies the widget. Must be of class Core or any subclass thereof.
returns the display pointer for the specified widget.
</para>
-Widget XtParent(<emphasis remap='I'>w</emphasis>)
- Widget <emphasis remap='I'>w</emphasis>;
+<funcsynopsis>
+<funcprototype>
+ <funcdef>Widget<function>XtParent</function></funcdef>
+ <paramdef>Widget<parameter> w</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -3658,7 +3647,7 @@ ask the server
for window sizes whenever they need to lay out their managed children
(see Chapter 6).
</para>
-<sect3 id="Unrealizing_Widgets">
+<sect2 id="Unrealizing_Widgets">
<title>Unrealizing Widgets</title>
<para>
To destroy the windows associated with a widget and its
@@ -3715,10 +3704,10 @@ Any events in the queue or which arrive following a call to
will be dispatched as if the window(s) of the
unrealized widget(s) had never existed.
</para>
-</sect3>
</sect2>
+</sect1>
-<sect2 id="Destroying_Widgets">
+<sect1 id="Destroying_Widgets">
<title>Destroying Widgets</title>
<para>
The Intrinsics provide support
@@ -3909,7 +3898,7 @@ descendants, are destroyed by a shell class destroy procedure.)
</para>
</listitem>
</itemizedlist>
-<sect3 id="Adding_and_Removing_Destroy_Callbacks">
+<sect2 id="Adding_and_Removing_Destroy_Callbacks">
<title>Adding and Removing Destroy Callbacks</title>
<para>
When an application needs to perform additional processing during the
@@ -3924,13 +3913,18 @@ XtNdestroyCallback.
For example, the following adds an application-supplied destroy callback
procedure <emphasis remap='I'>ClientDestroy</emphasis> with client data to a widget by calling
<function>XtAddCallback</function>.
+</para>
+
<literallayout class="monospaced">
XtAddCallback(<emphasis remap='I'>w</emphasis>, XtNdestroyCallback, <emphasis remap='I'>ClientDestroy</emphasis>, <emphasis remap='I'>client_data</emphasis>)
</literallayout>
+
<para>
Similarly, the following removes the application-supplied destroy callback
procedure <emphasis remap='I'>ClientDestroy</emphasis> by calling
<function>XtRemoveCallback</function>.
+</para>
+
<literallayout class="monospaced">
XtRemoveCallback(<emphasis remap='I'>w</emphasis>, XtNdestroyCallback, <emphasis remap='I'>ClientDestroy</emphasis>, <emphasis remap='I'>client_data</emphasis>)
</literallayout>
@@ -3939,9 +3933,9 @@ The <emphasis remap='I'>ClientDestroy</emphasis> argument is of type
<function>XtCallbackProc</function>;
see Section 8.1.
</para>
-</sect3>
+</sect2>
-<sect3 id="Dynamic_Data_Deallocation_The_destroy_Procedure">
+<sect2 id="Dynamic_Data_Deallocation_The_destroy_Procedure">
<title>Dynamic Data Deallocation: The destroy Procedure</title>
<para>
The destroy procedure pointers in the
@@ -4049,9 +4043,9 @@ from the modal cascade, unregister all event handlers, remove all key,
keyboard, button, and pointer grabs and remove all callback procedures
registered on the widget. Any outstanding selection transfers will time out.
</para>
-</sect3>
+</sect2>
-<sect3 id="Dynamic_Constraint_Data_Deallocation_The_ConstraintClassPart_destroy_Procedure">
+<sect2 id="Dynamic_Constraint_Data_Deallocation_The_ConstraintClassPart_destroy_Procedure">
<title>Dynamic Constraint Data Deallocation: The ConstraintClassPart destroy Procedure</title>
<para>
The constraint destroy procedure identified in the
@@ -4073,9 +4067,9 @@ If a parent does not need to deallocate any constraint storage,
the constraint destroy procedure entry
in its class record can be NULL.
</para>
-</sect3>
+</sect2>
-<sect3 id="Widget_Instance_Deallocation_The_deallocate_Procedure">
+<sect2 id="Widget_Instance_Deallocation_The_deallocate_Procedure">
<title>Widget Instance Deallocation: The deallocate Procedure</title>
<para>
The deallocate procedure pointer in the
@@ -4084,9 +4078,14 @@ record is of type
<function>XtDeallocateProc</function>.
</para>
-typedef void (*XtDeallocateProc)(Widget, XtPointer);
- Widget <emphasis remap='I'>widget</emphasis>;
- XtPointer <emphasis remap='I'>more_bytes</emphasis>;
+<funcsynopsis>
+<funcprototype>
+ <funcdef>void<function>(*XtDeallocateProc)</function></funcdef>
+ <paramdef>Widget<parameter> widget</parameter></paramdef>
+ <paramdef>XtPointer<parameter> more_bytes</parameter></paramdef>
+</funcprototype>
+</funcsynopsis>
+
<variablelist>
<varlistentry>
<term>
@@ -4140,10 +4139,10 @@ If no
is found, it is assumed that the Intrinsics
originally allocated the memory and is responsible for freeing it.
</para>
-</sect3>
</sect2>
+</sect1>
-<sect2 id="Exiting_from_an_Application">
+<sect1 id="Exiting_from_an_Application">
<title>Exiting from an Application</title>
<para>
All (tk applications should terminate
@@ -4176,6 +4175,5 @@ operating system. If the client is a session participant
(see Section 4.2), then the client may wish to resign from the session
before exiting. See Section 4.2.4 for details.
</para>
-</sect2>
+</sect1>
</chapter>
-</book>
diff --git a/specs/intrinsics.xml b/specs/intrinsics.xml
index 5ef766a..58ce38d 100644
--- a/specs/intrinsics.xml
+++ b/specs/intrinsics.xml
@@ -48,9 +48,13 @@
<!-- .\" software described herein for any purpose. -->
<!-- .\" It is provided ``as is'' without express or implied warranty. -->
+<!--
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH01.xml.out"/>
+-->
+
+<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH02.xml.out"/>
+
<!--
-<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH02.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH03.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH04.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="CH05.xml"/>