inputstr.h revision 040abec2534dadc53ebc8fa378ef03f4feecb7db
/************************************************************
Copyright 1987, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear in supporting
documentation.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of The Open Group shall not be
used in advertising or otherwise to promote the sale, use or other dealings
in this Software without prior written authorization from The Open Group.
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
All Rights Reserved
Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of Digital not be
used in advertising or publicity pertaining to distribution of the
software without specific, written prior permission.
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
SOFTWARE.
********************************************************/
#ifndef INPUTSTRUCT_H
#define INPUTSTRUCT_H
#include "input.h"
#include "window.h"
#include "dixstruct.h"
#include "privates.h"
#define MAX_DEVICES 20
#define EMASKSIZE MAX_DEVICES
extern DevPrivateKey CoreDevicePrivateKey;
/* Kludge: OtherClients and InputClients must be compatible, see code */
typedef struct _OtherClients {
} OtherClients;
typedef struct _InputClients {
} InputClients;
typedef struct _OtherInputMasks {
/*
* The following structure gets used for both active and passive grabs. For
* active grabs some of the fields (e.g. modifiers) are not used. However,
* that is not much waste since there aren't many active grabs (one per
*/
modifier combinations, but only
3 buttons. */
typedef struct _DetailRec { /* Grab details may be bit masks */
unsigned short exact;
} DetailRec;
typedef struct _GrabRec {
unsigned ownerEvents:1;
unsigned keyboardMode:1;
unsigned pointerMode:1;
} GrabRec;
typedef struct _KeyClassRec {
int modifierKeyCount[8];
unsigned short state;
unsigned short prev_state;
#ifdef XKB
struct _XkbSrvInfo *xkbInfo;
#else
void *pad0;
#endif
} KeyClassRec, *KeyClassPtr;
typedef struct _AxisInfo {
int resolution;
int min_resolution;
int max_resolution;
int min_value;
int max_value;
} AxisInfo, *AxisInfoPtr;
typedef struct _ValuatorClassRec {
int numMotionEvents;
int first_motion;
int last_motion;
void *motion;
unsigned short numAxes;
int *axisVal;
typedef struct _ButtonClassRec {
unsigned short state;
#ifdef XKB
union _XkbAction *xkb_acts;
#else
void *pad0;
#endif
typedef struct _FocusClassRec {
int revert;
int traceSize;
int traceGood;
typedef struct _ProximityClassRec {
char pad;
typedef struct _AbsoluteClassRec {
/* Calibration. */
int min_x;
int max_x;
int min_y;
int max_y;
int flip_x;
int flip_y;
int rotation;
int button_threshold;
/* Area. */
int offset_x;
int offset_y;
int width;
int height;
int screen;
typedef struct _KbdFeedbackClassRec *KbdFeedbackPtr;
typedef struct _PtrFeedbackClassRec *PtrFeedbackPtr;
typedef struct _IntegerFeedbackClassRec *IntegerFeedbackPtr;
typedef struct _StringFeedbackClassRec *StringFeedbackPtr;
typedef struct _BellFeedbackClassRec *BellFeedbackPtr;
typedef struct _LedFeedbackClassRec *LedFeedbackPtr;
typedef struct _KbdFeedbackClassRec {
#ifdef XKB
struct _XkbSrvLedInfo *xkb_sli;
#else
void *pad0;
#endif
typedef struct _PtrFeedbackClassRec {
typedef struct _IntegerFeedbackClassRec {
typedef struct _StringFeedbackClassRec {
typedef struct _BellFeedbackClassRec {
typedef struct _LedFeedbackClassRec {
#ifdef XKB
struct _XkbSrvLedInfo *xkb_sli;
#else
void *pad0;
#endif
/* states for devices */
#define NOT_GRABBED 0
#define THAWED 1
#define FREEZE_NEXT_EVENT 3
#define FREEZE_BOTH_NEXT_EVENT 4
#define FROZEN_NO_EVENT 5
#define FROZEN_WITH_EVENT 6
#define THAW_OTHERS 7
typedef struct _DeviceIntRec {
server intialization time */
used to initialize, turn on, or
turn off the device */
struct {
int state;
int evcount;
} sync;
char *name;
void (*ActivateGrab) (
DeviceIntPtr /*device*/,
GrabPtr /*grab*/,
TimeStamp /*time*/,
Bool /*autoGrab*/);
void (*DeactivateGrab)(
DeviceIntPtr /*device*/);
#ifdef XKB
struct _XkbInterest *xkb_interest;
#else
void *pad0;
#endif
char *config_info; /* used by the hotplug layer */
int nPrivates;
} DeviceIntRec;
typedef struct {
int numDevices; /* total number of devices */
} InputInfo;
/* for keeping the events for devices grabbed synchronously */
typedef struct _QdEvent *QdEventPtr;
typedef struct _QdEvent {
unsigned long months; /* milliseconds is in the event */
int evcount;
} QdEventRec;
#endif /* INPUTSTRUCT_H */