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"

Defines

#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, pointer 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, pointer 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 (pointer blockData, OSTimePtr pTimeout, pointer pReadMask)
static void dmxSwitchReturn (pointer p)
static void dmxWakeupHandler (pointer blockData, int result, pointer 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, char *name, 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 DMXCommonOth
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.


Define 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 DeviceIntPtr dmxAddDevice ( DMXLocalInputInfoPtr  dmxLocal  )  [static]
static void dmxBell ( int  volume,
DeviceIntPtr  pDev,
pointer  arg,
int  something 
) [static]

Referenced by dmxDeviceOnOff().

static void dmxBlockHandler ( pointer  blockData,
OSTimePtr  pTimeout,
pointer  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().

static void dmxCollectAll ( DMXInputInfo dmxInput  )  [static]
static int dmxDeviceOnOff ( DeviceIntPtr  pDevice,
int  what 
) [static]
int dmxInputAttachBackend ( int  physicalScreen,
int  isCore,
int *  id 
)
int dmxInputAttachConsole ( const char *  name,
int  isCore,
int *  id 
)
static int dmxInputAttachNew ( DMXInputInfo dmxInput,
int *  id 
) [static]
static int dmxInputAttachOld ( DMXInputInfo dmxInput,
int *  id 
) [static]
DMXLocalInputInfoPtr dmxInputCopyLocal ( DMXInputInfo dmxInput,
DMXLocalInputInfoPtr  s 
)
int dmxInputDetach ( DMXInputInfo dmxInput  ) 
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,
char *  name,
char *  reason 
)
void dmxInputFree ( DMXInputInfo dmxInput  ) 
static void dmxInputFreeLocal ( DMXLocalInputInfoRec local  )  [static]
void dmxInputInit ( 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().

DMXInputInfo* dmxInputLocateId ( int  id  ) 
void dmxInputLogDevices ( void   ) 
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 dmxInputScanForExtensions ( DMXInputInfo dmxInput,
int  doXI 
) [static]
static void dmxKbdCtrl ( DeviceIntPtr  pDevice,
KeybdCtrl *  ctrl 
) [static]

Referenced by dmxDeviceOnOff().

void dmxKeyboardBellProc ( int  percent,
DeviceIntPtr  pDevice,
pointer  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 int dmxKeyboardOn ( DeviceIntPtr  pDevice,
DMXLocalInitInfo info 
) [static]
static DMXLocalInputInfoPtr dmxLookupLocal ( const char *  name  )  [static]

References _DMXLocalInputInfo::name.

Referenced by dmxPopulateLocal().

static char* dmxMakeUniqueDeviceName ( DMXLocalInputInfoPtr  dmxLocal  )  [static]
static void dmxPopulateLocal ( DMXInputInfo dmxInput,
dmxArg  a 
) [static]
static void dmxProcessInputEvents ( DMXInputInfo dmxInput  )  [static]
static void dmxSwitchReturn ( pointer  p  )  [static]
static void dmxUpdateWindowInformation ( DMXInputInfo dmxInput,
DMXUpdateType  type,
WindowPtr  pWindow 
) [static]
static void dmxWakeupHandler ( pointer  blockData,
int  result,
pointer  pReadMask 
) [static]

Variable Documentation

Initial value:
 {
    "backend-kbd", DMX_LOCAL_KEYBOARD, DMX_LOCAL_TYPE_BACKEND,
    1, 
    dmxCommonCopyPrivate, NULL,
    dmxBackendInit, NULL, NULL, dmxBackendKbdGetInfo,
    dmxCommonKbdOn, dmxCommonKbdOff, NULL,
    NULL, NULL, NULL,
    NULL, NULL, NULL, NULL,
    NULL, dmxCommonKbdCtrl, dmxCommonKbdBell
}
Initial value:
Initial value:
Initial value:
 {
    "dummy-kbd", DMX_LOCAL_KEYBOARD, DMX_LOCAL_TYPE_LOCAL, 1,
    NULL, NULL, NULL, NULL, NULL, dmxDummyKbdGetInfo
}
Initial value:
 {
    "dummy-mou", DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_LOCAL, 1,
    NULL, NULL, NULL, NULL, NULL, dmxDummyMouGetInfo
}

Generated June 29, 2004 for Distributed Multihead X by doxygen 1.3.4.