head 1.2; access; symbols netbsd-7-2-RELEASE:1.1.1.3 netbsd-7-1-2-RELEASE:1.1.1.3 netbsd-7-1-1-RELEASE:1.1.1.3 netbsd-7-1:1.1.1.3.0.14 netbsd-7-1-RELEASE:1.1.1.3 netbsd-7-1-RC2:1.1.1.3 netbsd-7-1-RC1:1.1.1.3 netbsd-7-0-2-RELEASE:1.1.1.3 netbsd-7-0-1-RELEASE:1.1.1.3 netbsd-7-0:1.1.1.3.0.12 netbsd-7-0-RELEASE:1.1.1.3 netbsd-7-0-RC3:1.1.1.3 netbsd-7-0-RC2:1.1.1.3 netbsd-7-0-RC1:1.1.1.3 netbsd-5-2-3-RELEASE:1.1.1.1 netbsd-5-1-5-RELEASE:1.1.1.1 netbsd-6-0-6-RELEASE:1.1.1.3 netbsd-6-1-5-RELEASE:1.1.1.3 netbsd-7:1.1.1.3.0.10 netbsd-7-base:1.1.1.3 netbsd-6-1-4-RELEASE:1.1.1.3 netbsd-6-0-5-RELEASE:1.1.1.3 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.3 riastradh-drm2:1.1.1.3.0.8 riastradh-drm2-base:1.1.1.3 netbsd-6-1-3-RELEASE:1.1.1.3 netbsd-6-0-4-RELEASE:1.1.1.3 netbsd-5-2-2-RELEASE:1.1.1.1 netbsd-5-1-4-RELEASE:1.1.1.1 netbsd-6-1-2-RELEASE:1.1.1.3 netbsd-6-0-3-RELEASE:1.1.1.3 netbsd-5-2-1-RELEASE:1.1.1.1 netbsd-5-1-3-RELEASE:1.1.1.1 netbsd-6-1-1-RELEASE:1.1.1.3 xorg-server-1-10-6:1.1.1.3 netbsd-6-1:1.1.1.3.0.6 netbsd-6-0-2-RELEASE:1.1.1.3 netbsd-6-1-RELEASE:1.1.1.3 netbsd-6-1-RC4:1.1.1.3 netbsd-6-1-RC3:1.1.1.3 netbsd-6-1-RC2:1.1.1.3 netbsd-6-1-RC1:1.1.1.3 netbsd-5-2:1.1.1.1.0.8 netbsd-6-0-1-RELEASE:1.1.1.3 netbsd-5-2-RELEASE:1.1.1.1 netbsd-5-2-RC1:1.1.1.1 netbsd-6-0:1.1.1.3.0.4 netbsd-6-0-RELEASE:1.1.1.3 netbsd-6-0-RC2:1.1.1.3 netbsd-6-0-RC1:1.1.1.3 netbsd-6:1.1.1.3.0.2 netbsd-6-base:1.1.1.3 netbsd-5-1-2-RELEASE:1.1.1.1 netbsd-5-1-1-RELEASE:1.1.1.1 xorg-server-1-10-3:1.1.1.3 mrg-xorg-server-1-9-5-pre-1-10-3:1.1.1.2 xorg-server-1-9-5:1.1.1.2 xorg-server-1-9-2:1.1.1.2 netbsd-5-1:1.1.1.1.0.6 netbsd-5-1-RELEASE:1.1.1.1 netbsd-5-1-RC4:1.1.1.1 netbsd-5-1-RC3:1.1.1.1 netbsd-5-1-RC2:1.1.1.1 netbsd-5-1-RC1:1.1.1.1 netbsd-5-0-2-RELEASE:1.1.1.1 xorg-server-1-6-5:1.1.1.1 xorg-server-1-6-3:1.1.1.1 netbsd-5-0-1-RELEASE:1.1.1.1 xorg-server-1-6-2:1.1.1.1 xorg-server-1-6-1-901:1.1.1.1 netbsd-5-0:1.1.1.1.0.4 netbsd-5-0-RELEASE:1.1.1.1 netbsd-5-0-RC4:1.1.1.1 netbsd-5-0-RC3:1.1.1.1 netbsd-5-0-RC2:1.1.1.1 netbsd-5-0-RC1:1.1.1.1 netbsd-5:1.1.1.1.0.2 netbsd-5-base:1.1.1.1 xorg-server-1-4-2:1.1.1.1 xorg:1.1.1; locks; strict; comment @# @; 1.2 date 2016.08.11.00.04.28; author mrg; state dead; branches; next 1.1; commitid FQxwnZNPy5ZgOOhz; 1.1 date 2008.07.31.19.50.30; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.30; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.16; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.50; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @ File Index
Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals

dmxevents.c File Reference

#include "dmxinputinit.h"
#include "dmxevents.h"
#include "dmxcb.h"
#include "dmxcommon.h"
#include "dmxcursor.h"
#include "dmxmotion.h"
#include "dmxeq.h"
#include "dmxsigio.h"
#include "dmxmap.h"
#include "keysym.h"
#include "opaque.h"
#include "inputstr.h"
#include "mipointer.h"
#include "XIstubs.h"

Functions

