File indexing completed on 2025-01-18 10:14:30
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
0049
0050
0051 #ifndef _PDI_h_
0052 #define _PDI_h_
0053
0054
0055 #define KEYBOARD TRUE
0056 #define POINTER FALSE
0057
0058 _XFUNCPROTOBEGIN
0059
0060 typedef enum {
0061 XtNoServerGrab,
0062 XtPassiveServerGrab,
0063 XtActiveServerGrab,
0064 XtPseudoPassiveServerGrab,
0065 XtPseudoActiveServerGrab
0066 }XtServerGrabType;
0067
0068 typedef struct _XtServerGrabRec {
0069 struct _XtServerGrabRec *next;
0070 Widget widget;
0071 unsigned int ownerEvents:1;
0072 unsigned int pointerMode:1;
0073 unsigned int keyboardMode:1;
0074 unsigned int hasExt:1;
0075 unsigned int confineToIsWidgetWin:1;
0076 KeyCode keybut;
0077 unsigned short modifiers;
0078 unsigned short eventMask;
0079 } XtServerGrabRec, *XtServerGrabPtr;
0080
0081 typedef struct _XtGrabExtRec {
0082 Mask *pKeyButMask;
0083 Mask *pModifiersMask;
0084 Window confineTo;
0085 Cursor cursor;
0086 } XtServerGrabExtRec, *XtServerGrabExtPtr;
0087
0088 #define GRABEXT(p) ((XtServerGrabExtPtr)((p)+1))
0089
0090 typedef struct _XtDeviceRec{
0091 XtServerGrabRec grab;
0092
0093 XtServerGrabType grabType;
0094 }XtDeviceRec, *XtDevice;
0095
0096 #define XtMyAncestor 0
0097 #define XtMyDescendant 1
0098 #define XtMyCousin 2
0099 #define XtMySelf 3
0100 #define XtUnrelated 4
0101 typedef char XtGeneology;
0102
0103 typedef struct {
0104 Widget focusKid;
0105 XtServerGrabPtr keyList, ptrList;
0106 Widget queryEventDescendant;
0107 unsigned int map_handler_added:1;
0108 unsigned int realize_handler_added:1;
0109 unsigned int active_handler_added:1;
0110 unsigned int haveFocus:1;
0111 XtGeneology focalPoint;
0112 }XtPerWidgetInputRec, *XtPerWidgetInput;
0113
0114 typedef struct XtPerDisplayInputRec{
0115 XtGrabList grabList;
0116 XtDeviceRec keyboard, pointer;
0117 KeyCode activatingKey;
0118 Widget *trace;
0119 int traceDepth, traceMax;
0120 Widget focusWidget;
0121 }XtPerDisplayInputRec, *XtPerDisplayInput;
0122
0123 #define IsServerGrab(g) ((g == XtPassiveServerGrab) ||\
0124 (g == XtActiveServerGrab))
0125
0126 #define IsAnyGrab(g) ((g == XtPassiveServerGrab) ||\
0127 (g == XtActiveServerGrab) ||\
0128 (g == XtPseudoPassiveServerGrab))
0129
0130 #define IsEitherPassiveGrab(g) ((g == XtPassiveServerGrab) ||\
0131 (g == XtPseudoPassiveServerGrab))
0132
0133 #define IsPseudoGrab(g) ((g == XtPseudoPassiveServerGrab))
0134
0135 extern void _XtDestroyServerGrabs(
0136 Widget ,
0137 XtPointer ,
0138 XtPointer
0139 );
0140
0141 extern XtPerWidgetInput _XtGetPerWidgetInput(
0142 Widget ,
0143 _XtBoolean
0144 );
0145
0146 extern XtServerGrabPtr _XtCheckServerGrabsOnWidget(
0147 XEvent* ,
0148 Widget ,
0149 _XtBoolean
0150 );
0151
0152
0153
0154
0155
0156 #define _XtGetGrabList(pdi) (&(pdi)->grabList)
0157
0158 extern void _XtFreePerWidgetInput(
0159 Widget ,
0160 XtPerWidgetInput
0161 );
0162
0163 extern Widget _XtProcessKeyboardEvent(
0164 XKeyEvent* ,
0165 Widget ,
0166 XtPerDisplayInput
0167 );
0168
0169 extern Widget _XtProcessPointerEvent(
0170 XButtonEvent* ,
0171 Widget ,
0172 XtPerDisplayInput
0173 );
0174
0175 extern void _XtRegisterPassiveGrabs(
0176 Widget
0177 );
0178
0179 extern void _XtClearAncestorCache(
0180 Widget
0181 );
0182
0183 _XFUNCPROTOEND
0184
0185 #endif