Author: greatlrd
Date: Sat Aug 25 21:12:59 2007
New Revision: 28552
URL:
http://svn.reactos.org/svn/reactos?rev=28552&view=rev
Log:
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
Modified:
trunk/reactos/dll/win32/gdi32/misc/stubs.c
trunk/reactos/dll/win32/gdi32/objects/eng.c
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 (original)
+++ trunk/reactos/dll/win32/gdi32/misc/stubs.c Sat Aug 25 21:12:59 2007
@@ -2446,16 +2446,7 @@
}
-/*
- * @unimplemented
- */
-FD_GLYPHSET* STDCALL
-EngComputeGlyphSet(INT nCodePage,INT nFirstChar,INT cChars)
-{
- UNIMPLEMENTED;
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return 0;
-}
+
/*
* @unimplemented
@@ -2468,58 +2459,33 @@
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;
-}
-
-/*
- * @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);
-}
+#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
Modified: trunk/reactos/dll/win32/gdi32/objects/eng.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/en…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/objects/eng.c (original)
+++ trunk/reactos/dll/win32/gdi32/objects/eng.c Sat Aug 25 21:12:59 2007
@@ -118,4 +118,88 @@
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;
+}