home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / include / x11 / shellp.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-10-17  |  12.6 KB  |  430 lines

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