Distributed Multihead X  1.16.4
dmxinputinit.c File Reference
#include "dmxinputinit.h"
#include "dmxextension.h"
#include "dmxdummy.h"
#include "dmxbackend.h"
#include "dmxconsole.h"
#include "dmxcommon.h"
#include "dmxevents.h"
#include "dmxmotion.h"
#include "dmxprop.h"
#include "config/dmxconfig.h"
#include "dmxcursor.h"
#include "lnx-keyboard.h"
#include "lnx-ms.h"
#include "lnx-ps2.h"
#include "usb-keyboard.h"
#include "usb-mouse.h"
#include "usb-other.h"
#include "usb-common.h"
#include "dmxsigio.h"
#include "dmxarg.h"
#include "inputstr.h"
#include "input.h"
#include "mipointer.h"
#include "windowstr.h"
#include "mi.h"
#include "xkbsrv.h"
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
#include "exevents.h"
#include "extinit.h"

Macros

#define DMX_WINDOW_DEBUG   0
 
#define LEN   32
 

Functions

void DDXRingBell (int volume, int pitch, int duration)
 
static void dmxKbdCtrl (DeviceIntPtr pDevice, KeybdCtrl *ctrl)
 
static void dmxBell (int volume, DeviceIntPtr pDev, void *arg, int something)
 
static void _dmxChangePointerControl (DMXLocalInputInfoPtr dmxLocal, PtrCtrl *ctrl)
 
void dmxChangePointerControl (DeviceIntPtr pDevice, PtrCtrl *ctrl)
 
static void _dmxKeyboardKbdCtrlProc (DMXLocalInputInfoPtr dmxLocal, KeybdCtrl *ctrl)
 
void dmxKeyboardKbdCtrlProc (DeviceIntPtr pDevice, KeybdCtrl *ctrl)
 
static void _dmxKeyboardBellProc (DMXLocalInputInfoPtr dmxLocal, int percent)
 
void dmxKeyboardBellProc (int percent, DeviceIntPtr pDevice, void *ctrl, int unknown)
 
static void dmxKeyboardFreeNames (XkbComponentNamesPtr names)
 
static int dmxKeyboardOn (DeviceIntPtr pDevice, DMXLocalInitInfo *info)
 
static int dmxDeviceOnOff (DeviceIntPtr pDevice, int what)
 
static void dmxProcessInputEvents (DMXInputInfo *dmxInput)
 
static void dmxUpdateWindowInformation (DMXInputInfo *dmxInput, DMXUpdateType type, WindowPtr pWindow)
 
static void dmxCollectAll (DMXInputInfo *dmxInput)
 
static void dmxBlockHandler (void *blockData, OSTimePtr pTimeout, void *pReadMask)
 
static void dmxSwitchReturn (void *p)
 
static void dmxWakeupHandler (void *blockData, int result, void *pReadMask)
 
static char * dmxMakeUniqueDeviceName (DMXLocalInputInfoPtr dmxLocal)
 
static DeviceIntPtr dmxAddDevice (DMXLocalInputInfoPtr dmxLocal)
 
static DMXLocalInputInfoPtr dmxLookupLocal (const char *name)
 
DMXLocalInputInfoPtr dmxInputCopyLocal (DMXInputInfo *dmxInput, DMXLocalInputInfoPtr s)
 
static void dmxPopulateLocal (DMXInputInfo *dmxInput, dmxArg a)
 
int dmxInputExtensionErrorHandler (Display *dsp, _Xconst char *name, _Xconst char *reason)
 
static void dmxInputScanForExtensions (DMXInputInfo *dmxInput, int doXI)
 
void dmxInputReInit (DMXInputInfo *dmxInput)
 
void dmxInputLateReInit (DMXInputInfo *dmxInput)
 
void dmxInputInit (DMXInputInfo *dmxInput)
 
static void dmxInputFreeLocal (DMXLocalInputInfoRec *local)
 
void dmxInputFree (DMXInputInfo *dmxInput)
 
