devPrivates rework: since API is already broken, switch everything

over to new system.

Need to update documentation and address some remaining vestiges of
old system such as CursorRec structure, fb "offman" structure, and
FontRec privates.
This commit is contained in:
Eamon Walsh 2007-08-28 09:28:25 -04:00 committed by Eamon Walsh
commit 4017d31902
261 changed files with 1642 additions and 3957 deletions

View file

@ -30,6 +30,7 @@
#include "screenint.h"
#include "regionstr.h"
#include "miscstruct.h"
#include "privates.h"
#define GlyphFormat1 0
#define GlyphFormat4 1
@ -40,7 +41,7 @@
typedef struct _Glyph {
CARD32 refcnt;
DevUnion *devPrivates;
PrivateRec *devPrivates;
CARD32 size; /* info + bitmap */
xGlyphInfo info;
/* bits follow */
@ -71,18 +72,14 @@ typedef struct _GlyphSet {
int fdepth;
GlyphHashRec hash;
int maxPrivate;
pointer *devPrivates;
PrivateRec *devPrivates;
} GlyphSetRec, *GlyphSetPtr;
#define GlyphSetGetPrivate(pGlyphSet,n) \
((n) > (pGlyphSet)->maxPrivate ? \
(pointer) 0 : \
(pGlyphSet)->devPrivates[n])
#define GlyphSetGetPrivate(pGlyphSet,k) \
dixLookupPrivate(&(pGlyphSet)->devPrivates, k)
#define GlyphSetSetPrivate(pGlyphSet,n,ptr) \
((n) > (pGlyphSet)->maxPrivate ? \
_GlyphSetSetNewPrivate(pGlyphSet, n, ptr) : \
((((pGlyphSet)->devPrivates[n] = (ptr)) != 0) || TRUE))
#define GlyphSetSetPrivate(pGlyphSet,k,ptr) \
dixSetPrivate(&(pGlyphSet)->devPrivates, k, ptr)
typedef struct _GlyphList {
INT16 xOff;
@ -94,32 +91,6 @@ typedef struct _GlyphList {
GlyphHashSetPtr
FindGlyphHashSet (CARD32 filled);
int
AllocateGlyphSetPrivateIndex (void);
void
ResetGlyphSetPrivateIndex (void);
Bool
_GlyphSetSetNewPrivate (GlyphSetPtr glyphSet, int n, pointer ptr);
void
ResetGlyphPrivates (void);
int
AllocateGlyphPrivateIndex (void);
Bool
AllocateGlyphPrivate (ScreenPtr pScreen,
int index2,
unsigned amount);
Bool
GlyphInit (ScreenPtr pScreen);
Bool
GlyphFinishInit (ScreenPtr pScreen);
void
GlyphUninit (ScreenPtr pScreen);