mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 15:34:13 +00:00
moved USER32_DevModeA2W to lib/rosrtl/misc/devmode.c and renamed to RosRtlDevModeA2W. Modified user32 to use it there now. Fixed several stubs in GDI32 and added AddFontResourceExA/W functions.
svn path=/trunk/; revision=5198
This commit is contained in:
parent
55a6108edf
commit
414a1f8012
16
reactos/include/rosrtl/devmode.h
Normal file
16
reactos/include/rosrtl/devmode.h
Normal file
|
@ -0,0 +1,16 @@
|
|||
/* devmode.h
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
void
|
||||
RosRtlDevModeA2W ( LPDEVMODEW pW, const LPDEVMODEA pA );
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* EOF */
|
|
@ -1856,6 +1856,10 @@ SystemParametersInfoW(
|
|||
PVOID pvParam,
|
||||
UINT fWinIni);
|
||||
|
||||
int
|
||||
STDCALL
|
||||
AddFontResourceExW ( LPCWSTR, DWORD, PVOID );
|
||||
|
||||
int
|
||||
STDCALL
|
||||
AddFontResourceW(LPCWSTR);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: gdi32.def,v 1.5 2000/02/22 20:55:23 ekohl Exp $
|
||||
; $Id: gdi32.def,v 1.6 2003/07/21 01:59:51 royce Exp $
|
||||
;
|
||||
; gdi32.def
|
||||
;
|
||||
|
@ -11,6 +11,8 @@ EXPORTS
|
|||
AbortDoc@4
|
||||
AbortPath@4
|
||||
AddFontResourceA@4
|
||||
AddFontResourceExA@12
|
||||
AddFontResourceExW@12
|
||||
AddFontResourceW@4
|
||||
AngleArc@24
|
||||
AnimatePalette@16
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; $Id: gdi32.edf,v 1.3 2000/02/22 20:55:23 ekohl Exp $
|
||||
; $Id: gdi32.edf,v 1.4 2003/07/21 01:59:51 royce Exp $
|
||||
;
|
||||
; gdi32.def
|
||||
;
|
||||
|
@ -11,6 +11,8 @@ EXPORTS
|
|||
AbortDoc=AbortDoc@4
|
||||
AbortPath=AbortPath@4
|
||||
AddFontResourceA=AddFontResourceA@4
|
||||
AddFontResourceExA=AddFontResourceExA@12
|
||||
AddFontResourceExW=AddFontResourceExW@12
|
||||
AddFontResourceW=AddFontResourceW@4
|
||||
AngleArc=AngleArc@24
|
||||
AnimatePalette=AnimatePalette@16
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubsa.c,v 1.11 2003/07/10 15:35:49 chorns Exp $
|
||||
/* $Id: stubsa.c,v 1.12 2003/07/21 01:59:51 royce Exp $
|
||||
*
|
||||
* reactos/lib/gdi32/misc/stubs.c
|
||||
*
|
||||
|
@ -15,33 +15,73 @@
|
|||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#include <ddk/ntddk.h>
|
||||
#include <win32k/text.h>
|
||||
#include <win32k/metafile.h>
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
STDCALL
|
||||
AddFontResourceA(
|
||||
LPCSTR a0
|
||||
)
|
||||
AddFontResourceExA ( LPCSTR lpszFilename, DWORD fl, PVOID pvReserved )
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING FilenameU;
|
||||
int rc;
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &FilenameU,
|
||||
(PCSZ)lpszFilename );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = AddFontResourceExW ( FilenameU.Buffer, fl, pvReserved );
|
||||
|
||||
RtlFreeUnicodeString ( &FilenameU );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
STDCALL
|
||||
AddFontResourceA ( LPCSTR lpszFilename )
|
||||
{
|
||||
return AddFontResourceExA ( lpszFilename, 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
HMETAFILE
|
||||
STDCALL
|
||||
CopyMetaFileA(
|
||||
HMETAFILE a0,
|
||||
LPCSTR a1
|
||||
HMETAFILE Src,
|
||||
LPCSTR lpszFile
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING FileU;
|
||||
HMETAFILE rc;
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &FileU,
|
||||
(PCSZ)lpszFile );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
rc = W32kCopyMetaFile ( Src, FileU.Buffer );
|
||||
|
||||
RtlFreeUnicodeString ( &FileU );
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
|
@ -51,13 +91,44 @@ CopyMetaFileA(
|
|||
HDC
|
||||
STDCALL
|
||||
CreateICA(
|
||||
LPCSTR a0,
|
||||
LPCSTR a1,
|
||||
LPCSTR a2,
|
||||
CONST DEVMODEA * a3
|
||||
LPCSTR lpszDriver,
|
||||
LPCSTR lpszDevice,
|
||||
LPCSTR lpszOutput,
|
||||
CONST DEVMODEA * lpdvmInit
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
NTSTATUS Status;
|
||||
UNICODE_STRING Driver, Device, Output;
|
||||
DEVMODEW dvmInitW;
|
||||
HDC rc;
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &Driver,
|
||||
(PCSZ)lpszDriver );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &Device,
|
||||
(PCSZ)lpszDevice );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
Status = RtlCreateUnicodeStringFromAsciiz ( &Output,
|
||||
(PCSZ)lpszOutput );
|
||||
if (!NT_SUCCESS (Status))
|
||||
{
|
||||
SetLastError (RtlNtStatusToDosError(Status));
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( lpdvmInit )
|
||||
RosRtlDevModeA2W ( &dvmInitW, lpdvmInit );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: stubsw.c,v 1.10 2003/07/10 15:35:49 chorns Exp $
|
||||
/* $Id: stubsw.c,v 1.11 2003/07/21 01:59:51 royce Exp $
|
||||
*
|
||||
* reactos/lib/gdi32/misc/stubs.c
|
||||
*
|
||||
|
@ -17,27 +17,34 @@
|
|||
*/
|
||||
int
|
||||
STDCALL
|
||||
AddFontResourceW(
|
||||
LPCWSTR a0
|
||||
)
|
||||
AddFontResourceExW ( LPCWSTR lpszFilename, DWORD fl, PVOID pvReserved )
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
/* FIXME handle fl parameter */
|
||||
return W32kAddFontResource ( lpszFilename );
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
STDCALL
|
||||
AddFontResourceW ( LPCWSTR lpszFilename )
|
||||
{
|
||||
return AddFontResourceExW ( lpszFilename, 0, 0 );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
HMETAFILE
|
||||
STDCALL
|
||||
CopyMetaFileW(
|
||||
HMETAFILE a0,
|
||||
LPCWSTR a1
|
||||
HMETAFILE Src,
|
||||
LPCWSTR File
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
return W32kCopyMetaFile ( Src, File );
|
||||
}
|
||||
|
||||
|
||||
|
@ -439,22 +446,6 @@ StartDocW(
|
|||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
int
|
||||
STDCALL
|
||||
GetObjectW(
|
||||
HGDIOBJ a0,
|
||||
int a1,
|
||||
LPVOID a2
|
||||
)
|
||||
{
|
||||
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: makefile,v 1.3 2003/07/11 20:55:43 gvg Exp $
|
||||
# $Id: makefile,v 1.4 2003/07/21 01:59:51 royce Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -12,6 +12,7 @@ THREAD_OBJECTS = \
|
|||
thread/stack.o
|
||||
|
||||
MISC_OBJECTS = \
|
||||
misc/devmode.o \
|
||||
misc/qsort.o
|
||||
|
||||
TARGET_OBJECTS = $(THREAD_OBJECTS) $(MISC_OBJECTS)
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#include <string.h>
|
||||
#include <windows.h>
|
||||
#include <user32.h>
|
||||
|
||||
void
|
||||
USER32_DevModeA2W ( LPDEVMODEW pW, const LPDEVMODEA pA )
|
||||
RosRtlDevModeA2W ( LPDEVMODEW pW, const LPDEVMODEA pA )
|
||||
{
|
||||
#define SIZEOF_DEVMODEA_300 124
|
||||
#define SIZEOF_DEVMODEA_400 148
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: Makefile,v 1.20 2003/07/20 00:06:27 ekohl Exp $
|
||||
# $Id: Makefile,v 1.21 2003/07/21 01:59:51 royce Exp $
|
||||
|
||||
PATH_TO_TOP = ../..
|
||||
|
||||
|
@ -8,7 +8,7 @@ TARGET_NAME = user32
|
|||
|
||||
TARGET_BASE = 0x77e70000
|
||||
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a gdi32.a
|
||||
TARGET_SDKLIBS = ntdll.a kernel32.a gdi32.a rosrtl.a
|
||||
|
||||
TARGET_CFLAGS = \
|
||||
-I./include \
|
||||
|
@ -32,7 +32,6 @@ CONTROLS_OBJECTS = \
|
|||
MISC_OBJECTS = \
|
||||
misc/dde.o \
|
||||
misc/desktop.o \
|
||||
misc/devmode.o \
|
||||
misc/display.o \
|
||||
misc/dllmain.o \
|
||||
misc/exit.o \
|
||||
|
|
|
@ -6,7 +6,3 @@
|
|||
*/
|
||||
#include <windows.h>
|
||||
#include <win32k/win32k.h>
|
||||
|
||||
/* see lib/user32/misc/devmode.c */
|
||||
void
|
||||
USER32_DevModeA2W ( LPDEVMODEW pW, const LPDEVMODEA pA );
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $Id: desktop.c,v 1.14 2003/07/19 01:35:27 royce Exp $
|
||||
/* $Id: desktop.c,v 1.15 2003/07/21 01:59:51 royce Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -12,6 +12,7 @@
|
|||
#include <windows.h>
|
||||
#include <user32.h>
|
||||
#include <debug.h>
|
||||
#include <rosrtl/devmode.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
|
@ -112,7 +113,7 @@ CreateDesktopA(LPCSTR lpszDesktop,
|
|||
RtlInitUnicodeString(&DesktopNameU, NULL);
|
||||
}
|
||||
|
||||
USER32_DevModeA2W ( &DevmodeW, pDevmode );
|
||||
RosRtlDevModeA2W ( &DevmodeW, pDevmode );
|
||||
|
||||
hDesktop = CreateDesktopW(DesktopNameU.Buffer,
|
||||
NULL,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: display.c,v 1.6 2003/07/19 01:35:27 royce Exp $
|
||||
/* $Id: display.c,v 1.7 2003/07/21 01:59:51 royce Exp $
|
||||
*
|
||||
* PROJECT: ReactOS user32.dll
|
||||
* FILE: lib/user32/misc/dde.c
|
||||
|
@ -31,6 +31,7 @@
|
|||
#include <windows.h>
|
||||
#include <user32.h>
|
||||
#include <debug.h>
|
||||
#include <rosrtl/devmode.h>
|
||||
|
||||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
|
@ -128,7 +129,7 @@ EnumDisplaySettingsExA(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
USER32_DevModeA2W ( &DevModeW, lpDevMode );
|
||||
RosRtlDevModeA2W ( &DevModeW, lpDevMode );
|
||||
|
||||
rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, &DevModeW, dwFlags );
|
||||
|
||||
|
@ -240,7 +241,7 @@ ChangeDisplaySettingsExA(
|
|||
return DISP_CHANGE_BADPARAM; /* FIXME what to return? */
|
||||
}
|
||||
|
||||
USER32_DevModeA2W ( &DevModeW, lpDevMode );
|
||||
RosRtlDevModeA2W ( &DevModeW, lpDevMode );
|
||||
|
||||
rc = NtUserChangeDisplaySettings ( &DeviceName, &DevModeW, hwnd, dwflags, lParam );
|
||||
|
||||
|
|
Loading…
Reference in a new issue