deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/* $XFree86$ */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/*
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Copyright 2002 Red Hat Inc., Durham, North Carolina.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * All Rights Reserved.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Permission is hereby granted, free of charge, to any person obtaining
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * a copy of this software and associated documentation files (the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * "Software"), to deal in the Software without restriction, including
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * without limitation on the rights to use, copy, modify, merge,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * publish, distribute, sublicense, and/or sell copies of the Software,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * and to permit persons to whom the Software is furnished to do so,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * subject to the following conditions:
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * The above copyright notice and this permission notice (including the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * next paragraph) shall be included in all copies or substantial
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * portions of the Software.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * SOFTWARE.
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/*
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Authors:
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Rickard E. (Rik) Faith <faith@redhat.com>
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync *
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/** \file
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * Interface for low-level input support. \see dmxinputinit.c */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#ifndef _DMXINPUTINIT_H_
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define _DMXINPUTINIT_H_
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include "dmx.h"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include "dmxinput.h"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#include "dmxlog.h"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_LOCAL_DEFAULT_KEYBOARD "kbd"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_LOCAL_DEFAULT_POINTER "ps2"
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_MAX_BUTTONS 256
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_MOTION_SIZE 256
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_MAX_VALUATORS 32
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_MAX_AXES 32
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_MAX_XINPUT_EVENT_TYPES 100
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_MAP_ENTRIES 16 /* Must be a power of 2 */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#define DMX_MAP_MASK (DMX_MAP_ENTRIES - 1)
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef enum {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_FUNCTION_GRAB,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_FUNCTION_TERMINATE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_FUNCTION_FINE
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} DMXFunctionType;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef enum {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_LOCAL_HIGHLEVEL,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_LOCAL_KEYBOARD,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_LOCAL_MOUSE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_LOCAL_OTHER
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} DMXLocalInputType;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef enum {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_LOCAL_TYPE_LOCAL,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_LOCAL_TYPE_CONSOLE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_LOCAL_TYPE_BACKEND,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_LOCAL_TYPE_COMMON
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} DMXLocalInputExtType;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef enum {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_RELATIVE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_ABSOLUTE,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMX_ABSOLUTE_CONFINED
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} DMXMotionType;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/** Stores information from low-level device that is used to initialize
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * the device at the dix level. */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef struct _DMXLocalInitInfo {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int keyboard; /**< Non-zero if the device is a keyboard */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int keyClass; /**< Non-zero if keys are present */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync KeySymsRec keySyms; /**< Key symbols */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int freemap; /**< If non-zero, free keySyms.map */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync CARD8 modMap[MAP_LENGTH]; /**< Modifier map */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#ifdef XKB
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync XkbDescPtr xkb; /**< XKB description */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync XkbComponentNamesRec names; /**< XKB component names */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int freenames; /**< Non-zero if names should be free'd */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int force; /**< Do not allow command line override */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#endif
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int buttonClass; /**< Non-zero if buttons are present */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int numButtons; /**< Number of buttons */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned char map[DMX_MAX_BUTTONS]; /**< Button map */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int valuatorClass; /**< Non-zero if valuators are
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * present */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int numRelAxes; /**< Number of relative axes */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int numAbsAxes; /**< Number of absolute axes */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int minval[DMX_MAX_AXES]; /**< Minimum values */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int maxval[DMX_MAX_AXES]; /**< Maximum values */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int res[DMX_MAX_AXES]; /**< Resolution */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int minres[DMX_MAX_AXES]; /**< Minimum resolutions */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int maxres[DMX_MAX_AXES]; /**< Maximum resolutions */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int focusClass; /**< Non-zero if device can
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * cause focus */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int proximityClass; /**< Non-zero if device
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * causes proximity events */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int kbdFeedbackClass; /**< Non-zero if device has
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * keyboard feedback */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int ptrFeedbackClass; /**< Non-zero if device has
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * pointer feedback */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int ledFeedbackClass; /**< Non-zero if device has
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * LED indicators */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int belFeedbackClass; /**< Non-zero if device has a
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * bell */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int intFeedbackClass; /**< Non-zero if device has
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * integer feedback */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int strFeedbackClass; /**< Non-zero if device has
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * string feedback */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int maxSymbols; /**< Maximum symbols */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int maxSymbolsSupported; /**< Maximum symbols supported */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync KeySym *symbols; /**< Key symbols */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} DMXLocalInitInfo, *DMXLocalInitInfoPtr;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef pointer (*dmxCreatePrivateProcPtr)(DeviceIntPtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxDestroyPrivateProcPtr)(pointer);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxInitProcPtr)(DevicePtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxReInitProcPtr)(DevicePtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxLateReInitProcPtr)(DevicePtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxGetInfoProcPtr)(DevicePtr, DMXLocalInitInfoPtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*dmxOnProcPtr)(DevicePtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxOffProcPtr)(DevicePtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxUpdatePositionProcPtr)(pointer, int x, int y);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxVTPreSwitchProcPtr)(pointer); /* Turn I/O Off */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxVTPostSwitchProcPtr)(pointer); /* Turn I/O On */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxVTSwitchReturnProcPtr)(pointer);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*dmxVTSwitchProcPtr)(pointer, int vt,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxVTSwitchReturnProcPtr, pointer);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxMotionProcPtr)(DevicePtr,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int *valuators,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int firstAxis,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int axesCount,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMXMotionType type,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMXBlockType block);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxEnqueueProcPtr)(DevicePtr, int type, int detail,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync KeySym keySym, XEvent *e,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMXBlockType block);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*dmxCheckSpecialProcPtr)(DevicePtr, KeySym keySym);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxCollectEventsProcPtr)(DevicePtr,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxMotionProcPtr,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxEnqueueProcPtr,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxCheckSpecialProcPtr,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMXBlockType);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxProcessInputProcPtr)(pointer);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxUpdateInfoProcPtr)(pointer, DMXUpdateType, WindowPtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef int (*dmxFunctionsProcPtr)(pointer, DMXFunctionType);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxKBCtrlProcPtr)(DevicePtr, KeybdCtrl *ctrl);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxMCtrlProcPtr)(DevicePtr, PtrCtrl *ctrl);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef void (*dmxKBBellProcPtr)(DevicePtr, int percent,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int volume, int pitch, int duration);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/** Stores a mapping between the device id on the remote X server and
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * the id on the DMX server */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef struct _DMXEventMap {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int remote; /**< Event number on remote X server */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int server; /**< Event number (unbiased) on DMX server */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} DMXEventMap;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync/** This is the device-independent structure used by the low-level input
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * routines. The contents are not exposed to top-level .c files (except
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * dmxextensions.c). \see dmxinput.h \see dmxextensions.c */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsynctypedef struct _DMXLocalInputInfo {
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const char *name; /**< Device name */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMXLocalInputType type; /**< Device type */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMXLocalInputExtType extType; /**< Extended device type */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int binding; /**< Count of how many consecutive
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * structs are bound to the same
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * device */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync /* Low-level (e.g., keyboard/mouse drivers) */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxCreatePrivateProcPtr create_private; /**< Create
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * device-dependent
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * private */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxDestroyPrivateProcPtr destroy_private; /**< Destroy
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * device-dependent
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * private */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxInitProcPtr init; /**< Initialize device */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxReInitProcPtr reinit; /**< Reinitialize device
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * (during a
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * reconfiguration) */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxLateReInitProcPtr latereinit; /**< Reinitialize a device
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * (called very late
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * during a
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * reconfiguration) */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxGetInfoProcPtr get_info; /**< Get device information */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxOnProcPtr on; /**< Turn device on */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxOffProcPtr off; /**< Turn device off */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxUpdatePositionProcPtr update_position; /**< Called when another
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * device updates the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * cursor position */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxVTPreSwitchProcPtr vt_pre_switch; /**< Called before a VT switch */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxVTPostSwitchProcPtr vt_post_switch; /**< Called after a VT switch */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxVTSwitchProcPtr vt_switch; /**< Causes a VT switch */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxCollectEventsProcPtr collect_events; /**< Collect and enqueue
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * events from the
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * device*/
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxProcessInputProcPtr process_input; /**< Process event (from
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * queue) */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxFunctionsProcPtr functions;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxUpdateInfoProcPtr update_info; /**< Update window layout
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * information */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxMCtrlProcPtr mCtrl; /**< Pointer control */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxKBCtrlProcPtr kCtrl; /**< Keyboard control */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync dmxKBBellProcPtr kBell; /**< Bell control */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync pointer private; /**< Device-dependent private */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int isCore; /**< Is a DMX core device */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int sendsCore; /**< Sends DMX core events */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync KeybdCtrl kctrl; /**< Keyboard control */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync PtrCtrl mctrl; /**< Pointer control */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DeviceIntPtr pDevice; /**< X-level device */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int inputIdx; /**< High-level index */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int lastX, lastY; /**< Last known position;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * for XInput in
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * dmxevents.c */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int head; /**< XInput motion history
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * head */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int tail; /**< XInput motion history
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * tail */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned long *history; /**< XInput motion history */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int *valuators; /**< Cache of previous values */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync /* for XInput ChangePointerDevice */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int (*savedMotionProc)(DeviceIntPtr,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync xTimecoord *,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned long,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync unsigned long,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync ScreenPtr);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int savedMotionEvents; /**< Saved motion events */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int savedSendsCore; /**< Saved sends-core flag */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMXEventMap map[DMX_MAP_ENTRIES]; /**< XInput device id map */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int mapOptimize; /**< XInput device id
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * map
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * optimization */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync long deviceId; /**< device id on remote side,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * if any */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync const char *deviceName; /**< devive name on remote
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync * side, if any */
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync} DMXLocalInputInfoRec;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern DMXLocalInputInfoPtr dmxLocalCorePointer, dmxLocalCoreKeyboard;
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern void dmxLocalInitInput(DMXInputInfo *dmxInput);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern DMXLocalInputInfoPtr dmxInputCopyLocal(DMXInputInfo *dmxInput,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync DMXLocalInputInfoPtr s);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern void dmxChangePointerControl(DeviceIntPtr pDevice, PtrCtrl *ctrl);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern void dmxKeyboardKbdCtrlProc(DeviceIntPtr pDevice, KeybdCtrl *ctrl);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync pointer ctrl, int unknown);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern int dmxInputExtensionErrorHandler(Display *dsp, char *name,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync char *reason);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern int dmxInputDetach(DMXInputInfo *dmxInput);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern void dmxInputDetachAll(DMXScreenInfo *dmxScreen);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern int dmxInputDetachId(int id);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern DMXInputInfo *dmxInputLocateId(int id);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern int dmxInputAttachConsole(const char *name, int isCore,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int *id);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsyncextern int dmxInputAttachBackend(int physicalScreen, int isCore,
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync int *id);
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync
deb4998ba50060c48cce222fd18a8eed053918d7vboxsync#endif