Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:29

0001 /***********************************************************
0002 
0003 Copyright 1987, 1988, 1994, 1998  The Open Group
0004 
0005 Permission to use, copy, modify, distribute, and sell this software and its
0006 documentation for any purpose is hereby granted without fee, provided that
0007 the above copyright notice appear in all copies and that both that
0008 copyright notice and this permission notice appear in supporting
0009 documentation.
0010 
0011 The above copyright notice and this permission notice shall be included in
0012 all copies or substantial portions of the Software.
0013 
0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 
0021 Except as contained in this notice, the name of The Open Group shall not be
0022 used in advertising or otherwise to promote the sale, use or other dealings
0023 in this Software without prior written authorization from The Open Group.
0024 
0025 
0026 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
0027 
0028                         All Rights Reserved
0029 
0030 Permission to use, copy, modify, and distribute this software and its
0031 documentation for any purpose and without fee is hereby granted,
0032 provided that the above copyright notice appear in all copies and that
0033 both that copyright notice and this permission notice appear in
0034 supporting documentation, and that the name of Digital not be
0035 used in advertising or publicity pertaining to distribution of the
0036 software without specific, written prior permission.
0037 
0038 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
0039 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
0040 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
0041 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
0042 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
0043 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
0044 SOFTWARE.
0045 
0046 ******************************************************************/
0047 
0048 #ifndef _XtintrinsicP_h
0049 #define _XtintrinsicP_h
0050 
0051 #include <X11/Intrinsic.h>
0052 
0053 /*
0054  * Field sizes and offsets of XrmResource must match those of XtResource.
0055  * Type long is used instead of XrmQuark here because XrmQuark and String
0056  * are not the same size on all systems.
0057  */
0058 typedef struct {
0059     XtIntPtr    xrm_name;     /* Resource name quark        */
0060     XtIntPtr    xrm_class;    /* Resource class quark       */
0061     XtIntPtr    xrm_type;     /* Resource representation type quark */
0062     Cardinal    xrm_size;     /* Size in bytes of representation    */
0063     int     xrm_offset;   /* -offset-1              */
0064     XtIntPtr    xrm_default_type; /* Default representation type quark  */
0065     XtPointer   xrm_default_addr; /* Default resource address       */
0066 } XrmResource, *XrmResourceList;
0067 #if __STDC_VERSION__ >= 201112L
0068 _Static_assert(XtOffsetOf(XrmResource, xrm_default_addr) ==
0069                    XtOffsetOf(XtResource, default_addr),
0070                "Field offset mismatch");
0071 #endif
0072 
0073 typedef unsigned long XtVersionType;
0074 
0075 #define XT_VERSION 11
0076 #ifndef XT_REVISION
0077 #define XT_REVISION 6
0078 #endif
0079 #define XtVersion (XT_VERSION * 1000 + XT_REVISION)
0080 #define XtVersionDontCheck 0
0081 
0082 typedef void (*XtProc)(
0083     void
0084 );
0085 
0086 typedef void (*XtWidgetClassProc)(
0087     WidgetClass /* class */
0088 );
0089 
0090 typedef void (*XtWidgetProc)(
0091     Widget  /* widget */
0092 );
0093 
0094 typedef Boolean (*XtAcceptFocusProc)(
0095     Widget  /* widget */,
0096     Time*   /* time */
0097 );
0098 
0099 typedef void (*XtArgsProc)(
0100     Widget  /* widget */,
0101     ArgList /* args */,
0102     Cardinal*   /* num_args */
0103 );
0104 
0105 typedef void (*XtInitProc)(
0106     Widget  /* request */,
0107     Widget  /* new */,
0108     ArgList /* args */,
0109     Cardinal*   /* num_args */
0110 );
0111 
0112 typedef Boolean (*XtSetValuesFunc)(
0113     Widget  /* old */,
0114     Widget  /* request */,
0115     Widget  /* new */,
0116     ArgList     /* args */,
0117     Cardinal*   /* num_args */
0118 );
0119 
0120 typedef Boolean (*XtArgsFunc)(
0121     Widget  /* widget */,
0122     ArgList /* args */,
0123     Cardinal*   /* num_args */
0124 );
0125 
0126 typedef void (*XtAlmostProc)(
0127     Widget      /* old */,
0128     Widget      /* new */,
0129     XtWidgetGeometry*   /* request */,
0130     XtWidgetGeometry*   /* reply */
0131 );
0132 
0133 typedef void (*XtExposeProc)(
0134     Widget  /* widget */,
0135     XEvent* /* event */,
0136     Region  /* region */
0137 );
0138 
0139 /* compress_exposure options*/
0140 #define XtExposeNoCompress      ((XtEnum)False)
0141 #define XtExposeCompressSeries      ((XtEnum)True)
0142 #define XtExposeCompressMultiple    2
0143 #define XtExposeCompressMaximal     3
0144 
0145 /* modifiers */
0146 #define XtExposeGraphicsExpose      0x10
0147 #define XtExposeGraphicsExposeMerged    0x20
0148 #define XtExposeNoExpose        0x40
0149 #define XtExposeNoRegion        0x80
0150 
0151 typedef void (*XtRealizeProc)(
0152     Widget        /* widget */,
0153     XtValueMask*      /* mask */,
0154     XSetWindowAttributes* /* attributes */
0155 );
0156 
0157 typedef XtGeometryResult (*XtGeometryHandler)(
0158     Widget      /* widget */,
0159     XtWidgetGeometry*   /* request */,
0160     XtWidgetGeometry*   /* reply */
0161 );
0162 
0163 typedef void (*XtStringProc)(
0164     Widget  /* widget */,
0165     String  /* str */
0166 );
0167 
0168 typedef struct {
0169     String  name;   /* resource name */
0170     String  type;   /* representation type name */
0171     XtArgVal    value;  /* representation */
0172     int     size;   /* size of representation */
0173 } XtTypedArg, *XtTypedArgList;
0174 
0175 typedef void (*XtAllocateProc)(
0176     WidgetClass     /* widget_class */,
0177     Cardinal *      /* constraint_size */,
0178     Cardinal *      /* more_bytes */,
0179     ArgList     /* args */,
0180     Cardinal *      /* num_args */,
0181     XtTypedArgList  /* typed_args */,
0182     Cardinal *      /* num_typed_args */,
0183     Widget *        /* widget_return */,
0184     XtPointer *     /* more_bytes_return */
0185 );
0186 
0187 typedef void (*XtDeallocateProc)(
0188     Widget      /* widget */,
0189     XtPointer       /* more_bytes */
0190 );
0191 
0192 struct _XtStateRec; /* Forward declare before use for C++ */
0193 
0194 typedef struct _XtTMRec {
0195     XtTranslations  translations;   /* private to Translation Manager    */
0196     XtBoundActions  proc_table;     /* procedure bindings for actions    */
0197     struct _XtStateRec *current_state;  /* Translation Manager state ptr     */
0198     unsigned long   lastEventTime;
0199 } XtTMRec, *XtTM;
0200 
0201 #include <X11/CoreP.h>
0202 #include <X11/CompositeP.h>
0203 #include <X11/ConstrainP.h>
0204 #include <X11/ObjectP.h>
0205 #include <X11/RectObjP.h>
0206 
0207 #define XtDisplay(widget)   DisplayOfScreen((widget)->core.screen)
0208 #define XtScreen(widget)    ((widget)->core.screen)
0209 #define XtWindow(widget)    ((widget)->core.window)
0210 
0211 #define XtClass(widget)     ((widget)->core.widget_class)
0212 #define XtSuperclass(widget)    (XtClass(widget)->core_class.superclass)
0213 #define XtIsRealized(object)    (XtWindowOfObject(object) != None)
0214 #define XtParent(widget)    ((widget)->core.parent)
0215 
0216 #undef XtIsRectObj
0217 extern Boolean XtIsRectObj(Widget);
0218 #define XtIsRectObj(obj) \
0219     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x02)
0220 
0221 #undef XtIsWidget
0222 extern Boolean XtIsWidget(Widget);
0223 #define XtIsWidget(obj) \
0224     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x04)
0225 
0226 #undef XtIsComposite
0227 extern Boolean XtIsComposite(Widget);
0228 #define XtIsComposite(obj) \
0229     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x08)
0230 
0231 #undef XtIsConstraint
0232 extern Boolean XtIsConstraint(Widget);
0233 #define XtIsConstraint(obj) \
0234     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x10)
0235 
0236 #undef XtIsShell
0237 extern Boolean XtIsShell(Widget);
0238 #define XtIsShell(obj) \
0239     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x20)
0240 
0241 #undef XtIsWMShell
0242 extern Boolean XtIsWMShell(Widget);
0243 #define XtIsWMShell(obj) \
0244     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x40)
0245 
0246 #undef XtIsTopLevelShell
0247 extern Boolean XtIsTopLevelShell(Widget);
0248 #define XtIsTopLevelShell(obj) \
0249     (((Object)(obj))->object.widget_class->core_class.class_inited & 0x80)
0250 
0251 #ifdef DEBUG
0252 #define XtCheckSubclass(w, widget_class_ptr, message)   \
0253     if (!XtIsSubclass(((Widget)(w)), (widget_class_ptr))) { \
0254         String dbgArgV[3];              \
0255         Cardinal dbgArgC = 3;           \
0256         dbgArgV[0] = ((Widget)(w))->core.widget_class->core_class.class_name;\
0257         dbgArgV[1] = (widget_class_ptr)->core_class.class_name;      \
0258         dbgArgV[2] = (message);                      \
0259         XtAppErrorMsg(XtWidgetToApplicationContext((Widget)(w)),         \
0260             "subclassMismatch", "xtCheckSubclass", "XtToolkitError", \
0261             "Widget class %s found when subclass of %s expected: %s",\
0262             dbgArgV, &dbgArgC);         \
0263     }
0264 #else
0265 #define XtCheckSubclass(w, widget_class, message)   /* nothing */
0266 #endif
0267 
0268 _XFUNCPROTOBEGIN
0269 
0270 extern Widget _XtWindowedAncestor( /* internal; implementation-dependent */
0271     Widget      /* object */
0272 );
0273 
0274 #if (defined(_WIN32) || defined(__CYGWIN__)) && !defined(LIBXT_COMPILATION)
0275 __declspec(dllimport)
0276 #else
0277 extern
0278 #endif
0279 void _XtInherit(
0280     void
0281 );
0282 
0283 extern void _XtHandleFocus(
0284     Widget      /* widget */,
0285     XtPointer       /* client_data */,
0286     XEvent *        /* event */,
0287     Boolean *       /* cont */);
0288 
0289 extern void XtCreateWindow(
0290     Widget      /* widget */,
0291     unsigned int    /* window_class */,
0292     Visual*     /* visual */,
0293     XtValueMask     /* value_mask */,
0294     XSetWindowAttributes* /* attributes */
0295 );
0296 
0297 extern void XtResizeWidget(
0298     Widget      /* widget */,
0299     _XtDimension    /* width */,
0300     _XtDimension    /* height */,
0301     _XtDimension    /* border_width */
0302 );
0303 
0304 extern void XtMoveWidget(
0305     Widget      /* widget */,
0306     _XtPosition     /* x */,
0307     _XtPosition     /* y */
0308 );
0309 
0310 extern void XtConfigureWidget(
0311     Widget      /* widget */,
0312     _XtPosition     /* x */,
0313     _XtPosition     /* y */,
0314     _XtDimension    /* width */,
0315     _XtDimension    /* height */,
0316     _XtDimension    /* border_width */
0317 );
0318 
0319 extern void XtResizeWindow(
0320     Widget      /* widget */
0321 );
0322 
0323 extern void XtProcessLock(
0324     void
0325 );
0326 
0327 extern void XtProcessUnlock(
0328     void
0329 );
0330 
0331 _XFUNCPROTOEND
0332 
0333 #endif /* _XtIntrinsicP_h */
0334 /* DON'T ADD STUFF AFTER THIS #endif */