Distributed Multihead X  1.16.4
dmxevents.c File Reference
#include "dmxinputinit.h"
#include "dmxevents.h"
#include "dmxcb.h"
#include "dmxcommon.h"
#include "dmxcursor.h"
#include "dmxmotion.h"
#include "dmxsigio.h"
#include "dmxmap.h"
#include <X11/keysym.h>
#include "opaque.h"
#include "inputstr.h"
#include "inpututils.h"
#include "mipointer.h"
#include "mi.h"
#include "exglobals.h"
#include "xkbsrv.h"
#include "XIstubs.h"

Macros

#define DMX_EVENTS_DEBUG   0
 
#define DMXDBG0(f)
 
#define DMXDBG1(f, a)
 
#define DMXDBG2(f, a, b)
 
#define DMXDBG3(f, a, b, c)
 
#define DMXDBG4(f, a, b, c, d)
 
#define DMXDBG5(f, a, b, c, d, e)
 
#define DMXDBG6(f, a, b, c, d, e, g)
 
#define DMXDBG7(f, a, b, c, d, e, g, h)
 
#define DMX_MAX_AXES   32 /* Max axes reported by this routine */
 
#define EXTRACT_VALUATORS(ke, valuators)
 

Functions

static int dmxApplyFunctions (DMXInputInfo *dmxInput, DMXFunctionType f)
 
static int dmxCheckFunctionKeys (DMXLocalInputInfoPtr dmxLocal, int type, KeySym keySym)
 
DMXScreenInfodmxFindFirstScreen (int x, int y)
 
static void enqueueMotion (DevicePtr pDev, int x, int y)
 
void dmxCoreMotion (DevicePtr pDev, int x, int y, int delta, DMXBlockType block)
 
static void dmxExtMotion (DMXLocalInputInfoPtr dmxLocal, int *v, int firstAxis, int axesCount, DMXMotionType type, DMXBlockType block)
 
static int dmxTranslateAndEnqueueExtEvent (DMXLocalInputInfoPtr dmxLocal, XEvent *e, DMXBlockType block)
 
static int dmxGetButtonMapping (DMXLocalInputInfoPtr dmxLocal, int button)
 
void dmxGetGlobalPosition (int *x, int *y)
 
void dmxInvalidateGlobalPosition (void)
 
void dmxMotion (DevicePtr pDev, int *v, int firstAxes, int axesCount, DMXMotionType type, DMXBlockType block)
 
static KeySym dmxKeyCodeToKeySym (DMXLocalInputInfoPtr dmxLocal, KeyCode keyCode)
 
static KeyCode dmxKeySymToKeyCode (DMXLocalInputInfoPtr dmxLocal, KeySym keySym, int tryFirst)
 
static int dmxFixup (DevicePtr pDev, int detail, KeySym keySym)
 
void dmxEnqueue (DevicePtr pDev, int type, int detail, KeySym keySym, XEvent *e, DMXBlockType block)
 
int dmxCheckSpecialKeys (DevicePtr pDev, KeySym keySym)
 

Variables

static int dmxGlobalX
 
static int dmxGlobalY
 
static int dmxGlobalInvalid
 

Detailed Description

Provide support and helper functions for enqueing events received by the low-level input drivers.

Macro Definition Documentation

#define DMX_EVENTS_DEBUG   0
#define DMX_MAX_AXES   32 /* Max axes reported by this routine */
#define DMXDBG0 (   f)
#define DMXDBG1 (   f,
 
)
#define DMXDBG2 (   f,
  a,
 
)
#define DMXDBG3 (   f,
  a,
  b,
 
)
#define DMXDBG4 (   f,
  a,
  b,
  c,
 
)

Referenced by dmxCoreMotion().

#define DMXDBG5 (   f,
  a,
  b,
  c,
  d,
 
)

Referenced by dmxCoreMotion().

#define DMXDBG6 (   f,
  a,
  b,
  c,
  d,
  e,
 
)

Referenced by dmxCoreMotion().

#define DMXDBG7 (   f,
  a,
  b,
  c,
  d,
  e,
  g,
 
)
#define EXTRACT_VALUATORS (   ke,
  valuators 
)
Value:
valuators[0] = ke->axis_data[0]; \
valuators[1] = ke->axis_data[1]; \
valuators[2] = ke->axis_data[2]; \
valuators[3] = ke->axis_data[3]; \
valuators[4] = ke->axis_data[4]; \
valuators[5] = ke->axis_data[5]; \

