Author: jimtabor Date: Sun Mar 1 22:37:52 2009 New Revision: 39835
URL: http://svn.reactos.org/svn/reactos?rev=39835&view=rev Log: - Implement GdiIsMetaFileDC and GdiIsMetaPrintDC.
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c trunk/reactos/include/reactos/win32k/ntgdihdl.h
Modified: trunk/reactos/dll/win32/gdi32/misc/stubs.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/stubs.... ============================================================================== --- trunk/reactos/dll/win32/gdi32/misc/stubs.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/misc/stubs.c [iso-8859-1] Sun Mar 1 22:37:52 2009 @@ -1097,27 +1097,54 @@ }
/* - * @unimplemented - */ -BOOL -WINAPI -GdiIsMetaFileDC(HDC hdc) -{ - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; -} - -/* - * @unimplemented - */ -BOOL -WINAPI -GdiIsMetaPrintDC(HDC hdc) -{ - UNIMPLEMENTED; - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return 0; + * @implemented + */ +BOOL +WINAPI +GdiIsMetaFileDC(HDC hDC) +{ + if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC) + { + if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC) + return TRUE; + else + { + PLDC pLDC = GdiGetLDC(hDC); + if ( !pLDC ) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if ( pLDC->iType == LDC_EMFLDC) return TRUE; + } + } + return FALSE; +} + +/* + * @implemented + */ +BOOL +WINAPI +GdiIsMetaPrintDC(HDC hDC) +{ + + if (GDI_HANDLE_GET_TYPE(hDC) != GDI_OBJECT_TYPE_DC) + { + if (GDI_HANDLE_GET_TYPE(hDC) == GDI_OBJECT_TYPE_METADC) + return FALSE; + else + { + PLDC pLDC = GdiGetLDC(hDC); + if ( !pLDC ) + { + SetLastError(ERROR_INVALID_HANDLE); + return FALSE; + } + if ( pLDC->Flags & LDC_META_PRINT) return TRUE; + } + } + return FALSE; }
/*
Modified: trunk/reactos/include/reactos/win32k/ntgdihdl.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntgd... ============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntgdihdl.h [iso-8859-1] Sun Mar 1 22:37:52 2009 @@ -178,6 +178,7 @@ #define LDC_INIT_PAGE 0x00000080 #define LDC_CLOCKWISE 0x00002000 #define LDC_KILL_DOCUMENT 0x00010000 +#define LDC_META_PRINT 0x00020000 #define LDC_DEVCAPS 0x02000000
/* DC_ATTR Xform Flags */