void dmxGetGlobalPosition (int *x, int *y)
void dmxInvalidateGlobalPosition (void)
void dmxMotion (DevicePtr pDev, int *v, int firstAxes, int axesCount, DMXMotionType type, DMXBlockType block)
void dmxEnqueue (DevicePtr pDev, int type, int detail, KeySym keySym, XEvent *e, DMXBlockType block)
int dmxCheckSpecialKeys (DevicePtr pDev, KeySym keySym)

Detailed Description

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

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.

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

Enqueue a non-motion 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.

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

void dmxGetGlobalPosition int *  x,
int *  y
 

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

void dmxInvalidateGlobalPosition void   ) 
 

Invalidate the global position for #dmxCoreMotion.

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


Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4. @ 1.1 log @Initial revision @ text @@ 1.1.1.1 log @initial import of xorg-server-1.4.2 @ text @@ 1.1.1.2 log @import xorg-server 1.9.2. important changes since 1.6.5 include: - built-in symbol visibility, default not export - fixes for various crashes - many fixes for XI2, EXA, dix, render, glx, xkb, EDID, randr, Xv, resource handling, Xext, vfb, xfree86 / vga and composite support. - fixes several memory leaks - many many documentation updates - record extension enabled - no longer looks for XF86Config files @ text @d9 20 a28 92

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 "mipointer.h"
#include "mi.h"
#include "exglobals.h"
#include "xkbsrv.h"
#include "XIstubs.h"

Defines

#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
#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.


Define Documentation

#define DMX_EVENTS_DEBUG   0
d30 1 a30 12
#define DMX_MAX_AXES   32
d32 1 a32 1

Referenced by dmxExtMotion(), and othUSBGetInfo().

d34 1 a34 17
#define DMXDBG0 (   f  ) 
d36 1 a36 26
#define DMXDBG1 (   f,
  a 
)
d38 8 a45 6
d47 4 a50 4 a52 1 a53 5 d55 2 a56 2 d60 2 a61 2 a62 5
#define DMXDBG2 (   f,   a,
  b )
d65 19 a83 11
#define DMXDBG3 (   f,
  a,
  b,
  c 
)
d85 4 a88 4 a90 1 a91 5 d93 2 a94 2 a96 1 a97 5 d99 2 a100 2 a103 23
#define DMXDBG4 (   f,   a,
  b,   c,
  d )

Referenced by dmxCoreMotion().

d105 2 a106 2 a108 1 a109 5 d111 2 a112 2 a114 1 a115 5 d117 2 a118 2 d122 2 a123 2 a124 3
#define DMXDBG5 (   f,
  a,   b,
  c,   d,
  e )
a125 55

Referenced by dmxCoreMotion().

d127 20 a146 11

Referenced by dmxCoreMotion().

#define DMXDBG6 (   f,
  a,
  b,
  c,
  d,
  e,
  g 
)
d148 4 a151 4 a153 1 a154 5 d156 2 a157 2 a159 1 d161 2 a162 2 a163 32
#define DMXDBG7 (   f,   a,
  b,   c,
  d,
  e,
  g,
  h 
)
a164 23
d166 26 a191 34
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

#define EXTRACT_VALUATORS (   ke,
  valuators 
)
a192 5
static int dmxApplyFunctions ( DMXInputInfo dmxInput,
DMXFunctionType  f 
) [static]
d195 19 a213 13
static int dmxCheckFunctionKeys ( DMXLocalInputInfoPtr  dmxLocal,
int  type,
KeySym  keySym 
) [static]
d215 4 a218 4 a220 1 a221 4 d223 2 a224 23
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(), and _DMXLocalInputInfo::pDevice.

Referenced by dmxCollectAll(), and dmxSigioHandler().

d241 2 a242 2 a244 1 a245 5 d247 2 a248 2 a250 1 d252 2 a253 2 a254 16
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().

a255 51

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

Referenced by dmxCollectAll(), and dmxSigioHandler().

d257 16 a272 409
static void dmxExtMotion ( DMXLocalInputInfoPtr  dmxLocal,
int *  v,
int  firstAxis,
int  axesCount,
DMXMotionType  type,
DMXBlockType  block 
) [static]
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, and dmxGlobalY.

Referenced by dmxCollectAll(), and dmxSigioHandler().

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

Enqueue a motion event.

Referenced by dmxCoreMotion().


Variable Documentation

int dmxGlobalX [static]
int dmxGlobalY [static]
@ 1.1.1.3 log @initial import of xorg-server 1.10.3. highlights include: - fixes xorg bugs 29969, 30367, 30527, 30267, 30260, 29046, 30260, 31548, 28672, 24887, 32115, 21457, 32436, 21827, 28414, 24703, 32803, 16318, 33449, 33324, 33929, 35082, 35209, 36146, 36119 - many additional NULL checks - adjustments related to input ABI 12 - *lots* of dead code removal - vga arbitrator fixes - GL fixes - EDID fixes - conversion to using asprintf() in many places - many fixes from valgrind, compiler warnings see these for more details: http://lists.freedesktop.org/archives/xorg-announce/2011-February/001612.html http://lists.freedesktop.org/archives/xorg-announce/2011-April/001646.html http://lists.freedesktop.org/archives/xorg-announce/2011-May/001675.html http://lists.freedesktop.org/archives/xorg-announce/2011-July/001710.html @ text @d9 3 a11 2