head 1.2; access; symbols netbsd-7-2-RELEASE:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 netbsd-7-1:1.1.1.3.0.14 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.3 netbsd-6-1-5-RELEASE:1.1.1.3 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 netbsd-6-1-4-RELEASE:1.1.1.3 netbsd-6-0-5-RELEASE:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2:1.1.1.3.0.8 riastradh-drm2-base:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.3 netbsd-6-0-4-RELEASE:1.1.1.3 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.3 netbsd-6-0-3-RELEASE:1.1.1.3 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.3 xorg-server-1-10-6:1.1.1.3 netbsd-6-1:1.1.1.3.0.6 netbsd-6-0-2-RELEASE:1.1.1.3 netbsd-6-1-RELEASE:1.1.1.3 netbsd-6-1-RC4:1.1.1.3 netbsd-6-1-RC3:1.1.1.3 netbsd-6-1-RC2:1.1.1.3 netbsd-6-1-RC1:1.1.1.3 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.3 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.3.0.4 netbsd-6-0-RELEASE:1.1.1.3 netbsd-6-0-RC2:1.1.1.3 netbsd-6-0-RC1:1.1.1.3 netbsd-6:1.1.1.3.0.2 netbsd-6-base:1.1.1.3 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 xorg-server-1-10-3:1.1.1.3 mrg-xorg-server-1-9-5-pre-1-10-3:1.1.1.2 xorg-server-1-9-5:1.1.1.2 xorg-server-1-9-2:1.1.1.2 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 netbsd-5-1-RC3:1.1.1.1 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 xorg-server-1-6-5:1.1.1.1 xorg-server-1-6-3:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 xorg-server-1-6-2:1.1.1.1 xorg-server-1-6-1-901:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 xorg-server-1-4-2:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2016.08.11.00.04.28; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.30; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.30; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.16; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.50; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @
#include "dmxinputinit.h"#include "dmxevents.h"#include "dmxcb.h"#include "dmxcommon.h"#include "dmxcursor.h"#include "dmxmotion.h"#include "dmxeq.h"#include "dmxsigio.h"#include "dmxmap.h"#include "keysym.h"#include "opaque.h"#include "inputstr.h"#include "mipointer.h"#include "XIstubs.h"Functions | |
| void | dmxGetGlobalPosition (int *x, int *y) |
| void | dmxInvalidateGlobalPosition (void) |
| void | dmxMotion (DevicePtr pDev, int *v, int firstAxes, int axesCount, DMXMotionType type, DMXBlockType block) |
| void | dmxEnqueue (DevicePtr pDev, int type, int detail, KeySym keySym, XEvent *e, DMXBlockType block) |
| int | dmxCheckSpecialKeys (DevicePtr pDev, KeySym keySym) |
|
||||||||||||
|
A pointer to this routine is passed to low-level input drivers so that all special keychecking is unified to this file. This function returns 0 if no special keys have been pressed. If the user has requested termination of the DMX server, -1 is returned. If the user has requested a switch to a VT, then the (1-based) number of that VT is returned. |
|
||||||||||||||||||||||||||||
|
Enqueue a non-motion event from the pDev device with the specified type and detail. If the event is a KeyPress or KeyRelease event, then the keySym is also specified. If block is set to DMX_BLOCK, then the SIGIO handler will be blocked around calls to dmxeqEnqueue(). |
|
||||||||||||
|
Return DMX's notion of the pointer position in the global coordinate space. |
|
|
Invalidate the global position for #dmxCoreMotion. |
|
||||||||||||||||||||||||||||
|
Enqueue a motion event for pDev. The v vector has length axesCount, and contains values for each of the axes, starting at firstAxes. The type of the motion may be DMX_RELATIVE, DMX_ABSOLUTE, or DMX_ABSOLUTE_CONFINED (in the latter case, the pointer will not be allowed to move outside the global boundaires). If block is set to DMX_BLOCK, then the SIGIO handler will be blocked around calls to dmxeqEnqueue(). |
#include "dmxinputinit.h"#include "dmxevents.h"#include "dmxcb.h"#include "dmxcommon.h"#include "dmxcursor.h"#include "dmxmotion.h"#include "dmxsigio.h"#include "dmxmap.h"#include <X11/keysym.h>#include "opaque.h"#include "inputstr.h"#include "mipointer.h"#include "mi.h"#include "exglobals.h"#include "xkbsrv.h"#include "XIstubs.h"Defines | |
| #define | DMX_EVENTS_DEBUG 0 |
| #define | DMXDBG0(f) |
| #define | DMXDBG1(f, a) |
| #define | DMXDBG2(f, a, b) |
| #define | DMXDBG3(f, a, b, c) |
| #define | DMXDBG4(f, a, b, c, d) |
| #define | DMXDBG5(f, a, b, c, d, e) |
| #define | DMXDBG6(f, a, b, c, d, e, g) |
| #define | DMXDBG7(f, a, b, c, d, e, g, h) |
| #define | DMX_MAX_AXES 32 |
| #define | EXTRACT_VALUATORS(ke, valuators) |
Functions | |
| static int | dmxApplyFunctions (DMXInputInfo *dmxInput, DMXFunctionType f) |
| static int | dmxCheckFunctionKeys (DMXLocalInputInfoPtr dmxLocal, int type, KeySym keySym) |
| DMXScreenInfo * | dmxFindFirstScreen (int x, int y) |
| static void | enqueueMotion (DevicePtr pDev, int x, int y) |
| void | dmxCoreMotion (DevicePtr pDev, int x, int y, int delta, DMXBlockType block) |
| static void | dmxExtMotion (DMXLocalInputInfoPtr dmxLocal, int *v, int firstAxis, int axesCount, DMXMotionType type, DMXBlockType block) |
| static int | dmxTranslateAndEnqueueExtEvent (DMXLocalInputInfoPtr dmxLocal, XEvent *e, DMXBlockType block) |
| static int | dmxGetButtonMapping (DMXLocalInputInfoPtr dmxLocal, int button) |
| void | dmxGetGlobalPosition (int *x, int *y) |
| void | dmxInvalidateGlobalPosition (void) |
| void | dmxMotion (DevicePtr pDev, int *v, int firstAxes, int axesCount, DMXMotionType type, DMXBlockType block) |
| static KeySym | dmxKeyCodeToKeySym (DMXLocalInputInfoPtr dmxLocal, KeyCode keyCode) |
| static KeyCode | dmxKeySymToKeyCode (DMXLocalInputInfoPtr dmxLocal, KeySym keySym, int tryFirst) |
| static int | dmxFixup (DevicePtr pDev, int detail, KeySym keySym) |
| void | dmxEnqueue (DevicePtr pDev, int type, int detail, KeySym keySym, XEvent *e, DMXBlockType block) |
| int | dmxCheckSpecialKeys (DevicePtr pDev, KeySym keySym) |
Variables | |
| static int | dmxGlobalX |
| static int | dmxGlobalY |
| static int | dmxGlobalInvalid |
Provide support and helper functions for enqueing events received by the low-level input drivers.
| #define DMX_EVENTS_DEBUG 0 |
| #define DMX_MAX_AXES 32 |
Referenced by dmxExtMotion(), and othUSBGetInfo().
d34 1 a34 17| #define DMXDBG0 | ( | f | ) |
| #define DMXDBG1 | ( | f, | ||
| a | ||||
| ) |
| #define DMXDBG2 | ( | f, | a52 1a53 5 | a, | |||
| d55 2 a56 2 | b | d60 2 a61 2 | ) | a62 5 |
Referenced by dmxCheckSpecialKeys(), dmxEnqueue(), and dmxKeyCodeToKeySym().
a63 35| #define DMXDBG3 | ( | f, | |||||
| a, | |||||||
| b, | |||||||
| c | |||||||
| ) |
| #define DMXDBG4 | ( | f, | a90 1a91 5 | a, | |||
| d93 2 a94 2 | b, | a96 1a97 5 | c, | ||||
| d99 2 a100 2 | d | a103 23 | ) |
Referenced by dmxCoreMotion().
| #define DMXDBG5 | ( | f, | |||||
| d105 2 a106 2 | a, | a108 1a109 5 | b, | ||||
| d111 2 a112 2 | c, | a114 1a115 5 | d, | ||||
| d117 2 a118 2 | e | d122 2 a123 2 | ) | a124 3 |
Referenced by dmxCoreMotion().
| #define DMXDBG6 | ( | f, | |||||
| a, | |||||||
| b, | |||||||
| c, | |||||||
| d, | |||||||
| e, | |||||||
| g | |||||||
| ) |
| #define DMXDBG7 | ( | f, | a153 1a154 5 | a, | |
| d156 2 a157 2 | b, | a159 1d161 2 a162 2 | c, | a163 32||
| d, | |||||
| e, | |||||
| g, | |||||
| h | |||||
| ) |
| #define EXTRACT_VALUATORS | ( | ke, | |||||
| valuators | |||||||
| ) |
| static int dmxApplyFunctions | ( | DMXInputInfo * | dmxInput, | |
| DMXFunctionType | f | |||
| ) | [static] |
a192 5
References _DMXLocalInputInfo::binding, _DMXInputInfo::devs, _DMXLocalInputInfo::functions, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::private.
a193 31Referenced by dmxCheckFunctionKeys().
| static int dmxCheckFunctionKeys | ( | DMXLocalInputInfoPtr | dmxLocal, | ||||
| int | type, | ||||||
| KeySym | keySym | ||||||
| ) | [static] |
| int dmxCheckSpecialKeys | ( | DevicePtr | pDev, | a220 1a221 4 | KeySym | keySym |
| ) |
A pointer to this routine is passed to low-level input drivers so that all special keychecking is unified to this file. This function returns 0 if no special keys have been pressed. If the user has requested termination of the DMX server, -1 is returned. If the user has requested a switch to a VT, then the (1-based) number of that VT is returned.
References DMXDBG2, dmxInfo, dmxLocalCoreKeyboard, dmxLog(), and _DMXLocalInputInfo::pDevice.
Referenced by dmxCollectAll(), and dmxSigioHandler().
| void dmxCoreMotion | ( | DevicePtr | pDev, | a226 1a227 5 | int | x, | |
| d229 2 a230 2 | int | y, | a232 1a233 5 | int | delta, | ||
| d235 2 a236 2 | DMXBlockType | block | a239 25 | ) |
References _DMXLocalInputInfo::binding, _DMXInputInfo::detached, _DMXInputInfo::devs, DMXDBG4, DMXDBG5, DMXDBG6, dmxFindFirstScreen(), dmxGlobalHeight, dmxGlobalInvalid, dmxGlobalWidth, dmxGlobalX, dmxGlobalY, dmxInputs, dmxNumInputs, dmxScreens, dmxSigioBlock(), dmxSigioUnblock(), enqueueMotion(), _DMXScreenInfo::index, _DMXInputInfo::numDevs, _DMXLocalInputInfo::private, ProcessInputEvents(), _DMXScreenInfo::rootXOrigin, _DMXScreenInfo::rootYOrigin, _DMXLocalInputInfo::sendsCore, and _DMXLocalInputInfo::update_position.
Referenced by dmxMotion(), and dmxSetCursor().
| void dmxEnqueue | ( | DevicePtr | pDev, | ||
| d241 2 a242 2 | int | type, | a244 1a245 5 | int | detail, |
| d247 2 a248 2 | KeySym | keySym, | a250 1d252 2 a253 2 | XEvent * | e, | a254 16
| DMXBlockType | block | ||||
| ) |
Enqueue an event from the pDev device with the specified type and detail. If the event is a KeyPress or KeyRelease event, then the keySym is also specified.
FIXME: make the code do what the comment says, or remove this comment. If block is set to DMX_BLOCK, then the SIGIO handler will be blocked around calls to dmxeqEnqueue().
a255 51References dmxCheckFunctionKeys(), DMXDBG2, dmxEventName(), dmxFixup(), dmxGetButtonMapping(), dmxKeyCodeToKeySym(), dmxLocalCoreKeyboard, dmxLogInput(), dmxTranslateAndEnqueueExtEvent(), ProximityIn, and ProximityOut.
Referenced by dmxCollectAll(), and dmxSigioHandler().
| static void dmxExtMotion | ( | DMXLocalInputInfoPtr | dmxLocal, | ||
| int * | v, | ||||
| int | firstAxis, | ||||
| int | axesCount, | ||||
| DMXMotionType | type, | ||||
| DMXBlockType | block | ||||
| ) | [static] |
| DMXScreenInfo* dmxFindFirstScreen | ( | int | x, | |
| int | y | |||
| ) |
References dmxNumScreens, dmxOnScreen(), and dmxScreens.
Referenced by dmxCheckCursor(), and dmxCoreMotion().
| static int dmxFixup | ( | DevicePtr | pDev, | |
| int | detail, | |||
| KeySym | keySym | |||
| ) | [static] |
References dmxKeyCodeToKeySym(), dmxKeySymToKeyCode(), dmxLocalCoreKeyboard, dmxLog(), and dmxWarning.
Referenced by dmxEnqueue().
| static int dmxGetButtonMapping | ( | DMXLocalInputInfoPtr | dmxLocal, | |
| int | button | |||
| ) | [static] |
References dmxLog(), dmxWarning, and _DMXLocalInputInfo::pDevice.
Referenced by dmxEnqueue().
| void dmxGetGlobalPosition | ( | int * | x, | |
| int * | y | |||
| ) |
Return DMX's notion of the pointer position in the global coordinate space.
References dmxGlobalX, and dmxGlobalY.
Referenced by dmxBackendLateReInit(), dmxCheckCursor(), dmxConsoleUpdateFineCursor(), dmxHideCursor(), and dmxSetCursor().
| void dmxInvalidateGlobalPosition | ( | void | ) |
Invalidate the global position for dmxCoreMotion.
References dmxGlobalInvalid.
Referenced by dmxBackendLateReInit().
| static KeySym dmxKeyCodeToKeySym | ( | DMXLocalInputInfoPtr | dmxLocal, | |
| KeyCode | keyCode | |||
| ) | [static] |
References DMXDBG2, and _DMXLocalInputInfo::pDevice.
Referenced by dmxEnqueue(), dmxFixup(), and dmxKeySymToKeyCode().
| static KeyCode dmxKeySymToKeyCode | ( | DMXLocalInputInfoPtr | dmxLocal, | |
| KeySym | keySym, | |||
| int | tryFirst | |||
| ) | [static] |
References DMXDBG3, dmxKeyCodeToKeySym(), dmxLocalCoreKeyboard, and _DMXLocalInputInfo::pDevice.
Referenced by dmxFixup().
| void dmxMotion | ( | DevicePtr | pDev, | |
| int * | v, | |||
| int | firstAxes, | |||
| int | axesCount, | |||
| DMXMotionType | type, | |||
| DMXBlockType | block | |||
| ) |
Enqueue a motion event for pDev. The v vector has length axesCount, and contains values for each of the axes, starting at firstAxes.
The type of the motion may be DMX_RELATIVE, DMX_ABSOLUTE, or DMX_ABSOLUTE_CONFINED (in the latter case, the pointer will not be allowed to move outside the global boundaires).
If block is set to DMX_BLOCK, then the SIGIO handler will be blocked around calls to enqueueMotion().
References DMX_ABSOLUTE, DMX_ABSOLUTE_CONFINED, DMX_RELATIVE, dmxCoreMotion(), dmxExtMotion(), dmxGlobalX, and dmxGlobalY.
Referenced by dmxCollectAll(), and dmxSigioHandler().
| static int dmxTranslateAndEnqueueExtEvent | ( | DMXLocalInputInfoPtr | dmxLocal, | |
| XEvent * | e, | |||
| DMXBlockType | block | |||
| ) | [static] |
References ChangeDeviceNotify, DeviceFocusIn, DeviceFocusOut, _DMXLocalInputInfo::deviceId, DeviceMappingNotify, DeviceStateNotify, DeviceValuator, _DMXInputInfo::devs, DMX_ABSOLUTE, dmxExtMotion(), dmxInputs, dmxLog(), dmxMapLookup(), dmxSigioBlock(), dmxSigioUnblock(), dmxWarning, EXTRACT_VALUATORS, _DMXLocalInputInfo::inputIdx, _DMXInputInfo::numDevs, _DMXLocalInputInfo::pDevice, ProximityIn, ProximityOut, and _DMXLocalInputInfo::type.
Referenced by dmxEnqueue().
| static void enqueueMotion | ( | DevicePtr | pDev, | |
| int | x, | |||
| int | y | |||
| ) | [static] |
Enqueue a motion event.
Referenced by dmxCoreMotion().
int dmxGlobalInvalid [static] |
Referenced by dmxCoreMotion(), and dmxInvalidateGlobalPosition().
int dmxGlobalX [static] |
Referenced by dmxCoreMotion(), dmxGetGlobalPosition(), and dmxMotion().
int dmxGlobalY [static] |
Referenced by dmxCoreMotion(), dmxGetGlobalPosition(), and dmxMotion().