ReactOS 0.4.16-dev-303-g11d5cb8
color.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _COLORSPACE
 
struct  _COLORTRANSFORMOBJ
 

Macros

#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 */
 
#define COLORSPACEOBJ_AllocCS()   ((PCOLORSPACE) GDIOBJ_AllocObj(GDIObjType_ICMLCS_TYPE))
 
#define COLORSPACEOBJ_AllocCSWithHandle()   ((PCOLORSPACE) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_COLORSPACE, sizeof(COLORSPACE)))
 
#define COLORSPACEOBJ_LockCS(hCS)   ((PCOLORSPACE)GDIOBJ_LockObject((HGDIOBJ)hCS, GDIObjType_ICMLCS_TYPE))
 
#define COLORSPACEOBJ_UnlockCS(pCS)   GDIOBJ_vUnlockObject((POBJ)pCS)
 

Typedefs

typedef struct _COLORSPACE COLORSPACE
 
typedef struct _COLORSPACEPCOLORSPACE
 
typedef struct _COLORTRANSFORMOBJ GDICLRXFORM
 
typedef struct _COLORTRANSFORMOBJ COLORTRANSFORMOBJ
 
typedef struct _COLORTRANSFORMOBJPCOLORTRANSFORMOBJ
 

Functions

UINT FASTCALL IntGdiRealizePalette (HDC)
 

Variables

HCOLORSPACE hStockColorSpace
 

Macro Definition Documentation

◆ COLORSPACEOBJ_AllocCS

#define COLORSPACEOBJ_AllocCS ( )    ((PCOLORSPACE) GDIOBJ_AllocObj(GDIObjType_ICMLCS_TYPE))

Definition at line 17 of file color.h.

◆ COLORSPACEOBJ_AllocCSWithHandle

#define COLORSPACEOBJ_AllocCSWithHandle ( )    ((PCOLORSPACE) GDIOBJ_AllocObjWithHandle(GDI_OBJECT_TYPE_COLORSPACE, sizeof(COLORSPACE)))

Definition at line 18 of file color.h.

◆ COLORSPACEOBJ_LockCS

#define COLORSPACEOBJ_LockCS (   hCS)    ((PCOLORSPACE)GDIOBJ_LockObject((HGDIOBJ)hCS, GDIObjType_ICMLCS_TYPE))

Definition at line 19 of file color.h.

◆ COLORSPACEOBJ_UnlockCS

#define COLORSPACEOBJ_UnlockCS (   pCS)    GDIOBJ_vUnlockObject((POBJ)pCS)

Definition at line 20 of file color.h.

◆ NB_RESERVED_COLORS

#define NB_RESERVED_COLORS   20 /* Number of fixed colors in system palette */

Definition at line 7 of file color.h.

◆ PC_SYS_MAPPED

#define PC_SYS_MAPPED   0x10 /* Logical palentry is a direct alias for system palentry */

Definition at line 5 of file color.h.

◆ PC_SYS_RESERVED

#define PC_SYS_RESERVED   0x40 /* System palentry is not to be mapped to */

Definition at line 4 of file color.h.

◆ PC_SYS_USED

#define PC_SYS_USED   0x80 /* Palentry is used (both system and logical) */

Definition at line 3 of file color.h.

Typedef Documentation

◆ COLORSPACE

◆ COLORTRANSFORMOBJ

◆ GDICLRXFORM

◆ PCOLORSPACE

◆ PCOLORTRANSFORMOBJ

Function Documentation

◆ IntGdiRealizePalette()

UINT FASTCALL IntGdiRealizePalette ( HDC  hDC)

FIXME: shouldn't dereference pSurface while the PDEV is not locked

Definition at line 731 of file palette.c.

732{
733 UINT realize = 0;
734 PDC pdc;
735 PALETTE *ppalSurf, *ppalDC;
736
737 pdc = DC_LockDc(hDC);
738 if (!pdc)
739 {
741 return 0;
742 }
743
744 if (!pdc->dclevel.pSurface)
745 {
746 goto cleanup;
747 }
748
749 if (pdc->dctype == DCTYPE_DIRECT)
750 {
751 static BOOL g_WarnedOnce = FALSE;
752 if (!g_WarnedOnce)
753 {
754 g_WarnedOnce = TRUE;
756 }
757 goto cleanup;
758 }
759
761 ppalSurf = pdc->dclevel.pSurface->ppal;
762 ppalDC = pdc->dclevel.ppal;
763
764 if (!(ppalSurf->flFlags & PAL_INDEXED))
765 {
766 // FIXME: Set error?
767 goto cleanup;
768 }
769
770 ASSERT(ppalDC->flFlags & PAL_INDEXED);
771
772 DPRINT1("RealizePalette unimplemented for %s\n",
773 (pdc->dctype == DCTYPE_MEMORY ? "memory managed DCs" : "device DCs"));
774
775cleanup:
776 DC_UnlockDc(pdc);
777 return realize;
778}
static HDC hDC
Definition: 3dtext.c:33
#define DPRINT1
Definition: precomp.h:8
#define UNIMPLEMENTED
Definition: ntoskrnl.c:15
FORCEINLINE VOID DC_UnlockDc(PDC pdc)
Definition: dc.h:238
@ DCTYPE_DIRECT
Definition: dc.h:41
@ DCTYPE_MEMORY
Definition: dc.h:42
FORCEINLINE PDC DC_LockDc(HDC hdc)
Definition: dc.h:220
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ERROR_INVALID_HANDLE
Definition: compat.h:98
static void cleanup(void)
Definition: main.c:1335
unsigned int BOOL
Definition: ntddk_ex.h:94
#define ASSERT(a)
Definition: mode.c:44
unsigned int UINT
Definition: ndis.h:50
Definition: polytest.cpp:41
FLONG flFlags
Definition: palette.h:40
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:22
#define PAL_INDEXED
Definition: winddi.h:1561

Referenced by IntAnimatePalette(), and UserRealizePalette().

Variable Documentation

◆ hStockColorSpace

HCOLORSPACE hStockColorSpace
extern

Definition at line 14 of file icm.c.

Referenced by IntGdiDeleteColorSpace().