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

  1. /* $XConsortium: ObjectP.h,v 1.14 94/04/17 20:14:32 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. #ifndef _Xt_ObjectP_h_
  52. #define _Xt_ObjectP_h_
  53.  
  54. #include <X11/Object.h>
  55.  
  56. /**********************************************************
  57.  * Object Instance Data Structures
  58.  *
  59.  **********************************************************/
  60. /* these fields match CorePart and can not be changed */
  61.  
  62. typedef struct _ObjectPart {
  63.     Widget          self;               /* pointer to widget itself          */
  64.     WidgetClass     widget_class;       /* pointer to Widget's ClassRec      */
  65.     Widget          parent;             /* parent widget                     */
  66.     XrmName         xrm_name;           /* widget resource name quarkified   */
  67.     Boolean         being_destroyed;    /* marked for destroy                */
  68.     XtCallbackList  destroy_callbacks;  /* who to call when widget destroyed */
  69.     XtPointer       constraints;        /* constraint record                 */
  70. } ObjectPart;
  71.  
  72. typedef struct _ObjectRec {
  73.     ObjectPart  object;
  74. } ObjectRec;
  75.  
  76. /********************************************************
  77.  * Object Class Data Structures
  78.  *
  79.  ********************************************************/
  80. /* these fields match CoreClassPart and can not be changed */
  81. /* ideally these structures would only contain the fields required;
  82.    but because the CoreClassPart cannot be changed at this late date
  83.    extraneous fields are necessary to make the field offsets match */
  84.  
  85. typedef struct _ObjectClassPart {
  86.  
  87.     WidgetClass     superclass;         /* pointer to superclass ClassRec   */
  88.     String          class_name;         /* widget resource class name       */
  89.     Cardinal        widget_size;        /* size in bytes of widget record   */
  90.     XtProc          class_initialize;   /* class initialization proc        */
  91.     XtWidgetClassProc class_part_initialize; /* dynamic initialization      */
  92.     XtEnum          class_inited;       /* has class been initialized?      */
  93.     XtInitProc      initialize;         /* initialize subclass fields       */
  94.     XtArgsProc      initialize_hook;    /* notify that initialize called    */
  95.     XtProc          obj1;        /* NULL                             */
  96.     XtPointer       obj2;               /* NULL                             */
  97.     Cardinal        obj3;               /* NULL                             */
  98.     XtResourceList  resources;          /* resources for subclass fields    */
  99.     Cardinal        num_resources;      /* number of entries in resources   */
  100.     XrmClass        xrm_class;          /* resource class quarkified        */
  101.     Boolean         obj4;               /* NULL                             */
  102.     XtEnum          obj5;               /* NULL                             */
  103.     Boolean         obj6;               /* NULL                    */
  104.     Boolean         obj7;               /* NULL                             */
  105.     XtWidgetProc    destroy;            /* free data for subclass pointers  */
  106.     XtProc          obj8;               /* NULL                             */
  107.     XtProc          obj9;               /* NULL                        */
  108.     XtSetValuesFunc set_values;         /* set subclass resource values     */
  109.     XtArgsFunc      set_values_hook;    /* notify that set_values called    */
  110.     XtProc          obj10;              /* NULL                             */
  111.     XtArgsProc      get_values_hook;    /* notify that get_values called    */
  112.     XtProc          obj11;              /* NULL                             */
  113.     XtVersionType   version;            /* version of intrinsics used       */
  114.     XtPointer       callback_private;   /* list of callback offsets         */
  115.     String          obj12;              /* NULL                             */
  116.     XtProc          obj13;              /* NULL                             */
  117.     XtProc          obj14;              /* NULL                             */
  118.     XtPointer       extension;          /* pointer to extension record      */
  119. }ObjectClassPart;
  120.  
  121. typedef struct {
  122.     XtPointer next_extension;    /* 1st 4 required for all extension records */
  123.     XrmQuark record_type;    /* NULLQUARK; when on ObjectClassPart */
  124.     long version;        /* must be XtObjectExtensionVersion */
  125.     Cardinal record_size;    /* sizeof(ObjectClassExtensionRec) */
  126.     XtAllocateProc allocate;
  127.     XtDeallocateProc deallocate;
  128. } ObjectClassExtensionRec, *ObjectClassExtension;
  129.  
  130. typedef struct _ObjectClassRec {
  131.     ObjectClassPart object_class;
  132. } ObjectClassRec;
  133.  
  134. externalref ObjectClassRec objectClassRec;
  135.  
  136. #define XtObjectExtensionVersion 1L
  137. #define XtInheritAllocate ((XtAllocateProc) _XtInherit)
  138. #define XtInheritDeallocate ((XtDeallocateProc) _XtInherit)
  139.  
  140. #endif /*_Xt_ObjectP_h_*/
  141.