Distributed Multihead X
1.16.4
|
#include "inputstr.h"
#include <X11/Xos.h>
#include <errno.h>
#include <termios.h>
#include "dmxinputinit.h"
#include "lnx-ps2.h"
Data Structures | |
struct | _myPrivate |
Macros | |
#define | GETPRIV |
#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 | 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) |
Typedefs | |
typedef struct _myPrivate | myPrivate |
Functions | |
static int | ps2LinuxReadBytes (int fd, unsigned char *buf, int len, int min) |
static void | ps2LinuxButton (DevicePtr pDev, ENQUEUEPROC enqueue, int buttons, BLOCK block) |
void | ps2LinuxRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block) |
void | ps2LinuxInit (DevicePtr pDev) |
int | ps2LinuxOn (DevicePtr pDev) |
void | ps2LinuxOff (DevicePtr pDev) |
static void | ps2LinuxGetMap (DevicePtr pDev, unsigned char *map, int *nButtons) |
void | ps2LinuxVTPreSwitch (void *p) |
void | ps2LinuxVTPostSwitch (void *p) |
void * | ps2LinuxCreatePrivate (DeviceIntPtr pMouse) |
void | ps2LinuxDestroyPrivate (void *priv) |
void | ps2LinuxGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) |
This code implements a low-level device driver for a serial MS mouse. The code is derived from code by Keith Packard (see the source code for complete references).
#define BLOCK DMXBlockType |
#define CHECKPROC dmxCheckSpecialProcPtr |
#define ENQUEUEPROC dmxEnqueueProcPtr |
Referenced by ps2LinuxInit().
#define GETPRIV |
Referenced by ps2LinuxButton(), ps2LinuxInit(), ps2LinuxOff(), ps2LinuxOn(), and ps2LinuxRead().
#define MOTIONPROC dmxMotionProcPtr |
#define PRESS | ( | b | ) |
Referenced by ps2LinuxButton().
#define RELEASE | ( | b | ) |
Referenced by ps2LinuxButton().
typedef struct _myPrivate myPrivate |
|
static |
References GETPRIV, PRESS, and RELEASE.
Referenced by ps2LinuxRead().
void* ps2LinuxCreatePrivate | ( | DeviceIntPtr | pMouse | ) |
Create a private structure for use within this file.
References _myPrivate::fd, and _myPrivate::pMouse.
void ps2LinuxDestroyPrivate | ( | void * | priv | ) |
Destroy a private structure.
void ps2LinuxGetInfo | ( | DevicePtr | pDev, |
DMXLocalInitInfoPtr | info | ||
) |
Fill the info structure with information needed to initialize pDev.
References _DMXLocalInitInfo::buttonClass, _DMXLocalInitInfo::map, _DMXLocalInitInfo::maxres, _DMXLocalInitInfo::maxval, _DMXLocalInitInfo::minres, _DMXLocalInitInfo::minval, _DMXLocalInitInfo::numButtons, _DMXLocalInitInfo::numRelAxes, ps2LinuxGetMap(), _DMXLocalInitInfo::ptrFeedbackClass, _DMXLocalInitInfo::res, and _DMXLocalInitInfo::valuatorClass.
|
static |
Referenced by ps2LinuxGetInfo().
void ps2LinuxInit | ( | DevicePtr | pDev | ) |
void ps2LinuxOff | ( | DevicePtr | pDev | ) |
Turn pDev off (i.e., stop taking input from pDev).
References GETPRIV.
int ps2LinuxOn | ( | DevicePtr | pDev | ) |
Turn pDev on (i.e., take input from pDev).
References GETPRIV, and ps2LinuxInit().
void ps2LinuxRead | ( | DevicePtr | pDev, |
MOTIONPROC | motion, | ||
ENQUEUEPROC | enqueue, | ||
CHECKPROC | checkspecial, | ||
BLOCK | block | ||
) |
Read an event from the pDev device. If the event is a motion event, enqueue it with the motion function. Otherwise, check for special keys with the checkspecial function and 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.
References GETPRIV, ps2LinuxButton(), and ps2LinuxReadBytes().
|
static |
Referenced by ps2LinuxRead().
void ps2LinuxVTPostSwitch | ( | void * | p | ) |
Currently unused hook called after returning from a VT switch.
void ps2LinuxVTPreSwitch | ( | void * | p | ) |
Currently unused hook called prior to an VT switch.