diff options
Diffstat (limited to 'xorg-server/include/resource.h')
-rw-r--r-- | xorg-server/include/resource.h | 37 |
1 files changed, 20 insertions, 17 deletions
diff --git a/xorg-server/include/resource.h b/xorg-server/include/resource.h index db44aefad..ffe02a67e 100644 --- a/xorg-server/include/resource.h +++ b/xorg-server/include/resource.h @@ -69,7 +69,7 @@ typedef uint32_t RESTYPE; #define RC_LASTPREDEF RC_NEVERRETAIN #define RC_ANY (~(RESTYPE)0) -/* types for Resource routines */ +/* types for Resource routines. When you change one of them, please also update the predefTypes array in resource.c*/ #define RT_WINDOW ((RESTYPE)1|RC_DRAWABLE) #define RT_PIXMAP ((RESTYPE)2|RC_DRAWABLE) @@ -99,6 +99,9 @@ typedef uint32_t RESTYPE; #if MAXCLIENTS == 512 #define RESOURCE_CLIENT_BITS 9 #endif +#if MAXCLIENTS == 1024 +#define RESOURCE_CLIENT_BITS 10 +#endif /* client field offset */ #define CLIENTOFFSET (RESOURCE_AND_CLIENT_COUNT - RESOURCE_CLIENT_BITS) /* resource field */ @@ -136,21 +139,21 @@ typedef struct { void *value; } ResourceStateInfoRec; -typedef int (*DeleteType) (void */*value */ , +typedef int (*DeleteType) (void * /*value */ , XID /*id */ ); -typedef void (*FindResType) (void */*value */ , +typedef void (*FindResType) (void * /*value */ , XID /*id */ , - void */*cdata */ ); + void * /*cdata */ ); -typedef void (*FindAllRes) (void */*value */ , +typedef void (*FindAllRes) (void * /*value */ , XID /*id */ , RESTYPE /*type */ , - void */*cdata */ ); + void * /*cdata */ ); -typedef Bool (*FindComplexResType) (void */*value */ , +typedef Bool (*FindComplexResType) (void * /*value */ , XID /*id */ , - void */*cdata */ ); + void * /*cdata */ ); /* Structure for estimating resource memory usage. Memory usage * consists of space allocated for the resource itself and of @@ -166,16 +169,16 @@ typedef struct { unsigned long refCnt; } ResourceSizeRec, *ResourceSizePtr; -typedef void (*SizeType)(void */*value*/, +typedef void (*SizeType)(void * /*value*/, XID /*id*/, ResourceSizePtr /*size*/); extern _X_EXPORT RESTYPE CreateNewResourceType(DeleteType /*deleteFunc */ , const char * /*name */ ); -typedef void (*FindTypeSubResources)(void */* value */, +typedef void (*FindTypeSubResources)(void * /* value */, FindAllRes /* func */, - void */* cdata */); + void * /* cdata */); extern _X_EXPORT SizeType GetResourceTypeSizeFunc( RESTYPE /*type*/); @@ -202,7 +205,7 @@ extern _X_EXPORT XID FakeClientID(int /*client */ ); #endif extern _X_EXPORT Bool AddResource(XID /*id */ , RESTYPE /*type */ , - void */*value */ ); + void * /*value */ ); extern _X_EXPORT void FreeResource(XID /*id */ , RESTYPE /*skipDeleteFuncType */ ); @@ -213,25 +216,25 @@ extern _X_EXPORT void FreeResourceByType(XID /*id */ , extern _X_EXPORT Bool ChangeResourceValue(XID /*id */ , RESTYPE /*rtype */ , - void */*value */ ); + void * /*value */ ); extern _X_EXPORT void FindClientResourcesByType(ClientPtr /*client */ , RESTYPE /*type */ , FindResType /*func */ , - void */*cdata */ ); + void * /*cdata */ ); extern _X_EXPORT void FindAllClientResources(ClientPtr /*client */ , FindAllRes /*func */ , - void */*cdata */ ); + void * /*cdata */ ); /** @brief Iterate through all subresources of a resource. @note The XID argument provided to the FindAllRes function may be 0 for subresources that don't have an XID */ -extern _X_EXPORT void FindSubResources(void */*resource*/, +extern _X_EXPORT void FindSubResources(void * /*resource*/, RESTYPE /*type*/, FindAllRes /*func*/, - void */*cdata*/); + void * /*cdata*/); extern _X_EXPORT void FreeClientNeverRetainResources(ClientPtr /*client */ ); |