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