diff options
author | Thomas E. Dickey <dickey@invisible-island.net> | 2019-03-29 21:47:33 -0400 |
---|---|---|
committer | Thomas E. Dickey <dickey@invisible-island.net> | 2019-04-16 18:45:50 -0400 |
commit | d9afa0ca6e677b446ce43f2f189c08cfe87f68f3 (patch) | |
tree | bea0b5acfceadf9a2c783c3c8405aa37bcad2f23 /specs | |
parent | 1dd873e7bf2239b338d2b8c35607139c0d3d6e84 (diff) |
whitespace-fixes, plus convert examples to standard C
Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
Diffstat (limited to 'specs')
-rw-r--r-- | specs/CH01.xml | 172 | ||||
-rw-r--r-- | specs/CH02.xml | 91 | ||||
-rw-r--r-- | specs/CH03.xml | 10 | ||||
-rw-r--r-- | specs/CH04.xml | 356 | ||||
-rw-r--r-- | specs/CH05.xml | 4 | ||||
-rw-r--r-- | specs/CH06.xml | 20 | ||||
-rw-r--r-- | specs/CH07.xml | 49 | ||||
-rw-r--r-- | specs/CH08.xml | 10 | ||||
-rw-r--r-- | specs/CH09.xml | 164 | ||||
-rw-r--r-- | specs/CH10.xml | 22 | ||||
-rw-r--r-- | specs/CH11.xml | 52 | ||||
-rw-r--r-- | specs/CH12.xml | 174 | ||||
-rw-r--r-- | specs/appB.xml | 8 |
13 files changed, 571 insertions, 561 deletions
diff --git a/specs/CH01.xml b/specs/CH01.xml index df2f96f..9d43092 100644 --- a/specs/CH01.xml +++ b/specs/CH01.xml @@ -1420,23 +1420,25 @@ implementation of a Label widget: <literallayout> #ifndef LABEL_H #define LABEL_H + /* New resources */ -#define XtNjustify "justify" -#define XtNforeground "foreground" -#define XtNlabel "label" -#define XtNfont "font" -#define XtNinternalWidth "internalWidth" -#define XtNinternalHeight "internalHeight" +#define XtNjustify "justify" +#define XtNforeground "foreground" +#define XtNlabel "label" +#define XtNfont "font" +#define XtNinternalWidth "internalWidth" +#define XtNinternalHeight "internalHeight" + /* Class record pointer */ extern WidgetClass labelWidgetClass; + /* C Widget type definition */ -typedef struct _LabelRec *LabelWidget; +typedef struct _LabelRec *LabelWidget; + /* New class method entry points */ -extern void LabelSetText(); - /* Widget w */ - /* String text */ -extern String LabelGetText(); - /* Widget w */ +extern void LabelSetText(Widget w, String text); +extern String LabelGetText(Widget w); + #endif LABEL_H </literallayout> <para> @@ -1557,57 +1559,62 @@ For example, the following is the private .h file for a possible Label widget: <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; + Pixel foreground; XFontStruct *font; - String label; /* text to display */ - XtJustify justify; - Dimension internal_width; /* # pixels horizontal border */ - Dimension internal_height; /* # pixels vertical border */ + 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; + 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; -</literallayout> -<literallayout> + /* Full instance record declaration */ typedef struct _LabelRec { - CorePart core; - LabelPart label; + CorePart core; + LabelPart label; } LabelRec; + /* Types for Label class methods */ -typedef void (*LabelSetTextProc)(); - /* Widget w */ - /* String text */ -typedef String (*LabelGetTextProc)(); - /* Widget w */ +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 </literallayout> <para> @@ -1744,6 +1751,7 @@ static XtResource resources[] = { . . } + /* Forward declarations of procedures */ static void ClassInitialize(); static void Initialize(); @@ -1759,57 +1767,58 @@ static void GetText(); 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 + /* 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 + /* Label_class fields */ + /* get_text */ GetText, + /* set_text */ SetText, + /* extension */ NULL } }; + /* Class record pointer */ WidgetClass labelWidgetClass = (WidgetClass) &labelClassRec; + /* New method access routines */ -void LabelSetText(w, text) - Widget w; - String text; +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 */ . . @@ -2420,16 +2429,15 @@ contains these definitions: </para> <literallayout> #define XtInheritGeometryManager ((XtGeometryHandler) _XtInherit) -#define XtInheritChangeManaged ((XtWidgetProc) _XtInherit) -#define XtInheritInsertChild ((XtArgsProc) _XtInherit) -#define XtInheritDeleteChild ((XtWidgetProc) _XtInherit) +#define XtInheritChangeManaged ((XtWidgetProc) _XtInherit) +#define XtInheritInsertChild ((XtArgsProc) _XtInherit) +#define XtInheritDeleteChild ((XtWidgetProc) _XtInherit) </literallayout> <para> Composite's class_part_initialize procedure begins as follows: </para> <literallayout> -static void CompositeClassPartInitialize(widgetClass) - WidgetClass widgetClass; +static void CompositeClassPartInitialize(WidgetClass widgetClass) { CompositeWidgetClass wc = (CompositeWidgetClass)widgetClass; CompositeWidgetClass super = (CompositeWidgetClass)wc->core_class.superclass; @@ -2616,9 +2624,9 @@ declaration: <literallayout> struct { XtPointer next_extension; - XrmQuark record_type; - long version; - Cardinal record_size; + XrmQuark record_type; + long version; + Cardinal record_size; }; </literallayout> diff --git a/specs/CH02.xml b/specs/CH02.xml index dd86b0c..6ce13b7 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(...); - ... + Widget top; + XtSetLanguageProc(NULL, NULL, NULL); + top = XtOpenApplication(...); + ... </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 + 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 </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 + 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 </literallayout> <para> The order of these seven entries within the path must be as given above. @@ -1273,21 +1273,22 @@ The format of this table is described in Section 15.9 in <emphasis remap='I'>Xli </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 */ + 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 */ + 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 */ + 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; </literallayout> <para>The standard table contains the following entries:</para> @@ -1611,8 +1612,8 @@ structures, which contains </para> <literallayout> typedef struct { - String name; - XtArgVal value; + String name; + XtArgVal value; } Arg, *ArgList; </literallayout> <para> @@ -1690,8 +1691,8 @@ minimize the probability of making a mistake; for example: Arg args[20]; int n; n = 0; -XtSetArg(args[n], XtNheight, 100); n++; -XtSetArg(args[n], XtNwidth, 200); n++; +XtSetArg(args[n], XtNheight, 100); n++; +XtSetArg(args[n], XtNwidth, 200); n++; XtSetValues(widget, args, n); </literallayout> <para> @@ -1701,8 +1702,8 @@ and use </para> <literallayout> static Args args[] = { - {XtNheight, (XtArgVal) 100}, - {XtNwidth, (XtArgVal) 200}, + {XtNheight, (XtArgVal) 100}, + {XtNwidth, (XtArgVal) 200}, }; XtSetValues(Widget, args, XtNumber(args)); </literallayout> @@ -2350,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) +xmail.geometry:... (the main window) +xmail.read.geometry:... (the read window) +xmail.compose.geometry:... (the compose window) </literallayout> <para> The second method, @@ -2360,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) +xmail.headers.geometry:... (the headers window) +xmail.read.geometry:... (the read window) +xmail.compose.geometry:... (the compose window) </literallayout> <para> To create a top-level widget that is the root of a widget tree using @@ -2760,10 +2761,10 @@ these arguments will be passed to the allocation procedure in an </para> <literallayout> typedef struct { - String name; - String type; - XtArgVal value; - int size; + String name; + String type; + XtArgVal value; + int size; } XtTypedArg, *XtTypedArgList; </literallayout> <para> diff --git a/specs/CH03.xml b/specs/CH03.xml index 3c513ca..806157f 100644 --- a/specs/CH03.xml +++ b/specs/CH03.xml @@ -1323,10 +1323,10 @@ follows: </para> <literallayout > typedef struct { - Dimension max_width, max_height; + Dimension max_width, max_height; } MaxConstraintPart; typedef struct { - MaxConstraintPart max; + MaxConstraintPart max; } MaxConstraintRecord, *MaxConstraint; </literallayout> <para> @@ -1335,11 +1335,11 @@ define its constraint record as follows: </para> <literallayout > typedef struct { - Dimension min_width, min_height; + Dimension min_width, min_height; } MinConstraintPart; typedef struct { - MaxConstraintPart max; - MinConstraintPart min; + MaxConstraintPart max; + MinConstraintPart min; } MaxMinConstraintRecord, *MaxMinConstraint; </literallayout> <para> diff --git a/specs/CH04.xml b/specs/CH04.xml index d01fe6e..aaab2d7 100644 --- a/specs/CH04.xml +++ b/specs/CH04.xml @@ -192,94 +192,94 @@ TopLevelShellClassPart, ApplicationShellClassPart, SessionShellClassPart; <literallayout > typedef struct _ShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; } ShellClassRec; </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 + 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> <literallayout > typedef struct _OverrideShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - OverrideShellClassPart override_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + OverrideShellClassPart override_shell_class; } OverrideShellClassRec; </literallayout> <literallayout > typedef struct _WMShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; } WMShellClassRec; </literallayout> <literallayout > typedef struct _VendorShellClassRec { - CoreClassPart core_class; - CompositeClassPart composite_class; - ShellClassPart shell_class; - WMShellClassPart wm_shell_class; - VendorShellClassPart vendor_shell_class; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + VendorShellClassPart vendor_shell_class; } VendorShellClassRec; </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; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + VendorShellClassPart vendor_shell_class; + TransientShellClassPart transient_shell_class; } TransientShellClassRec; </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; + CoreClassPart core_class; + CompositeClassPart composite_class; + ShellClassPart shell_class; + WMShellClassPart wm_shell_class; + VendorShellClassPart vendor_shell_class; + TopLevelShellClassPart top_level_shell_class; } TopLevelShellClassRec; </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; + 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> <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; + 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> @@ -289,22 +289,22 @@ 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 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; +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> <para> @@ -475,100 +475,100 @@ their widget records: <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; + 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> <literallayout > typedef struct { - int empty; + int empty; } OverrideShellPart; </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; + 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> <literallayout > typedef struct { - int vendor_specific; + int vendor_specific; } VendorShellPart; </literallayout> <literallayout > typedef struct { - Widget transient_for; + Widget transient_for; } TransientShellPart; typedef struct { - String icon_name; - Boolean iconic; - Atom icon_name_encoding; + String icon_name; + Boolean iconic; + Atom icon_name_encoding; } TopLevelShellPart; </literallayout> <literallayout > typedef struct { - char * class; - XrmClass xrm_class; - int argc; - char ** argv; + char * class; + XrmClass xrm_class; + int argc; + char ** argv; } ApplicationShellPart; </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; + 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> @@ -578,84 +578,84 @@ The full shell widget instance record definitions are: <literallayout > typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; + CorePart core; + CompositePart composite; + ShellPart shell; } ShellRec, *ShellWidget; </literallayout> <literallayout > typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - OverrideShellPart override; + CorePart core; + CompositePart composite; + ShellPart shell; + OverrideShellPart override; } OverrideShellRec, *OverrideShellWidget; </literallayout> <literallayout > typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; } WMShellRec, *WMShellWidget; </literallayout> <literallayout > typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; } VendorShellRec, *VendorShellWidget; </literallayout> <literallayout > typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TransientShellPart transient; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; + TransientShellPart transient; } TransientShellRec, *TransientShellWidget; </literallayout> <literallayout > typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; + TopLevelShellPart topLevel; } TopLevelShellRec, *TopLevelShellWidget; </literallayout> <literallayout > typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; - ApplicationShellPart application; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; + TopLevelShellPart topLevel; + ApplicationShellPart application; } ApplicationShellRec, *ApplicationShellWidget; </literallayout> <literallayout > typedef struct { - CorePart core; - CompositePart composite; - ShellPart shell; - WMShellPart wm; - VendorShellPart vendor; - TopLevelShellPart topLevel; - ApplicationShellPart application; - SessionShellPart session; + CorePart core; + CompositePart composite; + ShellPart shell; + WMShellPart wm; + VendorShellPart vendor; + TopLevelShellPart topLevel; + ApplicationShellPart application; + SessionShellPart session; } SessionShellRec, *SessionShellWidget; </literallayout> @@ -2064,16 +2064,16 @@ The checkpoint token in the <emphasis remap='I'>call_data</emphasis> parameter i <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 */ + 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> diff --git a/specs/CH05.xml b/specs/CH05.xml index c2fc6a1..b346319 100644 --- a/specs/CH05.xml +++ b/specs/CH05.xml @@ -987,8 +987,8 @@ function casts the <emphasis remap='I'>client_data</emphasis> parameter to a poi </para> <literallayout > typedef struct { - Widget shell_widget; - Widget enable_widget; + Widget shell_widget; + Widget enable_widget; } XtPopdownIDRec, *XtPopdownID; </literallayout> <para> diff --git a/specs/CH06.xml b/specs/CH06.xml index 7ff51bf..c1e7c9a 100644 --- a/specs/CH06.xml +++ b/specs/CH06.xml @@ -124,12 +124,12 @@ structure. <literallayout > typedef unsigned long XtGeometryMask; typedef struct { - XtGeometryMask request_mode; - Position x, y; - Dimension width, height; - Dimension border_width; - Widget sibling; - int stack_mode; + XtGeometryMask request_mode; + Position x, y; + Dimension width, height; + Dimension border_width; + Widget sibling; + int stack_mode; } XtWidgetGeometry; </literallayout> @@ -277,10 +277,10 @@ The return codes from geometry managers are <literallayout > typedef enum { - XtGeometryYes, - XtGeometryNo, - XtGeometryAlmost, - XtGeometryDone + XtGeometryYes, + XtGeometryNo, + XtGeometryAlmost, + XtGeometryDone } XtGeometryResult; </literallayout> diff --git a/specs/CH07.xml b/specs/CH07.xml index dbb9185..46ef7f6 100644 --- a/specs/CH07.xml +++ b/specs/CH07.xml @@ -2852,10 +2852,10 @@ 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> +#define XtExposeNoCompress ((XtEnum)False) +#define XtExposeCompressSeries ((XtEnum)True) +#define XtExposeCompressMultiple <implementation-defined> +#define XtExposeCompressMaximal <implementation-defined> </literallayout> <para> @@ -3142,9 +3142,9 @@ you could write a single display routine in Label that uses display state fields like </para> <literallayout > -Boolean invert; -Boolean highlight; -Dimension highlight_width; +Boolean invert; +Boolean highlight; +Dimension highlight_width; </literallayout> <para> Label would have <emphasis remap='I'>invert</emphasis> and <emphasis remap='I'>highlight</emphasis> always @@ -4736,11 +4736,11 @@ 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); - ... + ... + XtAppLock(app_context); + XtCvtStringToPixel(dpy, args, num_args, fromVal, toVal, closure_ret); + XtAppUnlock(app_context); + ... </literallayout> <para> When the application relies upon @@ -4758,14 +4758,13 @@ widget internal data. For example: </para> <literallayout > #include <X11/CoreP.h> -Boolean BeingDestroyed (widget) - Widget widget; +Boolean BeingDestroyed (Widget widget) { - Boolean ret; - XtAppLock(XtWidgetToApplicationContext(widget)); - ret = widget->core.being_destroyed; - XtAppUnlock(XtWidgetToApplicationContext(widget)); - return ret; + Boolean ret; + XtAppLock(XtWidgetToApplicationContext(widget)); + ret = widget->core.being_destroyed; + XtAppUnlock(XtWidgetToApplicationContext(widget)); + return ret; } </literallayout> <para> @@ -4773,12 +4772,12 @@ 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)); - ... + ... + XtAppLock(XtWidgetToApplicationContext(widget)); + XtUnmanageChild (widget1); + XtManageChild (widget2); + XtAppUnlock(XtWidgetToApplicationContext(widget)); + ... </literallayout> <sect3 id="Locking_the_Application_Context"> <title>Locking the Application Context</title> diff --git a/specs/CH08.xml b/specs/CH08.xml index 22000b4..2a987cc 100644 --- a/specs/CH08.xml +++ b/specs/CH08.xml @@ -101,8 +101,8 @@ of a NULL-terminated array of type </para> <literallayout > typedef struct { - XtCallbackProc callback; - XtPointer closure; + XtCallbackProc callback; + XtPointer closure; } XtCallbackRec, *XtCallbackList; </literallayout> <para> @@ -111,9 +111,9 @@ clientDataA and clientDataB, respectively, is </para> <literallayout > static XtCallbackRec callbacks[] = { - {A, (XtPointer) clientDataA}, - {B, (XtPointer) clientDataB}, - {(XtCallbackProc) NULL, (XtPointer) NULL} + {A, (XtPointer) clientDataA}, + {B, (XtPointer) clientDataB}, + {(XtCallbackProc) NULL, (XtPointer) NULL} }; </literallayout> <para> diff --git a/specs/CH09.xml b/specs/CH09.xml index 913e734..12229b5 100644 --- a/specs/CH09.xml +++ b/specs/CH09.xml @@ -45,13 +45,13 @@ 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; + String resource_name; + String resource_class; + String resource_type; + Cardinal resource_size; + Cardinal resource_offset; + String default_type; + XtPointer default_addr; } XtResource, *XtResourceList; </literallayout> <para> @@ -128,8 +128,8 @@ Then, the resource file needs only two lines to change all pixels to ivory or darkblue: </para> <literallayout > -*Background: ivory -*Foreground: darkblue +*Background: ivory +*Foreground: darkblue </literallayout> <para> Similarly, a widget may have several font resources (such as normal and bold), @@ -138,7 +138,7 @@ Thus, changing all fonts simply requires only a single line in the default resource file: </para> <literallayout > -*Font: 6x13 +*Font: 6x13 </literallayout> <para> By convention, @@ -647,9 +647,9 @@ static XtResource resources[] = { XtOffsetOf(LabelRec, label.font), XtRString, XtDefaultFont}, {XtNlabel, XtCLabel, XtRString, sizeof(String), XtOffsetOf(LabelRec, label.label), XtRString, NULL}, - . - . - . + . + . + . } </literallayout> <para> @@ -1941,66 +1941,68 @@ a function of the particular display (and colormap). <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(dpy, args, num_args, fromVal, toVal, converter_data) - Display *dpy; - XrmValue *args; - Cardinal *num_args; - XrmValue *fromVal; - XrmValue *toVal; - XtPointer *converter_data; + { \\ + 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; + 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 { + } else { *converter_data = (char *) True; - done(Pixel, &screenColor.pixel); - } + done(Pixel, &screenColor.pixel); + } } </literallayout> @@ -2510,20 +2512,20 @@ These are defined in </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 */ + /* 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; + XtAddressMode address_mode; + XtPointer address_id; + Cardinal size; } XtConvertArgRec, *XtConvertArgList; </literallayout> <para> diff --git a/specs/CH10.xml b/specs/CH10.xml index e34ef20..217f62c 100644 --- a/specs/CH10.xml +++ b/specs/CH10.xml @@ -113,8 +113,8 @@ Specifies the number of entries in <emphasis remap='I'>params</emphasis>. <literallayout > typedef struct _XtActionsRec { - String string; - XtActionProc proc; + String string; + XtActionProc proc; } XtActionsRec, *XtActionList; </literallayout> <para> @@ -180,11 +180,11 @@ 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}, + {"Set", Set}, + {"Unset", Unset}, + {"Highlight", Highlight}, + {"Unhighlight", Unhighlight} + {"Notify", Notify}, }; </literallayout> <para> @@ -549,10 +549,10 @@ 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()"; + "<EnterWindow>: Highlight()\\n\\ + <LeaveWindow>: Unhighlight()\\n\\ + <Btn1Down>: Set()\\n\\ + <Btn1Up>: Notify() Unset()"; </literallayout> <para> The <emphasis remap='I'>tm_table</emphasis> field of the diff --git a/specs/CH11.xml b/specs/CH11.xml index 7dbde47..45bdf07 100644 --- a/specs/CH11.xml +++ b/specs/CH11.xml @@ -4378,8 +4378,8 @@ entries. </para> <literallayout > typedef struct { - char match; - String substitution; + char match; + String substitution; } SubstitutionRec, *Substitution; </literallayout> <para> @@ -5041,10 +5041,10 @@ cast to type </para> <literallayout > typedef struct { - String type; - Widget widget; - ArgList args; - Cardinal num_args; + String type; + Widget widget; + ArgList args; + Cardinal num_args; } XtCreateHookDataRec, *XtCreateHookData; </literallayout> <para> @@ -5124,10 +5124,10 @@ be cast to type </para> <literallayout > typedef struct { - String type; - Widget widget; - XtPointer event_data; - Cardinal num_event_data; + String type; + Widget widget; + XtPointer event_data; + Cardinal num_event_data; } XtChangeHookDataRec, *XtChangeHookData; </literallayout> <para> @@ -5143,9 +5143,9 @@ or </para> <literallayout > typedef struct { - Widget old, req; - ArgList args; - Cardinal num_args; + Widget old, req; + ArgList args; + Cardinal num_args; } XtChangeHookSetValuesDataRec, *XtChangeHookSetValuesData; </literallayout> <para> @@ -5385,7 +5385,7 @@ without employing the Intrinsics library should invoke the change hook itself. This is done by: </para> -<literallayout > +<literallayout> XtCallCallbacks(XtHooksOfDisplay(dpy), XtNchangeHook, call_data); </literallayout> <para> @@ -5399,12 +5399,12 @@ is called. The <emphasis remap='I'>call_data</emphasis> parameter may be cast to type <function>XtConfigureHookData.</function> </para> -<literallayout > +<literallayout> typedef struct { - String type; - Widget widget; - XtGeometryMask changeMask; - XWindowChanges changes; + String type; + Widget widget; + XtGeometryMask changeMask; + XWindowChanges changes; } XtConfigureHookDataRec, *XtConfigureHookData; </literallayout> <para> @@ -5430,11 +5430,11 @@ The <emphasis remap='I'>call_data</emphasis> parameter may be cast to type <literallayout > typedef struct { - String type; - Widget widget; - XtWidgetGeometry* request; - XtWidgetGeometry* reply; - XtGeometryResult result; + String type; + Widget widget; + XtWidgetGeometry* request; + XtWidgetGeometry* reply; + XtGeometryResult result; } XtGeometryHookDataRec, *XtGeometryHookData; </literallayout> <para> @@ -5458,8 +5458,8 @@ The <emphasis remap='I'>call_data parameter</emphasis> may be cast to type </para> <literallayout > typedef struct { - String type; - Widget widget; + String type; + Widget widget; } XtDestroyHookDataRec, *XtDestroyHookData; </literallayout> <para> diff --git a/specs/CH12.xml b/specs/CH12.xml index 3ae6542..869397a 100644 --- a/specs/CH12.xml +++ b/specs/CH12.xml @@ -67,38 +67,38 @@ obj<emphasis remap='I'>n</emphasis> fields with NULL or zero as appropriate to t </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; + 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> <para> @@ -111,12 +111,12 @@ is </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' />. + 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> <para> @@ -127,7 +127,7 @@ consists of just the </para> <literallayout > typedef struct _ObjectClassRec { - ObjectClassPart object_class; + ObjectClassPart object_class; } ObjectClassRec, *ObjectClass; </literallayout> <para> @@ -184,12 +184,12 @@ corresponding fields in </para> <literallayout > typedef struct _ObjectPart { - Widget self; - WidgetClass widget_class; - Widget parent; - Boolean being_destroyed; - XtCallbackList destroy_callbacks; - XtPointer constraints; + Widget self; + WidgetClass widget_class; + Widget parent; + Boolean being_destroyed; + XtCallbackList destroy_callbacks; + XtPointer constraints; } ObjectPart; </literallayout> <para> @@ -208,7 +208,7 @@ In </para> <literallayout > typedef struct _ObjectRec { - ObjectPart object; + ObjectPart object; } ObjectRec, *Object; </literallayout> <para> @@ -515,38 +515,38 @@ rect<emphasis remap='I'>n</emphasis> fields with NULL or zero as appropriate to </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 ; + 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> <para> @@ -557,7 +557,7 @@ class record consists of just the </para> <literallayout > typedef struct _RectObjClassRec { - RectObjClassPart rect_class; + RectObjClassPart rect_class; } RectObjClassRec, *RectObjClass; </literallayout> <para> @@ -614,12 +614,12 @@ structure. All fields have the same meaning as the corresponding field in </para> <literallayout > typedef struct _RectObjPart { - Position x, y; - Dimension width, height; - Dimension border_width; - Boolean managed; - Boolean sensitive; - Boolean ancestor_sensitive; + Position x, y; + Dimension width, height; + Dimension border_width; + Boolean managed; + Boolean sensitive; + Boolean ancestor_sensitive; } RectObjPart; </literallayout> <para> @@ -628,8 +628,8 @@ objects have the RectObj fields immediately following the Object fields. </para> <literallayout > typedef struct _RectObjRec { - ObjectPart object; - RectObjPart rectangle; + ObjectPart object; + RectObjPart rectangle; } RectObjRec, *RectObj; </literallayout> <para> diff --git a/specs/appB.xml b/specs/appB.xml index 8f927ef..31f59ea 100644 --- a/specs/appB.xml +++ b/specs/appB.xml @@ -238,10 +238,10 @@ 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 +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> <para> |