Distributed Multihead X
1.16.4
|
Macros | |
#define | USB_COMMON_DEBUG 1 |
#define | GETPRIV |
#define | GETNAME |
#define | LOG0(f) dmxLog(dmxDebug,f) |
#define | LOG1(f, a) dmxLog(dmxDebug,f,a) |
#define | LOG2(f, a, b) dmxLog(dmxDebug,f,a,b) |
#define | LOG3(f, a, b, c) dmxLog(dmxDebug,f,a,b,c) |
#define | LOG1INPUT(p, f, a) dmxLogInput(p->dmxInput,f,a) |
#define | LOG3INPUT(p, f, a, b, c) dmxLogInput(p->dmxInput,f,a,b,c) |
#define | LOG5INPUT(p, f, a, b, c, d, e) dmxLogInput(p->dmxInput,f,a,b,c,d,e) |
#define | FATAL0(f) dmxLog(dmxFatal,f) |
#define | FATAL1(f, a) dmxLog(dmxFatal,f,a) |
#define | FATAL2(f, a, b) dmxLog(dmxFatal,f,a,b) |
#define | MOTIONPROC dmxMotionProcPtr |
#define | ENQUEUEPROC dmxEnqueueProcPtr |
#define | CHECKPROC dmxCheckSpecialProcPtr |
#define | BLOCK DMXBlockType |
#define | PRESS(b) |
#define | RELEASE(b) |
#define | test_bit(bit) (priv->mask[(bit)/8] & (1 << ((bit)%8))) |
#define | test_bits(bit) (bits[(bit)/8] & (1 << ((bit)%8))) |
Functions | |
void | usbRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, int minButton, BLOCK block) |
static void | usbPrint (myPrivate *priv, const char *filename, const char *devname, int fd) |
void | usbInit (DevicePtr pDev, usbType type) |
void | usbOff (DevicePtr pDev) |
void * | usbCreatePrivate (DeviceIntPtr pDevice) |
void | usbDestroyPrivate (void *priv) |
Routines that are common between usb-keyboard.c, usb-mouse.c, and usb-other.c
#define BLOCK DMXBlockType |
#define CHECKPROC dmxCheckSpecialProcPtr |
#define ENQUEUEPROC dmxEnqueueProcPtr |
#define GETNAME |
Referenced by usbPrint().
#define GETPRIV |
#define LOG1INPUT | ( | p, | |
f, | |||
a | |||
) | dmxLogInput(p->dmxInput,f,a) |
Referenced by usbPrint().
#define LOG3INPUT | ( | p, | |
f, | |||
a, | |||
b, | |||
c | |||
) | dmxLogInput(p->dmxInput,f,a,b,c) |
Referenced by usbPrint().
#define LOG5INPUT | ( | p, | |
f, | |||
a, | |||
b, | |||
c, | |||
d, | |||
e | |||
) | dmxLogInput(p->dmxInput,f,a,b,c,d,e) |
Referenced by usbPrint().
#define MOTIONPROC dmxMotionProcPtr |
#define PRESS | ( | b | ) |
Referenced by usbRead().
#define RELEASE | ( | b | ) |
Referenced by usbRead().
#define test_bit | ( | bit | ) | (priv->mask[(bit)/8] & (1 << ((bit)%8))) |
Referenced by usbInit(), and usbPrint().
#define test_bits | ( | bit | ) | (bits[(bit)/8] & (1 << ((bit)%8))) |
Referenced by usbInit(), and usbPrint().
#define USB_COMMON_DEBUG 1 |
void* usbCreatePrivate | ( | DeviceIntPtr | pDevice | ) |
Create a private structure for use within this file.
References _myPrivate::fd, and _myPrivate::pDevice.
void usbDestroyPrivate | ( | void * | priv | ) |
Destroy a private structure.
void usbInit | ( | DevicePtr | pDev, |
usbType | type | ||
) |
Initialized pDev as a usbMouse, usbKeyboard, or usbOther device.
References FATAL1, GETPRIV, O_NONBLOCK, test_bit, test_bits, usbKeyboard, usbMouse, usbOther, and usbPrint().
Referenced by kbdUSBInit(), mouUSBInit(), and othUSBInit().
void usbOff | ( | DevicePtr | pDev | ) |
Turn pDev off (i.e., stop taking input from pDev).
References GETPRIV.
|
static |
void usbRead | ( | DevicePtr | pDev, |
MOTIONPROC | motion, | ||
ENQUEUEPROC | enqueue, | ||
int | minButton, | ||
BLOCK | block | ||
) |
Read an event from the pDev device. If the event is a motion event, enqueue it with the motion function. Otherwise, enqueue the event with the enqueue function. The block type is passed to the functions so that they may block SIGIO handling as appropriate to the caller of this function.
Since USB devices return EV_KEY events for buttons and keys, minButton is used to decide if a Button or Key event should be queued.
References DMX_ABSOLUTE, DMX_MAX_AXES, DMX_RELATIVE, GETPRIV, LOG3, PRESS, and RELEASE.
Referenced by mouUSBRead(), and othUSBRead().