XOpenDevice(3X11) | X FUNCTIONS | XOpenDevice(3X11) |
̾??¶
XOpenDevice, XCloseDevice - ??ĥ???ϥǥХ??????ץ?/????????????
????¶
XDevice *XOpenDevice(display, device_id)
Display *display;
XID device_id; XCloseDevice(display, device)
Display *display;
XDevice *device;
??????¶
????¶
XOpenDevice ?ꥯ?????Ȥ????ϵ?ǽ??ĥ?ץ??ȥ????ꥯ?????Ȥ??̤??ƥ??饤?????Ȥ? ???ϥǥХ????˥????????Ǥ????褦?ˤ??롣 ???????????硢?ؿ??? XDevice ??¤?ΤؤΥݥ????֤???
XCloseDevice ?ꥯ?????Ȥϡ????ϵ?ǽ??ĥ?ץ??ȥ??????̤??? ???饤?????Ȥ????ϥǥХ????˥????????Ǥ??ʤ??褦?ˤ??롣 ???ϵ?ǽ??ĥ???̤??????ϥǥ? ???????ץ????饤?????Ȥϡ???λ???????ˤ? CloseDevice ?? ?̤??Ƥ????????????ʤ????Фʤ??ʤ???
???饤?????Ȥ? XCloseDevice ?ꥯ?????Ȥ?ȯ?Ԥ????ȡ????饤?????? ???ǥХ??????˻??äƤ??륢???ƥ??֤ʥ????֤????Ʋ????????롣 ???饤?????Ȥ????äƤ??????ƤΥ??٥??ȥ??쥯???????ȥѥå??֤ʥ????֤? ?????????롣 ?ꥯ?????Ȥ??Ф??????饤?????Ȥ????ΥǥХ????˥??????????Ƥ????Ǹ??? ???饤?????ȤǤ????С?X ?????Ф? X ?ˤ??뤽?ΥǥХ????ؤΥ????????? ????̵???ˤ??뤫?⤷???ʤ???
XOpenDevice ?? XCloseDevice ?? BadDevice ???顼???? ???????Ȥ????롣
??¤??¶
The XOpenDevice ???֤? XDevice ??¤?Τ????Ƥ???
typedef struct { XID device_id; int num_classes; XInputClassInfo *classes; } XDevice;
classes ?ե??????ɤ? XInputClassInfo ??¤?Τ??????ؤΥݥ??Ǥ??롣 ?????????γ????Ǥϡ????ꤷ???ǥХ????????ݡ??Ȥ??Ƥ??????ϤΥ??饹???? ???륤?٥??ȷ??١????????ġ? num_class ?ե??????ɤ????? classes ?????ǿ?????
XInputClassInfo ??¤?Τ????Ƥ??ʲ??˼?????
typedef struct { unsigned char input_class; unsigned char event_type_base; } XInputClassInfo;
input_class ?ե??????ɤǤϥǥХ????????ݡ??Ȥ??????ϤΥ??饹??1?ļ??? ???롣?????????Ƥ??뷿?? KeyClass, ButtonClass, ValuatorClass, ProximityClass, FeedbackClass, FocusClass, OtherClass ???ޤࡣ event_type_base ?Ϥ??Υ??饹?κǽ??Υ??٥??ȤΥ??٥??ȷ??????̤??롣
XInputClassInfo ??¤?Τ˴ޤޤ??Ƥ????????ϡ????饤?????Ȥ? XSelectExtensionEvent ?ꥯ?????Ȥ??Ԥ????˻Ȥ????٥??ȥ??饹???? ?뤿???Υޥ????ˤ??äƻȤ????롣?????????????Ƥ????ޥ????? DeviceKeyPress, DeviceKeyRelease, DeviceButtonPress, DeviceButtonRelese, DeviceMotionNotify, DeviceFocusIn, DeviceFocusOut, ProximityIn, ProximityOut, DeviceStateNotify, DeviceMappiingNotify, ChangeDeviceNotify, DevicePointerMotionHint, DeviceButton1Motion, DeviceButton2Motion, DeviceButton3Motion, DeviceButton4Motion, DeviceButton5Motion, DeviceButtonMotion, DeviceOwnerGrabButton, DeviceButtonPressGrab, NoExtensionEvent ?Ǥ??롣
?????ΥǥХ??????Ф???Ŭ?ڤʥ??٥??ȥ??饹?????뤿???ˤϡ????ΥǥХ??? ???Ф??? XDevice ??¤?Τ??Ȥäƾ嵭?Υޥ?????1?Ĥ??ƤӽФ??? ?㤨?С?
DeviceKeyPress (*device, type, eventclass);
?ϡ?DeviceKeyPress ???٥??ȷ??????ӡ????ꤷ???ǥХ????????????? ??DeviceKeyPress ???٥??Ȥ??Ф??륤?٥??ȥ??饹???֤???
?????ʹߡ????? eventclass ?Ϥ??ΥǥХ????????? DeviceKeyPress ???٥??Ȥ??????褦?????Ф˵????? XSelectExtensionEvent ?ꥯ?????Ȥ??Ѥ??????롣 ???줿???٥??Ȥ? XNextEvent ????ͳ???Ƽ????????졢type ?ϥ??٥??Ȥη??Ȥ????ӤǻȤ????Ȥ??Ǥ??롣
?֤???¶
- BadDevice
- ?????ʥǥХ????????ꤵ?줿?????ꤷ???ǥХ?????¸?ߤ??ʤ????????ꤷ???? ?Х????? X ?Υ????ܡ??ɤ? X ?Υݥ??Ǥ??롣???ꤷ???ǥХ?????¾?Υ? ?饤?????Ȥ? XChangeKeyboardDevice ?ꥯ?????Ȥ? XChangePointerDevice ?ꥯ?????Ȥˤ??ä? X ?Υ????ܡ??ɤ? X ?Υ? ???ˤ??줿?????ˤ⤳?Υ??顼??ȯ?????롣
??Ϣ????¶
Programming with Xlib
Release 6.5 | X Version 11 |