0972f2e8dd33dfa179f8813d3d25fef22bddbe6a
[reactos.git] / reactos / subsystems / win32 / win32k / include / color.h
1 #pragma once
2
3 #ifndef CLR_INVALID
4 #define CLR_INVALID 0xffffffff
5 #endif
6 #define PC_SYS_USED 0x80 /* palentry is used (both system and logical) */
7 #define PC_SYS_RESERVED 0x40 /* system palentry is not to be mapped to */
8 #define PC_SYS_MAPPED 0x10 /* logical palentry is a direct alias for system palentry */
9
10 #define NB_RESERVED_COLORS 20 /* number of fixed colors in system palette */
11
12 typedef struct _COLORSPACE
13 {
14 BASEOBJECT BaseObject;
15 LOGCOLORSPACEW lcsColorSpace;
16 DWORD dwFlags;
17 } COLORSPACE, *PCOLORSPACE;
18
19
20 #define COLORSPACEOBJ_AllocCS() ((PCOLORSPACE) GDIOBJ_AllocObj(GDIObjType_ICMLCS_TYPE))
21 #define COLORSPACEOBJ_AllocCSWithHandle() ((PCOLORSPACE) GDIOBJ_AllocObjWithHandle (GDI_OBJECT_TYPE_COLORSPACE))
22 #define COLORSPACEOBJ_FreeCS(pCS) GDIOBJ_FreeObj((POBJ)pCS, GDIObjType_ICMLCS_TYPE)
23 #define COLORSPACEOBJ_FreeCSByHandle(hCS) GDIOBJ_FreeObjByHandle((HGDIOBJ)hCS, GDI_OBJECT_TYPE_COLORSPACE)
24 #define COLORSPACEOBJ_LockCS(hCS) ((PCOLORSPACE)GDIOBJ_LockObj((HGDIOBJ)hCS, GDI_OBJECT_TYPE_COLORSPACE))
25 #define COLORSPACEOBJ_UnlockCS(pCS) GDIOBJ_UnlockObjByPtr((POBJ)pCS)
26
27 typedef struct _COLORTRANSFORMOBJ
28 {
29 BASEOBJECT BaseObject;
30 HANDLE hColorTransform;
31 } GDICLRXFORM, COLORTRANSFORMOBJ, *PCOLORTRANSFORMOBJ;
32
33 extern HCOLORSPACE hStockColorSpace;
34
35 const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate (VOID);
36 COLORREF APIENTRY COLOR_LookupNearestColor (PALETTEENTRY* palPalEntry, INT size, COLORREF color);
37 INT APIENTRY COLOR_PaletteLookupExactIndex (PALETTEENTRY* palPalEntry, INT size, COLORREF col);
38 INT APIENTRY COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, XLATEOBJ *XlateObj, COLORREF col, BOOL skipReserved);
39 UINT FASTCALL IntGdiRealizePalette (HDC);
40 HCOLORSPACE FASTCALL IntGdiCreateColorSpace(PLOGCOLORSPACEEXW);
41 BOOL FASTCALL IntGdiDeleteColorSpace(HCOLORSPACE);