Ignore:
Timestamp:
Dec 15, 2001, 7:51:16 PM (24 years ago)
Author:
sandervl
Message:

Added statistics for font, bitmap, pen, brush & region objects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gdi32/objhandle.cpp

    r7330 r7635  
    1 /* $Id: objhandle.cpp,v 1.19 2001-11-13 15:42:06 sandervl Exp $ */
     1/* $Id: objhandle.cpp,v 1.20 2001-12-15 18:50:27 sandervl Exp $ */
    22/*
    33 * Win32 Handle Management Code for OS/2
     
    2626#include <unicode.h>
    2727#include "font.h"
     28#include <stats.h>
    2829
    2930#define DBG_LOCALLOG    DBG_objhandle
     
    328329DWORD WIN32API GetObjectType( HGDIOBJ hObj)
    329330{
    330     dprintf2(("GDI32: GetObjectType %x", hObj));
     331    DWORD objtype;
     332
    331333    //TODO: must use 16 bits gdi object handles
    332334    if(HIWORD(hObj) == 0) {
     
    334336    }
    335337    if(ObjGetHandleType(hObj) == GDIOBJ_REGION) {
     338        dprintf2(("GDI32: GetObjectType %x REGION", hObj));
    336339        SetLastError(ERROR_SUCCESS);
    337340        return OBJ_REGION;
    338341    }
    339     return O32_GetObjectType(hObj);
     342    objtype = O32_GetObjectType(hObj);
     343    dprintf2(("GDI32: GetObjectType %x objtype %d", hObj, objtype));
     344    return objtype;
    340345}
    341346//******************************************************************************
     
    344349BOOL WIN32API DeleteObject(HANDLE hObj)
    345350{
     351    DWORD objtype;
     352
    346353    dprintf(("GDI32: DeleteObject %x", hObj));
    347354
     
    353360
    354361    //System objects can't be deleted (TODO: any others?? (fonts?))!!!!)
    355     switch (GetObjectType(hObj))
     362    objtype = GetObjectType(hObj);
     363    switch (objtype)
    356364    {
    357365        case OBJ_PEN:
     
    385393    }
    386394
     395    STATS_DeleteObject(hObj, objtype);
     396
    387397    if(ObjGetHandleType(hObj) == GDIOBJ_REGION)
    388398    {
     
    398408//******************************************************************************
    399409//******************************************************************************
     410int WIN32API EnumObjects( HDC hdc, int objType, GOBJENUMPROC objFunc, LPARAM lParam)
     411{
     412    //calling convention differences
     413    dprintf(("!ERROR!: GDI32: EnumObjects STUB"));
     414//    return O32_EnumObjects(arg1, arg2, arg3, arg4);
     415    return 0;
     416}
     417//******************************************************************************
     418//******************************************************************************
     419HANDLE WIN32API GetCurrentObject( HDC hdc, UINT arg2)
     420{
     421    dprintf(("GDI32: GetCurrentObject %x %x", hdc, arg2));
     422    return (HANDLE)O32_GetCurrentObject(hdc, arg2);
     423}
     424//******************************************************************************
     425//******************************************************************************
    400426BOOL WIN32API SetObjectOwner( HGDIOBJ arg1, int arg2 )
    401427{
     
    406432//******************************************************************************
    407433//******************************************************************************
     434BOOL WIN32API UnrealizeObject( HGDIOBJ hObject)
     435{
     436    dprintf(("GDI32: UnrealizeObject %x", hObject));
     437    return O32_UnrealizeObject(hObject);
     438}
     439//******************************************************************************
     440//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.