void dmxInputLogDevices (void)
 
int dmxInputDetach (DMXInputInfo *dmxInput)
 
void dmxInputDetachAll (DMXScreenInfo *dmxScreen)
 
int dmxInputDetachId (int id)
 
DMXInputInfodmxInputLocateId (int id)
 
static int dmxInputAttachNew (DMXInputInfo *dmxInput, int *id)
 
static int dmxInputAttachOld (DMXInputInfo *dmxInput, int *id)
 
int dmxInputAttachConsole (const char *name, int isCore, int *id)
 
int dmxInputAttachBackend (int physicalScreen, int isCore, int *id)
 

Variables

DMXLocalInputInfoPtr dmxLocalCorePointer
 
DMXLocalInputInfoPtr dmxLocalCoreKeyboard
 
static DMXLocalInputInfoRec DMXDummyMou
 
static DMXLocalInputInfoRec DMXDummyKbd
 
static DMXLocalInputInfoRec DMXBackendMou
 
static DMXLocalInputInfoRec DMXBackendKbd
 
static DMXLocalInputInfoRec DMXConsoleMou
 
static DMXLocalInputInfoRec DMXConsoleKbd
 
static DMXLocalInputInfoRec DMXLocalDevices []
 

Detailed Description

This file provides generic input support. Functions here set up input and lead to the calling of low-level device drivers for input.

Macro Definition Documentation

#define DMX_WINDOW_DEBUG   0
#define LEN   32

Referenced by dmxMakeUniqueDeviceName().

Function Documentation

static void _dmxChangePointerControl ( DMXLocalInputInfoPtr  dmxLocal,
PtrCtrl *  ctrl 
)
static
static void _dmxKeyboardBellProc ( DMXLocalInputInfoPtr  dmxLocal,
int  percent 
)
static
static void _dmxKeyboardKbdCtrlProc ( DMXLocalInputInfoPtr  dmxLocal,
KeybdCtrl *  ctrl 
)
static
void DDXRingBell ( int  volume,
int  pitch,
int  duration 
)
static void dmxBell ( int  volume,
DeviceIntPtr  pDev,
void *  arg,
int  something 
)
static

Referenced by dmxDeviceOnOff().

static void dmxBlockHandler ( void *  blockData,
OSTimePtr  pTimeout,
void *  pReadMask 
)
static

References dmxCollectAll(), and dmxInputs.

Referenced by dmxInputInit().

void dmxChangePointerControl ( DeviceIntPtr  pDevice,
PtrCtrl *  ctrl 
)

Change the pointer control information for the pDevice. If the device sends core events, then also change the control information for all of the pointer devices that send core events.

References _dmxChangePointerControl(), _DMXInputInfo::detached, _DMXInputInfo::devs, dmxInputs, dmxNumInputs, GETDMXLOCALFROMPDEVICE, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::sendsCore.

Referenced by dmxDeviceOnOff().

int dmxInputAttachConsole ( const char *  name,
int  isCore,
int *  id 
)
static int dmxInputAttachNew ( DMXInputInfo dmxInput,
int *  id 
)
static
void dmxInputDetachAll ( DMXScreenInfo dmxScreen)

Search for input associated with dmxScreen, and detach.

References dmxInputDetach(), dmxInputs, dmxNumInputs, _DMXScreenInfo::index, and _DMXInputInfo::scrnIdx.

Referenced by dmxDetachScreen().

int dmxInputDetachId ( int  id)

Search for input associated with deviceId, and detach.

References dmxInputDetach(), and dmxInputLocateId().

Referenced by dmxRemoveInput().

int dmxInputExtensionErrorHandler ( Display *  dsp,
_Xconst char *  name,
_Xconst char *  reason 
)
void dmxInputFree ( DMXInputInfo dmxInput)
void dmxInputLateReInit ( DMXInputInfo dmxInput)

Re-initialize all the devices described in dmxInput. Called from dmxAdjustCursorBoundaries after the cursor is redisplayed.

