CH13.xml revision 9e7bcd65
19e7bcd65Smrg<chapter id='Evolution_of_the_Intrinsics'>
29e7bcd65Smrg<title>Evolution of the Intrinsics</title>
39e7bcd65Smrg
49e7bcd65Smrg<para>
59e7bcd65SmrgThe interfaces described by this specification have undergone several
69e7bcd65Smrgsets of revisions in the course of adoption as an X Consortium
79e7bcd65Smrgstandard specification.  Having now been adopted by the Consortium as
89e7bcd65Smrga standard part of the X Window System, it is expected that this and
99e7bcd65Smrgfuture revisions will retain
109e7bcd65Smrgbackward compatibility in the sense that fully conforming
119e7bcd65Smrgimplementations of these specifications may be produced that provide
129e7bcd65Smrgsource compatibility with widgets and applications written to
139e7bcd65Smrgprevious Consortium standard revisions.
149e7bcd65Smrg</para>
159e7bcd65Smrg
169e7bcd65Smrg<para>
179e7bcd65SmrgThe Intrinsics do not place any special requirement on widget
189e7bcd65Smrgprogrammers to retain source or binary compatibility for their widgets
199e7bcd65Smrgas they evolve, but several conventions have been established to
209e7bcd65Smrgassist those developers who want to provide such compatibility.
219e7bcd65Smrg</para>
229e7bcd65Smrg
239e7bcd65Smrg<para>
249e7bcd65SmrgIn particular, widget programmers may wish to conform to the convention
259e7bcd65Smrgdescribed in <xref linkend='Class_Extension_Records' /> when defining class extension records.
269e7bcd65Smrg</para>
279e7bcd65Smrg<sect1 id="Determining_Specification_Revision_Level">
289e7bcd65Smrg<title>Determining Specification Revision Level</title>
299e7bcd65Smrg<para>
309e7bcd65SmrgWidget and application developers who wish to maintain a common source
319e7bcd65Smrgpool that will build properly with implementations of the Intrinsics
329e7bcd65Smrgat different revision levels of these specifications but that take
339e7bcd65Smrgadvantage of newer features added in later revisions may use the
349e7bcd65Smrgsymbolic macro
359e7bcd65Smrg<function>XtSpecificationRelease</function>.
369e7bcd65Smrg</para>
379e7bcd65Smrg<literallayout >
389e7bcd65Smrg#define XtSpecificationRelease 6
399e7bcd65Smrg</literallayout>
409e7bcd65Smrg<para>
419e7bcd65SmrgAs the symbol
429e7bcd65Smrg<function>XtSpecificationRelease</function>
439e7bcd65Smrgwas new to Release 4, widgets and
449e7bcd65Smrgapplications desiring to build against earlier implementations should
459e7bcd65Smrgtest for the presence of this symbol and assume only Release 3
469e7bcd65Smrginterfaces if the definition is not present.
479e7bcd65Smrg</para>
489e7bcd65Smrg</sect1>
499e7bcd65Smrg
509e7bcd65Smrg<sect1 id="Release_to_Release_Compatibility">
519e7bcd65Smrg<title>Release 3 to Release 4 Compatibility</title>
529e7bcd65Smrg<para>
539e7bcd65SmrgAt the data structure level, Release 4 retains binary compatibility
549e7bcd65Smrgwith Release 3 (the first X Consortium standard release) for all data
559e7bcd65Smrgstructures except
569e7bcd65Smrg<function>WMShellPart,</function>
579e7bcd65Smrg<function>TopLevelShellPart</function>,
589e7bcd65Smrgand
599e7bcd65Smrg<function>TransientShellPart</function>.
609e7bcd65SmrgRelease 4 changed the argument type to most procedures that now take
619e7bcd65Smrgarguments of type
629e7bcd65Smrg<function>XtPointer</function>
639e7bcd65Smrgand structure members that are now of type
649e7bcd65Smrg<function>XtPointer</function>
659e7bcd65Smrgin order to avoid potential ANSI C conformance problems.  It is
669e7bcd65Smrgexpected that most implementations will be binary compatible with the
679e7bcd65Smrgprevious definition.
689e7bcd65Smrg</para>
699e7bcd65Smrg
709e7bcd65Smrg<para>
719e7bcd65SmrgTwo fields in
729e7bcd65Smrg<function>CoreClassPart</function>
739e7bcd65Smrgwere changed from
749e7bcd65Smrg<function>Boolean</function>
759e7bcd65Smrgto
769e7bcd65Smrg<function>XtEnum</function>
779e7bcd65Smrgto allow implementations additional freedom in specifying the
789e7bcd65Smrgrepresentations of each.  This change should require no source
799e7bcd65Smrgmodification.
809e7bcd65Smrg</para>
819e7bcd65Smrg<sect2 id="Additional_Arguments">
829e7bcd65Smrg<title>Additional Arguments</title>
839e7bcd65Smrg<para>
849e7bcd65SmrgArguments were added to the procedure definitions for
859e7bcd65Smrg<xref linkend='XtInitProc' xrefstyle='select: title'/>,
869e7bcd65Smrg<xref linkend='XtSetValuesFunc' xrefstyle='select: title'/>,
879e7bcd65Smrgand
889e7bcd65Smrg<xref linkend='XtEventHandler' xrefstyle='select: title'/>
899e7bcd65Smrgto provide more information and to
909e7bcd65Smrgallow event handlers to abort further dispatching of the current event
919e7bcd65Smrg(caution is advised!).  The added arguments to
929e7bcd65Smrg<xref linkend='XtInitProc' xrefstyle='select: title'/>
939e7bcd65Smrgand
949e7bcd65Smrg<xref linkend='XtSetValuesFunc' xrefstyle='select: title'/>
959e7bcd65Smrgmake the initialize_hook and set_values_hook methods
969e7bcd65Smrgobsolete, but the hooks have been retained for those widgets that used
979e7bcd65Smrgthem in Release 3.
989e7bcd65Smrg</para>
999e7bcd65Smrg</sect2>
1009e7bcd65Smrg
1019e7bcd65Smrg<sect2 id="set_values_almost_Procedures">
1029e7bcd65Smrg<title>set_values_almost Procedures</title>
1039e7bcd65Smrg<para>
1049e7bcd65SmrgThe use of the arguments by a set_values_almost procedure was poorly
1059e7bcd65Smrgdescribed in Release 3 and was inconsistent with other conventions.
1069e7bcd65Smrg</para>
1079e7bcd65Smrg
1089e7bcd65Smrg<para>
1099e7bcd65SmrgThe current specification for the manner in which a set_values_almost
1109e7bcd65Smrgprocedure returns information to the Intrinsics is not compatible with
1119e7bcd65Smrgthe Release 3 specification, and all widget implementations should
1129e7bcd65Smrgverify that any set_values_almost procedures conform to the current
1139e7bcd65Smrginterface.
1149e7bcd65Smrg</para>
1159e7bcd65Smrg
1169e7bcd65Smrg<para>
1179e7bcd65SmrgNo known implementation of the Intrinsics correctly implemented the
1189e7bcd65SmrgRelease 3 interface, so it is expected that the impact of this
1199e7bcd65Smrgspecification change is small.
1209e7bcd65Smrg</para>
1219e7bcd65Smrg</sect2>
1229e7bcd65Smrg
1239e7bcd65Smrg<sect2 id="Query_Geometry">
1249e7bcd65Smrg<title>Query Geometry</title>
1259e7bcd65Smrg<para>
1269e7bcd65SmrgA composite widget layout routine that calls
1279e7bcd65Smrg<xref linkend='XtQueryGeometry' xrefstyle='select: title'/>
1289e7bcd65Smrgis now expected to store the complete new geometry in the intended structure;
1299e7bcd65Smrgpreviously the specification said ``store the changes it intends to
1309e7bcd65Smrgmake''.  Only by storing the complete geometry does the child have
1319e7bcd65Smrgany way to know what other parts of the geometry may still be
1329e7bcd65Smrgflexible.  Existing widgets should not be affected by this, except
1339e7bcd65Smrgto take advantage of the new information.
1349e7bcd65Smrg</para>
1359e7bcd65Smrg</sect2>
1369e7bcd65Smrg
1379e7bcd65Smrg<sect2 id="unrealizeCallback_Callback_List">
1389e7bcd65Smrg<title>unrealizeCallback Callback List</title>
1399e7bcd65Smrg<para>
1409e7bcd65SmrgIn order to provide a mechanism for widgets to be notified when they
1419e7bcd65Smrgbecome unrealized through a call to
1429e7bcd65Smrg<xref linkend='XtUnrealizeWidget' xrefstyle='select: title'/>,
1439e7bcd65Smrgthe callback
1449e7bcd65Smrglist name ``unrealizeCallback'' has been defined by the Intrinsics.  A
1459e7bcd65Smrgwidget class that requires notification on unrealize may declare a
1469e7bcd65Smrgcallback list resource by this name.  No class is required to declare
1479e7bcd65Smrgthis resource, but any class that did so in a prior revision may find
1489e7bcd65Smrgit necessary to modify the resource name if it does not wish to use the new
1499e7bcd65Smrgsemantics.
1509e7bcd65Smrg</para>
1519e7bcd65Smrg</sect2>
1529e7bcd65Smrg
1539e7bcd65Smrg<sect2 id="Subclasses_of_WMShell">
1549e7bcd65Smrg<title>Subclasses of WMShell</title>
1559e7bcd65Smrg<para>
1569e7bcd65SmrgThe formal adoption of the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis> as
1579e7bcd65Smrgan X Consortium standard has meant the addition of four fields to
1589e7bcd65Smrg<function>WMShellPart</function>
1599e7bcd65Smrgand one field to
1609e7bcd65Smrg<function>TopLevelShellPart</function>.
1619e7bcd65SmrgIn deference to some
1629e7bcd65Smrgwidget libraries that had developed their own additional conventions
1639e7bcd65Smrgto provide binary compatibility, these five new fields were added at
1649e7bcd65Smrgthe end of the respective data structures.
1659e7bcd65Smrg</para>
1669e7bcd65Smrg
1679e7bcd65Smrg<para>
1689e7bcd65SmrgTo provide more convenience for TransientShells, a field was added
1699e7bcd65Smrgto the previously empty
1709e7bcd65Smrg<function>TransientShellPart</function>.
1719e7bcd65SmrgOn some architectures the size of the part structure will not
1729e7bcd65Smrghave changed as a result of this.
1739e7bcd65Smrg</para>
1749e7bcd65Smrg
1759e7bcd65Smrg<para>
1769e7bcd65SmrgAny widget implementation whose class is a subclass of
1779e7bcd65SmrgTopLevelShell
1789e7bcd65Smrgor
1799e7bcd65SmrgTransientShell
1809e7bcd65Smrgmust at minimum be
1819e7bcd65Smrgrecompiled with the new data structure declarations.  Because
1829e7bcd65Smrg<function>WMShellPart</function>
1839e7bcd65Smrgno longer contains a contiguous
1849e7bcd65Smrg<function>XSizeHints</function>
1859e7bcd65Smrgdata structure,
1869e7bcd65Smrga subclass that expected to do a single structure assignment of an
1879e7bcd65Smrg<function>XSizeHints</function>
1889e7bcd65Smrgstructure to the <emphasis remap='I'>size_hints</emphasis> field of
1899e7bcd65Smrg<function>WMShellPart</function>
1909e7bcd65Smrgmust be revised, though the old fields remain at the same positions within
1919e7bcd65Smrg<function>WMShellPart</function>.
1929e7bcd65Smrg</para>
1939e7bcd65Smrg</sect2>
1949e7bcd65Smrg
1959e7bcd65Smrg<sect2 id="Resource_Type_Converters">
1969e7bcd65Smrg<title>Resource Type Converters</title>
1979e7bcd65Smrg<para>
1989e7bcd65SmrgA new interface declaration for resource type converters was defined
1999e7bcd65Smrgto provide more information to converters, to support conversion
2009e7bcd65Smrgcache cleanup with resource reference counting, and to allow
2019e7bcd65Smrgadditional procedures to be declared to free resources.  The old
2029e7bcd65Smrginterfaces remain (in the compatibility section), and a new set of
2039e7bcd65Smrgprocedures was defined that work only with the new type converter
2049e7bcd65Smrginterface.
2059e7bcd65Smrg</para>
2069e7bcd65Smrg
2079e7bcd65Smrg<para>
2089e7bcd65SmrgIn the now obsolete old type converter interface, converters are
2099e7bcd65Smrgreminded that they must return the size of the converted value as well
2109e7bcd65Smrgas its address.  The example indicated this, but the description of
2119e7bcd65Smrg<xref linkend='XtConverter' xrefstyle='select: title'/>
2129e7bcd65Smrgwas incomplete.
2139e7bcd65Smrg</para>
2149e7bcd65Smrg</sect2>
2159e7bcd65Smrg
2169e7bcd65Smrg<sect2 id="KeySym_Case_Conversion_Procedure">
2179e7bcd65Smrg<title>KeySym Case Conversion Procedure</title>
2189e7bcd65Smrg<para>
2199e7bcd65SmrgThe specification for the
2209e7bcd65Smrg<xref linkend='XtCaseProc' xrefstyle='select: title'/>
2219e7bcd65Smrgfunction type has been changed
2229e7bcd65Smrgto match the Release 3 implementation, which included necessary
2239e7bcd65Smrgadditional information required by the function (a pointer to the
2249e7bcd65Smrgdisplay connection), and corrects the argument type of the source
2259e7bcd65SmrgKeySym parameter.  No known implementation of the Intrinsics
2269e7bcd65Smrgimplemented the previously documented interface.
2279e7bcd65Smrg</para>
2289e7bcd65Smrg</sect2>
2299e7bcd65Smrg
2309e7bcd65Smrg<sect2 id="Nonwidget_Objects_2">
2319e7bcd65Smrg<title>Nonwidget Objects</title>
2329e7bcd65Smrg<para>
2339e7bcd65SmrgFormal support for nonwidget objects is new to Release 4.  A
2349e7bcd65Smrgprototype implementation was latent in at least one Release 3
2359e7bcd65Smrgimplementation of the Intrinsics, but the specification has changed
2369e7bcd65Smrgsomewhat.  The most significant change is the requirement for a
2379e7bcd65Smrgcomposite widget to declare the
2389e7bcd65Smrg<function>CompositeClassExtension</function>
2399e7bcd65Smrgrecord with the <emphasis remap='I'>accepts_objects</emphasis> field set to
2409e7bcd65Smrg<function>True</function>
2419e7bcd65Smrgin order to permit a client to create a nonwidget child.
2429e7bcd65Smrg</para>
2439e7bcd65Smrg
2449e7bcd65Smrg<para>
2459e7bcd65SmrgThe addition of this extension field ensures that composite widgets
2469e7bcd65Smrgwritten under Release 3 will not encounter unexpected errors if an
2479e7bcd65Smrgapplication attempts to create a nonwidget child.  In Release 4 there
2489e7bcd65Smrgis no requirement that all composite widgets implement the extra
2499e7bcd65Smrgfunctionality required to manage windowless children, so the
2509e7bcd65Smrg<emphasis remap='I'>accepts_objects</emphasis> field allows a composite widget to declare that it
2519e7bcd65Smrgis not prepared to do so.
2529e7bcd65Smrg</para>
2539e7bcd65Smrg</sect2>
2549e7bcd65Smrg</sect1>
2559e7bcd65Smrg
2569e7bcd65Smrg<sect1 id="Release_to_Release_Compatibility_2">
2579e7bcd65Smrg<title>Release 4 to Release 5 Compatibility</title>
2589e7bcd65Smrg<para>
2599e7bcd65SmrgAt the data structure level, Release 5 retains complete binary
2609e7bcd65Smrgcompatibility with Release 4.  The specification of the
2619e7bcd65Smrg<function>ObjectPart</function>,
2629e7bcd65Smrg<function>RectObjPart</function>,
2639e7bcd65Smrg<function>CorePart</function>,
2649e7bcd65Smrg<function>CompositePart</function>,
2659e7bcd65Smrg<function>ShellPart</function>,
2669e7bcd65Smrg<function>WMShellPart</function>,
2679e7bcd65Smrg<function>TopLevelShellPart</function>,
2689e7bcd65Smrgand
2699e7bcd65Smrg<function>ApplicationShellPart</function>
2709e7bcd65Smrginstance records was made less strict to permit implementations to
2719e7bcd65Smrgadd internal fields to these structures.  Any implementation that
2729e7bcd65Smrgchooses to do so would, of course, force a recompilation.
2739e7bcd65SmrgThe Xlib specification for
2749e7bcd65Smrg<function>XrmValue</function>
2759e7bcd65Smrgand
2769e7bcd65Smrg<function>XrmOptionDescRec</function>
2779e7bcd65Smrgwas updated to use a new type,
2789e7bcd65Smrg<function>XPointer</function>,
2799e7bcd65Smrgfor the <emphasis remap='I'>addr</emphasis> and <emphasis remap='I'>value</emphasis> fields, respectively, to avoid
2809e7bcd65SmrgANSI C conformance problems.  The definition of
2819e7bcd65Smrg<function>XPointer</function>
2829e7bcd65Smrgis binary compatible with the previous implementation.
2839e7bcd65Smrg</para>
2849e7bcd65Smrg<sect2 id="baseTranslations_Resource">
2859e7bcd65Smrg<title>baseTranslations Resource</title>
2869e7bcd65Smrg<para>
2879e7bcd65SmrgA new pseudo-resource, XtNbaseTranslations, was defined to permit
2889e7bcd65Smrgapplication developers to specify translation tables in application
2899e7bcd65Smrgdefaults files while still giving end users the ability to augment
2909e7bcd65Smrgor override individual event sequences.  This change will affect
2919e7bcd65Smrgonly those applications that wish to take advantage of the new
2929e7bcd65Smrgfunctionality or those widgets that may have previously defined
2939e7bcd65Smrga resource named ``baseTranslations''.
2949e7bcd65Smrg</para>
2959e7bcd65Smrg
2969e7bcd65Smrg<para>
2979e7bcd65SmrgApplications wishing to take advantage of the new functionality
2989e7bcd65Smrgwould change their application defaults file, e.g., from
2999e7bcd65Smrg<literallayout >
3009e7bcd65Smrg        app.widget.translations: <emphasis remap='I'>value</emphasis>
3019e7bcd65Smrgto
3029e7bcd65Smrg        app.widget.baseTranslations: <emphasis remap='I'>value</emphasis>
3039e7bcd65Smrg</literallayout>
3049e7bcd65SmrgIf it is important to the application to preserve complete
3059e7bcd65Smrgcompatibility of the defaults file between different versions
3069e7bcd65Smrgof the application running under Release 4 and Release 5,
3079e7bcd65Smrgthe full translations can be replicated in both the ``translations''
3089e7bcd65Smrgand the ``baseTranslations'' resource.
3099e7bcd65Smrg</para>
3109e7bcd65Smrg</sect2>
3119e7bcd65Smrg
3129e7bcd65Smrg<sect2 id="Resource_File_Search_Path">
3139e7bcd65Smrg<title>Resource File Search Path</title>
3149e7bcd65Smrg<para>
3159e7bcd65SmrgThe current specification allows implementations greater flexibility
3169e7bcd65Smrgin defining the directory structure used to hold the application class
3179e7bcd65Smrgand per-user application defaults files.  Previous specifications
3189e7bcd65Smrgrequired the substitution strings to appear in the default path in a
3199e7bcd65Smrgcertain order, preventing sites from collecting all the files for
3209e7bcd65Smrga specific application together in one directory.  The Release 5
3219e7bcd65Smrgspecification allows the default path to specify the substitution
3229e7bcd65Smrgstrings in any order within a single path entry.  Users will need to
3239e7bcd65Smrgpay close attention to the documentation for the specific
3249e7bcd65Smrgimplementation to know where to find these files and how to specify
3259e7bcd65Smrgtheir own
3269e7bcd65Smrg<emphasis role='strong'>XFILESEARCHPATH</emphasis>
3279e7bcd65Smrgand
3289e7bcd65Smrg<emphasis role='strong'>XUSERFILESEARCHPATH</emphasis>
3299e7bcd65Smrgvalues when overriding the system defaults.
3309e7bcd65Smrg</para>
3319e7bcd65Smrg</sect2>
3329e7bcd65Smrg
3339e7bcd65Smrg<sect2 id="Customization_Resource">
3349e7bcd65Smrg<title>Customization Resource</title>
3359e7bcd65Smrg<para>
3369e7bcd65Smrg<xref linkend='XtResolvePathname' xrefstyle='select: title'/>
3379e7bcd65Smrgsupports a new substitution string, %C, for specifying separate
3389e7bcd65Smrgapplication class resource files according to arbitrary user-specified
3399e7bcd65Smrgcategories.  The primary motivation for this addition was separate
3409e7bcd65Smrgmonochrome and color application class defaults files.  The
3419e7bcd65Smrgsubstitution value is obtained by querying the current resource
3429e7bcd65Smrgdatabase for the application resource name ``customization'', class
3439e7bcd65Smrg``Customization''.  Any application that previously used this
3449e7bcd65Smrgresource name and class will need to be aware of the possibly
3459e7bcd65Smrgconflicting semantics.
3469e7bcd65Smrg</para>
3479e7bcd65Smrg</sect2>
3489e7bcd65Smrg
3499e7bcd65Smrg<sect2 id="Per_Screen_Resource_Database">
3509e7bcd65Smrg<title>Per-Screen Resource Database</title>
3519e7bcd65Smrg<para>
3529e7bcd65SmrgTo allow a user to specify separate preferences for each screen of a
3539e7bcd65Smrgdisplay, a per-screen resource specification string has been added and
3549e7bcd65Smrgmultiple resource databases are created; one for each screen.  This
3559e7bcd65Smrgwill affect any application that modified the (formerly unique)
3569e7bcd65Smrgresource database associated with the display subsequent to the Intrinsics
3579e7bcd65Smrgdatabase initialization.  Such applications will need to be aware
3589e7bcd65Smrgof the particular screen on which each shell widget is to be created.
3599e7bcd65Smrg</para>
3609e7bcd65Smrg
3619e7bcd65Smrg<para>
3629e7bcd65SmrgAlthough the wording of the specification changed substantially in the
3639e7bcd65Smrgdescription of the process by which the resource database(s) is
3649e7bcd65Smrginitialized, the net effect is the same as in prior releases with the
3659e7bcd65Smrgexception of the added per-screen resource specification and the new
3669e7bcd65Smrgcustomization substitution string in
3679e7bcd65Smrg<xref linkend='XtResolvePathname' xrefstyle='select: title'/>.
3689e7bcd65Smrg</para>
3699e7bcd65Smrg</sect2>
3709e7bcd65Smrg
3719e7bcd65Smrg<sect2 id="Internationalization_of_Applications">
3729e7bcd65Smrg<title>Internationalization of Applications</title>
3739e7bcd65Smrg<para>
3749e7bcd65SmrgInternationalization as defined by ANSI is a technology that
3759e7bcd65Smrgallows support of an application in a single locale.  In
3769e7bcd65Smrgadding support for internationalization to the Intrinsics
3779e7bcd65Smrgthe restrictions of this model have been followed.
3789e7bcd65SmrgIn particular, the new Intrinsics interfaces are designed not to
3799e7bcd65Smrgpreclude an application from using other alternatives.
3809e7bcd65SmrgFor this reason, no Intrinsics routine makes a call to establish the
3819e7bcd65Smrglocale.   However, a convenience routine to establish the
3829e7bcd65Smrglocale at initialize time has been provided, in the form
3839e7bcd65Smrgof a default procedure that must be explicitly installed
3849e7bcd65Smrgif the application desires ANSI C locale behavior.
3859e7bcd65Smrg</para>
3869e7bcd65Smrg
3879e7bcd65Smrg<para>
3889e7bcd65SmrgAs many objects in X, particularly resource databases, now inherit
3899e7bcd65Smrgthe global locale when they are created, applications wishing to use
3909e7bcd65Smrgthe ANSI C locale model should use the new function
3919e7bcd65Smrg<function>XtSetLanguageProc</function>
3929e7bcd65Smrgto do so.
3939e7bcd65Smrg</para>
3949e7bcd65Smrg
3959e7bcd65Smrg<para>
3969e7bcd65SmrgThe internationalization additions also define event filters
3979e7bcd65Smrgas a part of the Xlib Input Method specifications.  The
3989e7bcd65SmrgIntrinsics enable the use of event filters through additions to
3999e7bcd65Smrg<xref linkend='XtDispatchEvent' xrefstyle='select: title'/>.
4009e7bcd65SmrgApplications that may not be dispatching all events through
4019e7bcd65Smrg<xref linkend='XtDispatchEvent' xrefstyle='select: title'/>
4029e7bcd65Smrgshould be reviewed in the context of this new input method mechanism.
4039e7bcd65Smrg</para>
4049e7bcd65Smrg
4059e7bcd65Smrg<para>
4069e7bcd65SmrgIn order to permit internationalization of error messages, the name
4079e7bcd65Smrgand path of the error database file are now allowed to be
4089e7bcd65Smrgimplementation-dependent.
4099e7bcd65SmrgNo adequate standard mechanism has yet been suggested to
4109e7bcd65Smrgallow the Intrinsics to locate the database from localization information
4119e7bcd65Smrgsupplied by the client.
4129e7bcd65Smrg</para>
4139e7bcd65Smrg
4149e7bcd65Smrg<para>
4159e7bcd65SmrgThe previous specification for the syntax of the language string
4169e7bcd65Smrgspecified by
4179e7bcd65Smrg<function>xnlLanguage</function>
4189e7bcd65Smrghas been dropped to avoid potential conflicts with other standards.
4199e7bcd65SmrgThe language string syntax is now implementation-defined.
4209e7bcd65SmrgThe example syntax cited is consistent with the previous
4219e7bcd65Smrgspecification.
4229e7bcd65Smrg</para>
4239e7bcd65Smrg</sect2>
4249e7bcd65Smrg
4259e7bcd65Smrg<sect2 id="Permanently_Allocated_Strings">
4269e7bcd65Smrg<title>Permanently Allocated Strings</title>
4279e7bcd65Smrg<para>
4289e7bcd65SmrgIn order to permit additional memory savings, an Xlib interface was
4299e7bcd65Smrgadded to allow the resource manager to avoid copying certain string
4309e7bcd65Smrgconstants.  The Intrinsics specification was updated to explicitly require
4319e7bcd65Smrgthe Object <emphasis remap='I'>class_name</emphasis>, <emphasis remap='I'>resource_name</emphasis>, <emphasis remap='I'>resource_class</emphasis>,
4329e7bcd65Smrg<emphasis remap='I'>resource_type</emphasis>, <emphasis remap='I'>default_type</emphasis> in resource tables, Core <emphasis remap='I'>actions</emphasis>
4339e7bcd65Smrg<emphasis remap='I'>string</emphasis> field, and Constraint <emphasis remap='I'>resource_name</emphasis>, <emphasis remap='I'>resource_class</emphasis>,
4349e7bcd65Smrg<emphasis remap='I'>resource_type</emphasis>, and <emphasis remap='I'>default_type</emphasis> resource fields to be
4359e7bcd65Smrgpermanently allocated.  This explicit requirement is expected to
4369e7bcd65Smrgaffect only applications that may create and destroy classes
4379e7bcd65Smrgon the fly.
4389e7bcd65Smrg</para>
4399e7bcd65Smrg</sect2>
4409e7bcd65Smrg
4419e7bcd65Smrg<sect2 id="Arguments_to_Existing_Functions">
4429e7bcd65Smrg<title>Arguments to Existing Functions</title>
4439e7bcd65Smrg<para>
4449e7bcd65SmrgThe <emphasis remap='I'>args</emphasis> argument to
4459e7bcd65Smrg<xref linkend='XtAppInitialize' xrefstyle='select: title'/>,
4469e7bcd65Smrg<xref linkend='XtVaAppInitialize' xrefstyle='select: title'/>,
4479e7bcd65Smrg<xref linkend='XtOpenDisplay' xrefstyle='select: title'/>,
4489e7bcd65Smrg<xref linkend='XtDisplayInitialize' xrefstyle='select: title'/>,
4499e7bcd65Smrgand
4509e7bcd65Smrg<xref linkend='XtInitialize' xrefstyle='select: title'/>
4519e7bcd65Smrgwere changed from
4529e7bcd65Smrg<function>Cardinal</function>*
4539e7bcd65Smrgto int* to conform to pre-existing convention and avoid otherwise
4549e7bcd65Smrgannoying typecasting in ANSI C environments.
4559e7bcd65Smrg</para>
4569e7bcd65Smrg</sect2>
4579e7bcd65Smrg</sect1>
4589e7bcd65Smrg
4599e7bcd65Smrg<sect1 id="Release_to_Release_Compatibility_3">
4609e7bcd65Smrg<title>Release 5 to Release 6 Compatibility</title>
4619e7bcd65Smrg<para>
4629e7bcd65SmrgAt the data structure level, Release 6 retains binary compatibility
4639e7bcd65Smrgwith Release 5 for all data structures except
4649e7bcd65Smrg<function>WMShellPart</function>.
4659e7bcd65SmrgThree resources were added to the specification.
4669e7bcd65SmrgThe known implementations had unused space in the data structure,
4679e7bcd65Smrgtherefore on some architectures and implementations,
4689e7bcd65Smrgthe size of the part structure will not have changed as a result of this.
4699e7bcd65Smrg</para>
4709e7bcd65Smrg<sect2 id="Widget_Internals">
4719e7bcd65Smrg<title>Widget Internals</title>
4729e7bcd65Smrg<para>
4739e7bcd65SmrgTwo new widget methods for instance allocation and deallocation were added
4749e7bcd65Smrgto the Object class.  These new methods
4759e7bcd65Smrgallow widgets to be treated as C++ objects in the C++ environment
4769e7bcd65Smrgwhen an appropriate allocation method is specified or inherited
4779e7bcd65Smrgby the widget class.
4789e7bcd65Smrg</para>
4799e7bcd65Smrg
4809e7bcd65Smrg<para>
4819e7bcd65SmrgThe textual descriptions of the processes of widget creation and
4829e7bcd65Smrgwidget destruction have been edited to provide clarification to widget
4839e7bcd65Smrgwriters.  Widgets writers may have reason to rely on the specific order of
4849e7bcd65Smrgthe stages of widget creation and destruction; with that motivation,
4859e7bcd65Smrgthe specification now more exactly describes the process.
4869e7bcd65Smrg</para>
4879e7bcd65Smrg
4889e7bcd65Smrg<para>
4899e7bcd65SmrgAs a convenience, an interface to locate a widget class extension
4909e7bcd65Smrgrecord on a linked list,
4919e7bcd65Smrg<xref linkend='XtGetClassExtension' xrefstyle='select: title'/>,
4929e7bcd65Smrghas been added.
4939e7bcd65Smrg</para>
4949e7bcd65Smrg
4959e7bcd65Smrg<para>
4969e7bcd65SmrgA new option to allow bundled changes to the managed set of a Composite
4979e7bcd65Smrgwidget is introduced in the Composite class extension record.
4989e7bcd65SmrgWidgets that define a change_managed procedure that can accommodate
4999e7bcd65Smrgadditions and deletions to the managed set of children in a single
5009e7bcd65Smrginvocation should set allows_change_managed_set to <function>True</function> in the
5019e7bcd65Smrgextension record.
5029e7bcd65Smrg</para>
5039e7bcd65Smrg
5049e7bcd65Smrg<para>
5059e7bcd65SmrgThe wording of the process followed by
5069e7bcd65Smrg<xref linkend='XtUnmanageChildren' xrefstyle='select: title'/>
5079e7bcd65Smrghas changed slightly to better handle changes to the managed set
5089e7bcd65Smrgduring phase 2 destroy processing.
5099e7bcd65Smrg</para>
5109e7bcd65Smrg
5119e7bcd65Smrg<para>
5129e7bcd65SmrgA new exposure event compression flag,
5139e7bcd65Smrg<function>XtExposeNoRegion</function>,
5149e7bcd65Smrgwas added.  Many widgets specify exposure compression, but either
5159e7bcd65Smrgignore the actual damage region passed to the core expose procedure or
5169e7bcd65Smrguse only the cumulative bounding box data available in the event.
5179e7bcd65SmrgWidgets with expose procedures that do not make use of exact
5189e7bcd65Smrgexposure region information can indicate that the Intrinsics need not
5199e7bcd65Smrgcompute the region.
5209e7bcd65Smrg</para>
5219e7bcd65Smrg</sect2>
5229e7bcd65Smrg
5239e7bcd65Smrg<sect2 id="General_Application_Development">
5249e7bcd65Smrg<title>General Application Development</title>
5259e7bcd65Smrg<para>
5269e7bcd65Smrg<xref linkend='XtOpenApplication' xrefstyle='select: title'/>
5279e7bcd65Smrgis a new convenience procedure to initialize the toolkit, create an
5289e7bcd65Smrgapplication context, open an X display connection, and create the
5299e7bcd65Smrgroot of the widget instance tree.  It is identical to the interface
5309e7bcd65Smrgit replaces,
5319e7bcd65Smrg<xref linkend='XtAppInitialize' xrefstyle='select: title'/>,
5329e7bcd65Smrgin all respects except that it takes an additional argument specifying
5339e7bcd65Smrgthe widget class of the root shell to create.
5349e7bcd65SmrgThis interface is now the recommended one so that clients may easily
5359e7bcd65Smrgbecome session participants.
5369e7bcd65SmrgThe old convenience procedures appear in the compatibility section.
5379e7bcd65Smrg</para>
5389e7bcd65Smrg
5399e7bcd65Smrg<para>
5409e7bcd65SmrgThe toolkit initialization function
5419e7bcd65Smrg<xref linkend='XtToolkitInitialize' xrefstyle='select: title'/>
5429e7bcd65Smrgmay be called multiple times without penalty.
5439e7bcd65Smrg</para>
5449e7bcd65Smrg
5459e7bcd65Smrg<para>
5469e7bcd65SmrgIn order to optimize changes in geometry to a set of geometry-managed
5479e7bcd65Smrgchildren, a new interface,
5489e7bcd65Smrg<xref linkend='XtChangeManagedSet' xrefstyle='select: title'/>,
5499e7bcd65Smrghas been added.
5509e7bcd65Smrg</para>
5519e7bcd65Smrg</sect2>
5529e7bcd65Smrg
5539e7bcd65Smrg<sect2 id="Communication_with_Window_and_Session_Managers">
5549e7bcd65Smrg<title>Communication with Window and Session Managers</title>
5559e7bcd65Smrg<para>
5569e7bcd65SmrgThe revision of the <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis> as an X Consortium standard has resulted
5579e7bcd65Smrgin the addition of three fields to the specification of
5589e7bcd65Smrg<function>WMShellPart</function>.
5599e7bcd65SmrgThese are <emphasis remap='I'>urgency</emphasis>, <emphasis remap='I'>client_leader</emphasis>, and <emphasis remap='I'>window_role</emphasis>.
5609e7bcd65Smrg</para>
5619e7bcd65Smrg
5629e7bcd65Smrg<para>
5639e7bcd65SmrgThe adoption of the <emphasis remap='I'>X Session Management Protocol</emphasis> as an X Consortium
5649e7bcd65Smrgstandard has resulted in the addition of a new shell widget,
5659e7bcd65Smrg<function>SessionShell</function>,
5669e7bcd65Smrgand an accompanying subclass verification interface,
5679e7bcd65Smrg<function>XtIsSessionShell</function>.
5689e7bcd65SmrgThis widget provides support for communication between an application
5699e7bcd65Smrgand a session manager, as well as a window manager.
5709e7bcd65SmrgIn order to preserve compatibility with existing subclasses of
5719e7bcd65Smrg<function>ApplicationShell</function>,
5729e7bcd65Smrgthe
5739e7bcd65Smrg<function>ApplicationShell</function>
5749e7bcd65Smrgwas subclassed to create the new widget class.
5759e7bcd65SmrgThe session protocol requires a modal response to certain checkpointing
5769e7bcd65Smrgoperations by participating applications.  The
5779e7bcd65Smrg<function>SessionShell</function>
5789e7bcd65Smrgstructures
5799e7bcd65Smrgthe application's notification of and responses to messages from the session
5809e7bcd65Smrgmanager by use of various callback lists and by use of the new interfaces
5819e7bcd65Smrg<xref linkend='XtSessionGetToken' xrefstyle='select: title'/>
5829e7bcd65Smrgand
5839e7bcd65Smrg<xref linkend='XtSessionReturnToken' xrefstyle='select: title'/>.
5849e7bcd65SmrgThere is also a new command line argument, -xtsessionID, which facilitates
5859e7bcd65Smrgthe session manager in restarting applications based on the Intrinsics.
5869e7bcd65Smrg</para>
5879e7bcd65Smrg
5889e7bcd65Smrg<para>
5899e7bcd65SmrgThe resource name and class strings defined by the Intrinsics shell
5909e7bcd65Smrgwidgets in
5919e7bcd65Smrg<function>&lt;X11/Shell.h&gt;</function>
5929e7bcd65Smrgare now listed in Appendix E.  The addition of a new symbol
5939e7bcd65Smrgfor the
5949e7bcd65Smrg<function>WMShell</function>
5959e7bcd65Smrg<emphasis remap='I'>wait_for_wm</emphasis> resource was made to bring the external symbol
5969e7bcd65Smrgand the string it represents into agreement.  The actual resource name
5979e7bcd65Smrgstring in
5989e7bcd65Smrg<function>WMShell</function>
5999e7bcd65Smrghas not changed.
6009e7bcd65SmrgThe resource representation type of the XtNwinGravity resource of the
6019e7bcd65Smrg<function>WMShell</function>
6029e7bcd65Smrgwas changed to XtRGravity in order to register a type
6039e7bcd65Smrgconverter so that window gravity resource values could be specified by name.
6049e7bcd65Smrg</para>
6059e7bcd65Smrg</sect2>
6069e7bcd65Smrg
6079e7bcd65Smrg<sect2 id="Geometry_Management_2">
6089e7bcd65Smrg<title>Geometry Management</title>
6099e7bcd65Smrg<para>
6109e7bcd65SmrgA clarification to the specification was made to indicate that geometry
6119e7bcd65Smrgrequests may include current values along with the requested changes.
6129e7bcd65Smrg</para>
6139e7bcd65Smrg</sect2>
6149e7bcd65Smrg
6159e7bcd65Smrg<sect2 id="Event_Management_2">
6169e7bcd65Smrg<title>Event Management</title>
6179e7bcd65Smrg<para>
6189e7bcd65SmrgIn Release 6, support is provided for registering selectors
6199e7bcd65Smrgand event handlers for events generated by X protocol extensions
6209e7bcd65Smrgand for dispatching those events to the appropriate widget.
6219e7bcd65SmrgThe new event handler registration interfaces are
6229e7bcd65Smrg<xref linkend='XtInsertEventTypeHandler' xrefstyle='select: title'/>
6239e7bcd65Smrgand
6249e7bcd65Smrg<xref linkend='XtRemoveEventTypeHandler' xrefstyle='select: title'/>.
6259e7bcd65SmrgSince the mechanism to indicate selection of extension events is specific
6269e7bcd65Smrgto the extension being used, the Intrinsics introduces
6279e7bcd65Smrg<xref linkend='XtRegisterExtensionSelector' xrefstyle='select: title'/>,
6289e7bcd65Smrgwhich allows the application to select for the events of interest.
6299e7bcd65SmrgIn order to change the dispatching algorithm to accommodate extension events
6309e7bcd65Smrgas well as core X protocol events,
6319e7bcd65Smrgthe Intrinsics event dispatcher may now be replaced or enveloped
6329e7bcd65Smrgby the application with
6339e7bcd65Smrg<xref linkend='XtSetEventDispatcher' xrefstyle='select: title'/>.
6349e7bcd65SmrgThe dispatcher may wish to call
6359e7bcd65Smrg<xref linkend='XtGetKeyboardFocusWidget' xrefstyle='select: title'/>
6369e7bcd65Smrgto determine the widget with the current Intrinsics keyboard focus.
6379e7bcd65SmrgA dispatcher, after determining the destination widget, may use
6389e7bcd65Smrg<xref linkend='XtDispatchEventToWidget' xrefstyle='select: title'/>
6399e7bcd65Smrgto cause the event to be dispatched to the event handlers registered
6409e7bcd65Smrgby a specific widget.
6419e7bcd65Smrg</para>
6429e7bcd65Smrg
6439e7bcd65Smrg<para>
6449e7bcd65SmrgTo permit the dispatching of events
6459e7bcd65Smrgfor nonwidget drawables, such as pixmaps that are not associated
6469e7bcd65Smrgwith a widget's window,
6479e7bcd65Smrg<xref linkend='XtRegisterDrawable' xrefstyle='select: title'/>
6489e7bcd65Smrgand
6499e7bcd65Smrg<xref linkend='XtUnregisterDrawable' xrefstyle='select: title'/>
6509e7bcd65Smrghave been added to the library.  A related update was made to
6519e7bcd65Smrgthe description of
6529e7bcd65Smrg<xref linkend='XtWindowToWidget' xrefstyle='select: title'/>.
6539e7bcd65Smrg</para>
6549e7bcd65Smrg
6559e7bcd65Smrg<para>
6569e7bcd65SmrgThe library is now thread-safe, allowing one thread at a time to
6579e7bcd65Smrgenter the library and protecting global data as necessary from concurrent use.
6589e7bcd65SmrgThreaded toolkit applications are supported by the
6599e7bcd65Smrgnew interfaces
6609e7bcd65Smrg<xref linkend='XtToolkitThreadInitialize' xrefstyle='select: title'/>,
6619e7bcd65Smrg<xref linkend='XtAppLock' xrefstyle='select: title'/>,
6629e7bcd65Smrg<xref linkend='XtAppUnlock' xrefstyle='select: title'/>,
6639e7bcd65Smrg<xref linkend='XtAppSetExitFlag' xrefstyle='select: title'/>,
6649e7bcd65Smrgand
6659e7bcd65Smrg<xref linkend='XtAppGetExitFlag' xrefstyle='select: title'/>.
6669e7bcd65SmrgWidget writers may also use
6679e7bcd65Smrg<xref linkend='XtProcessLock' xrefstyle='select: title'/>
6689e7bcd65Smrgand
6699e7bcd65Smrg<xref linkend='XtProcessUnlock' xrefstyle='select: title'/>.
6709e7bcd65Smrg</para>
6719e7bcd65Smrg
6729e7bcd65Smrg<para>
6739e7bcd65SmrgSafe handling of POSIX signals and other asynchronous notifications
6749e7bcd65Smrgis now provided by use of
6759e7bcd65Smrg<xref linkend='XtAppAddSignal' xrefstyle='select: title'/>,
6769e7bcd65Smrg<xref linkend='XtNoticeSignal' xrefstyle='select: title'/>,
6779e7bcd65Smrgand
6789e7bcd65Smrg<xref linkend='XtRemoveSignal' xrefstyle='select: title'/>.
6799e7bcd65Smrg</para>
6809e7bcd65Smrg
6819e7bcd65Smrg<para>
6829e7bcd65SmrgThe application can receive notification of an impending block
6839e7bcd65Smrgin the Intrinsics event manager by registering interest through
6849e7bcd65Smrg<xref linkend='XtAppAddBlockHook' xrefstyle='select: title'/>
6859e7bcd65Smrgand
6869e7bcd65Smrg<xref linkend='XtRemoveBlockHook' xrefstyle='select: title'/>.
6879e7bcd65Smrg</para>
6889e7bcd65Smrg
6899e7bcd65Smrg<para>
6909e7bcd65Smrg<xref linkend='XtLastEventProcessed' xrefstyle='select: title'/>
6919e7bcd65Smrgreturns the most recent event passed to
6929e7bcd65Smrg<xref linkend='XtDispatchEvent' xrefstyle='select: title'/>
6939e7bcd65Smrgfor a specified display.
6949e7bcd65Smrg</para>
6959e7bcd65Smrg</sect2>
6969e7bcd65Smrg
6979e7bcd65Smrg<sect2 id="Resource_Management_2">
6989e7bcd65Smrg<title>Resource Management</title>
6999e7bcd65Smrg<para>
7009e7bcd65SmrgResource converters are registered by the Intrinsics for window gravity
7019e7bcd65Smrgand for three new resource types associated with session participation:
7029e7bcd65SmrgRestartStyle, CommandArgArray and DirectoryString.
7039e7bcd65Smrg</para>
7049e7bcd65Smrg
7059e7bcd65Smrg<para>
7069e7bcd65SmrgThe file search path syntax has been extended to make it easier to
7079e7bcd65Smrginclude the default search path, which controls resource
7089e7bcd65Smrgdatabase construction, by using the new substitution string, %D.
7099e7bcd65Smrg</para>
7109e7bcd65Smrg</sect2>
7119e7bcd65Smrg
7129e7bcd65Smrg<sect2 id="Translation_Management_2">
7139e7bcd65Smrg<title>Translation Management</title>
7149e7bcd65Smrg<para>
7159e7bcd65SmrgThe default key translator now recognizes the NumLock modifier.
7169e7bcd65SmrgIf NumLock is on and the second keysym is a keypad keysym
7179e7bcd65Smrg(a standard keysym named with a ``KP'' prefix or a
7189e7bcd65Smrgvendor-specific keysym in the hexadecimal range 0x11000000 to 0x1100FFFF),
7199e7bcd65Smrgthen the default key translator will
7209e7bcd65Smrguse the first keysym if Shift and/or ShiftLock is on and will
7219e7bcd65Smrguse the second keysym if neither is on.  Otherwise, it will
7229e7bcd65Smrgignore NumLock and apply the normal protocol semantics.
7239e7bcd65Smrg</para>
7249e7bcd65Smrg</sect2>
7259e7bcd65Smrg
7269e7bcd65Smrg<sect2 id="Selections">
7279e7bcd65Smrg<title>Selections</title>
7289e7bcd65Smrg<para>
7299e7bcd65SmrgThe targets of selection requests may be parameterized, as described
7309e7bcd65Smrgby the revised <emphasis remap='I'>Inter-Client Communication Conventions Manual.</emphasis>.
7319e7bcd65SmrgWhen such requests are made,
7329e7bcd65Smrg<xref linkend='XtSetSelectionParameters' xrefstyle='select: title'/>
7339e7bcd65Smrgis used by the requestor to specify the target parameters and
7349e7bcd65Smrg<xref linkend='XtGetSelectionParameters' xrefstyle='select: title'/>
7359e7bcd65Smrgis used by the selection owner to retrieve the parameters.
7369e7bcd65SmrgWhen a parameterized target is specified in the context of a bundled
7379e7bcd65Smrgrequest for multiple targets,
7389e7bcd65Smrg<xref linkend='XtCreateSelectionRequest' xrefstyle='select: title'/>,
7399e7bcd65Smrg<xref linkend='XtCancelSelectionRequest' xrefstyle='select: title'/>,
7409e7bcd65Smrgand
7419e7bcd65Smrg<xref linkend='XtSendSelectionRequest' xrefstyle='select: title'/>
7429e7bcd65Smrgare used to envelop the assembly of the request.
7439e7bcd65SmrgWhen the parameters themselves are the names of properties,
7449e7bcd65Smrgthe Intrinsics provides support for the economical use of property atom names;
7459e7bcd65Smrgsee
7469e7bcd65Smrg<xref linkend='XtReservePropertyAtom' xrefstyle='select: title'/>
7479e7bcd65Smrgand
7489e7bcd65Smrg<xref linkend='XtReleasePropertyAtom' xrefstyle='select: title'/>.
7499e7bcd65Smrg</para>
7509e7bcd65Smrg</sect2>
7519e7bcd65Smrg
7529e7bcd65Smrg<sect2 id="External_Agent_Hooks">
7539e7bcd65Smrg<title>External Agent Hooks</title>
7549e7bcd65Smrg<para>
7559e7bcd65SmrgExternal agent hooks were added for the benefit of applications
7569e7bcd65Smrgthat instrument other applications for purposes of accessibility,
7579e7bcd65Smrgtesting, and customization.  The external agent and the application
7589e7bcd65Smrgcommunicate by a shared protocol which is transparent to the application.
7599e7bcd65SmrgThe hook callbacks permit the external agent to register interest
7609e7bcd65Smrgin groups or classes of toolkit activity and to be notified of the
7619e7bcd65Smrgtype and details of the activity as it occurs.  The new interfaces
7629e7bcd65Smrgrelated to this effort are
7639e7bcd65Smrg<xref linkend='XtHooksOfDisplay' xrefstyle='select: title'/>,
7649e7bcd65Smrgwhich returns the hook registration widget, and
7659e7bcd65Smrg<xref linkend='XtGetDisplays' xrefstyle='select: title'/>,
7669e7bcd65Smrgwhich returns a list of the X displays associated with an application context.
7679e7bcd65Smrg</para>
7689e7bcd65Smrg</sect2>
7699e7bcd65Smrg</sect1>
7709e7bcd65Smrg</chapter>
771