45e9809aff7304721fddb95654901b32195c9c7avboxsync/************************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1987, 1998 The Open Group
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission to use, copy, modify, distribute, and sell this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation for any purpose is hereby granted without fee, provided that
45e9809aff7304721fddb95654901b32195c9c7avboxsyncthe above copyright notice appear in all copies and that both that
45e9809aff7304721fddb95654901b32195c9c7avboxsynccopyright notice and this permission notice appear in supporting
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncThe above copyright notice and this permission notice shall be included in
45e9809aff7304721fddb95654901b32195c9c7avboxsyncall copies or substantial portions of the Software.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
45e9809aff7304721fddb95654901b32195c9c7avboxsyncOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
45e9809aff7304721fddb95654901b32195c9c7avboxsyncAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncExcept as contained in this notice, the name of The Open Group shall not be
45e9809aff7304721fddb95654901b32195c9c7avboxsyncused in advertising or otherwise to promote the sale, use or other dealings
45e9809aff7304721fddb95654901b32195c9c7avboxsyncin this Software without prior written authorization from The Open Group.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
45e9809aff7304721fddb95654901b32195c9c7avboxsync All Rights Reserved
45e9809aff7304721fddb95654901b32195c9c7avboxsyncPermission to use, copy, modify, and distribute this software and its
45e9809aff7304721fddb95654901b32195c9c7avboxsyncdocumentation for any purpose and without fee is hereby granted,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncprovided that the above copyright notice appear in all copies and that
45e9809aff7304721fddb95654901b32195c9c7avboxsyncboth that copyright notice and this permission notice appear in
45e9809aff7304721fddb95654901b32195c9c7avboxsyncsupporting documentation, and that the name of Digital not be
45e9809aff7304721fddb95654901b32195c9c7avboxsyncused in advertising or publicity pertaining to distribution of the
45e9809aff7304721fddb95654901b32195c9c7avboxsyncsoftware without specific, written prior permission.
45e9809aff7304721fddb95654901b32195c9c7avboxsyncDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
45e9809aff7304721fddb95654901b32195c9c7avboxsyncALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
45e9809aff7304721fddb95654901b32195c9c7avboxsyncDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
45e9809aff7304721fddb95654901b32195c9c7avboxsyncANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
45e9809aff7304721fddb95654901b32195c9c7avboxsync********************************************************/
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define POINTER_SCREEN (1 << 4) /* Data in screen coordinates */
45e9809aff7304721fddb95654901b32195c9c7avboxsync/*int constants for pointer acceleration schemes*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Maximum number of valuators, divided by six, rounded up, to get number
45e9809aff7304721fddb95654901b32195c9c7avboxsync * of events. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define MAX_BUTTONS 256 /* completely arbitrarily chosen */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define DOWN_LENGTH 32 /* 256/8 => number of bytes to hold 256 bits */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define FollowKeyboardWin ((WindowPtr) FollowKeyboard)
45e9809aff7304721fddb95654901b32195c9c7avboxsync int evlen; /* length of allocated memory for event in bytes. This is not
45e9809aff7304721fddb95654901b32195c9c7avboxsync the actual length of the event. The event's actual length is
45e9809aff7304721fddb95654901b32195c9c7avboxsync 32 for standard events or 32 +
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((xGenericEvent*)event)->length * 4 for GenericEvents.
45e9809aff7304721fddb95654901b32195c9c7avboxsync For events in the EQ, the length is
45e9809aff7304721fddb95654901b32195c9c7avboxsync ((InternalEvent*)event)->u.any.length */
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* The DIX stores incoming input events in this list */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*what*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsync void* /*data*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync void* /*data*/
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* pointer acceleration handling */
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*first_valuator*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*num_valuators*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int* /*valuators*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*evtime*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsynctypedef struct {
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Key has been run through all input processing and events sent to clients. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Key has not been fully processed, no events have been sent. */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void set_key_down(DeviceIntPtr pDev, int key_code, int type);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void set_key_up(DeviceIntPtr pDev, int key_code, int type);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int key_is_down(DeviceIntPtr pDev, int key_code, int type);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void InitCoreDevices(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void InitXTestDevices(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int InitAndStartDevices(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void CloseDownDevices(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void UndisplayDevices(void);
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* id */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*numButtons*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitValuatorClassDeviceStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*numAxes*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*numMotionEvents*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*mode*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitPointerAccelerationScheme(
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*scheme*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitAbsoluteClassDeviceStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*percent*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitPtrFeedbackClassDeviceStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitStringFeedbackClassDeviceStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*max_symbols*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*num_symbols_supported*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitBellFeedbackClassDeviceStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitLedFeedbackClassDeviceStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT Bool InitIntegerFeedbackClassDeviceStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*numButtons*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*numMotionEvents*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*numAxes*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* len */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*length*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned /*low*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned /*high*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*led*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned int /*key*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /*argc*/,
45e9809aff7304721fddb95654901b32195c9c7avboxsync char ** /*argv*/);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT int GetEventList(EventListPtr* list);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT EventListPtr InitEventList(int num_events);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT void FreeEventList(EventListPtr list, int num_events);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void CreateClassesChangedEvent(EventListPtr event,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long time);
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long start,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned long stop,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern _X_EXPORT DeviceIntPtr GetPairedDevice(DeviceIntPtr kbd);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern DeviceIntPtr GetMaster(DeviceIntPtr dev, int type);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void DeepCopyDeviceClasses(DeviceIntPtr from,
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Helper functions. */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int generate_modkeymap(ClientPtr client, DeviceIntPtr dev,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int change_modmap(ClientPtr client, DeviceIntPtr dev, KeyCode *map,
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern DeviceIntPtr GetXTestDevice(DeviceIntPtr master);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void SendDevicePresenceEvent(int deviceid, int type);
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* misc event helpers */
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event);
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern Mask GetWindowXI2Mask(DeviceIntPtr dev, WindowPtr win, xEvent* ev);
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Implemented by the DDX. */
45e9809aff7304721fddb95654901b32195c9c7avboxsync/* Set to TRUE by default - os/utils.c sets it to FALSE on user request,
45e9809aff7304721fddb95654901b32195c9c7avboxsync xfixes/cursor.c uses it to determine if the cursor is enabled */
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* INPUT_H */