more gdi32 destubbing.

svn path=/trunk/; revision=5208
This commit is contained in:
Royce Mitchell III 2003-07-21 19:05:53 +00:00
parent d3e86a568d
commit 5c1018772c
2 changed files with 205 additions and 96 deletions

View file

@ -1,4 +1,4 @@
/* $Id: stubsa.c,v 1.15 2003/07/21 05:53:15 royce Exp $ /* $Id: stubsa.c,v 1.16 2003/07/21 19:05:52 royce Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -175,7 +175,7 @@ CreateMetaFileA(
/* /*
* @unimplemented * @implemented
*/ */
BOOL BOOL
STDCALL STDCALL
@ -528,17 +528,33 @@ GetOutlineTextMetricsA(
BOOL BOOL
APIENTRY APIENTRY
GetTextExtentExPointA( GetTextExtentExPointA(
HDC hDc, HDC hdc,
LPCSTR a1, LPCSTR lpszStr,
int a2, int cchString,
int a3, int nMaxExtent,
LPINT a4, LPINT lpnFit,
LPINT a5, LPINT alpDx,
LPSIZE a6 LPSIZE lpSize
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); NTSTATUS Status;
return FALSE; UNICODE_STRING Str;
BOOL rc;
Status = RtlCreateUnicodeStringFromAsciiz ( &Str,
(PCSZ)lpszStr );
if (!NT_SUCCESS (Status))
{
SetLastError (RtlNtStatusToDosError(Status));
return 0;
}
rc = W32kGetTextExtentExPoint (
hdc, Str.Buffer, cchString, nMaxExtent, lpnFit, alpDx, lpSize );
RtlFreeUnicodeString ( &Str );
return rc;
} }
@ -562,93 +578,192 @@ GetCharacterPlacementA(
/* /*
* @unimplemented * @implemented
*/ */
HDC HDC
STDCALL STDCALL
ResetDCA( ResetDCA(
HDC a0, HDC hdc,
CONST DEVMODEA *a1 CONST DEVMODEA *lpInitData
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); DEVMODEW InitDataW;
return 0;
RosRtlDevModeA2W ( &InitDataW, (CONST LPDEVMODEA)lpInitData );
return W32kResetDC ( hdc, &InitDataW );
} }
/* /*
* @unimplemented * @implemented
*/ */
BOOL BOOL
STDCALL STDCALL
RemoveFontResourceA( RemoveFontResourceA(
LPCSTR a0 LPCSTR lpFileName
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); NTSTATUS Status;
return FALSE; UNICODE_STRING FileName;
BOOL rc;
Status = RtlCreateUnicodeStringFromAsciiz ( &FileName,
(PCSZ)lpFileName );
if (!NT_SUCCESS (Status))
{
SetLastError (RtlNtStatusToDosError(Status));
return 0;
}
rc = W32kRemoveFontResource ( FileName.Buffer );
RtlFreeUnicodeString ( &FileName );
return rc;
} }
/* /*
* @unimplemented * @implemented
*/ */
HENHMETAFILE HENHMETAFILE
STDCALL STDCALL
CopyEnhMetaFileA( CopyEnhMetaFileA(
HENHMETAFILE a0, HENHMETAFILE hemfSrc,
LPCSTR a1 LPCSTR lpszFile
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); NTSTATUS Status;
return 0; UNICODE_STRING File;
HENHMETAFILE rc;
Status = RtlCreateUnicodeStringFromAsciiz ( &File,
(PCSZ)lpszFile );
if (!NT_SUCCESS (Status))
{
SetLastError (RtlNtStatusToDosError(Status));
return 0;
}
rc = W32kCopyEnhMetaFile ( hemfSrc, File.Buffer );
RtlFreeUnicodeString ( &File );
return rc;
} }
/* /*
* @unimplemented * @implemented
*/ */
HDC HDC
STDCALL STDCALL
CreateEnhMetaFileA( CreateEnhMetaFileA(
HDC a0, HDC hdc,
LPCSTR a1, LPCSTR lpFileName,
CONST RECT *a2, CONST RECT *lpRect,
LPCSTR a3 LPCSTR lpDescription
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); NTSTATUS Status;
return 0; UNICODE_STRING FileName, Description;
HDC rc;
Status = RtlCreateUnicodeStringFromAsciiz ( &FileName,
(PCSZ)lpFileName );
if (!NT_SUCCESS (Status))
{
SetLastError (RtlNtStatusToDosError(Status));
return 0;
}
Status = RtlCreateUnicodeStringFromAsciiz ( &Description,
(PCSZ)lpDescription );
if (!NT_SUCCESS (Status))
{
SetLastError (RtlNtStatusToDosError(Status));
return 0;
}
rc = W32kCreateEnhMetaFile ( hdc, FileName.Buffer, (CONST LPRECT)lpRect, Description.Buffer );
RtlFreeUnicodeString ( &FileName );
RtlFreeUnicodeString ( &Description );
return rc;
} }
/* /*
* @unimplemented * @implemented
*/ */
HENHMETAFILE HENHMETAFILE
STDCALL STDCALL
GetEnhMetaFileA( GetEnhMetaFileA(
LPCSTR a0 LPCSTR lpszMetaFile
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); NTSTATUS Status;
return 0; UNICODE_STRING MetaFile;
HENHMETAFILE rc;
Status = RtlCreateUnicodeStringFromAsciiz ( &MetaFile,
(PCSZ)lpszMetaFile );
if (!NT_SUCCESS (Status))
{
SetLastError (RtlNtStatusToDosError(Status));
return 0;
}
rc = W32kGetEnhMetaFile ( MetaFile.Buffer );
RtlFreeUnicodeString ( &MetaFile );
return rc;
} }
/* /*
* @unimplemented * @implemented
*/ */
UINT UINT
STDCALL STDCALL
GetEnhMetaFileDescriptionA( GetEnhMetaFileDescriptionA(
HENHMETAFILE a0, HENHMETAFILE hemf,
UINT a1, UINT cchBuffer,
LPSTR a2 LPSTR lpszDescription
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); HANDLE hHeap;
return 0; NTSTATUS Status;
LPWSTR lpszDescriptionW;
UINT rc;
if ( lpszDescription && cchBuffer )
{
hHeap = RtlGetProcessHeap();
lpszDescriptionW = RtlAllocateHeap ( hHeap, 0, cchBuffer );
}
rc = W32kGetEnhMetaFileDescription ( hemf, cchBuffer, lpszDescriptionW );
if ( lpszDescription && cchBuffer )
{
Status = RtlUnicodeToMultiByteN ( lpszDescription,
cchBuffer,
NULL,
lpszDescriptionW,
cchBuffer );
RtlFreeHeap ( hHeap, 0, lpszDescriptionW );
if ( !NT_SUCCESS(Status) )
{
SetLastError (RtlNtStatusToDosError(Status));
return 0;
}
}
return rc;
} }

