CH04.xml revision 0568f49b
10568f49bSmrg<?xml version="1.0" encoding="UTF-8" ?>
20568f49bSmrg<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd">
30568f49bSmrg
49e7bcd65Smrg<chapter id='Shell_Widgets'>
59e7bcd65Smrg<title>Shell Widgets</title>
69e7bcd65Smrg
79e7bcd65Smrg<para>
89e7bcd65SmrgShell widgets hold an application's top-level widgets to allow them to
99e7bcd65Smrgcommunicate with the window manager and session manager.
109e7bcd65SmrgShells have been designed to be as nearly invisible as possible.
119e7bcd65SmrgClients have to create them,
129e7bcd65Smrgbut they should never have to worry about their sizes.
139e7bcd65Smrg</para>
149e7bcd65Smrg
159e7bcd65Smrg<para>
169e7bcd65SmrgIf a shell widget is resized from the outside (typically by a window manager),
179e7bcd65Smrgthe shell widget also resizes its managed child widget automatically.
189e7bcd65SmrgSimilarly, if the shell's child widget needs to change size,
199e7bcd65Smrgit can make a geometry request to the shell,
209e7bcd65Smrgand the shell negotiates the size change with the outer environment.
219e7bcd65SmrgClients should never attempt to change the size of their shells directly.
229e7bcd65Smrg</para>
239e7bcd65Smrg
249e7bcd65Smrg<para>The five types of public shells are:</para>
259e7bcd65Smrg<variablelist>
269e7bcd65Smrg  <varlistentry>
279e7bcd65Smrg    <term>OverrideShell</term>
289e7bcd65Smrg    <listitem>
299e7bcd65Smrg      <para>
309e7bcd65Smrg      Used for shell windows that completely bypass the window manager
319e7bcd65Smrg      (for example, pop-up menu shells).
329e7bcd65Smrg      </para>
339e7bcd65Smrg    </listitem>
349e7bcd65Smrg  </varlistentry>
359e7bcd65Smrg  <varlistentry>
369e7bcd65Smrg    <term>TransientShell</term>
379e7bcd65Smrg      <listitem>
389e7bcd65Smrg        <para>Used for shell windows that have the
399e7bcd65Smrg      <emphasis role='strong'>WM_TRANSIENT_FOR</emphasis>
409e7bcd65Smrg      property set. The effect of this property is dependent upon the
419e7bcd65Smrg      window manager being used.
429e7bcd65Smrg        </para>
439e7bcd65Smrg      </listitem>
449e7bcd65Smrg  </varlistentry>
459e7bcd65Smrg  <varlistentry>
469e7bcd65Smrg      <term>TopLevelShell</term>
479e7bcd65Smrg      <listitem>
489e7bcd65Smrg        <para>Used for normal top-level windows
499e7bcd65Smrg      (for example, any additional top-level widgets an application needs).
509e7bcd65Smrg        </para>
519e7bcd65Smrg      </listitem>
529e7bcd65Smrg  </varlistentry>
539e7bcd65Smrg  <varlistentry>
549e7bcd65Smrg      <term>ApplicationShell</term>
559e7bcd65Smrg      <listitem>
569e7bcd65Smrg        <para>Formerly used for the single main top-level window that
579e7bcd65Smrg      the window manager identifies as an application instance and
589e7bcd65Smrg      made obsolete by SessionShell.
599e7bcd65Smrg        </para>
609e7bcd65Smrg      </listitem>
619e7bcd65Smrg  </varlistentry>
629e7bcd65Smrg  <varlistentry>
639e7bcd65Smrg      <term>SessionShell</term>
649e7bcd65Smrg      <listitem>
659e7bcd65Smrg        <para>
669e7bcd65Smrg      Used for the single main top-level window that
679e7bcd65Smrg      the window manager identifies as an application instance and
689e7bcd65Smrg      that interacts with the session manager.
699e7bcd65Smrg        </para>
709e7bcd65Smrg      </listitem>
719e7bcd65Smrg  </varlistentry>
729e7bcd65Smrg</variablelist>
739e7bcd65Smrg
749e7bcd65Smrg<sect1 id="Shell_Widget_Definitions">
759e7bcd65Smrg<title>Shell Widget Definitions</title>
769e7bcd65Smrg<para>
779e7bcd65SmrgWidgets negotiate their size and position with their parent widget,
789e7bcd65Smrgthat is, the widget that directly contains them.
799e7bcd65SmrgWidgets at the top of the hierarchy do not have parent widgets.
809e7bcd65SmrgInstead, they must deal with the outside world.
819e7bcd65SmrgTo provide for this,
829e7bcd65Smrgeach top-level widget is encapsulated in a special widget, called a
839e7bcd65Smrgshell widget.
849e7bcd65Smrg</para>
859e7bcd65Smrg
869e7bcd65Smrg<para>
879e7bcd65SmrgShell
889e7bcd65Smrgwidgets, whose class is a subclass of the
899e7bcd65SmrgComposite class,
909e7bcd65Smrgencapsulate other widgets and can allow a widget to avoid the
919e7bcd65Smrggeometry clipping imposed by the parent-child window relationship.
929e7bcd65SmrgThey also can provide a layer of communication with the window manager.
939e7bcd65Smrg</para>
949e7bcd65Smrg
959e7bcd65Smrg<para>The eight different types of shells are:</para>
969e7bcd65Smrg<variablelist>
979e7bcd65Smrg  <varlistentry>
989e7bcd65Smrg    <term>Shell</term>
999e7bcd65Smrg    <listitem>
1009e7bcd65Smrg      <para>The base class for shell widgets; provides the
1019e7bcd65Smrg      fields needed for all types of shells.  Shell
1029e7bcd65Smrg      is a direct subclass of
1039e7bcd65Smrg      <emphasis role='strong'>compositeWidgetClass</emphasis>.
1049e7bcd65Smrg      </para>
1059e7bcd65Smrg    </listitem>
1069e7bcd65Smrg  </varlistentry>
1079e7bcd65Smrg  <varlistentry>
1089e7bcd65Smrg    <term>OverrideShell</term>
1099e7bcd65Smrg    <listitem>
1109e7bcd65Smrg      <para>A subclass of Shell; used for shell windows that completely
1119e7bcd65Smrg      bypass the window manager.</para>
1129e7bcd65Smrg    </listitem>
1139e7bcd65Smrg  </varlistentry>
1149e7bcd65Smrg  <varlistentry>
1159e7bcd65Smrg    <term>WMShell</term>
1169e7bcd65Smrg    <listitem>
1179e7bcd65Smrg      <para>A subclass of Shell; contains fields needed by the
1189e7bcd65Smrg      common window manager protocol.</para>
1199e7bcd65Smrg    </listitem>
1209e7bcd65Smrg  </varlistentry>
1219e7bcd65Smrg  <varlistentry>
1229e7bcd65Smrg    <term>VendorShell</term>
1239e7bcd65Smrg    <listitem>
1249e7bcd65Smrg      <para>A subclass of WMShell; contains fields used by
1259e7bcd65Smrg      vendor-specific window managers.
1269e7bcd65Smrg      </para>
1279e7bcd65Smrg    </listitem>
1289e7bcd65Smrg  </varlistentry>
1299e7bcd65Smrg  <varlistentry>
1309e7bcd65Smrg    <term>TransientShell</term>
1319e7bcd65Smrg    <listitem>
1329e7bcd65Smrg      <para>A subclass of VendorShell; used for shell windows that
1339e7bcd65Smrg      desire the <emphasis role='strong'>WM_TRANSIENT_FOR</emphasis>
1349e7bcd65Smrg      property.</para>
1359e7bcd65Smrg    </listitem>
1369e7bcd65Smrg  </varlistentry>
1379e7bcd65Smrg  <varlistentry>
1389e7bcd65Smrg    <term>TopLevelShell</term>
1399e7bcd65Smrg    <listitem>
1409e7bcd65Smrg      <para>A subclass of VendorShell; used for normal top-level windows.
1419e7bcd65Smrg      </para>
1429e7bcd65Smrg    </listitem>
1439e7bcd65Smrg  </varlistentry>
1449e7bcd65Smrg  <varlistentry>
1459e7bcd65Smrg    <term>ApplicationShell</term>
1469e7bcd65Smrg      <listitem>
1479e7bcd65Smrg      <para>A subclass of TopLevelShell; may be used for an application's additional
1489e7bcd65Smrg      root windows.</para>
1499e7bcd65Smrg    </listitem>
1509e7bcd65Smrg  </varlistentry>
1519e7bcd65Smrg  <varlistentry>
1529e7bcd65Smrg    <term>SessionShell</term>
1539e7bcd65Smrg    <listitem>
1549e7bcd65Smrg      <para>A subclass of ApplicationShell; used for an application's
1559e7bcd65Smrg      main root window.</para>
1569e7bcd65Smrg    </listitem>
1579e7bcd65Smrg  </varlistentry>
1589e7bcd65Smrg</variablelist>
1599e7bcd65Smrg
1609e7bcd65Smrg<para>
1619e7bcd65SmrgNote that the classes
1629e7bcd65SmrgShell,
1639e7bcd65SmrgWMShell,
1649e7bcd65Smrgand
1659e7bcd65SmrgVendorShell
1669e7bcd65Smrgare internal and should not be instantiated or subclassed.
1679e7bcd65SmrgOnly
1689e7bcd65SmrgOverrrideShell,
1699e7bcd65SmrgTransientShell,
1709e7bcd65SmrgTopLevelShell,
1719e7bcd65SmrgApplicationShell,
1729e7bcd65Smrgand
1739e7bcd65SmrgSessionShell
1749e7bcd65Smrgare intended for public use.
1759e7bcd65Smrg</para>
1769e7bcd65Smrg
1779e7bcd65Smrg<sect2 id="ShellClassPart_Definitions">
1789e7bcd65Smrg<title>ShellClassPart Definitions</title>
1799e7bcd65Smrg<para>
1809e7bcd65SmrgOnly the Shell
1819e7bcd65Smrgclass has additional class fields, which are all contained in the
1829e7bcd65Smrg<function>ShellClassExtensionRec</function>.
1839e7bcd65SmrgNone of the other Shell classes have any additional class fields:
1849e7bcd65Smrg</para>
1859e7bcd65Smrg
1860568f49bSmrg<programlisting>
1879e7bcd65Smrgtypedef struct {
1889e7bcd65Smrg        XtPointer extension;
1899e7bcd65Smrg} ShellClassPart, OverrideShellClassPart,
1909e7bcd65SmrgWMShellClassPart, VendorShellClassPart, TransientShellClassPart,
1919e7bcd65SmrgTopLevelShellClassPart, ApplicationShellClassPart, SessionShellClassPart;
1920568f49bSmrg</programlisting>
1939e7bcd65Smrg
1949e7bcd65Smrg<para>The full Shell class record definitions are:</para>
1959e7bcd65Smrg
1960568f49bSmrg<programlisting>
1979e7bcd65Smrgtypedef struct _ShellClassRec {
1980568f49bSmrg        CoreClassPart           core_class;
1990568f49bSmrg        CompositeClassPart      composite_class;
2000568f49bSmrg        ShellClassPart          shell_class;
2019e7bcd65Smrg} ShellClassRec;
2020568f49bSmrg</programlisting>
2030568f49bSmrg
2040568f49bSmrg<programlisting>
2050568f49bSmrgtypedef struct {    <lineannotation>See <xref linkend='Class_Extension_Records' /></lineannotation>
2060568f49bSmrg        XtPointer               next_extension;
2070568f49bSmrg        XrmQuark                record_type;
2080568f49bSmrg        long                    version;
2090568f49bSmrg        Cardinal                record_size;
2100568f49bSmrg        XtGeometryHandler root_geometry_manager; See below
2119e7bcd65Smrg} ShellClassExtensionRec, *ShellClassExtension;
2120568f49bSmrg</programlisting>
2139e7bcd65Smrg
2140568f49bSmrg<programlisting>
2159e7bcd65Smrgtypedef struct _OverrideShellClassRec {
2160568f49bSmrg        CoreClassPart           core_class;
2170568f49bSmrg        CompositeClassPart      composite_class;
2180568f49bSmrg        ShellClassPart          shell_class;
2190568f49bSmrg        OverrideShellClassPart  override_shell_class;
2209e7bcd65Smrg} OverrideShellClassRec;
2210568f49bSmrg</programlisting>
2229e7bcd65Smrg
2230568f49bSmrg<programlisting>
2249e7bcd65Smrgtypedef struct _WMShellClassRec {
2250568f49bSmrg        CoreClassPart           core_class;
2260568f49bSmrg        CompositeClassPart      composite_class;
2270568f49bSmrg        ShellClassPart          shell_class;
2280568f49bSmrg        WMShellClassPart        wm_shell_class;
2299e7bcd65Smrg} WMShellClassRec;
2300568f49bSmrg</programlisting>
2319e7bcd65Smrg
2320568f49bSmrg<programlisting>
2339e7bcd65Smrgtypedef struct _VendorShellClassRec {
2340568f49bSmrg        CoreClassPart           core_class;
2350568f49bSmrg        CompositeClassPart      composite_class;
2360568f49bSmrg        ShellClassPart          shell_class;
2370568f49bSmrg        WMShellClassPart        wm_shell_class;
2380568f49bSmrg        VendorShellClassPart    vendor_shell_class;
2399e7bcd65Smrg} VendorShellClassRec;
2400568f49bSmrg</programlisting>
2419e7bcd65Smrg
2420568f49bSmrg<programlisting>
2439e7bcd65Smrgtypedef struct _TransientShellClassRec {
2440568f49bSmrg        CoreClassPart           core_class;
2450568f49bSmrg        CompositeClassPart      composite_class;
2460568f49bSmrg        ShellClassPart          shell_class;
2470568f49bSmrg        WMShellClassPart        wm_shell_class;
2480568f49bSmrg        VendorShellClassPart    vendor_shell_class;
2490568f49bSmrg        TransientShellClassPart transient_shell_class;
2509e7bcd65Smrg} TransientShellClassRec;
2510568f49bSmrg</programlisting>
2529e7bcd65Smrg
2530568f49bSmrg<programlisting>
2549e7bcd65Smrgtypedef struct _TopLevelShellClassRec {
2550568f49bSmrg        CoreClassPart           core_class;
2560568f49bSmrg        CompositeClassPart      composite_class;
2570568f49bSmrg        ShellClassPart          shell_class;
2580568f49bSmrg        WMShellClassPart        wm_shell_class;
2590568f49bSmrg        VendorShellClassPart    vendor_shell_class;
2600568f49bSmrg        TopLevelShellClassPart  top_level_shell_class;
2619e7bcd65Smrg} TopLevelShellClassRec;
2620568f49bSmrg</programlisting>
2639e7bcd65Smrg
2640568f49bSmrg<programlisting>
2659e7bcd65Smrgtypedef struct _ApplicationShellClassRec {
2660568f49bSmrg        CoreClassPart           core_class;
2670568f49bSmrg        CompositeClassPart      composite_class;
2680568f49bSmrg        ShellClassPart          shell_class;
2690568f49bSmrg        WMShellClassPart        wm_shell_class;
2700568f49bSmrg        VendorShellClassPart    vendor_shell_class;
2710568f49bSmrg        TopLevelShellClassPart  top_level_shell_class;
2720568f49bSmrg        ApplicationShellClassPart application_shell_class;
2739e7bcd65Smrg} ApplicationShellClassRec;
2740568f49bSmrg</programlisting>
2759e7bcd65Smrg
2760568f49bSmrg<programlisting>
2779e7bcd65Smrgtypedef struct _SessionShellClassRec {
2780568f49bSmrg        CoreClassPart           core_class;
2790568f49bSmrg        CompositeClassPart      composite_class;
2800568f49bSmrg        ShellClassPart          shell_class;
2810568f49bSmrg        WMShellClassPart        wm_shell_class;
2820568f49bSmrg        VendorShellClassPart    vendor_shell_class;
2830568f49bSmrg        TopLevelShellClassPart  top_level_shell_class;
2840568f49bSmrg        ApplicationShellClassPart application_shell_class;
2850568f49bSmrg        SessionShellClassPart   session_shell_class;
2869e7bcd65Smrg} SessionShellClassRec;
2870568f49bSmrg</programlisting>
2889e7bcd65Smrg
2899e7bcd65Smrg<para>
2909e7bcd65SmrgThe single occurrences of the class records and pointers for creating
2919e7bcd65Smrginstances of shells are:
2929e7bcd65Smrg</para>
2939e7bcd65Smrg
2940568f49bSmrg<programlisting>
2950568f49bSmrgextern ShellClassRec            shellClassRec;
2960568f49bSmrgextern OverrideShellClassRec    overrideShellClassRec;
2970568f49bSmrgextern WMShellClassRec          wmShellClassRec;
2980568f49bSmrgextern VendorShellClassRec      vendorShellClassRec;
2990568f49bSmrgextern TransientShellClassRec   transientShellClassRec;
3000568f49bSmrgextern TopLevelShellClassRec    topLevelShellClassRec;
3019e7bcd65Smrgextern ApplicationShellClassRec applicationShellClassRec;
3020568f49bSmrgextern SessionShellClassRec     sessionShellClassRec;
3030568f49bSmrgextern WidgetClass              shellWidgetClass;
3040568f49bSmrgextern WidgetClass              overrideShellWidgetClass;
3050568f49bSmrgextern WidgetClass              wmShellWidgetClass;
3060568f49bSmrgextern WidgetClass              vendorShellWidgetClass;
3070568f49bSmrgextern WidgetClass              transientShellWidgetClass;
3080568f49bSmrgextern WidgetClass              topLevelShellWidgetClass;
3090568f49bSmrgextern WidgetClass              applicationShellWidgetClass;
3100568f49bSmrgextern WidgetClass              sessionShellWidgetClass;
3110568f49bSmrg</programlisting>
3129e7bcd65Smrg
3139e7bcd65Smrg<para>
3149e7bcd65SmrgThe following opaque types and opaque variables are defined
3159e7bcd65Smrgfor generic operations on widgets whose class is a subclass of
3169e7bcd65SmrgShell.
3179e7bcd65Smrg</para>
3189e7bcd65Smrg
3199e7bcd65Smrg<informaltable frame='topbot'>
3209e7bcd65Smrg  <?dbfo keep-together="auto" ?>
3219e7bcd65Smrg  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
3229e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
3239e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
3249e7bcd65Smrg  <thead>
3259e7bcd65Smrg    <row rowsep='1'>
3269e7bcd65Smrg      <entry>Types</entry>
3279e7bcd65Smrg      <entry>Variables</entry>
3289e7bcd65Smrg    </row>
3299e7bcd65Smrg  </thead>
3309e7bcd65Smrg  <tbody>
3319e7bcd65Smrg    <row>
3329e7bcd65Smrg      <entry><emphasis role='strong'>ShellWidget</emphasis></entry>
3339e7bcd65Smrg      <entry><emphasis role='strong'>shellWidgetClass</emphasis></entry>
3349e7bcd65Smrg    </row>
3359e7bcd65Smrg    <row>
3369e7bcd65Smrg      <entry><emphasis role='strong'>OverrideShellWidget</emphasis></entry>
3379e7bcd65Smrg      <entry><emphasis role='strong'>overrideShellWidgetClass</emphasis></entry>
3389e7bcd65Smrg    </row>
3399e7bcd65Smrg    <row>
3409e7bcd65Smrg      <entry><emphasis role='strong'>WMShellWidget</emphasis></entry>
3419e7bcd65Smrg      <entry><emphasis role='strong'>wmShellWidgetClass</emphasis></entry>
3429e7bcd65Smrg    </row>
3439e7bcd65Smrg    <row>
3449e7bcd65Smrg      <entry><emphasis role='strong'>VendorShellWidget</emphasis></entry>
3459e7bcd65Smrg      <entry><emphasis role='strong'>vendorShellWidgetClass</emphasis></entry>
3469e7bcd65Smrg    </row>
3479e7bcd65Smrg    <row>
3489e7bcd65Smrg      <entry><emphasis role='strong'>TransientShellWidget</emphasis></entry>
3499e7bcd65Smrg      <entry><emphasis role='strong'>transientShellWidgetClass</emphasis></entry>
3509e7bcd65Smrg    </row>
3519e7bcd65Smrg    <row>
3529e7bcd65Smrg      <entry><emphasis role='strong'>TopLevelShellWidget</emphasis></entry>
3539e7bcd65Smrg      <entry><emphasis role='strong'>topLevelShellWidgetClass</emphasis></entry>
3549e7bcd65Smrg    </row>
3559e7bcd65Smrg    <row>
3569e7bcd65Smrg      <entry><emphasis role='strong'>ApplicationShellWidget</emphasis></entry>
3579e7bcd65Smrg      <entry><emphasis role='strong'>applicationShellWidgetClass</emphasis></entry>
3589e7bcd65Smrg    </row>
3599e7bcd65Smrg    <row>
3609e7bcd65Smrg      <entry><emphasis role='strong'>SessionShellWidget</emphasis></entry>
3619e7bcd65Smrg      <entry><emphasis role='strong'>sessionShellWidgetClass</emphasis></entry>
3629e7bcd65Smrg    </row>
3639e7bcd65Smrg    <row>
3649e7bcd65Smrg      <entry><emphasis role='strong'>ShellWidgetClass</emphasis></entry>
3659e7bcd65Smrg      <entry></entry>
3669e7bcd65Smrg    </row>
3679e7bcd65Smrg    <row>
3689e7bcd65Smrg      <entry><emphasis role='strong'>OverrideShellWidgetClass</emphasis></entry>
3699e7bcd65Smrg      <entry></entry>
3709e7bcd65Smrg    </row>
3719e7bcd65Smrg    <row>
3729e7bcd65Smrg      <entry><emphasis role='strong'>WMShellWidgetClass</emphasis></entry>
3739e7bcd65Smrg      <entry></entry>
3749e7bcd65Smrg    </row>
3759e7bcd65Smrg    <row>
3769e7bcd65Smrg      <entry><emphasis role='strong'>VendorShellWidgetClass</emphasis></entry>
3779e7bcd65Smrg      <entry></entry>
3789e7bcd65Smrg    </row>
3799e7bcd65Smrg    <row>
3809e7bcd65Smrg      <entry><emphasis role='strong'>TransientShellWidgetClass</emphasis></entry>
3819e7bcd65Smrg      <entry></entry>
3829e7bcd65Smrg    </row>
3839e7bcd65Smrg    <row>
3849e7bcd65Smrg      <entry><emphasis role='strong'>TopLevelShellWidgetClass</emphasis></entry>
3859e7bcd65Smrg      <entry></entry>
3869e7bcd65Smrg    </row>
3879e7bcd65Smrg    <row>
3889e7bcd65Smrg      <entry><emphasis role='strong'>ApplicationShellWidgetClass</emphasis></entry>
3899e7bcd65Smrg      <entry></entry>
3909e7bcd65Smrg    </row>
3919e7bcd65Smrg    <row>
3929e7bcd65Smrg      <entry><emphasis role='strong'>SessionShellWidgetClass</emphasis></entry>
3939e7bcd65Smrg      <entry></entry>
3949e7bcd65Smrg    </row>
3959e7bcd65Smrg  </tbody>
3969e7bcd65Smrg  </tgroup>
3979e7bcd65Smrg</informaltable>
3989e7bcd65Smrg
3999e7bcd65Smrg<para>
4009e7bcd65SmrgThe declarations for all Intrinsics-defined shells except
4019e7bcd65SmrgVendorShell appear in
4020568f49bSmrg<filename class="headerfile">Shell.h</filename>
4039e7bcd65Smrgand
4040568f49bSmrg<filename class="headerfile">ShellP.h</filename>.
4059e7bcd65SmrgVendorShell has separate public and private .h files which are included by
4060568f49bSmrg<filename class="headerfile">Shell.h</filename>
4079e7bcd65Smrgand
4080568f49bSmrg<filename class="headerfile">ShellP.h</filename>.
4099e7bcd65Smrg</para>
4109e7bcd65Smrg
4119e7bcd65Smrg<para>
4120568f49bSmrg<filename class="headerfile">Shell.h</filename>
4139e7bcd65Smrguses incomplete structure definitions to ensure that the
4149e7bcd65Smrgcompiler catches attempts to access private data in any of the Shell
4159e7bcd65Smrginstance or class data structures.
4169e7bcd65Smrg</para>
4179e7bcd65Smrg
4189e7bcd65Smrg<para>
4199e7bcd65SmrgThe symbolic constant for the
4209e7bcd65Smrg<function>ShellClassExtension</function>
4219e7bcd65Smrgversion identifier is
4229e7bcd65Smrg<function>XtShellExtensionVersion</function>
4239e7bcd65Smrg(see <xref linkend='Class_Extension_Records' />).
4249e7bcd65Smrg</para>
4259e7bcd65Smrg
4269e7bcd65Smrg<para>
4279e7bcd65SmrgThe root_geometry_manager procedure acts as
4289e7bcd65Smrgthe parent geometry manager for geometry requests made by shell
4299e7bcd65Smrgwidgets.  When a shell widget calls either
4309e7bcd65Smrg<xref linkend='XtMakeGeometryRequest' xrefstyle='select: title'/>
4319e7bcd65Smrgor
4329e7bcd65Smrg<xref linkend='XtMakeResizeRequest' xrefstyle='select: title'/>,
4339e7bcd65Smrgthe root_geometry_manager procedure is invoked to
4349e7bcd65Smrgnegotiate the new geometry with the window manager.  If the window
4359e7bcd65Smrgmanager permits the new geometry, the root_geometry_manager
4369e7bcd65Smrgprocedure should
4379e7bcd65Smrgreturn
4389e7bcd65Smrg<function>XtGeometryYes</function>;
4399e7bcd65Smrgif the window manager denies the geometry
4409e7bcd65Smrgrequest or does not change the window geometry within some timeout
4419e7bcd65Smrginterval (equal to <emphasis remap='I'>wm_timeout</emphasis> in the case of WMShells), the
4429e7bcd65Smrgroot_geometry_manager procedure should return
4439e7bcd65Smrg<function>XtGeometryNo</function>.
4449e7bcd65SmrgIf the window manager makes some alternative geometry change, the
4459e7bcd65Smrgroot_geometry_manager procedure may return either
4469e7bcd65Smrg<function>XtGeometryNo</function>
4479e7bcd65Smrgand handle the new geometry as a resize or
4489e7bcd65Smrg<function>XtGeometryAlmost</function>
4499e7bcd65Smrgin anticipation that the shell will accept the compromise.  If the
4509e7bcd65Smrgcompromise is not accepted, the new size must then be handled as a
4519e7bcd65Smrgresize.  Subclasses of
4529e7bcd65SmrgShell
4539e7bcd65Smrgthat wish to provide their own
4549e7bcd65Smrgroot_geometry_manager procedures are strongly encouraged to use enveloping to
4559e7bcd65Smrginvoke their superclass's root_geometry_manager procedure under most
4569e7bcd65Smrgsituations, as the window manager interaction may be very complex.
4579e7bcd65Smrg</para>
4589e7bcd65Smrg
4599e7bcd65Smrg<para>
4609e7bcd65SmrgIf no
4619e7bcd65Smrg<function>ShellClassPart</function>
4629e7bcd65Smrgextension record is declared with <emphasis remap='I'>record_type</emphasis>
4639e7bcd65Smrgequal to
4649e7bcd65Smrg<emphasis role='strong'>NULLQUARK</emphasis>,
4659e7bcd65Smrgthen
4669e7bcd65Smrg<function>XtInheritRootGeometryManager</function>
4679e7bcd65Smrgis assumed.
4689e7bcd65Smrg</para>
4699e7bcd65Smrg</sect2>
4709e7bcd65Smrg
4719e7bcd65Smrg<sect2 id="ShellPart_Definition">
4729e7bcd65Smrg<title>ShellPart Definition</title>
4739e7bcd65Smrg<para>
4749e7bcd65SmrgThe various shell widgets have the following additional instance
4759e7bcd65Smrgfields defined in
4769e7bcd65Smrgtheir widget records:
4779e7bcd65Smrg</para>
4789e7bcd65Smrg
4790568f49bSmrg<programlisting>
4809e7bcd65Smrgtypedef struct {
4810568f49bSmrg        String                  geometry;
4820568f49bSmrg        XtCreatePopupChildProc  create_popup_child_proc;
4830568f49bSmrg        XtGrabKind              grab_kind;
4840568f49bSmrg        Boolean                 spring_loaded;
4850568f49bSmrg        Boolean                 popped_up;
4860568f49bSmrg        Boolean                 allow_shell_resize;
4870568f49bSmrg        Boolean                 client_specified;
4880568f49bSmrg        Boolean                 save_under;
4890568f49bSmrg        Boolean                 override_redirect;
4900568f49bSmrg        XtCallbackList          popup_callback;
4910568f49bSmrg        XtCallbackList          popdown_callback;
4920568f49bSmrg        Visual *                visual;
4939e7bcd65Smrg} ShellPart;
4940568f49bSmrg</programlisting>
4959e7bcd65Smrg
4960568f49bSmrg<programlisting>
4979e7bcd65Smrgtypedef struct {
4980568f49bSmrg        int     empty;
4999e7bcd65Smrg} OverrideShellPart;
5000568f49bSmrg</programlisting>
5019e7bcd65Smrg
5020568f49bSmrg<programlisting>
5039e7bcd65Smrgtypedef struct {
5040568f49bSmrg        String                  title;
5050568f49bSmrg        int                     wm_timeout;
5060568f49bSmrg        Boolean                 wait_for_wm;
5070568f49bSmrg        Boolean                 transient;
5080568f49bSmrg        Boolean                 urgency;
5090568f49bSmrg        Widget                  client_leader;
5100568f49bSmrg        String                  window_role;
5110568f49bSmrg        struct _OldXSizeHints {
5120568f49bSmrg                long            flags;
5130568f49bSmrg                int             x, y;
5140568f49bSmrg                int             width, height;
5150568f49bSmrg                int             min_width, min_height;
5160568f49bSmrg                int             max_width, max_height;
5170568f49bSmrg                int             width_inc, height_inc;
5180568f49bSmrg                struct {
5190568f49bSmrg                        int     x;
5200568f49bSmrg                        int     y;
5210568f49bSmrg                } min_aspect, max_aspect;
5220568f49bSmrg        } size_hints;
5230568f49bSmrg        XWMHints                wm_hints;
5240568f49bSmrg        int                     base_width, base_height, win_gravity;
5250568f49bSmrg        Atom                    title_encoding;
5269e7bcd65Smrg} WMShellPart;
5270568f49bSmrg</programlisting>
5289e7bcd65Smrg
5290568f49bSmrg<programlisting>
5309e7bcd65Smrgtypedef struct {
5310568f49bSmrg        int     vendor_specific;
5329e7bcd65Smrg} VendorShellPart;
5330568f49bSmrg</programlisting>
5349e7bcd65Smrg
5350568f49bSmrg<programlisting>
5369e7bcd65Smrgtypedef struct {
5370568f49bSmrg        Widget  transient_for;
5389e7bcd65Smrg} TransientShellPart;
5399e7bcd65Smrgtypedef struct {
5400568f49bSmrg        String  icon_name;
5410568f49bSmrg        Boolean iconic;
5420568f49bSmrg        Atom    icon_name_encoding;
5439e7bcd65Smrg} TopLevelShellPart;
5440568f49bSmrg</programlisting>
5459e7bcd65Smrg
5460568f49bSmrg<programlisting>
5479e7bcd65Smrgtypedef struct {
5480568f49bSmrg        char *  class;
5490568f49bSmrg        XrmClass        xrm_class;
5500568f49bSmrg        int     argc;
5510568f49bSmrg        char ** argv;
5529e7bcd65Smrg} ApplicationShellPart;
5530568f49bSmrg</programlisting>
5549e7bcd65Smrg
5550568f49bSmrg<programlisting>
5569e7bcd65Smrgtypedef struct {
5570568f49bSmrg        SmcConn         connection;
5580568f49bSmrg        String          session_id;
5590568f49bSmrg        String *        restart_command;
5600568f49bSmrg        String *        clone_command;
5610568f49bSmrg        String *        discard_command;
5620568f49bSmrg        String *        resign_command;
5630568f49bSmrg        String *        shutdown_command;
5640568f49bSmrg        String *        environment;
5650568f49bSmrg        String          current_dir;
5660568f49bSmrg        String          program_path;
5670568f49bSmrg        unsigned char   restart_style;
5680568f49bSmrg        Boolean         join_session;
5690568f49bSmrg        XtCallbackList  save_callbacks;
5700568f49bSmrg        XtCallbackList  interact_callbacks;
5710568f49bSmrg        XtCallbackList  cancel_callbacks;
5720568f49bSmrg        XtCallbackList  save_complete_callbacks;
5730568f49bSmrg        XtCallbackList  die_callbacks;
5740568f49bSmrg        XtCallbackList  error_callbacks;
5759e7bcd65Smrg} SessionShellPart;
5760568f49bSmrg</programlisting>
5779e7bcd65Smrg
5789e7bcd65Smrg<para>
5799e7bcd65SmrgThe full shell widget instance record definitions are:
5809e7bcd65Smrg</para>
5819e7bcd65Smrg
5820568f49bSmrg<programlisting>
5839e7bcd65Smrgtypedef struct {
5840568f49bSmrg        CorePart        core;
5850568f49bSmrg        CompositePart   composite;
5860568f49bSmrg        ShellPart       shell;
5879e7bcd65Smrg} ShellRec, *ShellWidget;
5880568f49bSmrg</programlisting>
5899e7bcd65Smrg
5900568f49bSmrg<programlisting>
5919e7bcd65Smrgtypedef struct {
5920568f49bSmrg        CorePart        core;
5930568f49bSmrg        CompositePart   composite;
5940568f49bSmrg        ShellPart       shell;
5950568f49bSmrg        OverrideShellPart override;
5969e7bcd65Smrg} OverrideShellRec, *OverrideShellWidget;
5970568f49bSmrg</programlisting>
5989e7bcd65Smrg
5990568f49bSmrg<programlisting>
6009e7bcd65Smrgtypedef struct {
6010568f49bSmrg        CorePart        core;
6020568f49bSmrg        CompositePart   composite;
6030568f49bSmrg        ShellPart       shell;
6040568f49bSmrg        WMShellPart     wm;
6059e7bcd65Smrg} WMShellRec, *WMShellWidget;
6060568f49bSmrg</programlisting>
6079e7bcd65Smrg
6080568f49bSmrg<programlisting>
6099e7bcd65Smrgtypedef struct {
6100568f49bSmrg        CorePart        core;
6110568f49bSmrg        CompositePart   composite;
6120568f49bSmrg        ShellPart       shell;
6130568f49bSmrg        WMShellPart     wm;
6140568f49bSmrg        VendorShellPart vendor;
6159e7bcd65Smrg} VendorShellRec, *VendorShellWidget;
6160568f49bSmrg</programlisting>
6179e7bcd65Smrg
6180568f49bSmrg<programlisting>
6199e7bcd65Smrgtypedef struct {
6200568f49bSmrg        CorePart        core;
6210568f49bSmrg        CompositePart   composite;
6220568f49bSmrg        ShellPart       shell;
6230568f49bSmrg        WMShellPart     wm;
6240568f49bSmrg        VendorShellPart vendor;
6250568f49bSmrg        TransientShellPart transient;
6269e7bcd65Smrg} TransientShellRec, *TransientShellWidget;
6270568f49bSmrg</programlisting>
6289e7bcd65Smrg
6290568f49bSmrg<programlisting>
6309e7bcd65Smrgtypedef struct {
6310568f49bSmrg        CorePart                core;
6320568f49bSmrg        CompositePart           composite;
6330568f49bSmrg        ShellPart               shell;
6340568f49bSmrg        WMShellPart             wm;
6350568f49bSmrg        VendorShellPart         vendor;
6360568f49bSmrg        TopLevelShellPart       topLevel;
6379e7bcd65Smrg} TopLevelShellRec, *TopLevelShellWidget;
6380568f49bSmrg</programlisting>
6399e7bcd65Smrg
6400568f49bSmrg<programlisting>
6419e7bcd65Smrgtypedef  struct {
6420568f49bSmrg        CorePart                core;
6430568f49bSmrg        CompositePart           composite;
6440568f49bSmrg        ShellPart               shell;
6450568f49bSmrg        WMShellPart             wm;
6460568f49bSmrg        VendorShellPart         vendor;
6470568f49bSmrg        TopLevelShellPart       topLevel;
6480568f49bSmrg        ApplicationShellPart    application;
6499e7bcd65Smrg} ApplicationShellRec, *ApplicationShellWidget;
6500568f49bSmrg</programlisting>
6519e7bcd65Smrg
6520568f49bSmrg<programlisting>
6539e7bcd65Smrgtypedef  struct {
6540568f49bSmrg        CorePart                core;
6550568f49bSmrg        CompositePart           composite;
6560568f49bSmrg        ShellPart               shell;
6570568f49bSmrg        WMShellPart             wm;
6580568f49bSmrg        VendorShellPart         vendor;
6590568f49bSmrg        TopLevelShellPart       topLevel;
6600568f49bSmrg        ApplicationShellPart    application;
6610568f49bSmrg        SessionShellPart        session;
6629e7bcd65Smrg} SessionShellRec, *SessionShellWidget;
6630568f49bSmrg</programlisting>
6649e7bcd65Smrg
6659e7bcd65Smrg</sect2>
6669e7bcd65Smrg
6679e7bcd65Smrg<sect2 id="Shell_Resources">
6689e7bcd65Smrg<title>Shell Resources</title>
6699e7bcd65Smrg<para>
6709e7bcd65SmrgThe resource names, classes, and representation types specified in
6719e7bcd65Smrgthe
6729e7bcd65Smrg<function>shellClassRec</function>
6739e7bcd65Smrgresource list are:
6749e7bcd65Smrg</para>
6759e7bcd65Smrg
6769e7bcd65Smrg<informaltable frame='topbot'>
6779e7bcd65Smrg  <?dbfo keep-together="always" ?>
6789e7bcd65Smrg  <tgroup cols='3' align='left' rowsep='0' colsep='0'>
6799e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
6809e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
6819e7bcd65Smrg  <colspec colwidth='1.0*' colname='c3'/>
6829e7bcd65Smrg  <thead>
6839e7bcd65Smrg    <row rowsep='1'>
6849e7bcd65Smrg      <entry>Name</entry>
6859e7bcd65Smrg      <entry>Class</entry>
6869e7bcd65Smrg      <entry>Representation</entry>
6879e7bcd65Smrg    </row>
6889e7bcd65Smrg  </thead>
6899e7bcd65Smrg  <tbody>
6909e7bcd65Smrg    <row>
6919e7bcd65Smrg      <entry>XtNallowShellResize</entry>
6929e7bcd65Smrg      <entry>XtCAllowShellResize</entry>
6939e7bcd65Smrg      <entry>XtRBoolean</entry>
6949e7bcd65Smrg    </row>
6959e7bcd65Smrg    <row>
6969e7bcd65Smrg      <entry>XtNcreatePopupChildProc</entry>
6979e7bcd65Smrg      <entry>XtCCreatePopupChildProc</entry>
6989e7bcd65Smrg      <entry>XtRFunction</entry>
6999e7bcd65Smrg    </row>
7009e7bcd65Smrg    <row>
7019e7bcd65Smrg      <entry>XtNgeometry</entry>
7029e7bcd65Smrg      <entry>XtCGeometry</entry>
7039e7bcd65Smrg      <entry>XtRString</entry>
7049e7bcd65Smrg    </row>
7059e7bcd65Smrg    <row>
7069e7bcd65Smrg      <entry>XtNoverrideRedirect</entry>
7079e7bcd65Smrg      <entry>XtCOverrideRedirect</entry>
7089e7bcd65Smrg      <entry>XtRBoolean</entry>
7099e7bcd65Smrg    </row>
7109e7bcd65Smrg    <row>
7119e7bcd65Smrg      <entry>XtNpopdownCallback</entry>
7129e7bcd65Smrg      <entry>XtCCallback</entry>
7139e7bcd65Smrg      <entry>XtRCallback</entry>
7149e7bcd65Smrg    </row>
7159e7bcd65Smrg    <row>
7169e7bcd65Smrg      <entry>XtNpopupCallback</entry>
7179e7bcd65Smrg      <entry>XtCCallback</entry>
7189e7bcd65Smrg      <entry>XtRCallback</entry>
7199e7bcd65Smrg    </row>
7209e7bcd65Smrg    <row>
7219e7bcd65Smrg      <entry>XtNsaveUnder</entry>
7229e7bcd65Smrg      <entry>XtCSaveUnder</entry>
7239e7bcd65Smrg      <entry>XtRBoolean</entry>
7249e7bcd65Smrg    </row>
7259e7bcd65Smrg    <row>
7269e7bcd65Smrg      <entry>XtNvisual</entry>
7279e7bcd65Smrg      <entry>XtCVisual</entry>
7289e7bcd65Smrg      <entry>XtRVisual</entry>
7299e7bcd65Smrg    </row>
7309e7bcd65Smrg  </tbody>
7319e7bcd65Smrg  </tgroup>
7329e7bcd65Smrg</informaltable>
7339e7bcd65Smrg
7349e7bcd65Smrg<para>
7359e7bcd65SmrgOverrideShell
7369e7bcd65Smrgdeclares no additional resources beyond those defined by
7379e7bcd65SmrgShell.
7389e7bcd65Smrg</para>
7399e7bcd65Smrg
7409e7bcd65Smrg<para>
7419e7bcd65SmrgThe resource names, classes, and representation types specified in
7429e7bcd65Smrgthe
7439e7bcd65Smrg<function>wmShellClassRec</function>
7449e7bcd65Smrgresource list are:
7459e7bcd65Smrg</para>
7469e7bcd65Smrg
7479e7bcd65Smrg<informaltable frame='topbot'>
7489e7bcd65Smrg  <?dbfo keep-together="always" ?>
7499e7bcd65Smrg  <tgroup cols='3' align='left' rowsep='0' colsep='0'>
7509e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
7519e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
7529e7bcd65Smrg  <colspec colwidth='1.0*' colname='c3'/>
7539e7bcd65Smrg  <thead>
7549e7bcd65Smrg    <row rowsep='1'>
7559e7bcd65Smrg      <entry>Name</entry>
7569e7bcd65Smrg      <entry>Class</entry>
7579e7bcd65Smrg      <entry>Representation</entry>
7589e7bcd65Smrg    </row>
7599e7bcd65Smrg  </thead>
7609e7bcd65Smrg  <tbody>
7619e7bcd65Smrg    <row>
7629e7bcd65Smrg      <entry>XtNbaseHeight</entry>
7639e7bcd65Smrg      <entry>XtCBaseHeight</entry>
7649e7bcd65Smrg      <entry>XtRInt</entry>
7659e7bcd65Smrg    </row>
7669e7bcd65Smrg    <row>
7679e7bcd65Smrg      <entry>XtNbaseWidth</entry>
7689e7bcd65Smrg      <entry>XtCBaseWidth</entry>
7699e7bcd65Smrg      <entry>XtRInt</entry>
7709e7bcd65Smrg    </row>
7719e7bcd65Smrg    <row>
7729e7bcd65Smrg      <entry>XtNclientLeader</entry>
7739e7bcd65Smrg      <entry>XtCClientLeader</entry>
7749e7bcd65Smrg      <entry>XtRWidget</entry>
7759e7bcd65Smrg    </row>
7769e7bcd65Smrg    <row>
7779e7bcd65Smrg      <entry>XtNheightInc</entry>
7789e7bcd65Smrg      <entry>XtCHeightInc</entry>
7799e7bcd65Smrg      <entry>XtRInt</entry>
7809e7bcd65Smrg    </row>
7819e7bcd65Smrg    <row>
7829e7bcd65Smrg      <entry>XtNiconMask</entry>
7839e7bcd65Smrg      <entry>XtCIconMask</entry>
7849e7bcd65Smrg      <entry>XtRBitmap</entry>
7859e7bcd65Smrg    </row>
7869e7bcd65Smrg    <row>
7879e7bcd65Smrg      <entry>XtNiconPixmap</entry>
7889e7bcd65Smrg      <entry>XtCIconPixmap</entry>
7899e7bcd65Smrg      <entry>XtRBitmap</entry>
7909e7bcd65Smrg    </row>
7919e7bcd65Smrg    <row>
7929e7bcd65Smrg      <entry>XtNiconWindow</entry>
7939e7bcd65Smrg      <entry>XtCIconWindow</entry>
7949e7bcd65Smrg      <entry>XtRWindow</entry>
7959e7bcd65Smrg    </row>
7969e7bcd65Smrg    <row>
7979e7bcd65Smrg      <entry>XtNiconX</entry>
7989e7bcd65Smrg      <entry>XtCIconX</entry>
7999e7bcd65Smrg      <entry>XtRInt</entry>
8009e7bcd65Smrg    </row>
8019e7bcd65Smrg    <row>
8029e7bcd65Smrg      <entry>XtNiconY</entry>
8039e7bcd65Smrg      <entry>XtCIconY</entry>
8049e7bcd65Smrg      <entry>XtRInt</entry>
8059e7bcd65Smrg    </row>
8069e7bcd65Smrg    <row>
8079e7bcd65Smrg      <entry>XtNinitialState</entry>
8089e7bcd65Smrg      <entry>XtCInitialState</entry>
8099e7bcd65Smrg      <entry>XtRInitialState</entry>
8109e7bcd65Smrg    </row>
8119e7bcd65Smrg    <row>
8129e7bcd65Smrg      <entry>XtNinput</entry>
8139e7bcd65Smrg      <entry>XtCInput</entry>
8149e7bcd65Smrg      <entry>XtRBool</entry>
8159e7bcd65Smrg    </row>
8169e7bcd65Smrg    <row>
8179e7bcd65Smrg      <entry>XtNmaxAspectX</entry>
8189e7bcd65Smrg      <entry>XtCMaxAspectX</entry>
8199e7bcd65Smrg      <entry>XtRInt</entry>
8209e7bcd65Smrg    </row>
8219e7bcd65Smrg    <row>
8229e7bcd65Smrg      <entry>XtNmaxAspectY</entry>
8239e7bcd65Smrg      <entry>XtCMaxAspectY</entry>
8249e7bcd65Smrg      <entry>XtRInt</entry>
8259e7bcd65Smrg    </row>
8269e7bcd65Smrg    <row>
8279e7bcd65Smrg      <entry>XtNmaxHeight</entry>
8289e7bcd65Smrg      <entry>XtCMaxHeight</entry>
8299e7bcd65Smrg      <entry>XtRInt</entry>
8309e7bcd65Smrg    </row>
8319e7bcd65Smrg    <row>
8329e7bcd65Smrg      <entry>XtNmaxWidth</entry>
8339e7bcd65Smrg      <entry>XtCMaxWidth</entry>
8349e7bcd65Smrg      <entry>XtRInt</entry>
8359e7bcd65Smrg    </row>
8369e7bcd65Smrg    <row>
8379e7bcd65Smrg      <entry>XtNminAspectX</entry>
8389e7bcd65Smrg      <entry>XtCMinAspectX</entry>
8399e7bcd65Smrg      <entry>XtRInt</entry>
8409e7bcd65Smrg    </row>
8419e7bcd65Smrg    <row>
8429e7bcd65Smrg      <entry>XtNminAspectY</entry>
8439e7bcd65Smrg      <entry>XtCMinAspectY</entry>
8449e7bcd65Smrg      <entry>XtRInt</entry>
8459e7bcd65Smrg    </row>
8469e7bcd65Smrg    <row>
8479e7bcd65Smrg      <entry>XtNminHeight</entry>
8489e7bcd65Smrg      <entry>XtCMinHeight</entry>
8499e7bcd65Smrg      <entry>XtRInt</entry>
8509e7bcd65Smrg    </row>
8519e7bcd65Smrg    <row>
8529e7bcd65Smrg      <entry>XtNminWidth</entry>
8539e7bcd65Smrg      <entry>XtCMinWidth</entry>
8549e7bcd65Smrg      <entry>XtRInt</entry>
8559e7bcd65Smrg    </row>
8569e7bcd65Smrg    <row>
8579e7bcd65Smrg      <entry>XtNtitle</entry>
8589e7bcd65Smrg      <entry>XtCTitle</entry>
8599e7bcd65Smrg      <entry>XtRString</entry>
8609e7bcd65Smrg    </row>
8619e7bcd65Smrg    <row>
8629e7bcd65Smrg      <entry>XtNtitleEncoding</entry>
8639e7bcd65Smrg      <entry>XtCTitleEncoding</entry>
8649e7bcd65Smrg      <entry>XtRAtom</entry>
8659e7bcd65Smrg    </row>
8669e7bcd65Smrg    <row>
8679e7bcd65Smrg      <entry>XtNtransient</entry>
8689e7bcd65Smrg      <entry>XtCTransient</entry>
8699e7bcd65Smrg      <entry>XtRBoolean</entry>
8709e7bcd65Smrg    </row>
8719e7bcd65Smrg    <row>
8729e7bcd65Smrg      <entry>XtNwaitforwm, XtNwaitForWm</entry>
8739e7bcd65Smrg      <entry>XtCWaitforwm, XtCWaitForWm</entry>
8749e7bcd65Smrg      <entry>XtRBoolean</entry>
8759e7bcd65Smrg    </row>
8769e7bcd65Smrg    <row>
8779e7bcd65Smrg      <entry>XtNwidthInc</entry>
8789e7bcd65Smrg      <entry>XtCWidthInc</entry>
8799e7bcd65Smrg      <entry>XtRInt</entry>
8809e7bcd65Smrg    </row>
8819e7bcd65Smrg    <row>
8829e7bcd65Smrg      <entry>XtNwindowRole</entry>
8839e7bcd65Smrg      <entry>XtCWindowRole</entry>
8849e7bcd65Smrg      <entry>XtRString</entry>
8859e7bcd65Smrg    </row>
8869e7bcd65Smrg    <row>
8879e7bcd65Smrg      <entry>XtNwinGravity</entry>
8889e7bcd65Smrg      <entry>XtCWinGravity</entry>
8899e7bcd65Smrg      <entry>XtRGravity</entry>
8909e7bcd65Smrg    </row>
8919e7bcd65Smrg    <row>
8929e7bcd65Smrg      <entry>XtNwindowGroup</entry>
8939e7bcd65Smrg      <entry>XtCWindowGroup</entry>
8949e7bcd65Smrg      <entry>XtRWindow</entry>
8959e7bcd65Smrg    </row>
8969e7bcd65Smrg    <row>
8979e7bcd65Smrg      <entry>XtNwmTimeout</entry>
8989e7bcd65Smrg      <entry>XtCWmTimeout</entry>
8999e7bcd65Smrg      <entry>XtRInt</entry>
9009e7bcd65Smrg    </row>
9019e7bcd65Smrg    <row>
9029e7bcd65Smrg      <entry>XtNurgency</entry>
9039e7bcd65Smrg      <entry>XtCUrgency</entry>
9049e7bcd65Smrg      <entry>XtRBoolean</entry>
9059e7bcd65Smrg    </row>
9069e7bcd65Smrg  </tbody>
9079e7bcd65Smrg  </tgroup>
9089e7bcd65Smrg</informaltable>
9099e7bcd65Smrg
9109e7bcd65Smrg<para>
9119e7bcd65SmrgThe class resource list for
9129e7bcd65SmrgVendorShell
9139e7bcd65Smrgis implementation-defined.
9149e7bcd65Smrg</para>
9159e7bcd65Smrg
9169e7bcd65Smrg<para>
9179e7bcd65SmrgThe resource names, classes, and representation types that are specified in the
9180568f49bSmrg<function>transientShellClassRec</function>
9199e7bcd65Smrgresource list are:
9209e7bcd65Smrg</para>
9219e7bcd65Smrg
9229e7bcd65Smrg<informaltable frame='topbot'>
9239e7bcd65Smrg  <?dbfo keep-together="always" ?>
9249e7bcd65Smrg  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
9259e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
9269e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
9279e7bcd65Smrg  <colspec colwidth='1.0*' colname='c3'/>
9289e7bcd65Smrg  <thead>
9299e7bcd65Smrg    <row rowsep='1'>
9309e7bcd65Smrg      <entry>Name</entry>
9319e7bcd65Smrg      <entry>Class</entry>
9329e7bcd65Smrg      <entry>Representation</entry>
9339e7bcd65Smrg    </row>
9349e7bcd65Smrg  </thead>
9359e7bcd65Smrg  <tbody>
9369e7bcd65Smrg    <row>
9379e7bcd65Smrg      <entry>XtNtransientFor</entry>
9389e7bcd65Smrg      <entry>XtCTransientFor</entry>
9399e7bcd65Smrg      <entry>XtRWidget</entry>
9409e7bcd65Smrg    </row>
9419e7bcd65Smrg  </tbody>
9429e7bcd65Smrg  </tgroup>
9439e7bcd65Smrg</informaltable>
9449e7bcd65Smrg
9459e7bcd65Smrg<para>
9469e7bcd65SmrgThe resource names, classes, and representation types that are specified in the
9479e7bcd65Smrg<function>topLevelShellClassRec</function>
9489e7bcd65Smrgresource list are:
9499e7bcd65Smrg</para>
9509e7bcd65Smrg
9519e7bcd65Smrg<informaltable frame='topbot'>
9529e7bcd65Smrg  <?dbfo keep-together="always" ?>
9539e7bcd65Smrg  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
9549e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
9559e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
9569e7bcd65Smrg  <colspec colwidth='1.0*' colname='c3'/>
9579e7bcd65Smrg  <thead>
9589e7bcd65Smrg    <row rowsep='1'>
9599e7bcd65Smrg      <entry>Name</entry>
9609e7bcd65Smrg      <entry>Class</entry>
9619e7bcd65Smrg      <entry>Representation</entry>
9629e7bcd65Smrg    </row>
9639e7bcd65Smrg  </thead>
9649e7bcd65Smrg  <tbody>
9659e7bcd65Smrg    <row>
9669e7bcd65Smrg      <entry>XtNiconName</entry>
9679e7bcd65Smrg      <entry>XtCIconName</entry>
9689e7bcd65Smrg      <entry>XtRString</entry>
9699e7bcd65Smrg    </row>
9709e7bcd65Smrg    <row>
9719e7bcd65Smrg      <entry>XtNiconNameEncoding</entry>
9729e7bcd65Smrg      <entry>XtCIconNameEncoding</entry>
9739e7bcd65Smrg      <entry>XtRAtom</entry>
9749e7bcd65Smrg    </row>
9759e7bcd65Smrg    <row>
9769e7bcd65Smrg      <entry>XtNiconic</entry>
9779e7bcd65Smrg      <entry>XtCIconic</entry>
9789e7bcd65Smrg      <entry>XtRBoolean</entry>
9799e7bcd65Smrg    </row>
9809e7bcd65Smrg  </tbody>
9819e7bcd65Smrg  </tgroup>
9829e7bcd65Smrg</informaltable>
9839e7bcd65Smrg
9849e7bcd65Smrg<para>
9859e7bcd65SmrgThe resource names, classes, and representation types that are specified in the
9860568f49bSmrg<function>applicationShellClassRec</function>
9879e7bcd65Smrgresource list are:
9889e7bcd65Smrg</para>
9899e7bcd65Smrg
9909e7bcd65Smrg<informaltable frame='topbot'>
9919e7bcd65Smrg  <?dbfo keep-together="always" ?>
9929e7bcd65Smrg  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
9939e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
9949e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
9959e7bcd65Smrg  <colspec colwidth='1.0*' colname='c3'/>
9969e7bcd65Smrg  <thead>
9979e7bcd65Smrg    <row rowsep='1'>
9989e7bcd65Smrg      <entry>Name</entry>
9999e7bcd65Smrg      <entry>Class</entry>
10009e7bcd65Smrg      <entry>Representation</entry>
10019e7bcd65Smrg    </row>
10029e7bcd65Smrg  </thead>
10039e7bcd65Smrg  <tbody>
10049e7bcd65Smrg    <row>
10059e7bcd65Smrg      <entry>XtNargc</entry>
10069e7bcd65Smrg      <entry>XtCArgc</entry>
10079e7bcd65Smrg      <entry>XtRInt</entry>
10089e7bcd65Smrg    </row>
10099e7bcd65Smrg    <row>
10109e7bcd65Smrg      <entry>XtNargv</entry>
10119e7bcd65Smrg      <entry>XtCArgv</entry>
10129e7bcd65Smrg      <entry>XtRStringArray</entry>
10139e7bcd65Smrg    </row>
10149e7bcd65Smrg  </tbody>
10159e7bcd65Smrg  </tgroup>
10169e7bcd65Smrg</informaltable>
10179e7bcd65Smrg
10189e7bcd65Smrg<para>
10199e7bcd65SmrgThe resource names, classes, and representation types that are specified
10209e7bcd65Smrgin the
10219e7bcd65Smrg<function>sessionShellClassRec</function>
10229e7bcd65Smrgresource list are:
10239e7bcd65Smrg</para>
10249e7bcd65Smrg
10259e7bcd65Smrg<informaltable frame='topbot'>
10269e7bcd65Smrg  <?dbfo keep-together="always" ?>
10279e7bcd65Smrg  <tgroup cols='3' align='left' colsep='0' rowsep='0'>
10289e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
10299e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
10309e7bcd65Smrg  <colspec colwidth='1.0*' colname='c3'/>
10319e7bcd65Smrg  <thead>
10329e7bcd65Smrg    <row rowsep='1'>
10339e7bcd65Smrg      <entry>Name</entry>
10349e7bcd65Smrg      <entry>Class</entry>
10359e7bcd65Smrg      <entry>Representation</entry>
10369e7bcd65Smrg    </row>
10379e7bcd65Smrg  </thead>
10389e7bcd65Smrg  <tbody>
10399e7bcd65Smrg    <row>
10409e7bcd65Smrg      <entry>XtNcancelCallback</entry>
10419e7bcd65Smrg      <entry>XtCCallback</entry>
10429e7bcd65Smrg      <entry>XtRCallback</entry>
10439e7bcd65Smrg    </row>
10449e7bcd65Smrg    <row>
10459e7bcd65Smrg      <entry>XtNcloneCommand</entry>
10469e7bcd65Smrg      <entry>XtCCloneCommand</entry>
10479e7bcd65Smrg      <entry>XtRCommandArgArray</entry>
10489e7bcd65Smrg    </row>
10499e7bcd65Smrg    <row>
10509e7bcd65Smrg      <entry>XtNconnection</entry>
10519e7bcd65Smrg      <entry>XtCConnection</entry>
10529e7bcd65Smrg      <entry>XtRSmcConn</entry>
10539e7bcd65Smrg    </row>
10549e7bcd65Smrg    <row>
10559e7bcd65Smrg      <entry>XtNcurrentDirectory</entry>
10569e7bcd65Smrg      <entry>XtCCurrentDirectory</entry>
10579e7bcd65Smrg      <entry>XtRDirectoryString</entry>
10589e7bcd65Smrg    </row>
10599e7bcd65Smrg    <row>
10609e7bcd65Smrg      <entry>XtNdieCallback</entry>
10619e7bcd65Smrg      <entry>XtCCallback</entry>
10629e7bcd65Smrg      <entry>XtRCallback</entry>
10639e7bcd65Smrg    </row>
10649e7bcd65Smrg    <row>
10659e7bcd65Smrg      <entry>XtNdiscardCommand</entry>
10669e7bcd65Smrg      <entry>XtCDiscardCommand</entry>
10679e7bcd65Smrg      <entry>XtRCommandArgArray</entry>
10689e7bcd65Smrg    </row>
10699e7bcd65Smrg    <row>
10709e7bcd65Smrg      <entry>XtNenvironment</entry>
10719e7bcd65Smrg      <entry>XtCEnvironment</entry>
10729e7bcd65Smrg      <entry>XtREnvironmentArray</entry>
10739e7bcd65Smrg    </row>
10749e7bcd65Smrg    <row>
10759e7bcd65Smrg      <entry>XtNerrorCallback</entry>
10769e7bcd65Smrg      <entry>XtCCallback</entry>
10779e7bcd65Smrg      <entry>XtRCallback</entry>
10789e7bcd65Smrg    </row>
10799e7bcd65Smrg    <row>
10809e7bcd65Smrg      <entry>XtNinteractCallback</entry>
10819e7bcd65Smrg      <entry>XtCCallback</entry>
10829e7bcd65Smrg      <entry>XtRCallback</entry>
10839e7bcd65Smrg    </row>
10849e7bcd65Smrg    <row>
10859e7bcd65Smrg      <entry>XtNjoinSession</entry>
10869e7bcd65Smrg      <entry>XtCJoinSession</entry>
10879e7bcd65Smrg      <entry>XtRBoolean</entry>
10889e7bcd65Smrg    </row>
10899e7bcd65Smrg    <row>
10909e7bcd65Smrg      <entry>XtNprogramPath</entry>
10919e7bcd65Smrg      <entry>XtCProgramPath</entry>
10929e7bcd65Smrg      <entry>XtRString</entry>
10939e7bcd65Smrg    </row>
10949e7bcd65Smrg    <row>
10959e7bcd65Smrg      <entry>XtNresignCommand</entry>
10969e7bcd65Smrg      <entry>XtCResignCommand</entry>
10979e7bcd65Smrg      <entry>XtRCommandArgArray</entry>
10989e7bcd65Smrg    </row>
10999e7bcd65Smrg    <row>
11009e7bcd65Smrg      <entry>XtNrestartCommand</entry>
11019e7bcd65Smrg      <entry>XtCRestartCommand</entry>
11029e7bcd65Smrg      <entry>XtRCommandArgArray</entry>
11039e7bcd65Smrg    </row>
11049e7bcd65Smrg    <row>
11059e7bcd65Smrg      <entry>XtNrestartStyle</entry>
11069e7bcd65Smrg      <entry>XtCRestartStyle</entry>
11079e7bcd65Smrg      <entry>XtRRestartStyle</entry>
11089e7bcd65Smrg    </row>
11099e7bcd65Smrg    <row>
11109e7bcd65Smrg      <entry>XtNsaveCallback</entry>
11119e7bcd65Smrg      <entry>XtCCallback</entry>
11129e7bcd65Smrg      <entry>XtRCallback</entry>
11139e7bcd65Smrg    </row>
11149e7bcd65Smrg    <row>
11159e7bcd65Smrg      <entry>XtNsaveCompleteCallback</entry>
11169e7bcd65Smrg      <entry>XtCCallback</entry>
11179e7bcd65Smrg      <entry>XtRCallback</entry>
11189e7bcd65Smrg    </row>
11199e7bcd65Smrg    <row>
11209e7bcd65Smrg      <entry>XtNsessionID</entry>
11219e7bcd65Smrg      <entry>XtCSessionID</entry>
11229e7bcd65Smrg      <entry>XtRString</entry>
11239e7bcd65Smrg    </row>
11249e7bcd65Smrg    <row>
11259e7bcd65Smrg      <entry>XtNshutdownCommand</entry>
11269e7bcd65Smrg      <entry>XtCShutdownCommand</entry>
11279e7bcd65Smrg      <entry>XtRCommandArgArray</entry>
11289e7bcd65Smrg    </row>
11299e7bcd65Smrg  </tbody>
11309e7bcd65Smrg  </tgroup>
11319e7bcd65Smrg</informaltable>
11329e7bcd65Smrg
11339e7bcd65Smrg</sect2>
11349e7bcd65Smrg
11359e7bcd65Smrg<sect2 id="ShellPart_Default_Values">
11369e7bcd65Smrg<title>ShellPart Default Values</title>
11379e7bcd65Smrg<para>
11389e7bcd65SmrgThe default values for fields common to all classes of public shells
11399e7bcd65Smrg(filled in by the
11409e7bcd65SmrgShell
11419e7bcd65Smrgresource lists and the
11429e7bcd65SmrgShell
11439e7bcd65Smrginitialize procedures) are:
11449e7bcd65Smrg</para>
11459e7bcd65Smrg
11469e7bcd65Smrg<informaltable frame='topbot'>
11479e7bcd65Smrg  <?dbfo keep-together="always" ?>
11489e7bcd65Smrg  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
11499e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
11509e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
11519e7bcd65Smrg  <thead>
11529e7bcd65Smrg    <row rowsep='1'>
11539e7bcd65Smrg      <entry>Field</entry>
11549e7bcd65Smrg      <entry>Default Value</entry>
11559e7bcd65Smrg    </row>
11569e7bcd65Smrg  </thead>
11579e7bcd65Smrg  <tbody>
11589e7bcd65Smrg    <row>
11599e7bcd65Smrg      <entry>geometry</entry>
11609e7bcd65Smrg      <entry>NULL</entry>
11619e7bcd65Smrg    </row>
11629e7bcd65Smrg    <row>
11639e7bcd65Smrg      <entry>create_popup_child_proc</entry>
11649e7bcd65Smrg      <entry>NULL</entry>
11659e7bcd65Smrg    </row>
11669e7bcd65Smrg    <row>
11679e7bcd65Smrg      <entry>grab_kind</entry>
11689e7bcd65Smrg      <entry>(none)</entry>
11699e7bcd65Smrg    </row>
11709e7bcd65Smrg    <row>
11719e7bcd65Smrg      <entry>spring_loaded</entry>
11729e7bcd65Smrg      <entry>(none)</entry>
11739e7bcd65Smrg    </row>
11749e7bcd65Smrg    <row>
11759e7bcd65Smrg      <entry>popped_up</entry>
11769e7bcd65Smrg      <entry><function>False</function></entry>
11779e7bcd65Smrg    </row>
11789e7bcd65Smrg    <row>
11799e7bcd65Smrg      <entry>allow_shell_resize</entry>
11809e7bcd65Smrg      <entry><function>False</function></entry>
11819e7bcd65Smrg    </row>
11829e7bcd65Smrg    <row>
11839e7bcd65Smrg      <entry>client_specified</entry>
11849e7bcd65Smrg      <entry>(internal)</entry>
11859e7bcd65Smrg    </row>
11869e7bcd65Smrg    <row>
11879e7bcd65Smrg      <entry>save_under</entry>
11889e7bcd65Smrg      <entry><function>True</function>
11899e7bcd65Smrg      for OverrideShell and TransientShell,
11909e7bcd65Smrg      <emphasis role='strong'>False</emphasis>
11919e7bcd65Smrg      otherwise</entry>
11929e7bcd65Smrg    </row>
11939e7bcd65Smrg    <row>
11949e7bcd65Smrg      <entry>override_redirect</entry>
11959e7bcd65Smrg      <entry><function>True</function>
11969e7bcd65Smrg      for OverrideShell,
11979e7bcd65Smrg      <function>False</function>
11989e7bcd65Smrg      otherwise</entry>
11999e7bcd65Smrg    </row>
12009e7bcd65Smrg    <row>
12019e7bcd65Smrg      <entry>popup_callback</entry>
12029e7bcd65Smrg      <entry>NULL</entry>
12039e7bcd65Smrg    </row>
12049e7bcd65Smrg    <row>
12059e7bcd65Smrg      <entry>popdown_callback</entry>
12069e7bcd65Smrg      <entry>NULL</entry>
12079e7bcd65Smrg    </row>
12089e7bcd65Smrg    <row>
12099e7bcd65Smrg      <entry>visual</entry>
12109e7bcd65Smrg      <entry><function>CopyFromParent</function></entry>
12119e7bcd65Smrg    </row>
12129e7bcd65Smrg  </tbody>
12139e7bcd65Smrg  </tgroup>
12149e7bcd65Smrg</informaltable>
12159e7bcd65Smrg
12169e7bcd65Smrg<para>
12179e7bcd65SmrgThe <emphasis remap='I'>geometry</emphasis> field specifies the size and position
12189e7bcd65Smrgand is usually given only on a command line or in a defaults file.
12199e7bcd65SmrgIf the <emphasis remap='I'>geometry</emphasis> field is non-NULL when
12209e7bcd65Smrga widget of class WMShell
12219e7bcd65Smrgis realized, the geometry specification is parsed using
12229e7bcd65Smrg<function>XWMGeometry</function>
12239e7bcd65Smrgwith a default geometry
12249e7bcd65Smrgstring constructed from the values of <emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>, <emphasis remap='I'>width</emphasis>,
12259e7bcd65Smrg<emphasis remap='I'>height</emphasis>, <emphasis remap='I'>width_inc</emphasis>,
12269e7bcd65Smrgand <emphasis remap='I'>height_inc</emphasis> and the size and position flags in the window manager
12279e7bcd65Smrgsize hints are set.  If the geometry specifies an x or y position,
12289e7bcd65Smrgthen
12299e7bcd65Smrg<function>USPosition</function>
12309e7bcd65Smrgis set.  If the geometry specifies a width or height, then
12319e7bcd65Smrg<function>USSize</function>
12329e7bcd65Smrgis set.  Any fields in the geometry specification
12339e7bcd65Smrgoverride the corresponding values in the
12349e7bcd65SmrgCore <emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>, <emphasis remap='I'>width</emphasis>, and <emphasis remap='I'>height</emphasis> fields.
12359e7bcd65SmrgIf <emphasis remap='I'>geometry</emphasis> is NULL or contains only a partial specification, then the
12369e7bcd65SmrgCore <emphasis remap='I'>x</emphasis>, <emphasis remap='I'>y</emphasis>, <emphasis remap='I'>width</emphasis>, and <emphasis remap='I'>height</emphasis> fields are used and
12379e7bcd65Smrg<function>PPosition</function>
12389e7bcd65Smrgand
12399e7bcd65Smrg<function>PSize</function>
12409e7bcd65Smrgare set as appropriate.
12419e7bcd65SmrgThe geometry string is not copied by any of the Intrinsics
12429e7bcd65SmrgShell classes; a client specifying the string in an arglist
12439e7bcd65Smrgor varargs list must ensure
12449e7bcd65Smrgthat the value remains valid until the shell widget is realized.
12459e7bcd65SmrgFor further information on the geometry string, see
12460568f49bSmrg<olink targetdoc='libX11' targetptr='Parsing_the_Window_Geometry' >Parsing the Window Geometry</olink>
12470568f49bSmrgin <olink targetdoc='libX11' targetptr='libX11'>Xlib &mdash; C Language X Interface</olink>.
12489e7bcd65Smrg</para>
12499e7bcd65Smrg
12509e7bcd65Smrg<para>
12519e7bcd65SmrgThe <emphasis remap='I'>create_popup_child_proc</emphasis> procedure is called by the
12529e7bcd65Smrg<xref linkend='XtPopup' xrefstyle='select: title'/>
12539e7bcd65Smrgprocedure and may remain NULL.
12549e7bcd65SmrgThe <emphasis remap='I'>grab_kind</emphasis>, <emphasis remap='I'>spring_loaded</emphasis>,
12559e7bcd65Smrgand <emphasis remap='I'>popped_up</emphasis> fields maintain widget
12569e7bcd65Smrgstate information as described under
12579e7bcd65Smrg<xref linkend='XtPopup' xrefstyle='select: title'/>,
12589e7bcd65Smrg<xref linkend='XtMenuPopup' xrefstyle='select: title'/>,
12599e7bcd65Smrg<xref linkend='XtPopdown' xrefstyle='select: title'/>,
12609e7bcd65Smrgand
12619e7bcd65Smrg<xref linkend='XtMenuPopdown' xrefstyle='select: title'/>.
12629e7bcd65SmrgThe <emphasis remap='I'>allow_shell_resize</emphasis> field controls whether the widget contained
12639e7bcd65Smrgby the shell is allowed to try to resize itself.
12649e7bcd65SmrgIf allow_shell_resize is
12659e7bcd65Smrg<function>False</function>,
12669e7bcd65Smrgany geometry requests made by the child will always return
12679e7bcd65Smrg<function>XtGeometryNo</function>
12689e7bcd65Smrgwithout interacting with the window manager.
12699e7bcd65SmrgSetting <emphasis remap='I'>save_under</emphasis>
12709e7bcd65Smrg<function>True</function>
12719e7bcd65Smrginstructs the server to attempt
12729e7bcd65Smrgto save the contents of windows obscured by the shell when it is mapped
12739e7bcd65Smrgand to restore those contents automatically when the shell is unmapped.
12749e7bcd65SmrgIt is useful for pop-up menus.
12759e7bcd65SmrgSetting <emphasis remap='I'>override_redirect</emphasis>
12769e7bcd65Smrg<function>True</function>
12779e7bcd65Smrgdetermines
12789e7bcd65Smrgwhether the window manager can intercede when the shell window
12799e7bcd65Smrgis mapped.
12809e7bcd65SmrgFor further information on override_redirect,
12810568f49bSmrgsee <olink targetdoc='libX11' targetptr='Window_Attributes' >Window Attributes</olink> in
12820568f49bSmrg<olink targetdoc='libX11' targetptr='libX11'>Xlib &mdash; C Language X Interface</olink>
12839e7bcd65Smrgand
12840568f49bSmrg<olink targetdoc='icccm' targetptr='Pop_up_Windows'>Pop-up Windows</olink> and
12850568f49bSmrg<olink targetdoc='icccm' targetptr='Redirection_of_Operations'>Redirection of Operations</olink> in the
12869e7bcd65Smrg<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>.
12879e7bcd65SmrgThe pop-up and pop-down callbacks are called during
12889e7bcd65Smrg<xref linkend='XtPopup' xrefstyle='select: title'/>
12899e7bcd65Smrgand
12909e7bcd65Smrg<xref linkend='XtPopdown' xrefstyle='select: title'/>.
12919e7bcd65SmrgThe default value of the <emphasis remap='I'>visual</emphasis> resource is the symbolic value
12929e7bcd65Smrg<function>CopyFromParent</function>.
12939e7bcd65SmrgThe Intrinsics do not need to query the parent's visual type when the
12949e7bcd65Smrgdefault value is used; if a client using
12959e7bcd65Smrg<xref linkend='XtGetValues' xrefstyle='select: title'/>
12969e7bcd65Smrgto examine the visual type receives the value
12979e7bcd65Smrg<function>CopyFromParent</function>,
12989e7bcd65Smrgit must then use
12999e7bcd65Smrg<function>XGetWindowAttributes</function>
13009e7bcd65Smrgif it needs the actual visual type.
13019e7bcd65Smrg</para>
13029e7bcd65Smrg
13039e7bcd65Smrg<para>
13049e7bcd65SmrgThe default values for Shell fields in
13059e7bcd65SmrgWMShell
13069e7bcd65Smrgand its subclasses are:
13079e7bcd65Smrg</para>
13089e7bcd65Smrg
13099e7bcd65Smrg<informaltable frame='topbot'>
13109e7bcd65Smrg  <?dbfo keep-together="auto" ?>
13119e7bcd65Smrg  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
13129e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
13139e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
13149e7bcd65Smrg  <thead>
13159e7bcd65Smrg    <row rowsep='1'>
13169e7bcd65Smrg      <entry>Field</entry>
13179e7bcd65Smrg      <entry>Default Value</entry>
13189e7bcd65Smrg    </row>
13199e7bcd65Smrg  </thead>
13209e7bcd65Smrg  <tbody>
13219e7bcd65Smrg    <row>
13229e7bcd65Smrg      <entry>title</entry>
13239e7bcd65Smrg      <entry>Icon name, if specified, otherwise the application's name</entry>
13249e7bcd65Smrg    </row>
13259e7bcd65Smrg    <row>
13269e7bcd65Smrg      <entry>wm_timeout</entry>
13279e7bcd65Smrg      <entry>Five seconds, in units of milliseconds</entry>
13289e7bcd65Smrg    </row>
13299e7bcd65Smrg    <row>
13309e7bcd65Smrg      <entry>wait_for_wm</entry>
13319e7bcd65Smrg      <entry><function>True</function></entry>
13329e7bcd65Smrg    </row>
13339e7bcd65Smrg    <row>
13349e7bcd65Smrg      <entry>transient</entry>
13359e7bcd65Smrg      <entry><function>True</function>
13369e7bcd65Smrg      for TransientShell,
13379e7bcd65Smrg      <function>False</function>
13389e7bcd65Smrg      otherwise</entry>
13399e7bcd65Smrg    </row>
13409e7bcd65Smrg    <row>
13419e7bcd65Smrg      <entry>urgency</entry>
13429e7bcd65Smrg      <entry><function>False</function></entry>
13439e7bcd65Smrg    </row>
13449e7bcd65Smrg    <row>
13459e7bcd65Smrg      <entry>client_leader</entry>
13469e7bcd65Smrg      <entry>NULL</entry>
13479e7bcd65Smrg    </row>
13489e7bcd65Smrg    <row>
13499e7bcd65Smrg      <entry>window_role</entry>
13509e7bcd65Smrg      <entry>NULL</entry>
13519e7bcd65Smrg    </row>
13529e7bcd65Smrg    <row>
13539e7bcd65Smrg      <entry>min_width</entry>
13549e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13559e7bcd65Smrg    </row>
13569e7bcd65Smrg    <row>
13579e7bcd65Smrg      <entry>min_height</entry>
13589e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13599e7bcd65Smrg    </row>
13609e7bcd65Smrg    <row>
13619e7bcd65Smrg      <entry>max_width</entry>
13629e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13639e7bcd65Smrg    </row>
13649e7bcd65Smrg    <row>
13659e7bcd65Smrg      <entry>max_height</entry>
13669e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13679e7bcd65Smrg    </row>
13689e7bcd65Smrg    <row>
13699e7bcd65Smrg      <entry>width_inc</entry>
13709e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13719e7bcd65Smrg    </row>
13729e7bcd65Smrg    <row>
13739e7bcd65Smrg      <entry>height_inc</entry>
13749e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13759e7bcd65Smrg    </row>
13769e7bcd65Smrg    <row>
13779e7bcd65Smrg      <entry>min_aspect_x</entry>
13789e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13799e7bcd65Smrg    </row>
13809e7bcd65Smrg    <row>
13819e7bcd65Smrg      <entry>min_aspect_y</entry>
13829e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13839e7bcd65Smrg    </row>
13849e7bcd65Smrg    <row>
13859e7bcd65Smrg      <entry>max_aspect_x</entry>
13869e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13879e7bcd65Smrg    </row>
13889e7bcd65Smrg    <row>
13899e7bcd65Smrg      <entry>max_aspect_y</entry>
13909e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
13919e7bcd65Smrg    </row>
13929e7bcd65Smrg    <row>
13939e7bcd65Smrg      <entry>input</entry>
13949e7bcd65Smrg      <entry><function>False</function></entry>
13959e7bcd65Smrg    </row>
13969e7bcd65Smrg    <row>
13979e7bcd65Smrg      <entry>initial_state</entry>
13989e7bcd65Smrg      <entry>Normal</entry>
13999e7bcd65Smrg    </row>
14009e7bcd65Smrg    <row>
14019e7bcd65Smrg      <entry>icon_pixmap</entry>
14029e7bcd65Smrg      <entry>None</entry>
14039e7bcd65Smrg    </row>
14049e7bcd65Smrg    <row>
14059e7bcd65Smrg      <entry>icon_window</entry>
14069e7bcd65Smrg      <entry>None</entry>
14079e7bcd65Smrg    </row>
14089e7bcd65Smrg    <row>
14099e7bcd65Smrg      <entry>icon_x</entry>
14109e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
14119e7bcd65Smrg    </row>
14129e7bcd65Smrg    <row>
14139e7bcd65Smrg      <entry>icon_y</entry>
14149e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
14159e7bcd65Smrg    </row>
14169e7bcd65Smrg    <row>
14179e7bcd65Smrg      <entry>icon_mask</entry>
14189e7bcd65Smrg      <entry>None</entry>
14199e7bcd65Smrg    </row>
14209e7bcd65Smrg    <row>
14219e7bcd65Smrg      <entry>window_group</entry>
14229e7bcd65Smrg      <entry><function>XtUnspecifiedWindow</function></entry>
14239e7bcd65Smrg    </row>
14249e7bcd65Smrg    <row>
14259e7bcd65Smrg      <entry>base_width</entry>
14269e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
14279e7bcd65Smrg    </row>
14289e7bcd65Smrg    <row>
14299e7bcd65Smrg      <entry>base_height</entry>
14309e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
14319e7bcd65Smrg    </row>
14329e7bcd65Smrg    <row>
14339e7bcd65Smrg      <entry>win_gravity</entry>
14349e7bcd65Smrg      <entry><function>XtUnspecifiedShellInt</function></entry>
14359e7bcd65Smrg    </row>
14369e7bcd65Smrg    <row>
14379e7bcd65Smrg      <entry>title_encoding</entry>
14389e7bcd65Smrg      <entry>See text</entry>
14399e7bcd65Smrg    </row>
14409e7bcd65Smrg  </tbody>
14419e7bcd65Smrg  </tgroup>
14429e7bcd65Smrg</informaltable>
14439e7bcd65Smrg
14449e7bcd65Smrg<para>
14459e7bcd65SmrgThe <emphasis remap='I'>title</emphasis> and
14469e7bcd65Smrg<emphasis remap='I'>title_encoding</emphasis> fields are stored in the
14479e7bcd65Smrg<emphasis role='strong'>WM_NAME</emphasis>
14489e7bcd65Smrgproperty on the shell's window by the WMShell realize procedure.
14499e7bcd65SmrgIf the <emphasis remap='I'>title_encoding</emphasis> field is
14509e7bcd65Smrg<function>None</function>,
14519e7bcd65Smrgthe <emphasis remap='I'>title</emphasis> string is assumed to be in the encoding of the current
14529e7bcd65Smrglocale and the encoding of the
14539e7bcd65Smrg<emphasis role='strong'>WM_NAME</emphasis>
14549e7bcd65Smrgproperty is set to
14559e7bcd65Smrg<function>XStdICCTextStyle</function>.
14569e7bcd65SmrgIf a language procedure has not been set
14579e7bcd65Smrgthe default value of <emphasis remap='I'>title_encoding</emphasis> is
14589e7bcd65Smrg<emphasis role='strong'>XA_STRING</emphasis>, otherwise the default value is
14599e7bcd65Smrg<function>None</function>.
14609e7bcd65SmrgThe <emphasis remap='I'>wm_timeout</emphasis> field specifies, in milliseconds,
14619e7bcd65Smrgthe amount of time a shell is to wait for
14629e7bcd65Smrgconfirmation of a geometry request to the window manager.
14639e7bcd65SmrgIf none comes back within that time,
14649e7bcd65Smrgthe shell assumes the window manager is not functioning properly
14659e7bcd65Smrgand sets <emphasis remap='I'>wait_for_wm</emphasis> to
14669e7bcd65Smrg<function>False</function>
14679e7bcd65Smrg(later events may reset this value).
14689e7bcd65SmrgWhen <emphasis remap='I'>wait_for_wm</emphasis> is
14699e7bcd65Smrg<function>False</function>,
14709e7bcd65Smrgthe shell does not wait for a response, but relies on asynchronous
14719e7bcd65Smrgnotification.
14729e7bcd65SmrgIf <emphasis remap='I'>transient</emphasis> is
14739e7bcd65Smrg<function>True</function>,
14749e7bcd65Smrgthe
14759e7bcd65Smrg<emphasis role='strong'>WM_TRANSIENT_FOR</emphasis>
14769e7bcd65Smrgproperty
14779e7bcd65Smrgwill be stored on the shell window with a value as specified below.
14789e7bcd65SmrgThe interpretation of this property is specific to the window manager
14799e7bcd65Smrgunder which the application is run; see the
14809e7bcd65Smrg<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>
14819e7bcd65Smrgfor more details.
14829e7bcd65Smrg</para>
14839e7bcd65Smrg
14849e7bcd65Smrg<para>
14859e7bcd65SmrgThe realize and set_values procedures of WMShell store the
14869e7bcd65Smrg<emphasis role='strong'>WM_CLIENT_LEADER</emphasis>
14879e7bcd65Smrgproperty on the shell window.
14889e7bcd65SmrgWhen <emphasis remap='I'>client_leader</emphasis> is not NULL and the client leader widget is
14899e7bcd65Smrgrealized, the property will be created with the value of the window of the
14909e7bcd65Smrgclient leader widget.
14919e7bcd65SmrgWhen <emphasis remap='I'>client_leader</emphasis> is NULL and the shell widget has a NULL parent,
14929e7bcd65Smrgthe widget's window is used as the value of the
14939e7bcd65Smrgproperty.
14949e7bcd65SmrgWhen <emphasis remap='I'>client_leader</emphasis> is NULL and the shell widget has a non-NULL parent,
14959e7bcd65Smrga search is made for the closest shell ancestor
14969e7bcd65Smrgwith a non-NULL <emphasis remap='I'>client_leader</emphasis>,
14979e7bcd65Smrgand if none is found the shell ancestor with a NULL parent is the result.
14989e7bcd65SmrgIf the resulting widget is realized, the property is created
14999e7bcd65Smrgwith the value of the widget's window.
15009e7bcd65Smrg</para>
15019e7bcd65Smrg
15029e7bcd65Smrg<para>
15039e7bcd65SmrgWhen the value of <emphasis remap='I'>window_role</emphasis> is not NULL, the
15049e7bcd65Smrgrealize and set_values procedures store the
15059e7bcd65Smrg<emphasis role='strong'>WM_WINDOW_ROLE</emphasis>
15069e7bcd65Smrgproperty on the shell's window with the value of the resource.
15079e7bcd65Smrg</para>
15089e7bcd65Smrg
15099e7bcd65Smrg<para>
15109e7bcd65SmrgAll other resources specify fields in the window manager hints
15119e7bcd65Smrgand the window manager size hints.
15129e7bcd65SmrgThe realize and set_values procedures of
15139e7bcd65SmrgWMShell
15149e7bcd65Smrgset the corresponding flag bits in the
15159e7bcd65Smrghints if any of the fields contain nondefault values.  In addition, if
15169e7bcd65Smrga flag bit is set that refers to a field with the value
15179e7bcd65Smrg<function>XtUnspecifiedShellInt</function>,
15189e7bcd65Smrgthe value of the field is modified as follows:
15199e7bcd65Smrg</para>
15209e7bcd65Smrg
15219e7bcd65Smrg<informaltable frame='topbot'>
15229e7bcd65Smrg  <?dbfo keep-together="always" ?>
15239e7bcd65Smrg  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
15249e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
15259e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
15269e7bcd65Smrg  <thead>
15279e7bcd65Smrg    <row rowsep='1'>
15289e7bcd65Smrg      <entry>Field</entry>
15299e7bcd65Smrg      <entry>Replacement</entry>
15309e7bcd65Smrg    </row>
15319e7bcd65Smrg  </thead>
15329e7bcd65Smrg  <tbody>
15339e7bcd65Smrg    <row>
15349e7bcd65Smrg      <entry>base_width, base_height</entry>
15359e7bcd65Smrg      <entry>0</entry>
15369e7bcd65Smrg    </row>
15379e7bcd65Smrg    <row>
15389e7bcd65Smrg      <entry>width_inc, height_inc</entry>
15399e7bcd65Smrg      <entry>1</entry>
15409e7bcd65Smrg    </row>
15419e7bcd65Smrg    <row>
15429e7bcd65Smrg      <entry>max_width, max_height</entry>
15439e7bcd65Smrg      <entry>32767</entry>
15449e7bcd65Smrg    </row>
15459e7bcd65Smrg    <row>
15469e7bcd65Smrg      <entry>min_width, min_height</entry>
15479e7bcd65Smrg      <entry>1</entry>
15489e7bcd65Smrg    </row>
15499e7bcd65Smrg    <row>
15509e7bcd65Smrg      <entry>min_aspect_x, min_aspect_y</entry>
15519e7bcd65Smrg      <entry>-1</entry>
15529e7bcd65Smrg    </row>
15539e7bcd65Smrg    <row>
15549e7bcd65Smrg      <entry>max_aspect_x, max_aspect_y</entry>
15559e7bcd65Smrg      <entry>-1</entry>
15569e7bcd65Smrg    </row>
15579e7bcd65Smrg    <row>
15589e7bcd65Smrg      <entry>icon_x, icon_y</entry>
15599e7bcd65Smrg      <entry>-1</entry>
15609e7bcd65Smrg    </row>
15619e7bcd65Smrg    <row>
15629e7bcd65Smrg      <entry>win_gravity</entry>
15639e7bcd65Smrg      <entry>Value returned by
15649e7bcd65Smrg      <function>XWMGeometry</function>
15659e7bcd65Smrg      if called,
15669e7bcd65Smrg      else <function>NorthWestGravity</function></entry>
15679e7bcd65Smrg    </row>
15689e7bcd65Smrg  </tbody>
15699e7bcd65Smrg  </tgroup>
15709e7bcd65Smrg</informaltable>
15719e7bcd65Smrg
15729e7bcd65Smrg<para>
15739e7bcd65SmrgIf the shell widget has a non-NULL parent, then the
15749e7bcd65Smrgrealize and set_values procedures replace the value
15759e7bcd65Smrg<function>XtUnspecifiedWindow</function>
15769e7bcd65Smrgin the <emphasis remap='I'>window_group</emphasis> field with the window id of the root widget
15779e7bcd65Smrgof the widget tree if the
15789e7bcd65Smrgroot widget is realized. The symbolic constant
15799e7bcd65Smrg<function>XtUnspecifiedWindowGroup</function>
15809e7bcd65Smrgmay be used to indicate that the <emphasis remap='I'>window_group</emphasis> hint flag bit is not
15819e7bcd65Smrgto be set.  If <emphasis remap='I'>transient</emphasis> is
15829e7bcd65Smrg<function>True</function>,
15839e7bcd65Smrgthe shell's class is not a subclass of
15849e7bcd65SmrgTransientShell,
15859e7bcd65Smrgand <emphasis remap='I'>window_group</emphasis> is not
15869e7bcd65Smrg<function>XtUnspecifiedWindowGroup</function>,
15879e7bcd65Smrgthe WMShell realize and set_values procedures then store the
15889e7bcd65Smrg<emphasis role='strong'>WM_TRANSIENT_FOR</emphasis>
15899e7bcd65Smrgproperty with the value of <emphasis remap='I'>window_group</emphasis>.
15909e7bcd65Smrg</para>
15919e7bcd65Smrg
15929e7bcd65Smrg<para>
15939e7bcd65SmrgTransient
15949e7bcd65Smrgshells have the following additional resource:
15959e7bcd65Smrg</para>
15969e7bcd65Smrg
15979e7bcd65Smrg<informaltable frame='topbot'>
15989e7bcd65Smrg  <?dbfo keep-together="always" ?>
15999e7bcd65Smrg  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
16009e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
16019e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
16029e7bcd65Smrg  <thead>
16039e7bcd65Smrg    <row rowsep='1'>
16049e7bcd65Smrg      <entry>Field</entry>
16059e7bcd65Smrg      <entry>Replacement</entry>
16069e7bcd65Smrg    </row>
16079e7bcd65Smrg  </thead>
16089e7bcd65Smrg  <tbody>
16099e7bcd65Smrg    <row>
16109e7bcd65Smrg      <entry>transient_for</entry>
16119e7bcd65Smrg      <entry>NULL</entry>
16129e7bcd65Smrg    </row>
16139e7bcd65Smrg  </tbody>
16149e7bcd65Smrg  </tgroup>
16159e7bcd65Smrg</informaltable>
16169e7bcd65Smrg
16179e7bcd65Smrg<para>
16189e7bcd65SmrgThe realize and set_values procedures of
16199e7bcd65SmrgTransientShell
16209e7bcd65Smrgstore the
16219e7bcd65Smrg<emphasis role='strong'>WM_TRANSIENT_FOR</emphasis>
16229e7bcd65Smrgproperty on the shell window if <emphasis remap='I'>transient</emphasis> is
16239e7bcd65Smrg<function>True</function>.
16249e7bcd65SmrgIf <emphasis remap='I'>transient_for</emphasis> is non-NULL and the widget specified by
16259e7bcd65Smrg<emphasis remap='I'>transient_for</emphasis> is realized, then its window is used as the value of the
16269e7bcd65Smrg<emphasis role='strong'>WM_TRANSIENT_FOR</emphasis>
16279e7bcd65Smrgproperty; otherwise, the value of <emphasis remap='I'>window_group</emphasis> is used.
16289e7bcd65Smrg</para>
16299e7bcd65Smrg
16309e7bcd65Smrg<para>
16319e7bcd65Smrg<function>TopLevel</function>
16329e7bcd65Smrgshells have the the following additional resources:
16339e7bcd65Smrg</para>
16349e7bcd65Smrg
16359e7bcd65Smrg
16369e7bcd65Smrg<informaltable frame='topbot'>
16379e7bcd65Smrg  <?dbfo keep-together="always" ?>
16389e7bcd65Smrg  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
16399e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
16409e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
16419e7bcd65Smrg  <thead>
16429e7bcd65Smrg    <row rowsep='1'>
16439e7bcd65Smrg      <entry>Field</entry>
16449e7bcd65Smrg      <entry>Default Value</entry>
16459e7bcd65Smrg    </row>
16469e7bcd65Smrg  </thead>
16479e7bcd65Smrg  <tbody>
16489e7bcd65Smrg    <row>
16499e7bcd65Smrg      <entry>icon_name</entry>
16509e7bcd65Smrg      <entry>Shell widget's name</entry>
16519e7bcd65Smrg    </row>
16529e7bcd65Smrg    <row>
16539e7bcd65Smrg      <entry>iconic</entry>
16549e7bcd65Smrg      <entry><emphasis role='strong'>False</emphasis></entry>
16559e7bcd65Smrg    </row>
16569e7bcd65Smrg    <row>
16579e7bcd65Smrg      <entry>icon_name_encoding</entry>
16589e7bcd65Smrg      <entry>See text</entry>
16599e7bcd65Smrg    </row>
16609e7bcd65Smrg  </tbody>
16619e7bcd65Smrg  </tgroup>
16629e7bcd65Smrg</informaltable>
16639e7bcd65Smrg
16649e7bcd65Smrg<para>
16659e7bcd65SmrgThe <emphasis remap='I'>icon_name</emphasis>
16669e7bcd65Smrgand <emphasis remap='I'>icon_name_encoding</emphasis> fields are stored in the
16679e7bcd65Smrg<emphasis role='strong'>WM_ICON_NAME</emphasis>
16689e7bcd65Smrgproperty on the shell's window by the TopLevelShell realize
16699e7bcd65Smrgprocedure.
16709e7bcd65SmrgIf the <emphasis remap='I'>icon_name_encoding</emphasis> field is
16719e7bcd65Smrg<function>None</function>,
16729e7bcd65Smrgthe <emphasis remap='I'>icon_name</emphasis> string is assumed to be in the encoding of the
16739e7bcd65Smrgcurrent locale and the encoding of the
16749e7bcd65Smrg<emphasis role='strong'>WM_ICON_NAME</emphasis>
16759e7bcd65Smrgproperty is set to
16769e7bcd65Smrg<function>XStdICCTextStyle</function>.
16779e7bcd65SmrgIf a language procedure has not been set,
16789e7bcd65Smrgthe default value of <emphasis remap='I'>icon_name_encoding</emphasis> is
16799e7bcd65Smrg<emphasis role='strong'>XA_STRING</emphasis>, otherwise the default value is
16809e7bcd65Smrg<function>None</function>.
16819e7bcd65SmrgThe <emphasis remap='I'>iconic</emphasis> field may be used by a client to request
16829e7bcd65Smrgthat the window manager iconify or deiconify the shell; the
16839e7bcd65SmrgTopLevelShell
16849e7bcd65Smrgset_values procedure will send the appropriate
16859e7bcd65Smrg<emphasis role='strong'>WM_CHANGE_STATE</emphasis>
16869e7bcd65Smrgmessage (as specified by the <emphasis remap='I'>Inter-Client Communication Conventions Manual</emphasis>)
16879e7bcd65Smrgif this resource is changed from
16889e7bcd65Smrg<function>False</function>
16899e7bcd65Smrgto
16909e7bcd65Smrg<function>True</function>
16919e7bcd65Smrgand will call
16929e7bcd65Smrg<xref linkend='XtPopup' xrefstyle='select: title'/>
16939e7bcd65Smrgspecifying <emphasis remap='I'>grab_kind</emphasis> as
16949e7bcd65Smrg<function>XtGrabNone</function>
16959e7bcd65Smrgif <emphasis remap='I'>iconic</emphasis> is changed from
16969e7bcd65Smrg<function>True</function>
16979e7bcd65Smrgto
16989e7bcd65Smrg<function>False</function>.
16999e7bcd65SmrgThe XtNiconic resource is also an alternative way to set
17009e7bcd65Smrgthe XtNinitialState resource
17019e7bcd65Smrgto indicate that a shell should be initially displayed as an icon; the
17029e7bcd65SmrgTopLevelShell
17039e7bcd65Smrginitialize procedure will set <emphasis remap='I'>initial_state</emphasis> to
17049e7bcd65Smrg<function>IconicState</function>
17059e7bcd65Smrgif <emphasis remap='I'>iconic</emphasis> is
17069e7bcd65Smrg<function>True</function>.
17079e7bcd65Smrg</para>
17089e7bcd65Smrg
17099e7bcd65Smrg<para>
17109e7bcd65SmrgApplication
17119e7bcd65Smrgshells have the following additional resources:
17129e7bcd65Smrg</para>
17139e7bcd65Smrg
17149e7bcd65Smrg<informaltable frame='topbot'>
17159e7bcd65Smrg  <?dbfo keep-together="always" ?>
17169e7bcd65Smrg  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
17179e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
17189e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
17199e7bcd65Smrg  <thead>
17209e7bcd65Smrg    <row rowsep='1'>
17219e7bcd65Smrg      <entry>Field</entry>
17229e7bcd65Smrg      <entry>Default Value</entry>
17239e7bcd65Smrg    </row>
17249e7bcd65Smrg  </thead>
17259e7bcd65Smrg  <tbody>
17269e7bcd65Smrg    <row>
17279e7bcd65Smrg      <entry>argc</entry>
17289e7bcd65Smrg      <entry>0</entry>
17299e7bcd65Smrg    </row>
17309e7bcd65Smrg    <row>
17319e7bcd65Smrg      <entry>argv</entry>
17329e7bcd65Smrg      <entry>NULL</entry>
17339e7bcd65Smrg    </row>
17349e7bcd65Smrg  </tbody>
17359e7bcd65Smrg  </tgroup>
17369e7bcd65Smrg</informaltable>
17379e7bcd65Smrg
17389e7bcd65Smrg<para>
17399e7bcd65SmrgThe <emphasis remap='I'>argc</emphasis> and <emphasis remap='I'>argv</emphasis> fields are used to initialize
17409e7bcd65Smrgthe standard property
17419e7bcd65Smrg<emphasis role='strong'>WM_COMMAND</emphasis>.  See the
17429e7bcd65Smrg<olink targetdoc='icccm' targetptr='icccm'>Inter-Client Communication Conventions Manual</olink>
17439e7bcd65Smrgfor more information.
17449e7bcd65Smrg</para>
17459e7bcd65Smrg
17469e7bcd65Smrg<para>
17479e7bcd65SmrgThe default values for the SessionShell instance fields,
17489e7bcd65Smrgwhich are filled in from the resource lists and by the
17499e7bcd65Smrginitialize procedure, are
17509e7bcd65Smrg</para>
17519e7bcd65Smrg
17529e7bcd65Smrg<informaltable frame='topbot'>
17539e7bcd65Smrg  <?dbfo keep-together="always" ?>
17549e7bcd65Smrg  <tgroup cols='2' align='left' colsep='0' rowsep='0'>
17559e7bcd65Smrg  <colspec colwidth='1.0*' colname='c1'/>
17569e7bcd65Smrg  <colspec colwidth='1.0*' colname='c2'/>
17579e7bcd65Smrg  <thead>
17589e7bcd65Smrg    <row rowsep='1'>
17599e7bcd65Smrg      <entry>Field</entry>
17609e7bcd65Smrg      <entry>Default Value</entry>
17619e7bcd65Smrg    </row>
17629e7bcd65Smrg  </thead>
17639e7bcd65Smrg  <tbody>
17649e7bcd65Smrg    <row>
17659e7bcd65Smrg      <entry>cancel_callbacks</entry>
17669e7bcd65Smrg      <entry>NULL</entry>
17679e7bcd65Smrg    </row>
17689e7bcd65Smrg    <row>
17699e7bcd65Smrg      <entry>clone_command</entry>
17709e7bcd65Smrg      <entry>See text</entry>
17719e7bcd65Smrg    </row>
17729e7bcd65Smrg    <row>
17739e7bcd65Smrg      <entry>connection</entry>
17749e7bcd65Smrg      <entry>NULL</entry>
17759e7bcd65Smrg    </row>
17769e7bcd65Smrg    <row>
17779e7bcd65Smrg      <entry>current_dir</entry>
17789e7bcd65Smrg      <entry>NULL</entry>
17799e7bcd65Smrg    </row>
17809e7bcd65Smrg    <row>
17819e7bcd65Smrg      <entry>die_callbacks</entry>
17829e7bcd65Smrg      <entry>NULL</entry>
17839e7bcd65Smrg    </row>
17849e7bcd65Smrg    <row>
17859e7bcd65Smrg      <entry>discard_command</entry>
17869e7bcd65Smrg      <entry>NULL</entry>
17879e7bcd65Smrg    </row>
17889e7bcd65Smrg    <row>
17899e7bcd65Smrg      <entry>environment</entry>
17909e7bcd65Smrg      <entry>NULL</entry>
17919e7bcd65Smrg    </row>
17929e7bcd65Smrg    <row>
17939e7bcd65Smrg      <entry>error_callbacks</entry>
17949e7bcd65Smrg      <entry>NULL</entry>
17959e7bcd65Smrg    </row>
17969e7bcd65Smrg    <row>
17979e7bcd65Smrg      <entry>interact_callbacks</entry>
17989e7bcd65Smrg      <entry>NULL</entry>
17999e7bcd65Smrg    </row>
18009e7bcd65Smrg    <row>
18019e7bcd65Smrg      <entry>join_session</entry>
18029e7bcd65Smrg      <entry><emphasis role='strong'>True</emphasis></entry>
18039e7bcd65Smrg    </row>
18049e7bcd65Smrg    <row>
18059e7bcd65Smrg      <entry>program_path</entry>
18069e7bcd65Smrg      <entry>NULL</entry>
18079e7bcd65Smrg    </row>
18089e7bcd65Smrg    <row>
18099e7bcd65Smrg      <entry>resign_command</entry>
18109e7bcd65Smrg      <entry>NULL</entry>
18119e7bcd65Smrg    </row>
18129e7bcd65Smrg    <row>
18139e7bcd65Smrg      <entry>restart_command</entry>
18149e7bcd65Smrg      <entry>See text</entry>
18159e7bcd65Smrg    </row>
18169e7bcd65Smrg    <row>
18179e7bcd65Smrg      <entry>restart_style</entry>
18189e7bcd65Smrg      <entry><emphasis role='strong'>SmRestartIfRunning</emphasis></entry>
18199e7bcd65Smrg    </row>
18209e7bcd65Smrg    <row>
18219e7bcd65Smrg      <entry>save_callbacks</entry>
18229e7bcd65Smrg      <entry>NULL</entry>
18239e7bcd65Smrg    </row>
18249e7bcd65Smrg    <row>
18259e7bcd65Smrg      <entry>save_complete_callbacks</entry>
18269e7bcd65Smrg      <entry>NULL</entry>
18279e7bcd65Smrg    </row>
18289e7bcd65Smrg    <row>
18299e7bcd65Smrg      <entry>session_id</entry>
18309e7bcd65Smrg      <entry>NULL</entry>
18319e7bcd65Smrg    </row>
18329e7bcd65Smrg    <row>
18339e7bcd65Smrg      <entry>shutdown_command</entry>
18349e7bcd65Smrg      <entry>NULL</entry>
18359e7bcd65Smrg    </row>
18369e7bcd65Smrg  </tbody>
18379e7bcd65Smrg  </tgroup>
18389e7bcd65Smrg</informaltable>
18399e7bcd65Smrg
18409e7bcd65Smrg<para>
18419e7bcd65SmrgThe <emphasis remap='I'>connection</emphasis> field contains the session connection object or NULL
18429e7bcd65Smrgif a session connection is not being managed by this widget.
18439e7bcd65Smrg</para>
18449e7bcd65Smrg
18459e7bcd65Smrg<para>
18469e7bcd65SmrgThe <emphasis remap='I'>session_id</emphasis> is an identification assigned to the session
18479e7bcd65Smrgparticipant by the session manager.
18489e7bcd65SmrgThe <emphasis remap='I'>session_id</emphasis> will be passed to the session
18499e7bcd65Smrgmanager as the client identifier of the previous session.
18509e7bcd65SmrgWhen a connection is established with the session manager,
18519e7bcd65Smrgthe client id assigned by the session manager is stored
18529e7bcd65Smrgin the <emphasis remap='I'>session_id</emphasis> field.
18539e7bcd65SmrgWhen not NULL, the <emphasis remap='I'>session_id</emphasis> of the Session shell widget that
18549e7bcd65Smrgis at the root of the widget tree of the client leader widget will be
18559e7bcd65Smrgused to create the
18569e7bcd65Smrg<emphasis role='strong'>SM_CLIENT_ID</emphasis>
18579e7bcd65Smrgproperty on the client leader's window.
18589e7bcd65Smrg</para>
18599e7bcd65Smrg
18609e7bcd65Smrg<para>
18619e7bcd65SmrgIf <emphasis remap='I'>join_session</emphasis> is
18629e7bcd65Smrg<function>False</function>,
18639e7bcd65Smrgthe widget will not attempt to establish a
18649e7bcd65Smrgconnection to the session manager at shell creation time.
18659e7bcd65SmrgSee <xref linkend='Joining_a_Session' /> and
18669e7bcd65Smrg<xref linkend='Resigning_from_a_Session' />
18679e7bcd65Smrgfor more information on the functionality of this resource.
18689e7bcd65Smrg</para>
18699e7bcd65Smrg
18709e7bcd65Smrg<para>
18719e7bcd65SmrgThe <emphasis remap='I'>restart_command</emphasis>, <emphasis remap='I'>clone_command</emphasis>, <emphasis remap='I'>discard_command</emphasis>,
18729e7bcd65Smrg<emphasis remap='I'>resign_command</emphasis>, <emphasis remap='I'>shutdown_command</emphasis>, <emphasis remap='I'>environment</emphasis>,
18739e7bcd65Smrg<emphasis remap='I'>current_dir</emphasis>, <emphasis remap='I'>program_path</emphasis>, and
18749e7bcd65Smrg<emphasis remap='I'>restart_style</emphasis> fields contain standard session properties.
18759e7bcd65Smrg</para>
18769e7bcd65Smrg
18779e7bcd65Smrg<para>
18789e7bcd65SmrgWhen a session connection is established or newly managed by the shell,
18799e7bcd65Smrgthe shell initialize and set_values methods check the values of the
18809e7bcd65Smrg<emphasis remap='I'>restart_command</emphasis>,
18819e7bcd65Smrg<emphasis remap='I'>clone_command</emphasis>,
18829e7bcd65Smrgand <emphasis remap='I'>program_path</emphasis>
18839e7bcd65Smrgresources.  At that time, if <emphasis remap='I'>restart_command</emphasis> is NULL, the value
18849e7bcd65Smrgof the <emphasis remap='I'>argv</emphasis> resource will be copied to <emphasis remap='I'>restart_command</emphasis>.
18859e7bcd65SmrgWhether or not <emphasis remap='I'>restart_command</emphasis> was NULL,
18860568f49bSmrgif &ldquo;<emphasis>-xtsessionID</emphasis>&rdquo; &ldquo;<emphasis>&lt;session id&gt;</emphasis>&rdquo; does not
18879e7bcd65Smrgalready appear in the <emphasis remap='I'>restart_command</emphasis>, it will be added by the
18889e7bcd65Smrginitialize and set_values methods at the beginning of the command arguments;
18890568f49bSmrgif the &ldquo;<emphasis>-xtsessionID</emphasis>&rdquo; argument already appears with an incorrect
18909e7bcd65Smrg<emphasis>session id</emphasis> in the following argument, that argument
18919e7bcd65Smrgwill be replaced with the current <emphasis>session id</emphasis>.
18929e7bcd65Smrg</para>
18939e7bcd65Smrg
18949e7bcd65Smrg<para>
18959e7bcd65SmrgAfter this, the shell initialize and set_values procedures check the
18969e7bcd65Smrg<emphasis remap='I'>clone_command</emphasis>.  If <emphasis remap='I'>clone_command</emphasis> is NULL,
18979e7bcd65Smrg<emphasis remap='I'>restart_command</emphasis> will be copied to <emphasis remap='I'>clone_command</emphasis>,
18980568f49bSmrgexcept the &ldquo;<emphasis>-xtsessionID</emphasis>&rdquo; and following argument will not be copied.
18999e7bcd65Smrg</para>
19009e7bcd65Smrg
19019e7bcd65Smrg<para>
19029e7bcd65SmrgFinally, the shell initialize and set_values procedures check the
19039e7bcd65Smrg<emphasis remap='I'>program_path</emphasis>.  If <emphasis remap='I'>program_path</emphasis> is NULL, the
19049e7bcd65Smrgfirst element of <emphasis remap='I'>restart_command</emphasis> is copied to <emphasis remap='I'>program_path</emphasis>.
19059e7bcd65Smrg</para>
19069e7bcd65Smrg
19079e7bcd65Smrg<para>
19089e7bcd65SmrgThe possible values of <emphasis remap='I'>restart_style</emphasis> are
19099e7bcd65Smrg<function>SmRestartIfRunning</function>,
19109e7bcd65Smrg<function>SmRestartAnyway</function>,
19119e7bcd65Smrg<function>SmRestartImmediately</function>,
19129e7bcd65Smrgand
19139e7bcd65Smrg<function>SmRestartNever</function>.
19149e7bcd65SmrgA resource converter is registered for this resource;
19159e7bcd65Smrgfor the strings that it recognizes,
19169e7bcd65Smrgsee <xref linkend='Predefined_Resource_Converters' />.
19179e7bcd65Smrg</para>
19189e7bcd65Smrg
19199e7bcd65Smrg<para>
19209e7bcd65SmrgThe resource type EnvironmentArray is a NULL-terminated array of
19219e7bcd65Smrgpointers to strings;
19220568f49bSmrgeach string has the format &ldquo;name=value&rdquo;.
19239e7bcd65SmrgThe `=' character may not appear in the name,
19249e7bcd65Smrgand the string is terminated by a null character.
19259e7bcd65Smrg</para>
19269e7bcd65Smrg</sect2>
19279e7bcd65Smrg</sect1>
19289e7bcd65Smrg
19299e7bcd65Smrg<sect1 id="Session_Participation">
19309e7bcd65Smrg<title>Session Participation</title>
19319e7bcd65Smrg<para>
19329e7bcd65SmrgApplications can participate in a user's session, exchanging messages
19339e7bcd65Smrgwith the session manager as described in the
19349e7bcd65Smrg<emphasis>X Session Management Protocol</emphasis> and the
19359e7bcd65Smrg<emphasis remap='I'>X Session Management Library</emphasis>.
19369e7bcd65Smrg</para>
19379e7bcd65Smrg
19389e7bcd65Smrg<para>
19399e7bcd65SmrgWhen a widget of
19409e7bcd65Smrg<function>sessionShellWidgetClass</function>
19419e7bcd65Smrgor a subclass is created, the widget provides support for the application
19429e7bcd65Smrgas a session participant and continues to provide support until the
19439e7bcd65Smrgwidget is destroyed.
19449e7bcd65Smrg</para>
19459e7bcd65Smrg
19469e7bcd65Smrg<sect2 id="Joining_a_Session">
19479e7bcd65Smrg<title>Joining a Session</title>
19489e7bcd65Smrg<para>
19499e7bcd65SmrgWhen a Session shell is created,
19509e7bcd65Smrgif <emphasis remap='I'>connection</emphasis> is NULL,
19519e7bcd65Smrgand if <emphasis remap='I'>join_session</emphasis> is
19529e7bcd65Smrg<function>True</function>,
19539e7bcd65Smrgand if <emphasis remap='I'>argv</emphasis> or <emphasis remap='I'>restart_command</emphasis> is not NULL,
19549e7bcd65Smrgand if in POSIX environments the
19559e7bcd65Smrg<emphasis role='strong'>SESSION_MANAGER</emphasis>
19569e7bcd65Smrgenvironment variable is defined,
19579e7bcd65Smrgthe shell will attempt to establish a new connection with the session manager.
19589e7bcd65Smrg</para>
19599e7bcd65Smrg
19609e7bcd65Smrg<para>
19619e7bcd65SmrgTo transfer management of an existing session connection from an
19629e7bcd65Smrgapplication to the shell at widget creation time, pass the existing
19639e7bcd65Smrgsession connection ID as the <emphasis remap='I'>connection</emphasis> resource value
19649e7bcd65Smrgwhen creating the Session shell,
19659e7bcd65Smrgand if the other creation-time conditions on session participation are met,
19669e7bcd65Smrgthe widget will maintain the connection with the session manager.
19679e7bcd65SmrgThe application must ensure that only one
19689e7bcd65SmrgSession shell manages the connection.
19699e7bcd65Smrg</para>
19709e7bcd65Smrg
19719e7bcd65Smrg<para>
19729e7bcd65SmrgIn the Session shell set_values procedure,
19739e7bcd65Smrgif <emphasis remap='I'>join_session</emphasis> changes from
19749e7bcd65Smrg<function>False</function>
19759e7bcd65Smrgto
19769e7bcd65Smrg<function>True</function>
19779e7bcd65Smrgand <emphasis remap='I'>connection</emphasis> is NULL and when in POSIX environments the
19789e7bcd65Smrg<emphasis role='strong'>SESSION_MANAGER</emphasis>
19799e7bcd65Smrgenvironment variable is defined,
19809e7bcd65Smrgthe shell will attempt to open a connection to the session manager.
19819e7bcd65SmrgIf <emphasis remap='I'>connection</emphasis> changes from NULL to non-NULL, the
19829e7bcd65SmrgSession shell
19839e7bcd65Smrgwill take over management of that session connection and will set
19849e7bcd65Smrg<emphasis remap='I'>join_session</emphasis> to
19859e7bcd65Smrg<function>True</function>.
19869e7bcd65SmrgIf <emphasis remap='I'>join_session</emphasis> changes from
19879e7bcd65Smrg<function>False</function>
19889e7bcd65Smrgto
19899e7bcd65Smrg<function>True</function>
19909e7bcd65Smrgand <emphasis remap='I'>connection</emphasis> is not NULL, the
19919e7bcd65SmrgSession shell will take over management of the session connection.
19929e7bcd65Smrg</para>
19939e7bcd65Smrg
19949e7bcd65Smrg<para>
19959e7bcd65SmrgWhen a successful connection has been established, <emphasis remap='I'>connection</emphasis>
19969e7bcd65Smrgcontains the session connection ID for the session participant.
19979e7bcd65SmrgWhen the shell begins to manage the connection, it will call
19989e7bcd65Smrg<xref linkend='XtAppAddInput' xrefstyle='select: title'/>
19999e7bcd65Smrgto register the handler which watches for protocol messages
20009e7bcd65Smrgfrom the session manager.
20019e7bcd65SmrgWhen the attempt to connect fails, a warning message is issued
20029e7bcd65Smrgand <emphasis remap='I'>connection</emphasis> is set to NULL.
20039e7bcd65Smrg</para>
20049e7bcd65Smrg
20059e7bcd65Smrg<para>
20069e7bcd65SmrgWhile the connection is being managed, if a
20079e7bcd65Smrg<function>SaveYourself</function>,
20089e7bcd65Smrg<function>SaveYourselfPhase2</function>,
20099e7bcd65Smrg<function>Interact</function>,
20109e7bcd65Smrg<function>ShutdownCancelled</function>,
20119e7bcd65Smrg<function>SaveComplete</function>,
20129e7bcd65Smrgor
20139e7bcd65Smrg<function>Die</function>
20149e7bcd65Smrgmessage is received from the session manager, the Session shell will
20159e7bcd65Smrgcall out to application callback procedures registered
20169e7bcd65Smrgon the respective callback list of the Session shell and will
20179e7bcd65Smrgsend
20189e7bcd65Smrg<function>SaveYourselfPhase2Request</function>,
20199e7bcd65Smrg<function>InteractRequest</function>,
20209e7bcd65Smrg<function>InteractDone</function>,
20219e7bcd65Smrg<function>SaveYourselfDone</function>,
20229e7bcd65Smrgand
20239e7bcd65Smrg<function>ConnectionClosed</function>
20249e7bcd65Smrgmessages as appropriate.
20259e7bcd65SmrgInitially, all of the client's session properties are undefined.
20269e7bcd65SmrgWhen any of the session property resource values are defined or change,
20279e7bcd65Smrgthe Session shell initialize and set_values procedures
20289e7bcd65Smrgwill update the client's session property value by a
20299e7bcd65Smrg<function>SetProperties</function>
20309e7bcd65Smrgor a
20319e7bcd65Smrg<function>DeleteProperties</function>
20329e7bcd65Smrgmessage, as appropriate.
20339e7bcd65SmrgThe session ProcessID and UserID properties are always set by the shell
20349e7bcd65Smrgwhen it is possible to determine the value of these properties.
20359e7bcd65Smrg</para>
20369e7bcd65Smrg</sect2>
20379e7bcd65Smrg
20389e7bcd65Smrg<sect2 id="Saving_Application_State">
20399e7bcd65Smrg<title>Saving Application State</title>
20409e7bcd65Smrg<para>
20419e7bcd65SmrgThe session manager instigates an application checkpoint by sending a
20429e7bcd65Smrg<function>SaveYourself</function>
20439e7bcd65Smrgrequest.
20449e7bcd65SmrgApplications are responsible for saving their state in response to the
20459e7bcd65Smrgrequest.
20469e7bcd65Smrg</para>
20479e7bcd65Smrg
20489e7bcd65Smrg<para>
20499e7bcd65SmrgWhen the
20509e7bcd65Smrg<function>SaveYourself</function>
20519e7bcd65Smrgrequest arrives, the procedures registered on the
20529e7bcd65SmrgSession shell's save callback list are called.
20539e7bcd65SmrgIf the application does not register any save callback procedures on
20549e7bcd65Smrgthe save callback list, the shell will report to the session manager
20559e7bcd65Smrgthat the application failed to save its state.
20569e7bcd65SmrgEach procedure on the save callback list receives a token
20579e7bcd65Smrgin the <emphasis remap='I'>call_data</emphasis> parameter.
20589e7bcd65Smrg</para>
20599e7bcd65Smrg
20609e7bcd65Smrg<para>
20619e7bcd65SmrgThe checkpoint token in the <emphasis remap='I'>call_data</emphasis> parameter is of type
20629e7bcd65Smrg<function>XtCheckpointToken</function>.
20639e7bcd65Smrg</para>
20649e7bcd65Smrg
20650568f49bSmrg<programlisting>
20669e7bcd65Smrgtypedef struct {
20670568f49bSmrg        int     save_type;
20680568f49bSmrg        int     interact_style;
20690568f49bSmrg        Boolean shutdown;
20700568f49bSmrg        Boolean fast;
20710568f49bSmrg        Boolean cancel_shutdown
20720568f49bSmrg        int     phase;
20730568f49bSmrg        int     interact_dialog_type;   /* return */
20740568f49bSmrg        Boolean request_cancel;         /* return */
20750568f49bSmrg        Boolean request_next_phase;     /* return */
20760568f49bSmrg        Boolean save_success;           /* return */
20779e7bcd65Smrg} XtCheckpointTokenRec, *XtCheckpointToken;
20780568f49bSmrg</programlisting>
20799e7bcd65Smrg
20809e7bcd65Smrg<para>
20819e7bcd65SmrgThe <emphasis remap='I'>save_type</emphasis>, <emphasis remap='I'>interact_style</emphasis>, <emphasis remap='I'>shutdown</emphasis>, and <emphasis remap='I'>fast</emphasis>
20829e7bcd65Smrgfields of the token contain the parameters of the
20839e7bcd65Smrg<function>SaveYourself</function>
20849e7bcd65Smrgmessage.
20859e7bcd65SmrgThe possible values of <emphasis remap='I'>save_type</emphasis> are
20869e7bcd65Smrg<function>SmSaveLocal</function>,
20879e7bcd65Smrg<function>SmSaveGlobal</function>,
20889e7bcd65Smrgand
20899e7bcd65Smrg<function>SmSaveBoth</function>;
20909e7bcd65Smrgthese indicate the type of information to be saved.
20919e7bcd65SmrgThe possible values of <emphasis remap='I'>interact_style</emphasis> are
20929e7bcd65Smrg<function>SmInteractStyleNone</function>,
20939e7bcd65Smrg<function>SmInteractStyleErrors</function>,
20949e7bcd65Smrgand
20959e7bcd65Smrg<function>SmInteractStyleAny</function>;
20969e7bcd65Smrgthese indicate whether user interaction would be permitted
20979e7bcd65Smrgand, if so, what kind of interaction.
20989e7bcd65SmrgIf <emphasis remap='I'>shutdown</emphasis> is
20999e7bcd65Smrg<function>True</function>,
21009e7bcd65Smrgthe checkpoint is being performed in preparation for the end of the session.
21019e7bcd65SmrgIf <emphasis remap='I'>fast</emphasis> is
21029e7bcd65Smrg<function>True</function>,
21039e7bcd65Smrgthe client should perform the checkpoint as quickly as possible.
21049e7bcd65SmrgIf <emphasis remap='I'>cancel_shutdown</emphasis> is
21059e7bcd65Smrg<function>True</function>,
21069e7bcd65Smrga
21079e7bcd65Smrg<function>ShutdownCancelled</function>
21080568f49bSmrgmessage has been received for the current save operation.
21099e7bcd65Smrg(See <xref linkend='Resigning_from_a_Session' />.)
21109e7bcd65SmrgThe <emphasis remap='I'>phase</emphasis> is used by manager clients, such as a window manager,
21119e7bcd65Smrgto distinguish between the first and second phase of a save operation.
21129e7bcd65SmrgThe <emphasis remap='I'>phase</emphasis> will be either 1 or 2.
21139e7bcd65SmrgThe remaining fields in the checkpoint token structure are provided for
21149e7bcd65Smrgthe application to communicate with the shell.
21159e7bcd65Smrg</para>
21169e7bcd65Smrg
21179e7bcd65Smrg<para>
21189e7bcd65SmrgUpon entry to the first application save callback procedure, the return
21199e7bcd65Smrgfields in the token have the following initial values:
21209e7bcd65Smrg<emphasis remap='I'>interact_dialog_type</emphasis> is
21219e7bcd65Smrg<function>SmDialogNormal</function>;
21229e7bcd65Smrg<emphasis remap='I'>request_cancel</emphasis> is
21239e7bcd65Smrg<function>False</function>;
21249e7bcd65Smrg<emphasis remap='I'>request_next_phase</emphasis> is
21259e7bcd65Smrg<function>False</function>;
21269e7bcd65Smrgand <emphasis remap='I'>save_success</emphasis> is
21279e7bcd65Smrg<function>True</function>.
21289e7bcd65SmrgWhen a token is returned with any of the four return fields containing
21299e7bcd65Smrga noninitial value, and when the field is applicable, subsequent tokens
21309e7bcd65Smrgpassed to the application during the current save operation
21319e7bcd65Smrgwill always contain the noninitial value.
21329e7bcd65Smrg</para>
21339e7bcd65Smrg
21349e7bcd65Smrg<para>
21359e7bcd65SmrgThe purpose of the token's <emphasis remap='I'>save_success</emphasis> field is to
21369e7bcd65Smrgindicate the outcome of the entire operation to the
21379e7bcd65Smrgsession manager and ultimately, to the user.
21389e7bcd65SmrgReturning
21399e7bcd65Smrg<function>False</function>
21409e7bcd65Smrgindicates some portion of the application state
21419e7bcd65Smrgcould not be successfully saved.  If any token is returned
21429e7bcd65Smrgto the shell with <emphasis remap='I'>save_success</emphasis>
21439e7bcd65Smrg<function>False</function>,
21449e7bcd65Smrgtokens subsequently received
21459e7bcd65Smrgby the application for the current save operation will show
21469e7bcd65Smrg<emphasis remap='I'>save_success</emphasis> as
21479e7bcd65Smrg<function>False</function>.
21489e7bcd65SmrgWhen the shell sends the final status of the checkpoint to the
21499e7bcd65Smrgsession manager, it will indicate failure to save application state
21509e7bcd65Smrgif any token was returned with <emphasis remap='I'>save_success</emphasis>
21519e7bcd65Smrg<function>False</function>.
21529e7bcd65Smrg</para>
21539e7bcd65Smrg
21549e7bcd65Smrg<para>
21559e7bcd65SmrgSession participants that manage and save the state of other clients
21569e7bcd65Smrgshould structure their save or interact callbacks to
21579e7bcd65Smrgset <emphasis remap='I'>request_next_phase</emphasis> to
21589e7bcd65Smrg<function>True</function>
21599e7bcd65Smrgwhen phase is 1, which will cause the shell to send the
21609e7bcd65Smrg<function>SaveYourselfPhase2Request</function>
21619e7bcd65Smrgwhen the first phase is complete.  When the
21629e7bcd65Smrg<function>SaveYourselfPhase2</function>
21639e7bcd65Smrgmessage is received, the shell will invoke the save callbacks a
21649e7bcd65Smrgsecond time with <emphasis remap='I'>phase</emphasis> equal to 2.
21659e7bcd65SmrgManager clients should save the state of other clients
21669e7bcd65Smrgwhen the callbacks are invoked the second time and <emphasis remap='I'>phase</emphasis> equal to 2.
21679e7bcd65Smrg</para>
21689e7bcd65Smrg
21699e7bcd65Smrg<para>
21709e7bcd65SmrgThe application may request additional tokens while a checkpoint is under way,
21719e7bcd65Smrgand these additional tokens must be returned by an explicit call.
21729e7bcd65Smrg</para>
21739e7bcd65Smrg
21749e7bcd65Smrg<para>
21759e7bcd65SmrgTo request an additional token for a save callback response that has a
21769e7bcd65Smrgdeferred outcome, use
21779e7bcd65Smrg<xref linkend='XtSessionGetToken' xrefstyle='select: title'/>.
21789e7bcd65Smrg</para>
21799e7bcd65Smrg
21809e7bcd65Smrg<funcsynopsis id='XtSessionGetToken'>
21819e7bcd65Smrg<funcprototype>
21829e7bcd65Smrg<funcdef>XtCheckpointToken <function>XtSessionGetToken</function></funcdef>
21839e7bcd65Smrg   <paramdef>Widget <parameter>widget</parameter></paramdef>
21849e7bcd65Smrg</funcprototype>
21859e7bcd65Smrg</funcsynopsis>
21869e7bcd65Smrg
21879e7bcd65Smrg<variablelist>
21889e7bcd65Smrg  <varlistentry>
21899e7bcd65Smrg    <term>
21909e7bcd65Smrg      <emphasis remap='I'>widget</emphasis>
21919e7bcd65Smrg    </term>
21929e7bcd65Smrg    <listitem>
21939e7bcd65Smrg      <para>
21949e7bcd65SmrgSpecifies the Session shell widget which manages session participation.
21959e7bcd65Smrg    </para>
21969e7bcd65Smrg  </listitem>
21979e7bcd65Smrg  </varlistentry>
21989e7bcd65Smrg</variablelist>
21999e7bcd65Smrg
22009e7bcd65Smrg
22019e7bcd65Smrg<para>
22029e7bcd65SmrgThe
22039e7bcd65Smrg<xref linkend='XtSessionGetToken' xrefstyle='select: title'/>
22049e7bcd65Smrgfunction will return NULL if no checkpoint operation is currently under way.
22059e7bcd65Smrg</para>
22069e7bcd65Smrg
22079e7bcd65Smrg<para>
22089e7bcd65SmrgTo indicate the completion of checkpoint processing including user
22099e7bcd65Smrginteraction, the application must signal the Session shell
22109e7bcd65Smrgby returning all tokens.
22110568f49bSmrg(See <xref linkend='Interacting_with_the_User_during_a_Checkpoint' /> and
22129e7bcd65Smrg<xref linkend='Completing_a_Save' />).
22139e7bcd65SmrgTo return a token, use
22149e7bcd65Smrg<xref linkend='XtSessionReturnToken' xrefstyle='select: title'/>.
22159e7bcd65Smrg</para>
22169e7bcd65Smrg
22179e7bcd65Smrg<funcsynopsis id='XtSessionReturnToken'>
22189e7bcd65Smrg<funcprototype>
22199e7bcd65Smrg<funcdef>void <function>XtSessionReturnToken</function></funcdef>
22209e7bcd65Smrg   <paramdef>XtCheckpointToken <parameter>token</parameter></paramdef>
22219e7bcd65Smrg</funcprototype>
22229e7bcd65Smrg</funcsynopsis>
22239e7bcd65Smrg
22249e7bcd65Smrg<variablelist>
22259e7bcd65Smrg  <varlistentry>
22269e7bcd65Smrg    <term>
22279e7bcd65Smrg      <emphasis remap='I'>token</emphasis>
22289e7bcd65Smrg    </term>
22299e7bcd65Smrg    <listitem>
22309e7bcd65Smrg      <para>
22319e7bcd65SmrgSpecifies a token that was received as the <emphasis remap='I'>call_data</emphasis> by a procedure
22329e7bcd65Smrgon the interact callback list or a token that was received by a call to
22339e7bcd65Smrg<xref linkend='XtSessionGetToken' xrefstyle='select: title'/>.
22349e7bcd65Smrg    </para>
22359e7bcd65Smrg  </listitem>
22369e7bcd65Smrg  </varlistentry>
22379e7bcd65Smrg</variablelist>
22389e7bcd65Smrg
22399e7bcd65Smrg
22409e7bcd65Smrg<para>
22419e7bcd65SmrgTokens passed as <emphasis remap='I'>call_data</emphasis> to save callbacks are implicitly
22429e7bcd65Smrgreturned when the save callback procedure returns.
22439e7bcd65SmrgA save callback procedure should not call
22449e7bcd65Smrg<xref linkend='XtSessionReturnToken' xrefstyle='select: title'/>
22459e7bcd65Smrgon the token passed in its <emphasis remap='I'>call_data</emphasis>.
22469e7bcd65Smrg</para>
22479e7bcd65Smrg
22489e7bcd65Smrg<sect3 id="Requesting_Interaction">
22499e7bcd65Smrg<title>Requesting Interaction</title>
22509e7bcd65Smrg<para>
22519e7bcd65SmrgWhen the token <emphasis remap='I'>interact_style</emphasis> allows user interaction,
22529e7bcd65Smrgthe application may
22539e7bcd65Smrginteract with the user during the checkpoint, but must wait for permission
22549e7bcd65Smrgto interact.
22559e7bcd65SmrgApplications request permission to interact with the user during the
22569e7bcd65Smrgcheckpointing operation by registering a procedure on the Session
22579e7bcd65Smrgshell's interact callback list.  When all save callback procedures have
22589e7bcd65Smrgreturned, and each time a token that was granted by a call to
22599e7bcd65Smrg<xref linkend='XtSessionGetToken' xrefstyle='select: title'/>
22609e7bcd65Smrgis returned, the Session shell examines the interact callback list.
22619e7bcd65SmrgIf interaction is permitted and the interact callback list is not empty,
22629e7bcd65Smrgthe shell will send an
22639e7bcd65Smrg<function>InteractRequest</function>
22649e7bcd65Smrgto the session manager when an interact request is not already outstanding
22659e7bcd65Smrgfor the application.
22669e7bcd65Smrg</para>
22679e7bcd65Smrg
22689e7bcd65Smrg<para>
22699e7bcd65SmrgThe type of interaction dialog that will be requested is specified by
22709e7bcd65Smrgthe <emphasis remap='I'>interact_dialog_type</emphasis> field in the checkpoint token.
22719e7bcd65SmrgThe possible values for <emphasis remap='I'>interact_dialog_type</emphasis> are
22729e7bcd65Smrg<function>SmDialogError</function>
22739e7bcd65Smrgand
22749e7bcd65Smrg<function>SmDialogNormal</function>.
22759e7bcd65SmrgIf a token is returned with <emphasis remap='I'>interact_dialog_type</emphasis> containing
22769e7bcd65Smrg<function>SmDialogError</function>,
22779e7bcd65Smrgthe interact request and any subsequent interact requests will be for
22789e7bcd65Smrgan error dialog; otherwise, the request will be for a normal dialog with
22799e7bcd65Smrgthe user.
22809e7bcd65Smrg</para>
22819e7bcd65Smrg
22829e7bcd65Smrg<para>
22839e7bcd65SmrgWhen a token is returned with <emphasis remap='I'>save_success</emphasis>
22849e7bcd65Smrg<function>False</function>
22859e7bcd65Smrgor <emphasis remap='I'>interact_dialog_type</emphasis>
22869e7bcd65Smrg<function>SmDialogError</function>,
22879e7bcd65Smrgtokens subsequently passed to callbacks during the same active
22889e7bcd65Smrg<function>SaveYourself</function>
22899e7bcd65Smrgresponse will reflect these changed values, indicating that
22909e7bcd65Smrgan error condition has occurred during the checkpoint.
22919e7bcd65Smrg</para>
22929e7bcd65Smrg
22939e7bcd65Smrg<para>
22949e7bcd65SmrgThe <emphasis remap='I'>request_cancel</emphasis> field is a return value for interact callbacks only.
22959e7bcd65SmrgUpon return from a procedure on the save callback list, the value
22969e7bcd65Smrgof the token's <emphasis remap='I'>request_cancel</emphasis> field is not examined by the shell.
22979e7bcd65SmrgThis is also true of tokens received through a call to
22989e7bcd65Smrg<xref linkend='XtSessionGetToken' xrefstyle='select: title'/>.
22999e7bcd65Smrg</para>
23009e7bcd65Smrg</sect3>
23019e7bcd65Smrg
23029e7bcd65Smrg<sect3 id="Interacting_with_the_User_during_a_Checkpoint">
23039e7bcd65Smrg<title>Interacting with the User during a Checkpoint</title>
23049e7bcd65Smrg<para>
23059e7bcd65SmrgWhen the session manager grants the application's request for user interaction,
23069e7bcd65Smrgthe Session shell receives an
23079e7bcd65Smrg<function>Interact</function>
23089e7bcd65Smrgmessage.
23099e7bcd65SmrgThe procedures registered on the interact callback list are executed,
23109e7bcd65Smrgbut not as if executing a typical callback list.
23119e7bcd65SmrgThese procedures are individually executed in
23129e7bcd65Smrgsequence, with a checkpoint token functioning as the sequencing mechanism.
23139e7bcd65SmrgEach step in the sequence begins by removing a procedure
23149e7bcd65Smrgfrom the interact callback list
23159e7bcd65Smrgand executing it with a token passed in the <emphasis remap='I'>call_data</emphasis>.
23169e7bcd65SmrgThe interact callback will typically pop up a dialog box and return.
23179e7bcd65SmrgWhen the user interaction and associated application checkpointing has
23189e7bcd65Smrgcompleted, the application must return the token by calling
23199e7bcd65Smrg<xref linkend='XtSessionReturnToken' xrefstyle='select: title'/>.
23209e7bcd65SmrgReturning the token completes the current step and triggers the next step
23219e7bcd65Smrgin the sequence.
23229e7bcd65Smrg</para>
23239e7bcd65Smrg
23249e7bcd65Smrg<para>
23259e7bcd65SmrgDuring interaction the client may request cancellation of a shutdown.
23269e7bcd65SmrgWhen a token passed as <emphasis remap='I'>call_data</emphasis> to an interact procedure is returned,
23279e7bcd65Smrgif <emphasis remap='I'>shutdown</emphasis> is
23289e7bcd65Smrg<function>True</function>
23299e7bcd65Smrgand <emphasis remap='I'>cancel_shutdown</emphasis> is
23309e7bcd65Smrg<function>False</function>,
23319e7bcd65Smrg<emphasis remap='I'>request_cancel</emphasis> indicates whether the
23329e7bcd65Smrgapplication requests that the pending shutdown be cancelled.
23339e7bcd65SmrgIf <emphasis remap='I'>request_cancel</emphasis> is
23349e7bcd65Smrg<function>True</function>,
23359e7bcd65Smrgthe field will also be
23369e7bcd65Smrg<function>True</function>
23379e7bcd65Smrgin any tokens subsequently granted during the checkpoint operation.
23389e7bcd65SmrgWhen a token is returned requesting cancellation of
23399e7bcd65Smrgthe session shutdown, pending interact procedures will still be
23409e7bcd65Smrgcalled by the Session shell.
23419e7bcd65SmrgWhen all interact procedures have been removed from the interact callback
23429e7bcd65Smrglist, executed, and the final interact token returned to the shell, an
23439e7bcd65Smrg<function>InteractDone</function>
23449e7bcd65Smrgmessage is sent to the session manager, indicating whether
23459e7bcd65Smrga pending session shutdown is requested to be cancelled.
23469e7bcd65Smrg</para>
23479e7bcd65Smrg</sect3>
23489e7bcd65Smrg
23499e7bcd65Smrg<sect3 id="Responding_to_a_Shutdown_Cancellation">
23509e7bcd65Smrg<title>Responding to a Shutdown Cancellation</title>
23519e7bcd65Smrg<para>
23529e7bcd65SmrgCallbacks registered on the cancel callback list are invoked when the
23539e7bcd65SmrgSession shell processes a
23549e7bcd65Smrg<function>ShutdownCancelled</function>
23559e7bcd65Smrgmessage from the session manager.  This may occur during the
23569e7bcd65Smrgprocessing of save callbacks, while waiting for interact permission,
23579e7bcd65Smrgduring user interaction, or after the save operation is complete and
23589e7bcd65Smrgthe application is expecting a
23599e7bcd65Smrg<function>SaveComplete</function>
23609e7bcd65Smrgor a
23619e7bcd65Smrg<function>Die</function>
23629e7bcd65Smrgmessage.
23639e7bcd65SmrgThe <emphasis remap='I'>call_data</emphasis> for these callbacks is NULL.
23649e7bcd65Smrg</para>
23659e7bcd65Smrg
23669e7bcd65Smrg<para>
23679e7bcd65SmrgWhen the shell notices that a pending shutdown has been cancelled,
23689e7bcd65Smrgthe token <emphasis remap='I'>cancel_shutdown</emphasis> field will be
23699e7bcd65Smrg<function>True</function>
23709e7bcd65Smrgin tokens subsequently given to the application.
23719e7bcd65Smrg</para>
23729e7bcd65Smrg
23739e7bcd65Smrg<para>
23749e7bcd65SmrgReceiving notice of a shutdown cancellation does not cancel the
23759e7bcd65Smrgpending execution of save callbacks or interact callbacks.
23769e7bcd65SmrgAfter the cancel callbacks execute, if <emphasis remap='I'>interact_style</emphasis> is not
23779e7bcd65Smrg<function>SmInteractStyleNone</function>
23789e7bcd65Smrgand the interact list is not empty,
23799e7bcd65Smrgthe procedures on the interact callback list will be executed
23809e7bcd65Smrgand passed a token with <emphasis remap='I'>interact_style</emphasis>
23819e7bcd65Smrg<function>SmInteractStyleNone</function>.
23829e7bcd65SmrgThe application should not interact with the user, and the Session shell
23839e7bcd65Smrgwill not send an
23849e7bcd65Smrg<function>InteractDone</function>
23859e7bcd65Smrgmessage.
23869e7bcd65Smrg</para>
23879e7bcd65Smrg</sect3>
23889e7bcd65Smrg
23899e7bcd65Smrg<sect3 id="Completing_a_Save">
23909e7bcd65Smrg<title>Completing a Save</title>
23919e7bcd65Smrg<para>
23929e7bcd65SmrgWhen there is no user interaction, the shell regards the application
23939e7bcd65Smrgas having finished saving state when all callback procedures
23949e7bcd65Smrgon the save callback list have returned, and any additional tokens
23959e7bcd65Smrgpassed out by
23969e7bcd65Smrg<xref linkend='XtSessionGetToken' xrefstyle='select: title'/>
23979e7bcd65Smrghave been returned by corresponding calls to
23989e7bcd65Smrg<xref linkend='XtSessionReturnToken' xrefstyle='select: title'/>.
23999e7bcd65SmrgIf the save operation involved user interaction,
24009e7bcd65Smrgthe above completion conditions apply, and in addition, all requests for
24019e7bcd65Smrginteraction have been granted or cancelled,
24029e7bcd65Smrgand all tokens passed to interact callbacks have been returned
24039e7bcd65Smrgthrough calls to
24049e7bcd65Smrg<xref linkend='XtSessionReturnToken' xrefstyle='select: title'/>.
24059e7bcd65SmrgIf the save operation involved a manager client that requested the
24069e7bcd65Smrgsecond phase, the above conditions apply to both the first and second
24079e7bcd65Smrgphase of the save operation.
24089e7bcd65Smrg</para>
24099e7bcd65Smrg
24109e7bcd65Smrg<para>
24119e7bcd65SmrgWhen the application has finished saving state,
24129e7bcd65Smrgthe Session shell will report the result to the session manager by
24139e7bcd65Smrgsending the
24149e7bcd65Smrg<function>SaveYourselfDone</function>
24159e7bcd65Smrgmessage.
24169e7bcd65SmrgIf the session is continuing, the shell will receive the
24179e7bcd65Smrg<function>SaveComplete</function>
24189e7bcd65Smrgmessage when all applications have completed saving state.
24199e7bcd65SmrgThis message indicates that applications may again allow changes
24209e7bcd65Smrgto their state.  The shell will execute the save_complete callbacks.
24219e7bcd65SmrgThe <emphasis remap='I'>call_data</emphasis> for these callbacks is NULL.
24229e7bcd65Smrg</para>
24239e7bcd65Smrg</sect3>
24249e7bcd65Smrg</sect2>
24259e7bcd65Smrg
24269e7bcd65Smrg<sect2 id="Responding_to_a_Shutdown">
24279e7bcd65Smrg<title>Responding to a Shutdown</title>
24289e7bcd65Smrg<para>
24299e7bcd65SmrgCallbacks registered on the die callback list are invoked when the
24309e7bcd65Smrgsession manager sends a
24319e7bcd65Smrg<function>Die</function>
24329e7bcd65Smrgmessage.
24339e7bcd65SmrgThe callbacks on this list should do whatever is appropriate to quit
24349e7bcd65Smrgthe application.
24359e7bcd65SmrgBefore executing procedures on the die callback list,
24369e7bcd65Smrgthe Session shell will close the connection to the session manager
24379e7bcd65Smrgand will remove the handler that watches for protocol messages.
24389e7bcd65SmrgThe <emphasis remap='I'>call_data</emphasis> for these callbacks is NULL.
24399e7bcd65Smrg</para>
24409e7bcd65Smrg</sect2>
24419e7bcd65Smrg
24429e7bcd65Smrg<sect2 id="Resigning_from_a_Session">
24439e7bcd65Smrg<title>Resigning from a Session</title>
24449e7bcd65Smrg<para>
24459e7bcd65SmrgWhen the Session shell widget is destroyed, the destroy method will
24469e7bcd65Smrgclose the connection to the session manager by sending a
24479e7bcd65Smrg<function>ConnectionClosed</function>
24489e7bcd65Smrgprotocol message and will remove the input callback
24499e7bcd65Smrgthat was watching for session protocol messages.
24509e7bcd65Smrg</para>
24519e7bcd65Smrg
24529e7bcd65Smrg<para>
24539e7bcd65SmrgWhen
24549e7bcd65Smrg<xref linkend='XtSetValues' xrefstyle='select: title'/>
24559e7bcd65Smrgis used to set <emphasis remap='I'>join_session</emphasis> to
24569e7bcd65Smrg<function>False</function>,
24579e7bcd65Smrgthe set_values method of the Session shell will close the
24589e7bcd65Smrgconnection to the session manager if one exists by sending a
24599e7bcd65Smrg<function>ConnectionClosed</function>
24609e7bcd65Smrgmessage, and <emphasis remap='I'>connection</emphasis> will be set to NULL.
24619e7bcd65Smrg</para>
24629e7bcd65Smrg
24639e7bcd65Smrg<para>
24649e7bcd65SmrgApplications that exit in response to user actions and that do not
24659e7bcd65Smrgwait for phase 2 destroy to complete on
24669e7bcd65Smrgthe Session shell should set <emphasis remap='I'>join_session</emphasis> to
24679e7bcd65Smrg<function>False</function>
24689e7bcd65Smrgbefore exiting.
24699e7bcd65Smrg</para>
24709e7bcd65Smrg
24719e7bcd65Smrg<para>
24729e7bcd65SmrgWhen
24739e7bcd65Smrg<xref linkend='XtSetValues' xrefstyle='select: title'/>
24749e7bcd65Smrgis used to set <emphasis remap='I'>connection</emphasis> to NULL,
24759e7bcd65Smrgthe Session shell will stop managing the connection, if one exists.
24769e7bcd65SmrgHowever, that session connection will not be closed.
24779e7bcd65Smrg</para>
24789e7bcd65Smrg
24799e7bcd65Smrg<para>
24809e7bcd65SmrgApplications that wish to ensure continuation of a session connection
24819e7bcd65Smrgbeyond the destruction of the shell should first retrieve the
24829e7bcd65Smrg<emphasis remap='I'>connection</emphasis> resource value,
24839e7bcd65Smrgthen set the <emphasis remap='I'>connection</emphasis> resource to NULL,
24849e7bcd65Smrgand then they may safely destroy the widget without losing control
24859e7bcd65Smrgof the session connection.
24869e7bcd65Smrg</para>
24879e7bcd65Smrg
24889e7bcd65Smrg<para>
24899e7bcd65SmrgThe error callback list will be called if an unrecoverable
24909e7bcd65Smrgcommunications error occurs while the shell is managing the connection.
24919e7bcd65SmrgThe shell will close the connection, set <emphasis remap='I'>connection</emphasis> to NULL,
24929e7bcd65Smrgremove the input callback, and
24939e7bcd65Smrgcall the procedures registered on the error callback list.
24949e7bcd65SmrgThe <emphasis remap='I'>call_data</emphasis> for these callbacks is NULL.
24959e7bcd65Smrg</para>
24969e7bcd65Smrg</sect2>
24979e7bcd65Smrg</sect1>
24989e7bcd65Smrg</chapter>
2499