diff options
author | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2009-09-09 05:23:48 +0000 |
commit | 81f91c615982e50bb62708201569c33a3cd3d973 (patch) | |
tree | 4f32ecc48a3b7b5e76642f3792338263c53879bd /xorg-server/include/exevents.h | |
parent | b571a562410f565af2bdde52d9f7f9a23ffae04f (diff) | |
parent | a915739887477b28d924ecc8417ee107d125bd6c (diff) | |
download | vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.gz vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.tar.bz2 vcxsrv-81f91c615982e50bb62708201569c33a3cd3d973.zip |
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'xorg-server/include/exevents.h')
-rw-r--r-- | xorg-server/include/exevents.h | 317 |
1 files changed, 183 insertions, 134 deletions
diff --git a/xorg-server/include/exevents.h b/xorg-server/include/exevents.h index 971afc2ea..39e1c70fe 100644 --- a/xorg-server/include/exevents.h +++ b/xorg-server/include/exevents.h @@ -31,6 +31,98 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #define EXEVENTS_H #include <X11/extensions/XIproto.h> +#include "inputstr.h" + +/*************************************************************** + * Interface available to drivers * + ***************************************************************/ + +extern _X_EXPORT int InitProximityClassDeviceStruct( + DeviceIntPtr /* dev */); + +extern _X_EXPORT void InitValuatorAxisStruct( + DeviceIntPtr /* dev */, + int /* axnum */, + Atom /* label */, + int /* minval */, + int /* maxval */, + int /* resolution */, + int /* min_res */, + int /* max_res */); + +/* Input device properties */ +extern _X_EXPORT void XIDeleteAllDeviceProperties( + DeviceIntPtr /* device */ +); + +extern _X_EXPORT int XIDeleteDeviceProperty( + DeviceIntPtr /* device */, + Atom /* property */, + Bool /* fromClient */ +); + +extern _X_EXPORT int XIChangeDeviceProperty( + DeviceIntPtr /* dev */, + Atom /* property */, + Atom /* type */, + int /* format*/, + int /* mode*/, + unsigned long /* len*/, + pointer /* value*/, + Bool /* sendevent*/ + ); + +extern _X_EXPORT int XIGetDeviceProperty( + DeviceIntPtr /* dev */, + Atom /* property */, + XIPropertyValuePtr* /* value */ +); + +extern _X_EXPORT int XISetDevicePropertyDeletable( + DeviceIntPtr /* dev */, + Atom /* property */, + Bool /* deletable */ +); + +extern _X_EXPORT long XIRegisterPropertyHandler( + DeviceIntPtr dev, + int (*SetProperty) (DeviceIntPtr dev, + Atom property, + XIPropertyValuePtr prop, + BOOL checkonly), + int (*GetProperty) (DeviceIntPtr dev, + Atom property), + int (*DeleteProperty) (DeviceIntPtr dev, + Atom property) +); + +extern _X_EXPORT void XIUnregisterPropertyHandler( + DeviceIntPtr dev, + long id +); + +extern _X_EXPORT Atom XIGetKnownProperty( + char* name +); + +extern _X_EXPORT DeviceIntPtr XIGetDevice(xEvent *ev); + +extern _X_EXPORT int XIPropToInt( + XIPropertyValuePtr val, + int *nelem_return, + int **buf_return +); + +extern _X_EXPORT int XIPropToFloat( + XIPropertyValuePtr val, + int *nelem_return, + float **buf_return +); + +/**************************************************************************** + * End of driver interface * + ****************************************************************************/ + /** * Attached to the devPrivates of each client. Specifies the version number as @@ -41,87 +133,100 @@ typedef struct _XIClientRec { int minor_version; } XIClientRec, *XIClientPtr; -extern void RegisterOtherDevice ( + +typedef struct _GrabParameters { + int grabtype; /* GRABTYPE_CORE, etc. */ + unsigned int ownerEvents; + unsigned int this_device_mode; + unsigned int other_devices_mode; + Window grabWindow; + Window confineTo; + Cursor cursor; + unsigned int modifiers; +} GrabParameters; + + +extern void +RegisterOtherDevice ( DeviceIntPtr /* device */); extern int UpdateDeviceState ( DeviceIntPtr /* device */, - xEventPtr /* xE */, - int /* count */); + DeviceEvent* /* xE */); -extern void ProcessOtherEvent ( - xEventPtr /* FIXME deviceKeyButtonPointer * xE */, - DeviceIntPtr /* other */, - int /* count */); +extern void +ProcessOtherEvent ( + InternalEvent* /* ev */, + DeviceIntPtr /* other */); -extern int InitProximityClassDeviceStruct( - DeviceIntPtr /* dev */); - -extern void InitValuatorAxisStruct( - DeviceIntPtr /* dev */, - int /* axnum */, - int /* minval */, - int /* maxval */, - int /* resolution */, - int /* min_res */, - int /* max_res */); - -extern void DeviceFocusEvent( +extern void +DeviceFocusEvent( DeviceIntPtr /* dev */, int /* type */, int /* mode */, int /* detail */, WindowPtr /* pWin */); -extern int GrabButton( +extern int +CheckGrabValues( + ClientPtr /* client */, + GrabParameters* /* param */); + +extern int +GrabButton( ClientPtr /* client */, DeviceIntPtr /* dev */, - BYTE /* this_device_mode */, - BYTE /* other_devices_mode */, - CARD16 /* modifiers */, DeviceIntPtr /* modifier_device */, - CARD8 /* button */, - Window /* grabWindow */, - BOOL /* ownerEvents */, - Cursor /* rcursor */, - Window /* rconfineTo */, - Mask /* eventMask */); - -extern int GrabKey( + int /* button */, + GrabParameters* /* param */, + GrabType /* grabtype */, + GrabMask* /* eventMask */); + +extern int +GrabKey( ClientPtr /* client */, DeviceIntPtr /* dev */, - BYTE /* this_device_mode */, - BYTE /* other_devices_mode */, - CARD16 /* modifiers */, DeviceIntPtr /* modifier_device */, - CARD8 /* key */, - Window /* grabWindow */, - BOOL /* ownerEvents */, - Mask /* mask */); + int /* key */, + GrabParameters* /* param */, + GrabType /* grabtype */, + GrabMask* /* eventMask */); + +extern int +GrabWindow( + ClientPtr /* client */, + DeviceIntPtr /* dev */, + int /* type */, + GrabParameters* /* param */, + GrabMask* /* eventMask */); -extern int SelectForWindow( +extern int +SelectForWindow( DeviceIntPtr /* dev */, WindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, - Mask /* exclusivemasks */, - Mask /* validmasks */); + Mask /* exclusivemasks */); -extern int AddExtensionClient ( +extern int +AddExtensionClient ( WindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, int /* mskidx */); -extern void RecalculateDeviceDeliverableEvents( +extern void +RecalculateDeviceDeliverableEvents( WindowPtr /* pWin */); -extern int InputClientGone( +extern int +InputClientGone( WindowPtr /* pWin */, XID /* id */); -extern int SendEvent ( +extern int +SendEvent ( ClientPtr /* client */, DeviceIntPtr /* d */, Window /* dest */, @@ -130,29 +235,15 @@ extern int SendEvent ( Mask /* mask */, int /* count */); -extern int SetButtonMapping ( +extern int +SetButtonMapping ( ClientPtr /* client */, DeviceIntPtr /* dev */, int /* nElts */, BYTE * /* map */); -extern int SetModifierMapping( - ClientPtr /* client */, - DeviceIntPtr /* dev */, - int /* len */, - int /* rlen */, - int /* numKeyPerModifier */, - KeyCode * /* inputMap */, - KeyClassPtr * /* k */); - -extern void SendDeviceMappingNotify( - ClientPtr /* client, */, - CARD8 /* request, */, - KeyCode /* firstKeyCode */, - CARD8 /* count */, - DeviceIntPtr /* dev */); - -extern int ChangeKeyMapping( +extern int +ChangeKeyMapping( ClientPtr /* client */, DeviceIntPtr /* dev */, unsigned /* len */, @@ -162,15 +253,18 @@ extern int ChangeKeyMapping( CARD8 /* keySymsPerKeyCode */, KeySym * /* map */); -extern void DeleteWindowFromAnyExtEvents( +extern void +DeleteWindowFromAnyExtEvents( WindowPtr /* pWin */, Bool /* freeResources */); -extern int MaybeSendDeviceMotionNotifyHint ( +extern int +MaybeSendDeviceMotionNotifyHint ( deviceKeyButtonPointer * /* pEvents */, Mask /* mask */); -extern void CheckDeviceGrabAndHintWindow ( +extern void +CheckDeviceGrabAndHintWindow ( WindowPtr /* pWin */, int /* type */, deviceKeyButtonPointer * /* xE */, @@ -178,89 +272,44 @@ extern void CheckDeviceGrabAndHintWindow ( ClientPtr /* client */, Mask /* deliveryMask */); -extern void MaybeStopDeviceHint( +extern void +MaybeStopDeviceHint( DeviceIntPtr /* dev */, ClientPtr /* client */); -extern int DeviceEventSuppressForWindow( +extern int +DeviceEventSuppressForWindow( WindowPtr /* pWin */, ClientPtr /* client */, Mask /* mask */, int /* maskndx */); -extern void SendEventToAllWindows( +extern void +SendEventToAllWindows( DeviceIntPtr /* dev */, Mask /* mask */, xEvent * /* ev */, int /* count */); -/* Input device properties */ -extern void XIDeleteAllDeviceProperties( - DeviceIntPtr /* device */ -); +extern _X_HIDDEN void XI2EventSwap( + xGenericEvent * /* from */, + xGenericEvent * /* to */); -extern int XIDeleteDeviceProperty( - DeviceIntPtr /* device */, - Atom /* property */, - Bool /* fromClient */ -); - -extern int XIChangeDeviceProperty( - DeviceIntPtr /* dev */, - Atom /* property */, - Atom /* type */, - int /* format*/, - int /* mode*/, - unsigned long /* len*/, - pointer /* value*/, - Bool /* sendevent*/ - ); - -extern int XIGetDeviceProperty( - DeviceIntPtr /* dev */, - Atom /* property */, - XIPropertyValuePtr* /* value */ -); - -extern int XISetDevicePropertyDeletable( - DeviceIntPtr /* dev */, - Atom /* property */, - Bool /* deletable */ -); - -extern long XIRegisterPropertyHandler( - DeviceIntPtr dev, - int (*SetProperty) (DeviceIntPtr dev, - Atom property, - XIPropertyValuePtr prop, - BOOL checkonly), - int (*GetProperty) (DeviceIntPtr dev, - Atom property), - int (*DeleteProperty) (DeviceIntPtr dev, - Atom property) -); - -extern _X_EXPORT void XIUnregisterPropertyHandler( - DeviceIntPtr dev, - long id -); - -extern Atom XIGetKnownProperty( - char* name -); +/* For an event such as MappingNotify which affects client interpretation + * of input events sent by device dev, should we notify the client, or + * would it merely be irrelevant and confusing? */ +extern int +XIShouldNotify(ClientPtr client, DeviceIntPtr dev); -extern DeviceIntPtr XIGetDevice(xEvent *ev); +extern void +XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, + DeviceChangedEvent *dce); -extern _X_EXPORT int XIPropToInt( - XIPropertyValuePtr val, - int *nelem_return, - int **buf_return -); +extern int +XISetEventMask(DeviceIntPtr dev, WindowPtr win, ClientPtr client, + unsigned int len, unsigned char* mask); -extern _X_EXPORT int XIPropToFloat( - XIPropertyValuePtr val, - int *nelem_return, - float **buf_return -); +extern int +XICheckInvalidMaskBits(unsigned char *mask, int len); #endif /* EXEVENTS_H */ |