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.27; author mrg; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2008.07.31.19.50.27; author mrg; state Exp; branches; next 1.1.1.2; 1.1.1.2 date 2010.11.23.05.21.14; author mrg; state Exp; branches; next 1.1.1.3; 1.1.1.3 date 2011.08.02.06.56.49; author mrg; state Exp; branches; next ; desc @@ 1.2 log @first merge of netbsd changes. not tested yet. @ text @
#include "dmxinputinit.h"#include "dmxbackend.h"#include "dmxcommon.h"#include "dmxconsole.h"#include "dmxcursor.h"#include "dmxprop.h"#include "dmxsync.h"#include "dmxcb.h"#include "dmxevents.h"#include "ChkNotMaskEv.h"#include "inputstr.h"#include "input.h"#include "keysym.h"#include "mipointer.h"#include "scrnintstr.h"#include "windowstr.h"Data Structures | |
| struct | _myPrivate |
Functions | |
| pointer | dmxBackendCreatePrivate (DeviceIntPtr pDevice) |
| void | dmxBackendDestroyPrivate (pointer private) |
| void | dmxBackendUpdatePosition (pointer private, int x, int y) |
| void | dmxBackendCollectEvents (DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, dmxCheckSpecialProcPtr checkspecial, DMXBlockType block) |
| void | dmxBackendProcessInput (pointer private) |
| void | dmxBackendLateReInit (DevicePtr pDev) |
| void | dmxBackendInit (DevicePtr pDev) |
| void | dmxBackendMouGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) |
| void | dmxBackendKbdGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) |
| int | dmxBackendFunctions (pointer private, DMXFunctionType function) |
|
||||||||||||||||||||||||
|
Get events from the X queue on the backend servers and put the events into the DMX event queue. |
|
|
Create and return a private data structure. |
|
|
Destroy the private data structure. No checking is performed to verify that the structure was actually created by dmxBackendCreatePrivate. |
|
||||||||||||
|
Process #DMXFunctionType functions. The only function handled here is to acknowledge a pending server shutdown. |
|
|
Initialized the backend device described by pDev. |
|
||||||||||||
|
Get information about the backend keyboard (for initialization). |
|
|
Re-initialized the backend device described by pDev (after a reconfig). |
|
||||||||||||
|
Get information about the backend pointer (for initialization). |
|
|
Called after input events are processed from the DMX queue. No event processing actually takes place here, but this is a convenient place to update the pointer. |
|
||||||||||||||||
|
This routine is called from #dmxCoreMotion for each motion event. #x and #y are global coordinants. |
#include "dmxinputinit.h"#include "dmxbackend.h"#include "dmxcommon.h"#include "dmxconsole.h"#include "dmxcursor.h"#include "dmxprop.h"#include "dmxsync.h"#include "dmxcb.h"#include "dmxevents.h"#include "ChkNotMaskEv.h"#include "inputstr.h"#include "input.h"#include <X11/keysym.h>#include "mipointer.h"#include "scrnintstr.h"#include "windowstr.h"Data Structures | |
| struct | _myPrivate |
Defines | |
| #define | DMX_BACKEND_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 | DMXDBG8(f, a, b, c, d, e, g, h, i) |
| #define | DMXDBG9(f, a, b, c, d, e, g, h, i, j) |
Typedefs | |
| typedef struct _myPrivate | myPrivate |
Functions | |
| pointer | dmxBackendCreatePrivate (DeviceIntPtr pDevice) |
| void | dmxBackendDestroyPrivate (pointer private) |
| static void * | dmxBackendTestScreen (DMXScreenInfo *dmxScreen, void *closure) |
| static int | dmxBackendSameDisplay (myPrivate *priv, long screen) |
| static void * | dmxBackendTestEvents (DMXScreenInfo *dmxScreen, void *closure) |
| static void * | dmxBackendTestMotionEvent (DMXScreenInfo *dmxScreen, void *closure) |
| static DMXScreenInfo * | dmxBackendGetEvent (myPrivate *priv, XEvent *X) |
| static DMXScreenInfo * | dmxBackendPendingMotionEvent (myPrivate *priv, int save) |
| static void * | dmxBackendTestWindow (DMXScreenInfo *dmxScreen, void *closure) |
| static DMXScreenInfo * | dmxBackendFindWindow (myPrivate *priv, Window win) |
| static int | dmxBackendFindOverlapping (myPrivate *priv, int screen, int x, int y) |
| static int | dmxBackendOffscreen (int screen, int x, int y) |
| void | dmxBackendUpdatePosition (pointer private, int x, int y) |
| void | dmxBackendCollectEvents (DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, dmxCheckSpecialProcPtr checkspecial, DMXBlockType block) |
| void | dmxBackendProcessInput (pointer private) |
| static void | dmxBackendComputeCenter (myPrivate *priv) |
| static DMXScreenInfo * | dmxBackendInitPrivate (DevicePtr pDev) |
| void | dmxBackendLateReInit (DevicePtr pDev) |
| void | dmxBackendInit (DevicePtr pDev) |
| void | dmxBackendMouGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) |
| void | dmxBackendKbdGetInfo (DevicePtr pDev, DMXLocalInitInfoPtr info) |
| int | dmxBackendFunctions (pointer private, DMXFunctionType function) |
These routines support taking input from devices on the backend (output) displays.
| #define DMX_BACKEND_DEBUG 0 |
| #define DMXDBG0 | ( | f | ) |
Referenced by dmxBackendUpdatePosition().
d49 1 a49 26| #define DMXDBG1 | ( | f, | ||
| a | ||||
| ) |
Referenced by dmxBackendLateReInit().
d53 9 a61 6| #define DMXDBG2 | ( | f, | a68 1a69 5 | a, | |||
| d71 2 a72 2 | b | a75 29 | ) |
Referenced by dmxBackendCollectEvents(), and dmxBackendUpdatePosition().
| #define DMXDBG3 | ( | f, | ||||
| a, | ||||||
| d77 2 a78 2 | b, | a80 1a81 4 | c | |||
| ) |
| #define DMXDBG4 | ( | f, | a86 1a87 5 | a, | ||
| d89 2 a90 2 | b, | a92 1d94 2 a95 2 | c, | a96 16|||
| d | ||||||
| ) |
Referenced by dmxBackendCollectEvents(), and dmxBackendProcessInput().
a97 47| #define DMXDBG5 | ( | f, | ||||||
| a, | ||||||||
| b, | ||||||||
| c, | ||||||||
| d, | ||||||||
| e | ||||||||
| ) |
| #define DMXDBG6 | ( | f, | ||
| a, | ||||
| b, | ||||
| c, | ||||
| d, | a125 20||||
| e, | ||||
| g | ||||
| ) |
Referenced by dmxBackendProcessInput().
| #define DMXDBG7 | ( | f, | ||||||
| a, | ||||||||
| b, | ||||||||
| c, | ||||||||
| d, | ||||||||
| e, | ||||||||
| g, | ||||||||
| h | ||||||||
| ) |
| #define DMXDBG8 | ( | f, | ||
| a, | ||||
| b, | a154 46||||
| c, | ||||
| d, | ||||
| e, | ||||
| g, | ||||
| h, | ||||
| i | ||||
| ) |
Referenced by dmxBackendCollectEvents().
a155 71| #define DMXDBG9 | ( | f, | ||||||
| a, | ||||||||
| b, | ||||||||
| c, | ||||||||
| d, | ||||||||
| e, | ||||||||
| g, | ||||||||
| h, | ||||||||
| i, | ||||||||
| j | ||||||||
| ) |
| typedef struct _myPrivate myPrivate |
| void dmxBackendCollectEvents | ( | DevicePtr | pDev, | ||||
| dmxMotionProcPtr | motion, | ||||||
| dmxEnqueueProcPtr | enqueue, | a182 1a183 5 | dmxCheckSpecialProcPtr | checkspecial, | |||
| d185 2 a186 2 | DMXBlockType | block | d190 2 a191 23 | ) |
Get events from the X queue on the backend servers and put the events into the DMX event queue.
References _DMXScreenInfo::beDisplay, DMX_ABSOLUTE, DMX_RELATIVE, dmxBackendFindWindow(), dmxBackendGetEvent(), dmxBackendPendingMotionEvent(), dmxCommonRestoreState(), dmxCommonSaveState(), DMXDBG2, DMXDBG4, DMXDBG5, DMXDBG7, DMXDBG8, DMXDBG9, dmxError, dmxFatal, dmxLog(), dmxSync(), _DMXScreenInfo::index, _DMXScreenInfo::name, _DMXScreenInfo::rootHeight, _DMXScreenInfo::rootWidth, _DMXScreenInfo::rootX, _DMXScreenInfo::rootXOrigin, _DMXScreenInfo::rootY, _DMXScreenInfo::rootYOrigin, and _DMXScreenInfo::scrnWin.
| static void dmxBackendComputeCenter | ( | myPrivate * | priv | ) | [static] |
a192 5
References _myPrivate::centerX, and _myPrivate::centerY.
a193 16Referenced by dmxBackendInit(), and dmxBackendLateReInit().
| pointer dmxBackendCreatePrivate | ( | DeviceIntPtr | pDevice | ) |
| void dmxBackendDestroyPrivate | ( | pointer | private | ) | a221 4 |
Destroy the private data structure. No checking is performed to verify that the structure was actually created by dmxBackendCreatePrivate.
a222 35| static int dmxBackendFindOverlapping | ( | myPrivate * | priv, | |||||
| int | screen, | |||||||
| int | x, | |||||||
| int | y | |||||||
| ) | [static] |
| static DMXScreenInfo* dmxBackendFindWindow | ( | myPrivate * | priv, | a249 1a250 4 | Window | win |
| ) | [static] |
References dmxBackendTestWindow(), and dmxPropertyIterate().
Referenced by dmxBackendCollectEvents().
| int dmxBackendFunctions | ( | pointer | private, | |||||
| DMXFunctionType | function | d257 2 a258 2 | ) | a259 4 |
Process DMXFunctionType functions. The only function handled here is to acknowledge a pending server shutdown.
a260 25References DMX_FUNCTION_TERMINATE.
| static DMXScreenInfo* dmxBackendGetEvent | ( | myPrivate * | priv, | |||||
| XEvent * | X | |||||||
| ) | [static] |
| void dmxBackendInit | ( | DevicePtr | pDev | ) |
Initialized the backend device described by pDev.
References DMX_LOCAL_KEYBOARD, DMX_LOCAL_MOUSE, dmxBackendComputeCenter(), dmxBackendInitPrivate(), dmxBackendSameDisplay(), and _DMXScreenInfo::index.
| static DMXScreenInfo* dmxBackendInitPrivate | ( | DevicePtr | pDev | ) | [static] |
a288 7
References _DMXScreenInfo::beDisplay, dmxFatal, dmxInputs, dmxLog(), dmxNumScreens, dmxPropertySameDisplay(), dmxScreens, _DMXInputInfo::name, and _DMXScreenInfo::scrnWin.
Referenced by dmxBackendInit(), dmxBackendLateReInit(), and dmxBackendMouGetInfo().
a289 23| void dmxBackendKbdGetInfo | ( | DevicePtr | pDev, | |||||
| DMXLocalInitInfoPtr | info | |||||||
| ) |
| void dmxBackendLateReInit | ( | DevicePtr | pDev | ) |
Re-initialized the backend device described by pDev (after a reconfig).
References dmxBackendComputeCenter(), dmxBackendInitPrivate(), dmxBackendSameDisplay(), dmxBackendUpdatePosition(), DMXDBG1, dmxGetGlobalPosition(), and dmxInvalidateGlobalPosition().
| void dmxBackendMouGetInfo | ( | DevicePtr | pDev, | DMXLocalInitInfoPtr | info |
| ) |
Get information about the backend pointer (for initialization).
References _DMXScreenInfo::beHeight, _DMXScreenInfo::beWidth, _DMXLocalInitInfo::buttonClass, dmxBackendInitPrivate(), dmxCommonMouGetMap(), _DMXLocalInitInfo::map, _DMXLocalInitInfo::maxres, _DMXLocalInitInfo::maxval, _DMXLocalInitInfo::minres, _DMXLocalInitInfo::minval, _DMXLocalInitInfo::numButtons, _DMXLocalInitInfo::numRelAxes, _DMXLocalInitInfo::ptrFeedbackClass, _DMXLocalInitInfo::res, and _DMXLocalInitInfo::valuatorClass.
| static int dmxBackendOffscreen | ( | int | screen, | a316 1a317 5 | int | x, | |
| d319 2 a320 2 | int | y | d324 2 a325 2 | ) | [static] |
a326 3
References dmxOnScreen(), and dmxScreens.
Referenced by dmxBackendUpdatePosition().
| static DMXScreenInfo* dmxBackendPendingMotionEvent | ( | myPrivate * | priv, | |||||
| int | save | |||||||
| ) | [static] |
| void dmxBackendProcessInput | ( | pointer | private | ) | a355 6 |
Called after input events are processed from the DMX queue. No event processing actually takes place here, but this is a convenient place to update the pointer.
References DMXDBG4, DMXDBG6, dmxScreens, and dmxSync().
a356 23| static int dmxBackendSameDisplay | ( | myPrivate * | priv, | |||||
| long | screen | |||||||
| ) | [static] |
| static void* dmxBackendTestEvents | ( | DMXScreenInfo * | dmxScreen, | a383 1a384 4 | void * | closure |
| ) | [static] |
References _DMXScreenInfo::beDisplay, and XCheckNotMaskEvent().
Referenced by dmxBackendGetEvent().
| static void* dmxBackendTestMotionEvent | ( | DMXScreenInfo * | dmxScreen, | |||||
| void * | closure | a390 56 | ) | [static] |
References _DMXScreenInfo::beDisplay.
Referenced by dmxBackendPendingMotionEvent().
| static void* dmxBackendTestScreen | ( | DMXScreenInfo * | dmxScreen, | |
| void * | closure | |||
| ) | [static] |
References _DMXScreenInfo::index.
Referenced by dmxBackendSameDisplay().
| static void* dmxBackendTestWindow | ( | DMXScreenInfo * | dmxScreen, | ||||
| d392 2 a393 2 | void * | closure | d397 2 a398 2 | ) | [static] |
a399 5
References _DMXScreenInfo::scrnWin.
a400 31Referenced by dmxBackendFindWindow().
| void dmxBackendUpdatePosition | ( | pointer | private, | |
| int | x, | |||
| int | y | |||
| ) |