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