Home | History | Annotate | Line # | Download | only in X11
      1 /***********************************************************
      2 
      3 Copyright 1987, 1988, 1994, 1998  The Open Group
      4 
      5 Permission to use, copy, modify, distribute, and sell this software and its
      6 documentation for any purpose is hereby granted without fee, provided that
      7 the above copyright notice appear in all copies and that both that
      8 copyright notice and this permission notice appear in supporting
      9 documentation.
     10 
     11 The above copyright notice and this permission notice shall be included in
     12 all copies or substantial portions of the Software.
     13 
     14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     15 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     16 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
     17 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
     18 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
     19 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     20 
     21 Except as contained in this notice, the name of The Open Group shall not be
     22 used in advertising or otherwise to promote the sale, use or other dealings
     23 in this Software without prior written authorization from The Open Group.
     24 
     25 
     26 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
     27 
     28                         All Rights Reserved
     29 
     30 Permission to use, copy, modify, and distribute this software and its
     31 documentation for any purpose and without fee is hereby granted,
     32 provided that the above copyright notice appear in all copies and that
     33 both that copyright notice and this permission notice appear in
     34 supporting documentation, and that the name of Digital not be
     35 used in advertising or publicity pertaining to distribution of the
     36 software without specific, written prior permission.
     37 
     38 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
     39 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
     40 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
     41 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
     42 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
     43 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
     44 SOFTWARE.
     45 
     46 ******************************************************************/
     47 
     48 /*
     49  * ShellP.h - Private definitions for Shell widget
     50  *
     51  * Author:	Paul Asente
     52  * 		Digital Equipment Corporation
     53  * 		Western Software Laboratory
     54  * Date:	Thu Dec 3, 1987
     55  */
     56 
     57 #ifndef _XtShellPrivate_h
     58 #define _XtShellPrivate_h
     59 
     60 #include <X11/Shell.h>
     61 
     62 /* *****
     63  * ***** VendorP.h is included later on; it needs fields defined in the first
     64  * ***** part of this header file
     65  * *****
     66  */
     67 
     68 _XFUNCPROTOBEGIN
     69 
     70 /***********************************************************************
     71  *
     72  * Shell Widget Private Data
     73  *
     74  ***********************************************************************/
     75 
     76 /* New fields for the Shell widget class record */
     77 
     78 typedef struct {
     79     XtPointer       extension;          /* pointer to extension record      */
     80 } ShellClassPart;
     81 
     82 typedef struct {
     83     XtPointer next_extension;	/* 1st 4 mandated for all extension records */
     84     XrmQuark record_type;	/* NULLQUARK; on ShellClassPart */
     85     long version;		/* must be XtShellExtensionVersion */
     86     Cardinal record_size;	/* sizeof(ShellClassExtensionRec) */
     87     XtGeometryHandler root_geometry_manager;
     88 } ShellClassExtensionRec, *ShellClassExtension;
     89 
     90 #define XtShellExtensionVersion 1L
     91 #define XtInheritRootGeometryManager ((XtGeometryHandler)_XtInherit)
     92 
     93 typedef struct _ShellClassRec {
     94   	CoreClassPart      core_class;
     95 	CompositeClassPart composite_class;
     96 	ShellClassPart  shell_class;
     97 } ShellClassRec;
     98 
     99 externalref ShellClassRec shellClassRec;
    100 
    101 /* New fields for the shell widget */
    102 
    103 typedef struct {
    104 	char       *geometry;
    105 	XtCreatePopupChildProc	create_popup_child_proc;
    106 	XtGrabKind	grab_kind;
    107 	Boolean	    spring_loaded;
    108 	Boolean	    popped_up;
    109 	Boolean	    allow_shell_resize;
    110 	Boolean     client_specified; /* re-using old name */
    111 #define _XtShellPositionValid	((Boolean)(1<<0))
    112 #define _XtShellNotReparented	((Boolean)(1<<1))
    113 #define _XtShellPPositionOK	((Boolean)(1<<2))
    114 #define _XtShellGeometryParsed	((Boolean)(1<<3))
    115 	Boolean	    save_under;
    116 	Boolean	    override_redirect;
    117 
    118 	XtCallbackList popup_callback;
    119 	XtCallbackList popdown_callback;
    120 	Visual*     visual;
    121 } ShellPart;
    122 
    123 typedef  struct {
    124 	CorePart 	core;
    125 	CompositePart 	composite;
    126 	ShellPart 	shell;
    127 } ShellRec, *ShellWidget;
    128 
    129 /***********************************************************************
    130  *
    131  * OverrideShell Widget Private Data
    132  *
    133  ***********************************************************************/
    134 
    135 /* New fields for the OverrideShell widget class record */
    136 
    137 typedef struct {
    138     XtPointer       extension;          /* pointer to extension record      */
    139 } OverrideShellClassPart;
    140 
    141 typedef struct _OverrideShellClassRec {
    142   	CoreClassPart      core_class;
    143 	CompositeClassPart composite_class;
    144 	ShellClassPart  shell_class;
    145 	OverrideShellClassPart  override_shell_class;
    146 } OverrideShellClassRec;
    147 
    148 externalref OverrideShellClassRec overrideShellClassRec;
    149 
    150 /* No new fields for the override shell widget */
    151 
    152 typedef struct {int frabjous;} OverrideShellPart;
    153 
    154 typedef  struct {
    155 	CorePart 	core;
    156 	CompositePart 	composite;
    157 	ShellPart 	shell;
    158 	OverrideShellPart override;
    159 } OverrideShellRec, *OverrideShellWidget;
    160 
    161 /***********************************************************************
    162  *
    163  * WMShell Widget Private Data
    164  *
    165  ***********************************************************************/
    166 
    167 /* New fields for the WMShell widget class record */
    168 
    169 typedef struct {
    170     XtPointer       extension;          /* pointer to extension record      */
    171 } WMShellClassPart;
    172 
    173 typedef struct _WMShellClassRec {
    174   	CoreClassPart      core_class;
    175 	CompositeClassPart composite_class;
    176 	ShellClassPart  shell_class;
    177 	WMShellClassPart wm_shell_class;
    178 } WMShellClassRec;
    179 
    180 externalref WMShellClassRec wmShellClassRec;
    181 
    182 /* New fields for the WM shell widget */
    183 
    184 typedef struct {
    185 	char	   *title;
    186 	int 	    wm_timeout;
    187 	Boolean	    wait_for_wm;
    188 	Boolean	    transient;
    189 	Boolean     urgency;
    190 	Widget      client_leader;
    191 	String      window_role;
    192 	struct _OldXSizeHints {	/* pre-R4 Xlib structure */
    193 	    long flags;
    194 	    int x, y;
    195 	    int width, height;
    196 	    int min_width, min_height;
    197 	    int max_width, max_height;
    198 	    int width_inc, height_inc;
    199 	    struct {
    200 		    int x;
    201 		    int y;
    202 	    } min_aspect, max_aspect;
    203 	} size_hints;
    204 	XWMHints    wm_hints;
    205 	int base_width, base_height;
    206 	int win_gravity;
    207 	Atom title_encoding;
    208 } WMShellPart;
    209 
    210 typedef  struct {
    211 	CorePart 	core;
    212 	CompositePart 	composite;
    213 	ShellPart 	shell;
    214 	WMShellPart	wm;
    215 } WMShellRec, *WMShellWidget;
    216 
    217 _XFUNCPROTOEND
    218 
    219 #include <X11/VendorP.h>
    220 
    221 _XFUNCPROTOBEGIN
    222 
    223 /***********************************************************************
    224  *
    225  * TransientShell Widget Private Data
    226  *
    227  ***********************************************************************/
    228 
    229 /* New fields for the TransientShell widget class record */
    230 
    231 typedef struct {
    232     XtPointer       extension;          /* pointer to extension record      */
    233 } TransientShellClassPart;
    234 
    235 typedef struct _TransientShellClassRec {
    236   	CoreClassPart      core_class;
    237 	CompositeClassPart composite_class;
    238 	ShellClassPart  shell_class;
    239 	WMShellClassPart   wm_shell_class;
    240 	VendorShellClassPart vendor_shell_class;
    241 	TransientShellClassPart transient_shell_class;
    242 } TransientShellClassRec;
    243 
    244 externalref TransientShellClassRec transientShellClassRec;
    245 
    246 /* New fields for the transient shell widget */
    247 
    248 typedef struct {
    249 	Widget transient_for;
    250 } TransientShellPart;
    251 
    252 typedef  struct {
    253 	CorePart 	core;
    254 	CompositePart 	composite;
    255 	ShellPart 	shell;
    256 	WMShellPart	wm;
    257 	VendorShellPart	vendor;
    258 	TransientShellPart transient;
    259 } TransientShellRec, *TransientShellWidget;
    260 
    261 /***********************************************************************
    262  *
    263  * TopLevelShell Widget Private Data
    264  *
    265  ***********************************************************************/
    266 
    267 /* New fields for the TopLevelShell widget class record */
    268 
    269 typedef struct {
    270     XtPointer       extension;          /* pointer to extension record      */
    271 } TopLevelShellClassPart;
    272 
    273 typedef struct _TopLevelShellClassRec {
    274   	CoreClassPart      core_class;
    275 	CompositeClassPart composite_class;
    276 	ShellClassPart  shell_class;
    277 	WMShellClassPart   wm_shell_class;
    278 	VendorShellClassPart vendor_shell_class;
    279 	TopLevelShellClassPart top_level_shell_class;
    280 } TopLevelShellClassRec;
    281 
    282 externalref TopLevelShellClassRec topLevelShellClassRec;
    283 
    284 /* New fields for the top level shell widget */
    285 
    286 typedef struct {
    287 	char	   *icon_name;
    288 	Boolean	    iconic;
    289 	Atom	    icon_name_encoding;
    290 } TopLevelShellPart;
    291 
    292 typedef  struct {
    293 	CorePart 	core;
    294 	CompositePart 	composite;
    295 	ShellPart 	shell;
    296 	WMShellPart	wm;
    297 	VendorShellPart	vendor;
    298 	TopLevelShellPart topLevel;
    299 } TopLevelShellRec, *TopLevelShellWidget;
    300 
    301 /***********************************************************************
    302  *
    303  * ApplicationShell Widget Private Data
    304  *
    305  ***********************************************************************/
    306 
    307 /* New fields for the ApplicationShell widget class record */
    308 
    309 typedef struct {
    310     XtPointer       extension;          /* pointer to extension record      */
    311 } ApplicationShellClassPart;
    312 
    313 typedef struct _ApplicationShellClassRec {
    314   	CoreClassPart      core_class;
    315 	CompositeClassPart composite_class;
    316 	ShellClassPart  shell_class;
    317 	WMShellClassPart   wm_shell_class;
    318 	VendorShellClassPart vendor_shell_class;
    319 	TopLevelShellClassPart top_level_shell_class;
    320 	ApplicationShellClassPart application_shell_class;
    321 } ApplicationShellClassRec;
    322 
    323 externalref ApplicationShellClassRec applicationShellClassRec;
    324 
    325 /* New fields for the application shell widget */
    326 
    327 typedef struct {
    328 #if defined(__cplusplus) || defined(c_plusplus)
    329     char *c_class;
    330 #else
    331     char *class;
    332 #endif
    333     XrmClass xrm_class;
    334     int argc;
    335     _XtString *argv;
    336 } ApplicationShellPart;
    337 
    338 typedef  struct {
    339 	CorePart 	core;
    340 	CompositePart 	composite;
    341 	ShellPart 	shell;
    342 	WMShellPart	wm;
    343 	VendorShellPart	vendor;
    344 	TopLevelShellPart topLevel;
    345 	ApplicationShellPart application;
    346 } ApplicationShellRec, *ApplicationShellWidget;
    347 
    348 /***********************************************************************
    349  *
    350  * SessionShell Widget Private Data
    351  *
    352  ***********************************************************************/
    353 
    354 /* New fields for the SessionShell widget class record */
    355 
    356 typedef struct {
    357     XtPointer       extension;          /* pointer to extension record */
    358 } SessionShellClassPart;
    359 
    360 typedef struct _SessionShellClassRec {
    361   	CoreClassPart      core_class;
    362 	CompositeClassPart composite_class;
    363 	ShellClassPart  shell_class;
    364 	WMShellClassPart   wm_shell_class;
    365 	VendorShellClassPart vendor_shell_class;
    366 	TopLevelShellClassPart top_level_shell_class;
    367 	ApplicationShellClassPart application_shell_class;
    368 	SessionShellClassPart session_shell_class;
    369 } SessionShellClassRec;
    370 
    371 externalref SessionShellClassRec sessionShellClassRec;
    372 
    373 typedef struct _XtSaveYourselfRec *XtSaveYourself; /* implementation-private */
    374 
    375 /* New fields for the session shell widget */
    376 
    377 typedef struct {
    378     SmcConn         connection;
    379     _XtString       session_id;
    380     _XtString*      restart_command;
    381     _XtString*      clone_command;
    382     _XtString*      discard_command;
    383     _XtString*      resign_command;
    384     _XtString*      shutdown_command;
    385     _XtString*      environment;
    386     _XtString       current_dir;
    387     String          program_path;
    388     unsigned char   restart_style;
    389     unsigned char   checkpoint_state;
    390     Boolean         join_session;
    391     XtCallbackList  save_callbacks;
    392     XtCallbackList  interact_callbacks;
    393     XtCallbackList  cancel_callbacks;
    394     XtCallbackList  save_complete_callbacks;
    395     XtCallbackList  die_callbacks;
    396     XtCallbackList  error_callbacks;
    397     XtSaveYourself  save;
    398     XtInputId       input_id;
    399     XtPointer       ses20;
    400     XtPointer       ses19;
    401     XtPointer       ses18;
    402     XtPointer       ses17;
    403     XtPointer       ses16;
    404     XtPointer       ses15;
    405     XtPointer       ses14;
    406     XtPointer       ses13;
    407     XtPointer       ses12;
    408     XtPointer       ses11;
    409     XtPointer       ses10;
    410     XtPointer       ses9;
    411     XtPointer       ses8;
    412     XtPointer       ses7;
    413     XtPointer       ses6;
    414     XtPointer       ses5;
    415     XtPointer       ses4;
    416     XtPointer       ses3;
    417     XtPointer       ses2;
    418     XtPointer       ses1;
    419 } SessionShellPart;
    420 
    421 typedef  struct {
    422 	CorePart 	core;
    423 	CompositePart 	composite;
    424 	ShellPart 	shell;
    425 	WMShellPart	wm;
    426 	VendorShellPart	vendor;
    427 	TopLevelShellPart topLevel;
    428 	ApplicationShellPart application;
    429 	SessionShellPart session;
    430 } SessionShellRec, *SessionShellWidget;
    431 
    432 _XFUNCPROTOEND
    433 
    434 #endif /* _XtShellPrivate_h */
    435