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.18; 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

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 "dmxeq.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 "XI.h"
#include "XIproto.h"
#include "exevents.h"
#include "extinit.h"

Functions

void dmxChangePointerControl (DeviceIntPtr pDevice, PtrCtrl *ctrl)
void dmxKeyboardKbdCtrlProc (DeviceIntPtr pDevice, KeybdCtrl *ctrl)
void dmxKeyboardBellProc (int percent, DeviceIntPtr pDevice, pointer ctrl, int unknown)
DMXLocalInputInfoPtr dmxInputCopyLocal (DMXInputInfo *dmxInput, DMXLocalInputInfoPtr s)
void dmxInputReInit (DMXInputInfo *dmxInput)
void dmxInputLateReInit (DMXInputInfo *dmxInput)
void dmxInputInit (DMXInputInfo *dmxInput)
void dmxInputFree (DMXInputInfo *dmxInput)
void dmxInputLogDevices (void)
int dmxInputDetach (DMXInputInfo *dmxInput)
void dmxInputDetachAll (DMXScreenInfo *dmxScreen)
int dmxInputDetachId (int id)

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.

Function Documentation

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.

DMXLocalInputInfoPtr dmxInputCopyLocal DMXInputInfo dmxInput,
DMXLocalInputInfoPtr  s
 

Copy the local input information from s into a new devs slot in dmxInput.

int dmxInputDetach DMXInputInfo dmxInput  ) 
 

Detach an input

void dmxInputDetachAll DMXScreenInfo dmxScreen  ) 
 

Search for input associated with dmxScreen, and detach.

int dmxInputDetachId int  id  ) 
 

Search for input associated with deviceId, and detach.

void dmxInputFree DMXInputInfo dmxInput  ) 
 

Free all of the memory associated with dmxInput

void dmxInputInit DMXInputInfo dmxInput  ) 
 

Initialize all of the devices described in dmxInput.

void dmxInputLateReInit DMXInputInfo dmxInput  ) 
 

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

void dmxInputLogDevices void   ) 
 

Log information about all of the known devices using dmxLog().

void dmxInputReInit DMXInputInfo dmxInput  ) 
 

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

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.

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.


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 49 a57 127

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, _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 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
d59 1 a59 12
#define LEN   32
d61 1 a61 29

Referenced by dmxMakeUniqueDeviceName().


Function Documentation

static void _dmxChangePointerControl ( DMXLocalInputInfoPtr  dmxLocal,
PtrCtrl *  ctrl 
) [static]
d63 1 a63 1

References _DMXLocalInputInfo::mCtrl, _DMXLocalInputInfo::mctrl, and _DMXLocalInputInfo::pDevice.

d65 1 a65 1

Referenced by dmxChangePointerControl().

d67 8 a74 6
d76 4 a79 4 a81 1 d83 3 a85 2 d89 2 a90 2 a91 7
static void _dmxKeyboardBellProc ( DMXLocalInputInfoPtr  dmxLocal, int  percent ) [static]
d94 19 a112 13
static void _dmxKeyboardKbdCtrlProc ( DMXLocalInputInfoPtr  dmxLocal,
KeybdCtrl *  ctrl 
) [static]
d114 4 a117 4 a119 1 a120 5 d122 2 a123 2 d127 2 a128 2 a129 3
void DDXRingBell ( int  volume, int  pitch,
int  duration )
a130 14
d132 26 a157 18
static DeviceIntPtr dmxAddDevice ( DMXLocalInputInfoPtr  dmxLocal  )  [static]
a158 28
static void dmxBell ( int  volume,
DeviceIntPtr  pDev,
pointer  arg,
int  something 
) [static]

Referenced by dmxDeviceOnOff().

a159 29
d161 26 a186 78

References dmxCollectAll(), and dmxInputs.

Referenced by dmxInputInit().

static void dmxBlockHandler ( pointer  blockData,
OSTimePtr  pTimeout,
pointer  pReadMask 
) [static]
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, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::sendsCore.

Referenced by dmxDeviceOnOff().

