diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h index 9b8d886e19..ea53fb6fe6 100644 --- a/dix/colormap_priv.h +++ b/dix/colormap_priv.h @@ -26,6 +26,13 @@ typedef struct { short refcnt; } SHAREDCOLOR; +/* LOCO -- a local color for a PseudoColor cell. DirectColor maps always + * use the first value (called red) in the structure. What channel they + * are really talking about depends on which map they are in. */ +typedef struct _CMAP_LOCO { + unsigned short red, green, blue; +} LOCO; + /* SHCO -- a shared color for a PseudoColor cell. Used with AllocColorPlanes. * DirectColor maps always use the first value (called red) in the structure. * What channel they are really talking about depends on which map they diff --git a/hw/xfree86/common/xf86str.h b/hw/xfree86/common/xf86str.h index d410e411a1..15b3edc4eb 100644 --- a/hw/xfree86/common/xf86str.h +++ b/hw/xfree86/common/xf86str.h @@ -538,6 +538,7 @@ typedef struct { /* * Driver entry point types */ +struct _CMAP_LOCO; typedef Bool xf86ProbeProc(DriverPtr, int); typedef Bool xf86PreInitProc(ScrnInfoPtr, int); @@ -554,7 +555,7 @@ typedef int xf86ChangeGammaProc(ScrnInfoPtr, Gamma); typedef void xf86PointerMovedProc(ScrnInfoPtr, int, int); typedef Bool xf86PMEventProc(ScrnInfoPtr, pmEvent, Bool); typedef void xf86DPMSSetProc(ScrnInfoPtr, int, int); -typedef void xf86LoadPaletteProc(ScrnInfoPtr, int, int *, LOCO *, VisualPtr); +typedef void xf86LoadPaletteProc(ScrnInfoPtr, int, int *, struct _CMAP_LOCO *, VisualPtr); typedef void xf86SetOverscanProc(ScrnInfoPtr, int); typedef void xf86ModeSetProc(ScrnInfoPtr); diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 23bc307166..c5a047a44f 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -34,6 +34,7 @@ #include #include +#include "dix/colormap_priv.h" #include "os/fmt.h" #include "dumb_bo.h" diff --git a/hw/xfree86/fbdevhw/fbdevhw.c b/hw/xfree86/fbdevhw/fbdevhw.c index 74336087af..d8825f3b31 100644 --- a/hw/xfree86/fbdevhw/fbdevhw.c +++ b/hw/xfree86/fbdevhw/fbdevhw.c @@ -6,6 +6,8 @@ #include #include +#include "dix/colormap_priv.h" + #include "xf86.h" #include "xf86Modes.h" #include "xf86_OSproc.h" diff --git a/hw/xfree86/fbdevhw/fbdevhw.h b/hw/xfree86/fbdevhw/fbdevhw.h index c6acee33f2..04dcccd8cf 100644 --- a/hw/xfree86/fbdevhw/fbdevhw.h +++ b/hw/xfree86/fbdevhw/fbdevhw.h @@ -10,6 +10,8 @@ #define FBDEVHW_TEXT 3 /* Text/attributes */ #define FBDEVHW_VGA_PLANES 4 /* EGA/VGA planes */ +struct _CMAP_LOCO; + extern _X_EXPORT Bool fbdevHWGetRec(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWFreeRec(ScrnInfoPtr pScrn); @@ -40,7 +42,7 @@ extern _X_EXPORT void fbdevHWSave(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWRestore(ScrnInfoPtr pScrn); extern _X_EXPORT void fbdevHWLoadPalette(ScrnInfoPtr pScrn, int numColors, - int *indices, LOCO * colors, + int *indices, struct _CMAP_LOCO * colors, VisualPtr pVisual); extern _X_EXPORT ModeStatus fbdevHWValidMode(ScrnInfoPtr pScrn, DisplayModePtr mode, diff --git a/hw/xfree86/fbdevhw/fbdevhwstub.c b/hw/xfree86/fbdevhw/fbdevhwstub.c index 097003888e..72dbc453b3 100644 --- a/hw/xfree86/fbdevhw/fbdevhwstub.c +++ b/hw/xfree86/fbdevhw/fbdevhwstub.c @@ -2,6 +2,8 @@ #include #endif +#include "dix/colormap_priv.h" + #include "xf86.h" #include "xf86cmap.h" #include "fbdevhw.h" diff --git a/hw/xfree86/modes/xf86RandR12_priv.h b/hw/xfree86/modes/xf86RandR12_priv.h index a3fbab1f65..ffd3f4b01f 100644 --- a/hw/xfree86/modes/xf86RandR12_priv.h +++ b/hw/xfree86/modes/xf86RandR12_priv.h @@ -7,6 +7,8 @@ #include +#include "dix/colormap_priv.h" + #include "randrstr.h" #include "xf86RandR12.h" diff --git a/hw/xfree86/vgahw/vgaHW.c b/hw/xfree86/vgahw/vgaHW.c index f5bcd6ce70..cdf37a7c8b 100644 --- a/hw/xfree86/vgahw/vgaHW.c +++ b/hw/xfree86/vgahw/vgaHW.c @@ -17,6 +17,7 @@ #include +#include "dix/colormap_priv.h" #include "os/log_priv.h" #include "misc.h" diff --git a/include/colormapst.h b/include/colormapst.h index f0149aef5a..e4b3c06c75 100644 --- a/include/colormapst.h +++ b/include/colormapst.h @@ -49,11 +49,4 @@ SOFTWARE. #include -/* LOCO -- a local color for a PseudoColor cell. DirectColor maps always - * use the first value (called red) in the structure. What channel they - * are really talking about depends on which map they are in. */ -typedef struct { - unsigned short red, green, blue; -} LOCO; - #endif /* COLORMAP_H */