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.29; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.31; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.31; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.22; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.52; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @ File Index
Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

lnx-ps2.c File Reference

#include "inputstr.h"
#include "Xos.h"
#include <errno.h>
#include <termios.h>
#include "dmxinputinit.h"
#include "lnx-ps2.h"

Data Structures

struct  _myPrivate

Functions

void ps2LinuxRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
void ps2LinuxInit (DevicePtr pDev)
int ps2LinuxOn (DevicePtr pDev)
void ps2LinuxOff (DevicePtr pDev)
void ps2LinuxVTPreSwitch (pointer p)
void ps2LinuxVTPostSwitch (pointer p)
pointer ps2LinuxCreatePrivate (DeviceIntPtr pMouse)
void ps2LinuxDestroyPrivate (pointer priv)
void ps2LinuxGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)

Detailed Description

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).

Function Documentation

pointer ps2LinuxCreatePrivate DeviceIntPtr  pMouse  ) 
 

Create a private structure for use within this file.

void ps2LinuxDestroyPrivate pointer  priv  ) 
 

Destroy a private structure.

void ps2LinuxGetInfo DevicePtr  pDev,
DMXLocalInitInfoPtr  info
 

Fill the info structure with information needed to initialize pDev.

void ps2LinuxInit DevicePtr  pDev  ) 
 

Initialize pDev.

void ps2LinuxOff DevicePtr  pDev  ) 
 

Turn pDev off (i.e., stop taking input from pDev).

int ps2LinuxOn DevicePtr  pDev  ) 
 

Turn pDev on (i.e., take input from pDev).

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.

void ps2LinuxVTPostSwitch pointer  p  ) 
 

Currently unused hook called after returning from a VT switch.

void ps2LinuxVTPreSwitch pointer  p  ) 
 

Currently unused hook called prior to an VT switch.


Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4. @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @initial import of xorg-server-1.4.2 @ text @@ 1.1.1.2 log @import xorg-server 1.9.2. important changes since 1.6.5 include: - built-in symbol visibility, default not export - fixes for various crashes - many fixes for XI2, EXA, dix, render, glx, xkb, EDID, randr, Xv, resource handling, Xext, vfb, xfree86 / vga and composite support. - fixes several memory leaks - many many documentation updates - record extension enabled - no longer looks for XF86Config files @ text @d9 15 a23 83

lnx-ps2.c File Reference

#include "inputstr.h"
#include <X11/Xos.h>
#include <errno.h>
#include <termios.h>
#include "dmxinputinit.h"
#include "lnx-ps2.h"

Data Structures

struct  _myPrivate

Defines

#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 (pointer p)
void ps2LinuxVTPostSwitch (pointer p)
pointer ps2LinuxCreatePrivate (DeviceIntPtr pMouse)
void ps2LinuxDestroyPrivate (pointer priv)
void ps2LinuxGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)

Detailed Description

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 Documentation

#define BLOCK   DMXBlockType
d25 1 a25 12
#define CHECKPROC   dmxCheckSpecialProcPtr
d27 1 a27 12
#define ENQUEUEPROC   dmxEnqueueProcPtr
d29 1 a29 17
#define FATAL0 (   f  )     dmxLog(dmxFatal,f)
d31 1 a31 26
#define FATAL1 (   f,
  a 
)    dmxLog(dmxFatal,f,a)
d33 1 a33 1

Referenced by ps2LinuxInit().

d35 1 a35 32
#define FATAL2 (   f,
  a,
  b 
)    dmxLog(dmxFatal,f,a,b)
d37 1 a37 32
#define GETPRIV
Value:
myPrivate *priv                            \
                      = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private
