f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Copyright 2002 Red Hat Inc., Durham, North Carolina.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * All Rights Reserved.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Permission is hereby granted, free of charge, to any person obtaining
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * a copy of this software and associated documentation files (the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * "Software"), to deal in the Software without restriction, including
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * without limitation on the rights to use, copy, modify, merge,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * and to permit persons to whom the Software is furnished to do so,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * subject to the following conditions:
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * The above copyright notice and this permission notice (including the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * next paragraph) shall be included in all copies or substantial
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * portions of the Software.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * SOFTWARE.
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Rickard E. (Rik) Faith <faith@redhat.com>
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * Interface for low-level input support. \see dmxinputinit.c */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync#define DMX_MAP_ENTRIES 16 /* Must be a power of 2 */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef enum {
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Stores information from low-level device that is used to initialize
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * the device at the dix level. */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int keyboard; /**< Non-zero if the device is a keyboard */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync XkbComponentNamesRec names; /**< XKB component names */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int freenames; /**< Non-zero if names should be free'd */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int force; /**< Do not allow command line override */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int buttonClass; /**< Non-zero if buttons are present */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned char map[DMX_MAX_BUTTONS]; /**< Button map */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * present */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int minres[DMX_MAX_AXES]; /**< Minimum resolutions */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int maxres[DMX_MAX_AXES]; /**< Maximum resolutions */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * cause focus */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * causes proximity events */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * keyboard feedback */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * pointer feedback */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * LED indicators */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int belFeedbackClass; /**< Non-zero if device has a
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * integer feedback */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * string feedback */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int maxSymbolsSupported; /**< Maximum symbols supported */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef pointer (*dmxCreatePrivateProcPtr)(DeviceIntPtr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxGetInfoProcPtr)(DevicePtr, DMXLocalInitInfoPtr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxUpdatePositionProcPtr)(pointer, int x, int y);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxVTPreSwitchProcPtr)(pointer); /* Turn I/O Off */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxVTPostSwitchProcPtr)(pointer); /* Turn I/O On */
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxEnqueueProcPtr)(DevicePtr, int type, int detail,
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef int (*dmxCheckSpecialProcPtr)(DevicePtr, KeySym keySym);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxUpdateInfoProcPtr)(pointer, DMXUpdateType, WindowPtr);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef int (*dmxFunctionsProcPtr)(pointer, DMXFunctionType);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxKBCtrlProcPtr)(DevicePtr, KeybdCtrl *ctrl);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxMCtrlProcPtr)(DevicePtr, PtrCtrl *ctrl);
f78b12e570284aa8291f4ca1add24937fd107403vboxsynctypedef void (*dmxKBBellProcPtr)(DevicePtr, int percent,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** Stores a mapping between the device id on the remote X server and
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * the id on the DMX server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int remote; /**< Event number on remote X server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync int server; /**< Event number (unbiased) on DMX server */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync/** This is the device-independent structure used by the low-level input
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * routines. The contents are not exposed to top-level .c files (except
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * dmxextensions.c). \see dmxinput.h \see dmxextensions.c */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DMXLocalInputExtType extType; /**< Extended device type */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * structs are bound to the same
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * device */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* Low-level (e.g., keyboard/mouse drivers) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxCreatePrivateProcPtr create_private; /**< Create
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * device-dependent
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * private */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxDestroyPrivateProcPtr destroy_private; /**< Destroy
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * device-dependent
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * private */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * (during a
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * reconfiguration) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxLateReInitProcPtr latereinit; /**< Reinitialize a device
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * (called very late
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * reconfiguration) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxGetInfoProcPtr get_info; /**< Get device information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxUpdatePositionProcPtr update_position; /**< Called when another
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * device updates the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * cursor position */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxVTPreSwitchProcPtr vt_pre_switch; /**< Called before a VT switch */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxVTPostSwitchProcPtr vt_post_switch; /**< Called after a VT switch */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxVTSwitchProcPtr vt_switch; /**< Causes a VT switch */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxCollectEventsProcPtr collect_events; /**< Collect and enqueue
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * events from the
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxProcessInputProcPtr process_input; /**< Process event (from
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * queue) */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync dmxUpdateInfoProcPtr update_info; /**< Update window layout
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * information */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * for XInput in
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long *history; /**< XInput motion history */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync /* for XInput ChangePointerDevice */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync unsigned long,
f78b12e570284aa8291f4ca1add24937fd107403vboxsync DMXEventMap map[DMX_MAP_ENTRIES]; /**< XInput device id map */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * optimization */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * if any */
f78b12e570284aa8291f4ca1add24937fd107403vboxsync * side, if any */
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DMXLocalInputInfoPtr dmxLocalCorePointer, dmxLocalCoreKeyboard;
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxLocalInitInput(DMXInputInfo *dmxInput);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern DMXLocalInputInfoPtr dmxInputCopyLocal(DMXInputInfo *dmxInput,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxChangePointerControl(DeviceIntPtr pDevice, PtrCtrl *ctrl);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxKeyboardKbdCtrlProc(DeviceIntPtr pDevice, KeybdCtrl *ctrl);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxInputExtensionErrorHandler(Display *dsp, _Xconst char *name,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern void dmxInputDetachAll(DMXScreenInfo *dmxScreen);
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxInputAttachConsole(const char *name, int isCore,
f78b12e570284aa8291f4ca1add24937fd107403vboxsyncextern int dmxInputAttachBackend(int physicalScreen, int isCore,