File indexing completed on 2025-01-18 10:15:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef _XmBaseClassP_h
0024 #define _XmBaseClassP_h
0025
0026 #ifndef _XmNO_BC_INCL
0027 #define _XmNO_BC_INCL
0028 #endif
0029
0030 #include <Xm/XmP.h>
0031
0032 #ifdef __cplusplus
0033 extern "C" {
0034 #endif
0035
0036
0037 #define _XmBCEPTR(wc) ((XmBaseClassExt *)(&(((WidgetClass)(wc))\
0038 ->core_class.extension)))
0039 #define _XmBCE(wc) ((XmBaseClassExt)(((WidgetClass)(wc))\
0040 ->core_class.extension))
0041
0042 #define _XmGetBaseClassExtPtr(wc, owner) \
0043 ((_XmBCE(wc) && (((_XmBCE(wc))->record_type) == owner)) ? \
0044 _XmBCEPTR(wc) : \
0045 ((XmBaseClassExt *) _XmGetClassExtensionPtr( \
0046 ((XmGenericClassExt *) \
0047 _XmBCEPTR( wc)), \
0048 owner)))
0049
0050
0051
0052 #define _XmGetFlagsBit(field, bit) \
0053 (field[ (bit >> 3) ]) & (1 << (bit & 0x07))
0054
0055 #define _XmSetFlagsBit(field, bit) \
0056 (field[ (bit >> 3) ] |= (1 << (bit & 0x07)))
0057
0058
0059 #ifndef XTHREADS
0060 #define _XmFastSubclassInit(wc, bit_field) { \
0061 if((_Xm_fastPtr = _XmGetBaseClassExtPtr( wc, XmQmotif)) && \
0062 (*_Xm_fastPtr)) \
0063 _XmSetFlagsBit((*_Xm_fastPtr)->flags, bit_field) ; \
0064 }
0065
0066
0067
0068
0069
0070
0071
0072 #define _XmIsFastSubclass(wc, bit) \
0073 ((_Xm_fastPtr = _XmGetBaseClassExtPtr((wc),XmQmotif)) && \
0074 (*_Xm_fastPtr)) ? \
0075 (_XmGetFlagsBit(((*_Xm_fastPtr)->flags), bit) ? TRUE : FALSE) \
0076 : FALSE
0077
0078 #else
0079 extern void _XmFastSubclassInit(WidgetClass, unsigned int);
0080 extern Boolean _XmIsFastSubclass(WidgetClass, unsigned int);
0081 #endif
0082
0083 #define XmBaseClassExtVersion 2L
0084 #define XmBaseClassExtVersion 2L
0085
0086
0087 typedef Cardinal (*XmGetSecResDataFunc)( WidgetClass,
0088 XmSecondaryResourceData **);
0089
0090 typedef struct _XmObjectClassExtRec{
0091 XtPointer next_extension;
0092 XrmQuark record_type;
0093 long version;
0094 Cardinal record_size;
0095 } XmObjectClassExtRec, *XmObjectClassExt;
0096
0097 typedef struct _XmGenericClassExtRec{
0098 XtPointer next_extension;
0099 XrmQuark record_type;
0100 long version;
0101 Cardinal record_size;
0102 } XmGenericClassExtRec, *XmGenericClassExt;
0103
0104 typedef struct _XmWrapperDataRec{
0105 struct _XmWrapperDataRec *next;
0106 WidgetClass widgetClass;
0107 XtInitProc initializeLeaf;
0108 XtSetValuesFunc setValuesLeaf;
0109 XtArgsProc getValuesLeaf;
0110 XtRealizeProc realize;
0111 XtWidgetClassProc classPartInitLeaf;
0112 XtWidgetProc resize;
0113 XtGeometryHandler geometry_manager;
0114
0115
0116 Cardinal init_depth;
0117
0118 int initializeLeafCount;
0119 int setValuesLeafCount;
0120 int getValuesLeafCount;
0121 XtInitProc constraintInitializeLeaf;
0122 XtSetValuesFunc constraintSetValuesLeaf;
0123 int constraintInitializeLeafCount;
0124 int constraintSetValuesLeafCount;
0125 } XmWrapperDataRec, *XmWrapperData;
0126
0127 typedef struct _XmBaseClassExtRec{
0128 XtPointer next_extension;
0129 XrmQuark record_type;
0130 long version;
0131 Cardinal record_size;
0132 XtInitProc initializePrehook;
0133 XtSetValuesFunc setValuesPrehook;
0134 XtInitProc initializePosthook;
0135 XtSetValuesFunc setValuesPosthook;
0136 WidgetClass secondaryObjectClass;
0137 XtInitProc secondaryObjectCreate;
0138 XmGetSecResDataFunc getSecResData;
0139 unsigned char flags[32];
0140 XtArgsProc getValuesPrehook;
0141 XtArgsProc getValuesPosthook;
0142 XtWidgetClassProc classPartInitPrehook;
0143 XtWidgetClassProc classPartInitPosthook;
0144 XtResourceList ext_resources;
0145 XtResourceList compiled_ext_resources;
0146 Cardinal num_ext_resources;
0147 Boolean use_sub_resources;
0148 XmWidgetNavigableProc widgetNavigable;
0149 XmFocusChangeProc focusChange;
0150 XmWrapperData wrapperData;
0151 } XmBaseClassExtRec, *XmBaseClassExt;
0152
0153
0154 typedef struct _XmWidgetExtDataRec{
0155 Widget widget;
0156 Widget reqWidget;
0157 Widget oldWidget;
0158 } XmWidgetExtDataRec, *XmWidgetExtData;
0159
0160 externalref XrmQuark XmQmotif;
0161 externalref int _XmInheritClass;
0162 externalref XmBaseClassExt * _Xm_fastPtr;
0163
0164
0165
0166
0167 extern XmGenericClassExt * _XmGetClassExtensionPtr(
0168 XmGenericClassExt *listHeadPtr,
0169 XrmQuark owner) ;
0170 extern Boolean _XmIsSubclassOf(WidgetClass wc, WidgetClass sc);
0171
0172
0173
0174
0175 #ifdef __cplusplus
0176 }
0177 #endif
0178
0179 #endif
0180