45e9809aff7304721fddb95654901b32195c9c7avboxsync/************************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncCopyright 1996 by Thomas E. Dickey <dickey@clark.net>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync All Rights Reserved
45e9809aff7304721fddb95654901b32195c9c7avboxsync
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 the above listed
45e9809aff7304721fddb95654901b32195c9c7avboxsynccopyright holder(s) not be used in advertising or publicity pertaining
45e9809aff7304721fddb95654901b32195c9c7avboxsyncto distribution of the software without specific, written prior
45e9809aff7304721fddb95654901b32195c9c7avboxsyncpermission.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTHE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD
45e9809aff7304721fddb95654901b32195c9c7avboxsyncTO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
45e9809aff7304721fddb95654901b32195c9c7avboxsyncAND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE
45e9809aff7304721fddb95654901b32195c9c7avboxsyncLIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
45e9809aff7304721fddb95654901b32195c9c7avboxsyncWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
45e9809aff7304721fddb95654901b32195c9c7avboxsyncACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
45e9809aff7304721fddb95654901b32195c9c7avboxsyncOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync********************************************************/
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync/********************************************************************
45e9809aff7304721fddb95654901b32195c9c7avboxsync * Interface of 'exevents.c'
45e9809aff7304721fddb95654901b32195c9c7avboxsync */
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#ifndef EXEVENTS_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync#define EXEVENTS_H
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#include <X11/extensions/XIproto.h>
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void RegisterOtherDevice (
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* device */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void ProcessOtherEvent (
45e9809aff7304721fddb95654901b32195c9c7avboxsync xEventPtr /* FIXME deviceKeyButtonPointer * xE */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* other */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* count */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int InitProximityClassDeviceStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void InitValuatorAxisStruct(
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* axnum */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* minval */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* maxval */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* resolution */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* min_res */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* max_res */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void DeviceFocusEvent(
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* type */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* mode */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* detail */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr /* pWin */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int GrabButton(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync BYTE /* this_device_mode */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync BYTE /* other_devices_mode */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD16 /* modifiers */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* modifier_device */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD8 /* button */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Window /* grabWindow */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync BOOL /* ownerEvents */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Cursor /* rcursor */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Window /* rconfineTo */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* eventMask */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int GrabKey(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync BYTE /* this_device_mode */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync BYTE /* other_devices_mode */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD16 /* modifiers */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* modifier_device */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD8 /* key */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Window /* grabWindow */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync BOOL /* ownerEvents */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* mask */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SelectForWindow(
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr /* pWin */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* mask */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* exclusivemasks */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* validmasks */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int AddExtensionClient (
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr /* pWin */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* mask */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* mskidx */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void RecalculateDeviceDeliverableEvents(
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr /* pWin */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int InputClientGone(
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr /* pWin */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync XID /* id */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SendEvent (
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* d */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Window /* dest */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool /* propagate */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync xEvent * /* ev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* mask */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* count */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SetButtonMapping (
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* nElts */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync BYTE * /* map */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int SetModifierMapping(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* len */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* rlen */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* numKeyPerModifier */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync KeyCode * /* inputMap */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync KeyClassPtr * /* k */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void SendDeviceMappingNotify(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client, */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD8 /* request, */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync KeyCode /* firstKeyCode */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD8 /* count */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int ChangeKeyMapping(
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync unsigned /* len */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* type */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync KeyCode /* firstKeyCode */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD8 /* keyCodes */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync CARD8 /* keySymsPerKeyCode */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync KeySym * /* map */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void DeleteWindowFromAnyExtEvents(
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr /* pWin */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Bool /* freeResources */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int MaybeSendDeviceMotionNotifyHint (
45e9809aff7304721fddb95654901b32195c9c7avboxsync deviceKeyButtonPointer * /* pEvents */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* mask */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void CheckDeviceGrabAndHintWindow (
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr /* pWin */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* type */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync deviceKeyButtonPointer * /* xE */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync GrabPtr /* grab */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* deliveryMask */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern void MaybeStopDeviceHint(
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncextern int DeviceEventSuppressForWindow(
45e9809aff7304721fddb95654901b32195c9c7avboxsync WindowPtr /* pWin */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync ClientPtr /* client */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* mask */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* maskndx */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsyncvoid SendEventToAllWindows(
45e9809aff7304721fddb95654901b32195c9c7avboxsync DeviceIntPtr /* dev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync Mask /* mask */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync xEvent * /* ev */,
45e9809aff7304721fddb95654901b32195c9c7avboxsync int /* count */);
45e9809aff7304721fddb95654901b32195c9c7avboxsync
45e9809aff7304721fddb95654901b32195c9c7avboxsync#endif /* EXEVENTS_H */