ReactOS 0.4.17-dev-470-gf9e3448
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 749 of file palette.c.

750{
751 UINT realize = 0;
752 PDC pdc;
753 PALETTE *ppalSurf, *ppalDC;
754
755 pdc = DC_LockDc(hDC);
756 if (!pdc)
757 {
759 return 0;
760 }
761
762 if (!pdc->dclevel.pSurface)
763 {
764 goto cleanup;
765 }
766
767 if (pdc->dctype == DCTYPE_DIRECT)
768 {
769 static BOOL g_WarnedOnce = FALSE;
770 if (!g_WarnedOnce)
771 {
772 g_WarnedOnce = TRUE;
774 }
775 goto cleanup;
776 }
777
779 ppalSurf = pdc->dclevel.pSurface->ppal;
780 ppalDC = pdc->dclevel.ppal;
781
782 if (!(ppalSurf->flFlags & PAL_INDEXED))
783 {
784 // FIXME: Set error?
785 goto cleanup;
786 }
787
788 ASSERT(ppalDC->flFlags & PAL_INDEXED);
789
790 DPRINT1("RealizePalette unimplemented for %s\n",
791 (pdc->dctype == DCTYPE_MEMORY ? "memory managed DCs" : "device DCs"));
792
793cleanup:
794 DC_UnlockDc(pdc);
795 return realize;
796}
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
unsigned int UINT
Definition: sysinfo.c:13
#define ASSERT(a)
Definition: mode.c:44
Definition: polytest.cpp:41
FLONG flFlags
Definition: palette.h:40
ENGAPI VOID APIENTRY EngSetLastError(_In_ ULONG iError)
Definition: error.c:21
#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().