d190 26 a215 18
int dmxInputAttachBackend ( int  physicalScreen,
int  isCore,
int *  id 
)
a216 20
int dmxInputAttachConsole ( const char *  name,
int  isCore,
int *  id 
)
d219 26 a244 18
static int dmxInputAttachNew ( DMXInputInfo dmxInput,
int *  id 
) [static]
a245 18
static int dmxInputAttachOld ( 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().

a274 22
int dmxInputExtensionErrorHandler ( Display *  dsp,
_Xconst char *  name,
_Xconst char *  reason 
)
a332 5
DMXInputInfo* dmxInputLocateId ( int  id  ) 

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.

a362 25

Referenced by dmxAdjustCursorBoundaries().

d364 19 a382 13
static void dmxInputScanForExtensions ( DMXInputInfo dmxInput,
int  doXI 
) [static]
d384 4 a387 4 a389 1 a390 4 d392 2 a393 20
static void dmxKbdCtrl ( DeviceIntPtr  pDevice, KeybdCtrl *  ctrl 
) [static]

Referenced by dmxDeviceOnOff().

a395 1 a396 5 d398 2 a399 2 a401 1 a402 4 d404 2 a405 49
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, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::sendsCore.

Referenced by dmxKeyboardOn().

static void dmxKeyboardFreeNames ( XkbComponentNamesPtr  names  )  [static]

Referenced by dmxKeyboardOn().

d409 2 a410 2 a411 8
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, _DMXInputInfo::numDevs, and _DMXLocalInputInfo::sendsCore.

Referenced by dmxKeyboardOn().

a412 23
static char* dmxMakeUniqueDeviceName ( DMXLocalInputInfoPtr  dmxLocal  )  [static]
d434 4 a437 4 a439 1 a440 5 d442 2 a443 2 d447 2 a448 2 a449 3
static void dmxWakeupHandler ( pointer  blockData, int  result,
pointer  pReadMask ) [static]

Variable Documentation

d452 14 a465 177
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
}
DMXLocalInputInfoRec DMXBackendKbd [static]
DMXLocalInputInfoRec DMXBackendMou [static]
Initial value:
 {
    "backend-mou", DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_BACKEND, 2,
    dmxBackendCreatePrivate, dmxBackendDestroyPrivate,
    dmxBackendInit, NULL, dmxBackendLateReInit, dmxBackendMouGetInfo,
    dmxCommonMouOn, dmxCommonMouOff, dmxBackendUpdatePosition,
    NULL, NULL, NULL,
    dmxBackendCollectEvents, dmxBackendProcessInput, dmxBackendFunctions, NULL,
    dmxCommonMouCtrl
}
Initial value:
 {
    "common-oth", DMX_LOCAL_OTHER, DMX_LOCAL_TYPE_COMMON, 1,
    dmxCommonCopyPrivate, NULL,
    NULL, NULL, NULL, dmxCommonOthGetInfo,
    dmxCommonOthOn, dmxCommonOthOff
}
Initial value:
 {
    "console-kbd", DMX_LOCAL_KEYBOARD, DMX_LOCAL_TYPE_CONSOLE,
    1, 
    dmxCommonCopyPrivate, NULL,
    dmxConsoleInit, dmxConsoleReInit, NULL, dmxConsoleKbdGetInfo,
    dmxCommonKbdOn, dmxCommonKbdOff, NULL,
    NULL, NULL, NULL,
    NULL, NULL, NULL, NULL,
    NULL, dmxCommonKbdCtrl, dmxCommonKbdBell
}
Initial value:
 {
    "console-mou", DMX_LOCAL_MOUSE, DMX_LOCAL_TYPE_CONSOLE, 2,
    dmxConsoleCreatePrivate, dmxConsoleDestroyPrivate,
    dmxConsoleInit, dmxConsoleReInit, NULL, dmxConsoleMouGetInfo,
    dmxCommonMouOn, dmxCommonMouOff, dmxConsoleUpdatePosition,
    NULL, NULL, NULL,
    dmxConsoleCollectEvents, NULL, dmxConsoleFunctions, dmxConsoleUpdateInfo,
    dmxCommonMouCtrl
}
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
}
@ 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