micmap.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #include "colormapst.h"
  2. #ifndef _MICMAP_H_
  3. #define _MICMAP_H_
  4. extern ColormapPtr miInstalledMaps[MAXSCREENS];
  5. typedef Bool (* miInitVisualsProcPtr)(VisualPtr *, DepthPtr *, int *, int *,
  6. int *, VisualID *, unsigned long, int,
  7. int);
  8. extern miInitVisualsProcPtr miInitVisualsProc;
  9. int miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps);
  10. void miInstallColormap(ColormapPtr pmap);
  11. void miUninstallColormap(ColormapPtr pmap);
  12. void miResolveColor(unsigned short *, unsigned short *, unsigned short *,
  13. VisualPtr);
  14. Bool miInitializeColormap(ColormapPtr);
  15. int miExpandDirectColors(ColormapPtr, int, xColorItem *, xColorItem *);
  16. Bool miCreateDefColormap(ScreenPtr);
  17. void miClearVisualTypes(void);
  18. Bool miSetVisualTypes(int, int, int, int);
  19. Bool miSetPixmapDepths(void);
  20. Bool miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB,
  21. int preferredCVC,
  22. Pixel redMask, Pixel greenMask, Pixel blueMask);
  23. int miGetDefaultVisualMask(int);
  24. Bool miInitVisuals(VisualPtr *, DepthPtr *, int *, int *, int *, VisualID *,
  25. unsigned long, int, int);
  26. void miResetInitVisuals(void);
  27. void miHookInitVisuals(void (**old)(miInitVisualsProcPtr *),
  28. void (*new)(miInitVisualsProcPtr *));
  29. #define MAX_PSEUDO_DEPTH 10
  30. #define MIN_TRUE_DEPTH 6
  31. #define StaticGrayMask (1 << StaticGray)
  32. #define GrayScaleMask (1 << GrayScale)
  33. #define StaticColorMask (1 << StaticColor)
  34. #define PseudoColorMask (1 << PseudoColor)
  35. #define TrueColorMask (1 << TrueColor)
  36. #define DirectColorMask (1 << DirectColor)
  37. #define ALL_VISUALS (StaticGrayMask|\
  38. GrayScaleMask|\
  39. StaticColorMask|\
  40. PseudoColorMask|\
  41. TrueColorMask|\
  42. DirectColorMask)
  43. #define LARGE_VISUALS (TrueColorMask|\
  44. DirectColorMask)
  45. #define SMALL_VISUALS (StaticGrayMask|\
  46. GrayScaleMask|\
  47. StaticColorMask|\
  48. PseudoColorMask)
  49. #endif /* _MICMAP_H_ */