File indexing completed on 2025-01-18 10:14:29
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048 #ifndef _XtintrinsicP_h
0049 #define _XtintrinsicP_h
0050
0051 #include <X11/Intrinsic.h>
0052
0053
0054
0055
0056
0057
0058 typedef struct {
0059 XtIntPtr xrm_name;
0060 XtIntPtr xrm_class;
0061 XtIntPtr xrm_type;
0062 Cardinal xrm_size;
0063 int xrm_offset;
0064 XtIntPtr xrm_default_type;
0065 XtPointer xrm_default_addr;
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
0088 );
0089
0090 typedef void (*XtWidgetProc)(
0091 Widget
0092 );
0093
0094 typedef Boolean (*XtAcceptFocusProc)(
0095 Widget ,
0096 Time*
0097 );
0098
0099 typedef void (*XtArgsProc)(
0100 Widget ,
0101 ArgList ,
0102 Cardinal*
0103 );
0104
0105 typedef void (*XtInitProc)(
0106 Widget ,
0107 Widget ,
0108 ArgList ,
0109 Cardinal*
0110 );
0111
0112 typedef Boolean (*XtSetValuesFunc)(
0113 Widget ,
0114 Widget ,
0115 Widget ,
0116 ArgList ,
0117 Cardinal*
0118 );
0119
0120 typedef Boolean (*XtArgsFunc)(
0121 Widget ,
0122 ArgList ,
0123 Cardinal*
0124 );
0125
0126 typedef void (*XtAlmostProc)(
0127 Widget ,
0128 Widget ,
0129 XtWidgetGeometry* ,
0130 XtWidgetGeometry*
0131 );
0132
0133 typedef void (*XtExposeProc)(
0134 Widget ,
0135 XEvent* ,
0136 Region
0137 );
0138
0139
0140 #define XtExposeNoCompress ((XtEnum)False)
0141 #define XtExposeCompressSeries ((XtEnum)True)
0142 #define XtExposeCompressMultiple 2
0143 #define XtExposeCompressMaximal 3
0144
0145
0146 #define XtExposeGraphicsExpose 0x10
0147 #define XtExposeGraphicsExposeMerged 0x20
0148 #define XtExposeNoExpose 0x40
0149 #define XtExposeNoRegion 0x80
0150
0151 typedef void (*XtRealizeProc)(
0152 Widget ,
0153 XtValueMask* ,
0154 XSetWindowAttributes*
0155 );
0156
0157 typedef XtGeometryResult (*XtGeometryHandler)(
0158 Widget ,
0159 XtWidgetGeometry* ,
0160 XtWidgetGeometry*
0161 );
0162
0163 typedef void (*XtStringProc)(
0164 Widget ,
0165 String
0166 );
0167
0168 typedef struct {
0169 String name;
0170 String type;
0171 XtArgVal value;
0172 int size;
0173 } XtTypedArg, *XtTypedArgList;
0174
0175 typedef void (*XtAllocateProc)(
0176 WidgetClass ,
0177 Cardinal * ,
0178 Cardinal * ,
0179 ArgList ,
0180 Cardinal * ,
0181 XtTypedArgList ,
0182 Cardinal * ,
0183 Widget * ,
0184 XtPointer *
0185 );
0186
0187 typedef void (*XtDeallocateProc)(
0188 Widget ,
0189 XtPointer
0190 );
0191
0192 struct _XtStateRec;
0193
0194 typedef struct _XtTMRec {
0195 XtTranslations translations;
0196 XtBoundActions proc_table;
0197 struct _XtStateRec *current_state;
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)
0266 #endif
0267
0268 _XFUNCPROTOBEGIN
0269
0270 extern Widget _XtWindowedAncestor(
0271 Widget
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 ,
0285 XtPointer ,
0286 XEvent * ,
0287 Boolean * );
0288
0289 extern void XtCreateWindow(
0290 Widget ,
0291 unsigned int ,
0292 Visual* ,
0293 XtValueMask ,
0294 XSetWindowAttributes*
0295 );
0296
0297 extern void XtResizeWidget(
0298 Widget ,
0299 _XtDimension ,
0300 _XtDimension ,
0301 _XtDimension
0302 );
0303
0304 extern void XtMoveWidget(
0305 Widget ,
0306 _XtPosition ,
0307 _XtPosition
0308 );
0309
0310 extern void XtConfigureWidget(
0311 Widget ,
0312 _XtPosition ,
0313 _XtPosition ,
0314 _XtDimension ,
0315 _XtDimension ,
0316 _XtDimension
0317 );
0318
0319 extern void XtResizeWindow(
0320 Widget
0321 );
0322
0323 extern void XtProcessLock(
0324 void
0325 );
0326
0327 extern void XtProcessUnlock(
0328 void
0329 );
0330
0331 _XFUNCPROTOEND
0332
0333 #endif
0334