dix: split off PropertyRec's data field to separate record

Doing it the same way several extensions (eg. XI and randr) do it,
so we can consolidate things here.

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:03:20 +02:00
parent 04cd1ac05a
commit 611055db8d
8 changed files with 92 additions and 65 deletions

View File

@@ -458,6 +458,7 @@ if build_xorg
'pixmapstr.h',
'privates.h',
'property.h',
'property_value.h',
'ptrveloc.h',
'region.h',
'regionstr.h',

21
include/property_value.h Normal file
View File

@@ -0,0 +1,21 @@
/* SPDX-License-Identifier: MIT OR X11
*
* Copyright © 2024 Enrico Weigelt, metux IT consult <info@metux.net>
*
* This header is part of the SDK / public driver API
*/
#ifndef _XORG_SDK_PROPERTY_VALUE_H
#define _XORG_SDK_PROPERTY_VALUE_H
#include <stdint.h>
#include "misc.h" // ATOM type
typedef struct _PropertyValue {
ATOM type; /* ignored by server */
uint32_t format; /* format of data for swapping - 8,16,32 */
uint32_t size; /* size of data in (format/8) bytes */
void *data; /* private to client */
} PropertyValueRec, *PropertyValuePtr;
#endif /* _XORG_SDK_PROPERTY_VALUE_H */

View File

@@ -46,9 +46,12 @@ SOFTWARE.
#ifndef PROPERTYSTRUCT_H
#define PROPERTYSTRUCT_H
#include "misc.h"
#include "property.h"
#include "privates.h"
#include "property_value.h"
/*
* PROPERTY -- property element
*/
@@ -56,10 +59,7 @@ SOFTWARE.
typedef struct _Property {
struct _Property *next;
ATOM propertyName;
ATOM type; /* ignored by server */
uint32_t format; /* format of data for swapping - 8,16,32 */
uint32_t size; /* size of data in (format/8) bytes */
void *data; /* private to client */
PropertyValueRec value;
PrivateRec *devPrivates;
} PropertyRec;