6 modified files
reactos/lib/gdi32/misc
diff -u -r1.29 -r1.30
--- stubsa.c 23 Mar 2004 07:59:47 -0000 1.29
+++ stubsa.c 23 Mar 2004 19:46:49 -0000 1.30
@@ -1,4 +1,4 @@
-/* $Id: stubsa.c,v 1.29 2004/03/23 07:59:47 gvg Exp $
+/* $Id: stubsa.c,v 1.30 2004/03/23 19:46:49 gvg Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
@@ -410,21 +410,6 @@
/*
* @unimplemented
*/
-int
-STDCALL
-GetObjectA(
- HGDIOBJ a0,
- int a1,
- LPVOID a2
- )
-{
- return NtGdiGetObject ( a0, a1, a2 );
-}
-
-
-/*
- * @unimplemented
- */
BOOL
STDCALL
PolyTextOutA(
reactos/lib/gdi32/misc
diff -u -r1.26 -r1.27
--- stubsw.c 23 Mar 2004 07:59:47 -0000 1.26
+++ stubsw.c 23 Mar 2004 19:46:49 -0000 1.27
@@ -1,4 +1,4 @@
-/* $Id: stubsw.c,v 1.26 2004/03/23 07:59:47 gvg Exp $
+/* $Id: stubsw.c,v 1.27 2004/03/23 19:46:49 gvg Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
@@ -299,21 +299,6 @@
/*
* @unimplemented
*/
-int
-STDCALL
-GetObjectW(
- HGDIOBJ a0,
- int a1,
- LPVOID a2
- )
-{
- return NtGdiGetObject ( a0, a1, a2 );
-}
-
-
-/*
- * @unimplemented
- */
BOOL
STDCALL
PolyTextOutW(
reactos/lib/gdi32/objects
diff -u -r1.26 -r1.27
--- dc.c 9 Mar 2004 23:21:56 -0000 1.26
+++ dc.c 23 Mar 2004 19:46:49 -0000 1.27
@@ -6,6 +6,7 @@
#include <windows.h>
#include <ddk/ntddk.h>
#include <win32k/kapi.h>
+#include <rosrtl/logfont.h>
/*
@@ -940,3 +941,55 @@
{
return NtGdiExtEscape(a0, a1, a2, a3, a4, a5);
}
+
+
+/*
+ * @unimplemented
+ */
+int
+STDCALL
+GetObjectA(HGDIOBJ Handle, int Size, LPVOID Buffer)
+{
+ LOGFONTW LogFontW;
+ DWORD Type;
+ int Result;
+
+ Type = GetObjectType(Handle);
+ if (0 == Type)
+ {
+ return 0;
+ }
+
+ if (OBJ_FONT == Type)
+ {
+ if (Size < sizeof(LOGFONTA))
+ {
+ SetLastError(ERROR_BUFFER_OVERFLOW);
+ return 0;
+ }
+ Result = NtGdiGetObject(Handle, sizeof(LOGFONTW), &LogFontW);
+ if (0 == Result)
+ {
+ return 0;
+ }
+ RosRtlLogFontW2A((LPLOGFONTA) Buffer, &LogFontW);
+ Result = sizeof(LOGFONTA);
+ }
+ else
+ {
+ Result = NtGdiGetObject(Handle, Size, Buffer);
+ }
+
+ return Result;
+}
+
+
+/*
+ * @unimplemented
+ */
+int
+STDCALL
+GetObjectW(HGDIOBJ Handle, int Size, LPVOID Buffer)
+{
+ return NtGdiGetObject(Handle, Size, Buffer);
+}
reactos/subsys/win32k/include
diff -u -r1.4 -r1.5
--- text.h 24 Feb 2004 13:27:02 -0000 1.4
+++ text.h 23 Mar 2004 19:46:49 -0000 1.5
@@ -5,6 +5,7 @@
BOOL FASTCALL IntIsFontRenderingEnabled(VOID);
BOOL FASTCALL IntIsFontRenderingEnabled(VOID);
VOID FASTCALL IntEnableFontRendering(BOOL Enable);
+INT FASTCALL FontGetObject(PTEXTOBJ TextObj, INT Count, PVOID Buffer);
#define IntLockProcessPrivateFonts(W32Process) \
ExAcquireFastMutex(&W32Process->PrivateFontListLock)
reactos/subsys/win32k/objects
diff -u -r1.124 -r1.125
--- dc.c 15 Mar 2004 22:02:31 -0000 1.124
+++ dc.c 23 Mar 2004 19:46:50 -0000 1.125
@@ -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: dc.c,v 1.124 2004/03/15 22:02:31 gvg Exp $
+/* $Id: dc.c,v 1.125 2004/03/23 19:46:50 gvg Exp $
*
* DC.C - Device context functions
*
@@ -53,6 +53,7 @@
#include <include/intgdi.h>
#include <include/cleanup.h>
#include <include/tags.h>
+#include <include/text.h>
#define NDEBUG
#include <win32k/debug1.h>
@@ -1425,47 +1426,55 @@
DC_GET_VAL( INT, NtGdiGetPolyFillMode, w.polyFillMode )
INT FASTCALL
-IntGdiGetObject(HANDLE handle, INT count, LPVOID buffer)
+IntGdiGetObject(HANDLE Handle, INT Count, LPVOID Buffer)
{
- PGDIOBJHDR gdiObject;
- INT result = 0;
- DWORD objectType;
+ PGDIOBJHDR GdiObject;
+ INT Result = 0;
+ DWORD ObjectType;
- gdiObject = GDIOBJ_LockObj(handle, GDI_OBJECT_TYPE_DONTCARE);
- if (gdiObject == 0)
- return 0;
+ GdiObject = GDIOBJ_LockObj(Handle, GDI_OBJECT_TYPE_DONTCARE);
+ if (NULL == GdiObject)
+ {
+ return 0;
+ }
- objectType = GDIOBJ_GetObjectType(handle);
- switch(objectType)
- {
-/* case GDI_OBJECT_TYPE_PEN:
- result = PEN_GetObject((PENOBJ *)gdiObject, count, buffer);
- break;
- case GDI_OBJECT_TYPE_BRUSH:
- result = BRUSH_GetObject((BRUSHOBJ *)gdiObject, count, buffer);
- break; */
- case GDI_OBJECT_TYPE_BITMAP:
- result = BITMAP_GetObject((BITMAPOBJ *)gdiObject, count, buffer);
- break;
-/* case GDI_OBJECT_TYPE_FONT:
- result = FONT_GetObjectW((FONTOBJ *)gdiObject, count, buffer);
-
- // Fix the LOGFONT structure for the stock fonts
-
- if ( (handle >= FIRST_STOCK_HANDLE) && (handle <= LAST_STOCK_HANDLE) )
- FixStockFontSizeW(handle, count, buffer);
- break;
- case GDI_OBJECT_TYPE_PALETTE:
- result = PALETTE_GetObject((PALETTEOBJ *)gdiObject, count, buffer);
- break; */
- default:
- DPRINT1("GDI object type 0x%08x not implemented\n", objectType);
- break;
- }
+ ObjectType = GDIOBJ_GetObjectType(Handle);
+ switch (ObjectType)
+ {
+#if 0
+ case GDI_OBJECT_TYPE_PEN:
+ Result = PEN_GetObject((PENOBJ *) GdiObject, Count, Buffer);
+ break;
+ case GDI_OBJECT_TYPE_BRUSH:
+ Result = BRUSH_GetObject((BRUSHOBJ *) GdiObject, Count, Buffer);
+ break;
+#endif
+ case GDI_OBJECT_TYPE_BITMAP:
+ Result = BITMAP_GetObject((BITMAPOBJ *) GdiObject, Count, Buffer);
+ break;
+ case GDI_OBJECT_TYPE_FONT:
+ Result = FontGetObject((PTEXTOBJ) GdiObject, Count, Buffer);
+#if 0
+ // Fix the LOGFONT structure for the stock fonts
+ if (FIRST_STOCK_HANDLE <= Handle && Handle <= LAST_STOCK_HANDLE)
+ {
+ FixStockFontSizeW(Handle, Count, Buffer);
+ }
+#endif
+ break;
+#if 0
+ case GDI_OBJECT_TYPE_PALETTE:
+ Result = PALETTE_GetObject((PALETTEOBJ *) GdiObject, Count, Buffer);
+ break;
+#endif
+ default:
+ DPRINT1("GDI object type 0x%08x not implemented\n", ObjectType);
+ break;
+ }
- GDIOBJ_UnlockObj(handle, GDI_OBJECT_TYPE_DONTCARE);
+ GDIOBJ_UnlockObj(Handle, GDI_OBJECT_TYPE_DONTCARE);
- return result;
+ return Result;
}
INT STDCALL
reactos/subsys/win32k/objects
diff -u -r1.83 -r1.84
--- text.c 23 Mar 2004 07:59:47 -0000 1.83
+++ text.c 23 Mar 2004 19:46:50 -0000 1.84
@@ -22,7 +22,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: text.c,v 1.83 2004/03/23 07:59:47 gvg Exp $ */
+/* $Id: text.c,v 1.84 2004/03/23 19:46:50 gvg Exp $ */
#undef WIN32_LEAN_AND_MEAN
@@ -2657,4 +2657,18 @@
return Status;
}
+INT FASTCALL
+FontGetObject(PTEXTOBJ Font, INT Count, PVOID Buffer)
+{
+ if (Count < sizeof(LOGFONTW))
+ {
+ SetLastWin32Error(ERROR_BUFFER_OVERFLOW);
+ return 0;
+ }
+
+ RtlCopyMemory(Buffer, &Font->logfont, sizeof(LOGFONTW));
+
+ return sizeof(LOGFONTW);
+}
+
/* EOF */
CVSspam 0.2.8