reactos/reactos/subsystems/win32/win32k/include/color.h
Jérôme Gardou 1ea8829ec1 [WIN32K]
- Raster operations in user mode are on higher bytes, whereas they are on lower bytes for drivers. Try to clarify this situation.
  - Add sanity check about what was said previously.
  - Implement masking in EngBitBlt
  - Rewrite NtGdiMaskBlt accordingly
  - Realize the palette when selecting it into a device DC.
  - When applying raster operation, do so only on 24 bits, we don't support alpha channel in win32k
This fixes VLC pink icons, Timo's MaskBlt tests and probably a lot of other things.
[SHELL32]
  - Use correct (?) raster operations for drawing sjortcuts.
Also note that now NtGdiMaskBlt locks the device contexts : this should avoid some race conditions, such as icons drawn on top of windows and the like.
Win32k sucks less.
So does reactos.
Dedicated to Timo. Sleep well, mate.

svn path=/trunk/; revision=50941
2011-03-01 01:03:58 +00:00

42 lines
1.8 KiB
C

#pragma once
#ifndef CLR_INVALID
#define CLR_INVALID 0xffffffff
#endif
#define PC_SYS_USED 0x80 /* palentry is used (both system and logical) */
#define PC_SYS_RESERVED 0x40 /* system palentry is not to be mapped to */
#define PC_SYS_MAPPED 0x10 /* logical palentry is a direct alias for system palentry */
#define NB_RESERVED_COLORS 20 /* number of fixed colors in system palette */
typedef struct _COLORSPACE
{
BASEOBJECT BaseObject;
LOGCOLORSPACEW lcsColorSpace;
DWORD dwFlags;
} COLORSPACE, *PCOLORSPACE;
#define COLORSPACEOBJ_AllocCS() ((PCOLORSPACE) GDIOBJ_AllocObj(GDIObjType_ICMLCS_TYPE))
#define COLORSPACEOBJ_AllocCSWithHandle() ((PCOLORSPACE) GDIOBJ_AllocObjWithHandle (GDI_OBJECT_TYPE_COLORSPACE))
#define COLORSPACEOBJ_FreeCS(pCS) GDIOBJ_FreeObj((POBJ)pCS, GDIObjType_ICMLCS_TYPE)
#define COLORSPACEOBJ_FreeCSByHandle(hCS) GDIOBJ_FreeObjByHandle((HGDIOBJ)hCS, GDI_OBJECT_TYPE_COLORSPACE)
#define COLORSPACEOBJ_LockCS(hCS) ((PCOLORSPACE)GDIOBJ_LockObj((HGDIOBJ)hCS, GDI_OBJECT_TYPE_COLORSPACE))
#define COLORSPACEOBJ_UnlockCS(pCS) GDIOBJ_UnlockObjByPtr((POBJ)pCS)
typedef struct _COLORTRANSFORMOBJ
{
BASEOBJECT BaseObject;
HANDLE hColorTransform;
} GDICLRXFORM, COLORTRANSFORMOBJ, *PCOLORTRANSFORMOBJ;
extern HCOLORSPACE hStockColorSpace;
const PALETTEENTRY* FASTCALL COLOR_GetSystemPaletteTemplate (VOID);
COLORREF APIENTRY COLOR_LookupNearestColor (PALETTEENTRY* palPalEntry, INT size, COLORREF color);
INT APIENTRY COLOR_PaletteLookupExactIndex (PALETTEENTRY* palPalEntry, INT size, COLORREF col);
INT APIENTRY COLOR_PaletteLookupPixel(PALETTEENTRY *palPalEntry, INT size, XLATEOBJ *XlateObj, COLORREF col, BOOL skipReserved);
UINT FASTCALL IntGdiRealizePalette (PDC);
HCOLORSPACE FASTCALL IntGdiCreateColorSpace(PLOGCOLORSPACEEXW);
BOOL FASTCALL IntGdiDeleteColorSpace(HCOLORSPACE);