/************************************************************
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 "cursorstr.h"
#include "geext.h"
#include "privates.h"
/* This is the last XI2 event supported by the server. If you add
* events to the protocol, the server will not support these events until
* this number here is bumped.
*/
/**
* This struct stores the core event mask for each client except the client
* that created the window.
*
* Each window that has events selected from other clients has at least one of
* these masks. If multiple clients selected for events on the same window,
* these masks are in a linked list.
*
* The event mask for the client that created the window is stored in
* win->eventMask instead.
*
* The resource id is simply a fake client ID to associate this mask with a
* client.
*
* Kludge: OtherClients and InputClients must be compatible, see code.
*/
typedef struct _OtherClients {
} OtherClients;
/**
* This struct stores the XI event mask for each client.
*
* Each window that has events selected has at least one of these masks. If
* multiple client selected for events on the same window, these masks are in
* a linked list.
*/
typedef struct _InputClients {
/** XI2 event masks. One per device, each bit is a mask of (1 << type) */
} InputClients;
/**
* Combined XI event masks from all devices.
*
* This is the XI equivalent of the deliverableEvents, eventMask and
* dontPropagate mask of the WindowRec (or WindowOptRec).
*
* A window that has an XI client selecting for events has exactly one
* OtherInputMasks struct and exactly one InputClients struct hanging off
* inputClients. Each further client appends to the inputClients list.
* Each Mask field is per-device, with the device id as the index.
* Exception: for non-device events (Presence events), the MAXDEVICES
* deviceid is used.
*/
typedef struct _OtherInputMasks {
/**
* Bitwise OR of all masks by all clients and the window's parent's masks.
*/
/**
* Bitwise OR of all masks by all clients on this window.
*/
/** The do-not-propagate masks for each device. */
/** The clients that selected for events */
/* XI2 event masks. One per device, each bit is a mask of (1 << type) */
/*
* 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. */
unsigned int exact;
} DetailRec;
typedef enum {
} GrabType;
union _GrabMask {
};
/**
* Central struct for device grabs.
* The same struct is used for both core grabs and device grabs, with
* different fields being set.
* If the grab is a core grab (GrabPointer/GrabKeyboard), then the eventMask
* is a combination of standard event masks (i.e. PointerMotionMask |
* ButtonPressMask).
* If the grab is a device grab (GrabDevice), then the eventMask is a
* combination of event masks for a given XI event type (see SetEventInfo).
*
* If the grab is a result of a ButtonPress, then eventMask is the core mask
* and deviceMask is set to the XI event mask for the grab.
*/
typedef struct _GrabRec {
/* XI2 event masks. One per device, each bit is a mask of (1 << type) */
} GrabRec;
typedef struct _KeyClassRec {
int sourceid;
typedef struct _AxisInfo {
int resolution;
int min_resolution;
int max_resolution;
int min_value;
int max_value;
typedef struct _ValuatorAccelerationRec {
int number;
typedef struct _ValuatorClassRec {
int sourceid;
int numMotionEvents;
int first_motion;
int last_motion;
for MDs and SDs!*/
unsigned short numAxes;
typedef struct _ButtonClassRec {
int sourceid;
This counts logical buttons, not
physical ones, i.e if some buttons
are mapped to 0, they're not counted
here */
unsigned short state;
typedef struct _FocusClassRec {
int sourceid;
int revert;
int traceSize;
int traceGood;
typedef struct _ProximityClassRec {
int sourceid;
char pad;
typedef struct _AbsoluteClassRec {
int sourceid;
/* 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 {
typedef struct _PtrFeedbackClassRec {
typedef struct _IntegerFeedbackClassRec {
typedef struct _StringFeedbackClassRec {
typedef struct _BellFeedbackClassRec {
typedef struct _LedFeedbackClassRec {
typedef struct _ClassesRec {
} ClassesRec;
/**
* Sprite information for a device.
*/
typedef struct {
#ifdef PANORAMIX
#endif
* to compute all the windows between the root and the current pointer
* window each time a button or key goes down. The grabs on each of those
* windows must be checked.
int spriteTraceSize;
int spriteTraceGood;
/* Due to delays between event generation and event processing, it is
* possible that the pointer has crossed screen boundaries between the
* time in which it begins generating events and the time when
* those events are processed.
*
* pEnqueueScreen: screen the pointer was on when the event was generated
* pDequeueScreen: screen the pointer was on when the event is processed
*/
/* Device properties */
typedef struct _XIPropertyValue
{
typedef struct _XIProperty
{
typedef struct _XIPropertyHandler
{
long id;
/* states for devices */
#define NOT_GRABBED 0
typedef struct _GrabInfoRec {
void (*ActivateGrab) (
DeviceIntPtr /*device*/,
GrabPtr /*grab*/,
TimeStamp /*time*/,
Bool /*autoGrab*/);
void (*DeactivateGrab)(
DeviceIntPtr /*device*/);
struct {
int state;
} sync;
typedef struct _SpriteInfoRec {
/* sprite must always point to a valid sprite. For devices sharing the
* sprite, let sprite point to a paired spriteOwner's sprite. */
spriteOwner is TRUE, otherwise the
pointer that owns the sprite. */
/* device types */
typedef struct _DeviceIntRec {
server intialization time */
used to initialize, turn on, or
turn off the device */
char *name;
int id;
int nPrivates;
union {
} u;
/* last valuator values recorded, not posted to client;
* for slave devices, valuators is in device coordinates
* for master devices, valuators is in screen coordinates
* see dix/getevents.c
* remainder supports acceleration
*/
struct {
int numValuators;
} last;
/* Input device property handling. */
struct {
} properties;
} DeviceIntRec;
typedef struct {
} InputInfo;
/* for keeping the events for devices grabbed synchronously */
typedef struct _QdEvent {
} QdEventRec;
/**
* syncEvents is the global structure for queued events.
*
* Devices can be frozen through GrabModeSync pointer grabs. If this is the
* case, events from these devices are added to "pending" instead of being
* processed normally. When the device is unfrozen, events in "pending" are
* replayed and processed as if they would come from the device directly.
*/
typedef struct _EventSyncInfo {
/** The device to replay events for. Only set in AllowEvents(), in which
* case it is set to the device specified in the request. */
/**
* The window the events are supposed to be replayed on.
* This window may be set to the grab's window (but only when
* Replay{Pointer|Keyboard} is given in the XAllowEvents()
* request. */
/**
* Flag to indicate whether we're in the process of
* replaying events. Only set in ComputeFreezes(). */
extern EventSyncInfoRec syncEvents;
#endif /* INPUTSTRUCT_H */