Distributed Multihead X
1.16.4
|
#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 "inpututils.h"
#include "mipointer.h"
#include "mi.h"
#include "exglobals.h"
#include "xkbsrv.h"
#include "XIstubs.h"
Macros | |
#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 /* Max axes reported by this routine */ |
#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 /* Max axes reported by this routine */ |
Referenced by dmxExtMotion(), othUSBGetInfo(), and usbRead().
#define DMXDBG0 | ( | f | ) |
#define DMXDBG1 | ( | f, | |
a | |||
) |
#define DMXDBG2 | ( | f, | |
a, | |||
b | |||
) |
Referenced by dmxCheckSpecialKeys(), dmxEnqueue(), and dmxKeyCodeToKeySym().
#define DMXDBG3 | ( | f, | |
a, | |||
b, | |||
c | |||
) |
Referenced by dmxCheckFunctionKeys(), and dmxKeySymToKeyCode().
#define DMXDBG4 | ( | f, | |
a, | |||
b, | |||
c, | |||
d | |||
) |
Referenced by dmxCoreMotion().
#define DMXDBG5 | ( | f, | |
a, | |||
b, | |||
c, | |||
d, | |||
e | |||
) |
Referenced by dmxCoreMotion().
#define DMXDBG6 | ( | f, | |
a, | |||
b, | |||
c, | |||
d, | |||
e, | |||
g | |||
) |
Referenced by dmxCoreMotion().
#define DMXDBG7 | ( | f, | |
a, | |||
b, | |||
c, | |||
d, | |||
e, | |||
g, | |||
h | |||
) |
#define EXTRACT_VALUATORS | ( | ke, | |
valuators | |||
) |
Referenced by dmxTranslateAndEnqueueExtEvent().
|
static |
References _DMXLocalInputInfo::binding, _DMXInputInfo::devs, _DMXLocalInputInfo::functions, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::private.
Referenced by dmxCheckFunctionKeys().
|
static |
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.
References DMXDBG2, dmxInfo, dmxLocalCoreKeyboard, dmxLog(), GETDMXINPUTFROMPDEV, and _DMXLocalInputInfo::pDevice.
Referenced by dmxCollectAll(), and dmxSigioHandler().
void dmxCoreMotion | ( | DevicePtr | pDev, |
int | x, | ||
int | y, | ||
int | delta, | ||
DMXBlockType | block | ||
) |
References _DMXLocalInputInfo::binding, _DMXInputInfo::detached, _DMXInputInfo::devs, DMXDBG4, DMXDBG5, DMXDBG6, dmxFindFirstScreen(), dmxGlobalHeight, dmxGlobalInvalid, dmxGlobalWidth, dmxGlobalX, dmxGlobalY, dmxInputs, dmxNumInputs, dmxScreens, 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, |
int | type, | ||
int | detail, | ||
KeySym | keySym, | ||
XEvent * | e, | ||
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().
References dmxCheckFunctionKeys(), DMXDBG2, dmxEventName(), dmxFixup(), dmxGetButtonMapping(), dmxKeyCodeToKeySym(), dmxLocalCoreKeyboard, dmxLogInput(), dmxTranslateAndEnqueueExtEvent(), and GETDMXINPUTFROMPDEV.
Referenced by dmxCollectAll(), and dmxSigioHandler().
|
static |
DMXScreenInfo* dmxFindFirstScreen | ( | int | x, |
int | y | ||
) |
References dmxNumScreens, dmxOnScreen(), and dmxScreens.
Referenced by dmxCheckCursor(), and dmxCoreMotion().
|
static |
References dmxKeyCodeToKeySym(), dmxKeySymToKeyCode(), dmxLocalCoreKeyboard, dmxLog(), dmxWarning, and GETDMXLOCALFROMPDEV.
Referenced by dmxEnqueue().
|
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 |
References DMXDBG2, and _DMXLocalInputInfo::pDevice.
Referenced by dmxEnqueue(), dmxFixup(), and dmxKeySymToKeyCode().
|
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, dmxGlobalY, and GETDMXLOCALFROMPDEV.
Referenced by dmxCollectAll(), and dmxSigioHandler().
|
static |
References _DMXLocalInputInfo::deviceId, _DMXInputInfo::devs, DMX_ABSOLUTE, dmxExtMotion(), dmxInputs, dmxLog(), dmxMapLookup(), dmxWarning, EXTRACT_VALUATORS, _DMXLocalInputInfo::inputIdx, _DMXInputInfo::numDevs, _DMXLocalInputInfo::pDevice, and _DMXLocalInputInfo::type.
Referenced by dmxEnqueue().
|
static |
|
static |
Referenced by dmxCoreMotion(), and dmxInvalidateGlobalPosition().
|
static |
Referenced by dmxCoreMotion(), dmxGetGlobalPosition(), and dmxMotion().
|
static |
Referenced by dmxCoreMotion(), dmxGetGlobalPosition(), and dmxMotion().