#define LOG0 (   f  )     dmxLog(dmxDebug,f)
d39 1 a39 26
#define LOG1 (   f,
  a 
)    dmxLog(dmxDebug,f,a)
d41 15 a55 11
a56 20
#define LOG2 (   f,
  a,
  b 
)    dmxLog(dmxDebug,f,a,b)
a57 35
d59 26 a84 11
#define LOG3 (   f,
  a,
  b,
  c 
)    dmxLog(dmxDebug,f,a,b,c)
a85 3
#define MOTIONPROC   dmxMotionProcPtr
a86 14
d88 19 a106 48
Value:
do {                                                 \
        enqueue(pDev, ButtonPress, 0, 0, NULL, block);   \
    } while (0)
#define PRESS (   b  ) 
#define RELEASE (   b  ) 
Value:
do {                                                 \
        enqueue(pDev, ButtonRelease, 0, 0, NULL, block); \
    } while (0)

Typedef Documentation

typedef struct _myPrivate myPrivate

Function Documentation

d108 4 a111 4 a113 1 a114 11 d116 2 a117 2 d121 2 a122 2 a123 7
static void ps2LinuxButton ( DevicePtr  pDev, ENQUEUEPROC  enqueue,
int  buttons,
BLOCK  block ) [static]

References PRESS, and RELEASE.

Referenced by ps2LinuxRead().

a124 14
d126 26 a151 19

Create a private structure for use within this file.

References _myPrivate::fd, and _myPrivate::pMouse.

pointer ps2LinuxCreatePrivate ( DeviceIntPtr  pMouse  ) 
a152 4
void ps2LinuxDestroyPrivate ( pointer  priv  ) 

Destroy a private structure.

a153 23
d155 26 a180 34
void ps2LinuxGetInfo ( DevicePtr  pDev,
DMXLocalInitInfoPtr  info 
)
a181 5
static void ps2LinuxGetMap ( DevicePtr  pDev,
unsigned char *  map,
int *  nButtons 
) [static]

Referenced by ps2LinuxGetInfo().

a182 14
d184 26 a209 21

Initialize pDev.

References FATAL1, and O_NONBLOCK.

Referenced by ps2LinuxOn().

void ps2LinuxInit ( DevicePtr  pDev  ) 
d211 1 d213 19 a231 31

Turn pDev off (i.e., stop taking input from pDev).

void ps2LinuxOff ( DevicePtr  pDev  ) 
int ps2LinuxOn ( DevicePtr  pDev  ) 

Turn pDev on (i.e., take input from pDev).

References ps2LinuxInit().

d233 4 a236 4 a238 1 a239 5 d241 2 a242 2 a244 1 a245 5 d247 2 a248 2 a251 24
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 ps2LinuxButton(), and ps2LinuxReadBytes().

d253 2 a254 2 a256 1 a257 5 d259 2 a260 2 d264 2 a265 2 d267 1 d269 27 a295 4

Referenced by ps2LinuxRead().

a296 14
static int ps2LinuxReadBytes ( int  fd,
unsigned char *  buf, int  len,
int  min ) [static]
d298 26 a323 17

Currently unused hook called after returning from a VT switch.

void ps2LinuxVTPostSwitch ( pointer  p  ) 
d325 1 d327 14 a340 7

Currently unused hook called prior to an VT switch.

@ 1.1.1.3 log @initial import of xorg-server 1.10.3. highlights include: - fixes xorg bugs 29969, 30367, 30527, 30267, 30260, 29046, 30260, 31548, 28672, 24887, 32115, 21457, 32436, 21827, 28414, 24703, 32803, 16318, 33449, 33324, 33929, 35082, 35209, 36146, 36119 - many additional NULL checks - adjustments related to input ABI 12 - *lots* of dead code removal - vga arbitrator fixes - GL fixes - EDID fixes - conversion to using asprintf() in many places - many fixes from valgrind, compiler warnings see these for more details: http://lists.freedesktop.org/archives/xorg-announce/2011-February/001612.html http://lists.freedesktop.org/archives/xorg-announce/2011-April/001646.html http://lists.freedesktop.org/archives/xorg-announce/2011-May/001675.html http://lists.freedesktop.org/archives/xorg-announce/2011-July/001710.html @ text @d9 3 a11 2
void ps2LinuxVTPreSwitch ( pointer  p  ) 
d44 1 a44 1 d47 14 a60 14 d63 1 a63 1 d66 12 a77 12 d79 3 a81 3

