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