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 _XtintrinsicI_h
0049 #define _XtintrinsicI_h
0050 
0051 #include "Xtos.h"
0052 #include "IntrinsicP.h"
0053 #ifdef WIN32
0054 #define _WILLWINSOCK_
0055 #endif
0056 #include <X11/Xos.h>
0057 
0058 #include "Object.h"
0059 #include "RectObj.h"
0060 #include "ObjectP.h"
0061 #include "RectObjP.h"
0062 
0063 #include "ConvertI.h"
0064 #include "TranslateI.h"
0065 
0066 #define RectObjClassFlag    0x02
0067 #define WidgetClassFlag     0x04
0068 #define CompositeClassFlag  0x08
0069 #define ConstraintClassFlag 0x10
0070 #define ShellClassFlag      0x20
0071 #define WMShellClassFlag    0x40
0072 #define TopLevelClassFlag   0x80
0073 
0074 /*
0075  * The following macros, though very handy, are not suitable for
0076  * IntrinsicP.h as they violate the rule that arguments are to
0077  * be evaluated exactly once.
0078  */
0079 
0080 #define XtDisplayOfObject(object) \
0081     (XtIsWidget(object) ? (object)->core.screen->display : \
0082     _XtIsHookObject(object) ? ((HookObject)(object))->hooks.screen->display : \
0083     _XtWindowedAncestor(object)->core.screen->display)
0084 
0085 #define XtScreenOfObject(object) \
0086     (XtIsWidget(object) ? (object)->core.screen : \
0087     _XtIsHookObject(object) ? ((HookObject)(object))->hooks.screen : \
0088     _XtWindowedAncestor(object)->core.screen)
0089 
0090 #define XtWindowOfObject(object) \
0091     ((XtIsWidget(object) ? (object) : _XtWindowedAncestor(object)) \
0092      ->core.window)
0093 
0094 #define XtIsManaged(object) \
0095     (XtIsRectObj(object) ? (object)->core.managed : False)
0096 
0097 #define XtIsSensitive(object) \
0098     (XtIsRectObj(object) ? ((object)->core.sensitive && \
0099                 (object)->core.ancestor_sensitive) : False)
0100 
0101 
0102 /****************************************************************
0103  *
0104  * Bit utilities
0105  *
0106  ****************************************************************/
0107 #define XtSetBits(dst,src,len)  dst = (((1U << (len)) - 1) & (unsigned)(src))
0108 #define XtSetBit(dst,src)  XtSetBits(dst,src,1)
0109 
0110 /****************************************************************
0111  *
0112  * Byte utilities
0113  *
0114  ****************************************************************/
0115 
0116 #define _XBCOPYFUNC _XtBcopy
0117 #include <X11/Xfuncs.h>
0118 
0119 #define XtMemmove(dst, src, size)   \
0120     if ((const void *)(dst) != (const void *)(src)) {           \
0121     (void) memcpy((void *) (dst), (const void *) (src), (size_t) (size)); \
0122     }
0123 
0124 #define XtBZero(dst, size)  \
0125     memset((void *) (dst), 0, (size_t) (size))
0126 
0127 #define XtMemcmp(b1, b2, size)      \
0128     memcmp((const void *) (b1), (const void *) (b2), (size_t) (size))
0129 
0130 
0131 /****************************************************************
0132  *
0133  * Stack cache allocation/free
0134  *
0135  ****************************************************************/
0136 
0137 #define XtStackAlloc(size, stack_cache_array)     \
0138     ((size) <= sizeof(stack_cache_array)      \
0139     ?  (XtPointer)(stack_cache_array)         \
0140     :  XtMalloc((Cardinal)(size)))
0141 
0142 #define XtStackFree(pointer, stack_cache_array) \
0143     { if ((pointer) != ((XtPointer)(stack_cache_array))) XtFree(pointer); }
0144 
0145 /***************************************************************
0146  *
0147  * Filename defines
0148  *
0149  **************************************************************/
0150 
0151 /* used by XtResolvePathname */
0152 #ifndef XFILESEARCHPATHDEFAULT
0153 #define XFILESEARCHPATHDEFAULT "/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S"
0154 #endif
0155 
0156 /* the following two were both "X Toolkit " prior to R4 */
0157 #ifndef XTERROR_PREFIX
0158 #define XTERROR_PREFIX ""
0159 #endif
0160 
0161 #ifndef XTWARNING_PREFIX
0162 #define XTWARNING_PREFIX ""
0163 #endif
0164 
0165 #ifndef ERRORDB
0166 #define ERRORDB "/usr/lib/X11/XtErrorDB"
0167 #endif
0168 
0169 _XFUNCPROTOBEGIN
0170 
0171 extern String XtCXtToolkitError;
0172 
0173 extern void _XtAllocError(
0174     String  /* alloc_type */
0175 ) _X_NORETURN;
0176 
0177 extern void _XtCompileResourceList(
0178     XtResourceList  /* resources */,
0179     Cardinal        /* num_resources */
0180 );
0181 
0182 extern XtGeometryResult _XtMakeGeometryRequest(
0183     Widget      /* widget */,
0184     XtWidgetGeometry*   /* request */,
0185     XtWidgetGeometry*   /* reply_return */,
0186     Boolean*        /* clear_rect_obj */
0187 );
0188 
0189 extern Boolean _XtIsHookObject(
0190     Widget      /* widget */
0191 );
0192 
0193 extern void _XtAddShellToHookObj(
0194     Widget      /* widget */
0195 );
0196 
0197 /* GCManager.c */
0198 extern void _XtGClistFree(Display *dpy, XtPerDisplay pd);
0199 
0200 /** GeoTattler stuff */
0201 
0202 #ifdef XT_GEO_TATTLER
0203 
0204 extern void _XtGeoTab (int);
0205 extern void _XtGeoTrace (
0206                 Widget widget,
0207                 const char *,
0208                 ...
0209 ) _X_ATTRIBUTE_PRINTF(2,3);
0210 
0211 #define CALLGEOTAT(f) f
0212 
0213 #else /* XT_GEO_TATTLER */
0214 
0215 #define CALLGEOTAT(f)
0216 
0217 #endif /* XT_GEO_TATTLER */
0218 
0219 #ifndef XTTRACEMEMORY
0220 
0221 extern char* __XtMalloc (
0222     unsigned    /* size */
0223 );
0224 extern char* __XtCalloc (
0225     unsigned    /* num */,
0226     unsigned    /* size */
0227 );
0228 
0229 #else
0230 
0231 #define __XtMalloc XtMalloc
0232 #define __XtCalloc XtCalloc
0233 #endif
0234 
0235 _XFUNCPROTOEND
0236 
0237 #endif /* _XtintrinsicI_h */
0238 /* DON'T ADD STUFF AFTER THIS #endif */