CoreP.h revision 2265a131
1/* 2* $Xorg: CoreP.h,v 1.4 2001/02/09 02:03:54 xorgcvs Exp $ 3* $oHeader: CoreP.h,v 1.2 88/08/18 15:54:37 asente Exp $ 4*/ 5 6/*********************************************************** 7 8Copyright 1987, 1988, 1998 The Open Group 9 10Permission to use, copy, modify, distribute, and sell this software and its 11documentation for any purpose is hereby granted without fee, provided that 12the above copyright notice appear in all copies and that both that 13copyright notice and this permission notice appear in supporting 14documentation. 15 16The above copyright notice and this permission notice shall be included in 17all copies or substantial portions of the Software. 18 19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 23AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 24CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 26Except as contained in this notice, the name of The Open Group shall not be 27used in advertising or otherwise to promote the sale, use or other dealings 28in this Software without prior written authorization from The Open Group. 29 30 31Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts. 32 33 All Rights Reserved 34 35Permission to use, copy, modify, and distribute this software and its 36documentation for any purpose and without fee is hereby granted, 37provided that the above copyright notice appear in all copies and that 38both that copyright notice and this permission notice appear in 39supporting documentation, and that the name of Digital not be 40used in advertising or publicity pertaining to distribution of the 41software without specific, written prior permission. 42 43DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 44ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 45DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 46ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 47WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 48ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 49SOFTWARE. 50 51******************************************************************/ 52 53#ifndef XtCoreP_h 54#define XtCoreP_h 55 56#include <X11/Core.h> 57 58_XFUNCPROTOBEGIN 59 60externalref int _XtInheritTranslations; 61 62#define XtInheritTranslations ((String) &_XtInheritTranslations) 63#define XtInheritRealize ((XtRealizeProc) _XtInherit) 64#define XtInheritResize ((XtWidgetProc) _XtInherit) 65#define XtInheritExpose ((XtExposeProc) _XtInherit) 66#define XtInheritSetValuesAlmost ((XtAlmostProc) _XtInherit) 67#define XtInheritAcceptFocus ((XtAcceptFocusProc) _XtInherit) 68#define XtInheritQueryGeometry ((XtGeometryHandler) _XtInherit) 69#define XtInheritDisplayAccelerator ((XtStringProc) _XtInherit) 70 71/*************************************************************** 72 * Widget Core Data Structures 73 * 74 * 75 **************************************************************/ 76 77typedef struct _CorePart { 78 Widget self; /* pointer to widget itself */ 79 WidgetClass widget_class; /* pointer to Widget's ClassRec */ 80 Widget parent; /* parent widget */ 81 XrmName xrm_name; /* widget resource name quarkified */ 82 Boolean being_destroyed; /* marked for destroy */ 83 XtCallbackList destroy_callbacks; /* who to call when widget destroyed */ 84 XtPointer constraints; /* constraint record */ 85 Position x, y; /* window position */ 86 Dimension width, height; /* window dimensions */ 87 Dimension border_width; /* window border width */ 88 Boolean managed; /* is widget geometry managed? */ 89 Boolean sensitive; /* is widget sensitive to user events*/ 90 Boolean ancestor_sensitive; /* are all ancestors sensitive? */ 91 XtEventTable event_table; /* private to event dispatcher */ 92 XtTMRec tm; /* translation management */ 93 XtTranslations accelerators; /* accelerator translations */ 94 Pixel border_pixel; /* window border pixel */ 95 Pixmap border_pixmap; /* window border pixmap or NULL */ 96 WidgetList popup_list; /* list of popups */ 97 Cardinal num_popups; /* how many popups */ 98 String name; /* widget resource name */ 99 Screen *screen; /* window's screen */ 100 Colormap colormap; /* colormap */ 101 Window window; /* window ID */ 102 Cardinal depth; /* number of planes in window */ 103 Pixel background_pixel; /* window background pixel */ 104 Pixmap background_pixmap; /* window background pixmap or NULL */ 105 Boolean visible; /* is window mapped and not occluded?*/ 106 Boolean mapped_when_managed;/* map window if it's managed? */ 107} CorePart; 108 109typedef struct _WidgetRec { 110 CorePart core; 111 } WidgetRec, CoreRec; 112 113 114 115/****************************************************************** 116 * 117 * Core Class Structure. Widgets, regardless of their class, will have 118 * these fields. All widgets of a given class will have the same values 119 * for these fields. Widgets of a given class may also have additional 120 * common fields. These additional fields are included in incremental 121 * class structures, such as CommandClass. 122 * 123 * The fields that are specific to this subclass, as opposed to fields that 124 * are part of the superclass, are called "subclass fields" below. Many 125 * procedures are responsible only for the subclass fields, and not for 126 * any superclass fields. 127 * 128 ********************************************************************/ 129 130typedef struct _CoreClassPart { 131 WidgetClass superclass; /* pointer to superclass ClassRec */ 132 String class_name; /* widget resource class name */ 133 Cardinal widget_size; /* size in bytes of widget record */ 134 XtProc class_initialize; /* class initialization proc */ 135 XtWidgetClassProc class_part_initialize; /* dynamic initialization */ 136 XtEnum class_inited; /* has class been initialized? */ 137 XtInitProc initialize; /* initialize subclass fields */ 138 XtArgsProc initialize_hook; /* notify that initialize called */ 139 XtRealizeProc realize; /* XCreateWindow for widget */ 140 XtActionList actions; /* widget semantics name to proc map */ 141 Cardinal num_actions; /* number of entries in actions */ 142 XtResourceList resources; /* resources for subclass fields */ 143 Cardinal num_resources; /* number of entries in resources */ 144 XrmClass xrm_class; /* resource class quarkified */ 145 Boolean compress_motion; /* compress MotionNotify for widget */ 146 XtEnum compress_exposure; /* compress Expose events for widget*/ 147 Boolean compress_enterleave;/* compress enter and leave events */ 148 Boolean visible_interest; /* select for VisibilityNotify */ 149 XtWidgetProc destroy; /* free data for subclass pointers */ 150 XtWidgetProc resize; /* geom manager changed widget size */ 151 XtExposeProc expose; /* rediplay window */ 152 XtSetValuesFunc set_values; /* set subclass resource values */ 153 XtArgsFunc set_values_hook; /* notify that set_values called */ 154 XtAlmostProc set_values_almost; /* set_values got "Almost" geo reply */ 155 XtArgsProc get_values_hook; /* notify that get_values called */ 156 XtAcceptFocusProc accept_focus; /* assign input focus to widget */ 157 XtVersionType version; /* version of intrinsics used */ 158 XtPointer callback_private; /* list of callback offsets */ 159 String tm_table; /* state machine */ 160 XtGeometryHandler query_geometry; /* return preferred geometry */ 161 XtStringProc display_accelerator;/* display your accelerator */ 162 XtPointer extension; /* pointer to extension record */ 163 } CoreClassPart; 164 165typedef struct _WidgetClassRec { 166 CoreClassPart core_class; 167} WidgetClassRec, CoreClassRec; 168 169externalref WidgetClassRec widgetClassRec; 170#define coreClassRec widgetClassRec 171 172_XFUNCPROTOEND 173 174#endif /* _XtCoreP_h */ 175/* DON'T ADD STUFF AFTER THIS #endif */ 176