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-keyboard_8c.html | 792 ++++++++++++++++++----- 1 file changed, 639 insertions(+), 153 deletions(-) (limited to 'xorg-server/hw/dmx/doc/html/usb-keyboard_8c.html') diff --git a/xorg-server/hw/dmx/doc/html/usb-keyboard_8c.html b/xorg-server/hw/dmx/doc/html/usb-keyboard_8c.html index 5da5a0b3b..6ef084811 100644 --- a/xorg-server/hw/dmx/doc/html/usb-keyboard_8c.html +++ b/xorg-server/hw/dmx/doc/html/usb-keyboard_8c.html @@ -6,217 +6,703 @@ - -
Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals
-

usb-keyboard.c File Reference

#include "atKeynames.h"
-#include "usb-private.h"
-#include "usb-keyboard.h"
- - - - + + +
+

usb-keyboard.c File Reference

#include "atKeynames.h"
+#include "usb-private.h"
+#include "usb-keyboard.h"
+#include <xkbsrv.h>
+

Functions

void kbdUSBCtrl (DevicePtr pDev, KeybdCtrl *ctrl)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Defines

#define USB_KEYBOARD_DEBUG   0
#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 GLYPHS_PER_KEY   4
#define NUM_KEYCODES   248
#define MIN_KEYCODE   8
#define MAX_KEYCODE   (NUM_KEYCODES + MIN_KEYCODE - 1)

Functions

static int kbdUSBKeyDown (myPrivate *priv, int keyCode)
static void kbdUSBKeyState (myPrivate *priv, int type, int keyCode)
void kbdUSBCtrl (DevicePtr pDev, KeybdCtrl *ctrl)
void kbdUSBInit (DevicePtr pDev)
static void kbdUSBConvert (DevicePtr pDev, unsigned int scanCode, int value, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
void kbdUSBRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block)
int kbdUSBOn (DevicePtr pDev)
static void kbdUSBGetMap (DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap)
void kbdUSBGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info)

Variables

static KeySym map [NUM_KEYCODES *GLYPHS_PER_KEY]
+

Detailed Description

+

This code implements a low-level device driver for a USB keyboard under Linux. The keymap description is derived from code by Thomas Roell, Orest Zborowski.

+

Define Documentation

+ +
+
+ + + + +
#define BLOCK   DMXBlockType
+
+
-void kbdUSBInit (DevicePtr pDev) +
+
+ +
+
+ + + + +
#define CHECKPROC   dmxCheckSpecialProcPtr
+
+
-void kbdUSBRead (DevicePtr pDev, MOTIONPROC motion, ENQUEUEPROC enqueue, CHECKPROC checkspecial, BLOCK block) +
+
+ +
+
+ + + + +
#define ENQUEUEPROC   dmxEnqueueProcPtr
+
+
-int kbdUSBOn (DevicePtr pDev) +
+
+ +
+
+ + + + + + + + + +
#define FATAL0( )    dmxLog(dmxFatal,f)
+
+
-void kbdUSBGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) +
+
+ +
+
+ + + + + + + + + + + + + + +
#define FATAL1(f,
 )    dmxLog(dmxFatal,f,a)
+
+
- -

Detailed Description

-This code implements a low-level device driver for a USB keyboard under Linux. The keymap description is derived from code by Thomas Roell, Orest Zborowski.

Function Documentation

-

- - - - -
- + + + +
+
+
- - - - + + + + + + + + - - + + + + + +
void kbdUSBCtrl DevicePtr  pDev, #define FATAL2(f,
a,
KeybdCtrl *  ctrl )    dmxLog(dmxFatal,f,a,b)
+ +
+ +
+ + +
+
+ + + + +
#define GETPRIV
+
+
+Value:
myPrivate *priv                            \
+                      = ((DMXLocalInputInfoPtr)(pDev->devicePrivate))->private
+
+
+
+ +
+
+ + + + +
#define GLYPHS_PER_KEY   4
+
+ +
+ +
+
+ + + + + + + + + +
#define LOG0( )    dmxLog(dmxDebug,f)
+
+
+ +
+
+ +
+
+ + + + + + - - + + + + +
#define LOG1(f,
 )    dmxLog(dmxDebug,f,a)
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
#define LOG2(f,
a,
 )    dmxLog(dmxDebug,f,a,b)
