From 4017d3190234e189a0bbd33193a148d4d3c7556b Mon Sep 17 00:00:00 2001 From: Eamon Walsh Date: Tue, 28 Aug 2007 09:28:25 -0400 Subject: 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. --- render/glyphstr.h | 43 +++++++------------------------------------ 1 file changed, 7 insertions(+), 36 deletions(-) (limited to 'render/glyphstr.h') diff --git a/render/glyphstr.h b/render/glyphstr.h index 22150deee..e89f34e59 100644 --- a/render/glyphstr.h +++ b/render/glyphstr.h @@ -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); -- cgit v1.2.3