partly implement EngComputeGlyphSet in eng.c

move EngMultiByteToWideChar, EngQueryLocalTime, EngReleaseSemaphore from stub.c to eng.c
start implement of EngQueryEMFInfo need bit more figout how it is done

svn path=/trunk/; revision=28552
This commit is contained in:
Magnus Olsen 2007-08-25 17:12:59 +00:00
parent 02eec98371
commit 1fe725113b
2 changed files with 104 additions and 54 deletions

View file

@ -2446,16 +2446,7 @@ CreateBitmap(
}
/*
* @unimplemented
*/
FD_GLYPHSET* STDCALL
EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars)
{
UNIMPLEMENTED;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
@ -2468,58 +2459,33 @@ EngGetDriverName(HDEV hdev)
return 0;
}
/*
* @implemented
*/
INT STDCALL
EngMultiByteToWideChar(UINT CodePage,
LPWSTR WideCharString,
INT BytesInWideCharString,
LPSTR MultiByteString,
INT BytesInMultiByteString)
{
return MultiByteToWideChar(CodePage,0,MultiByteString,BytesInMultiByteString,WideCharString,BytesInWideCharString / sizeof(WCHAR));
}
/*
* @implemented
* Obsolete GDI Function
* http://www.osronline.com/DDKx/graphics/gdioview_20tj.htm
* @unimplemented
* wrong info it is not Obsolete GDI Function as http://www.osronline.com/DDKx/graphics/gdioview_20tj.htm say
*/
BOOL STDCALL
EngQueryEMFInfo(HDEV hdev,EMFINFO *pEMFInfo)
{
return FALSE;
#if 0
BOOL retValue = FALSE;
DHPDEV Dhpdev;
if ((!hdev) && (!pEMFInfo))
{
if ((Dhpdev = NtGdiGetDhpdev(hdev)))
{
/* FIXME check if it support or if it is pEMFInfo we got */
/* FIXME copy the data from Dhpdev to pEMFInfo */
}
}
return retValue;
#else
return FALSE;
#endif
}
/*
* @implemented
*/
VOID STDCALL
EngQueryLocalTime(PENG_TIME_FIELDS etf)
{
SYSTEMTIME SystemTime;
GetLocalTime( &SystemTime );
etf->usYear = SystemTime.wYear;
etf->usMonth = SystemTime.wMonth;
etf->usWeekday = SystemTime.wDayOfWeek;
etf->usDay = SystemTime.wDay;
etf->usHour = SystemTime.wHour;
etf->usMinute = SystemTime.wMinute;
etf->usSecond = SystemTime.wSecond;
etf->usMilliseconds = SystemTime.wMilliseconds;
}
/*
* @implemented
*/
VOID
STDCALL
EngReleaseSemaphore ( IN HSEMAPHORE hsem )
{
RtlLeaveCriticalSection( (PRTL_CRITICAL_SECTION) hsem);
}
/*
* @implemented

View file

@ -118,4 +118,88 @@ EngLoadModule(LPWSTR pwsz)
return LoadLibraryExW ( pwsz, NULL, LOAD_LIBRARY_AS_DATAFILE);
}
/*
* @implemented
*/
INT STDCALL
EngMultiByteToWideChar(UINT CodePage,
LPWSTR WideCharString,
INT BytesInWideCharString,
LPSTR MultiByteString,
INT BytesInMultiByteString)
{
return MultiByteToWideChar(CodePage,0,MultiByteString,BytesInMultiByteString,WideCharString,BytesInWideCharString / sizeof(WCHAR));
}
/*
* @implemented
*/
VOID STDCALL
EngQueryLocalTime(PENG_TIME_FIELDS etf)
{
SYSTEMTIME SystemTime;
GetLocalTime( &SystemTime );
etf->usYear = SystemTime.wYear;
etf->usMonth = SystemTime.wMonth;
etf->usWeekday = SystemTime.wDayOfWeek;
etf->usDay = SystemTime.wDay;
etf->usHour = SystemTime.wHour;
etf->usMinute = SystemTime.wMinute;
etf->usSecond = SystemTime.wSecond;
etf->usMilliseconds = SystemTime.wMilliseconds;
}
/*
* @implemented
*/
VOID
STDCALL
EngReleaseSemaphore ( IN HSEMAPHORE hsem )
{
RtlLeaveCriticalSection( (PRTL_CRITICAL_SECTION) hsem);
}
BOOL
copy_my_glyphset( FD_GLYPHSET *dst_glyphset , FD_GLYPHSET * src_glyphset, ULONG Size)
{
BOOL retValue = FALSE;
memcpy(src_glyphset, dst_glyphset, Size);
if (src_glyphset->cRuns == 0)
{
retValue = TRUE;
}
/* FIXME copy wrun */
return retValue;
}
/*
* @unimplemented
*/
FD_GLYPHSET* STDCALL
EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars)
{
FD_GLYPHSET * ntfd_glyphset;
FD_GLYPHSET * myfd_glyphset = NULL;
ntfd_glyphset = NtGdiEngComputeGlyphSet(nCodePage,nFirstChar,cChars);
if (!ntfd_glyphset)
{
if (ntfd_glyphset->cjThis)
{
myfd_glyphset = GlobalAlloc(0,ntfd_glyphset->cjThis);
if (!myfd_glyphset)
{
if (copy_my_glyphset(myfd_glyphset,ntfd_glyphset,ntfd_glyphset->cjThis) == FALSE)
{
GlobalFree(myfd_glyphset);
myfd_glyphset = NULL;
}
}
}
}
return myfd_glyphset;
}