File indexing completed on 2025-03-13 09:29:40
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 #ifndef _XINPUT_H_
0050 #define _XINPUT_H_
0051
0052 #include <X11/Xlib.h>
0053 #include <X11/extensions/XI.h>
0054
0055 #define _deviceKeyPress 0
0056 #define _deviceKeyRelease 1
0057
0058 #define _deviceButtonPress 0
0059 #define _deviceButtonRelease 1
0060
0061 #define _deviceMotionNotify 0
0062
0063 #define _deviceFocusIn 0
0064 #define _deviceFocusOut 1
0065
0066 #define _proximityIn 0
0067 #define _proximityOut 1
0068
0069 #define _deviceStateNotify 0
0070 #define _deviceMappingNotify 1
0071 #define _changeDeviceNotify 2
0072
0073
0074
0075 #define _propertyNotify 6
0076
0077 #define FindTypeAndClass(d,type,_class,classid,offset) \
0078 { int _i; XInputClassInfo *_ip; \
0079 type = 0; _class = 0; \
0080 for (_i=0, _ip= ((XDevice *) d)->classes; \
0081 _i< ((XDevice *) d)->num_classes; \
0082 _i++, _ip++) \
0083 if (_ip->input_class == classid) \
0084 {type = _ip->event_type_base + offset; \
0085 _class = ((XDevice *) d)->device_id << 8 | type;}}
0086
0087 #define DeviceKeyPress(d,type,_class) \
0088 FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyPress)
0089
0090 #define DeviceKeyRelease(d,type,_class) \
0091 FindTypeAndClass(d, type, _class, KeyClass, _deviceKeyRelease)
0092
0093 #define DeviceButtonPress(d,type,_class) \
0094 FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonPress)
0095
0096 #define DeviceButtonRelease(d,type,_class) \
0097 FindTypeAndClass(d, type, _class, ButtonClass, _deviceButtonRelease)
0098
0099 #define DeviceMotionNotify(d,type,_class) \
0100 FindTypeAndClass(d, type, _class, ValuatorClass, _deviceMotionNotify)
0101
0102 #define DeviceFocusIn(d,type,_class) \
0103 FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusIn)
0104
0105 #define DeviceFocusOut(d,type,_class) \
0106 FindTypeAndClass(d, type, _class, FocusClass, _deviceFocusOut)
0107
0108 #define ProximityIn(d,type,_class) \
0109 FindTypeAndClass(d, type, _class, ProximityClass, _proximityIn)
0110
0111 #define ProximityOut(d,type,_class) \
0112 FindTypeAndClass(d, type, _class, ProximityClass, _proximityOut)
0113
0114 #define DeviceStateNotify(d,type,_class) \
0115 FindTypeAndClass(d, type, _class, OtherClass, _deviceStateNotify)
0116
0117 #define DeviceMappingNotify(d,type,_class) \
0118 FindTypeAndClass(d, type, _class, OtherClass, _deviceMappingNotify)
0119
0120 #define ChangeDeviceNotify(d,type,_class) \
0121 FindTypeAndClass(d, type, _class, OtherClass, _changeDeviceNotify)
0122
0123 #define DevicePropertyNotify(d, type, _class) \
0124 FindTypeAndClass(d, type, _class, OtherClass, _propertyNotify)
0125
0126 #define DevicePointerMotionHint(d,type,_class) \
0127 { _class = ((XDevice *) d)->device_id << 8 | _devicePointerMotionHint;}
0128
0129 #define DeviceButton1Motion(d,type,_class) \
0130 { _class = ((XDevice *) d)->device_id << 8 | _deviceButton1Motion;}
0131
0132 #define DeviceButton2Motion(d,type,_class) \
0133 { _class = ((XDevice *) d)->device_id << 8 | _deviceButton2Motion;}
0134
0135 #define DeviceButton3Motion(d,type,_class) \
0136 { _class = ((XDevice *) d)->device_id << 8 | _deviceButton3Motion;}
0137
0138 #define DeviceButton4Motion(d,type, _class) \
0139 { _class = ((XDevice *) d)->device_id << 8 | _deviceButton4Motion;}
0140
0141 #define DeviceButton5Motion(d,type,_class) \
0142 { _class = ((XDevice *) d)->device_id << 8 | _deviceButton5Motion;}
0143
0144 #define DeviceButtonMotion(d,type, _class) \
0145 { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonMotion;}
0146
0147 #define DeviceOwnerGrabButton(d,type,_class) \
0148 { _class = ((XDevice *) d)->device_id << 8 | _deviceOwnerGrabButton;}
0149
0150 #define DeviceButtonPressGrab(d,type,_class) \
0151 { _class = ((XDevice *) d)->device_id << 8 | _deviceButtonGrab;}
0152
0153 #define NoExtensionEvent(d,type,_class) \
0154 { _class = ((XDevice *) d)->device_id << 8 | _noExtensionEvent;}
0155
0156
0157
0158 #if defined(__cplusplus) || defined(c_plusplus)
0159 extern "C" {
0160 #endif
0161 extern int _XiGetDevicePresenceNotifyEvent(Display *);
0162 extern void _xibaddevice( Display *dpy, int *error);
0163 extern void _xibadclass( Display *dpy, int *error);
0164 extern void _xibadevent( Display *dpy, int *error);
0165 extern void _xibadmode( Display *dpy, int *error);
0166 extern void _xidevicebusy( Display *dpy, int *error);
0167 #if defined(__cplusplus) || defined(c_plusplus)
0168 }
0169 #endif
0170
0171 #define DevicePresence(dpy, type, _class) \
0172 { \
0173 type = _XiGetDevicePresenceNotifyEvent(dpy); \
0174 _class = (0x10000 | _devicePresence); \
0175 }
0176
0177
0178 #define BadDevice(dpy,error) _xibaddevice(dpy, &error)
0179
0180 #define BadClass(dpy,error) _xibadclass(dpy, &error)
0181
0182 #define BadEvent(dpy,error) _xibadevent(dpy, &error)
0183
0184 #define BadMode(dpy,error) _xibadmode(dpy, &error)
0185
0186 #define DeviceBusy(dpy,error) _xidevicebusy(dpy, &error)
0187
0188 typedef struct _XAnyClassinfo *XAnyClassPtr;
0189
0190
0191
0192
0193
0194
0195
0196
0197
0198
0199 typedef struct
0200 {
0201 int type;
0202 unsigned long serial;
0203 Bool send_event;
0204 Display *display;
0205 Window window;
0206 XID deviceid;
0207 Window root;
0208 Window subwindow;
0209 Time time;
0210 int x, y;
0211 int x_root;
0212 int y_root;
0213 unsigned int state;
0214 unsigned int keycode;
0215 Bool same_screen;
0216 unsigned int device_state;
0217 unsigned char axes_count;
0218 unsigned char first_axis;
0219 int axis_data[6];
0220 } XDeviceKeyEvent;
0221
0222 typedef XDeviceKeyEvent XDeviceKeyPressedEvent;
0223 typedef XDeviceKeyEvent XDeviceKeyReleasedEvent;
0224
0225
0226
0227
0228
0229
0230
0231
0232 typedef struct {
0233 int type;
0234 unsigned long serial;
0235 Bool send_event;
0236 Display *display;
0237 Window window;
0238 XID deviceid;
0239 Window root;
0240 Window subwindow;
0241 Time time;
0242 int x, y;
0243 int x_root;
0244 int y_root;
0245 unsigned int state;
0246 unsigned int button;
0247 Bool same_screen;
0248 unsigned int device_state;
0249 unsigned char axes_count;
0250 unsigned char first_axis;
0251 int axis_data[6];
0252 } XDeviceButtonEvent;
0253
0254 typedef XDeviceButtonEvent XDeviceButtonPressedEvent;
0255 typedef XDeviceButtonEvent XDeviceButtonReleasedEvent;
0256
0257
0258
0259
0260
0261
0262
0263
0264 typedef struct
0265 {
0266 int type;
0267 unsigned long serial;
0268 Bool send_event;
0269 Display *display;
0270 Window window;
0271 XID deviceid;
0272 Window root;
0273 Window subwindow;
0274 Time time;
0275 int x, y;
0276 int x_root;
0277 int y_root;
0278 unsigned int state;
0279 char is_hint;
0280 Bool same_screen;
0281 unsigned int device_state;
0282 unsigned char axes_count;
0283 unsigned char first_axis;
0284 int axis_data[6];
0285 } XDeviceMotionEvent;
0286
0287
0288
0289
0290
0291
0292
0293
0294 typedef struct
0295 {
0296 int type;
0297 unsigned long serial;
0298 Bool send_event;
0299 Display *display;
0300 Window window;
0301 XID deviceid;
0302 int mode;
0303 int detail;
0304
0305
0306
0307
0308
0309 Time time;
0310 } XDeviceFocusChangeEvent;
0311
0312 typedef XDeviceFocusChangeEvent XDeviceFocusInEvent;
0313 typedef XDeviceFocusChangeEvent XDeviceFocusOutEvent;
0314
0315
0316
0317
0318
0319
0320
0321
0322 typedef struct
0323 {
0324 int type;
0325 unsigned long serial;
0326 Bool send_event;
0327 Display *display;
0328 Window window;
0329 XID deviceid;
0330 Window root;
0331 Window subwindow;
0332 Time time;
0333 int x, y;
0334 int x_root, y_root;
0335 unsigned int state;
0336 Bool same_screen;
0337 unsigned int device_state;
0338 unsigned char axes_count;
0339 unsigned char first_axis;
0340 int axis_data[6];
0341 } XProximityNotifyEvent;
0342 typedef XProximityNotifyEvent XProximityInEvent;
0343 typedef XProximityNotifyEvent XProximityOutEvent;
0344
0345
0346
0347
0348
0349
0350
0351
0352 typedef struct
0353 {
0354 #if defined(__cplusplus) || defined(c_plusplus)
0355 unsigned char c_class;
0356 #else
0357 unsigned char class;
0358 #endif
0359 unsigned char length;
0360 } XInputClass;
0361
0362 typedef struct {
0363 int type;
0364 unsigned long serial;
0365 Bool send_event;
0366 Display *display;
0367 Window window;
0368 XID deviceid;
0369 Time time;
0370 int num_classes;
0371 char data[64];
0372 } XDeviceStateNotifyEvent;
0373
0374 typedef struct {
0375 #if defined(__cplusplus) || defined(c_plusplus)
0376 unsigned char c_class;
0377 #else
0378 unsigned char class;
0379 #endif
0380 unsigned char length;
0381 unsigned char num_valuators;
0382 unsigned char mode;
0383 int valuators[6];
0384 } XValuatorStatus;
0385
0386 typedef struct {
0387 #if defined(__cplusplus) || defined(c_plusplus)
0388 unsigned char c_class;
0389 #else
0390 unsigned char class;
0391 #endif
0392 unsigned char length;
0393 short num_keys;
0394 char keys[32];
0395 } XKeyStatus;
0396
0397 typedef struct {
0398 #if defined(__cplusplus) || defined(c_plusplus)
0399 unsigned char c_class;
0400 #else
0401 unsigned char class;
0402 #endif
0403 unsigned char length;
0404 short num_buttons;
0405 char buttons[32];
0406 } XButtonStatus;
0407
0408
0409
0410
0411
0412
0413
0414
0415 typedef struct {
0416 int type;
0417 unsigned long serial;
0418 Bool send_event;
0419 Display *display;
0420 Window window;
0421 XID deviceid;
0422 Time time;
0423 int request;
0424
0425 int first_keycode;
0426 int count;
0427 } XDeviceMappingEvent;
0428
0429
0430
0431
0432
0433
0434
0435
0436 typedef struct {
0437 int type;
0438 unsigned long serial;
0439 Bool send_event;
0440 Display *display;
0441 Window window;
0442 XID deviceid;
0443 Time time;
0444 int request;
0445 } XChangeDeviceNotifyEvent;
0446
0447
0448
0449
0450
0451
0452
0453
0454
0455
0456
0457
0458
0459
0460 typedef struct {
0461 int type;
0462 unsigned long serial;
0463 Bool send_event;
0464 Display *display;
0465 Window window;
0466 Time time;
0467 Bool devchange;
0468 XID deviceid;
0469 XID control;
0470 } XDevicePresenceNotifyEvent;
0471
0472
0473
0474
0475
0476 typedef struct {
0477 int type;
0478 unsigned long serial;
0479 Bool send_event;
0480 Display *display;
0481 Window window;
0482 Time time;
0483 XID deviceid;
0484 Atom atom;
0485 int state;
0486 } XDevicePropertyNotifyEvent;
0487
0488
0489
0490
0491
0492
0493
0494
0495
0496
0497 typedef struct {
0498 #if defined(__cplusplus) || defined(c_plusplus)
0499 XID c_class;
0500 #else
0501 XID class;
0502 #endif
0503 int length;
0504 XID id;
0505 } XFeedbackState;
0506
0507 typedef struct {
0508 #if defined(__cplusplus) || defined(c_plusplus)
0509 XID c_class;
0510 #else
0511 XID class;
0512 #endif
0513 int length;
0514 XID id;
0515 int click;
0516 int percent;
0517 int pitch;
0518 int duration;
0519 int led_mask;
0520 int global_auto_repeat;
0521 char auto_repeats[32];
0522 } XKbdFeedbackState;
0523
0524 typedef struct {
0525 #if defined(__cplusplus) || defined(c_plusplus)
0526 XID c_class;
0527 #else
0528 XID class;
0529 #endif
0530 int length;
0531 XID id;
0532 int accelNum;
0533 int accelDenom;
0534 int threshold;
0535 } XPtrFeedbackState;
0536
0537 typedef struct {
0538 #if defined(__cplusplus) || defined(c_plusplus)
0539 XID c_class;
0540 #else
0541 XID class;
0542 #endif
0543 int length;
0544 XID id;
0545 int resolution;
0546 int minVal;
0547 int maxVal;
0548 } XIntegerFeedbackState;
0549
0550 typedef struct {
0551 #if defined(__cplusplus) || defined(c_plusplus)
0552 XID c_class;
0553 #else
0554 XID class;
0555 #endif
0556 int length;
0557 XID id;
0558 int max_symbols;
0559 int num_syms_supported;
0560 KeySym *syms_supported;
0561 } XStringFeedbackState;
0562
0563 typedef struct {
0564 #if defined(__cplusplus) || defined(c_plusplus)
0565 XID c_class;
0566 #else
0567 XID class;
0568 #endif
0569 int length;
0570 XID id;
0571 int percent;
0572 int pitch;
0573 int duration;
0574 } XBellFeedbackState;
0575
0576 typedef struct {
0577 #if defined(__cplusplus) || defined(c_plusplus)
0578 XID c_class;
0579 #else
0580 XID class;
0581 #endif
0582 int length;
0583 XID id;
0584 int led_values;
0585 int led_mask;
0586 } XLedFeedbackState;
0587
0588 typedef struct {
0589 #if defined(__cplusplus) || defined(c_plusplus)
0590 XID c_class;
0591 #else
0592 XID class;
0593 #endif
0594 int length;
0595 XID id;
0596 } XFeedbackControl;
0597
0598 typedef struct {
0599 #if defined(__cplusplus) || defined(c_plusplus)
0600 XID c_class;
0601 #else
0602 XID class;
0603 #endif
0604 int length;
0605 XID id;
0606 int accelNum;
0607 int accelDenom;
0608 int threshold;
0609 } XPtrFeedbackControl;
0610
0611 typedef struct {
0612 #if defined(__cplusplus) || defined(c_plusplus)
0613 XID c_class;
0614 #else
0615 XID class;
0616 #endif
0617 int length;
0618 XID id;
0619 int click;
0620 int percent;
0621 int pitch;
0622 int duration;
0623 int led_mask;
0624 int led_value;
0625 int key;
0626 int auto_repeat_mode;
0627 } XKbdFeedbackControl;
0628
0629 typedef struct {
0630 #if defined(__cplusplus) || defined(c_plusplus)
0631 XID c_class;
0632 #else
0633 XID class;
0634 #endif
0635 int length;
0636 XID id;
0637 int num_keysyms;
0638 KeySym *syms_to_display;
0639 } XStringFeedbackControl;
0640
0641 typedef struct {
0642 #if defined(__cplusplus) || defined(c_plusplus)
0643 XID c_class;
0644 #else
0645 XID class;
0646 #endif
0647 int length;
0648 XID id;
0649 int int_to_display;
0650 } XIntegerFeedbackControl;
0651
0652 typedef struct {
0653 #if defined(__cplusplus) || defined(c_plusplus)
0654 XID c_class;
0655 #else
0656 XID class;
0657 #endif
0658 int length;
0659 XID id;
0660 int percent;
0661 int pitch;
0662 int duration;
0663 } XBellFeedbackControl;
0664
0665 typedef struct {
0666 #if defined(__cplusplus) || defined(c_plusplus)
0667 XID c_class;
0668 #else
0669 XID class;
0670 #endif
0671 int length;
0672 XID id;
0673 int led_mask;
0674 int led_values;
0675 } XLedFeedbackControl;
0676
0677
0678
0679
0680
0681
0682
0683 typedef struct {
0684 XID control;
0685 int length;
0686 } XDeviceControl;
0687
0688 typedef struct {
0689 XID control;
0690 int length;
0691 int first_valuator;
0692 int num_valuators;
0693 int *resolutions;
0694 } XDeviceResolutionControl;
0695
0696 typedef struct {
0697 XID control;
0698 int length;
0699 int num_valuators;
0700 int *resolutions;
0701 int *min_resolutions;
0702 int *max_resolutions;
0703 } XDeviceResolutionState;
0704
0705 typedef struct {
0706 XID control;
0707 int length;
0708 int min_x;
0709 int max_x;
0710 int min_y;
0711 int max_y;
0712 int flip_x;
0713 int flip_y;
0714 int rotation;
0715 int button_threshold;
0716 } XDeviceAbsCalibControl, XDeviceAbsCalibState;
0717
0718 typedef struct {
0719 XID control;
0720 int length;
0721 int offset_x;
0722 int offset_y;
0723 int width;
0724 int height;
0725 int screen;
0726 XID following;
0727 } XDeviceAbsAreaControl, XDeviceAbsAreaState;
0728
0729 typedef struct {
0730 XID control;
0731 int length;
0732 int status;
0733 } XDeviceCoreControl;
0734
0735 typedef struct {
0736 XID control;
0737 int length;
0738 int status;
0739 int iscore;
0740 } XDeviceCoreState;
0741
0742 typedef struct {
0743 XID control;
0744 int length;
0745 int enable;
0746 } XDeviceEnableControl, XDeviceEnableState;
0747
0748
0749
0750
0751
0752
0753
0754
0755
0756
0757
0758 typedef struct _XAnyClassinfo {
0759 #if defined(__cplusplus) || defined(c_plusplus)
0760 XID c_class;
0761 #else
0762 XID class;
0763 #endif
0764 int length;
0765 } XAnyClassInfo;
0766
0767 typedef struct _XDeviceInfo *XDeviceInfoPtr;
0768
0769 typedef struct _XDeviceInfo
0770 {
0771 XID id;
0772 Atom type;
0773 char *name;
0774 int num_classes;
0775 int use;
0776 XAnyClassPtr inputclassinfo;
0777 } XDeviceInfo;
0778
0779 typedef struct _XKeyInfo *XKeyInfoPtr;
0780
0781 typedef struct _XKeyInfo
0782 {
0783 #if defined(__cplusplus) || defined(c_plusplus)
0784 XID c_class;
0785 #else
0786 XID class;
0787 #endif
0788 int length;
0789 unsigned short min_keycode;
0790 unsigned short max_keycode;
0791 unsigned short num_keys;
0792 } XKeyInfo;
0793
0794 typedef struct _XButtonInfo *XButtonInfoPtr;
0795
0796 typedef struct _XButtonInfo {
0797 #if defined(__cplusplus) || defined(c_plusplus)
0798 XID c_class;
0799 #else
0800 XID class;
0801 #endif
0802 int length;
0803 short num_buttons;
0804 } XButtonInfo;
0805
0806 typedef struct _XAxisInfo *XAxisInfoPtr;
0807
0808 typedef struct _XAxisInfo {
0809 int resolution;
0810 int min_value;
0811 int max_value;
0812 } XAxisInfo;
0813
0814 typedef struct _XValuatorInfo *XValuatorInfoPtr;
0815
0816 typedef struct _XValuatorInfo
0817 {
0818 #if defined(__cplusplus) || defined(c_plusplus)
0819 XID c_class;
0820 #else
0821 XID class;
0822 #endif
0823 int length;
0824 unsigned char num_axes;
0825 unsigned char mode;
0826 unsigned long motion_buffer;
0827 XAxisInfoPtr axes;
0828 } XValuatorInfo;
0829
0830
0831
0832
0833
0834
0835
0836
0837
0838
0839
0840
0841 typedef struct {
0842 unsigned char input_class;
0843 unsigned char event_type_base;
0844 } XInputClassInfo;
0845
0846 typedef struct {
0847 XID device_id;
0848 int num_classes;
0849 XInputClassInfo *classes;
0850 } XDevice;
0851
0852
0853
0854
0855
0856
0857
0858
0859
0860 typedef struct {
0861 XEventClass event_type;
0862 XID device;
0863 } XEventList;
0864
0865
0866
0867
0868
0869
0870
0871
0872
0873 typedef struct {
0874 Time time;
0875 int *data;
0876 } XDeviceTimeCoord;
0877
0878
0879
0880
0881
0882
0883
0884
0885
0886 typedef struct {
0887 XID device_id;
0888 int num_classes;
0889 XInputClass *data;
0890 } XDeviceState;
0891
0892
0893
0894
0895
0896
0897
0898
0899
0900
0901
0902
0903 typedef struct {
0904 #if defined(__cplusplus) || defined(c_plusplus)
0905 unsigned char c_class;
0906 #else
0907 unsigned char class;
0908 #endif
0909 unsigned char length;
0910 unsigned char num_valuators;
0911 unsigned char mode;
0912 int *valuators;
0913 } XValuatorState;
0914
0915 typedef struct {
0916 #if defined(__cplusplus) || defined(c_plusplus)
0917 unsigned char c_class;
0918 #else
0919 unsigned char class;
0920 #endif
0921 unsigned char length;
0922 short num_keys;
0923 char keys[32];
0924 } XKeyState;
0925
0926 typedef struct {
0927 #if defined(__cplusplus) || defined(c_plusplus)
0928 unsigned char c_class;
0929 #else
0930 unsigned char class;
0931 #endif
0932 unsigned char length;
0933 short num_buttons;
0934 char buttons[32];
0935 } XButtonState;
0936
0937
0938
0939
0940
0941
0942
0943
0944
0945 _XFUNCPROTOBEGIN
0946
0947 extern int XChangeKeyboardDevice(
0948 Display* ,
0949 XDevice*
0950 );
0951
0952 extern int XChangePointerDevice(
0953 Display* ,
0954 XDevice* ,
0955 int ,
0956 int
0957 );
0958
0959 extern int XGrabDevice(
0960 Display* ,
0961 XDevice* ,
0962 Window ,
0963 Bool ,
0964 int ,
0965 XEventClass* ,
0966 int ,
0967 int ,
0968 Time
0969 );
0970
0971 extern int XUngrabDevice(
0972 Display* ,
0973 XDevice* ,
0974 Time
0975 );
0976
0977 extern int XGrabDeviceKey(
0978 Display* ,
0979 XDevice* ,
0980 unsigned int ,
0981 unsigned int ,
0982 XDevice* ,
0983 Window ,
0984 Bool ,
0985 unsigned int ,
0986 XEventClass* ,
0987 int ,
0988 int
0989 );
0990
0991 extern int XUngrabDeviceKey(
0992 Display* ,
0993 XDevice* ,
0994 unsigned int ,
0995 unsigned int ,
0996 XDevice* ,
0997 Window
0998 );
0999
1000 extern int XGrabDeviceButton(
1001 Display* ,
1002 XDevice* ,
1003 unsigned int ,
1004 unsigned int ,
1005 XDevice* ,
1006 Window ,
1007 Bool ,
1008 unsigned int ,
1009 XEventClass* ,
1010 int ,
1011 int
1012 );
1013
1014 extern int XUngrabDeviceButton(
1015 Display* ,
1016 XDevice* ,
1017 unsigned int ,
1018 unsigned int ,
1019 XDevice* ,
1020 Window
1021 );
1022
1023 extern int XAllowDeviceEvents(
1024 Display* ,
1025 XDevice* ,
1026 int ,
1027 Time
1028 );
1029
1030 extern int XGetDeviceFocus(
1031 Display* ,
1032 XDevice* ,
1033 Window* ,
1034 int* ,
1035 Time*
1036 );
1037
1038 extern int XSetDeviceFocus(
1039 Display* ,
1040 XDevice* ,
1041 Window ,
1042 int ,
1043 Time
1044 );
1045
1046 extern XFeedbackState *XGetFeedbackControl(
1047 Display* ,
1048 XDevice* ,
1049 int*
1050 );
1051
1052 extern void XFreeFeedbackList(
1053 XFeedbackState*
1054 );
1055
1056 extern int XChangeFeedbackControl(
1057 Display* ,
1058 XDevice* ,
1059 unsigned long ,
1060 XFeedbackControl*
1061 );
1062
1063 extern int XDeviceBell(
1064 Display* ,
1065 XDevice* ,
1066 XID ,
1067 XID ,
1068 int
1069 );
1070
1071 extern KeySym *XGetDeviceKeyMapping(
1072 Display* ,
1073 XDevice* ,
1074 #if NeedWidePrototypes
1075 unsigned int ,
1076 #else
1077 KeyCode ,
1078 #endif
1079 int ,
1080 int*
1081 );
1082
1083 extern int XChangeDeviceKeyMapping(
1084 Display* ,
1085 XDevice* ,
1086 int ,
1087 int ,
1088 KeySym* ,
1089 int
1090 );
1091
1092 extern XModifierKeymap *XGetDeviceModifierMapping(
1093 Display* ,
1094 XDevice*
1095 );
1096
1097 extern int XSetDeviceModifierMapping(
1098 Display* ,
1099 XDevice* ,
1100 XModifierKeymap*
1101 );
1102
1103 extern int XSetDeviceButtonMapping(
1104 Display* ,
1105 XDevice* ,
1106 unsigned char* ,
1107 int
1108 );
1109
1110 extern int XGetDeviceButtonMapping(
1111 Display* ,
1112 XDevice* ,
1113 unsigned char* ,
1114 unsigned int
1115 );
1116
1117 extern XDeviceState *XQueryDeviceState(
1118 Display* ,
1119 XDevice*
1120 );
1121
1122 extern void XFreeDeviceState(
1123 XDeviceState*
1124 );
1125
1126 extern XExtensionVersion *XGetExtensionVersion(
1127 Display* ,
1128 _Xconst char*
1129 );
1130
1131 extern XDeviceInfo *XListInputDevices(
1132 Display* ,
1133 int*
1134 );
1135
1136 extern void XFreeDeviceList(
1137 XDeviceInfo*
1138 );
1139
1140 extern XDevice *XOpenDevice(
1141 Display* ,
1142 XID
1143 );
1144
1145 extern int XCloseDevice(
1146 Display* ,
1147 XDevice*
1148 );
1149
1150 extern int XSetDeviceMode(
1151 Display* ,
1152 XDevice* ,
1153 int
1154 );
1155
1156 extern int XSetDeviceValuators(
1157 Display* ,
1158 XDevice* ,
1159 int* ,
1160 int ,
1161 int
1162 );
1163
1164 extern XDeviceControl *XGetDeviceControl(
1165 Display* ,
1166 XDevice* ,
1167 int
1168 );
1169
1170 extern int XChangeDeviceControl(
1171 Display* ,
1172 XDevice* ,
1173 int ,
1174 XDeviceControl*
1175 );
1176
1177 extern int XSelectExtensionEvent(
1178 Display* ,
1179 Window ,
1180 XEventClass* ,
1181 int
1182 );
1183
1184 extern int XGetSelectedExtensionEvents(
1185 Display* ,
1186 Window ,
1187 int* ,
1188 XEventClass** ,
1189 int* ,
1190 XEventClass**
1191 );
1192
1193 extern int XChangeDeviceDontPropagateList(
1194 Display* ,
1195 Window ,
1196 int ,
1197 XEventClass* ,
1198 int
1199 );
1200
1201 extern XEventClass *XGetDeviceDontPropagateList(
1202 Display* ,
1203 Window ,
1204 int*
1205 );
1206
1207 extern Status XSendExtensionEvent(
1208 Display* ,
1209 XDevice* ,
1210 Window ,
1211 Bool ,
1212 int ,
1213 XEventClass* ,
1214 XEvent*
1215 );
1216
1217 extern XDeviceTimeCoord *XGetDeviceMotionEvents(
1218 Display* ,
1219 XDevice* ,
1220 Time ,
1221 Time ,
1222 int* ,
1223 int* ,
1224 int*
1225 );
1226
1227 extern void XFreeDeviceMotionEvents(
1228 XDeviceTimeCoord*
1229 );
1230
1231 extern void XFreeDeviceControl(
1232 XDeviceControl*
1233 );
1234
1235 extern Atom* XListDeviceProperties(
1236 Display* ,
1237 XDevice* ,
1238 int*
1239 );
1240
1241 extern void XChangeDeviceProperty(
1242 Display* ,
1243 XDevice* ,
1244 Atom ,
1245 Atom ,
1246 int ,
1247 int ,
1248 _Xconst unsigned char * ,
1249 int
1250 );
1251
1252 extern void
1253 XDeleteDeviceProperty(
1254 Display* ,
1255 XDevice* ,
1256 Atom
1257 );
1258
1259 extern Status
1260 XGetDeviceProperty(
1261 Display* ,
1262 XDevice* ,
1263 Atom ,
1264 long ,
1265 long ,
1266 Bool ,
1267 Atom ,
1268 Atom* ,
1269 int* ,
1270 unsigned long* ,
1271 unsigned long* ,
1272 unsigned char**
1273 );
1274
1275 _XFUNCPROTOEND
1276
1277 #endif