summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Dew <marcoz@osource.org>2011-10-25 21:55:17 -0600
committerMatt Dew <marcoz@osource.org>2011-10-25 21:55:17 -0600
commit09ffceedc257bfadd254f1f596c3d35ae27b2e69 (patch)
tree823bff756e2b3d23247c7ffee47fc70fc6d599c9
parent99809f548e74a6b1de67ebcb39da14f9a98a7963 (diff)
proofread CH07.xml
-rw-r--r--specs/CH07.xml108
1 files changed, 65 insertions, 43 deletions
diff --git a/specs/CH07.xml b/specs/CH07.xml
index 53b35c4..ca60ba4 100644
--- a/specs/CH07.xml
+++ b/specs/CH07.xml
@@ -2,7 +2,7 @@
<title>Event Management</title>
<para>
While Xlib allows the reading and processing of events anywhere in an application,
-widgets in the (tk neither directly read events
+widgets in the X Toolkit neither directly read events
nor grab the server or pointer.
Widgets register procedures that are to be called
when an event or class of events occurs in that widget.
@@ -223,7 +223,7 @@ type
<funcsynopsis id='XtInputCallbackProc'>
<funcprototype>
-<funcdef>void <function>*XtInputCallbackProc</function></funcdef>
+<funcdef>typedef void <function>(*XtInputCallbackProc)</function></funcdef>
<paramdef>XtPointer <parameter>client_data</parameter></paramdef>
<paramdef>int *<parameter>source</parameter></paramdef>
<paramdef>XtInputId *<parameter>id</parameter></paramdef>
@@ -664,7 +664,7 @@ The callback procedure pointers used to handle signal events are of type
<funcsynopsis id='XtSignalCallbackProc'>
<funcprototype>
-<funcdef>void <function>*XtSignalCallbackProc</function></funcdef>
+<funcdef>typedef void <function>(*XtSignalCallbackProc)</function></funcdef>
<paramdef>XtPointer <parameter>client_data</parameter></paramdef>
<paramdef>XtSignalId *<parameter>id</parameter></paramdef>
</funcprototype>
@@ -1008,7 +1008,7 @@ It issues a warning if the specified widget is not on the modal cascade.
<para>
The Intrinsics provide a set of key and button grab interfaces that
are parallel to those provided by Xlib and that allow the Intrinsics
-to modify event dispatching when necessary. (tk applications and
+to modify event dispatching when necessary. X Toolkit applications and
widgets that need to passively grab keys or buttons or actively grab
the keyboard or pointer should use the
following Intrinsics routines rather than the corresponding Xlib
@@ -1773,37 +1773,41 @@ F that has not redirected focus.
</para>
</listitem>
<listitem>
- <para>
+ <itemizedlist>
+ <listitem>
+ <para>
If E is the final focus target widget F or a descendant of F, the
event is dispatched to E.
- </para>
- </listitem>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
If E is not F, an ancestor of F, or a descendant of F, and the event
activated a grab for E as specified by a call to
<function>XtGrabKey</function>
for E,
<function>XtUngrabKeyboard</function>
is called.
- </para>
- </listitem>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
If E is an ancestor of F, and the event is a key press, and either
- </para>
- </listitem>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ <listitem>
+ <itemizedlist>
+ <listitem>
+ <para>
E has grabbed the key with
<function>XtGrabKey</function>
and <emphasis remap='I'>owner_events</emphasis>
<function>False</function>,
or
- </para>
- </listitem>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
E has grabbed the key with
<function>XtGrabKey</function>
and <emphasis remap='I'>owner_events</emphasis>
@@ -1811,15 +1815,19 @@ and <emphasis remap='I'>owner_events</emphasis>
and the coordinates of the event are outside the rectangle specified
by E's geometry,
then the event is dispatched to E.
- </para>
- </listitem>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ <listitem>
+ <para>
Otherwise, define A as the closest common ancestor of E and F:
- </para>
- </listitem>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ <listitem>
+ <itemizedlist>
+ <listitem>
+ <para>
If there is an active keyboard grab for any widget via either
<function>XtGrabKeyboard</function>
or
@@ -1829,14 +1837,18 @@ if no widget between F and A (noninclusive) has grabbed
the key and modifier combination with
<function>XtGrabKey</function>
and any value of <emphasis remap='I'>owner_events</emphasis>, the event is dispatched to F.
- </para>
- </listitem>
- <listitem>
- <para>
+ </para>
+ </listitem>
+ <listitem>
+ <para>
Else, the event is dispatched to the ancestor of F closest to A
that has grabbed the key and modifier combination with
<function>XtGrabKey</function>.
- </para>
+ </para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+ </itemizedlist>
</listitem>
</itemizedlist>
<para>
@@ -2494,7 +2506,7 @@ function first reads the next incoming X event by calling
and then dispatches the event to the appropriate registered procedure
by calling
<function>XtDispatchEvent</function>.
-This constitutes the main loop of (tk applications.
+This constitutes the main loop of X Toolkit applications.
There is nothing special about
<function>XtAppMainLoop</function>;
it simply calls
@@ -2552,6 +2564,10 @@ or because one of its ancestors is insensitive and thus the widget's
<emphasis remap='I'>ancestor_sensitive</emphasis> field also is
<function>False</function>.
A widget can but does not need to distinguish these two cases visually.
+</para>
+
+<note>
+<para>
Pop-up shells will have
<emphasis remap='I'>ancestor_sensitive</emphasis>
<function>False</function>
@@ -2566,6 +2582,7 @@ in the application defaults resource file or to
otherwise ensure that the parent is
sensitive when creating pop-up shells.
</para>
+</note>
<para>
To set the sensitivity state of a widget, use
@@ -2717,7 +2734,7 @@ Work procedure pointers are of type
<funcsynopsis id='XtWorkProc'>
<funcprototype>
-<funcdef>Boolean <function>*XtWorkProc</function></funcdef>
+<funcdef>typedef Boolean <function>(*XtWorkProc)</function></funcdef>
<paramdef>XtPointer <parameter>client_data</parameter></paramdef>
</funcprototype>
@@ -3090,7 +3107,7 @@ The expose procedure pointer in a widget class is of type
<funcsynopsis id='XtExposeProc'>
<funcprototype>
-<funcdef>void <function>*XtExposeProc</function></funcdef>
+<funcdef>typedef void <function>(*XtExposeProc)</function></funcdef>
<paramdef>Widget <parameter>w</parameter></paramdef>
<paramdef>XEvent *<parameter>event</parameter></paramdef>
<paramdef>Region <parameter>region</parameter></paramdef>
@@ -3136,12 +3153,17 @@ If a widget has no display semantics,
it can specify NULL for the <emphasis remap='I'>expose</emphasis> field.
Many composite widgets serve only as containers for their children
and have no expose procedure.
+</para>
+
+<note>
+<para>
If the <emphasis remap='I'>expose</emphasis> procedure is NULL,
<function>XtRealizeWidget</function>
fills in a default bit gravity of
<function>NorthWestGravity</function>
before it calls the widget's realize procedure.
</para>
+</note>
<para>
If the widget's <emphasis remap='I'>compress_exposure</emphasis> class field specifies
@@ -3269,7 +3291,7 @@ Event handler procedure pointers are of the type
<funcsynopsis id='XtEventHandler'>
<funcprototype>
-<funcdef>void <function>*XtEventHandler</function></funcdef>
+<funcdef>typedef void <function>(*XtEventHandler)</function></funcdef>
<paramdef>Widget <parameter>w</parameter></paramdef>
<paramdef>XtPointer <parameter>client_data</parameter></paramdef>
@@ -3567,7 +3589,7 @@ typedef enum {XtListHead, XtListTail} XtListPosition;
<funcsynopsis id='XtInsertEventHandler'>
<funcprototype>
-<funcdef> <function>XtInsertEventHandler</function></funcdef>
+<funcdef>void <function>XtInsertEventHandler</function></funcdef>
<paramdef>Widget <parameter>w</parameter></paramdef>
<paramdef>EventMask <parameter>event_mask</parameter></paramdef>
<paramdef>Boolean <parameter>nonmaskable</parameter></paramdef>
@@ -4386,7 +4408,7 @@ An extension selector is of type
<funcsynopsis id='XtExtensionSelectProc'>
<funcprototype>
-<funcdef>void <function>*XtExtensionSelectProc</function></funcdef>
+<funcdef>typedef void <function>(*XtExtensionSelectProc)</function></funcdef>
<paramdef>Widget <parameter>widget</parameter></paramdef>
<paramdef>int *<parameter>event_types</parameter></paramdef>
@@ -4538,7 +4560,7 @@ An event dispatcher procedure pointer is of type
<funcsynopsis id='XtEventDispatchProc'>
<funcprototype>
-<funcdef>Boolean <function>*XtEventDispatchProc</function></funcdef>
+<funcdef>typedef Boolean <function>(*XtEventDispatchProc)</function></funcdef>
<paramdef>XEvent *<parameter>event</parameter></paramdef>
</funcprototype>
</funcsynopsis>
@@ -4738,7 +4760,7 @@ simultaneously by two or more threads.
</sect2>
<sect2 id="Locking_tk_Data_Structures">
-<title>Locking (tk Data Structures</title>
+<title>Locking X Toolkit Data Structures</title>
<para>
The Intrinsics employs two levels of locking: application context and
process. Locking an application context ensures mutually exclusive
@@ -4870,7 +4892,7 @@ Specifies the application context that was previously locked.
<sect3 id="Locking_the_Process">
<title>Locking the Process</title>
<para>
-To ensure mutual exclusion of (tk process global data, a
+To ensure mutual exclusion of X Toolkit process global data, a
widget writer must use
<function>XtProcessLock.</function>
</para>