| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | #ifndef _XtintrinsicI_h |
| 49 | #define _XtintrinsicI_h |
| 50 | |
| 51 | #include "Xtos.h" |
| 52 | #include "IntrinsicP.h" |
| 53 | #ifdef WIN32 |
| 54 | #define _WILLWINSOCK_ |
| 55 | #endif |
| 56 | #include <X11/Xos.h> |
| 57 | |
| 58 | #include "Object.h" |
| 59 | #include "RectObj.h" |
| 60 | #include "ObjectP.h" |
| 61 | #include "RectObjP.h" |
| 62 | |
| 63 | #include "ConvertI.h" |
| 64 | #include "TranslateI.h" |
| 65 | |
| 66 | #define RectObjClassFlag 0x02 |
| 67 | #define WidgetClassFlag 0x04 |
| 68 | #define CompositeClassFlag 0x08 |
| 69 | #define ConstraintClassFlag 0x10 |
| 70 | #define ShellClassFlag 0x20 |
| 71 | #define WMShellClassFlag 0x40 |
| 72 | #define TopLevelClassFlag 0x80 |
| 73 | |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | |
| 79 | |
| 80 | #define XtDisplayOfObject(object) \ |
| 81 | (XtIsWidget(object) ? (object)->core.screen->display : \ |
| 82 | _XtIsHookObject(object) ? ((HookObject)(object))->hooks.screen->display : \ |
| 83 | _XtWindowedAncestor(object)->core.screen->display) |
| 84 | |
| 85 | #define XtScreenOfObject(object) \ |
| 86 | (XtIsWidget(object) ? (object)->core.screen : \ |
| 87 | _XtIsHookObject(object) ? ((HookObject)(object))->hooks.screen : \ |
| 88 | _XtWindowedAncestor(object)->core.screen) |
| 89 | |
| 90 | #define XtWindowOfObject(object) \ |
| 91 | ((XtIsWidget(object) ? (object) : _XtWindowedAncestor(object)) \ |
| 92 | ->core.window) |
| 93 | |
| 94 | #define XtIsManaged(object) \ |
| 95 | (XtIsRectObj(object) ? (object)->core.managed : False) |
| 96 | |
| 97 | #define XtIsSensitive(object) \ |
| 98 | (XtIsRectObj(object) ? ((object)->core.sensitive && \ |
| 99 | (object)->core.ancestor_sensitive) : False) |
| 100 | |
| 101 | |
| 102 | |
| 103 | |
| 104 | |
| 105 | |
| 106 | |
| 107 | #define XtSetBits(dst,src,len) dst = (((1U << (len)) - 1) & (unsigned)(src)) |
| 108 | #define XtSetBit(dst,src) XtSetBits(dst,src,1) |
| 109 | |
| 110 | |
| 111 | |
| 112 | |
| 113 | |
| 114 | |
| 115 | |
| 116 | #define _XBCOPYFUNC _XtBcopy |
| 117 | #include <X11/Xfuncs.h> |
| 118 | |
| 119 | #define XtMemmove(dst, src, size) \ |
| 120 | if ((const void *)(dst) != (const void *)(src)) { \ |
| 121 | (void) memcpy((void *) (dst), (const void *) (src), (size_t) (size)); \ |
| 122 | } |
| 123 | |
| 124 | #define XtBZero(dst, size) \ |
| 125 | memset((void *) (dst), 0, (size_t) (size)) |
| 126 | |
| 127 | #define XtMemcmp(b1, b2, size) \ |
| 128 | memcmp((const void *) (b1), (const void *) (b2), (size_t) (size)) |
| 129 | |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | |
| 137 | #define XtStackAlloc(size, stack_cache_array) \ |
| 138 | ((size) <= sizeof(stack_cache_array) \ |
| 139 | ? (XtPointer)(stack_cache_array) \ |
| 140 | : XtMalloc((Cardinal)(size))) |
| 141 | |
| 142 | #define XtStackFree(pointer, stack_cache_array) \ |
| 143 | { if ((pointer) != ((XtPointer)(stack_cache_array))) XtFree(pointer); } |
| 144 | |
| 145 | |
| 146 | |
| 147 | |
| 148 | |
| 149 | |
| 150 | |
| 151 | |
| 152 | #ifndef XFILESEARCHPATHDEFAULT |
| 153 | #define XFILESEARCHPATHDEFAULT "/usr/lib/X11/%L/%T/%N%S:/usr/lib/X11/%l/%T/%N%S:/usr/lib/X11/%T/%N%S" |
| 154 | #endif |
| 155 | |
| 156 | |
| 157 | #ifndef XTERROR_PREFIX |
| 158 | #define XTERROR_PREFIX "" |
| 159 | #endif |
| 160 | |
| 161 | #ifndef XTWARNING_PREFIX |
| 162 | #define XTWARNING_PREFIX "" |
| 163 | #endif |
| 164 | |
| 165 | #ifndef ERRORDB |
| 166 | #define ERRORDB "/usr/lib/X11/XtErrorDB" |
| 167 | #endif |
| 168 | |
| 169 | _XFUNCPROTOBEGIN |
| 170 | |
| 171 | extern String XtCXtToolkitError; |
| 172 | |
| 173 | extern void _XtAllocError( |
| 174 | String |
| 175 | ) _X_NORETURN; |
| 176 | |
| 177 | extern void _XtCompileResourceList( |
| 178 | XtResourceList , |
| 179 | Cardinal |
| 180 | ); |
| 181 | |
| 182 | extern XtGeometryResult _XtMakeGeometryRequest( |
| 183 | Widget , |
| 184 | XtWidgetGeometry* , |
| 185 | XtWidgetGeometry* , |
| 186 | Boolean* |
| 187 | ); |
| 188 | |
| 189 | extern Boolean _XtIsHookObject( |
| 190 | Widget |
| 191 | ); |
| 192 | |
| 193 | extern void _XtAddShellToHookObj( |
| 194 | Widget |
| 195 | ); |
| 196 | |
| 197 | |
| 198 | extern void _XtGClistFree(Display *dpy, XtPerDisplay pd); |
| 199 | |
| 200 | |
| 201 | |
| 202 | #ifdef XT_GEO_TATTLER |
| 203 | |
| 204 | extern void _XtGeoTab (int); |
| 205 | extern void _XtGeoTrace ( |
| 206 | Widget widget, |
| 207 | const char *, |
| 208 | ... |
| 209 | ) _X_ATTRIBUTE_PRINTF(2,3); |
| 210 | |
| 211 | #define CALLGEOTAT(f) f |
| 212 | |
| 213 | #else |
| 214 | |
| 215 | #define CALLGEOTAT(f) |
| 216 | |
| 217 | #endif |
| 218 | |
| 219 | #ifndef XTTRACEMEMORY |
| 220 | |
| 221 | extern char* __XtMalloc ( |
| 222 | unsigned |
| 223 | ); |
| 224 | extern char* __XtCalloc ( |
| 225 | unsigned , |
| 226 | unsigned |
| 227 | ); |
| 228 | |
| 229 | #else |
| 230 | |
| 231 | #define __XtMalloc XtMalloc |
| 232 | #define __XtCalloc XtCalloc |
| 233 | #endif |
| 234 | |
| 235 | _XFUNCPROTOEND |
| 236 | |
| 237 | #endif |
| 238 | |