-
- - - - - -
-   - - -

-Set the LEDs.

-

- - - - -
- + +
+ +
+ + +
+
+
- - - - + + + + + + + + - - + + - - + + + + +
void kbdUSBGetInfo DevicePtr  pDev, #define LOG3(f,
a,
DMXLocalInitInfoPtr  infob,
 )    dmxLog(dmxDebug,f,a,b,c)
+ +
+
+ + +
+
+ + + +
#define MAX_KEYCODE   (NUM_KEYCODES + MIN_KEYCODE - 1)
-
- - - - - -
-   - - -

-Fill the info structure with information needed to initialize pDev.

-

- - - - -
- + +
+ +

Referenced by kbdLinuxGetMap(), and kbdUSBGetMap().

+ +
+ + +
+
+
- - - - - - + +
void kbdUSBInit DevicePtr  pDev  ) #define MIN_KEYCODE   8
+ + + + +
+
+ + + +
#define MOTIONPROC   dmxMotionProcPtr
-
- - - - - -
-   - - -

-Initialize pDev using usbInit.

-

- - - - -
- + +
+ +
+ + +
+
+
- - - - - - + +
int kbdUSBOn DevicePtr  pDev  ) #define NUM_KEYCODES   248
+ +
+

Referenced by kbdLinuxGetMap(), and kbdUSBGetMap().

+ +
+ + +
+
+ + + +
#define USB_KEYBOARD_DEBUG   0
-
- - - - - -
-   - - -

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

-

- - - - -
- + +
+ +
+ +

Function Documentation

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
static void kbdUSBConvert (DevicePtr  pDev,
unsigned int  scanCode,
int  value,
ENQUEUEPROC  enqueue,
CHECKPROC  checkspecial,
BLOCK  block 
) [static]
+ + + + +
+
+ - - - - + + + + + + + + + - - + + + +
void kbdUSBRead DevicePtr  pDev, void kbdUSBCtrl (DevicePtr  pDev,
KeybdCtrl *  ctrl 
MOTIONPROC  motion, )
+
+
+

Set the LEDs.

+ +

References GETPRIV.

+ +
+
+ +
+
+ + + + + + + + + + + - - + + +
void kbdUSBGetInfo (DevicePtr  pDev,
DMXLocalInitInfoPtr  info 
ENQUEUEPROC  enqueue, )
+
+ +
+ +
+
+ + + + + + + + + + + + + - - + + + + + +
static void kbdUSBGetMap (DevicePtr  pDev,
KeySymsPtr  pKeySyms,
CHECKPROC  checkspecial, CARD8 *  pModMap 
) [static]
+
+
+ +

References GLYPHS_PER_KEY, map, MAX_KEYCODE, MIN_KEYCODE, and NUM_KEYCODES.

+ +

Referenced by kbdUSBGetInfo().

+ +
+
+ +
+
+ + + + + + + + + +
void kbdUSBInit (DevicePtr  pDev ) 
+
+
+

Initialize pDev using usbInit.

+ +

References usbInit(), and usbKeyboard.

+ +

Referenced by kbdUSBOn().

+ +
+
+ +
+
+ + + + + + + + + - - + + - - + + +
static int kbdUSBKeyDown (myPrivate priv,
BLOCK  blockint  keyCode 
) [static]
+
+
+

References _myPrivate::kbdState, and NUM_STATE_ENTRIES.

+ +

Referenced by kbdUSBConvert().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
static void kbdUSBKeyState (myPrivate priv,
int  type,
int  keyCode 
) [static]
-
- - - - - -
-   - - -

-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 _myPrivate::kbdState, and NUM_STATE_ENTRIES.

+ +

Referenced by kbdUSBConvert().

+ +
+
+ +
+
+ + + + + + + + + +
int kbdUSBOn (DevicePtr  pDev ) 
+
+
+

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

+ +

References GETPRIV, and kbdUSBInit().

+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
void kbdUSBRead (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, kbdUSBConvert(), and LOG3.

+ +
+
+

Variable Documentation

+ +
+
+ + + + +
KeySym map[NUM_KEYCODES *GLYPHS_PER_KEY] [static]
+
+ +
+
-- cgit v1.2.3