Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

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

Function Documentation

pointer usbCreatePrivate DeviceIntPtr  pDevice  ) 
 

Create a private structure for use within this file.

void usbDestroyPrivate pointer  priv  ) 
 

Destroy a private structure.

void usbInit DevicePtr  pDev,
usbType  type
 

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

void usbOff DevicePtr  pDev  ) 
 

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

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.


Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4.