Xi: replace XIPropertyValueRec by PropertyValueRec
Use the new PropertyValueRec instead of XIPropertyValueRec. The old name is aliased to the new one, so external drivers still compile. Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
4f8b584717
commit
e2901cd496
|
@ -583,7 +583,7 @@ InitXTestDevices(void)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
DeviceSetXTestProperty(DeviceIntPtr dev, Atom property,
|
DeviceSetXTestProperty(DeviceIntPtr dev, Atom property,
|
||||||
XIPropertyValuePtr prop, BOOL checkonly)
|
PropertyValuePtr prop, BOOL checkonly)
|
||||||
{
|
{
|
||||||
if (property == XIGetKnownProperty(XI_PROP_XTEST_DEVICE))
|
if (property == XIGetKnownProperty(XI_PROP_XTEST_DEVICE))
|
||||||
return BadAccess;
|
return BadAccess;
|
||||||
|
|
|
@ -244,7 +244,7 @@ get_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type,
|
||||||
unsigned long n, len, ind;
|
unsigned long n, len, ind;
|
||||||
int rc;
|
int rc;
|
||||||
XIPropertyPtr prop;
|
XIPropertyPtr prop;
|
||||||
XIPropertyValuePtr prop_value;
|
PropertyValuePtr prop_value;
|
||||||
|
|
||||||
if (!ValidAtom(property)) {
|
if (!ValidAtom(property)) {
|
||||||
client->errorValue = property;
|
client->errorValue = property;
|
||||||
|
@ -418,7 +418,7 @@ XIResetProperties(void)
|
||||||
* @return Success or the error code if an error occurred.
|
* @return Success or the error code if an error occurred.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
|
XIPropToInt(PropertyValuePtr val, int *nelem_return, int **buf_return)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
int *buf;
|
int *buf;
|
||||||
|
@ -488,7 +488,7 @@ XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
|
||||||
* @return Success or the error code if an error occurred.
|
* @return Success or the error code if an error occurred.
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return)
|
XIPropToFloat(PropertyValuePtr val, int *nelem_return, float **buf_return)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
float *buf;
|
float *buf;
|
||||||
|
@ -528,11 +528,11 @@ long
|
||||||
XIRegisterPropertyHandler(DeviceIntPtr dev,
|
XIRegisterPropertyHandler(DeviceIntPtr dev,
|
||||||
int (*SetProperty) (DeviceIntPtr dev,
|
int (*SetProperty) (DeviceIntPtr dev,
|
||||||
Atom property,
|
Atom property,
|
||||||
XIPropertyValuePtr prop,
|
PropertyValuePtr prop,
|
||||||
BOOL checkonly),
|
BOOL checkonly),
|
||||||
int (*GetProperty) (DeviceIntPtr dev,
|
int (*GetProperty) (DeviceIntPtr dev,
|
||||||
Atom property),
|
Atom property),
|
||||||
int (*DeleteProperty) (DeviceIntPtr dev,
|
int (*DelProperty) (DeviceIntPtr dev,
|
||||||
Atom property))
|
Atom property))
|
||||||
{
|
{
|
||||||
XIPropertyHandlerPtr new_handler;
|
XIPropertyHandlerPtr new_handler;
|
||||||
|
@ -544,7 +544,7 @@ XIRegisterPropertyHandler(DeviceIntPtr dev,
|
||||||
new_handler->id = XIPropHandlerID++;
|
new_handler->id = XIPropHandlerID++;
|
||||||
new_handler->SetProperty = SetProperty;
|
new_handler->SetProperty = SetProperty;
|
||||||
new_handler->GetProperty = GetProperty;
|
new_handler->GetProperty = GetProperty;
|
||||||
new_handler->DeleteProperty = DeleteProperty;
|
new_handler->DeleteProperty = DelProperty;
|
||||||
new_handler->next = dev->properties.handlers;
|
new_handler->next = dev->properties.handlers;
|
||||||
dev->properties.handlers = new_handler;
|
dev->properties.handlers = new_handler;
|
||||||
|
|
||||||
|
@ -687,8 +687,8 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||||
XIPropertyPtr prop;
|
XIPropertyPtr prop;
|
||||||
int size_in_bytes;
|
int size_in_bytes;
|
||||||
unsigned long total_len;
|
unsigned long total_len;
|
||||||
XIPropertyValuePtr prop_value;
|
PropertyValuePtr prop_value;
|
||||||
XIPropertyValueRec new_value;
|
PropertyValueRec new_value;
|
||||||
Bool add = FALSE;
|
Bool add = FALSE;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
|
@ -804,7 +804,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value)
|
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, PropertyValuePtr *value)
|
||||||
{
|
{
|
||||||
XIPropertyPtr prop = XIFetchDeviceProperty(dev, property);
|
XIPropertyPtr prop = XIFetchDeviceProperty(dev, property);
|
||||||
int rc;
|
int rc;
|
||||||
|
|
|
@ -147,7 +147,7 @@ DeviceSetTransform(DeviceIntPtr dev, float *transform_data)
|
||||||
* DIX property handler.
|
* DIX property handler.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
|
DeviceSetProperty(DeviceIntPtr dev, Atom property, PropertyValuePtr prop,
|
||||||
BOOL checkonly)
|
BOOL checkonly)
|
||||||
{
|
{
|
||||||
if (property == XIGetKnownProperty(XI_PROP_ENABLED)) {
|
if (property == XIGetKnownProperty(XI_PROP_ENABLED)) {
|
||||||
|
|
|
@ -155,8 +155,8 @@ void XTestDeviceSendEvents(DeviceIntPtr dev,
|
||||||
int flags,
|
int flags,
|
||||||
const ValuatorMask *mask);
|
const ValuatorMask *mask);
|
||||||
|
|
||||||
int XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return);
|
int XIPropToInt(PropertyValuePtr val, int *nelem_return, int **buf_return);
|
||||||
|
|
||||||
int XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return);
|
int XIPropToFloat(PropertyValuePtr val, int *nelem_return, float **buf_return);
|
||||||
|
|
||||||
#endif /* _XSERVER_EXEVENTS_PRIV_H */
|
#endif /* _XSERVER_EXEVENTS_PRIV_H */
|
||||||
|
|
|
@ -191,7 +191,7 @@ AccelerationDefaultCleanup(DeviceIntPtr dev)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
AccelSetProfileProperty(DeviceIntPtr dev, Atom atom,
|
AccelSetProfileProperty(DeviceIntPtr dev, Atom atom,
|
||||||
XIPropertyValuePtr val, BOOL checkOnly)
|
PropertyValuePtr val, BOOL checkOnly)
|
||||||
{
|
{
|
||||||
DeviceVelocityPtr vel;
|
DeviceVelocityPtr vel;
|
||||||
int profile, *ptr = &profile;
|
int profile, *ptr = &profile;
|
||||||
|
@ -236,7 +236,7 @@ AccelInitProfileProperty(DeviceIntPtr dev, DeviceVelocityPtr vel)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
AccelSetDecelProperty(DeviceIntPtr dev, Atom atom,
|
AccelSetDecelProperty(DeviceIntPtr dev, Atom atom,
|
||||||
XIPropertyValuePtr val, BOOL checkOnly)
|
PropertyValuePtr val, BOOL checkOnly)
|
||||||
{
|
{
|
||||||
DeviceVelocityPtr vel;
|
DeviceVelocityPtr vel;
|
||||||
float v, *ptr = &v;
|
float v, *ptr = &v;
|
||||||
|
@ -280,7 +280,7 @@ AccelInitDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
AccelSetAdaptDecelProperty(DeviceIntPtr dev, Atom atom,
|
AccelSetAdaptDecelProperty(DeviceIntPtr dev, Atom atom,
|
||||||
XIPropertyValuePtr val, BOOL checkOnly)
|
PropertyValuePtr val, BOOL checkOnly)
|
||||||
{
|
{
|
||||||
DeviceVelocityPtr veloc;
|
DeviceVelocityPtr veloc;
|
||||||
float v, *ptr = &v;
|
float v, *ptr = &v;
|
||||||
|
@ -327,7 +327,7 @@ AccelInitAdaptDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel)
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
AccelSetScaleProperty(DeviceIntPtr dev, Atom atom,
|
AccelSetScaleProperty(DeviceIntPtr dev, Atom atom,
|
||||||
XIPropertyValuePtr val, BOOL checkOnly)
|
PropertyValuePtr val, BOOL checkOnly)
|
||||||
{
|
{
|
||||||
DeviceVelocityPtr vel;
|
DeviceVelocityPtr vel;
|
||||||
float v, *ptr = &v;
|
float v, *ptr = &v;
|
||||||
|
|
|
@ -92,7 +92,7 @@ extern _X_EXPORT int XIChangeDeviceProperty(DeviceIntPtr /* dev */ ,
|
||||||
|
|
||||||
extern _X_EXPORT int XIGetDeviceProperty(DeviceIntPtr /* dev */ ,
|
extern _X_EXPORT int XIGetDeviceProperty(DeviceIntPtr /* dev */ ,
|
||||||
Atom /* property */ ,
|
Atom /* property */ ,
|
||||||
XIPropertyValuePtr * /* value */
|
PropertyValuePtr * /* value */
|
||||||
);
|
);
|
||||||
|
|
||||||
extern _X_EXPORT int XISetDevicePropertyDeletable(DeviceIntPtr /* dev */ ,
|
extern _X_EXPORT int XISetDevicePropertyDeletable(DeviceIntPtr /* dev */ ,
|
||||||
|
@ -105,7 +105,7 @@ extern _X_EXPORT long XIRegisterPropertyHandler(DeviceIntPtr dev,
|
||||||
dev,
|
dev,
|
||||||
Atom
|
Atom
|
||||||
property,
|
property,
|
||||||
XIPropertyValuePtr
|
PropertyValuePtr
|
||||||
prop,
|
prop,
|
||||||
BOOL
|
BOOL
|
||||||
checkonly),
|
checkonly),
|
||||||
|
|
|
@ -55,6 +55,7 @@ SOFTWARE.
|
||||||
#include "dixstruct.h"
|
#include "dixstruct.h"
|
||||||
#include "cursorstr.h"
|
#include "cursorstr.h"
|
||||||
#include "privates.h"
|
#include "privates.h"
|
||||||
|
#include "property_value.h"
|
||||||
|
|
||||||
#define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
|
#define BitIsOn(ptr, bit) (!!(((const BYTE *) (ptr))[(bit)>>3] & (1 << ((bit) & 7))))
|
||||||
#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
|
#define SetBit(ptr, bit) (((BYTE *) (ptr))[(bit)>>3] |= (1 << ((bit) & 7)))
|
||||||
|
@ -452,28 +453,24 @@ typedef struct _ClassesRec {
|
||||||
} ClassesRec;
|
} ClassesRec;
|
||||||
|
|
||||||
/* Device properties */
|
/* Device properties */
|
||||||
typedef struct _XIPropertyValue {
|
|
||||||
Atom type; /* ignored by server */
|
/* for backwards compat with older drivers, should not be used anymore */
|
||||||
short format; /* format of data for swapping - 8,16,32 */
|
typedef PropertyValueRec XIPropertyValueRec, *XIPropertyValuePtr;
|
||||||
long size; /* size of data in (format/8) bytes */
|
|
||||||
void *data; /* private to client */
|
|
||||||
} XIPropertyValueRec;
|
|
||||||
|
|
||||||
typedef struct _XIProperty {
|
typedef struct _XIProperty {
|
||||||
struct _XIProperty *next;
|
struct _XIProperty *next;
|
||||||
Atom propertyName;
|
Atom propertyName;
|
||||||
BOOL deletable; /* clients can delete this prop? */
|
BOOL deletable; /* clients can delete this prop? */
|
||||||
XIPropertyValueRec value;
|
PropertyValueRec value;
|
||||||
} XIPropertyRec;
|
} XIPropertyRec;
|
||||||
|
|
||||||
typedef XIPropertyRec *XIPropertyPtr;
|
typedef XIPropertyRec *XIPropertyPtr;
|
||||||
typedef XIPropertyValueRec *XIPropertyValuePtr;
|
|
||||||
|
|
||||||
typedef struct _XIPropertyHandler {
|
typedef struct _XIPropertyHandler {
|
||||||
struct _XIPropertyHandler *next;
|
struct _XIPropertyHandler *next;
|
||||||
long id;
|
long id;
|
||||||
int (*SetProperty) (DeviceIntPtr dev,
|
int (*SetProperty) (DeviceIntPtr dev,
|
||||||
Atom property, XIPropertyValuePtr prop, BOOL checkonly);
|
Atom property, PropertyValuePtr prop, BOOL checkonly);
|
||||||
int (*GetProperty) (DeviceIntPtr dev, Atom property);
|
int (*GetProperty) (DeviceIntPtr dev, Atom property);
|
||||||
int (*DeleteProperty) (DeviceIntPtr dev, Atom property);
|
int (*DeleteProperty) (DeviceIntPtr dev, Atom property);
|
||||||
} XIPropertyHandler, *XIPropertyHandlerPtr;
|
} XIPropertyHandler, *XIPropertyHandlerPtr;
|
||||||
|
|
|
@ -128,7 +128,7 @@ xtest_properties(void)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
char value = 1;
|
char value = 1;
|
||||||
XIPropertyValuePtr prop;
|
PropertyValuePtr prop;
|
||||||
Atom xtest_prop;
|
Atom xtest_prop;
|
||||||
|
|
||||||
xtest_init();
|
xtest_init();
|
||||||
|
|
Loading…
Reference in New Issue