Distributed Multihead X
1.16.4
|
#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) |
DMXInputInfo * | dmxInputLocateId (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 [] |
This file provides generic input support. Functions here set up input and lead to the calling of low-level device drivers for input.
#define DMX_WINDOW_DEBUG 0 |
#define LEN 32 |
Referenced by dmxMakeUniqueDeviceName().
|
static |
References _DMXLocalInputInfo::mCtrl, _DMXLocalInputInfo::mctrl, and _DMXLocalInputInfo::pDevice.
Referenced by dmxChangePointerControl().
|
static |
References _DMXLocalInputInfo::kBell, _DMXLocalInputInfo::kctrl, and _DMXLocalInputInfo::pDevice.
Referenced by dmxKeyboardBellProc().
|
static |
References _DMXLocalInputInfo::kCtrl, _DMXLocalInputInfo::kctrl, and _DMXLocalInputInfo::pDevice.
Referenced by dmxKeyboardKbdCtrlProc().
void DDXRingBell | ( | int | volume, |
int | pitch, | ||
int | duration | ||
) |
|
static |
References _DMXLocalInputInfo::create_private, DMX_LOCAL_KEYBOARD, DMX_LOCAL_MOUSE, dmxDeviceOnOff(), dmxError, dmxFatal, dmxInputs, dmxLog(), dmxLogInput(), dmxMakeUniqueDeviceName(), _DMXLocalInputInfo::inputIdx, _DMXLocalInputInfo::isCore, _DMXLocalInputInfo::name, _DMXLocalInputInfo::pDevice, _DMXLocalInputInfo::private, _DMXLocalInputInfo::sendsCore, and _DMXLocalInputInfo::type.
Referenced by dmxInputInit().
|
static |
Referenced by dmxDeviceOnOff().
|
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().
|
static |
|
static |
References _DMXLocalInitInfo::belFeedbackClass, _DMXLocalInitInfo::buttonClass, dmxBell(), dmxChangePointerControl(), dmxConfigGetXkbLayout(), dmxConfigGetXkbModel(), dmxConfigGetXkbOptions(), dmxConfigGetXkbRules(), dmxConfigGetXkbVariant(), dmxKbdCtrl(), dmxKeyboardOn(), dmxLog(), dmxPointerGetMotionBufferSize(), dmxSigioRegister(), dmxSigioUnregister(), dmxWarning, _DMXLocalInitInfo::focusClass, _DMXLocalInitInfo::freemap, GETDMXINPUTFROMPDEVICE, _DMXLocalInitInfo::intFeedbackClass, _DMXLocalInitInfo::keyboard, _DMXLocalInitInfo::keyClass, _DMXLocalInitInfo::keySyms, _DMXLocalInitInfo::ledFeedbackClass, _DMXLocalInitInfo::map, _DMXLocalInitInfo::maxres, _DMXLocalInitInfo::maxval, _DMXLocalInitInfo::minres, _DMXLocalInitInfo::minval, _DMXLocalInitInfo::numAbsAxes, _DMXLocalInitInfo::numButtons, _DMXLocalInitInfo::numRelAxes, _DMXLocalInitInfo::proximityClass, _DMXLocalInitInfo::ptrFeedbackClass, _DMXLocalInitInfo::res, _DMXLocalInitInfo::strFeedbackClass, _DMXLocalInitInfo::valuatorClass, and _DMXLocalInitInfo::xkb.
Referenced by dmxAddDevice().
int dmxInputAttachBackend | ( | int | physicalScreen, |
int | isCore, | ||
int * | id | ||
) |
int dmxInputAttachConsole | ( | const char * | name, |
int | isCore, | ||
int * | id | ||
) |
References _DMXInputInfo::detached, dmxConfigAddInput(), dmxInputAttachNew(), dmxInputAttachOld(), dmxInputs, dmxLogInput(), dmxNumInputs, _DMXInputInfo::freename, _DMXInputInfo::name, and _DMXInputInfo::scrnIdx.
Referenced by dmxAddInput().
|
static |
References _DMXInputInfo::devs, dmxInputInit(), dmxInputLogDevices(), and _DMXLocalInputInfo::pDevice.
Referenced by dmxInputAttachBackend(), and dmxInputAttachConsole().
|
static |
DMXLocalInputInfoPtr dmxInputCopyLocal | ( | DMXInputInfo * | dmxInput, |
DMXLocalInputInfoPtr | s | ||
) |
Copy the local input information from s into a new devs slot in dmxInput.
References _DMXInputInfo::core, _DMXLocalInputInfo::deviceId, _DMXInputInfo::devs, dmxFatal, dmxLog(), _DMXInputInfo::inputIdx, _DMXLocalInputInfo::inputIdx, _DMXInputInfo::numDevs, _DMXLocalInputInfo::savedSendsCore, and _DMXLocalInputInfo::sendsCore.
Referenced by dmxInputInit(), and dmxPopulateLocal().
int dmxInputDetach | ( | DMXInputInfo * | dmxInput | ) |
Detach an input
References _DMXInputInfo::detached, _DMXInputInfo::devs, dmxInputLogDevices(), dmxLogInput(), _DMXLocalInputInfo::isCore, _DMXInputInfo::numDevs, _DMXLocalInputInfo::pDevice, and _DMXLocalInputInfo::sendsCore.
Referenced by dmxInputDetachAll(), and dmxInputDetachId().
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 | ||
) |
Referenced by dmxCommonOthGetInfo(), and dmxInputScanForExtensions().
void dmxInputFree | ( | DMXInputInfo * | dmxInput | ) |
Free all of the memory associated with dmxInput
References _DMXInputInfo::devs, dmxInputFreeLocal(), _DMXInputInfo::freename, _DMXInputInfo::geometry, _DMXInputInfo::keycodes, _DMXInputInfo::name, _DMXInputInfo::numDevs, and _DMXInputInfo::symbols.
Referenced by InitOutput().
|
static |
void dmxInputInit | ( | DMXInputInfo * | dmxInput | ) |
Initialize all of the devices described in dmxInput.
References _DMXInputInfo::console, _DMXInputInfo::core, _DMXInputInfo::detached, _DMXInputInfo::devs, dmxAddDevice(), dmxArgC(), dmxArgFree(), dmxArgParse(), dmxArgV(), dmxBlockHandler(), dmxFatal, dmxInputCopyLocal(), dmxInputScanForExtensions(), dmxLog(), dmxLogInput(), dmxNumScreens, dmxPopulateLocal(), dmxProcessInputEvents(), dmxPropertySameDisplay(), dmxScreens, dmxUpdateWindowInformation(), dmxWakeupHandler(), dmxWarning, _DMXInputInfo::geometry, _DMXInputInfo::inputIdx, _DMXInputInfo::keycodes, _DMXInputInfo::name, _DMXInputInfo::numDevs, _DMXLocalInputInfo::pDevice, _DMXInputInfo::processInputEvents, _DMXInputInfo::scrnIdx, _DMXInputInfo::symbols, _DMXInputInfo::updateWindowInfo, and _DMXInputInfo::windows.
Referenced by dmxInputAttachNew(), and InitInput().
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().
DMXInputInfo* dmxInputLocateId | ( | int | id | ) |
References _DMXInputInfo::devs, dmxInputs, dmxNumInputs, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::pDevice.
Referenced by dmxInputDetachId().
void dmxInputLogDevices | ( | void | ) |
Log information about all of the known devices using dmxLog().
References _DMXInputInfo::detached, _DMXLocalInputInfo::deviceId, _DMXLocalInputInfo::deviceName, _DMXInputInfo::devs, dmxGetInputCount(), dmxInfo, dmxInputs, dmxLog(), dmxLogCont(), dmxNumInputs, _DMXInputInfo::inputIdx, _DMXLocalInputInfo::isCore, _DMXInputInfo::name, _DMXInputInfo::numDevs, _DMXLocalInputInfo::pDevice, and _DMXLocalInputInfo::sendsCore.
Referenced by dmxConnectionBlockCallback(), dmxInputAttachNew(), dmxInputAttachOld(), and dmxInputDetach().
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 |
|
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 |
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 |
References dmxConfigGetXkbLayout(), dmxConfigGetXkbModel(), dmxConfigGetXkbOptions(), dmxConfigGetXkbRules(), dmxConfigGetXkbVariant(), dmxKeyboardBellProc(), dmxKeyboardFreeNames(), dmxKeyboardKbdCtrlProc(), dmxLogInput(), dmxLogInputCont(), _DMXLocalInitInfo::force, _DMXLocalInitInfo::freenames, GETDMXINPUTFROMPDEVICE, and _DMXLocalInitInfo::names.
Referenced by dmxDeviceOnOff().
|
static |
References _DMXLocalInputInfo::name.
Referenced by dmxPopulateLocal().
|
static |
References DMX_LOCAL_KEYBOARD, DMX_LOCAL_MOUSE, dmxGeneration, LEN, and _DMXLocalInputInfo::type.
Referenced by dmxAddDevice().
|
static |
References DMX_LOCAL_KEYBOARD, DMX_LOCAL_MOUSE, dmxArgC(), dmxArgV(), dmxFatal, dmxInfo, dmxInputCopyLocal(), dmxLog(), dmxLookupLocal(), dmxWarning, _DMXLocalInputInfo::name, and _DMXLocalInputInfo::type.
Referenced by dmxInputInit().
|
static |
References _DMXLocalInputInfo::binding, _DMXInputInfo::detached, _DMXInputInfo::devs, _DMXInputInfo::numDevs, _DMXLocalInputInfo::private, and _DMXLocalInputInfo::process_input.
Referenced by dmxInputInit().
|
static |
References _DMXInputInfo::devs, dmxFatal, dmxInfo, dmxLog(), dmxSigioEnableInput(), _DMXInputInfo::numDevs, _DMXLocalInputInfo::private, _DMXLocalInputInfo::vt_post_switch, and _DMXInputInfo::vt_switched.
Referenced by dmxWakeupHandler().
|
static |
References _DMXLocalInputInfo::binding, _DMXInputInfo::detached, _DMXInputInfo::devs, DMX_UPDATE_COPY, DMX_UPDATE_REALIZE, DMX_UPDATE_REPARENT, DMX_UPDATE_RESIZE, DMX_UPDATE_RESTACK, DMX_UPDATE_UNREALIZE, dmxDebug, dmxLog(), _DMXInputInfo::numDevs, _DMXLocalInputInfo::private, and _DMXLocalInputInfo::update_info.
Referenced by dmxInputInit().
|
static |
References _DMXInputInfo::devs, dmxCollectAll(), dmxInfo, dmxInputs, dmxLog(), dmxSigioDisableInput(), dmxSwitchReturn(), _DMXInputInfo::numDevs, _DMXLocalInputInfo::private, _DMXLocalInputInfo::vt_pre_switch, _DMXLocalInputInfo::vt_switch, _DMXInputInfo::vt_switch_pending, and _DMXInputInfo::vt_switched.
Referenced by dmxInputInit().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
DMXLocalInputInfoPtr dmxLocalCoreKeyboard |
Referenced by dmxCheckFunctionKeys(), dmxCheckSpecialKeys(), dmxEnqueue(), dmxFixup(), and dmxKeySymToKeyCode().
DMXLocalInputInfoPtr dmxLocalCorePointer |
|
static |