From 1f876171067c04fc21fccd5a3051f982fd85c0f0 Mon Sep 17 00:00:00 2001 From: marha Date: Wed, 21 Oct 2009 19:07:36 +0000 Subject: Updated to xorg-server-1.7.99.1 --- xorg-server/hw/dmx/doc/html/usb-common_8c.html | 812 ++++++++++++++++++++----- 1 file changed, 661 insertions(+), 151 deletions(-) (limited to 'xorg-server/hw/dmx/doc/html/usb-common_8c.html') diff --git a/xorg-server/hw/dmx/doc/html/usb-common_8c.html b/xorg-server/hw/dmx/doc/html/usb-common_8c.html index 3c1882a5b..0032cf4eb 100644 --- a/xorg-server/hw/dmx/doc/html/usb-common_8c.html +++ b/xorg-server/hw/dmx/doc/html/usb-common_8c.html @@ -6,208 +6,718 @@ - -
Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals
-

usb-common.c File Reference

#include "usb-private.h"
-#include "usb-mouse.h"
- - - - + + +
+

usb-common.c File Reference

#include "usb-private.h"
+#include "usb-mouse.h"
+

Functions

void usbRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, int minButton, BLOCK block)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#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)
pointer usbCreatePrivate (DeviceIntPtr pDevice)
void usbDestroyPrivate (pointer priv)
+

Detailed Description

+

Routines that are common between usb-keyboard.c, usb-mouse.c, and usb-other.c

+

Define Documentation

+ +
+
+ + + + +
#define BLOCK   DMXBlockType
+
+
-void usbInit (DevicePtr pDev, usbType type) +
+
+ +
+
+ + + + +
#define CHECKPROC   dmxCheckSpecialProcPtr
+
+
-void usbOff (DevicePtr pDev) +
+
+ +
+
+ + + + +
#define ENQUEUEPROC   dmxEnqueueProcPtr
+
+
-pointer usbCreatePrivate (DeviceIntPtr pDevice) +
+
+ +
+
+ + + + + + + + + +
#define FATAL0( )    dmxLog(dmxFatal,f)
+
+
-void usbDestroyPrivate (pointer priv) +
+
+ +
+
+ + + + + + + + + + + + + + +
#define FATAL1(f,
 )    dmxLog(dmxFatal,f,a)
+
+
- -

Detailed Description

-Routines that are common between #usb-keyboard.c, #usb-mouse.c, and #usb-other.c

Function Documentation

-

- - - - -
- + + + +
+
+
- - - - - - + + + + + + + + + + + + + + + + +
pointer usbCreatePrivate DeviceIntPtr  pDevice  ) #define FATAL2(f,
a,
 )    dmxLog(dmxFatal,f,a,b)
+ +
+
+ + +
+
+ + + +
#define GETNAME
-
- - - - - -
-   - - -

-Create a private structure for use within this file.

-

- - - - -
- + +
+Value:
((DMXLocalInputInfoPtr)(pDevice->public.devicePrivate)) \
+                      ->name
+
+

Referenced by usbPrint().

+ +
+ + +
+
+
+ + + +
#define GETPRIV
+ +
+Value:
myPrivate *priv                                         \
+                      = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private
+
+
+ + +
+
+ - - - - - - + + + + + + +
void usbDestroyPrivate pointer  priv  ) #define LOG0( )    dmxLog(dmxDebug,f)
+
+
+
+
+ +
+
+ + + + + + + + + + + + + +
#define LOG1(f,
 )    dmxLog(dmxDebug,f,a)
-
- - - - - -
-   - - -

-Destroy a private structure.

-

- - - - -
- + +
+ +
+ + +
+
+
+ + + + + - - - - + + + + + + + + + +
#define LOG1INPUT(p,
void usbInit DevicePtr  pDev, f,
 )    dmxLogInput(p->dmxInput,f,a)
+ +
+ +

Referenced by usbPrint().

+ +
+ + +
+
+ + + + + + + + - - + + - - + + + + +
#define LOG2(f,
usbType  typea,
 )    dmxLog(dmxDebug,f,a,b)
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
#define LOG3(f,
a,
b,
 )    dmxLog(dmxDebug,f,a,b,c)
-
- - - - - -
-   - - -

-Initialized pDev as a usbMouse, usbKeyboard, or usbOther device.

-

- - - - -
- + +
+ +
+ + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#define LOG3INPUT(p,
f,
a,
b,
 )    dmxLogInput(p->dmxInput,f,a,b,c)
+ +
+ +

Referenced by usbPrint().

+ +
+ + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + + + + + + + + + + + +
#define LOG5INPUT(p,
f,
a,
b,
c,
void usbOff DevicePtr  pDev  ) d,
 )    dmxLogInput(p->dmxInput,f,a,b,c,d,e)
+
+
+

Referenced by usbPrint().

+ +
+
+ +
+
+ + + +
#define MOTIONPROC   dmxMotionProcPtr
-
- - - - - -
-   - - -

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

-

- - - - -
- + +
+ +
+ + +
+
+
- - - - + + + + + + +
void usbRead DevicePtr  pDev, #define PRESS( ) 
+ +
+Value:
do {                                                 \
+        enqueue(pDev, ButtonPress, 0, 0, NULL, block);   \
+    } while (0)
+
+
+ + +
+
+ + + + + + + +
#define RELEASE( ) 
+
+
+Value:
do {                                                 \
+        enqueue(pDev, ButtonRelease, 0, 0, NULL, block); \
+    } while (0)
+
+
+
+ +
+
+ + + + + + + + + +
#define test_bit(bit  )    (priv->mask[(bit)/8] & (1 << ((bit)%8)))
+
+
+ +

Referenced by othUSBGetInfo(), usbInit(), and usbPrint().

+ +
+
+ +
+
+ + + + + + + + + +
#define test_bits(bit  )    (bits[(bit)/8] & (1 << ((bit)%8)))
+
+
+ +

Referenced by usbInit(), and usbPrint().

+ +
+
+ +
+
+ + + + +
#define USB_COMMON_DEBUG   1
+
+
+ +
+
+

Function Documentation

+ +
+
+ + + + + + + + + +
pointer usbCreatePrivate (DeviceIntPtr  pDevice ) 
+
+
+

Create a private structure for use within this file.

+ +

References _myPrivate::fd, and _myPrivate::pDevice.

+ +
+
+ +
+
+ + + + + + + - - + +
void usbDestroyPrivate (pointer  priv )  MOTIONPROC  motion,
+
+
+

Destroy a private structure.

+ +
+
+ +
+
+ + + + + + + + + + + - - + + +
void usbInit (DevicePtr  pDev,
usbType  type 
ENQUEUEPROC  enqueue, )
+
+
+

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 usbPrint (myPrivate priv,
int  minButton, const char *  filename,
const char *  devname,
BLOCK  blockint  fd 
) [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.

+

+
+

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

+ +
+
+
-- cgit v1.2.3