1 /* 2 * COPYRIGHT: See COPYING in the top level directory 3 * PROJECT: ReactOS kernel 4 * PURPOSE: XLATEOBJ structures and functions 5 * FILE: win32ss/gdi/eng/xlateobj.h 6 * PROGRAMER: Timo Kreuzer 7 * 8 */ 9 10 struct _EXLATEOBJ; 11 12 _Function_class_(FN_XLATE) 13 typedef 14 ULONG 15 (FASTCALL *PFN_XLATE)( 16 _In_ struct _EXLATEOBJ *pexlo, 17 _In_ ULONG iColor); 18 19 typedef struct _EXLATEOBJ 20 { 21 XLATEOBJ xlo; 22 23 PFN_XLATE pfnXlate; 24 25 PPALETTE ppalSrc; 26 PPALETTE ppalDst; 27 PPALETTE ppalDstDc; 28 29 HANDLE hColorTransform; 30 31 union 32 { 33 ULONG aulXlate[6]; 34 struct 35 { 36 ULONG ulRedMask; 37 ULONG ulGreenMask; 38 ULONG ulBlueMask; 39 ULONG ulRedShift; 40 ULONG ulGreenShift; 41 ULONG ulBlueShift; 42 }; 43 }; 44 } EXLATEOBJ, *PEXLATEOBJ; 45 46 extern EXLATEOBJ gexloTrivial; 47 48 _Notnull_ 49 FORCEINLINE 50 PFN_XLATE 51 XLATEOBJ_pfnXlate( 52 _In_ XLATEOBJ *pxlo) 53 { 54 return ((PEXLATEOBJ)pxlo)->pfnXlate; 55 } 56 57 VOID 58 NTAPI 59 EXLATEOBJ_vInitialize( 60 _Out_ PEXLATEOBJ pexlo, 61 _In_opt_ PPALETTE ppalSrc, 62 _In_opt_ PPALETTE ppalDst, 63 _In_ COLORREF crSrcBackColor, 64 _In_ COLORREF crDstBackColor, 65 _In_ COLORREF crDstForeColor); 66 67 VOID 68 NTAPI 69 EXLATEOBJ_vInitXlateFromDCs( 70 _Out_ PEXLATEOBJ pexlo, 71 _In_ PDC pdcSrc, 72 _In_ PDC pdcDst); 73 74 VOID 75 NTAPI 76 EXLATEOBJ_vInitSrcMonoXlate( 77 _Out_ PEXLATEOBJ pexlo, 78 _In_ PPALETTE ppalDst, 79 _In_ COLORREF crBackgroundClr, 80 _In_ COLORREF crForegroundClr); 81 82 VOID 83 NTAPI 84 EXLATEOBJ_vCleanup( 85 _Inout_ PEXLATEOBJ pexlo); 86 87