Referenced by dmxTranslateAndEnqueueExtEvent().

Function Documentation

int dmxCheckSpecialKeys ( DevicePtr  pDev,
KeySym  keySym 
)

A pointer to this routine is passed to low-level input drivers so that all special keychecking is unified to this file. This function returns 0 if no special keys have been pressed. If the user has requested termination of the DMX server, -1 is returned. If the user has requested a switch to a VT, then the (1-based) number of that VT is returned.

References DMXDBG2, dmxInfo, dmxLocalCoreKeyboard, dmxLog(), GETDMXINPUTFROMPDEV, and _DMXLocalInputInfo::pDevice.

Referenced by dmxCollectAll(), and dmxSigioHandler().

void dmxEnqueue ( DevicePtr  pDev,
int  type,
int  detail,
KeySym  keySym,
XEvent *  e,
DMXBlockType  block 
)

Enqueue an event from the pDev device with the specified type and detail. If the event is a KeyPress or KeyRelease event, then the keySym is also specified.

FIXME: make the code do what the comment says, or remove this comment. If block is set to DMX_BLOCK, then the SIGIO handler will be blocked around calls to dmxeqEnqueue().

References dmxCheckFunctionKeys(), DMXDBG2, dmxEventName(), dmxFixup(), dmxGetButtonMapping(), dmxKeyCodeToKeySym(), dmxLocalCoreKeyboard, dmxLogInput(), dmxTranslateAndEnqueueExtEvent(), and GETDMXINPUTFROMPDEV.

Referenced by dmxCollectAll(), and dmxSigioHandler().

DMXScreenInfo* dmxFindFirstScreen ( int  x,
int  y 
)
static int dmxFixup ( DevicePtr  pDev,
int  detail,
KeySym  keySym 
)
static
static int dmxGetButtonMapping ( DMXLocalInputInfoPtr  dmxLocal,
int  button 
)
static

References dmxLog(), dmxWarning, and _DMXLocalInputInfo::pDevice.

Referenced by dmxEnqueue().

void dmxGetGlobalPosition ( int *  x,
int *  y 
)

Return DMX's notion of the pointer position in the global coordinate space.

References dmxGlobalX, and dmxGlobalY.

Referenced by dmxBackendLateReInit(), dmxCheckCursor(), dmxConsoleUpdateFineCursor(), dmxHideCursor(), and dmxSetCursor().

void dmxInvalidateGlobalPosition ( void  )

Invalidate the global position for dmxCoreMotion.

References dmxGlobalInvalid.

Referenced by dmxBackendLateReInit().

static KeySym dmxKeyCodeToKeySym ( DMXLocalInputInfoPtr  dmxLocal,
KeyCode  keyCode 
)
static
static KeyCode dmxKeySymToKeyCode ( DMXLocalInputInfoPtr  dmxLocal,
KeySym  keySym,
int  tryFirst 
)
static
void dmxMotion ( DevicePtr  pDev,
int *  v,
int  firstAxes,
int  axesCount,
DMXMotionType  type,
DMXBlockType  block 
)

Enqueue a motion event for pDev. The v vector has length axesCount, and contains values for each of the axes, starting at firstAxes.

The type of the motion may be DMX_RELATIVE, DMX_ABSOLUTE, or DMX_ABSOLUTE_CONFINED (in the latter case, the pointer will not be allowed to move outside the global boundaires).

If block is set to DMX_BLOCK, then the SIGIO handler will be blocked around calls to enqueueMotion().

References DMX_ABSOLUTE, DMX_ABSOLUTE_CONFINED, DMX_RELATIVE, dmxCoreMotion(), dmxExtMotion(), dmxGlobalX, dmxGlobalY, and GETDMXLOCALFROMPDEV.

Referenced by dmxCollectAll(), and dmxSigioHandler().

static void enqueueMotion ( DevicePtr  pDev,
int  x,
int  y 
)
static

Enqueue a motion event.

References GETDMXLOCALFROMPDEV.

Referenced by dmxCoreMotion().

Variable Documentation

int dmxGlobalInvalid
static
int dmxGlobalX
static
int dmxGlobalY
static

Generated on Tue Aug 18 2015 01:27:31 for Distributed Multihead X by doxygen 1.8.8