View file

@ -1,4 +1,4 @@
/* $Id: stubsw.c,v 1.15 2003/07/21 05:53:15 royce Exp $ /* $Id: stubsw.c,v 1.16 2003/07/21 19:05:53 royce Exp $
* *
* reactos/lib/gdi32/misc/stubs.c * reactos/lib/gdi32/misc/stubs.c
* *
@ -306,22 +306,22 @@ GetOutlineTextMetricsW(
/* /*
* @unimplemented * @implemented
*/ */
BOOL BOOL
APIENTRY APIENTRY
GetTextExtentExPointW( GetTextExtentExPointW(
HDC hDc, HDC hdc,
LPCWSTR a1, LPCWSTR lpszStr,
int a2, int cchString,
int a3, int nMaxExtent,
LPINT a4, LPINT lpnFit,
LPINT a5, LPINT alpDx,
LPSIZE a6 LPSIZE lpSize
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return W32kGetTextExtentExPoint (
return FALSE; hdc, lpszStr, cchString, nMaxExtent, lpnFit, alpDx, lpSize );
} }
@ -345,93 +345,87 @@ GetCharacterPlacementW(
/* /*
* @unimplemented * @implemented
*/ */
HDC HDC
STDCALL STDCALL
ResetDCW( ResetDCW(
HDC a0, HDC hdc,
CONST DEVMODEW *a1 CONST DEVMODEW *lpInitData
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return W32kResetDC ( hdc, lpInitData );
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
BOOL BOOL
STDCALL STDCALL
RemoveFontResourceW( RemoveFontResourceW(
LPCWSTR a0 LPCWSTR lpFileName
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return W32kRemoveFontResource ( lpFileName );
return FALSE;
} }
/* /*
* @unimplemented * @implemented
*/ */
HENHMETAFILE HENHMETAFILE
STDCALL STDCALL
CopyEnhMetaFileW( CopyEnhMetaFileW(
HENHMETAFILE a0, HENHMETAFILE hemfSrc,
LPCWSTR a1 LPCWSTR lpszFile
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return W32kCopyEnhMetaFile ( hemfSrc, lpszFile );
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
HDC HDC
STDCALL STDCALL
CreateEnhMetaFileW( CreateEnhMetaFileW(
HDC a0, HDC hdc,
LPCWSTR a1, LPCWSTR lpFileName,
CONST RECT *a2, CONST RECT *lpRect,
LPCWSTR a3 LPCWSTR lpDescription
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return W32kCreateEnhMetaFile ( hdc, lpFileName, (CONST LPRECT)lpRect, lpDescription );
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
HENHMETAFILE HENHMETAFILE
STDCALL STDCALL
GetEnhMetaFileW( GetEnhMetaFileW(
LPCWSTR a0 LPCWSTR lpszMetaFile
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return W32kGetEnhMetaFile ( lpszMetaFile );
return 0;
} }
/* /*
* @unimplemented * @implemented
*/ */
UINT UINT
STDCALL STDCALL
GetEnhMetaFileDescriptionW( GetEnhMetaFileDescriptionW(
HENHMETAFILE a0, HENHMETAFILE hemf,
UINT a1, UINT cchBuffer,
LPWSTR a2 LPWSTR lpszDescription
) )
{ {
SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return W32kGetEnhMetaFileDescription ( hemf, cchBuffer, lpszDescription );
return 0;
} }