1997-03-05 09:22:35 +01:00
|
|
|
/*
|
|
|
|
* GDI objects
|
|
|
|
*
|
|
|
|
* Copyright 1993 Alexandre Julliard
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
|
|
|
|
2001-07-18 23:04:23 +02:00
|
|
|
#include "config.h"
|
|
|
|
|
1997-03-05 09:22:35 +01:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
2001-07-18 23:04:23 +02:00
|
|
|
|
2002-03-27 22:13:40 +01:00
|
|
|
#include "win16drv/win16drv.h"
|
2001-07-18 23:04:23 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1997-03-05 09:22:35 +01:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(gdi);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
1997-03-05 09:22:35 +01:00
|
|
|
|
|
|
|
/***********************************************************************
|
2002-03-28 23:22:05 +01:00
|
|
|
* WIN16DRV_SelectBitmap
|
1997-03-05 09:22:35 +01:00
|
|
|
*/
|
2002-03-28 23:22:05 +01:00
|
|
|
HBITMAP WIN16DRV_SelectBitmap( PHYSDEV dev, HBITMAP bitmap )
|
1997-03-05 09:22:35 +01:00
|
|
|
{
|
2002-03-28 23:22:05 +01:00
|
|
|
FIXME("BITMAP not implemented\n");
|
2002-08-16 02:42:06 +02:00
|
|
|
return (HBITMAP)1;
|
2002-03-28 23:22:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WIN16DRV_SelectBrush
|
|
|
|
*/
|
|
|
|
HBRUSH WIN16DRV_SelectBrush( PHYSDEV dev, HBRUSH hbrush )
|
|
|
|
{
|
|
|
|
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dev;
|
|
|
|
int nSize;
|
|
|
|
LOGBRUSH16 lBrush16;
|
2001-07-23 01:34:21 +02:00
|
|
|
|
2002-03-28 23:22:05 +01:00
|
|
|
if (!GetObject16( hbrush, sizeof(lBrush16), &lBrush16 )) return 0;
|
|
|
|
|
|
|
|
if ( physDev->BrushInfo )
|
|
|
|
{
|
|
|
|
TRACE("UnRealizing BrushInfo\n");
|
|
|
|
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, -DRVOBJ_BRUSH,
|
|
|
|
physDev->BrushInfo,
|
|
|
|
physDev->BrushInfo, 0);
|
|
|
|
}
|
|
|
|
else
|
1997-03-05 09:22:35 +01:00
|
|
|
{
|
2002-03-28 23:22:05 +01:00
|
|
|
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_BRUSH, &lBrush16, 0, 0);
|
|
|
|
physDev->BrushInfo = HeapAlloc( GetProcessHeap(), 0, nSize );
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|
2002-03-28 23:22:05 +01:00
|
|
|
|
|
|
|
nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_BRUSH,
|
|
|
|
&lBrush16, physDev->BrushInfo, win16drv_SegPtr_TextXForm);
|
|
|
|
return hbrush;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
|
|
|
* WIN16DRV_SelectPen
|
|
|
|
*/
|
|
|
|
HPEN WIN16DRV_SelectPen( PHYSDEV dev, HPEN hpen )
|
|
|
|
{
|
|
|
|
WIN16DRV_PDEVICE *physDev = (WIN16DRV_PDEVICE *)dev;
|
|
|
|
int nSize;
|
|
|
|
LOGPEN16 lPen16;
|
|
|
|
|
|
|
|
if (!GetObject16( hpen, sizeof(lPen16), &lPen16 )) return 0;
|
|
|
|
|
|
|
|
if ( physDev->PenInfo )
|
|
|
|
{
|
|
|
|
TRACE("UnRealizing PenInfo\n");
|
|
|
|
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, -DRVOBJ_PEN,
|
|
|
|
physDev->PenInfo,
|
|
|
|
physDev->PenInfo, 0);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
nSize = PRTDRV_RealizeObject (physDev->segptrPDEVICE, DRVOBJ_PEN, &lPen16, 0, 0);
|
|
|
|
physDev->PenInfo = HeapAlloc( GetProcessHeap(), 0, nSize );
|
|
|
|
}
|
|
|
|
|
|
|
|
nSize = PRTDRV_RealizeObject(physDev->segptrPDEVICE, DRVOBJ_PEN,
|
|
|
|
&lPen16, physDev->PenInfo, 0);
|
|
|
|
return hpen;
|
1997-03-05 09:22:35 +01:00
|
|
|
}
|