Detailed Description

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 Documentation

d87 1 a87 1 d100 1 a100 1 d113 1 a113 1 d128 4 a131 3 d146 1 a146 1 d152 2 a153 2 d158 1 a158 1 d175 1 a175 1 d181 1 a181 1 d187 2 a188 2 d193 1 a193 1 d212 1 a212 1 = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private a213 2

Referenced by ps2LinuxButton(), ps2LinuxInit(), ps2LinuxOff(), ps2LinuxOn(), and ps2LinuxRead().

d223 4 a226 3 d241 1 a241 1 d247 2 a248 2 d253 1 a253 1 d268 1 a268 1 d274 1 a274 1 d280 2 a281 2 d286 1 a286 1 d301 1 a301 1 d307 1 a307 1 d313 1 a313 1 d319 2 a320 2 d325 1 a325 1 d338 1 a338 1 d353 3 a355 2 d374 3 a376 2 d410 2 a411 2 d416 2 a417 2 d422 2 a423 2 d428 2 a429 2 d434 1 a434 1 d440 1 a440 1

References GETPRIV, PRESS, and RELEASE.

d453 3 a455 2 d474 3 a476 2 d493 2 a494 2 d499 2 a500 2 d505 1 a505 1 d523 2 a524 2 d529 2 a530 2 d535 2 a536 2 d541 1 a541 1 d558 3 a560 2 d568 1 a568 1

References FATAL1, GETPRIV, and O_NONBLOCK.

d581 3 a583 2 a590 2

References GETPRIV.

d600 3 a602 2 d610 1 a610 1

References GETPRIV, and ps2LinuxInit().

d621 2 a622 2 d627 2 a628 2 d633 2 a634 2 d639 2 a640 2 d645 2 a646 2 d651 1 a651 1 d658 1 a658 1

References GETPRIV, ps2LinuxButton(), and ps2LinuxReadBytes().

d669 2 a670 2 d675 2 a676 2 d681 2 a682 2 d687 2 a688 2 d693 1 a693 1 d710 3 a712 2 d729 3 a731 2 a741 4
struct  _myPrivate
#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)
typedef struct _myPrivate myPrivate
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 (pointer p)
void ps2LinuxVTPostSwitch (pointer p)
pointer ps2LinuxCreatePrivate (DeviceIntPtr pMouse)
void ps2LinuxDestroyPrivate (pointer priv)
void ps2LinuxGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)
#define BLOCK   DMXBlockType#define CHECKPROC   dmxCheckSpecialProcPtr#define ENQUEUEPROC   dmxEnqueueProcPtr  f)    dmxLog(dmxFatal,f)      dmxLog(dmxFatal,f,a)       dmxLog(dmxFatal,f,a,b)  f)    dmxLog(dmxDebug,f)      dmxLog(dmxDebug,f,a)       dmxLog(dmxDebug,f,a,b)        dmxLog(dmxDebug,f,a,b,c)#define MOTIONPROC   dmxMotionProcPtr  b)  b)DevicePtr  pDev, ENQUEUEPROC  enqueue, int  buttons, BLOCK  block  [static]DeviceIntPtr  pMouse)pointer  priv)DevicePtr  pDev, DMXLocalInitInfoPtr  info DevicePtr  pDev, unsigned char *  map, int *  nButtons  [static]DevicePtr  pDev)DevicePtr  pDev)DevicePtr  pDev)DevicePtr  pDev, MOTIONPROC  motion, ENQUEUEPROC  enqueue, CHECKPROC  checkspecial, BLOCK  block int  fd, unsigned char *  buf, int  len, int  min  [static]pointer  p)pointer  p)