mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 10:28:45 +00:00
fixed declaration for W32kEnumFontFamiliesEx.
Added RosRtlLogFontA2W and RosRtlLogFontW2A to lib/rosrtl more destubbing in gdi32/misc/stubsa/w.c svn path=/trunk/; revision=5205
This commit is contained in:
parent
d0202ddfa2
commit
ce107e0415
7 changed files with 243 additions and 63 deletions
19
reactos/include/rosrtl/logfont.h
Normal file
19
reactos/include/rosrtl/logfont.h
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* logfont.h
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void
|
||||
RosRtlLogFontA2W ( LPLOGFONTW pW, const LPLOGFONTA pA );
|
||||
|
||||
void
|
||||
RosRtlLogFontW2A ( LPLOGFONTA pA, const LPLOGFONTW pW );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* EOF */
|
|
@ -63,7 +63,7 @@ int
|
|||
STDCALL
|
||||
W32kEnumFontFamiliesEx(HDC hDC,
|
||||
LPLOGFONTW Logfont,
|
||||
FONTENUMPROC EnumFontFamExProc,
|
||||
FONTENUMEXPROC EnumFontFamExProc,
|
||||
LPARAM lParam,
|
||||
DWORD Flags);
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubsa.c,v 1.13 2003/07/21 02:36:00 royce Exp $
|
||||
/* $Id: stubsa.c,v 1.14 2003/07/21 04:56:31 royce Exp $
|
||||
*
|
||||
* reactos/lib/gdi32/misc/stubs.c
|
||||
*
|
||||
|
@ -145,16 +145,31 @@ CreateICA(
|
|||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
HDC
|
||||
STDCALL
|
||||
CreateMetaFileA(
|
||||
LPCSTR a0
|
||||
LPCSTR lpszFile
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
HDC rc;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING File;
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &File,
|
||||
(PCSZ)lpszFile );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = W32kCreateMetaFile ( File.Buffer );
|
||||
|
||||
RtlFreeUnicodeString ( &File );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
@ -164,14 +179,50 @@ CreateMetaFileA(
|
|||
BOOL
|
||||
STDCALL
|
||||
CreateScalableFontResourceA(
|
||||
DWORD a0,
|
||||
LPCSTR a1,
|
||||
LPCSTR a2,
|
||||
LPCSTR a3
|
||||
DWORD fdwHidden,
|
||||
LPCSTR lpszFontRes,
|
||||
LPCSTR lpszFontFile,
|
||||
LPCSTR lpszCurrentPath
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING FontRes, FontFile, CurrentPath;
|
||||
BOOL rc;
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &FontRes,
|
||||
(PCSZ)lpszFontRes );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &FontFile,
|
||||
(PCSZ)lpszFontFile );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &CurrentPath,
|
||||
(PCSZ)lpszCurrentPath );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
return W32kCreateScalableFontResource ( fdwHidden,
|
||||
FontRes.Buffer,
|
||||
FontFile.Buffer,
|
||||
CurrentPath.Buffer );
|
||||
|
||||
RtlFreeUnicodeString ( &FontRes );
|
||||
RtlFreeUnicodeString ( &FontFile );
|
||||
RtlFreeUnicodeString ( &CurrentPath );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
@ -181,15 +232,62 @@ CreateScalableFontResourceA(
|
|||
int
|
||||
STDCALL
|
||||
DeviceCapabilitiesExA(
|
||||
LPCSTR a0,
|
||||
LPCSTR a1,
|
||||
WORD a2,
|
||||
LPSTR a3,
|
||||
CONST DEVMODEA *a4
|
||||
LPCSTR pDevice,
|
||||
LPCSTR pPort,
|
||||
WORD fwCapability,
|
||||
LPSTR pOutput,
|
||||
CONST DEVMODEA *pDevMode
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
#if 0
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING Device, Port, Output;
|
||||
DEVMODEW DevModeW;
|
||||
int rc;
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &Device,
|
||||
(PCSZ)pDevice );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &Port,
|
||||
(PCSZ)pPort );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &Output,
|
||||
(PCSZ)pOutput );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( pDevMode )
|
||||
RosRtlDevModeA2W ( &DevModeW, (const LPDEVMODEA)pDevMode );
|
||||
|
||||
/* FIXME no W32kDeviceCapabilities???? */
|
||||
rc = W32kDeviceCapabilities ( Device.Buffer,
|
||||
Port.Buffer,
|
||||
fwCapability
|
||||
Output.Buffer,
|
||||
pDevMode ? &DevModeW : NULL );
|
||||
|
||||
RtlFreeUnicodeString ( &Device );
|
||||
RtlFreeUnicodeString ( &Port );
|
||||
RtlFreeUnicodeString ( &Output );
|
||||
|
||||
return rc;
|
||||
#else
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@ -199,11 +297,11 @@ DeviceCapabilitiesExA(
|
|||
int
|
||||
STDCALL
|
||||
EnumFontFamiliesExA(
|
||||
HDC a0,
|
||||
LPLOGFONT a1,
|
||||
FONTENUMEXPROC a2,
|
||||
LPARAM a3,
|
||||
DWORD a4
|
||||
HDC hdc,
|
||||
LPLOGFONT lpLogFont,
|
||||
FONTENUMEXPROC lpEnumFontFamProc,
|
||||
LPARAM lParam,
|
||||
DWORD dwFlags
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
|
@ -217,10 +315,10 @@ EnumFontFamiliesExA(
|
|||
int
|
||||
STDCALL
|
||||
EnumFontFamiliesA(
|
||||
HDC a0,
|
||||
LPCSTR a1,
|
||||
FONTENUMPROC a2,
|
||||
LPARAM a3
|
||||
HDC hdc,
|
||||
LPCSTR lpszFamily,
|
||||
FONTENUMPROC lpEnumFontFamProc,
|
||||
LPARAM lParam
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubsw.c,v 1.13 2003/07/21 04:10:41 royce Exp $
|
||||
/* $Id: stubsw.c,v 1.14 2003/07/21 04:56:32 royce Exp $
|
||||
*
|
||||
* reactos/lib/gdi32/misc/stubs.c
|
||||
*
|
||||
|
@ -70,33 +70,34 @@ CreateICW(
|
|||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
HDC
|
||||
STDCALL
|
||||
CreateMetaFileW(
|
||||
LPCWSTR a0
|
||||
LPCWSTR lpszFile
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
return W32kCreateMetaFile ( lpszFile );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
BOOL
|
||||
STDCALL
|
||||
CreateScalableFontResourceW(
|
||||
DWORD a0,
|
||||
LPCWSTR a1,
|
||||
LPCWSTR a2,
|
||||
LPCWSTR a3
|
||||
DWORD fdwHidden,
|
||||
LPCWSTR lpszFontRes,
|
||||
LPCWSTR lpszFontFile,
|
||||
LPCWSTR lpszCurrentPath
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return FALSE;
|
||||
return W32kCreateScalableFontResource ( fdwHidden,
|
||||
lpszFontRes,
|
||||
lpszFontFile,
|
||||
lpszCurrentPath );
|
||||
}
|
||||
|
||||
|
||||
|
@ -106,50 +107,57 @@ CreateScalableFontResourceW(
|
|||
int
|
||||
STDCALL
|
||||
DeviceCapabilitiesExW(
|
||||
LPCWSTR a0,
|
||||
LPCWSTR a1,
|
||||
WORD a2,
|
||||
LPWSTR a3,
|
||||
CONST DEVMODEW *a4
|
||||
LPCWSTR pDevice,
|
||||
LPCWSTR pPort,
|
||||
WORD fwCapability,
|
||||
LPWSTR pOutput,
|
||||
CONST DEVMODEW *pDevMode
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
#if 0
|
||||
/* FIXME no W32kDeviceCapabilities???? */
|
||||
return W32kDeviceCapabilities ( pDevice,
|
||||
pPort,
|
||||
fwCapability,
|
||||
pOutput,
|
||||
pDevMode );
|
||||
#else
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
STDCALL
|
||||
EnumFontFamiliesExW(
|
||||
HDC a0,
|
||||
LPLOGFONT a1,
|
||||
FONTENUMEXPROC a2,
|
||||
LPARAM a3,
|
||||
DWORD a4
|
||||
HDC hdc,
|
||||
LPLOGFONT lpLogFont,
|
||||
FONTENUMEXPROC lpEnumFontFamProc,
|
||||
LPARAM lParam,
|
||||
DWORD dwFlags
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
return W32kEnumFontFamiliesEx ( hdc, lpLogFont, lpEnumFontFamProc, lParam, dwFlags );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
STDCALL
|
||||
EnumFontFamiliesW(
|
||||
HDC a0,
|
||||
LPCWSTR a1,
|
||||
FONTENUMPROC a2,
|
||||
LPARAM a3
|
||||
HDC hdc,
|
||||
LPCWSTR lpszFamily,
|
||||
FONTENUMPROC lpEnumFontFamProc,
|
||||
LPARAM lParam
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
return W32kEnumFontFamilies ( hdc, lpszFamily, lpEnumFontFamProc, lParam );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.6 2003/07/21 03:56:27 royce Exp $
|
||||
# $Id: makefile,v 1.7 2003/07/21 04:56:32 royce Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -17,6 +17,7 @@ THREAD_OBJECTS = \
|
|||
|
||||
MISC_OBJECTS = \
|
||||
misc/devmode.o \
|
||||
misc/logfont.o \
|
||||
misc/qsort.o
|
||||
|
||||
TARGET_OBJECTS = $(THREAD_OBJECTS) $(MISC_OBJECTS)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <rosrtl/devmode.h>
|
||||
|
||||
void
|
||||
RosRtlDevModeA2W ( LPDEVMODEW pW, const LPDEVMODEA pA )
|
||||
|
|
53
reactos/lib/rosrtl/misc/logfont.c
Normal file
53
reactos/lib/rosrtl/misc/logfont.c
Normal file
|
@ -0,0 +1,53 @@
|
|||
#include <windows.h>
|
||||
#include <string.h>
|
||||
#include <rosrtl/logfont.h>
|
||||
|
||||
void
|
||||
RosRtlLogFontA2W ( LPLOGFONTW pW, const LPLOGFONTA pA )
|
||||
{
|
||||
#define COPYS(f,len) MultiByteToWideChar ( CP_THREAD_ACP, 0, pA->f, len, pW->f, len )
|
||||
#define COPYN(f) pW->f = pA->f
|
||||
|
||||
COPYN(lfHeight);
|
||||
COPYN(lfWidth);
|
||||
COPYN(lfEscapement);
|
||||
COPYN(lfOrientation);
|
||||
COPYN(lfWeight);
|
||||
COPYN(lfItalic);
|
||||
COPYN(lfUnderline);
|
||||
COPYN(lfStrikeOut);
|
||||
COPYN(lfCharSet);
|
||||
COPYN(lfOutPrecision);
|
||||
COPYN(lfClipPrecision);
|
||||
COPYN(lfQuality);
|
||||
COPYN(lfPitchAndFamily);
|
||||
COPYS(lfFaceName,LF_FACESIZE);
|
||||
|
||||
#undef COPYN
|
||||
#undef COPYS
|
||||
}
|
||||
|
||||
void
|
||||
RosRtlLogFontW2A ( LPLOGFONTA pA, const LPLOGFONTW pW )
|
||||
{
|
||||
#define COPYS(f,len) WideCharToMultiByte ( CP_THREAD_ACP, 0, pW->f, len, pA->f, len, NULL, NULL )
|
||||
#define COPYN(f) pA->f = pW->f
|
||||
|
||||
COPYN(lfHeight);
|
||||
COPYN(lfWidth);
|
||||
COPYN(lfEscapement);
|
||||
COPYN(lfOrientation);
|
||||
COPYN(lfWeight);
|
||||
COPYN(lfItalic);
|
||||
COPYN(lfUnderline);
|
||||
COPYN(lfStrikeOut);
|
||||
COPYN(lfCharSet);
|
||||
COPYN(lfOutPrecision);
|
||||
COPYN(lfClipPrecision);
|
||||
COPYN(lfQuality);
|
||||
COPYN(lfPitchAndFamily);
|
||||
COPYS(lfFaceName,LF_FACESIZE);
|
||||
|
||||
#undef COPYN
|
||||
#undef COPYS
|
||||
}
|
Loading…
Reference in a new issue