ReactOS 0.4.16-dev-2208-g6350669
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 740 of file palette.c.

741{
742 UINT realize = 0;
743 PDC pdc;
744 PALETTE *ppalSurf, *ppalDC;
745
746 pdc = DC_LockDc(hDC);
747 if (!pdc)
748 {
750 return 0;
751 }
752
753 if (!pdc->dclevel.pSurface)
754 {
755 goto cleanup;
756 }
757
758 if (pdc->dctype == DCTYPE_DIRECT)
759 {
760 static BOOL g_WarnedOnce = FALSE;
761 if (!g_WarnedOnce)
762 {
763 g_WarnedOnce = TRUE;
765 }
766 goto cleanup;
767 }
768
770 ppalSurf = pdc->dclevel.pSurface->ppal;
771 ppalDC = pdc->dclevel.ppal;
772
773 if (!(ppalSurf->flFlags & PAL_INDEXED))
774 {
775 // FIXME: Set error?
776 goto cleanup;
777 }
778
779 ASSERT(ppalDC->flFlags & PAL_INDEXED);
780
781 DPRINT1("RealizePalette unimplemented for %s\n",
782 (pdc->dctype == DCTYPE_MEMORY ? "memory managed DCs" : "device DCs"));
783
784cleanup:
785 DC_UnlockDc(pdc);
786 return realize;
787}
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().