diff options
Diffstat (limited to 'specs')
-rw-r--r-- | specs/CH01.xml | 740 | ||||
-rw-r--r-- | specs/CH02.xml | 136 | ||||
-rw-r--r-- | specs/CH03.xml | 30 | ||||
-rw-r--r-- | specs/CH04.xml | 530 | ||||
-rw-r--r-- | specs/CH05.xml | 18 | ||||
-rw-r--r-- | specs/CH06.xml | 34 | ||||
-rw-r--r-- | specs/CH07.xml | 68 | ||||
-rw-r--r-- | specs/CH08.xml | 22 | ||||
-rw-r--r-- | specs/CH09.xml | 236 | ||||
-rw-r--r-- | specs/CH10.xml | 44 | ||||
-rw-r--r-- | specs/CH11.xml | 126 | ||||
-rw-r--r-- | specs/CH12.xml | 260 | ||||
-rw-r--r-- | specs/CH13.xml | 10 | ||||
-rw-r--r-- | specs/appB.xml | 78 | ||||
-rw-r--r-- | specs/appC.xml | 6 |
15 files changed, 1169 insertions, 1169 deletions
diff --git a/specs/CH01.xml b/specs/CH01.xml index 9d43092..9fc261f 100644 --- a/specs/CH01.xml +++ b/specs/CH01.xml @@ -216,40 +216,40 @@ All widget classes contain the fields defined in the structure. </para> <literallayout> -typedef struct { - WidgetClass superclass; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - String class_name; See <xref linkend="Resource_Management" xrefstyle='select: label' /> - Cardinal widget_size; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtProc class_initialize; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtWidgetClassProc class_part_initialize; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtEnum class_inited; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtInitProc initialize; See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> - XtArgsProc initialize_hook; See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> - XtRealizeProc realize; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - XtActionList actions; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - Cardinal num_actions; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - XtResourceList resources; See <xref linkend="Resource_Management" xrefstyle='select: label' /> - Cardinal num_resources; See <xref linkend="Resource_Management" xrefstyle='select: label' /> - XrmClass xrm_class; Private to resource manager - Boolean compress_motion; See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> - XtEnum compress_exposure; See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> - Boolean compress_enterleave; See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> - Boolean visible_interest; See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> - XtWidgetProc destroy; See <xref linkend='Destroying_Widgets' xrefstyle='select: label' /> - XtWidgetProc resize; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - XtExposeProc expose; See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> - XtSetValuesFunc set_values; See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> - XtArgsFunc set_values_hook; See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> - XtAlmostProc set_values_almost; See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> - XtArgsProc get_values_hook; See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> - XtAcceptFocusProc accept_focus; See <xref linkend='Focusing_Events_on_a_Child' xrefstyle='select: label' /> - XtVersionType version; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> - XtPointer callback_private; Private to callbacks - String tm_table; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - XtGeometryHandler query_geometry; See <xref linkend ='Geometry_Management' xrefstyle='select: label' /> - XtStringProc display_accelerator; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - XtPointer extension; See <xref linkend="Widget_Classing" xrefstyle='select: label' /> -} CoreClassPart; +<code>typedef struct {</code> +<code> WidgetClass superclass; </code>See <xref linkend="Widget_Classing" xrefstyle='select: label' /> +<code> String class_name; </code>See <xref linkend="Resource_Management" xrefstyle='select: label' /> +<code> Cardinal widget_size; </code>See <xref linkend="Widget_Classing" xrefstyle='select: label' /> +<code> XtProc class_initialize; </code>See <xref linkend="Widget_Classing" xrefstyle='select: label' /> +<code> XtWidgetClassProc class_part_initialize; </code>See <xref linkend="Widget_Classing" xrefstyle='select: label' /> +<code> XtEnum class_inited; </code>See <xref linkend="Widget_Classing" xrefstyle='select: label' /> +<code> XtInitProc initialize; </code>See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> +<code> XtArgsProc initialize_hook; </code>See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> +<code> XtRealizeProc realize; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> XtActionList actions; </code>See <xref linkend='Translation_Management' xrefstyle='select: label' /> +<code> Cardinal num_actions; </code>See <xref linkend='Translation_Management' xrefstyle='select: label' /> +<code> XtResourceList resources; </code>See <xref linkend="Resource_Management" xrefstyle='select: label' /> +<code> Cardinal num_resources; </code>See <xref linkend="Resource_Management" xrefstyle='select: label' /> +<code> XrmClass xrm_class; </code>Private to resource manager +<code> Boolean compress_motion; </code>See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> +<code> XtEnum compress_exposure; </code>See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> +<code> Boolean compress_enterleave; </code>See <xref linkend='X_Event_Filters' xrefstyle='select: label' /> +<code> Boolean visible_interest; </code>See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> +<code> XtWidgetProc destroy; </code>See <xref linkend='Destroying_Widgets' xrefstyle='select: label' /> +<code> XtWidgetProc resize; </code>See <xref linkend='Geometry_Management' xrefstyle='select: label' /> +<code> XtExposeProc expose; </code>See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> +<code> XtSetValuesFunc set_values; </code>See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> +<code> XtArgsFunc set_values_hook; </code>See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> +<code> XtAlmostProc set_values_almost; </code>See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> +<code> XtArgsProc get_values_hook; </code>See <xref linkend='Reading_and_Writing_Widget_State' xrefstyle='select: label' /> +<code> XtAcceptFocusProc accept_focus; </code>See <xref linkend='Focusing_Events_on_a_Child' xrefstyle='select: label' /> +<code> XtVersionType version; </code>See <xref linkend="Widget_Classing" xrefstyle='select: label' /> +<code> XtPointer callback_private; </code>Private to callbacks +<code> String tm_table; </code>See <xref linkend='Translation_Management' xrefstyle='select: label' /> +<code> XtGeometryHandler query_geometry; </code>See <xref linkend ='Geometry_Management' xrefstyle='select: label' /> +<code> XtStringProc display_accelerator; </code>See <xref linkend='Translation_Management' xrefstyle='select: label' /> +<code> XtPointer extension; </code>See <xref linkend="Widget_Classing" xrefstyle='select: label' /> +<code>} CoreClassPart;</code> </literallayout> <para> All widget classes have the Core class fields as their first component. @@ -260,9 +260,9 @@ and are defined with only this set of fields. </para> <literallayout> -typedef struct { - CoreClassPart core_class; -} WidgetClassRec, *WidgetClass, CoreClassRec, *CoreWidgetClass; +<code>typedef struct {</code> +<code> CoreClassPart core_class;</code> +<code>} WidgetClassRec, *WidgetClass, CoreClassRec, *CoreWidgetClass;</code> </literallayout> <para> Various routines can cast widget class pointers, as needed, @@ -279,15 +279,15 @@ In <function>IntrinsicP.h</function>: </para> <literallayout> -extern WidgetClassRec widgetClassRec; -#define coreClassRec widgetClassRec +<code>extern WidgetClassRec widgetClassRec;</code> +<code>#define coreClassRec widgetClassRec</code> </literallayout> <para> In <function>Intrinsic.h</function>: </para> <literallayout> -extern WidgetClass widgetClass, coreWidgetClass; +<code>extern WidgetClass widgetClass, coreWidgetClass;</code> </literallayout> <para> The opaque types @@ -303,7 +303,7 @@ incomplete structure definitions in <function>Intrinsic.h</function>: </para> <literallayout> -typedef struct _WidgetClassRec *WidgetClass, *CoreWidgetClass; +<code>typedef struct _WidgetClassRec *WidgetClass, *CoreWidgetClass;</code> </literallayout> </sect3> <sect3 id="CorePart_Structure"> @@ -314,36 +314,36 @@ All widget instances contain the fields defined in the structure. </para> <literallayout> -typedef struct _CorePart { - Widget self; Described below - WidgetClass widget_class; See <xref linkend='Widget_Classing' xrefstyle='select: label' /> - Widget parent; See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> - Boolean being_destroyed; See <xref linkend='Destroying_Widgets' xrefstyle='select: label' /> - XtCallbackList destroy_callbacks; <xref linkend='Destroying_Widgets' xrefstyle='select: label' /> - XtPointer constraints; See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> - Position x; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Position y; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Dimension width; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Dimension height; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Dimension border_width; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - Boolean managed; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - Boolean sensitive; See <xref linkend='Setting_and_Checking_the_Sensitivity_State_of_a_Widget' xrefstyle='select: label' /> - Boolean ancestor_sensitive; See <xref linkend='Setting_and_Checking_the_Sensitivity_State_of_a_Widget' xrefstyle='select: label' /> - XtTranslations accelerators; See <xref linkend='Translation_Management' xrefstyle='select: label' /> - Pixel border_pixel; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Pixmap border_pixmap; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - WidgetList popup_list; See <xref linkend='Pop_Up_Widgets' xrefstyle='select: label' /> - Cardinal num_popups; See <xref linkend='Pop_Up_Widgets' xrefstyle='select: label' /> - String name; See <xref linkend='Resource_Management' xrefstyle='select: label' /> - Screen *screen; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Colormap colormap; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Window window; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Cardinal depth; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Pixel background_pixel; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Pixmap background_pixmap; See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> - Boolean visible; See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> - Boolean mapped_when_managed; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> -} CorePart; +<code>typedef struct _CorePart {</code> +<code> Widget self; </code>Described below +<code> WidgetClass widget_class; </code>See <xref linkend='Widget_Classing' xrefstyle='select: label' /> +<code> Widget parent; </code>See <xref linkend='Creating_Widgets' xrefstyle='select: label' /> +<code> Boolean being_destroyed; </code>See <xref linkend='Destroying_Widgets' xrefstyle='select: label' /> +<code> XtCallbackList destroy_callbacks; </code><xref linkend='Destroying_Widgets' xrefstyle='select: label' /> +<code> XtPointer constraints; </code>See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> +<code> Position x; </code>See <xref linkend='Geometry_Management' xrefstyle='select: label' /> +<code> Position y; </code>See <xref linkend='Geometry_Management' xrefstyle='select: label' /> +<code> Dimension width; </code>See <xref linkend='Geometry_Management' xrefstyle='select: label' /> +<code> Dimension height; </code>See <xref linkend='Geometry_Management' xrefstyle='select: label' /> +<code> Dimension border_width; </code>See <xref linkend='Geometry_Management' xrefstyle='select: label' /> +<code> Boolean managed; </code>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> +<code> Boolean sensitive; </code>See <xref linkend='Setting_and_Checking_the_Sensitivity_State_of_a_Widget' xrefstyle='select: label' /> +<code> Boolean ancestor_sensitive; </code>See <xref linkend='Setting_and_Checking_the_Sensitivity_State_of_a_Widget' xrefstyle='select: label' /> +<code> XtTranslations accelerators; </code>See <xref linkend='Translation_Management' xrefstyle='select: label' /> +<code> Pixel border_pixel; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> Pixmap border_pixmap; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> WidgetList popup_list; </code>See <xref linkend='Pop_Up_Widgets' xrefstyle='select: label' /> +<code> Cardinal num_popups; </code>See <xref linkend='Pop_Up_Widgets' xrefstyle='select: label' /> +<code> String name; </code>See <xref linkend='Resource_Management' xrefstyle='select: label' /> +<code> Screen *screen; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> Colormap colormap; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> Window window; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> Cardinal depth; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> Pixel background_pixel; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> Pixmap background_pixmap; </code>See <xref linkend='Realizing_Widgets' xrefstyle='select: label' /> +<code> Boolean visible; </code>See <xref linkend='Widget_Exposure_and_Visibility' xrefstyle='select: label' /> +<code> Boolean mapped_when_managed; </code>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> +<code>} CorePart;</code> </literallayout> <para> All widget instances have the Core fields as their first component. @@ -352,9 +352,9 @@ The prototypical type is defined with only this set of fields. </para> <literallayout> -typedef struct { - CorePart core; -} WidgetRec, *Widget, CoreRec, *CoreWidget; +<code>typedef struct {</code> +<code> CorePart core;</code> +<code>} WidgetRec, *Widget, CoreRec, *CoreWidget;</code> </literallayout> <para> Various routines can cast widget pointers, as needed, @@ -368,7 +368,7 @@ incomplete structure definitions in <function>Intrinsic.h</function>. </para> <literallayout> -typedef struct _WidgetRec *Widget, *CoreWidget; +<code>typedef struct _WidgetRec *Widget, *CoreWidget;</code> </literallayout> </sect3> <sect3 id="Core_Resources"> @@ -629,13 +629,13 @@ class fields, widgets of the Composite class have the following class fields. </para> <literallayout> -typedef struct { - XtGeometryHandler geometry_manager; See <xref linkend='Geometry_Management' xrefstyle='select: label' /> - XtWidgetProc change_managed; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - XtWidgetProc insert_child; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - XtWidgetProc delete_child; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - XtPointer extension; See <xref linkend='Widget_Classing' xrefstyle='select: label' /> -} CompositeClassPart; +<code>typedef struct {</code> +<code> XtGeometryHandler geometry_manager; </code>See <xref linkend='Geometry_Management' xrefstyle='select: label' /> +<code> XtWidgetProc change_managed; </code>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> +<code> XtWidgetProc insert_child; </code>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> +<code> XtWidgetProc delete_child; </code>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> +<code> XtPointer extension; </code>See <xref linkend='Widget_Classing' xrefstyle='select: label' /> +<code>} CompositeClassPart;</code> </literallayout> <para> The extension record defined for @@ -647,14 +647,14 @@ is <function>CompositeClassExtensionRec</function>. </para> <literallayout> -typedef struct { - XtPointer next_extension; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - XrmQuark record_type; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - long version; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - Cardinal record_size; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - Boolean accepts_objects; See <xref linkend='Creating_a_Widget_Instance' xrefstyle='select: label' /> - Boolean allows_change_managed_set; See <xref linkend='Bundling_Changes_to_the_Managed_Set' xrefstyle='select: label' /> -} CompositeClassExtensionRec, *CompositeClassExtension; +<code>typedef struct {</code> +<code> XtPointer next_extension; </code>See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> +<code> XrmQuark record_type; </code>See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> +<code> long version; </code>See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> +<code> Cardinal record_size; </code>See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> +<code> Boolean accepts_objects; </code>See <xref linkend='Creating_a_Widget_Instance' xrefstyle='select: label' /> +<code> Boolean allows_change_managed_set; </code>See <xref linkend='Bundling_Changes_to_the_Managed_Set' xrefstyle='select: label' /> +<code>} CompositeClassExtensionRec, *CompositeClassExtension;</code> </literallayout> <para> Composite @@ -662,10 +662,10 @@ classes have the Composite class fields immediately following the Core class fields. </para> <literallayout> -typedef struct { - CoreClassPart core_class; - CompositeClassPart composite_class; -} CompositeClassRec, *CompositeWidgetClass; +<code>typedef struct {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code>} CompositeClassRec, *CompositeWidgetClass;</code> </literallayout> <para> The single occurrences of the class record and pointer for creating @@ -677,14 +677,14 @@ In <function>IntrinsicP.h</function>: </para> <literallayout> -extern CompositeClassRec compositeClassRec; +<code>extern CompositeClassRec compositeClassRec;</code> </literallayout> <para> In <function>Intrinsic.h</function>: </para> <literallayout> -extern WidgetClass compositeWidgetClass; +<code>extern WidgetClass compositeWidgetClass;</code> </literallayout> <para> The opaque types @@ -706,7 +706,7 @@ definition to ensure that the compiler catches attempts to access private data. </para> <literallayout> -typedef struct _CompositeClassRec *CompositeWidgetClass; +<code>typedef struct _CompositeClassRec *CompositeWidgetClass;</code> </literallayout> </sect3> <sect3 id="CompositePart_Structure"> @@ -721,12 +721,12 @@ instance fields defined in the structure. </para> <literallayout> -typedef struct { - WidgetList children; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - Cardinal num_children; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - Cardinal num_slots; See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> - XtOrderProc insert_position; See <xref linkend='Insertion_Order_of_Children_The_insert_position_Procedure' xrefstyle='select: label' /> -} CompositePart; +<code>typedef struct {</code> +<code> WidgetList children; </code>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> +<code> Cardinal num_children; </code>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> +<code> Cardinal num_slots; </code>See <xref linkend='Composite_Widgets_and_Their_Children' xrefstyle='select: label' /> +<code> XtOrderProc insert_position; </code>See <xref linkend='Insertion_Order_of_Children_The_insert_position_Procedure' xrefstyle='select: label' /> +<code>} CompositePart;</code> </literallayout> <para> Composite @@ -734,10 +734,10 @@ widgets have the Composite instance fields immediately following the Core instance fields. </para> <literallayout> -typedef struct { - CorePart core; - CompositePart composite; -} CompositeRec, *CompositeWidget; +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code>} CompositeRec, *CompositeWidget;</code> </literallayout> <para> <function>Intrinsic.h</function> @@ -745,7 +745,7 @@ uses an incomplete structure definition to ensure that the compiler catches attempts to access private data. </para> <literallayout> -typedef struct _CompositeRec *CompositeWidget; +<code>typedef struct _CompositeRec *CompositeWidget;</code> </literallayout> </sect3> <sect3 id="Composite_Resources"> @@ -875,15 +875,15 @@ widgets of the Constraint class have the following class fields. </para> <literallayout> -typedef struct { - XtResourceList resources; See <xref linkend='Resource_Management' xrefstyle='select: label' /> - Cardinal num_resources; See <xref linkend='Resource_Management' xrefstyle='select: label' /> - Cardinal constraint_size; See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> - XtInitProc initialize; See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> - XtWidgetProc destroy; See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> - XtSetValuesFunc set_values; See <xref linkend='Setting_Widget_State' xrefstyle='select: label' /> - XtPointer extension; See <xref linkend='Widget_Classing' xrefstyle='select: label' /> -} ConstraintClassPart; +<code>typedef struct {</code> +<code> XtResourceList resources; </code>See <xref linkend='Resource_Management' xrefstyle='select: label' /> +<code> Cardinal num_resources; </code>See <xref linkend='Resource_Management' xrefstyle='select: label' /> +<code> Cardinal constraint_size; </code>See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> +<code> XtInitProc initialize; </code>See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> +<code> XtWidgetProc destroy; </code>See <xref linkend='Constrained_Composite_Widgets' xrefstyle='select: label' /> +<code> XtSetValuesFunc set_values; </code>See <xref linkend='Setting_Widget_State' xrefstyle='select: label' /> +<code> XtPointer extension; </code>See <xref linkend='Widget_Classing' xrefstyle='select: label' /> +<code>} ConstraintClassPart;</code> </literallayout> <para> The extension record defined for @@ -894,13 +894,13 @@ is <function>ConstraintClassExtensionRec</function>. </para> <literallayout> -typedef struct { - XtPointer next_extension; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - XrmQuark record_type; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - long version; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - Cardinal record_size; See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> - XtArgsProc get_values_hook; See <xref linkend='Obtaining_Widget_State' xrefstyle='select: label' /> -} ConstraintClassExtensionRec, *ConstraintClassExtension; +<code>typedef struct {</code> +<code> XtPointer next_extension; </code>See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> +<code> XrmQuark record_type; </code>See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> +<code> long version; </code>See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> +<code> Cardinal record_size; </code>See <xref linkend='Class_Extension_Records' xrefstyle='select: label' /> +<code> XtArgsProc get_values_hook; </code>See <xref linkend='Obtaining_Widget_State' xrefstyle='select: label' /> +<code>} ConstraintClassExtensionRec, *ConstraintClassExtension;</code> </literallayout> <para> Constraint @@ -908,11 +908,11 @@ classes have the Constraint class fields immediately following the Composite class fields. </para> <literallayout> -typedef struct _ConstraintClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ConstraintClassPart constraint_class; -} ConstraintClassRec, *ConstraintWidgetClass; +<code>typedef struct _ConstraintClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ConstraintClassPart constraint_class;</code> +<code>} ConstraintClassRec, *ConstraintWidgetClass;</code> </literallayout> <para> The single occurrences of the class record and pointer for creating @@ -924,14 +924,14 @@ In <function>IntrinsicP.h</function>: </para> <literallayout> -extern ConstraintClassRec constraintClassRec; +<code>extern ConstraintClassRec constraintClassRec;</code> </literallayout> <para> In <function>Intrinsic.h</function>: </para> <literallayout> -extern WidgetClass constraintWidgetClass; +<code>extern WidgetClass constraintWidgetClass;</code> </literallayout> <para> The opaque types @@ -953,7 +953,7 @@ uses an incomplete structure definition to ensure that the compiler catches attempts to access private data. </para> <literallayout> -typedef struct _ConstraintClassRec *ConstraintWidgetClass; +<code>typedef struct _ConstraintClassRec *ConstraintWidgetClass;</code> </literallayout> </sect3> <sect3 id="ConstraintPart_Structure"> @@ -970,9 +970,9 @@ instance fields defined in the structure </para> <literallayout> -typedef struct { - int empty; -} ConstraintPart; +<code>typedef struct {</code> +<code> int empty;</code> +<code>} ConstraintPart;</code> </literallayout> <para> Constraint @@ -980,11 +980,11 @@ widgets have the Constraint instance fields immediately following the Composite instance fields. </para> <literallayout> -typedef struct { - CorePart core; - CompositePart composite; - ConstraintPart constraint; -} ConstraintRec, *ConstraintWidget; +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ConstraintPart constraint;</code> +<code>} ConstraintRec, *ConstraintWidget;</code> </literallayout> <para> <function>Intrinsic.h</function> @@ -992,7 +992,7 @@ uses an incomplete structure definition to ensure that the compiler catches attempts to access private data. </para> <literallayout> -typedef struct _ConstraintRec *ConstraintWidget; +<code>typedef struct _ConstraintRec *ConstraintWidget;</code> </literallayout> </sect3> <sect3 id="Constraint_Resources"> @@ -1418,28 +1418,28 @@ For example, the following is the public .h file for a possible implementation of a Label widget: </para> <literallayout> -#ifndef LABEL_H -#define LABEL_H +<code>#ifndef LABEL_H</code> +<code>#define LABEL_H</code> -/* New resources */ -#define XtNjustify "justify" -#define XtNforeground "foreground" -#define XtNlabel "label" -#define XtNfont "font" -#define XtNinternalWidth "internalWidth" -#define XtNinternalHeight "internalHeight" +<code>/* New resources */</code> +<code>#define XtNjustify "justify"</code> +<code>#define XtNforeground "foreground"</code> +<code>#define XtNlabel "label"</code> +<code>#define XtNfont "font"</code> +<code>#define XtNinternalWidth "internalWidth"</code> +<code>#define XtNinternalHeight "internalHeight"</code> -/* Class record pointer */ -extern WidgetClass labelWidgetClass; +<code>/* Class record pointer */</code> +<code>extern WidgetClass labelWidgetClass;</code> -/* C Widget type definition */ -typedef struct _LabelRec *LabelWidget; +<code>/* C Widget type definition */</code> +<code>typedef struct _LabelRec *LabelWidget;</code> -/* New class method entry points */ -extern void LabelSetText(Widget w, String text); -extern String LabelGetText(Widget w); +<code>/* New class method entry points */</code> +<code>extern void LabelSetText(Widget w, String text);</code> +<code>extern String LabelGetText(Widget w);</code> -#endif LABEL_H +<code>#endif LABEL_H</code> </literallayout> <para> The conditional inclusion of the text allows the application @@ -1557,65 +1557,65 @@ An inherit constant for each new procedure in the widget class part structure. For example, the following is the private .h file for a possible Label widget: </para> <literallayout> -#ifndef LABELP_H -#define LABELP_H - -#include <X11/Label.h> - -/* New representation types used by the Label widget */ -#define XtRJustify "Justify" - -/* New fields for the Label widget record */ -typedef struct { -/* Settable resources */ - Pixel foreground; - XFontStruct *font; - String label; /* text to display */ - XtJustify justify; - Dimension internal_width; /* # pixels horizontal border */ - Dimension internal_height; /* # pixels vertical border */ -/* Data derived from resources */ - GC normal_GC; - GC gray_GC; - Pixmap gray_pixmap; - Position label_x; - Position label_y; - Dimension label_width; - Dimension label_height; - Cardinal label_len; - Boolean display_sensitive; -} LabelPart; - -/* Full instance record declaration */ -typedef struct _LabelRec { - CorePart core; - LabelPart label; -} LabelRec; - -/* Types for Label class methods */ -typedef void (*LabelSetTextProc)(Widget w, String text); -typedef String (*LabelGetTextProc)(Widget w); - -/* New fields for the Label widget class record */ -typedef struct { - LabelSetTextProc set_text; - LabelGetTextProc get_text; - XtPointer extension; -} LabelClassPart; - -/* Full class record declaration */ -typedef struct _LabelClassRec { - CoreClassPart core_class; - LabelClassPart label_class; -} LabelClassRec; - -/* Class record variable */ -extern LabelClassRec labelClassRec; - -#define LabelInheritSetText((LabelSetTextProc)_XtInherit) -#define LabelInheritGetText((LabelGetTextProc)_XtInherit) - -#endif LABELP_H +<code>#ifndef LABELP_H</code> +<code>#define LABELP_H</code> + +<code>#include <X11/Label.h></code> + +<code>/* New representation types used by the Label widget */</code> +<code>#define XtRJustify "Justify"</code> + +<code>/* New fields for the Label widget record */</code> +<code>typedef struct {</code> +<code>/* Settable resources */</code> +<code> Pixel foreground;</code> +<code> XFontStruct *font;</code> +<code> String label; /* text to display */</code> +<code> XtJustify justify;</code> +<code> Dimension internal_width; /* # pixels horizontal border */</code> +<code> Dimension internal_height; /* # pixels vertical border */</code> +<code>/* Data derived from resources */</code> +<code> GC normal_GC;</code> +<code> GC gray_GC;</code> +<code> Pixmap gray_pixmap;</code> +<code> Position label_x;</code> +<code> Position label_y;</code> +<code> Dimension label_width;</code> +<code> Dimension label_height;</code> +<code> Cardinal label_len;</code> +<code> Boolean display_sensitive;</code> +<code>} LabelPart;</code> + +<code>/* Full instance record declaration */</code> +<code>typedef struct _LabelRec {</code> +<code> CorePart core;</code> +<code> LabelPart label;</code> +<code>} LabelRec;</code> + +<code>/* Types for Label class methods */</code> +<code>typedef void (*LabelSetTextProc)(Widget w, String text);</code> +<code>typedef String (*LabelGetTextProc)(Widget w);</code> + +<code>/* New fields for the Label widget class record */</code> +<code>typedef struct {</code> +<code> LabelSetTextProc set_text;</code> +<code> LabelGetTextProc get_text;</code> +<code> XtPointer extension;</code> +<code>} LabelClassPart;</code> + +<code>/* Full class record declaration */</code> +<code>typedef struct _LabelClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> LabelClassPart label_class;</code> +<code>} LabelClassRec;</code> + +<code>/* Class record variable */</code> +<code>extern LabelClassRec labelClassRec;</code> + +<code>#define LabelInheritSetText((LabelSetTextProc)_XtInherit)</code> +<code>#define LabelInheritGetText((LabelGetTextProc)_XtInherit)</code> + +<code>#endif LABELP_H</code> </literallayout> <para> To accommodate operating systems with file name length restrictions, @@ -1672,7 +1672,7 @@ structure. The superclass is used for class chaining operations and for inheriting or enveloping a superclass's operations (see <xref linkend='Superclass_Chaining' />, -<xref linkend='Initializing_a_Widget_Class' />, and +<xref linkend='Initializing_a_Widget_Class' />, and <xref linkend='Inheritance_of_Superclass_Operations' />. </para> @@ -1737,92 +1737,92 @@ for a Label widget. The resources table is described in <xref linkend='Resource_Management' />. </para> <literallayout> -/* Resources specific to Label */ -static XtResource resources[] = { - {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), - XtOffset(LabelWidget, label.foreground), XtRString, - XtDefaultForeground}, - {XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *), - XtOffset(LabelWidget, label.font),XtRString, - XtDefaultFont}, - {XtNlabel, XtCLabel, XtRString, sizeof(String), - XtOffset(LabelWidget, label.label), XtRString, NULL}, - . - . - . -} - -/* Forward declarations of procedures */ -static void ClassInitialize(); -static void Initialize(); -static void Realize(); -static void SetText(); -static void GetText(); - . - . - . +<code>/* Resources specific to Label */</code> +<code>static XtResource resources[] = {</code> +<code> {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),</code> +<code> XtOffset(LabelWidget, label.foreground), XtRString,</code> +<code> XtDefaultForeground},</code> +<code> {XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct *),</code> +<code> XtOffset(LabelWidget, label.font),XtRString,</code> +<code> XtDefaultFont},</code> +<code> {XtNlabel, XtCLabel, XtRString, sizeof(String),</code> +<code> XtOffset(LabelWidget, label.label), XtRString, NULL},</code> +<code> .</code> +<code> .</code> +<code> .</code> +<code>}</code> + +<code>/* Forward declarations of procedures */</code> +<code>static void ClassInitialize();</code> +<code>static void Initialize();</code> +<code>static void Realize();</code> +<code>static void SetText();</code> +<code>static void GetText();</code> +<code> .</code> +<code> .</code> +<code> .</code> </literallayout> <literallayout> -/* Class record constant */ -LabelClassRec labelClassRec = { - { - /* core_class fields */ - /* superclass */ (WidgetClass)&coreClassRec, - /* class_name */ "Label", - /* widget_size */ sizeof(LabelRec), - /* class_initialize */ ClassInitialize, - /* class_part_initialize */ NULL, - /* class_inited */ False, - /* initialize */ Initialize, - /* initialize_hook */ NULL, - /* realize */ Realize, - /* actions */ NULL, - /* num_actions */ 0, - /* resources */ resources, - /* num_resources */ XtNumber(resources), - /* xrm_class */ NULLQUARK, - /* compress_motion */ True, - /* compress_exposure */ True, - /* compress_enterleave */ True, - /* visible_interest */ False, - /* destroy */ NULL, - /* resize */ Resize, - /* expose */ Redisplay, - /* set_values */ SetValues, - /* set_values_hook */ NULL, - /* set_values_almost */ XtInheritSetValuesAlmost, - /* get_values_hook */ NULL, - /* accept_focus */ NULL, - /* version */ XtVersion, - /* callback_offsets */ NULL, - /* tm_table */ NULL, - /* query_geometry */ XtInheritQueryGeometry, - /* display_accelerator */ NULL, - /* extension */ NULL - }, - { - /* Label_class fields */ - /* get_text */ GetText, - /* set_text */ SetText, - /* extension */ NULL - } -}; - -/* Class record pointer */ -WidgetClass labelWidgetClass = (WidgetClass) &labelClassRec; - -/* New method access routines */ -void LabelSetText(Widget w, String text) -{ - LabelWidgetClass lwc = (Label WidgetClass)XtClass(w); - XtCheckSubclass(w, labelWidgetClass, NULL); - *(lwc->label_class.set_text)(w, text) -} - -/* Private procedures */ - . - . - . +<code>/* Class record constant */</code> +<code>LabelClassRec labelClassRec = {</code> +<code> {</code> +<code> /* core_class fields */</code> +<code> /* superclass */ (WidgetClass)&coreClassRec,</code> +<code> /* class_name */ "Label",</code> +<code> /* widget_size */ sizeof(LabelRec),</code> +<code> /* class_initialize */ ClassInitialize,</code> +<code> /* class_part_initialize */ NULL,</code> +<code> /* class_inited */ False,</code> +<code> /* initialize */ Initialize,</code> +<code> /* initialize_hook */ NULL,</code> +<code> /* realize */ Realize,</code> +<code> /* actions */ NULL,</code> +<code> /* num_actions */ 0,</code> +<code> /* resources */ resources,</code> +<code> /* num_resources */ XtNumber(resources),</code> +<code> /* xrm_class */ NULLQUARK,</code> +<code> /* compress_motion */ True,</code> +<code> /* compress_exposure */ True,</code> +<code> /* compress_enterleave */ True,</code> +<code> /* visible_interest */ False,</code> +<code> /* destroy */ NULL,</code> +<code> /* resize */ Resize,</code> +<code> /* expose */ Redisplay,</code> +<code> /* set_values */ SetValues,</code> +<code> /* set_values_hook */ NULL,</code> +<code> /* set_values_almost */ XtInheritSetValuesAlmost,</code> +<code> /* get_values_hook */ NULL,</code> +<code> /* accept_focus */ NULL,</code> +<code> /* version */ XtVersion,</code> +<code> /* callback_offsets */ NULL,</code> +<code> /* tm_table */ NULL,</code> +<code> /* query_geometry */ XtInheritQueryGeometry,</code> +<code> /* display_accelerator */ NULL,</code> +<code> /* extension */ NULL</code> +<code> },</code> +<code> {</code> +<code> /* Label_class fields */</code> +<code> /* get_text */ GetText,</code> +<code> /* set_text */ SetText,</code> +<code> /* extension */ NULL</code> +<code> }</code> +<code>};</code> + +<code>/* Class record pointer */</code> +<code>WidgetClass labelWidgetClass = (WidgetClass) &labelClassRec;</code> + +<code>/* New method access routines */</code> +<code>void LabelSetText(Widget w, String text)</code> +<code>{</code> +<code> LabelWidgetClass lwc = (Label WidgetClass)XtClass(w);</code> +<code> XtCheckSubclass(w, labelWidgetClass, NULL);</code> +<code> *(lwc->label_class.set_text)(w, text)</code> +<code>}</code> + +<code>/* Private procedures */</code> +<code> .</code> +<code> .</code> +<code> .</code> </literallayout> </sect2> @@ -2090,33 +2090,33 @@ superclass value (called downward superclass chaining) or before accessing its corresponding superclass value (called upward superclass chaining). The self-contained fields are</para> <literallayout> -In all widget classes: <emphasis remap='I'>class_name</emphasis> - <emphasis remap='I'>class_initialize</emphasis> - <emphasis remap='I'>widget_size</emphasis> - <emphasis remap='I'>realize</emphasis> - <emphasis remap='I'>visible_interest</emphasis> - <emphasis remap='I'>resize</emphasis> - <emphasis remap='I'>expose</emphasis> - <emphasis remap='I'>accept_focus</emphasis> - <emphasis remap='I'>compress_motion</emphasis> - <emphasis remap='I'>compress_exposure</emphasis> - <emphasis remap='I'>compress_enterleave</emphasis> - <emphasis remap='I'>set_values_almost</emphasis> - <emphasis remap='I'>tm_table</emphasis> - <emphasis remap='I'>version</emphasis> - <emphasis remap='I'>allocate</emphasis> - <emphasis remap='I'>deallocate</emphasis> - -In Composite widget classes: <emphasis remap='I'>geometry_manager</emphasis> - <emphasis remap='I'>change_managed</emphasis> - <emphasis remap='I'>insert_child</emphasis> - <emphasis remap='I'>delete_child</emphasis> - <emphasis remap='I'>accepts_objects</emphasis> - <emphasis remap='I'>allows_change_managed_set</emphasis> - -In Constraint widget classes: <emphasis remap='I'>constraint_size</emphasis> - -In Shell widget classes: <emphasis remap='I'>root_geometry_manager</emphasis> +<code>In all widget classes: </code><emphasis remap='I'>class_name</emphasis> +<code> </code><emphasis remap='I'>class_initialize</emphasis> +<code> </code><emphasis remap='I'>widget_size</emphasis> +<code> </code><emphasis remap='I'>realize</emphasis> +<code> </code><emphasis remap='I'>visible_interest</emphasis> +<code> </code><emphasis remap='I'>resize</emphasis> +<code> </code><emphasis remap='I'>expose</emphasis> +<code> </code><emphasis remap='I'>accept_focus</emphasis> +<code> </code><emphasis remap='I'>compress_motion</emphasis> +<code> </code><emphasis remap='I'>compress_exposure</emphasis> +<code> </code><emphasis remap='I'>compress_enterleave</emphasis> +<code> </code><emphasis remap='I'>set_values_almost</emphasis> +<code> </code><emphasis remap='I'>tm_table</emphasis> +<code> </code><emphasis remap='I'>version</emphasis> +<code> </code><emphasis remap='I'>allocate</emphasis> +<code> </code><emphasis remap='I'>deallocate</emphasis> + +<code>In Composite widget classes: </code><emphasis remap='I'>geometry_manager</emphasis> +<code> </code><emphasis remap='I'>change_managed</emphasis> +<code> </code><emphasis remap='I'>insert_child</emphasis> +<code> </code><emphasis remap='I'>delete_child</emphasis> +<code> </code><emphasis remap='I'>accepts_objects</emphasis> +<code> </code><emphasis remap='I'>allows_change_managed_set</emphasis> + +<code>In Constraint widget classes: </code><emphasis remap='I'>constraint_size</emphasis> + +<code>In Shell widget classes: </code><emphasis remap='I'>root_geometry_manager</emphasis> </literallayout> <para> @@ -2130,13 +2130,13 @@ class structures, then from the subclass structure, and so on down the class cha that widget's class structure. These superclass-to-subclass fields are </para> <literallayout> - <emphasis remap='I'>class_part_initialize</emphasis> - <emphasis remap='I'>get_values_hook</emphasis> - <emphasis remap='I'>initialize</emphasis> - <emphasis remap='I'>initialize_hook</emphasis> - <emphasis remap='I'>set_values</emphasis> - <emphasis remap='I'>set_values_hook</emphasis> - <emphasis remap='I'>resources</emphasis> +<code> </code><emphasis remap='I'>class_part_initialize</emphasis> +<code> </code><emphasis remap='I'>get_values_hook</emphasis> +<code> </code><emphasis remap='I'>initialize</emphasis> +<code> </code><emphasis remap='I'>initialize_hook</emphasis> +<code> </code><emphasis remap='I'>set_values</emphasis> +<code> </code><emphasis remap='I'>set_values_hook</emphasis> +<code> </code><emphasis remap='I'>resources</emphasis> </literallayout> <para> @@ -2151,10 +2151,10 @@ Constraint class down to the subclass: </para> <literallayout> - <emphasis remap='I'>resources</emphasis> - <emphasis remap='I'>initialize</emphasis> - <emphasis remap='I'>set_values</emphasis> - <emphasis remap='I'>get_values_hook</emphasis> +<code> </code><emphasis remap='I'>resources</emphasis> +<code> </code><emphasis remap='I'>initialize</emphasis> +<code> </code><emphasis remap='I'>set_values</emphasis> +<code> </code><emphasis remap='I'>get_values_hook</emphasis> </literallayout> <para> @@ -2170,8 +2170,8 @@ class structures. The subclass-to-superclass fields are </para> <literallayout> - <emphasis remap='I'>destroy</emphasis> - <emphasis remap='I'>actions</emphasis> +<code> </code><emphasis remap='I'>destroy</emphasis> +<code> </code><emphasis remap='I'>actions</emphasis> </literallayout> <para> @@ -2296,11 +2296,11 @@ a class structure is constant. The following example provides the class initialization procedure for a Label class. </para> <literallayout> -static void ClassInitialize() -{ - XtSetTypeConverter(XtRString, XtRJustify, CvtStringToJustify, - NULL, 0, XtCacheNone, NULL); -} +<code>static void ClassInitialize()</code> +<code>{</code> +<code> XtSetTypeConverter(XtRString, XtRJustify, CvtStringToJustify,</code> +<code> NULL, 0, XtCacheNone, NULL);</code> +<code>}</code> </literallayout> </sect2> @@ -2428,28 +2428,28 @@ For example, contains these definitions: </para> <literallayout> -#define XtInheritGeometryManager ((XtGeometryHandler) _XtInherit) -#define XtInheritChangeManaged ((XtWidgetProc) _XtInherit) -#define XtInheritInsertChild ((XtArgsProc) _XtInherit) -#define XtInheritDeleteChild ((XtWidgetProc) _XtInherit) +<code>#define XtInheritGeometryManager ((XtGeometryHandler) _XtInherit)</code> +<code>#define XtInheritChangeManaged ((XtWidgetProc) _XtInherit)</code> +<code>#define XtInheritInsertChild ((XtArgsProc) _XtInherit)</code> +<code>#define XtInheritDeleteChild ((XtWidgetProc) _XtInherit)</code> </literallayout> <para> Composite's class_part_initialize procedure begins as follows: </para> <literallayout> -static void CompositeClassPartInitialize(WidgetClass widgetClass) -{ - CompositeWidgetClass wc = (CompositeWidgetClass)widgetClass; - CompositeWidgetClass super = (CompositeWidgetClass)wc->core_class.superclass; - if (wc->composite_class.geometry_manager == XtInheritGeometryManager) { - wc->composite_class.geometry_manager = super->composite_class.geometry_manager; - } - if (wc->composite_class.change_managed == XtInheritChangeManaged) { - wc->composite_class.change_managed = super->composite_class.change_managed; - } - . - . - . +<code>static void CompositeClassPartInitialize(WidgetClass widgetClass)</code> +<code>{</code> +<code> CompositeWidgetClass wc = (CompositeWidgetClass)widgetClass;</code> +<code> CompositeWidgetClass super = (CompositeWidgetClass)wc->core_class.superclass;</code> +<code> if (wc->composite_class.geometry_manager == XtInheritGeometryManager) {</code> +<code> wc->composite_class.geometry_manager = super->composite_class.geometry_manager;</code> +<code> }</code> +<code> if (wc->composite_class.change_managed == XtInheritChangeManaged) {</code> +<code> wc->composite_class.change_managed = super->composite_class.change_managed;</code> +<code> }</code> +<code> .</code> +<code> .</code> +<code> .</code> </literallayout> <para> Nonprocedure fields may be inherited in the same manner as procedure @@ -2622,12 +2622,12 @@ contain the following four fields at the beginning of the structure declaration: </para> <literallayout> -struct { - XtPointer next_extension; - XrmQuark record_type; - long version; - Cardinal record_size; -}; +<code>struct {</code> +<code> XtPointer next_extension;</code> +<code> XrmQuark record_type;</code> +<code> long version;</code> +<code> Cardinal record_size;</code> +<code>};</code> </literallayout> <variablelist> diff --git a/specs/CH02.xml b/specs/CH02.xml index 6ce13b7..2abe962 100644 --- a/specs/CH02.xml +++ b/specs/CH02.xml @@ -821,10 +821,10 @@ prior to as in the following example. </para> <literallayout> - Widget top; - XtSetLanguageProc(NULL, NULL, NULL); - top = XtOpenApplication(...); - ... +<code> Widget top;</code> +<code> XtSetLanguageProc(NULL, NULL, NULL);</code> +<code> top = XtOpenApplication(</code>...<code>);</code> +<code> </code>... </literallayout> </sect1> @@ -1012,12 +1012,12 @@ must contain at least six entries. These entries must contain $HOME as the directory prefix, plus the following substitutions: </para> <literallayout> - 1. %C, %N, %L or %C, %N, %l, %t, %c - 2. %C, %N, %l - 3. %C, %N - 4. %N, %L or %N, %l, %t, %c - 5. %N, %l - 6. %N +<code> 1. %C, %N, %L or %C, %N, %l, %t, %c</code> +<code> 2. %C, %N, %l</code> +<code> 3. %C, %N</code> +<code> 4. %N, %L or %N, %l, %t, %c</code> +<code> 5. %N, %l</code> +<code> 6. %N</code> </literallayout> <para> The order of these six entries within the path must be as given above. @@ -1034,13 +1034,13 @@ must contain at least seven entries. These entries must contain the following directory prefixes and substitutions: </para> <literallayout> - 1. $XAPPLRESDIR with %C, %N, %L or %C, %N, %l, %t, %c - 2. $XAPPLRESDIR with %C, %N, %l - 3. $XAPPLRESDIR with %C, %N - 4. $XAPPLRESDIR with %N, %L or %N, %l, %t, %c - 5. $XAPPLRESDIR with %N, %l - 6. $XAPPLRESDIR with %N - 7. $HOME with %N +<code> 1. $XAPPLRESDIR with %C, %N, %L or %C, %N, %l, %t, %c</code> +<code> 2. $XAPPLRESDIR with %C, %N, %l</code> +<code> 3. $XAPPLRESDIR with %C, %N</code> +<code> 4. $XAPPLRESDIR with %N, %L or %N, %l, %t, %c</code> +<code> 5. $XAPPLRESDIR with %N, %l</code> +<code> 6. $XAPPLRESDIR with %N</code> +<code> 7. $HOME with %N</code> </literallayout> <para> The order of these seven entries within the path must be as given above. @@ -1272,24 +1272,24 @@ application-specific resource abbreviations. The format of this table is described in Section 15.9 in <emphasis remap='I'>Xlib — C Language X Interface</emphasis>. </para> <literallayout> -typedef enum { - XrmoptionNoArg, /* Value is specified in OptionDescRec.value */ - XrmoptionIsArg, /* Value is the option string itself */ - XrmoptionStickyArg, /* Value is characters immediately following option */ - XrmoptionSepArg, /* Value is next argument in argv */ - XrmoptionResArg, /* Use the next argument as input to XrmPutLineResource*/ - XrmoptionSkipArg, /* Ignore this option and the next argument in argv */ - XrmoptionSkipNArgs, /* Ignore this option and the next */ - /* OptionDescRec.value arguments in argv */ - XrmoptionSkipLine /* Ignore this option and the rest of argv */ -} XrmOptionKind; - -typedef struct { - char *option; /* Option name in argv */ - char *specifier; /* Resource name (without application name) */ - XrmOptionKind argKind; /* Location of the resource value */ - XPointer value; /* Value to provide if XrmoptionNoArg */ -} XrmOptionDescRec, *XrmOptionDescList; +<code>typedef enum {</code> +<code> XrmoptionNoArg, /* Value is specified in OptionDescRec.value */</code> +<code> XrmoptionIsArg, /* Value is the option string itself */</code> +<code> XrmoptionStickyArg, /* Value is characters immediately following option */</code> +<code> XrmoptionSepArg, /* Value is next argument in argv */</code> +<code> XrmoptionResArg, /* Use the next argument as input to XrmPutLineResource*/</code> +<code> XrmoptionSkipArg, /* Ignore this option and the next argument in argv */</code> +<code> XrmoptionSkipNArgs, /* Ignore this option and the next */</code> +<code> /* OptionDescRec.value arguments in argv */</code> +<code> XrmoptionSkipLine /* Ignore this option and the rest of argv */</code> +<code>} XrmOptionKind;</code> + +<code>typedef struct {</code> +<code> char *option; /* Option name in argv */</code> +<code> char *specifier; /* Resource name (without application name) */</code> +<code> XrmOptionKind argKind; /* Location of the resource value */</code> +<code> XPointer value; /* Value to provide if XrmoptionNoArg */</code> +<code>} XrmOptionDescRec, *XrmOptionDescList;</code> </literallayout> <para>The standard table contains the following entries:</para> @@ -1503,7 +1503,7 @@ to give a red background to all command buttons in an application named you can start it up as </para> <literallayout> -xmh -xrm 'xmh*Command.background: red' +<code>xmh -xrm 'xmh*Command.background: red'</code> </literallayout> <para> When it parses the command line, @@ -1611,10 +1611,10 @@ These are passed as an arglist, a pointer to an array of structures, which contains </para> <literallayout> -typedef struct { - String name; - XtArgVal value; -} Arg, *ArgList; +<code>typedef struct {</code> +<code> String name;</code> +<code> XtArgVal value;</code> +<code>} Arg, *ArgList;</code> </literallayout> <para> where @@ -1688,12 +1688,12 @@ function is usually used in a highly stylized manner to minimize the probability of making a mistake; for example: </para> <literallayout> -Arg args[20]; -int n; -n = 0; -XtSetArg(args[n], XtNheight, 100); n++; -XtSetArg(args[n], XtNwidth, 200); n++; -XtSetValues(widget, args, n); +<code>Arg args[20];</code> +<code>int n;</code> +<code>n = 0;</code> +<code>XtSetArg(args[n], XtNheight, 100); n++;</code> +<code>XtSetArg(args[n], XtNwidth, 200); n++;</code> +<code>XtSetValues(widget, args, n);</code> </literallayout> <para> Alternatively, an application can statically declare the argument list @@ -1701,11 +1701,11 @@ and use <xref linkend='XtNumber' xrefstyle='select: title'/>: </para> <literallayout> -static Args args[] = { - {XtNheight, (XtArgVal) 100}, - {XtNwidth, (XtArgVal) 200}, -}; -XtSetValues(Widget, args, XtNumber(args)); +<code>static Args args[] = {</code> +<code> {XtNheight, (XtArgVal) 100},</code> +<code> {XtNwidth, (XtArgVal) 200},</code> +<code>};</code> +<code>XtSetValues(Widget, args, XtNumber(args));</code> </literallayout> <para> Note that you should not use expressions with side effects such as @@ -1823,7 +1823,7 @@ and <function>XtVaNestedList</function>. </para> <literallayout> -#define XtVaTypedArg "XtVaTypedArg" +<code>#define XtVaTypedArg "XtVaTypedArg"</code> </literallayout> <para> If the name @@ -1852,7 +1852,7 @@ conversion fails for any reason, a warning message is issued and the list entry is skipped. </para> <literallayout> -#define XtVaNestedList "XtVaNestedList" +<code>#define XtVaNestedList "XtVaNestedList"</code> </literallayout> <para> If the name @@ -1873,7 +1873,7 @@ in multiple calls, use <xref linkend='XtVaCreateArgsList' xrefstyle='select: title'/>. </para> <literallayout> -typedef XtPointer XtVarArgsList; +<code>typedef XtPointer XtVarArgsList;</code> </literallayout> <funcsynopsis id='XtVaCreateArgsList'> @@ -2351,9 +2351,9 @@ which is best used when there is a clear choice for what is the main window, leads to resource specifications like the following: </para> <literallayout> -xmail.geometry:... (the main window) -xmail.read.geometry:... (the read window) -xmail.compose.geometry:... (the compose window) +<code>xmail.geometry:</code>...<code> (the main window)</code> +<code>xmail.read.geometry:</code>...<code> (the read window)</code> +<code>xmail.compose.geometry:</code>...<code> (the compose window)</code> </literallayout> <para> The second method, @@ -2361,9 +2361,9 @@ which is best if there is no main window, leads to resource specifications like the following: </para> <literallayout> -xmail.headers.geometry:... (the headers window) -xmail.read.geometry:... (the read window) -xmail.compose.geometry:... (the compose window) +<code>xmail.headers.geometry:</code>...<code> (the headers window)</code> +<code>xmail.read.geometry:</code>...<code> (the read window)</code> +<code>xmail.compose.geometry:</code>...<code> (the compose window)</code> </literallayout> <para> To create a top-level widget that is the root of a widget tree using @@ -2760,12 +2760,12 @@ these arguments will be passed to the allocation procedure in an <function>XtTypedArgList</function>. </para> <literallayout> -typedef struct { - String name; - String type; - XtArgVal value; - int size; -} XtTypedArg, *XtTypedArgList; +<code>typedef struct {</code> +<code> String name;</code> +<code> String type;</code> +<code> XtArgVal value;</code> +<code> int size;</code> +<code>} XtTypedArg, *XtTypedArgList;</code> </literallayout> <para> The allocate procedure pointer in the @@ -4272,7 +4272,7 @@ procedure <emphasis remap='I'>ClientDestroy</emphasis> with client data to a wid </para> <literallayout> -XtAddCallback(<emphasis remap='I'>w</emphasis>, XtNdestroyCallback, <emphasis remap='I'>ClientDestroy</emphasis>, <emphasis remap='I'>client_data</emphasis>) +<code>XtAddCallback(</code><emphasis remap='I'>w</emphasis><code>, XtNdestroyCallback, </code><emphasis remap='I'>ClientDestroy</emphasis><code>, </code><emphasis remap='I'>client_data</emphasis><code>)</code> </literallayout> <para> @@ -4282,7 +4282,7 @@ procedure <emphasis remap='I'>ClientDestroy</emphasis> by calling </para> <literallayout> -XtRemoveCallback(<emphasis remap='I'>w</emphasis>, XtNdestroyCallback, <emphasis remap='I'>ClientDestroy</emphasis>, <emphasis remap='I'>client_data</emphasis>) +<code>XtRemoveCallback(</code><emphasis remap='I'>w</emphasis><code>, XtNdestroyCallback, </code><emphasis remap='I'>ClientDestroy</emphasis><code>, </code><emphasis remap='I'>client_data</emphasis><code>)</code> </literallayout> <para> The <emphasis remap='I'>ClientDestroy</emphasis> argument is of type diff --git a/specs/CH03.xml b/specs/CH03.xml index 806157f..a2b8209 100644 --- a/specs/CH03.xml +++ b/specs/CH03.xml @@ -1321,26 +1321,26 @@ For example, a widget class that needs to maintain a maximum width and height for each child might define its constraint record as follows: </para> -<literallayout > -typedef struct { - Dimension max_width, max_height; -} MaxConstraintPart; -typedef struct { - MaxConstraintPart max; -} MaxConstraintRecord, *MaxConstraint; +<literallayout> +<code>typedef struct {</code> +<code> Dimension max_width, max_height;</code> +<code>} MaxConstraintPart;</code> +<code>typedef struct {</code> +<code> MaxConstraintPart max;</code> +<code>} MaxConstraintRecord, *MaxConstraint;</code> </literallayout> <para> A subclass of this widget class that also needs to maintain a minimum size would define its constraint record as follows: </para> -<literallayout > -typedef struct { - Dimension min_width, min_height; -} MinConstraintPart; -typedef struct { - MaxConstraintPart max; - MinConstraintPart min; -} MaxMinConstraintRecord, *MaxMinConstraint; +<literallayout> +<code>typedef struct {</code> +<code> Dimension min_width, min_height;</code> +<code>} MinConstraintPart;</code> +<code>typedef struct {</code> +<code> MaxConstraintPart max;</code> +<code> MinConstraintPart min;</code> +<code>} MaxMinConstraintRecord, *MaxMinConstraint;</code> </literallayout> <para> Constraints are allocated, initialized, deallocated, and otherwise maintained diff --git a/specs/CH04.xml b/specs/CH04.xml index aaab2d7..825a8fc 100644 --- a/specs/CH04.xml +++ b/specs/CH04.xml @@ -180,107 +180,107 @@ class has additional class fields, which are all contained in the None of the other Shell classes have any additional class fields: </para> -<literallayout > -typedef struct { - XtPointer extension; -} ShellClassPart, OverrideShellClassPart, -WMShellClassPart, VendorShellClassPart, TransientShellClassPart, -TopLevelShellClassPart, ApplicationShellClassPart, SessionShellClassPart; +<literallayout> +<code>typedef struct {</code> +<code> XtPointer extension;</code> +<code>} ShellClassPart, OverrideShellClassPart,</code> +<code>WMShellClassPart, VendorShellClassPart, TransientShellClassPart,</code> +<code>TopLevelShellClassPart, ApplicationShellClassPart, SessionShellClassPart;</code> </literallayout> <para>The full Shell class record definitions are:</para> -<literallayout > -typedef struct _ShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; -} ShellClassRec; +<literallayout> +<code>typedef struct _ShellClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ShellClassPart shell_class;</code> +<code>} ShellClassRec;</code> </literallayout> -<literallayout > -typedef struct { - XtPointer next_extension; See <xref linkend='Class_Extension_Records' /> - XrmQuark record_type; See <xref linkend='Class_Extension_Records' /> - long version; See <xref linkend='Class_Extension_Records' /> - Cardinal record_size; See <xref linkend='Class_Extension_Records' /> - XtGeometryHandler root_geometry_manager; See below -} ShellClassExtensionRec, *ShellClassExtension; +<literallayout> +<code>typedef struct {</code> +<code> XtPointer next_extension; </code>See <xref linkend='Class_Extension_Records' /> +<code> XrmQuark record_type; </code>See <xref linkend='Class_Extension_Records' /> +<code> long version; </code>See <xref linkend='Class_Extension_Records' /> +<code> Cardinal record_size; </code>See <xref linkend='Class_Extension_Records' /> +<code> XtGeometryHandler root_geometry_manager; </code>See below +<code>} ShellClassExtensionRec, *ShellClassExtension;</code> </literallayout> -<literallayout > -typedef struct _OverrideShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - OverrideShellClassPart override_shell_class; -} OverrideShellClassRec; +<literallayout> +<code>typedef struct _OverrideShellClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ShellClassPart shell_class;</code> +<code> OverrideShellClassPart override_shell_class;</code> +<code>} OverrideShellClassRec;</code> </literallayout> -<literallayout > -typedef struct _WMShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; -} WMShellClassRec; +<literallayout> +<code>typedef struct _WMShellClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ShellClassPart shell_class;</code> +<code> WMShellClassPart wm_shell_class;</code> +<code>} WMShellClassRec;</code> </literallayout> -<literallayout > -typedef struct _VendorShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; -} VendorShellClassRec; +<literallayout> +<code>typedef struct _VendorShellClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ShellClassPart shell_class;</code> +<code> WMShellClassPart wm_shell_class;</code> +<code> VendorShellClassPart vendor_shell_class;</code> +<code>} VendorShellClassRec;</code> </literallayout> -<literallayout > -typedef struct _TransientShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TransientShellClassPart transient_shell_class; -} TransientShellClassRec; +<literallayout> +<code>typedef struct _TransientShellClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ShellClassPart shell_class;</code> +<code> WMShellClassPart wm_shell_class;</code> +<code> VendorShellClassPart vendor_shell_class;</code> +<code> TransientShellClassPart transient_shell_class;</code> +<code>} TransientShellClassRec;</code> </literallayout> -<literallayout > -typedef struct _TopLevelShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TopLevelShellClassPart top_level_shell_class; -} TopLevelShellClassRec; +<literallayout> +<code>typedef struct _TopLevelShellClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ShellClassPart shell_class;</code> +<code> WMShellClassPart wm_shell_class;</code> +<code> VendorShellClassPart vendor_shell_class;</code> +<code> TopLevelShellClassPart top_level_shell_class;</code> +<code>} TopLevelShellClassRec;</code> </literallayout> -<literallayout > -typedef struct _ApplicationShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TopLevelShellClassPart top_level_shell_class; - ApplicationShellClassPart application_shell_class; -} ApplicationShellClassRec; +<literallayout> +<code>typedef struct _ApplicationShellClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ShellClassPart shell_class;</code> +<code> WMShellClassPart wm_shell_class;</code> +<code> VendorShellClassPart vendor_shell_class;</code> +<code> TopLevelShellClassPart top_level_shell_class;</code> +<code> ApplicationShellClassPart application_shell_class;</code> +<code>} ApplicationShellClassRec;</code> </literallayout> -<literallayout > -typedef struct _SessionShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; - TopLevelShellClassPart top_level_shell_class; - ApplicationShellClassPart application_shell_class; - SessionShellClassPart session_shell_class; -} SessionShellClassRec; +<literallayout> +<code>typedef struct _SessionShellClassRec {</code> +<code> CoreClassPart core_class;</code> +<code> CompositeClassPart composite_class;</code> +<code> ShellClassPart shell_class;</code> +<code> WMShellClassPart wm_shell_class;</code> +<code> VendorShellClassPart vendor_shell_class;</code> +<code> TopLevelShellClassPart top_level_shell_class;</code> +<code> ApplicationShellClassPart application_shell_class;</code> +<code> SessionShellClassPart session_shell_class;</code> +<code>} SessionShellClassRec;</code> </literallayout> <para> @@ -288,23 +288,23 @@ The single occurrences of the class records and pointers for creating instances of shells are: </para> -<literallayout > -extern ShellClassRec shellClassRec; -extern OverrideShellClassRec overrideShellClassRec; -extern WMShellClassRec wmShellClassRec; -extern VendorShellClassRec vendorShellClassRec; -extern TransientShellClassRec transientShellClassRec; -extern TopLevelShellClassRec topLevelShellClassRec; -extern ApplicationShellClassRec applicationShellClassRec; -extern SessionShellClassRec sessionShellClassRec; -extern WidgetClass shellWidgetClass; -extern WidgetClass overrideShellWidgetClass; -extern WidgetClass wmShellWidgetClass; -extern WidgetClass vendorShellWidgetClass; -extern WidgetClass transientShellWidgetClass; -extern WidgetClass topLevelShellWidgetClass; -extern WidgetClass applicationShellWidgetClass; -extern WidgetClass sessionShellWidgetClass; +<literallayout> +<code>extern ShellClassRec shellClassRec;</code> +<code>extern OverrideShellClassRec overrideShellClassRec;</code> +<code>extern WMShellClassRec wmShellClassRec;</code> +<code>extern VendorShellClassRec vendorShellClassRec;</code> +<code>extern TransientShellClassRec transientShellClassRec;</code> +<code>extern TopLevelShellClassRec topLevelShellClassRec;</code> +<code>extern ApplicationShellClassRec applicationShellClassRec;</code> +<code>extern SessionShellClassRec sessionShellClassRec;</code> +<code>extern WidgetClass shellWidgetClass;</code> +<code>extern WidgetClass overrideShellWidgetClass;</code> +<code>extern WidgetClass wmShellWidgetClass;</code> +<code>extern WidgetClass vendorShellWidgetClass;</code> +<code>extern WidgetClass transientShellWidgetClass;</code> +<code>extern WidgetClass topLevelShellWidgetClass;</code> +<code>extern WidgetClass applicationShellWidgetClass;</code> +<code>extern WidgetClass sessionShellWidgetClass;</code> </literallayout> <para> @@ -473,190 +473,190 @@ fields defined in their widget records: </para> -<literallayout > -typedef struct { - String geometry; - XtCreatePopupChildProc create_popup_child_proc; - XtGrabKind grab_kind; - Boolean spring_loaded; - Boolean popped_up; - Boolean allow_shell_resize; - Boolean client_specified; - Boolean save_under; - Boolean override_redirect; - XtCallbackList popup_callback; - XtCallbackList popdown_callback; - Visual * visual; -} ShellPart; +<literallayout> +<code>typedef struct {</code> +<code> String geometry;</code> +<code> XtCreatePopupChildProc create_popup_child_proc;</code> +<code> XtGrabKind grab_kind;</code> +<code> Boolean spring_loaded;</code> +<code> Boolean popped_up;</code> +<code> Boolean allow_shell_resize;</code> +<code> Boolean client_specified;</code> +<code> Boolean save_under;</code> +<code> Boolean override_redirect;</code> +<code> XtCallbackList popup_callback;</code> +<code> XtCallbackList popdown_callback;</code> +<code> Visual * visual;</code> +<code>} ShellPart;</code> </literallayout> -<literallayout > -typedef struct { - int empty; -} OverrideShellPart; +<literallayout> +<code>typedef struct {</code> +<code> int empty;</code> +<code>} OverrideShellPart;</code> </literallayout> -<literallayout > -typedef struct { - String title; - int wm_timeout; - Boolean wait_for_wm; - Boolean transient; - Boolean urgency; - Widget client_leader; - String window_role; - struct _OldXSizeHints { - long flags; - int x, y; - int width, height; - int min_width, min_height; - int max_width, max_height; - int width_inc, height_inc; - struct { - int x; - int y; - } min_aspect, max_aspect; - } size_hints; - XWMHints wm_hints; - int base_width, base_height, win_gravity; - Atom title_encoding; -} WMShellPart; +<literallayout> +<code>typedef struct {</code> +<code> String title;</code> +<code> int wm_timeout;</code> +<code> Boolean wait_for_wm;</code> +<code> Boolean transient;</code> +<code> Boolean urgency;</code> +<code> Widget client_leader;</code> +<code> String window_role;</code> +<code> struct _OldXSizeHints {</code> +<code> long flags;</code> +<code> int x, y;</code> +<code> int width, height;</code> +<code> int min_width, min_height;</code> +<code> int max_width, max_height;</code> +<code> int width_inc, height_inc;</code> +<code> struct {</code> +<code> int x;</code> +<code> int y;</code> +<code> } min_aspect, max_aspect;</code> +<code> } size_hints;</code> +<code> XWMHints wm_hints;</code> +<code> int base_width, base_height, win_gravity;</code> +<code> Atom title_encoding;</code> +<code>} WMShellPart;</code> </literallayout> -<literallayout > -typedef struct { - int vendor_specific; -} VendorShellPart; +<literallayout> +<code>typedef struct {</code> +<code> int vendor_specific;</code> +<code>} VendorShellPart;</code> </literallayout> -<literallayout > -typedef struct { - Widget transient_for; -} TransientShellPart; -typedef struct { - String icon_name; - Boolean iconic; - Atom icon_name_encoding; -} TopLevelShellPart; +<literallayout> +<code>typedef struct {</code> +<code> Widget transient_for;</code> +<code>} TransientShellPart;</code> +<code>typedef struct {</code> +<code> String icon_name;</code> +<code> Boolean iconic;</code> +<code> Atom icon_name_encoding;</code> +<code>} TopLevelShellPart;</code> </literallayout> -<literallayout > -typedef struct { - char * class; - XrmClass xrm_class; - int argc; - char ** argv; -} ApplicationShellPart; +<literallayout> +<code>typedef struct {</code> +<code> char * class;</code> +<code> XrmClass xrm_class;</code> +<code> int argc;</code> +<code> char ** argv;</code> +<code>} ApplicationShellPart;</code> </literallayout> -<literallayout > -typedef struct { - SmcConn connection; - String session_id; - String * restart_command; - String * clone_command; - String * discard_command; - String * resign_command; - String * shutdown_command; - String * environment; - String current_dir; - String program_path; - unsigned char restart_style; - Boolean join_session; - XtCallbackList save_callbacks; - XtCallbackList interact_callbacks; - XtCallbackList cancel_callbacks; - XtCallbackList save_complete_callbacks; - XtCallbackList die_callbacks; - XtCallbackList error_callbacks; -} SessionShellPart; +<literallayout> +<code>typedef struct {</code> +<code> SmcConn connection;</code> +<code> String session_id;</code> +<code> String * restart_command;</code> +<code> String * clone_command;</code> +<code> String * discard_command;</code> +<code> String * resign_command;</code> +<code> String * shutdown_command;</code> +<code> String * environment;</code> +<code> String current_dir;</code> +<code> String program_path;</code> +<code> unsigned char restart_style;</code> +<code> Boolean join_session;</code> +<code> XtCallbackList save_callbacks;</code> +<code> XtCallbackList interact_callbacks;</code> +<code> XtCallbackList cancel_callbacks;</code> +<code> XtCallbackList save_complete_callbacks;</code> +<code> XtCallbackList die_callbacks;</code> +<code> XtCallbackList error_callbacks;</code> +<code>} SessionShellPart;</code> </literallayout> <para> The full shell widget instance record definitions are: </para> -<literallayout > -typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; -} ShellRec, *ShellWidget; +<literallayout> +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ShellPart shell;</code> +<code>} ShellRec, *ShellWidget;</code> </literallayout> -<literallayout > -typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - OverrideShellPart override; -} OverrideShellRec, *OverrideShellWidget; +<literallayout> +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ShellPart shell;</code> +<code> OverrideShellPart override;</code> +<code>} OverrideShellRec, *OverrideShellWidget;</code> </literallayout> -<literallayout > -typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; -} WMShellRec, *WMShellWidget; +<literallayout> +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ShellPart shell;</code> +<code> WMShellPart wm;</code> +<code>} WMShellRec, *WMShellWidget;</code> </literallayout> -<literallayout > -typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; -} VendorShellRec, *VendorShellWidget; +<literallayout> +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ShellPart shell;</code> +<code> WMShellPart wm;</code> +<code> VendorShellPart vendor;</code> +<code>} VendorShellRec, *VendorShellWidget;</code> </literallayout> -<literallayout > -typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TransientShellPart transient; -} TransientShellRec, *TransientShellWidget; +<literallayout> +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ShellPart shell;</code> +<code> WMShellPart wm;</code> +<code> VendorShellPart vendor;</code> +<code> TransientShellPart transient;</code> +<code>} TransientShellRec, *TransientShellWidget;</code> </literallayout> -<literallayout > -typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; -} TopLevelShellRec, *TopLevelShellWidget; +<literallayout> +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ShellPart shell;</code> +<code> WMShellPart wm;</code> +<code> VendorShellPart vendor;</code> +<code> TopLevelShellPart topLevel;</code> +<code>} TopLevelShellRec, *TopLevelShellWidget;</code> </literallayout> -<literallayout > -typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; - ApplicationShellPart application; -} ApplicationShellRec, *ApplicationShellWidget; +<literallayout> +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ShellPart shell;</code> +<code> WMShellPart wm;</code> +<code> VendorShellPart vendor;</code> +<code> TopLevelShellPart topLevel;</code> +<code> ApplicationShellPart application;</code> +<code>} ApplicationShellRec, *ApplicationShellWidget;</code> </literallayout> -<literallayout > -typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; - ApplicationShellPart application; - SessionShellPart session; -} SessionShellRec, *SessionShellWidget; +<literallayout> +<code>typedef struct {</code> +<code> CorePart core;</code> +<code> CompositePart composite;</code> +<code> ShellPart shell;</code> +<code> WMShellPart wm;</code> +<code> VendorShellPart vendor;</code> +<code> TopLevelShellPart topLevel;</code> +<code> ApplicationShellPart application;</code> +<code> SessionShellPart session;</code> +<code>} SessionShellRec, *SessionShellWidget;</code> </literallayout> </sect2> @@ -2062,19 +2062,19 @@ The checkpoint token in the <emphasis remap='I'>call_data</emphasis> parameter i <function>XtCheckpointToken</function>. </para> -<literallayout > -typedef struct { - int save_type; - int interact_style; - Boolean shutdown; - Boolean fast; - Boolean cancel_shutdown - int phase; - int interact_dialog_type; /* return */ - Boolean request_cancel; /* return */ - Boolean request_next_phase; /* return */ - Boolean save_success; /* return */ -} XtCheckpointTokenRec, *XtCheckpointToken; +<literallayout> +<code>typedef struct {</code> +<code> int save_type;</code> +<code> int interact_style;</code> +<code> Boolean shutdown;</code> +<code> Boolean fast;</code> +<code> Boolean cancel_shutdown</code> +<code> int phase;</code> +<code> int interact_dialog_type; /* return */</code> +<code> Boolean request_cancel; /* return */</code> +<code> Boolean request_next_phase; /* return */</code> +<code> Boolean save_success; /* return */</code> +<code>} XtCheckpointTokenRec, *XtCheckpointToken;</code> </literallayout> <para> @@ -2105,7 +2105,7 @@ If <emphasis remap='I'>cancel_shutdown</emphasis> is <function>True</function>, a <function>ShutdownCancelled</function> -message has been received for the current save operation. +message has been received for the current save operation. (See <xref linkend='Resigning_from_a_Session' />.) The <emphasis remap='I'>phase</emphasis> is used by manager clients, such as a window manager, to distinguish between the first and second phase of a save operation. @@ -2208,7 +2208,7 @@ function will return NULL if no checkpoint operation is currently under way. To indicate the completion of checkpoint processing including user interaction, the application must signal the Session shell by returning all tokens. -(See <xref linkend='Interacting_with_the_User_during_a_Checkpoint' /> and +(See <xref linkend='Interacting_with_the_User_during_a_Checkpoint' /> and <xref linkend='Completing_a_Save' />). To return a token, use <xref linkend='XtSessionReturnToken' xrefstyle='select: title'/>. diff --git a/specs/CH05.xml b/specs/CH05.xml index b346319..d92e1f3 100644 --- a/specs/CH05.xml +++ b/specs/CH05.xml @@ -391,8 +391,8 @@ Some of these routines take an argument of type <function>XtGrabKind</function>, which is defined as </para> -<literallayout > -typedef enum {XtGrabNone, XtGrabNonexclusive, XtGrabExclusive} XtGrabKind; +<literallayout> +<code>typedef enum {XtGrabNone, XtGrabNonexclusive, XtGrabExclusive} XtGrabKind;</code> </literallayout> <para> @@ -509,8 +509,8 @@ or <function>XtGrabExclusive</function>, it calls </para> -<literallayout > -XtAddGrab(<emphasis remap='I'>popup_shell</emphasis>, (<emphasis remap='I'>grab_kind</emphasis> == XtGrabExclusive), False) +<literallayout> +<code>XtAddGrab(</code><emphasis remap='I'>popup_shell</emphasis><code>, (</code><emphasis remap='I'>grab_kind</emphasis><code> == XtGrabExclusive), False)</code> </literallayout> </listitem> <listitem> @@ -985,11 +985,11 @@ The function casts the <emphasis remap='I'>client_data</emphasis> parameter to a pointer of type <function>XtPopdownID</function>. </para> -<literallayout > -typedef struct { - Widget shell_widget; - Widget enable_widget; -} XtPopdownIDRec, *XtPopdownID; +<literallayout> +<code>typedef struct {</code> +<code> Widget shell_widget;</code> +<code> Widget enable_widget;</code> +<code>} XtPopdownIDRec, *XtPopdownID;</code> </literallayout> <para> The <emphasis remap='I'>shell_widget</emphasis> is the pop-up shell to pop down, diff --git a/specs/CH06.xml b/specs/CH06.xml index c1e7c9a..d5fce79 100644 --- a/specs/CH06.xml +++ b/specs/CH06.xml @@ -121,16 +121,16 @@ When making a geometry request, the child specifies an structure. </para> -<literallayout > -typedef unsigned long XtGeometryMask; -typedef struct { - XtGeometryMask request_mode; - Position x, y; - Dimension width, height; - Dimension border_width; - Widget sibling; - int stack_mode; -} XtWidgetGeometry; +<literallayout> +<code>typedef unsigned long XtGeometryMask;</code> +<code>typedef struct {</code> +<code> XtGeometryMask request_mode;</code> +<code> Position x, y;</code> +<code> Dimension width, height;</code> +<code> Dimension border_width;</code> +<code> Widget sibling;</code> +<code> int stack_mode;</code> +<code>} XtWidgetGeometry;</code> </literallayout> <para> @@ -275,13 +275,13 @@ when called by a child of a primitive widget. The return codes from geometry managers are </para> -<literallayout > -typedef enum { - XtGeometryYes, - XtGeometryNo, - XtGeometryAlmost, - XtGeometryDone -} XtGeometryResult; +<literallayout> +<code>typedef enum {</code> +<code> XtGeometryYes,</code> +<code> XtGeometryNo,</code> +<code> XtGeometryAlmost,</code> +<code> XtGeometryDone</code> +<code>} XtGeometryResult;</code> </literallayout> <para> diff --git a/specs/CH07.xml b/specs/CH07.xml index 46ef7f6..0b056ee 100644 --- a/specs/CH07.xml +++ b/specs/CH07.xml @@ -2851,11 +2851,11 @@ dispatched to the widget's expose procedure. This field must be initialized to one of the following values: </para> -<literallayout > -#define XtExposeNoCompress ((XtEnum)False) -#define XtExposeCompressSeries ((XtEnum)True) -#define XtExposeCompressMultiple <implementation-defined> -#define XtExposeCompressMaximal <implementation-defined> +<literallayout> +<code>#define XtExposeNoCompress ((XtEnum)False)</code> +<code>#define XtExposeCompressSeries ((XtEnum)True)</code> +<code>#define XtExposeCompressMultiple <implementation-defined></code> +<code>#define XtExposeCompressMaximal <implementation-defined></code> </literallayout> <para> @@ -3141,10 +3141,10 @@ the widgets Label, Pushbutton, and Toggle, you could write a single display routine in Label that uses display state fields like </para> -<literallayout > -Boolean invert; -Boolean highlight; -Dimension highlight_width; +<literallayout> +<code>Boolean invert;</code> +<code>Boolean highlight;</code> +<code>Dimension highlight_width;</code> </literallayout> <para> Label would have <emphasis remap='I'>invert</emphasis> and <emphasis remap='I'>highlight</emphasis> always @@ -3522,8 +3522,8 @@ To register an event handler procedure that receives events before or after all previously registered event handlers, use <xref linkend='XtInsertEventHandler' xrefstyle='select: title'/>. </para> -<literallayout > -typedef enum {XtListHead, XtListTail} XtListPosition; +<literallayout> +<code>typedef enum {XtListHead, XtListTail} XtListPosition;</code> </literallayout> <funcsynopsis id='XtInsertEventHandler'> @@ -4735,12 +4735,12 @@ Resource converters are an exception. They require the application context or process to be locked before the application can safely call them directly, for example: </para> -<literallayout > - ... - XtAppLock(app_context); - XtCvtStringToPixel(dpy, args, num_args, fromVal, toVal, closure_ret); - XtAppUnlock(app_context); - ... +<literallayout> +<code> </code>... +<code> XtAppLock(app_context);</code> +<code> XtCvtStringToPixel(dpy, args, num_args, fromVal, toVal, closure_ret);</code> +<code> XtAppUnlock(app_context);</code> +<code> </code>... </literallayout> <para> When the application relies upon @@ -4756,28 +4756,28 @@ utility functions, such as one which retrieves the being_destroyed field from a widget instance, must lock the application context before accessing widget internal data. For example: </para> -<literallayout > -#include <X11/CoreP.h> -Boolean BeingDestroyed (Widget widget) -{ - Boolean ret; - XtAppLock(XtWidgetToApplicationContext(widget)); - ret = widget->core.being_destroyed; - XtAppUnlock(XtWidgetToApplicationContext(widget)); - return ret; -} +<literallayout> +<code>#include <X11/CoreP.h></code> +<code>Boolean BeingDestroyed (Widget widget)</code> +<code>{</code> +<code> Boolean ret;</code> +<code> XtAppLock(XtWidgetToApplicationContext(widget));</code> +<code> ret = widget->core.being_destroyed;</code> +<code> XtAppUnlock(XtWidgetToApplicationContext(widget));</code> +<code> return ret;</code> +<code>}</code> </literallayout> <para> A client that wishes to atomically call two or more Intrinsics functions must lock the application context. For example: </para> -<literallayout > - ... - XtAppLock(XtWidgetToApplicationContext(widget)); - XtUnmanageChild (widget1); - XtManageChild (widget2); - XtAppUnlock(XtWidgetToApplicationContext(widget)); - ... +<literallayout> +<code> </code>... +<code> XtAppLock(XtWidgetToApplicationContext(widget));</code> +<code> XtUnmanageChild (widget1);</code> +<code> XtManageChild (widget2);</code> +<code> XtAppUnlock(XtWidgetToApplicationContext(widget));</code> +<code> </code>... </literallayout> <sect3 id="Locking_the_Application_Context"> <title>Locking the Application Context</title> diff --git a/specs/CH08.xml b/specs/CH08.xml index 2a987cc..5d867e6 100644 --- a/specs/CH08.xml +++ b/specs/CH08.xml @@ -99,22 +99,22 @@ call, it should specify the address of a NULL-terminated array of type <function>XtCallbackList</function>. </para> -<literallayout > -typedef struct { - XtCallbackProc callback; - XtPointer closure; -} XtCallbackRec, *XtCallbackList; +<literallayout> +<code>typedef struct {</code> +<code> XtCallbackProc callback;</code> +<code> XtPointer closure;</code> +<code>} XtCallbackRec, *XtCallbackList;</code> </literallayout> <para> For example, the callback list for procedures A and B with client data clientDataA and clientDataB, respectively, is </para> -<literallayout > -static XtCallbackRec callbacks[] = { - {A, (XtPointer) clientDataA}, - {B, (XtPointer) clientDataB}, - {(XtCallbackProc) NULL, (XtPointer) NULL} -}; +<literallayout> +<code>static XtCallbackRec callbacks[] = {</code> +<code> {A, (XtPointer) clientDataA},</code> +<code> {B, (XtPointer) clientDataB},</code> +<code> {(XtCallbackProc) NULL, (XtPointer) NULL}</code> +<code>};</code> </literallayout> <para> Although callback lists are passed by address in arglists diff --git a/specs/CH09.xml b/specs/CH09.xml index 12229b5..ea0ddf8 100644 --- a/specs/CH09.xml +++ b/specs/CH09.xml @@ -43,16 +43,16 @@ The declaration for the <function>XtResource</function> structure is </para> -<literallayout > -typedef struct { - String resource_name; - String resource_class; - String resource_type; - Cardinal resource_size; - Cardinal resource_offset; - String default_type; - XtPointer default_addr; -} XtResource, *XtResourceList; +<literallayout> +<code>typedef struct {</code> +<code> String resource_name;</code> +<code> String resource_class;</code> +<code> String resource_type;</code> +<code> Cardinal resource_size;</code> +<code> Cardinal resource_offset;</code> +<code> String default_type;</code> +<code> XtPointer default_addr;</code> +<code>} XtResource, *XtResourceList;</code> </literallayout> <para> When the resource list is specified as the @@ -127,9 +127,9 @@ and all the other pixel entries a resource class of Then, the resource file needs only two lines to change all pixels to ivory or darkblue: </para> -<literallayout > -*Background: ivory -*Foreground: darkblue +<literallayout> +<code>*Background: ivory</code> +<code>*Foreground: darkblue</code> </literallayout> <para> Similarly, a widget may have several font resources (such as normal and bold), @@ -137,7 +137,7 @@ but all fonts should have the class Font. Thus, changing all fonts simply requires only a single line in the default resource file: </para> -<literallayout > +<literallayout> *Font: 6x13 </literallayout> <para> @@ -638,19 +638,19 @@ see <xref linkend='Obtaining_Widget_State' /> and <para> Here is an abbreviated version of a possible resource list for a Label widget: </para> -<literallayout > -/* Resources specific to Label */ -static XtResource resources[] = { -{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel), - XtOffsetOf(LabelRec, label.foreground), XtRString, XtDefaultForeground}, -{XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct*), - XtOffsetOf(LabelRec, label.font), XtRString, XtDefaultFont}, -{XtNlabel, XtCLabel, XtRString, sizeof(String), - XtOffsetOf(LabelRec, label.label), XtRString, NULL}, - . - . - . -} +<literallayout> +<code>/* Resources specific to Label */</code> +<code>static XtResource resources[] = {</code> +<code>{XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),</code> +<code> XtOffsetOf(LabelRec, label.foreground), XtRString, XtDefaultForeground},</code> +<code>{XtNfont, XtCFont, XtRFontStruct, sizeof(XFontStruct*),</code> +<code> XtOffsetOf(LabelRec, label.font), XtRString, XtDefaultFont},</code> +<code>{XtNlabel, XtCLabel, XtRString, sizeof(String),</code> +<code> XtOffsetOf(LabelRec, label.label), XtRString, NULL},</code> +<code> .</code> +<code> .</code> +<code> .</code> +<code>}</code> </literallayout> <para> The complete resource name for a field of a widget instance is the @@ -1756,11 +1756,11 @@ see <olink targetdoc='libX11' targetptr='Creating_and_Storing_Databases'>Section <olink targetdoc='libX11' targetptr='libX11'>Xlib — C Language X Interface.</olink>) for input and output values. </para> -<literallayout > -typedef struct { - unsigned int size; - XPointer addr; -} XrmValue, *XrmValuePtr; +<literallayout> +<code>typedef struct {</code> +<code> unsigned int size;</code> +<code> XPointer addr;</code> +<code>} XrmValue, *XrmValuePtr;</code> </literallayout> <para> The <emphasis remap='I'>addr</emphasis> field specifies the address of the data, and the <emphasis remap='I'>size</emphasis> @@ -1939,71 +1939,71 @@ still required to inform the Intrinsics that the converted value is a function of the particular display (and colormap). </para> -<literallayout > -#define done(type, value) \\ - { \\ - if (toVal->addr != NULL) { \\ - if (toVal->size < sizeof(type)) { \\ - toVal->size = sizeof(type); \\ - return False; \\ - } \\ - *(type*)(toVal->addr) = (value); \\ - } \\ - else { \\ - static type static_val; \\ - static_val = (value); \\ - toVal->addr = (XPointer)&static_val; \\ - } \\ - toVal->size = sizeof(type); \\ - return True; \\ - } - -static Boolean CvtStringToPixel( - Display *dpy, - XrmValue *args, - Cardinal *num_args, - XrmValue *fromVal, - XrmValue *toVal, - XtPointer *converter_data) -{ - static XColor screenColor; - XColor exactColor; - Screen *screen; - Colormap colormap; - Status status; - - if (*num_args != 2) - XtAppWarningMsg(XtDisplayToApplicationContext(dpy), - "wrongParameters", "cvtStringToPixel", "XtToolkitError", - "String to pixel conversion needs screen and colormap arguments", - (String *)NULL, (Cardinal *)NULL); - screen = *((Screen**) args[0].addr); - colormap = *((Colormap *) args[1].addr); - if (CompareISOLatin1(str, XtDefaultBackground) == 0) { - *closure_ret = False; - done(Pixel, WhitePixelOfScreen(screen)); - } - if (CompareISOLatin1(str, XtDefaultForeground) == 0) { - *closure_ret = False; - done(Pixel, BlackPixelOfScreen(screen)); - } - status = XAllocNamedColor(DisplayOfScreen(screen), colormap, (char*)fromVal->addr, - &screenColor, &exactColor); - if (status == 0) { - String params[1]; - Cardinal num_params = 1; - params[0] = (String)fromVal->addr; - XtAppWarningMsg(XtDisplayToApplicationContext(dpy), - "noColormap", "cvtStringToPixel", "XtToolkitError", - "Cannot allocate colormap entry for \\"%s\\"", - params, &num_params); - *converter_data = (char *) False; - return False; - } else { - *converter_data = (char *) True; - done(Pixel, &screenColor.pixel); - } -} +<literallayout> +<code>#define done(type, value) \\</code> +<code> { \\</code> +<code> if (toVal->addr != NULL) { \\</code> +<code> if (toVal->size < sizeof(type)) { \\</code> +<code> toVal->size = sizeof(type); \\</code> +<code> return False; \\</code> +<code> } \\</code> +<code> *(type*)(toVal->addr) = (value); \\</code> +<code> } \\</code> +<code> else { \\</code> +<code> static type static_val; \\</code> +<code> static_val = (value); \\</code> +<code> toVal->addr = (XPointer)&static_val; \\</code> +<code> } \\</code> +<code> toVal->size = sizeof(type); \\</code> +<code> return True; \\</code> +<code> }</code> + +<code>static Boolean CvtStringToPixel(</code> +<code> Display *dpy,</code> +<code> XrmValue *args,</code> +<code> Cardinal *num_args,</code> +<code> XrmValue *fromVal,</code> +<code> XrmValue *toVal,</code> +<code> XtPointer *converter_data)</code> +<code>{</code> +<code> static XColor screenColor;</code> +<code> XColor exactColor;</code> +<code> Screen *screen;</code> +<code> Colormap colormap;</code> +<code> Status status;</code> + +<code> if (*num_args != 2)</code> +<code> XtAppWarningMsg(XtDisplayToApplicationContext(dpy),</code> +<code> "wrongParameters", "cvtStringToPixel", "XtToolkitError",</code> +<code> "String to pixel conversion needs screen and colormap arguments",</code> +<code> (String *)NULL, (Cardinal *)NULL);</code> +<code> screen = *((Screen**) args[0].addr);</code> +<code> colormap = *((Colormap *) args[1].addr);</code> +<code> if (CompareISOLatin1(str, XtDefaultBackground) == 0) {</code> +<code> *closure_ret = False;</code> +<code> done(Pixel, WhitePixelOfScreen(screen));</code> +<code> }</code> +<code> if (CompareISOLatin1(str, XtDefaultForeground) == 0) {</code> +<code> *closure_ret = False;</code> +<code> done(Pixel, BlackPixelOfScreen(screen));</code> +<code> }</code> +<code> status = XAllocNamedColor(DisplayOfScreen(screen), colormap, (char*)fromVal->addr,</code> +<code> &screenColor, &exactColor);</code> +<code> if (status == 0) {</code> +<code> String params[1];</code> +<code> Cardinal num_params = 1;</code> +<code> params[0] = (String)fromVal->addr;</code> +<code> XtAppWarningMsg(XtDisplayToApplicationContext(dpy),</code> +<code> "noColormap", "cvtStringToPixel", "XtToolkitError",</code> +<code> "Cannot allocate colormap entry for \\"%s\\"",</code> +<code> params, &num_params);</code> +<code> *converter_data = (char *) False;</code> +<code> return False;</code> +<code> } else {</code> +<code> *converter_data = (char *) True;</code> +<code> done(Pixel, &screenColor.pixel);</code> +<code> }</code> +<code>}</code> </literallayout> <para> @@ -2218,8 +2218,8 @@ calls to the converter. Conversion cache control is specified via an <function>XtCacheType</function> argument. </para> -<literallayout > -typedef int XtCacheType; +<literallayout> +<code>typedef int XtCacheType;</code> </literallayout> <para> @@ -2510,23 +2510,23 @@ specify how each argument is derived. These are defined in <function><X11/Intrinsic.h></function>. </para> -<literallayout > -typedef enum { - /* address mode parameter representation */ - XtAddress, /* address */ - XtBaseOffset, /* offset */ - XtImmediate, /* constant */ - XtResourceString, /* resource name string */ - XtResourceQuark, /* resource name quark */ - XtWidgetBaseOffset, /* offset */ - XtProcedureArg /* procedure to call */ -} XtAddressMode; - -typedef struct { - XtAddressMode address_mode; - XtPointer address_id; - Cardinal size; -} XtConvertArgRec, *XtConvertArgList; +<literallayout> +<code>typedef enum {</code> +<code> /* address mode parameter representation */</code> +<code> XtAddress, /* address */</code> +<code> XtBaseOffset, /* offset */</code> +<code> XtImmediate, /* constant */</code> +<code> XtResourceString, /* resource name string */</code> +<code> XtResourceQuark, /* resource name quark */</code> +<code> XtWidgetBaseOffset, /* offset */</code> +<code> XtProcedureArg /* procedure to call */</code> +<code>} XtAddressMode;</code> + +<code>typedef struct {</code> +<code> XtAddressMode address_mode;</code> +<code> XtPointer address_id;</code> +<code> Cardinal size;</code> +<code>} XtConvertArgRec, *XtConvertArgList;</code> </literallayout> <para> The <emphasis remap='I'>size</emphasis> field specifies the length of the data in bytes. @@ -2656,8 +2656,8 @@ To invoke explicit resource conversions, use or <xref linkend='XtCallConverter' xrefstyle='select: title'/>. </para> -<literallayout > -typedef XtPointer XtCacheRef; +<literallayout> +<code>typedef XtPointer XtCacheRef;</code> </literallayout> <funcsynopsis id='XtCallConverter'> diff --git a/specs/CH10.xml b/specs/CH10.xml index 217f62c..e71ff9f 100644 --- a/specs/CH10.xml +++ b/specs/CH10.xml @@ -111,11 +111,11 @@ Specifies the number of entries in <emphasis remap='I'>params</emphasis>. </varlistentry> </variablelist> -<literallayout > -typedef struct _XtActionsRec { - String string; - XtActionProc proc; -} XtActionsRec, *XtActionList; +<literallayout> +<code>typedef struct _XtActionsRec {</code> +<code> String string;</code> +<code> XtActionProc proc;</code> +<code>} XtActionsRec, *XtActionList;</code> </literallayout> <para> The <emphasis remap='I'>string</emphasis> field is the name used in translation tables to access @@ -178,14 +178,14 @@ The string entry is the name used in translation tables. The procedure entry (usually spelled identically to the string) is the name of the C procedure that implements that function: </para> -<literallayout > -XtActionsRec actionTable[] = { - {"Set", Set}, - {"Unset", Unset}, - {"Highlight", Highlight}, - {"Unhighlight", Unhighlight} - {"Notify", Notify}, -}; +<literallayout> +<code>XtActionsRec actionTable[] = {</code> +<code> {"Set", Set},</code> +<code> {"Unset", Unset},</code> +<code> {"Highlight", Highlight},</code> +<code> {"Unhighlight", Unhighlight}</code> +<code> {"Notify", Notify},</code> +<code>};</code> </literallayout> <para> The Intrinsics reserve all action names and parameters starting with @@ -547,12 +547,12 @@ Call callbacks and reinvert on left button up. <para> The following illustrates Pushbutton's default translation table: </para> -<literallayout > -static String defaultTranslations = - "<EnterWindow>: Highlight()\\n\\ - <LeaveWindow>: Unhighlight()\\n\\ - <Btn1Down>: Set()\\n\\ - <Btn1Up>: Notify() Unset()"; +<literallayout> +<code>static String defaultTranslations =</code> +<code> "<EnterWindow>: Highlight()\\n\\</code> +<code> <LeaveWindow>: Unhighlight()\\n\\</code> +<code> <Btn1Down>: Set()\\n\\</code> +<code> <Btn1Up>: Notify() Unset()";</code> </literallayout> <para> The <emphasis remap='I'>tm_table</emphasis> field of the @@ -1386,7 +1386,7 @@ There are <emphasis remap='I'>keysyms_per_keycode_return</emphasis> KeySyms asso KeyCode, located in the table with indices starting at index </para> <literallayout> - (test_keycode - min_keycode_return) * keysyms_per_keycode_return +<code> (test_keycode - min_keycode_return) * keysyms_per_keycode_return</code> </literallayout> <para> for KeyCode <emphasis remap='I'>test_keycode</emphasis>. Any entries that have no KeySyms associated @@ -1952,7 +1952,7 @@ Specifies the action procedure to search for in translation tables. </term> <listitem> <para></para> - + </listitem> </varlistentry> <varlistentry> @@ -1961,7 +1961,7 @@ Specifies the action procedure to search for in translation tables. </term> <listitem> <para></para> - + </listitem> </varlistentry> <varlistentry> diff --git a/specs/CH11.xml b/specs/CH11.xml index 45bdf07..c693592 100644 --- a/specs/CH11.xml +++ b/specs/CH11.xml @@ -463,8 +463,8 @@ is a convenience macro that calls <xref linkend='XtMalloc' xrefstyle='select: title'/> with the following arguments specified: </para> -<literallayout > -((type *) XtMalloc((unsigned) sizeof(type))) +<literallayout> +<code>((type *) XtMalloc((unsigned) sizeof(type)))</code> </literallayout> <para> The storage allocated by @@ -510,8 +510,8 @@ is a convenience macro that calls <xref linkend='XtMalloc' xrefstyle='select: title'/> with the following arguments specified: </para> -<literallayout > -(strcpy(XtMalloc((unsigned)strlen(str) + 1), str)) +<literallayout> +<code>(strcpy(XtMalloc((unsigned)strlen(str) + 1), str))</code> </literallayout> <para> The storage allocated by @@ -1831,8 +1831,8 @@ The procedure pointer specified by the incremental owner to supply the selection data to the Intrinsics is of type <xref linkend='XtConvertSelectionIncrProc' xrefstyle='select: title'/>. </para> -<literallayout > -typedef XtPointer XtRequestId; +<literallayout> +<code>typedef XtPointer XtRequestId;</code> </literallayout> <funcsynopsis id='XtConvertSelectionIncrProc'> @@ -2324,7 +2324,7 @@ the requesting client must determine for itself whether or not a partially completed data transfer is meaningful. For more information about <emphasis remap='I'>selection</emphasis>, <emphasis remap='I'>target</emphasis>, and -<emphasis remap='I'>time</emphasis>, see +<emphasis remap='I'>time</emphasis>, see <olink targetdoc='icccm' targetptr='Use_of_Selection_Atoms' /> in the <olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual.</olink> </para> @@ -4376,11 +4376,11 @@ A string substitution is defined by a list of <function>Substitution</function> entries. </para> -<literallayout > -typedef struct { - char match; - String substitution; -} SubstitutionRec, *Substitution; +<literallayout> +<code>typedef struct {</code> +<code> char match;</code> +<code> String substitution;</code> +<code>} SubstitutionRec, *Substitution;</code> </literallayout> <para> File name evaluation is handled in an operating-system-dependent @@ -4561,7 +4561,7 @@ Specifies the display to use to find the language for language substitutions. </term> <listitem> <para></para> - + </listitem> </varlistentry> <varlistentry> @@ -4770,12 +4770,12 @@ must contain the following substitutions: <!-- OK PAST HERE --> <literallayout> -1. %C, %N, %S, %T, %L or %C, %N, %S, %T, %l, %t, %c -2. %C, %N, %S, %T, %l -3. %C, %N, %S, %T -4. %N, %S, %T, %L or %N, %S, %T, %l, %t, %c -5. %N, %S, %T, %l -6. %N, %S, %T +<code>1. %C, %N, %S, %T, %L or %C, %N, %S, %T, %l, %t, %c</code> +<code>2. %C, %N, %S, %T, %l</code> +<code>3. %C, %N, %S, %T</code> +<code>4. %N, %S, %T, %L or %N, %S, %T, %l, %t, %c</code> +<code>5. %N, %S, %T, %l</code> +<code>6. %N, %S, %T</code> </literallayout> <para> @@ -4802,9 +4802,9 @@ Possible values might include ".txt", ".dat", and ".bm". A suggested value for the default path on POSIX-based systems is </para> <literallayout> - /usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:\ - /usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:\ - /usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S +<code> /usr/lib/X11/%L/%T/%N%C%S:/usr/lib/X11/%l/%T/%N%C%S:\</code> +<code> /usr/lib/X11/%T/%N%C%S:/usr/lib/X11/%L/%T/%N%S:\</code> +<code> /usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S</code> </literallayout> @@ -4829,7 +4829,7 @@ might set to </para> <literallayout> - %D:ourdir/%T/%N%C:ourdir/%T/%N +<code> %D:ourdir/%T/%N%C:ourdir/%T/%N</code> </literallayout> <para> @@ -5039,13 +5039,13 @@ The <emphasis remap='I'>call_data</emphasis> parameter in a createHook callback cast to type <function>XtCreateHookData</function>. </para> -<literallayout > -typedef struct { - String type; - Widget widget; - ArgList args; - Cardinal num_args; -} XtCreateHookDataRec, *XtCreateHookData; +<literallayout> +<code>typedef struct {</code> +<code> String type;</code> +<code> Widget widget;</code> +<code> ArgList args;</code> +<code> Cardinal num_args;</code> +<code>} XtCreateHookDataRec, *XtCreateHookData;</code> </literallayout> <para> The <emphasis remap='I'>type</emphasis> is set to @@ -5122,13 +5122,13 @@ The <emphasis remap='I'>call_data</emphasis> parameter in a changeHook callback be cast to type <function>XtChangeHookData</function>. </para> -<literallayout > -typedef struct { - String type; - Widget widget; - XtPointer event_data; - Cardinal num_event_data; -} XtChangeHookDataRec, *XtChangeHookData; +<literallayout> +<code>typedef struct {</code> +<code> String type;</code> +<code> Widget widget;</code> +<code> XtPointer event_data;</code> +<code> Cardinal num_event_data;</code> +<code>} XtChangeHookDataRec, *XtChangeHookData;</code> </literallayout> <para> When the changeHook callbacks are called as a result of a call to @@ -5141,12 +5141,12 @@ or <emphasis remap='I'>event_data</emphasis> may be cast to type <function>XtChangeHookSetValuesData</function>. </para> -<literallayout > -typedef struct { - Widget old, req; - ArgList args; - Cardinal num_args; -} XtChangeHookSetValuesDataRec, *XtChangeHookSetValuesData; +<literallayout> +<code>typedef struct {</code> +<code> Widget old, req;</code> +<code> ArgList args;</code> +<code> Cardinal num_args;</code> +<code>} XtChangeHookSetValuesDataRec, *XtChangeHookSetValuesData;</code> </literallayout> <para> The <emphasis remap='I'>old</emphasis>, <emphasis remap='I'>req</emphasis>, <emphasis remap='I'>args</emphasis>, and <emphasis remap='I'>num_args</emphasis> are the @@ -5386,7 +5386,7 @@ itself. This is done by: </para> <literallayout> - XtCallCallbacks(XtHooksOfDisplay(dpy), XtNchangeHook, call_data); +<code> XtCallCallbacks(XtHooksOfDisplay(dpy), XtNchangeHook, call_data);</code> </literallayout> <para> The XtNconfigureHook callback list is called any time the Intrinsics @@ -5400,12 +5400,12 @@ The <emphasis remap='I'>call_data</emphasis> parameter may be cast to type <function>XtConfigureHookData.</function> </para> <literallayout> -typedef struct { - String type; - Widget widget; - XtGeometryMask changeMask; - XWindowChanges changes; -} XtConfigureHookDataRec, *XtConfigureHookData; +<code>typedef struct {</code> +<code> String type;</code> +<code> Widget widget;</code> +<code> XtGeometryMask changeMask;</code> +<code> XWindowChanges changes;</code> +<code>} XtConfigureHookDataRec, *XtConfigureHookData;</code> </literallayout> <para> When the configureHook callbacks are called, the <emphasis remap='I'>type</emphasis> is @@ -5428,14 +5428,14 @@ The <emphasis remap='I'>call_data</emphasis> parameter may be cast to type <function>XtGeometryHookData</function>. </para> -<literallayout > -typedef struct { - String type; - Widget widget; - XtWidgetGeometry* request; - XtWidgetGeometry* reply; - XtGeometryResult result; -} XtGeometryHookDataRec, *XtGeometryHookData; +<literallayout> +<code>typedef struct {</code> +<code> String type;</code> +<code> Widget widget;</code> +<code> XtWidgetGeometry* request;</code> +<code> XtWidgetGeometry* reply;</code> +<code> XtGeometryResult result;</code> +<code>} XtGeometryHookDataRec, *XtGeometryHookData;</code> </literallayout> <para> When the geometryHook callbacks are called prior to geometry negotiation, @@ -5456,11 +5456,11 @@ The XtNdestroyHook callback list is called when a widget is destroyed. The <emphasis remap='I'>call_data parameter</emphasis> may be cast to type <function>XtDestroyHookData</function>. </para> -<literallayout > -typedef struct { - String type; - Widget widget; -} XtDestroyHookDataRec, *XtDestroyHookData; +<literallayout> +<code>typedef struct {</code> +<code> String type;</code> +<code> Widget widget;</code> +<code>} XtDestroyHookDataRec, *XtDestroyHookData;</code> </literallayout> <para> When the destroyHook callbacks are called as a result of a call to diff --git a/specs/CH12.xml b/specs/CH12.xml index 869397a..cad2c05 100644 --- a/specs/CH12.xml +++ b/specs/CH12.xml @@ -65,41 +65,41 @@ but exist to pad the data structure so that it matches Core's class record. The class record initialization must fill all obj<emphasis remap='I'>n</emphasis> fields with NULL or zero as appropriate to the type. </para> -<literallayout > -typedef struct _ObjectClassPart { - WidgetClass superclass; - String class_name; - Cardinal widget_size; - XtProc class_initialize; - XtWidgetClassProc class_part_initialize; - XtEnum class_inited; - XtInitProc initialize; - XtArgsProc initialize_hook; - XtProc obj1; - XtPointer obj2; - Cardinal obj3; - XtResourceList resources; - Cardinal num_resources; - XrmClass xrm_class; - Boolean obj4; - XtEnum obj5; - Boolean obj6; - Boolean obj7; - XtWidgetProc destroy; - XtProc obj8; - XtProc obj9; - XtSetValuesFunc set_values; - XtArgsFunc set_values_hook; - XtProc obj10; - XtArgsProc get_values_hook; - XtProc obj11; - XtVersionType version; - XtPointer callback_private; - String obj12; - XtProc obj13; - XtProc obj14; - XtPointer extension; -} ObjectClassPart; +<literallayout> +<code>typedef struct _ObjectClassPart {</code> +<code> WidgetClass superclass;</code> +<code> String class_name;</code> +<code> Cardinal widget_size;</code> +<code> XtProc class_initialize;</code> +<code> XtWidgetClassProc class_part_initialize;</code> +<code> XtEnum class_inited;</code> +<code> XtInitProc initialize;</code> +<code> XtArgsProc initialize_hook;</code> +<code> XtProc obj1;</code> +<code> XtPointer obj2;</code> +<code> Cardinal obj3;</code> +<code> XtResourceList resources;</code> +<code> Cardinal num_resources;</code> +<code> XrmClass xrm_class;</code> +<code> Boolean obj4;</code> +<code> XtEnum obj5;</code> +<code> Boolean obj6;</code> +<code> Boolean obj7;</code> +<code> XtWidgetProc destroy;</code> +<code> XtProc obj8;</code> +<code> XtProc obj9;</code> +<code> XtSetValuesFunc set_values;</code> +<code> XtArgsFunc set_values_hook;</code> +<code> XtProc obj10;</code> +<code> XtArgsProc get_values_hook;</code> +<code> XtProc obj11;</code> +<code> XtVersionType version;</code> +<code> XtPointer callback_private;</code> +<code> String obj12;</code> +<code> XtProc obj13;</code> +<code> XtProc obj14;</code> +<code> XtPointer extension;</code> +<code>} ObjectClassPart;</code> </literallayout> <para> The extension record defined for @@ -109,15 +109,15 @@ with a <emphasis remap='I'>record_type</emphasis> equal to is <function>ObjectClassExtensionRec</function>. </para> -<literallayout > -typedef struct { - XtPointer next_extension; See <xref linkend='Class_Extension_Records' /> - XrmQuark record_type; See <xref linkend='Class_Extension_Records' /> - long version; See <xref linkend='Class_Extension_Records' /> - Cardinal record_size; See <xref linkend='Class_Extension_Records' /> - XtAllocateProc allocate; See <xref linkend='Widget_Instance_Allocation_The_allocate_Procedure' />. - XtDeallocateProc deallocate; See <xref linkend='Widget_Instance_Deallocation_The_deallocate_Procedure' />. -} ObjectClassExtensionRec, *ObjectClassExtension; +<literallayout> +<code>typedef struct {</code> +<code> XtPointer next_extension; </code>See <xref linkend='Class_Extension_Records' /> +<code> XrmQuark record_type; </code>See <xref linkend='Class_Extension_Records' /> +<code> long version; </code>See <xref linkend='Class_Extension_Records' /> +<code> Cardinal record_size; </code>See <xref linkend='Class_Extension_Records' /> +<code> XtAllocateProc allocate; </code>See <xref linkend='Widget_Instance_Allocation_The_allocate_Procedure' />. +<code> XtDeallocateProc deallocate; </code>See <xref linkend='Widget_Instance_Deallocation_The_deallocate_Procedure' />. +<code>} ObjectClassExtensionRec, *ObjectClassExtension;</code> </literallayout> <para> The prototypical @@ -125,10 +125,10 @@ The prototypical consists of just the <function>ObjectClassPart</function>. </para> -<literallayout > -typedef struct _ObjectClassRec { - ObjectClassPart object_class; -} ObjectClassRec, *ObjectClass; +<literallayout> +<code>typedef struct _ObjectClassRec {</code> +<code> ObjectClassPart object_class;</code> +<code>} ObjectClassRec, *ObjectClass;</code> </literallayout> <para> The predefined class record and pointer for @@ -140,15 +140,15 @@ are In <function>IntrinsicP.h</function>: </para> -<literallayout > -extern ObjectClassRec objectClassRec; +<literallayout> +<code>extern ObjectClassRec objectClassRec;</code> </literallayout> <para> In <function>Intrinsic.h</function>: </para> -<literallayout > -extern WidgetClass objectClass; +<literallayout> +<code>extern WidgetClass objectClass;</code> </literallayout> <para> The opaque types @@ -167,8 +167,8 @@ version identifier is uses an incomplete structure definition to ensure that the compiler catches attempts to access private data: </para> -<literallayout > -typedef struct _ObjectClassRec* ObjectClass; +<literallayout> +<code>typedef struct _ObjectClassRec* ObjectClass;</code> </literallayout> </sect2> @@ -182,15 +182,15 @@ structure. All fields have the same meaning as the corresponding fields in <function>CorePart</function>. </para> -<literallayout > -typedef struct _ObjectPart { - Widget self; - WidgetClass widget_class; - Widget parent; - Boolean being_destroyed; - XtCallbackList destroy_callbacks; - XtPointer constraints; -} ObjectPart; +<literallayout> +<code>typedef struct _ObjectPart {</code> +<code> Widget self;</code> +<code> WidgetClass widget_class;</code> +<code> Widget parent;</code> +<code> Boolean being_destroyed;</code> +<code> XtCallbackList destroy_callbacks;</code> +<code> XtPointer constraints;</code> +<code>} ObjectPart;</code> </literallayout> <para> All object instances have the @@ -206,17 +206,17 @@ object types. In <function>IntrinsicP.h</function>: </para> -<literallayout > -typedef struct _ObjectRec { - ObjectPart object; -} ObjectRec, *Object; +<literallayout> +<code>typedef struct _ObjectRec {</code> +<code> ObjectPart object;</code> +<code>} ObjectRec, *Object;</code> </literallayout> <para> In <function>Intrinsic.h</function>: </para> -<literallayout > -typedef struct _ObjectRec *Object; +<literallayout> +<code>typedef struct _ObjectRec *Object;</code> </literallayout> </sect2> @@ -513,41 +513,41 @@ Core's class record. The class record initialization must fill all rect<emphasis remap='I'>n</emphasis> fields with NULL or zero as appropriate to the type. </para> -<literallayout > -typedef struct _RectObjClassPart { - WidgetClass superclass; - String class_name; - Cardinal widget_size; - XtProc class_initialize; - XtWidgetClassProc class_part_initialize; - XtEnum class_inited; - XtInitProc initialize; - XtArgsProc initialize_hook; - XtProc rect1; - XtPointer rect2; - Cardinal rect3; - XtResourceList resources; - Cardinal num_resources; - XrmClass xrm_class; - Boolean rect4; - XtEnum rect5; - Boolean rect6; - Boolean rect7; - XtWidgetProc destroy; - XtWidgetProc resize; - XtExposeProc expose; - XtSetValuesFunc set_values; - XtArgsFunc set_values_hook; - XtAlmostProc set_values_almost; - XtArgsProc get_values_hook; - XtProc rect9; - XtVersionType version; - XtPointer callback_private; - String rect10; - XtGeometryHandler query_geometry; - XtProc rect11; - XtPointer extension; -} RectObjClassPart; +<literallayout> +<code>typedef struct _RectObjClassPart {</code> +<code> WidgetClass superclass;</code> +<code> String class_name;</code> +<code> Cardinal widget_size;</code> +<code> XtProc class_initialize;</code> +<code> XtWidgetClassProc class_part_initialize;</code> +<code> XtEnum class_inited;</code> +<code> XtInitProc initialize;</code> +<code> XtArgsProc initialize_hook;</code> +<code> XtProc rect1;</code> +<code> XtPointer rect2;</code> +<code> Cardinal rect3;</code> +<code> XtResourceList resources;</code> +<code> Cardinal num_resources;</code> +<code> XrmClass xrm_class;</code> +<code> Boolean rect4;</code> +<code> XtEnum rect5;</code> +<code> Boolean rect6;</code> +<code> Boolean rect7;</code> +<code> XtWidgetProc destroy;</code> +<code> XtWidgetProc resize;</code> +<code> XtExposeProc expose;</code> +<code> XtSetValuesFunc set_values;</code> +<code> XtArgsFunc set_values_hook;</code> +<code> XtAlmostProc set_values_almost;</code> +<code> XtArgsProc get_values_hook;</code> +<code> XtProc rect9;</code> +<code> XtVersionType version;</code> +<code> XtPointer callback_private;</code> +<code> String rect10;</code> +<code> XtGeometryHandler query_geometry;</code> +<code> XtProc rect11;</code> +<code> XtPointer extension;</code> +<code>} RectObjClassPart;</code> </literallayout> <para> The @@ -555,10 +555,10 @@ RectObj class record consists of just the <function>RectObjClassPart</function>. </para> -<literallayout > -typedef struct _RectObjClassRec { - RectObjClassPart rect_class; -} RectObjClassRec, *RectObjClass; +<literallayout> +<code>typedef struct _RectObjClassRec {</code> +<code> RectObjClassPart rect_class;</code> +<code>} RectObjClassRec, *RectObjClass;</code> </literallayout> <para> The predefined class record and pointer for @@ -570,15 +570,15 @@ are In <function>Intrinsic.h</function>: </para> -<literallayout > -extern RectObjClassRec rectObjClassRec; +<literallayout> +<code>extern RectObjClassRec rectObjClassRec;</code> </literallayout> <para> In <function>Intrinsic.h</function>: </para> -<literallayout > -extern WidgetClass rectObjClass; +<literallayout> +<code>extern WidgetClass rectObjClass;</code> </literallayout> <para> The opaque types @@ -594,8 +594,8 @@ RectObj. uses an incomplete structure definition to ensure that the compiler catches attempts to access private data: </para> -<literallayout > -typedef struct _RectObjClassRec* RectObjClass; +<literallayout> +<code>typedef struct _RectObjClassRec* RectObjClass;</code> </literallayout> </sect2> @@ -612,32 +612,32 @@ objects have the following fields defined in the structure. All fields have the same meaning as the corresponding field in <function>CorePart</function>. </para> -<literallayout > -typedef struct _RectObjPart { - Position x, y; - Dimension width, height; - Dimension border_width; - Boolean managed; - Boolean sensitive; - Boolean ancestor_sensitive; -} RectObjPart; +<literallayout> +<code>typedef struct _RectObjPart {</code> +<code> Position x, y;</code> +<code> Dimension width, height;</code> +<code> Dimension border_width;</code> +<code> Boolean managed;</code> +<code> Boolean sensitive;</code> +<code> Boolean ancestor_sensitive;</code> +<code>} RectObjPart;</code> </literallayout> <para> RectObj objects have the RectObj fields immediately following the Object fields. </para> -<literallayout > -typedef struct _RectObjRec { - ObjectPart object; - RectObjPart rectangle; -} RectObjRec, *RectObj; +<literallayout> +<code>typedef struct _RectObjRec {</code> +<code> ObjectPart object;</code> +<code> RectObjPart rectangle;</code> +<code>} RectObjRec, *RectObj;</code> </literallayout> <para> In <function>Intrinsic.h</function>: </para> -<literallayout > -typedef struct _RectObjRec* RectObj; +<literallayout> +<code>typedef struct _RectObjRec* RectObj;</code> </literallayout> </sect2> diff --git a/specs/CH13.xml b/specs/CH13.xml index 0216b34..90294c8 100644 --- a/specs/CH13.xml +++ b/specs/CH13.xml @@ -34,8 +34,8 @@ advantage of newer features added in later revisions may use the symbolic macro <function>XtSpecificationRelease</function>. </para> -<literallayout > -#define XtSpecificationRelease 6 +<literallayout> +<code>#define XtSpecificationRelease 6</code> </literallayout> <para> As the symbol @@ -296,10 +296,10 @@ a resource named ``baseTranslations''. <para> Applications wishing to take advantage of the new functionality would change their application defaults file, e.g., from -<literallayout > - app.widget.translations: <emphasis remap='I'>value</emphasis> +<literallayout> +<code> app.widget.translations: </code><emphasis remap='I'>value</emphasis> to - app.widget.baseTranslations: <emphasis remap='I'>value</emphasis> +<code> app.widget.baseTranslations: </code><emphasis remap='I'>value</emphasis> </literallayout> If it is important to the application to preserve complete compatibility of the defaults file between different versions diff --git a/specs/appB.xml b/specs/appB.xml index 31f59ea..e9cdaad 100644 --- a/specs/appB.xml +++ b/specs/appB.xml @@ -237,11 +237,11 @@ a dollar sign ($), and another backslash (\). Briefly: </para> -<literallayout > -No modifiers: None <event> detail -Any modifiers: <event> detail -Only these modifiers: ! mod1 mod2 <event> detail -These modifiers and any others: mod1 mod2 <event> detail +<literallayout> +<code>No modifiers: None <event> detail</code> +<code>Any modifiers: <event> detail</code> +<code>Only these modifiers: ! mod1 mod2 <event> detail</code> +<code>These modifiers and any others: mod1 mod2 <event> detail</code> </literallayout> <para> @@ -939,12 +939,12 @@ The canonical representation of a translation table is (see also <para>The canonical modifier names are</para> -<literallayout > - Ctrl Mod1 Button1 - Shift Mod2 Button2 - Lock Mod3 Button3 - Mod4 Button4 - Mod5 Button5 +<literallayout> +<code> Ctrl Mod1 Button1</code> +<code> Shift Mod2 Button2</code> +<code> Lock Mod3 Button3</code> +<code> Mod4 Button4</code> +<code> Mod5 Button5</code> </literallayout> <para>The canonical event types are</para> @@ -1030,17 +1030,17 @@ The canonical representation of a translation table is (see also <para> Always put more specific events in the table before more general ones: </para> -<literallayout > - Shift <Btn1Down> : twas()\n\ - <Btn1Down> : brillig() +<literallayout> +<code> Shift <Btn1Down> : twas()\n\</code> +<code> <Btn1Down> : brillig()</code> </literallayout> </listitem> <listitem> <para> For double-click on Button1 Up with Shift, use this specification: </para> - <literallayout > -Shift<Btn1Up>(2) : and() +<literallayout> +<code>Shift<Btn1Up>(2) : and()</code> </literallayout> </listitem> <listitem> @@ -1048,16 +1048,16 @@ Shift<Btn1Up>(2) : and() This is equivalent to the following line with appropriate timers set between events: </para> - <literallayout > -Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down>,Shift<Btn1Up> : and() +<literallayout> +<code>Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down>,Shift<Btn1Up> : and()</code> </literallayout> </listitem> <listitem> <para> For double-click on Button1 Down with Shift, use this specification: </para> - <literallayout > -Shift<Btn1Down>(2) : the() +<literallayout> +<code>Shift<Btn1Down>(2) : the()</code> </literallayout> </listitem> <listitem> @@ -1065,8 +1065,8 @@ Shift<Btn1Down>(2) : the() This is equivalent to the following line with appropriate timers set between events: </para> - <literallayout > -Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down> : the() +<literallayout> +<code>Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down> : the()</code> </literallayout> </listitem> <listitem> @@ -1074,8 +1074,8 @@ Shift<Btn1Down>,Shift<Btn1Up>,Shift<Btn1Down> : the() Mouse motion is always discarded when it occurs between events in a table where no motion event is specified: </para> - <literallayout > -<Btn1Down>,<Btn1Up> : slithy() +<literallayout> +<code><Btn1Down>,<Btn1Up> : slithy()</code> </literallayout> <para> This is taken, even if the pointer moves a bit between the down and @@ -1093,9 +1093,9 @@ noninitial subsequence of another translation, it is not taken if it occurs in the context of the longer sequence. This occurs mostly in sequences like the following: </para> - <literallayout > -<Btn1Down>,<Btn1Up> : toves()\n\ -<Btn1Up> : did() +<literallayout> +<code><Btn1Down>,<Btn1Up> : toves()\n\</code> +<code><Btn1Up> : did()</code> </literallayout> <para> The second translation is taken only if the button release is not @@ -1117,8 +1117,8 @@ For single click on Button1 Up with Shift and Meta, use this specification: </para> </listitem> <listitem> - <literallayout > -Shift Meta <Btn1Down>, Shift Meta<Btn1Up>: gyre() +<literallayout> +<code>Shift Meta <Btn1Down>, Shift Meta<Btn1Up>: gyre()</code> </literallayout> </listitem> <listitem> @@ -1129,8 +1129,8 @@ count in an event sequence. The actions will be invoked on the <emphasis remap='I'>count</emphasis>-th click and each subsequent one arriving within the multi-click time interval. For example: </para> - <literallayout > -Shift <Btn1Up>(2+) : and() +<literallayout> +<code>Shift <Btn1Up>(2+) : and()</code> </literallayout> </listitem> <listitem> @@ -1139,8 +1139,8 @@ To indicate <function>EnterNotify</function> with any modifiers, use this specification: </para> - <literallayout > -<Enter> : gimble() +<literallayout> +<code><Enter> : gimble()</code> </literallayout> </listitem> <listitem> @@ -1149,8 +1149,8 @@ To indicate <function>EnterNotify</function> with no modifiers, use this specification: </para> - <literallayout > -None <Enter> : in() +<literallayout> +<code>None <Enter> : in()</code> </literallayout> </listitem> <listitem> @@ -1160,8 +1160,8 @@ To indicate with Button1 Down and Button2 Up and "don't care" about the other modifiers, use this specification: </para> - <literallayout > -Button1 ~Button2 <Enter> : the() +<literallayout> +<code>Button1 ~Button2 <Enter> : the()</code> </literallayout> </listitem> <listitem> @@ -1170,8 +1170,8 @@ To indicate <function>EnterNotify</function> with Button1 down and Button2 down exclusively, use this specification: </para> - <literallayout > -! Button1 Button2 <Enter> : wabe() +<literallayout> +<code>! Button1 Button2 <Enter> : wabe()</code> </literallayout> <para> You do not need to use a tilde (~) with an exclamation point (!). diff --git a/specs/appC.xml b/specs/appC.xml index 7766581..b78f2b8 100644 --- a/specs/appC.xml +++ b/specs/appC.xml @@ -44,8 +44,8 @@ as: </para> <literallayout> -#define XtLabelCreate(name, parent, args, num_args) \ - ((LabelWidget) XtCreateWidget(name, labelWidgetClass, parent, args, num_args)) +<code>#define XtLabelCreate(name, parent, args, num_args) \</code> +<code> ((LabelWidget) XtCreateWidget(name, labelWidgetClass, parent, args, num_args))</code> </literallayout> <para> @@ -1485,7 +1485,7 @@ an application- or widget-specific database), use <paramdef><parameter>void</parameter></paramdef> </funcprototype> </funcsynopsis> - + <para> The <xref linkend='XtGetErrorDatabase' xrefstyle='select: title'/> |