mi: unexport GetInstalledmiColormap and make it static inline function

Not used by any external drivers, so no need to keep it public.
Also add some type-safety by implementing it as static inline function.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult 2025-02-25 17:17:41 +01:00
parent 7497cc08f6
commit 4be15a7207
3 changed files with 7 additions and 3 deletions

View File

@ -39,6 +39,7 @@ from The Open Group.
#include "dix/colormap_priv.h"
#include "dix/dix_priv.h"
#include "dix/screenint_priv.h"
#include "mi/mi_priv.h"
#include "mi/mipointer_priv.h"
#include "os/cmdline.h"
#include "os/ddx_priv.h"

View File

@ -16,13 +16,19 @@
#include "include/pixmap.h"
#include "include/regionstr.h"
#include "include/screenint.h"
#include "include/scrnintstr.h"
#include "include/validate.h"
#include "include/window.h"
#include "mi/mi.h"
#include "mi/micmap.h"
#define SetInstalledmiColormap(s,c) \
(dixSetPrivate(&(s)->devPrivates, micmapScrPrivateKey, c))
static inline ColormapPtr GetInstalledmiColormap(ScreenPtr s) {
return (ColormapPtr)dixLookupPrivate(&(s)->devPrivates, &micmapScrPrivateKeyRec);
}
void miScreenClose(ScreenPtr pScreen);
void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs);

View File

@ -9,9 +9,6 @@
#include "privates.h"
#include "screenint.h"
#define GetInstalledmiColormap(s) \
((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, micmapScrPrivateKey))
extern _X_EXPORT DevPrivateKeyRec micmapScrPrivateKeyRec;
#define micmapScrPrivateKey (&micmapScrPrivateKeyRec)