diff options
author | Peter Hutterer <peter.hutterer@redhat.com> | 2008-09-18 18:21:03 +0930 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@redhat.com> | 2008-09-26 13:32:08 +0930 |
commit | a2d83b9dc8387ec7e70689db1371cf6500b2f68e (patch) | |
tree | 023558fc93239790152337b995c18e95122da413 /include | |
parent | 22e90472681ebc7bdd28f82bbf2753a5b259e931 (diff) |
Xi: add "deletable" flag to properties, add DeleteProperty handler.
A property can only be deleted if any of the following is true:
- if a property is deletable and all handlers return Success.
- if a property is non-deleteable and the all handlers return Success AND the
delete request does not come from a client (i.e. driver or the server).
A client can never delete a non-deletable property.
Diffstat (limited to 'include')
-rw-r--r-- | include/exevents.h | 10 | ||||
-rw-r--r-- | include/inputstr.h | 3 |
2 files changed, 12 insertions, 1 deletions
diff --git a/include/exevents.h b/include/exevents.h index c3a2ad610..4df0aee48 100644 --- a/include/exevents.h +++ b/include/exevents.h @@ -222,13 +222,21 @@ extern int XIGetDeviceProperty( XIPropertyValuePtr* /* value */ ); +extern int XISetDevicePropertyDeletable( + DeviceIntPtr /* dev */, + Atom /* property */, + Bool /* deletable */ +); + extern long XIRegisterPropertyHandler( DeviceIntPtr dev, int (*SetProperty) (DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop), int (*GetProperty) (DeviceIntPtr dev, - Atom property) + Atom property), + int (*DeleteProperty) (DeviceIntPtr dev, + Atom property) ); extern void XIUnRegisterPropertyHandler( diff --git a/include/inputstr.h b/include/inputstr.h index 93b32934d..65cb1b97f 100644 --- a/include/inputstr.h +++ b/include/inputstr.h @@ -353,6 +353,7 @@ typedef struct _XIProperty { struct _XIProperty *next; Atom propertyName; + BOOL deletable; /* clients can delete this prop? */ XIPropertyValueRec value; } XIPropertyRec; @@ -369,6 +370,8 @@ typedef struct _XIPropertyHandler XIPropertyValuePtr prop); int (*GetProperty) (DeviceIntPtr dev, Atom property); + int (*DeleteProperty) (DeviceIntPtr dev, + Atom property); } XIPropertyHandler, *XIPropertyHandlerPtr; /* states for devices */ |