References _DMXInputInfo::devs, _DMXLocalInputInfo::latereinit, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::pDevice.

Referenced by dmxAdjustCursorBoundaries().

void dmxInputReInit ( DMXInputInfo dmxInput)

Re-initialize all the devices described in dmxInput. Called from dmxAdjustCursorBoundaries before the cursor is redisplayed.

References _DMXInputInfo::devs, _DMXInputInfo::numDevs, _DMXLocalInputInfo::pDevice, and _DMXLocalInputInfo::reinit.

Referenced by dmxAdjustCursorBoundaries().

static void dmxKbdCtrl ( DeviceIntPtr  pDevice,
KeybdCtrl *  ctrl 
)
static

Referenced by dmxDeviceOnOff().

void dmxKeyboardBellProc ( int  percent,
DeviceIntPtr  pDevice,
void *  ctrl,
int  unknown 
)

Sound the bell on the device. If the device send core events, then sound the bell on all of the devices that send core events.

References _dmxKeyboardBellProc(), _DMXInputInfo::detached, _DMXInputInfo::devs, dmxInputs, dmxNumInputs, GETDMXLOCALFROMPDEVICE, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::sendsCore.

Referenced by dmxKeyboardOn().

static void dmxKeyboardFreeNames ( XkbComponentNamesPtr  names)
static

Referenced by dmxKeyboardOn().

void dmxKeyboardKbdCtrlProc ( DeviceIntPtr  pDevice,
KeybdCtrl *  ctrl 
)

Change the keyboard control information for the pDevice. If the device sends core events, then also change the control information for all of the keyboard devices that send core events.

References _dmxKeyboardKbdCtrlProc(), _DMXInputInfo::detached, _DMXInputInfo::devs, dmxInputs, dmxNumInputs, GETDMXLOCALFROMPDEVICE, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::sendsCore.

Referenced by dmxKeyboardOn().

static DMXLocalInputInfoPtr dmxLookupLocal ( const char *  name)
static

References _DMXLocalInputInfo::name.

Referenced by dmxPopulateLocal().

static char* dmxMakeUniqueDeviceName ( DMXLocalInputInfoPtr  dmxLocal)
static

Variable Documentation

