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-ms.c File Reference

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

Data Structures

struct  _myPrivate

Functions

void msLinuxRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
void msLinuxInit (DevicePtr pDev)
int msLinuxOn (DevicePtr pDev)
void msLinuxOff (DevicePtr pDev)
void msLinuxVTPreSwitch (pointer p)
void msLinuxVTPostSwitch (pointer p)
pointer msLinuxCreatePrivate (DeviceIntPtr pMouse)
void msLinuxDestroyPrivate (pointer priv)
void msLinuxGetInfo (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 Juliusz Chroboczek and Keith Packard (see the source code for complete references).

Function Documentation

pointer msLinuxCreatePrivate DeviceIntPtr  pMouse  ) 
 

Create a private structure for use within this file.

void msLinuxDestroyPrivate pointer  priv  ) 
 

Destroy a private structure.

void msLinuxGetInfo DevicePtr  pDev,
DMXLocalInitInfoPtr  info
 

Fill the info structure with information needed to initialize pDev.

void msLinuxInit DevicePtr  pDev  ) 
 

Initialize pDev.

void msLinuxOff DevicePtr  pDev  ) 
 

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

int msLinuxOn DevicePtr  pDev  ) 
 

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

void msLinuxRead 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 msLinuxVTPostSwitch pointer  p  ) 
 

Currently unused hook called after returning from a VT switch.

void msLinuxVTPreSwitch 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-ms.c File Reference

#include "inputstr.h"
#include <X11/Xos.h>
#include <errno.h>
#include <termios.h>
#include "dmxinputinit.h"
#include "lnx-ms.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 msLinuxReadBytes (int fd, unsigned char *buf, int len, int min)
static void msLinuxButton (DevicePtr pDev, ENQUEUEPROC enqueue, int buttons, BLOCK block)
void msLinuxRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
void msLinuxInit (DevicePtr pDev)
int msLinuxOn (DevicePtr pDev)
void msLinuxOff (DevicePtr pDev)
static void msLinuxGetMap (DevicePtr pDev, unsigned char *map, int *nButtons)
void msLinuxVTPreSwitch (pointer p)
void msLinuxVTPostSwitch (pointer p)
pointer msLinuxCreatePrivate (DeviceIntPtr pMouse)
void msLinuxDestroyPrivate (pointer priv)
void msLinuxGetInfo (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 Juliusz Chroboczek and 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 msLinuxInit(), and msLinuxOn().

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 52
Value:
do {                                                 \
        enqueue(pDev, ButtonPress, 0, 0, NULL, block);   \
    } while (0)

Referenced by msLinuxButton(), ps2LinuxButton(), and usbRead().

#define PRESS (   b  ) 
#define RELEASE (   b  ) 
Value:
do {                                                 \
        enqueue(pDev, ButtonRelease, 0, 0, NULL, block); \
    } while (0)

Referenced by msLinuxButton(), ps2LinuxButton(), and usbRead().


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 msLinuxButton ( DevicePtr  pDev, ENQUEUEPROC  enqueue,
int  buttons,
BLOCK  block ) [static]

References PRESS, and RELEASE.

Referenced by msLinuxRead().

a124 14
d126 26 a151 19

Create a private structure for use within this file.

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

pointer msLinuxCreatePrivate ( DeviceIntPtr  pMouse  ) 
a152 4
void msLinuxDestroyPrivate ( pointer  priv  ) 

Destroy a private structure.

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

Referenced by msLinuxGetInfo().

a182 14
d184 26 a209 21

Initialize pDev.

References FATAL1, and O_NONBLOCK.

Referenced by msLinuxOn().

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

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

void msLinuxOff ( DevicePtr  pDev  ) 
int msLinuxOn ( DevicePtr  pDev  ) 

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

References FATAL1, and msLinuxInit().

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

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

Referenced by msLinuxRead().

a296 14
static int msLinuxReadBytes ( 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 msLinuxVTPostSwitch ( 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 msLinuxVTPreSwitch ( 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 Juliusz Chroboczek and 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 msLinuxButton(), msLinuxInit(), msLinuxOff(), msLinuxOn(), and msLinuxRead().

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 d376 3 a378 2 d414 2 a415 2 d420 2 a421 2 d426 2 a427 2 d432 2 a433 2 d438 1 a438 1 d444 1 a444 1

References GETPRIV, PRESS, and RELEASE.

d457 3 a459 2 d478 3 a480 2 d497 2 a498 2 d503 2 a504 2 d509 1 a509 1 d527 2 a528 2 d533 2 a534 2 d539 2 a540 2 d545 1 a545 1 d562 3 a564 2 d572 1 a572 1

References FATAL1, GETPRIV, and O_NONBLOCK.

d585 3 a587 2 a594 2

References GETPRIV.

d604 3 a606 2 d614 1 a614 1

References FATAL1, GETPRIV, and msLinuxInit().

d625 2 a626 2 d631 2 a632 2 d637 2 a638 2 d643 2 a644 2 d649 2 a650 2 d655 1 a655 1 d662 1 a662 1

References GETPRIV, msLinuxButton(), and msLinuxReadBytes().

d673 2 a674 2 d679 2 a680 2 d685 2 a686 2 d691 2 a692 2 d697 1 a697 1 d714 3 a716 2 d733 3 a735 2 a745 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 msLinuxReadBytes (int fd, unsigned char *buf, int len, int min)
static void msLinuxButton (DevicePtr pDev, ENQUEUEPROC enqueue, int buttons, BLOCK block)
void msLinuxRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
void msLinuxInit (DevicePtr pDev)
int msLinuxOn (DevicePtr pDev)
void msLinuxOff (DevicePtr pDev)
static void msLinuxGetMap (DevicePtr pDev, unsigned char *map, int *nButtons)
void msLinuxVTPreSwitch (pointer p)
void msLinuxVTPostSwitch (pointer p)
pointer msLinuxCreatePrivate (DeviceIntPtr pMouse)
void msLinuxDestroyPrivate (pointer priv)
void msLinuxGetInfo (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)