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:
Enrico Weigelt, metux IT consult 2025-05-15 19:58:36 +02:00
parent 4f8b584717
commit e2901cd496
8 changed files with 26 additions and 29 deletions

View File

@ -583,7 +583,7 @@ InitXTestDevices(void)
*/
static int
DeviceSetXTestProperty(DeviceIntPtr dev, Atom property,
XIPropertyValuePtr prop, BOOL checkonly)
PropertyValuePtr prop, BOOL checkonly)
{
if (property == XIGetKnownProperty(XI_PROP_XTEST_DEVICE))
return BadAccess;

View File

@ -244,7 +244,7 @@ get_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type,
unsigned long n, len, ind;
int rc;
XIPropertyPtr prop;
XIPropertyValuePtr prop_value;
PropertyValuePtr prop_value;
if (!ValidAtom(property)) {
client->errorValue = property;
@ -418,7 +418,7 @@ XIResetProperties(void)
* @return Success or the error code if an error occurred.
*/
int
XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return)
XIPropToInt(PropertyValuePtr val, int *nelem_return, int **buf_return)
{
int i;
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.
*/
int
XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return)
XIPropToFloat(PropertyValuePtr val, int *nelem_return, float **buf_return)
{
int i;
float *buf;
@ -528,11 +528,11 @@ long
XIRegisterPropertyHandler(DeviceIntPtr dev,
int (*SetProperty) (DeviceIntPtr dev,
Atom property,
XIPropertyValuePtr prop,
PropertyValuePtr prop,
BOOL checkonly),
int (*GetProperty) (DeviceIntPtr dev,
Atom property),
int (*DeleteProperty) (DeviceIntPtr dev,
int (*DelProperty) (DeviceIntPtr dev,
Atom property))
{
XIPropertyHandlerPtr new_handler;
@ -544,7 +544,7 @@ XIRegisterPropertyHandler(DeviceIntPtr dev,
new_handler->id = XIPropHandlerID++;
new_handler->SetProperty = SetProperty;
new_handler->GetProperty = GetProperty;
new_handler->DeleteProperty = DeleteProperty;
new_handler->DeleteProperty = DelProperty;
new_handler->next = dev->properties.handlers;
dev->properties.handlers = new_handler;
@ -687,8 +687,8 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
XIPropertyPtr prop;
int size_in_bytes;
unsigned long total_len;
XIPropertyValuePtr prop_value;
XIPropertyValueRec new_value;
PropertyValuePtr prop_value;
PropertyValueRec new_value;
Bool add = FALSE;
int rc;
@ -804,7 +804,7 @@ XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
}
int
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value)
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, PropertyValuePtr *value)
{
XIPropertyPtr prop = XIFetchDeviceProperty(dev, property);
int rc;

View File

@ -147,7 +147,7 @@ DeviceSetTransform(DeviceIntPtr dev, float *transform_data)
* DIX property handler.
*/
static int
DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop,
DeviceSetProperty(DeviceIntPtr dev, Atom property, PropertyValuePtr prop,
BOOL checkonly)
{
if (property == XIGetKnownProperty(XI_PROP_ENABLED)) {

View File

@ -155,8 +155,8 @@ void XTestDeviceSendEvents(DeviceIntPtr dev,
int flags,
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 */

View File

@ -191,7 +191,7 @@ AccelerationDefaultCleanup(DeviceIntPtr dev)
*/
static int
AccelSetProfileProperty(DeviceIntPtr dev, Atom atom,
XIPropertyValuePtr val, BOOL checkOnly)
PropertyValuePtr val, BOOL checkOnly)
{
DeviceVelocityPtr vel;
int profile, *ptr = &profile;
@ -236,7 +236,7 @@ AccelInitProfileProperty(DeviceIntPtr dev, DeviceVelocityPtr vel)
*/
static int
AccelSetDecelProperty(DeviceIntPtr dev, Atom atom,
XIPropertyValuePtr val, BOOL checkOnly)
PropertyValuePtr val, BOOL checkOnly)
{
DeviceVelocityPtr vel;
float v, *ptr = &v;
@ -280,7 +280,7 @@ AccelInitDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel)
*/
static int
AccelSetAdaptDecelProperty(DeviceIntPtr dev, Atom atom,
XIPropertyValuePtr val, BOOL checkOnly)
PropertyValuePtr val, BOOL checkOnly)
{
DeviceVelocityPtr veloc;
float v, *ptr = &v;
@ -327,7 +327,7 @@ AccelInitAdaptDecelProperty(DeviceIntPtr dev, DeviceVelocityPtr vel)
*/
static int
AccelSetScaleProperty(DeviceIntPtr dev, Atom atom,
XIPropertyValuePtr val, BOOL checkOnly)
PropertyValuePtr val, BOOL checkOnly)
{
DeviceVelocityPtr vel;
float v, *ptr = &v;

View File

@ -92,7 +92,7 @@ extern _X_EXPORT int XIChangeDeviceProperty(DeviceIntPtr /* dev */ ,
extern _X_EXPORT int XIGetDeviceProperty(DeviceIntPtr /* dev */ ,
Atom /* property */ ,
XIPropertyValuePtr * /* value */
PropertyValuePtr * /* value */
);
extern _X_EXPORT int XISetDevicePropertyDeletable(DeviceIntPtr /* dev */ ,
@ -105,7 +105,7 @@ extern _X_EXPORT long XIRegisterPropertyHandler(DeviceIntPtr dev,
dev,
Atom
property,
XIPropertyValuePtr
PropertyValuePtr
prop,
BOOL
checkonly),

View File

@ -55,6 +55,7 @@ SOFTWARE.
#include "dixstruct.h"
#include "cursorstr.h"
#include "privates.h"
#include "property_value.h"
#define BitIsOn(ptr, bit) (!!(((const 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;
/* Device properties */
typedef struct _XIPropertyValue {
Atom type; /* ignored by server */
short format; /* format of data for swapping - 8,16,32 */
long size; /* size of data in (format/8) bytes */
void *data; /* private to client */
} XIPropertyValueRec;
/* for backwards compat with older drivers, should not be used anymore */
typedef PropertyValueRec XIPropertyValueRec, *XIPropertyValuePtr;
typedef struct _XIProperty {
struct _XIProperty *next;
Atom propertyName;
BOOL deletable; /* clients can delete this prop? */
XIPropertyValueRec value;
PropertyValueRec value;
} XIPropertyRec;
typedef XIPropertyRec *XIPropertyPtr;
typedef XIPropertyValueRec *XIPropertyValuePtr;
typedef struct _XIPropertyHandler {
struct _XIPropertyHandler *next;
long id;
int (*SetProperty) (DeviceIntPtr dev,
Atom property, XIPropertyValuePtr prop, BOOL checkonly);
Atom property, PropertyValuePtr prop, BOOL checkonly);
int (*GetProperty) (DeviceIntPtr dev, Atom property);
int (*DeleteProperty) (DeviceIntPtr dev, Atom property);
} XIPropertyHandler, *XIPropertyHandlerPtr;

View File

@ -128,7 +128,7 @@ xtest_properties(void)
{
int rc;
char value = 1;
XIPropertyValuePtr prop;
PropertyValuePtr prop;
Atom xtest_prop;
xtest_init();