exevents.h revision 4642e01f
105b261ecSmrg/************************************************************ 205b261ecSmrg 305b261ecSmrgCopyright 1996 by Thomas E. Dickey <dickey@clark.net> 405b261ecSmrg 505b261ecSmrg All Rights Reserved 605b261ecSmrg 705b261ecSmrgPermission to use, copy, modify, and distribute this software and its 805b261ecSmrgdocumentation for any purpose and without fee is hereby granted, 905b261ecSmrgprovided that the above copyright notice appear in all copies and that 1005b261ecSmrgboth that copyright notice and this permission notice appear in 1105b261ecSmrgsupporting documentation, and that the name of the above listed 1205b261ecSmrgcopyright holder(s) not be used in advertising or publicity pertaining 1305b261ecSmrgto distribution of the software without specific, written prior 1405b261ecSmrgpermission. 1505b261ecSmrg 1605b261ecSmrgTHE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD 1705b261ecSmrgTO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 1805b261ecSmrgAND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE 1905b261ecSmrgLIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 2005b261ecSmrgWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 2105b261ecSmrgACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 2205b261ecSmrgOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 2305b261ecSmrg 2405b261ecSmrg********************************************************/ 2505b261ecSmrg 2605b261ecSmrg/******************************************************************** 2705b261ecSmrg * Interface of 'exevents.c' 2805b261ecSmrg */ 2905b261ecSmrg 3005b261ecSmrg#ifndef EXEVENTS_H 3105b261ecSmrg#define EXEVENTS_H 3205b261ecSmrg 3305b261ecSmrg#include <X11/extensions/XIproto.h> 3405b261ecSmrg 354642e01fSmrg/** 364642e01fSmrg * Attached to the devPrivates of each client. Specifies the version number as 374642e01fSmrg * supported by the client. 384642e01fSmrg */ 394642e01fSmrgtypedef struct _XIClientRec { 404642e01fSmrg int major_version; 414642e01fSmrg int minor_version; 424642e01fSmrg} XIClientRec, *XIClientPtr; 434642e01fSmrg 4405b261ecSmrgextern void RegisterOtherDevice ( 4505b261ecSmrg DeviceIntPtr /* device */); 4605b261ecSmrg 474642e01fSmrgextern int 484642e01fSmrgUpdateDeviceState ( 494642e01fSmrg DeviceIntPtr /* device */, 504642e01fSmrg xEventPtr /* xE */, 514642e01fSmrg int /* count */); 524642e01fSmrg 5305b261ecSmrgextern void ProcessOtherEvent ( 5405b261ecSmrg xEventPtr /* FIXME deviceKeyButtonPointer * xE */, 5505b261ecSmrg DeviceIntPtr /* other */, 5605b261ecSmrg int /* count */); 5705b261ecSmrg 5805b261ecSmrgextern int InitProximityClassDeviceStruct( 5905b261ecSmrg DeviceIntPtr /* dev */); 6005b261ecSmrg 6105b261ecSmrgextern void InitValuatorAxisStruct( 6205b261ecSmrg DeviceIntPtr /* dev */, 6305b261ecSmrg int /* axnum */, 6405b261ecSmrg int /* minval */, 6505b261ecSmrg int /* maxval */, 6605b261ecSmrg int /* resolution */, 6705b261ecSmrg int /* min_res */, 6805b261ecSmrg int /* max_res */); 6905b261ecSmrg 7005b261ecSmrgextern void DeviceFocusEvent( 7105b261ecSmrg DeviceIntPtr /* dev */, 7205b261ecSmrg int /* type */, 7305b261ecSmrg int /* mode */, 7405b261ecSmrg int /* detail */, 7505b261ecSmrg WindowPtr /* pWin */); 7605b261ecSmrg 7705b261ecSmrgextern int GrabButton( 7805b261ecSmrg ClientPtr /* client */, 7905b261ecSmrg DeviceIntPtr /* dev */, 8005b261ecSmrg BYTE /* this_device_mode */, 8105b261ecSmrg BYTE /* other_devices_mode */, 8205b261ecSmrg CARD16 /* modifiers */, 8305b261ecSmrg DeviceIntPtr /* modifier_device */, 8405b261ecSmrg CARD8 /* button */, 8505b261ecSmrg Window /* grabWindow */, 8605b261ecSmrg BOOL /* ownerEvents */, 8705b261ecSmrg Cursor /* rcursor */, 8805b261ecSmrg Window /* rconfineTo */, 8905b261ecSmrg Mask /* eventMask */); 9005b261ecSmrg 9105b261ecSmrgextern int GrabKey( 9205b261ecSmrg ClientPtr /* client */, 9305b261ecSmrg DeviceIntPtr /* dev */, 9405b261ecSmrg BYTE /* this_device_mode */, 9505b261ecSmrg BYTE /* other_devices_mode */, 9605b261ecSmrg CARD16 /* modifiers */, 9705b261ecSmrg DeviceIntPtr /* modifier_device */, 9805b261ecSmrg CARD8 /* key */, 9905b261ecSmrg Window /* grabWindow */, 10005b261ecSmrg BOOL /* ownerEvents */, 10105b261ecSmrg Mask /* mask */); 10205b261ecSmrg 10305b261ecSmrgextern int SelectForWindow( 10405b261ecSmrg DeviceIntPtr /* dev */, 10505b261ecSmrg WindowPtr /* pWin */, 10605b261ecSmrg ClientPtr /* client */, 10705b261ecSmrg Mask /* mask */, 10805b261ecSmrg Mask /* exclusivemasks */, 10905b261ecSmrg Mask /* validmasks */); 11005b261ecSmrg 11105b261ecSmrgextern int AddExtensionClient ( 11205b261ecSmrg WindowPtr /* pWin */, 11305b261ecSmrg ClientPtr /* client */, 11405b261ecSmrg Mask /* mask */, 11505b261ecSmrg int /* mskidx */); 11605b261ecSmrg 11705b261ecSmrgextern void RecalculateDeviceDeliverableEvents( 11805b261ecSmrg WindowPtr /* pWin */); 11905b261ecSmrg 12005b261ecSmrgextern int InputClientGone( 12105b261ecSmrg WindowPtr /* pWin */, 12205b261ecSmrg XID /* id */); 12305b261ecSmrg 12405b261ecSmrgextern int SendEvent ( 12505b261ecSmrg ClientPtr /* client */, 12605b261ecSmrg DeviceIntPtr /* d */, 12705b261ecSmrg Window /* dest */, 12805b261ecSmrg Bool /* propagate */, 12905b261ecSmrg xEvent * /* ev */, 13005b261ecSmrg Mask /* mask */, 13105b261ecSmrg int /* count */); 13205b261ecSmrg 13305b261ecSmrgextern int SetButtonMapping ( 13405b261ecSmrg ClientPtr /* client */, 13505b261ecSmrg DeviceIntPtr /* dev */, 13605b261ecSmrg int /* nElts */, 13705b261ecSmrg BYTE * /* map */); 13805b261ecSmrg 13905b261ecSmrgextern int SetModifierMapping( 14005b261ecSmrg ClientPtr /* client */, 14105b261ecSmrg DeviceIntPtr /* dev */, 14205b261ecSmrg int /* len */, 14305b261ecSmrg int /* rlen */, 14405b261ecSmrg int /* numKeyPerModifier */, 14505b261ecSmrg KeyCode * /* inputMap */, 14605b261ecSmrg KeyClassPtr * /* k */); 14705b261ecSmrg 14805b261ecSmrgextern void SendDeviceMappingNotify( 14905b261ecSmrg ClientPtr /* client, */, 15005b261ecSmrg CARD8 /* request, */, 15105b261ecSmrg KeyCode /* firstKeyCode */, 15205b261ecSmrg CARD8 /* count */, 15305b261ecSmrg DeviceIntPtr /* dev */); 15405b261ecSmrg 15505b261ecSmrgextern int ChangeKeyMapping( 15605b261ecSmrg ClientPtr /* client */, 15705b261ecSmrg DeviceIntPtr /* dev */, 15805b261ecSmrg unsigned /* len */, 15905b261ecSmrg int /* type */, 16005b261ecSmrg KeyCode /* firstKeyCode */, 16105b261ecSmrg CARD8 /* keyCodes */, 16205b261ecSmrg CARD8 /* keySymsPerKeyCode */, 16305b261ecSmrg KeySym * /* map */); 16405b261ecSmrg 16505b261ecSmrgextern void DeleteWindowFromAnyExtEvents( 16605b261ecSmrg WindowPtr /* pWin */, 16705b261ecSmrg Bool /* freeResources */); 16805b261ecSmrg 16905b261ecSmrgextern int MaybeSendDeviceMotionNotifyHint ( 17005b261ecSmrg deviceKeyButtonPointer * /* pEvents */, 17105b261ecSmrg Mask /* mask */); 17205b261ecSmrg 17305b261ecSmrgextern void CheckDeviceGrabAndHintWindow ( 17405b261ecSmrg WindowPtr /* pWin */, 17505b261ecSmrg int /* type */, 17605b261ecSmrg deviceKeyButtonPointer * /* xE */, 17705b261ecSmrg GrabPtr /* grab */, 17805b261ecSmrg ClientPtr /* client */, 17905b261ecSmrg Mask /* deliveryMask */); 18005b261ecSmrg 18105b261ecSmrgextern void MaybeStopDeviceHint( 18205b261ecSmrg DeviceIntPtr /* dev */, 18305b261ecSmrg ClientPtr /* client */); 18405b261ecSmrg 18505b261ecSmrgextern int DeviceEventSuppressForWindow( 18605b261ecSmrg WindowPtr /* pWin */, 18705b261ecSmrg ClientPtr /* client */, 18805b261ecSmrg Mask /* mask */, 18905b261ecSmrg int /* maskndx */); 19005b261ecSmrg 1914642e01fSmrgextern void SendEventToAllWindows( 19205b261ecSmrg DeviceIntPtr /* dev */, 19305b261ecSmrg Mask /* mask */, 19405b261ecSmrg xEvent * /* ev */, 19505b261ecSmrg int /* count */); 19605b261ecSmrg 1974642e01fSmrg/* Input device properties */ 1984642e01fSmrgextern void XIDeleteAllDeviceProperties( 1994642e01fSmrg DeviceIntPtr /* device */ 2004642e01fSmrg); 2014642e01fSmrg 2024642e01fSmrgextern int XIDeleteDeviceProperty( 2034642e01fSmrg DeviceIntPtr /* device */, 2044642e01fSmrg Atom /* property */, 2054642e01fSmrg Bool /* fromClient */ 2064642e01fSmrg); 2074642e01fSmrg 2084642e01fSmrgextern int XIChangeDeviceProperty( 2094642e01fSmrg DeviceIntPtr /* dev */, 2104642e01fSmrg Atom /* property */, 2114642e01fSmrg Atom /* type */, 2124642e01fSmrg int /* format*/, 2134642e01fSmrg int /* mode*/, 2144642e01fSmrg unsigned long /* len*/, 2154642e01fSmrg pointer /* value*/, 2164642e01fSmrg Bool /* sendevent*/ 2174642e01fSmrg ); 2184642e01fSmrg 2194642e01fSmrgextern int XIGetDeviceProperty( 2204642e01fSmrg DeviceIntPtr /* dev */, 2214642e01fSmrg Atom /* property */, 2224642e01fSmrg XIPropertyValuePtr* /* value */ 2234642e01fSmrg); 2244642e01fSmrg 2254642e01fSmrgextern int XISetDevicePropertyDeletable( 2264642e01fSmrg DeviceIntPtr /* dev */, 2274642e01fSmrg Atom /* property */, 2284642e01fSmrg Bool /* deletable */ 2294642e01fSmrg); 2304642e01fSmrg 2314642e01fSmrgextern long XIRegisterPropertyHandler( 2324642e01fSmrg DeviceIntPtr dev, 2334642e01fSmrg int (*SetProperty) (DeviceIntPtr dev, 2344642e01fSmrg Atom property, 2354642e01fSmrg XIPropertyValuePtr prop, 2364642e01fSmrg BOOL checkonly), 2374642e01fSmrg int (*GetProperty) (DeviceIntPtr dev, 2384642e01fSmrg Atom property), 2394642e01fSmrg int (*DeleteProperty) (DeviceIntPtr dev, 2404642e01fSmrg Atom property) 2414642e01fSmrg); 2424642e01fSmrg 2434642e01fSmrgextern _X_EXPORT void XIUnregisterPropertyHandler( 2444642e01fSmrg DeviceIntPtr dev, 2454642e01fSmrg long id 2464642e01fSmrg); 2474642e01fSmrg 2484642e01fSmrgextern Atom XIGetKnownProperty( 2494642e01fSmrg char* name 2504642e01fSmrg); 2514642e01fSmrg 2524642e01fSmrgextern DeviceIntPtr XIGetDevice(xEvent *ev); 2534642e01fSmrg 2544642e01fSmrgextern _X_EXPORT int XIPropToInt( 2554642e01fSmrg XIPropertyValuePtr val, 2564642e01fSmrg int *nelem_return, 2574642e01fSmrg int **buf_return 2584642e01fSmrg); 2594642e01fSmrg 2604642e01fSmrgextern _X_EXPORT int XIPropToFloat( 2614642e01fSmrg XIPropertyValuePtr val, 2624642e01fSmrg int *nelem_return, 2634642e01fSmrg float **buf_return 2644642e01fSmrg); 2654642e01fSmrg 26605b261ecSmrg#endif /* EXEVENTS_H */ 267