DMXLocalInputInfoRec DMXBackendKbd
static
Initial value:
= {
1,
NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
}
void dmxBackendInit(DevicePtr pDev)
Definition: dmxbackend.c:591
Definition: dmxinputinit.h:70
int dmxCommonKbdOn(DevicePtr pDev)
Definition: dmxcommon.c:294
void * dmxCommonCopyPrivate(DeviceIntPtr pDevice)
Definition: dmxcommon.c:562
Definition: dmxinputinit.h:62
void dmxCommonKbdCtrl(DevicePtr pDev, KeybdCtrl *ctrl)
Definition: dmxcommon.c:155
void dmxCommonKbdOff(DevicePtr pDev)
Definition: dmxcommon.c:309
void dmxBackendKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
Definition: dmxbackend.c:639
void dmxCommonKbdBell(DevicePtr pDev, int percent, int volume, int pitch, int duration)
Definition: dmxcommon.c:192
DMXLocalInputInfoRec DMXBackendMou
static
Initial value:
= {
NULL, NULL, NULL,
}
void dmxBackendInit(DevicePtr pDev)
Definition: dmxbackend.c:591
Definition: dmxinputinit.h:63
void dmxBackendUpdatePosition(void *private, int x, int y)
Definition: dmxbackend.c:265
int dmxCommonMouOn(DevicePtr pDev)
Definition: dmxcommon.c:499
Definition: dmxinputinit.h:70
void dmxBackendDestroyPrivate(void *private)
Definition: dmxbackend.c:118
void dmxBackendCollectEvents(DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, dmxCheckSpecialProcPtr checkspecial, DMXBlockType block)
Definition: dmxbackend.c:365
void dmxCommonMouCtrl(DevicePtr pDev, PtrCtrl *ctrl)
Definition: dmxcommon.c:171
void dmxCommonMouOff(DevicePtr pDev)
Definition: dmxcommon.c:519
void dmxBackendProcessInput(void *private)
Definition: dmxbackend.c:503
void dmxBackendLateReInit(DevicePtr pDev)
Definition: dmxbackend.c:576
int dmxBackendFunctions(void *private, DMXFunctionType function)
Definition: dmxbackend.c:653
void dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
Definition: dmxbackend.c:619
void * dmxBackendCreatePrivate(DeviceIntPtr pDevice)
Definition: dmxbackend.c:105
DMXLocalInputInfoRec DMXConsoleKbd
static
Initial value:
= {
1,
NULL, NULL, NULL,
NULL, NULL, NULL, NULL,
}
void dmxConsoleKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
Definition: dmxconsole.c:931
Definition: dmxinputinit.h:69
int dmxCommonKbdOn(DevicePtr pDev)
Definition: dmxcommon.c:294
void * dmxCommonCopyPrivate(DeviceIntPtr pDevice)
Definition: dmxcommon.c:562
Definition: dmxinputinit.h:62
void dmxCommonKbdCtrl(DevicePtr pDev, KeybdCtrl *ctrl)
Definition: dmxcommon.c:155
void dmxCommonKbdOff(DevicePtr pDev)
Definition: dmxcommon.c:309
void dmxConsoleInit(DevicePtr pDev)
Definition: dmxconsole.c:758
void dmxConsoleReInit(DevicePtr pDev)
Definition: dmxconsole.c:733
void dmxCommonKbdBell(DevicePtr pDev, int percent, int volume, int pitch, int duration)
Definition: dmxcommon.c:192
DMXLocalInputInfoRec DMXConsoleMou
static
Initial value:
= {
NULL, NULL, NULL,
}
Definition: dmxinputinit.h:63
void dmxConsoleMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
Definition: dmxconsole.c:908
void * dmxConsoleCreatePrivate(DeviceIntPtr pDevice)
Definition: dmxconsole.c:145
int dmxCommonMouOn(DevicePtr pDev)
Definition: dmxcommon.c:499
int dmxConsoleFunctions(void *private, DMXFunctionType function)
Definition: dmxconsole.c:944
void dmxConsoleCollectEvents(DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, dmxCheckSpecialProcPtr checkspecial, DMXBlockType block)
Definition: dmxconsole.c:484
void dmxCommonMouCtrl(DevicePtr pDev, PtrCtrl *ctrl)
Definition: dmxcommon.c:171
void dmxCommonMouOff(DevicePtr pDev)
Definition: dmxcommon.c:519
void dmxConsoleDestroyPrivate(void *private)
Definition: dmxconsole.c:156
Definition: dmxinputinit.h:69
void dmxConsoleUpdateInfo(void *private, DMXUpdateType type, WindowPtr pWindow)
Definition: dmxconsole.c:394
void dmxConsoleInit(DevicePtr pDev)
Definition: dmxconsole.c:758
void dmxConsoleUpdatePosition(void *private, int x, int y)
Definition: dmxconsole.c:439
void dmxConsoleReInit(DevicePtr pDev)
Definition: dmxconsole.c:733
DMXLocalInputInfoRec DMXDummyKbd
static
Initial value:
= {
NULL, NULL, NULL, NULL, NULL, dmxDummyKbdGetInfo
}
void dmxDummyKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
Definition: dmxdummy.c:51
Definition: dmxinputinit.h:68
Definition: dmxinputinit.h:62
DMXLocalInputInfoRec DMXDummyMou
static
Initial value:
= {
NULL, NULL, NULL, NULL, NULL, dmxDummyMouGetInfo
}
Definition: dmxinputinit.h:63
void dmxDummyMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info)
Definition: dmxdummy.c:71
Definition: dmxinputinit.h:68
DMXLocalInputInfoPtr dmxLocalCorePointer
DMXLocalInputInfoRec DMXLocalDevices[]
static

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