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

dmxeq.c File Reference

#include "dmx.h"
#include "dmxeq.h"
#include "dmxinput.h"
#include "dmxlog.h"
#include "dmxdpms.h"
#include "inputstr.h"
#include "scrnintstr.h"
#include "XIproto.h"
#include "extinit.h"

Data Structures

struct  _Event
struct  _EventQueue

Defines

#define QUEUE_SIZE   256

Typedefs

typedef _Event EventRec
typedef _EventEventPtr
typedef _EventQueue EventQueueRec
typedef _EventQueueEventQueuePtr

Functions

void dmxeqEnqueue (xEvent *e)
void dmxeqSwitchScreen (ScreenPtr pScreen, Bool fromDIX)
void dmxeqProcessInputEvents (void)

Detailed Description

This file provides an event queue that knows about XInput events. All of the code is based on mi/mieq.c and was modified as little as possible to provide XInput event support (the copyright and some of the comments are from The Open Group, Keith Packard, MIT X Consortium). (Another example of similar code is provided in hw/xfree86/common/xf86Xinput.c.)

Define Documentation

#define QUEUE_SIZE   256
 

The size of our queue. (The queue provided by mi/mieq.c has a size of 256.)


Typedef Documentation

typedef struct _Event * EventPtr
 

Information about the event.

typedef struct _EventQueue * EventQueuePtr
 

Event queue.

typedef struct _EventQueue EventQueueRec
 

Event queue.

typedef struct _Event EventRec
 

Information about the event.


Function Documentation

void dmxeqEnqueue xEvent *  e  ) 
 

This function adds an event to the end of the queue. If the event is an XInput event, then the next event (the valuator event) is also stored in the queue. If the new event has a time before the time of the last event currently on the queue, then the time is updated for the new event.

Must be reentrant with ProcessInputEvents. Assumption: dmxeqEnqueue will never be interrupted. If this is called from both signal handlers and regular code, make sure the signal is suspended when called from regular code.

void dmxeqProcessInputEvents void   ) 
 

This function is called from ProcessInputEvents() to remove events from the queue and process them.

void dmxeqSwitchScreen ScreenPtr  pScreen,
Bool  fromDIX
 

Make pScreen the new screen for enqueueing events. If fromDIX is TRUE, also make pScreen the new screen for dequeuing events.


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