implemented GetCurrentObject()

svn path=/trunk/; revision=9217
This commit is contained in:
Thomas Bluemel
2004-04-25 15:31:43 +00:00
parent 18d53db81a
commit eb9b7d6f5d
4 changed files with 63 additions and 24 deletions
+7 -6
View File
@@ -1092,19 +1092,20 @@ extern "C" {
#define TRUETYPE_FONTTYPE (4)
/* EnumObjects, GetCurrentObject, GetObjectType */
#define OBJ_BRUSH (2)
#define OBJ_PEN (1)
#define OBJ_BRUSH (2)
#define OBJ_DC (3)
#define OBJ_METADC (4)
#define OBJ_PAL (5)
#define OBJ_FONT (6)
#define OBJ_BITMAP (7)
#define OBJ_EXTPEN (11)
#define OBJ_REGION (8)
#define OBJ_DC (3)
#define OBJ_MEMDC (10)
#define OBJ_METAFILE (9)
#define OBJ_METADC (4)
#define OBJ_ENHMETAFILE (13)
#define OBJ_MEMDC (10)
#define OBJ_EXTPEN (11)
#define OBJ_ENHMETADC (12)
#define OBJ_ENHMETAFILE (13)
#define OBJ_COLORSPACE (14)
/* EnumPrinters */
+1 -16
View File
@@ -1,4 +1,4 @@
/* $Id: stubs.c,v 1.55 2004/04/25 14:46:53 weiden Exp $
/* $Id: stubs.c,v 1.56 2004/04/25 15:31:43 weiden Exp $
*
* reactos/lib/gdi32/misc/stubs.c
*
@@ -256,21 +256,6 @@ GetMetaRgn(
}
/*
* @unimplemented
*/
HGDIOBJ
STDCALL
GetCurrentObject(
HDC a0,
UINT a1
)
{
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*
* @unimplemented
*/
+13
View File
@@ -1030,3 +1030,16 @@ FixBrushOrgEx(
return FALSE;
}
/*
* @implemented
*/
HGDIOBJ
STDCALL
GetCurrentObject(
HDC hdc,
UINT uObjectType
)
{
return NtGdiGetCurrentObject(hdc, uObjectType);
}
+42 -2
View File
@@ -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.130 2004/04/25 12:51:53 weiden Exp $
/* $Id: dc.c,v 1.131 2004/04/25 15:31:43 weiden Exp $
*
* DC.C - Device context functions
*
@@ -56,6 +56,10 @@
#define NDEBUG
#include <win32k/debug1.h>
#ifndef OBJ_COLORSPACE
#define OBJ_COLORSPACE (14)
#endif
static GDIDEVICE PrimarySurface;
/* FIXME: DCs should probably be thread safe */
@@ -962,7 +966,43 @@ DC_GET_VAL( HRGN, NtGdiGetClipRgn, w.hClipRgn )
HGDIOBJ STDCALL
NtGdiGetCurrentObject(HDC hDC, UINT ObjectType)
{
UNIMPLEMENTED;
HGDIOBJ SelObject;
DC *dc;
if(!(dc = DC_LockDc(hDC)))
{
SetLastWin32Error(ERROR_INVALID_HANDLE);
return NULL;
}
switch(ObjectType)
{
case OBJ_PEN:
SelObject = dc->w.hPen;
break;
case OBJ_BRUSH:
SelObject = dc->w.hBrush;
break;
case OBJ_PAL:
DPRINT1("FIXME: NtGdiGetCurrentObject() ObjectType OBJ_PAL not supported yet!\n");
break;
case OBJ_FONT:
SelObject = dc->w.hFont;
break;
case OBJ_BITMAP:
SelObject = dc->w.hBitmap;
break;
case OBJ_COLORSPACE:
DPRINT1("FIXME: NtGdiGetCurrentObject() ObjectType OBJ_COLORSPACE not supported yet!\n");
break;
default:
SelObject = NULL;
SetLastWin32Error(ERROR_INVALID_PARAMETER);
break;
}
DC_UnlockDc(hDC);
return SelObject;
}
DC_GET_VAL_EX ( GetCurrentPositionEx, w.CursPosX, w.CursPosY, POINT, x, y )