1993-09-04 12:09:32 +02:00
|
|
|
/*
|
|
|
|
* GDI brush objects
|
|
|
|
*
|
1995-01-09 19:21:16 +01:00
|
|
|
* Copyright 1993, 1994 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1995-01-09 19:21:16 +01:00
|
|
|
*/
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
1999-02-28 13:27:56 +01:00
|
|
|
#include <string.h>
|
2001-07-18 23:04:23 +02:00
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include "windef.h"
|
1999-02-17 14:51:06 +01:00
|
|
|
#include "winbase.h"
|
2001-07-18 23:04:23 +02:00
|
|
|
#include "wingdi.h"
|
2004-01-15 01:35:38 +01:00
|
|
|
#include "gdi_private.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(gdi);
|
1999-04-19 16:56:29 +02:00
|
|
|
|
2002-05-31 20:43:22 +02:00
|
|
|
/* GDI logical brush object */
|
|
|
|
typedef struct
|
|
|
|
{
|
2021-06-30 17:36:19 +02:00
|
|
|
struct gdi_obj_header obj;
|
2011-11-02 20:58:36 +01:00
|
|
|
LOGBRUSH logbrush;
|
2011-12-29 16:17:44 +01:00
|
|
|
struct brush_pattern pattern;
|
2002-05-31 20:43:22 +02:00
|
|
|
} BRUSHOBJ;
|
|
|
|
|
|
|
|
#define NB_HATCH_STYLES 6
|
|
|
|
|
2009-01-27 16:30:43 +01:00
|
|
|
static INT BRUSH_GetObject( HGDIOBJ handle, INT count, LPVOID buffer );
|
2009-01-27 16:19:37 +01:00
|
|
|
static BOOL BRUSH_DeleteObject( HGDIOBJ handle );
|
2002-05-31 20:43:22 +02:00
|
|
|
|
|
|
|
static const struct gdi_obj_funcs brush_funcs =
|
|
|
|
{
|
|
|
|
BRUSH_GetObject, /* pGetObjectW */
|
|
|
|
NULL, /* pUnrealizeObject */
|
|
|
|
BRUSH_DeleteObject /* pDeleteObject */
|
|
|
|
};
|
|
|
|
|
1999-10-23 20:56:30 +02:00
|
|
|
|
2012-05-23 21:12:04 +02:00
|
|
|
static BOOL copy_bitmap( struct brush_pattern *brush, HBITMAP bitmap )
|
2011-11-03 11:11:14 +01:00
|
|
|
{
|
2012-05-23 21:12:04 +02:00
|
|
|
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256])];
|
|
|
|
BITMAPINFO *info = (BITMAPINFO *)buffer;
|
2011-11-03 11:11:14 +01:00
|
|
|
struct gdi_image_bits bits;
|
|
|
|
struct bitblt_coords src;
|
2012-05-23 21:12:04 +02:00
|
|
|
BITMAPOBJ *bmp = GDI_GetObjPtr( bitmap, OBJ_BITMAP );
|
2011-12-29 20:16:46 +01:00
|
|
|
|
2012-05-23 21:12:04 +02:00
|
|
|
if (!bmp) return FALSE;
|
2011-11-03 11:11:14 +01:00
|
|
|
|
|
|
|
src.visrect.left = src.x = 0;
|
|
|
|
src.visrect.top = src.y = 0;
|
2012-01-10 16:09:54 +01:00
|
|
|
src.visrect.right = src.width = bmp->dib.dsBm.bmWidth;
|
|
|
|
src.visrect.bottom = src.height = bmp->dib.dsBm.bmHeight;
|
2012-05-29 14:24:11 +02:00
|
|
|
if (get_image_from_bitmap( bmp, info, &bits, &src )) goto done;
|
2011-11-03 11:11:14 +01:00
|
|
|
|
2012-05-23 21:12:04 +02:00
|
|
|
brush->bits = bits;
|
|
|
|
if (!bits.free)
|
2011-11-03 21:14:42 +01:00
|
|
|
{
|
2012-05-23 21:12:04 +02:00
|
|
|
if (!(brush->bits.ptr = HeapAlloc( GetProcessHeap(), 0, info->bmiHeader.biSizeImage ))) goto done;
|
|
|
|
memcpy( brush->bits.ptr, bits.ptr, info->bmiHeader.biSizeImage );
|
|
|
|
brush->bits.free = free_heap_bits;
|
2011-11-03 21:14:42 +01:00
|
|
|
}
|
|
|
|
|
2012-05-23 21:12:04 +02:00
|
|
|
if (!(brush->info = HeapAlloc( GetProcessHeap(), 0, get_dib_info_size( info, DIB_RGB_COLORS ))))
|
2011-11-03 21:14:42 +01:00
|
|
|
{
|
2012-05-23 21:12:04 +02:00
|
|
|
if (brush->bits.free) brush->bits.free( &brush->bits );
|
2011-11-03 21:14:42 +01:00
|
|
|
goto done;
|
|
|
|
}
|
2012-05-23 21:12:04 +02:00
|
|
|
memcpy( brush->info, info, get_dib_info_size( info, DIB_RGB_COLORS ));
|
|
|
|
brush->bits.is_copy = FALSE; /* the bits can't be modified */
|
2011-11-03 21:14:42 +01:00
|
|
|
brush->usage = DIB_RGB_COLORS;
|
|
|
|
|
|
|
|
done:
|
|
|
|
GDI_ReleaseObj( bitmap );
|
|
|
|
return brush->info != NULL;
|
|
|
|
}
|
|
|
|
|
2011-12-29 16:17:44 +01:00
|
|
|
BOOL store_brush_pattern( LOGBRUSH *brush, struct brush_pattern *pattern )
|
|
|
|
{
|
|
|
|
HGLOBAL hmem = 0;
|
|
|
|
|
|
|
|
pattern->info = NULL;
|
|
|
|
pattern->bits.free = NULL;
|
|
|
|
|
|
|
|
switch (brush->lbStyle)
|
|
|
|
{
|
|
|
|
case BS_SOLID:
|
|
|
|
case BS_HOLLOW:
|
2011-12-30 11:02:57 +01:00
|
|
|
return TRUE;
|
|
|
|
|
2011-12-29 16:17:44 +01:00
|
|
|
case BS_HATCHED:
|
2011-12-30 11:02:57 +01:00
|
|
|
if (brush->lbHatch > HS_DIAGCROSS)
|
|
|
|
{
|
|
|
|
if (brush->lbHatch >= HS_API_MAX) return FALSE;
|
|
|
|
brush->lbStyle = BS_SOLID;
|
|
|
|
brush->lbHatch = 0;
|
|
|
|
}
|
2011-12-29 16:17:44 +01:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case BS_PATTERN8X8:
|
|
|
|
brush->lbStyle = BS_PATTERN;
|
|
|
|
/* fall through */
|
|
|
|
case BS_PATTERN:
|
|
|
|
brush->lbColor = 0;
|
|
|
|
return copy_bitmap( pattern, (HBITMAP)brush->lbHatch );
|
|
|
|
|
|
|
|
case BS_DIBPATTERN:
|
|
|
|
hmem = (HGLOBAL)brush->lbHatch;
|
|
|
|
if (!(brush->lbHatch = (ULONG_PTR)GlobalLock( hmem ))) return FALSE;
|
|
|
|
/* fall through */
|
|
|
|
case BS_DIBPATTERNPT:
|
|
|
|
pattern->usage = brush->lbColor;
|
|
|
|
pattern->info = copy_packed_dib( (BITMAPINFO *)brush->lbHatch, pattern->usage );
|
|
|
|
if (hmem) GlobalUnlock( hmem );
|
|
|
|
if (!pattern->info) return FALSE;
|
|
|
|
pattern->bits.ptr = (char *)pattern->info + get_dib_info_size( pattern->info, pattern->usage );
|
|
|
|
brush->lbStyle = BS_DIBPATTERN;
|
|
|
|
brush->lbColor = 0;
|
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case BS_DIBPATTERN8X8:
|
|
|
|
case BS_MONOPATTERN:
|
|
|
|
case BS_INDEXED:
|
|
|
|
default:
|
|
|
|
WARN( "invalid brush style %u\n", brush->lbStyle );
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void free_brush_pattern( struct brush_pattern *pattern )
|
|
|
|
{
|
|
|
|
if (pattern->bits.free) pattern->bits.free( &pattern->bits );
|
|
|
|
HeapFree( GetProcessHeap(), 0, pattern->info );
|
|
|
|
}
|
|
|
|
|
2011-11-01 22:05:16 +01:00
|
|
|
BOOL get_brush_bitmap_info( HBRUSH handle, BITMAPINFO *info, void **bits, UINT *usage )
|
|
|
|
{
|
|
|
|
BRUSHOBJ *brush;
|
|
|
|
BOOL ret = FALSE;
|
|
|
|
|
|
|
|
if (!(brush = GDI_GetObjPtr( handle, OBJ_BRUSH ))) return FALSE;
|
|
|
|
|
2011-12-29 16:17:44 +01:00
|
|
|
if (brush->pattern.info)
|
2011-11-01 22:05:16 +01:00
|
|
|
{
|
2011-12-29 16:17:44 +01:00
|
|
|
memcpy( info, brush->pattern.info, get_dib_info_size( brush->pattern.info, brush->pattern.usage ));
|
2011-12-12 12:23:12 +01:00
|
|
|
if (info->bmiHeader.biBitCount <= 8 && !info->bmiHeader.biClrUsed)
|
|
|
|
fill_default_color_table( info );
|
2011-12-29 16:17:44 +01:00
|
|
|
*bits = brush->pattern.bits.ptr;
|
|
|
|
*usage = brush->pattern.usage;
|
2011-11-01 22:05:16 +01:00
|
|
|
ret = TRUE;
|
|
|
|
}
|
|
|
|
GDI_ReleaseObj( handle );
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* CreateBrushIndirect (GDI32.@)
|
1999-10-23 20:56:30 +02:00
|
|
|
*
|
2004-08-20 21:57:11 +02:00
|
|
|
* Create a logical brush with a given style, color or pattern.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* brush [I] Pointer to a LOGBRUSH structure describing the desired brush.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot be
|
|
|
|
* created.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
|
|
|
* - Windows 95 and earlier cannot create brushes from bitmaps or DIBs larger
|
|
|
|
* than 8x8 pixels. If a larger bitmap is given, only a portion of the bitmap
|
|
|
|
* is used.
|
1993-09-04 12:09:32 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HBRUSH WINAPI CreateBrushIndirect( const LOGBRUSH * brush )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
2002-10-03 21:48:59 +02:00
|
|
|
BRUSHOBJ * ptr;
|
2000-08-19 23:38:55 +02:00
|
|
|
HBRUSH hbrush;
|
2002-10-03 21:48:59 +02:00
|
|
|
|
2011-12-29 16:17:44 +01:00
|
|
|
if (!(ptr = HeapAlloc( GetProcessHeap(), 0, sizeof(*ptr) ))) return 0;
|
2009-01-28 18:43:06 +01:00
|
|
|
|
2011-11-02 20:58:36 +01:00
|
|
|
ptr->logbrush = *brush;
|
2002-10-03 21:48:59 +02:00
|
|
|
|
2011-12-29 16:17:44 +01:00
|
|
|
if (store_brush_pattern( &ptr->logbrush, &ptr->pattern ) &&
|
2021-06-30 17:36:19 +02:00
|
|
|
(hbrush = alloc_gdi_handle( &ptr->obj, OBJ_BRUSH, &brush_funcs )))
|
2009-01-28 18:43:06 +01:00
|
|
|
{
|
|
|
|
TRACE("%p\n", hbrush);
|
|
|
|
return hbrush;
|
|
|
|
}
|
2002-10-03 21:48:59 +02:00
|
|
|
|
2011-12-29 16:17:44 +01:00
|
|
|
free_brush_pattern( &ptr->pattern );
|
2009-01-28 18:43:06 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, ptr );
|
2002-10-03 21:48:59 +02:00
|
|
|
return 0;
|
1996-11-02 15:24:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* CreateHatchBrush (GDI32.@)
|
2004-08-20 21:57:11 +02:00
|
|
|
*
|
|
|
|
* Create a logical brush with a hatched pattern.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* style [I] Direction of lines for the hatch pattern (HS_* values from "wingdi.h")
|
|
|
|
* color [I] Colour of the hatched pattern
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
1996-11-02 15:24:07 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HBRUSH WINAPI CreateHatchBrush( INT style, COLORREF color )
|
1996-11-02 15:24:07 +01:00
|
|
|
{
|
1999-04-22 18:27:50 +02:00
|
|
|
LOGBRUSH logbrush;
|
|
|
|
|
2006-10-12 22:56:56 +02:00
|
|
|
TRACE("%d %06x\n", style, color );
|
1999-04-22 18:27:50 +02:00
|
|
|
|
|
|
|
logbrush.lbStyle = BS_HATCHED;
|
|
|
|
logbrush.lbColor = color;
|
|
|
|
logbrush.lbHatch = style;
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1996-11-02 15:24:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* CreatePatternBrush (GDI32.@)
|
2004-08-20 21:57:11 +02:00
|
|
|
*
|
|
|
|
* Create a logical brush with a pattern from a bitmap.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* hbitmap [I] Bitmap containing pattern for the brush
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
1993-09-04 12:09:32 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HBRUSH WINAPI CreatePatternBrush( HBITMAP hbitmap )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
1999-02-26 12:11:13 +01:00
|
|
|
LOGBRUSH logbrush = { BS_PATTERN, 0, 0 };
|
2002-11-22 23:16:53 +01:00
|
|
|
TRACE("%p\n", hbitmap );
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2002-10-03 21:48:59 +02:00
|
|
|
logbrush.lbHatch = (ULONG_PTR)hbitmap;
|
2002-05-31 20:43:22 +02:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1996-11-02 15:24:07 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* CreateDIBPatternBrush (GDI32.@)
|
1998-11-08 16:07:22 +01:00
|
|
|
*
|
2004-08-20 21:57:11 +02:00
|
|
|
* Create a logical brush with a pattern from a DIB.
|
1998-11-08 16:07:22 +01:00
|
|
|
*
|
2004-08-20 21:57:11 +02:00
|
|
|
* PARAMS
|
|
|
|
* hbitmap [I] Global object containing BITMAPINFO structure for the pattern
|
|
|
|
* coloruse [I] Specifies color format, if provided
|
1998-11-08 16:07:22 +01:00
|
|
|
*
|
|
|
|
* RETURNS
|
2004-08-20 21:57:11 +02:00
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
1998-11-08 16:07:22 +01:00
|
|
|
*
|
2004-08-20 21:57:11 +02:00
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
|
|
|
* - This function is for compatibility only. CreateDIBPatternBrushPt() should
|
|
|
|
* be used instead.
|
1993-09-04 12:09:32 +02:00
|
|
|
*/
|
2004-08-20 21:57:11 +02:00
|
|
|
HBRUSH WINAPI CreateDIBPatternBrush( HGLOBAL hbitmap, UINT coloruse )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
1999-04-22 18:27:50 +02:00
|
|
|
LOGBRUSH logbrush;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2002-11-22 23:16:53 +01:00
|
|
|
TRACE("%p\n", hbitmap );
|
1993-09-04 12:09:32 +02:00
|
|
|
|
1999-04-22 18:27:50 +02:00
|
|
|
logbrush.lbStyle = BS_DIBPATTERN;
|
|
|
|
logbrush.lbColor = coloruse;
|
1993-09-04 12:09:32 +02:00
|
|
|
|
2005-09-12 13:19:56 +02:00
|
|
|
logbrush.lbHatch = (ULONG_PTR)hbitmap;
|
1993-09-04 12:09:32 +02:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1998-11-08 16:07:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* CreateDIBPatternBrushPt (GDI32.@)
|
1998-11-08 16:07:22 +01:00
|
|
|
*
|
2004-08-20 21:57:11 +02:00
|
|
|
* Create a logical brush with a pattern from a DIB.
|
1998-11-08 16:07:22 +01:00
|
|
|
*
|
2004-08-20 21:57:11 +02:00
|
|
|
* PARAMS
|
|
|
|
* data [I] Pointer to a BITMAPINFO structure and image data for the pattern
|
|
|
|
* coloruse [I] Specifies color format, if provided
|
1998-11-08 16:07:22 +01:00
|
|
|
*
|
2004-08-20 21:57:11 +02:00
|
|
|
* RETURNS
|
|
|
|
* A handle to the created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
2002-06-01 01:06:46 +02:00
|
|
|
*
|
2004-08-20 21:57:11 +02:00
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
1998-11-08 16:07:22 +01:00
|
|
|
*/
|
2004-08-20 21:57:11 +02:00
|
|
|
HBRUSH WINAPI CreateDIBPatternBrushPt( const void* data, UINT coloruse )
|
1998-11-08 16:07:22 +01:00
|
|
|
{
|
2009-01-26 11:01:12 +01:00
|
|
|
const BITMAPINFO *info=data;
|
1999-05-08 14:50:36 +02:00
|
|
|
LOGBRUSH logbrush;
|
2002-06-01 01:06:46 +02:00
|
|
|
|
2003-11-13 21:49:54 +01:00
|
|
|
if (!data)
|
|
|
|
return NULL;
|
|
|
|
|
2006-10-12 22:56:56 +02:00
|
|
|
TRACE("%p %dx%d %dbpp\n", info, info->bmiHeader.biWidth,
|
1999-04-18 14:07:00 +02:00
|
|
|
info->bmiHeader.biHeight, info->bmiHeader.biBitCount);
|
1998-11-08 16:07:22 +01:00
|
|
|
|
1999-10-23 20:56:30 +02:00
|
|
|
logbrush.lbStyle = BS_DIBPATTERNPT;
|
1999-05-08 14:50:36 +02:00
|
|
|
logbrush.lbColor = coloruse;
|
2005-09-12 13:19:56 +02:00
|
|
|
logbrush.lbHatch = (ULONG_PTR)data;
|
1998-11-08 16:07:22 +01:00
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1993-09-04 12:09:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1996-11-02 15:24:07 +01:00
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* CreateSolidBrush (GDI32.@)
|
2004-08-20 21:57:11 +02:00
|
|
|
*
|
|
|
|
* Create a logical brush consisting of a single colour.
|
|
|
|
*
|
|
|
|
* PARAMS
|
|
|
|
* color [I] Colour to make the solid brush
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* A handle to the newly created brush, or a NULL handle if the brush cannot
|
|
|
|
* be created.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* - This function uses CreateBrushIndirect() to create the brush.
|
|
|
|
* - The brush returned should be freed by the caller using DeleteObject()
|
|
|
|
* when it is no longer required.
|
1996-11-02 15:24:07 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
HBRUSH WINAPI CreateSolidBrush( COLORREF color )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
1999-04-22 18:27:50 +02:00
|
|
|
LOGBRUSH logbrush;
|
|
|
|
|
2006-10-12 22:56:56 +02:00
|
|
|
TRACE("%06x\n", color );
|
1999-04-22 18:27:50 +02:00
|
|
|
|
|
|
|
logbrush.lbStyle = BS_SOLID;
|
|
|
|
logbrush.lbColor = color;
|
|
|
|
logbrush.lbHatch = 0;
|
|
|
|
|
1999-02-26 12:11:13 +01:00
|
|
|
return CreateBrushIndirect( &logbrush );
|
1993-09-04 12:09:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* SetBrushOrgEx (GDI32.@)
|
2004-08-20 21:57:11 +02:00
|
|
|
*
|
|
|
|
* Set the brush origin for a device context.
|
|
|
|
*
|
|
|
|
* PARAMS
|
2011-07-27 13:38:43 +02:00
|
|
|
* hdc [I] Device context to set the brush origin for
|
2004-08-20 21:57:11 +02:00
|
|
|
* x [I] New x origin
|
2011-07-27 13:38:43 +02:00
|
|
|
* y [I] New y origin
|
2004-08-20 21:57:11 +02:00
|
|
|
* oldorg [O] If non NULL, destination for previously set brush origin.
|
|
|
|
*
|
|
|
|
* RETURNS
|
|
|
|
* Success: TRUE. The origin is set to (x,y), and oldorg is updated if given.
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI SetBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
|
|
|
{
|
2008-02-05 17:35:40 +01:00
|
|
|
DC *dc = get_dc_ptr( hdc );
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
|
|
|
|
|
|
|
if (!dc) return FALSE;
|
|
|
|
if (oldorg)
|
2016-07-27 10:59:25 +02:00
|
|
|
*oldorg = dc->brush_org;
|
|
|
|
|
|
|
|
dc->brush_org.x = x;
|
|
|
|
dc->brush_org.y = y;
|
2008-02-05 17:35:40 +01:00
|
|
|
release_dc_ptr( dc );
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
/***********************************************************************
|
2001-02-15 00:11:17 +01:00
|
|
|
* FixBrushOrgEx (GDI32.@)
|
2004-08-20 21:57:11 +02:00
|
|
|
*
|
|
|
|
* See SetBrushOrgEx.
|
|
|
|
*
|
|
|
|
* NOTES
|
|
|
|
* This function is no longer documented by MSDN, but in Win95 GDI32 it
|
|
|
|
* is the same as SetBrushOrgEx().
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
*/
|
1999-02-26 12:11:13 +01:00
|
|
|
BOOL WINAPI FixBrushOrgEx( HDC hdc, INT x, INT y, LPPOINT oldorg )
|
Release 971221
Fri Dec 19 10:50:46 1997 Douglas Ridgway <ridgway@winehq.com>
* [Make.rules.in] [Makefile.in] [documentation/Makefile.in]
[documentation/README.documentation]
First cut at Wine API documentation. No longer install reference
manual by default.
Wed Dec 17 21:32:23 1997 Andreas Mohr <100.30936@germany.net>
* [files/file.c]
Fixed GetTempFileName16() to use current path of requested drive
as needed.
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/dciman32.spec]
[if1632/msvfw32.spec] [if1632/tapi32.spec] [if1632/wow32.spec]
Added misc DLLs needed by various apps.
Wed Dec 17 12:01:50 1997 Morten Eriksen <mortene@sim.no>
* [if1632/gdi32.spec] [include/windows.h] [objects/palette.c]
Inserted empty stub for CreateHalftonePalette.
Tue Dec 16 22:08:06 1997 Huw D M Davies <h.davies1@physics.oxford.ac.uk>
* [windows/mdi.c]
Use VK_TAB instead of VK_SEPARATOR in TranslateMDISysAccel().
* [graphics/metafiledrv/init.c]
DeleteDC() on a MetaDC doesn't do anything - it shouldn't. Therefore
fix cleanup of MetaDCs in CloseMetaFile(); they now actually get
removed from the GDI heap!
* [graphics/x11drv/xfont.c]
Preserve FO_MATCH_XYINDEP flag in XFONT_MatchFIList(). Should reduce
the number of bold-italic matches.
Tue Dec 16 20:11:43 1997 Bertho Stultiens <bertho@panter.soci.aau.dk>
* [graphics/painting.c]
Included an implementation of DrawState
* [if1632/thunk.c]
Changed many fprintfs into dprintf_thunk
* [include/cache.h] [graphics/cache.c]
New files to hold cached handles to regulary used GDI object.
* [include/windows.h]
Added DRAWSTATExx typedefs
Added DSS_DEFAULT define for DrawState
* [objects/text.c]
New implementation of GrayString()
* [controls/uitools.c]
Implemented DrawFrameControl() functions
Changed DrawEdge() behaviour to win95 implementation
Mon Dec 15 23:43:01 1997 Martin Boehme <boehme@informatik.mu-luebeck.de>
* [graphics/path.c] [include/path.h] [graphics/painting.c]
[if1632/gdi32.spec] [include/gdi.h] [include/windows.h]
[objects/dc.c]
Added preliminary support for GDI paths.
* [objects/dc.c]
Added DC_Init_DC_INFO function for initializing WIN_DC_INFO
structure.
* [include/windows.h] [include/gdi.h] [objects/gdiobj.c]
Added DEFAULT_GUI_FONT.
* [include/winerror.h]
Added a few error codes.
* [memory/heap.c]
Changed HeapAlloc to make the correct calls to SetLastError
(now conforms to NT's behaviour).
* [windows/win.c]
Changed WIN_CreateWindowEx to allow child windows with zero
width / height.
Sun Dec 14 12:01:07 1997 Alexandre Julliard <julliard@lrc.epfl.ch>
* [if1632/*] [relay32/*]
Moved all 32-bit relay stuff to relay32/
* [fi1632/thunk.c] [win32/kernel32.c]
Moved all KERNEL32 ordinal functions to kernel32.c
* [memory/selector.c]
Initialize selectors in AllocSelectorArray.
* [tools/build.c]
Generate C instead of assembly for Win32 relays.
Fixed stack corruption in CallTo16 functions, found by Bertho
Stultiens.
Sun Dec 14 10:55:00 1997 Andreas Mohr <100.30936@germany.net>
* [if1632/Makefile.in] [if1632/builtin.c] [if1632/ole2thk.spec]
Added built-in OLE2THK.DLL.
* [if1632/toolhelp.spec] [include/toolhelp.h] [memory/selector.c]
[misc/toolhelp.c]
Added stubs for StackTraceFirst(), StackTraceCSIPFirst(),
StackTraceNext(), UTSelectorOffsetToLinear()
and UTLinearToSelectorOffset().
Sat Dec 13 17:26:41 1997 Alex Korobka <alex@trantor.pharm.sunysb.edu>
* [misc/winsock.c]
32-bit API fixes for reported problems (thanks to Marcus
and David).
* [graphics/x11drv/xfont.c]
Little tweak in point size calculation.
* [windows/defwnd.c] [windows/dce.c] [windows/winhelp.c]
[windows/winproc.c] [windows/win.c]
Bug fixes.
Sat Dec 13 16:35:14 1997 Kai Morich <kai.morich@rhein-neckar.netsurf.de>
* [files/dos_fs.c]
OpenFile with empty filename and OF_PARSE returns current dir.
* [misc/commdlg.c]
Ignore initial dir if bogus.
* [files/file.c]
Locking an identic region in a file must not be an error.
* [misc/lstr.c]
Use wide char ctype functions.
Fri Dec 12 23:46:22 1997 Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
* [file/drive.c]
First attempt for GetDiskFreeSpaceEx.
Fri Dec 12 23:18:41 1997 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [loader/pe_resource.c]
Fixed wrongly appearing menus problem (only use default lookups in
last resource subtree).
* [multimedia/*.c]
Added win32 support for time* and joy* lowlevel drivers,
(not excessively tested), some misc fixes and cleanups.
* [misc/shellord.c][misc/shell.c][ole/folders.c][ole/ifs.c]
[include/interfaces.h][include/shlobj.h]
Added some more undocumented SHELL32 functions, some shell folder
interface stubs added, SHGetMalloc, SHGetDesktopFolder,
SHGetSpecialFolderLocation, SHGetPathFromIDList stubs added,
IMalloc, IUnknown implemented.
* [windows/msgbox.c]
Implemented MessageBoxIndirect*, some internal changes.
* [if1632/thunk.c]
KERNEL_431 implemented.
* [objects/gdiobj.c]
GetCurrentObject implemented.
Wed Dec 3 01:09:17 1997 Gordon Chaffee <chaffee@apu.cs.berkeley.edu>
* [objects/dib.c]
Fix a couple small DIB problems.
* [controls/edit.c]
Fix a typo.
* [files/dos_fs.c]
Try normal readdir in case fs is specified as vfat but isn't.
* [files/profile.c]
Implementation of WritePrivateProfileSection32A from Uwe Bonnes.
* [misc/printdrv.c]
OpenPrinter32A stub, helps Word97 start.
* [objects/text.c]
Fixup implementation of GetTextCharsetInfo.
* [scheduler/process.c]
Fix environment variable expansion.
* [win32/code_page.c]
Make MultiByteToWideChar and WideCharToMultiByte conform in return
values and error conditions to those in Windows NT 4.0.
* [windows/message.c]
Fix broadcasting problems in Win32. The Win32 docs say to use
HWND_TOPMOST to broadcast to all Win32 Windows.
* [memory/virtual.c] [loader/pe_image.c]
Do not map in VirtualAlloc if address is specified and space is
not available. This is required by Win32.
* [include/pen.h] [include/x11drv.h] [objects/dc.c]
[objects/pen.c] [graphics/x11drv/pen.c]
Support for ExtCreatePen.
Tue Dec 2 20:22:06 1997 Morten Welinder <terra@diku.dk>
* [*/*.c] [*/*.h]
Add lots of prototypes.
* [if1632/kernel32.spec][include/windows.h][include/winnt.h]
[misc/cpu.c]
Define IsProcessorFeaturePresent.
* [misc/crtdll.c]
(CRTDLL__getcwd): Allocate enough memory for the terminating zero.
* [misc/ver.c]
Improve check for null component in _find_data[AW]. Plug leaks
in VerQueryValue*.
* [win32/console.c][if1632/kernel32.spec]
Add stubs for GetConsoleCursorInfo32, SetConsoleCursorInfo32.
* [windows/message.c][if1632/user32.spec][include/windows.h]
Define SendMessageTimeout*.
* [graphics/x11drv/xfont.c]
Change algorithm of __genericCheckSum to be alignment safe.
* [misc/main.c] [misc/winsock.c] [misc/winsock_dns.c]
Include winsock.h early to avoid Solaris problem.
* [include/windows.h]
Undef FSHIFT before we define it.
* [rc/winerc.c]
Include <fcntl.h> instead of <sys/fcntl.h>.
* [files/file.c]
Use strerror in FILE_SetDosError if available.
* [include/config.h.in] [configure.in]
Check for strerror.
* [objects/gdiobj.c]
Make static font structures aligned.
Mon Dec 1 10:10:21 1997 Karl Garrison <karlos@eznet.net>
* [win32/console.c] [if1632/kernel32.spec] [include/windows.h]
Added stub for GetNumberOfConsoleMouseButtons.
Added stub for PeekConsoleInput(A,W).
Fixed parameter list for WriteConsole(A,W).
GetNumberOfConsoleInputEvents now returns 0 events instead of 1
(since low-level console functions are not yet supported).
GetConsoleMode no longer returns ENABLE_WINDOW_INPUT and
ENABLE_MOUSE_INPUT since these are not currently implemented.
1997-12-21 20:17:50 +01:00
|
|
|
{
|
|
|
|
return SetBrushOrgEx(hdc,x,y,oldorg);
|
|
|
|
}
|
|
|
|
|
Release 960728
Sun Jul 28 17:57:19 1996 Alexandre Julliard <julliard@lrc.epfl.ch>
* [loader/task.c] [include/task.h]
Implemented SwitchStackTo()/SwitchStackBack().
* [include/wintypes.h] [loader/main.c]
Added __winelib variable to distinguish between emulator and
library at run-time. Later on, this should avoid some
recompilations when building Winelib.
* [windows/property.c]
Implemented Win32 functions for window properties.
Fri Jul 26 18:00:00 1996 Alex Korobka <alex@phm30.pharm.sunysb.edu>
* [controls/listbox.c]
Implemented LBS_SORT style, WM_COMPAREITEM, and WM_DELETEITEM
messages.
* [controls/menu.c]
Call TranslateMessage() to enable shortcuts (on WM_CHAR).
* [include/cursoricon.h]
Moved #pragma pack(1) back to where it belongs.
* [objects/palette.c]
RealizeDefaultPalette() maps to system colors only.
Do not broadcast palette notifications when in TrueColor.
* [objects/color.c] [include/palette.h]
Miscellaneous optimizations. Had to fix several
"improvements" made to my patch for previous release.
* [objects/dib.c]
Reverse dib bits order for 24-bit SetDIBits().
* [objects/dc.c]
GetDeviceCaps() does not return RC_PALETTE when in TrueColor.
* [windows/scroll.c]
Scroll update region too.
* [windows/message.c]
Include QS_MOUSE into the event mask for nonclient mouse
message filter. Fixes problems with Word 6 freezing when
mouse hits nonclient area.
* [windows/win.c]
Allow top-level windows to be linked as HWND_TOP in CreateWindow().
* [windows/winpos.c] [windows/mdi.c]
Attempt to fix control menu duplication.
Fri Jul 26 09:49:35 1996 Marcus Meissner <msmeissn@cip.informatik.uni-erlangen.de>
* [files/drive.c]
GetDriveType32A(): return value for CDROM fixed.
* [files/file.c]
SearchPath* added.
* [if1632/gdi32.spec] [objects/brush.c]
SetBrushOrgEx() added.
* [loader/pe_resource.c]
If even loading the default entry fails, we just use the first
entry from the resource directory.
[loader/task.c]
SetSigHandler() stub added, Paradox 4.5 now starts up.
* [misc/comm.c] [include/windows.h] [if1632/kernel32.spec]
COMM functions updated to win32, not complete.
* [misc/lstr.c]
FormatMessageA partially implemented.
* [include/miscemu.h] [memory/selector.c]
[memory/global.c] [miscemu/dosmem.c]
DOS memory handling changed: 1MB preallocated block, real-mode
segment handling possible, SetSelectorBase into lower physical 1MB
possible.
* [miscemu/dpmi.c]
Real-mode segments changed, real-mode int 21,ax=6506 added.
AX=0x0303 added.
* [multimedia/time.c]
Fixed bug in killTimer.
* [objects/bitmap.c]
LoadImageA partially implemented.
Wed Jul 24 18:20:24 1996 Albrecht Kleine <kleine@ak.sax.de>
* [include/dde_mem.h][include/dde_proc.h]
[ipc/dde_atom.c][ipc/dde_proc.c][windows/message.c]
[ipc/generic_hash.h][library/miscstubs.c]
Changes for error free compilation using "--with-ipc":
replaced some names with *16-equivalent (e.g. MSG to MSG16),
modified prototype of function DDE_GlobalFree() .
* [objects/palette.c]
Added check for metafile-DC in GDISelectPalette(),
GDIRealizePalette(),RealizeDefaultPalette() and
IsDCCurrentPalette().
Tue Jul 23 22:46:53 1996 Andrew Lewycky <plewycky@oise.utoronto.ca>
* [controls/edit.c]
EDIT_WM_Create: Don't EDIT_EM_ReplaceSel if created with lParam = "",
fixes Winhelp.
* [windows/dialog.c]
DIALOG_CreateIndirect: Initialise dlgProc before creating children.
1996-07-28 20:50:11 +02:00
|
|
|
|
2002-05-31 20:43:22 +02:00
|
|
|
/***********************************************************************
|
2021-07-02 12:38:47 +02:00
|
|
|
* NtGdiSelectBrush (win32u.@)
|
2002-05-31 20:43:22 +02:00
|
|
|
*/
|
2021-07-02 12:38:47 +02:00
|
|
|
HGDIOBJ WINAPI NtGdiSelectBrush( HDC hdc, HGDIOBJ handle )
|
2002-05-31 20:43:22 +02:00
|
|
|
{
|
2007-09-27 20:14:13 +02:00
|
|
|
BRUSHOBJ *brush;
|
|
|
|
HGDIOBJ ret = 0;
|
2021-07-02 12:38:47 +02:00
|
|
|
DC *dc;
|
2002-05-31 20:43:22 +02:00
|
|
|
|
2021-07-02 12:38:47 +02:00
|
|
|
if (!(dc = get_dc_ptr( hdc ))) return 0;
|
2002-05-31 20:43:22 +02:00
|
|
|
|
2009-01-28 16:20:56 +01:00
|
|
|
if ((brush = GDI_GetObjPtr( handle, OBJ_BRUSH )))
|
2007-09-27 20:14:13 +02:00
|
|
|
{
|
2011-03-09 21:19:09 +01:00
|
|
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSelectBrush );
|
2011-12-29 19:49:41 +01:00
|
|
|
struct brush_pattern *pattern = &brush->pattern;
|
2011-03-09 21:19:09 +01:00
|
|
|
|
2012-05-23 21:12:04 +02:00
|
|
|
if (!pattern->info) pattern = NULL;
|
2007-09-27 20:14:13 +02:00
|
|
|
|
2008-02-05 21:17:28 +01:00
|
|
|
GDI_inc_ref_count( handle );
|
|
|
|
GDI_ReleaseObj( handle );
|
|
|
|
|
2011-12-29 19:49:41 +01:00
|
|
|
if (!physdev->funcs->pSelectBrush( physdev, handle, pattern ))
|
2008-02-05 21:17:28 +01:00
|
|
|
{
|
|
|
|
GDI_dec_ref_count( handle );
|
|
|
|
}
|
|
|
|
else
|
2007-09-27 20:57:02 +02:00
|
|
|
{
|
|
|
|
ret = dc->hBrush;
|
|
|
|
dc->hBrush = handle;
|
|
|
|
GDI_dec_ref_count( ret );
|
|
|
|
}
|
2007-09-27 20:14:13 +02:00
|
|
|
}
|
|
|
|
release_dc_ptr( dc );
|
2002-05-31 20:43:22 +02:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
1993-09-04 12:09:32 +02:00
|
|
|
/***********************************************************************
|
|
|
|
* BRUSH_DeleteObject
|
|
|
|
*/
|
2009-01-27 16:19:37 +01:00
|
|
|
static BOOL BRUSH_DeleteObject( HGDIOBJ handle )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
2009-01-28 18:45:21 +01:00
|
|
|
BRUSHOBJ *brush = free_gdi_handle( handle );
|
2002-05-31 20:43:22 +02:00
|
|
|
|
2009-01-27 16:19:37 +01:00
|
|
|
if (!brush) return FALSE;
|
2011-12-29 16:17:44 +01:00
|
|
|
free_brush_pattern( &brush->pattern );
|
2018-01-22 10:53:38 +01:00
|
|
|
HeapFree( GetProcessHeap(), 0, brush );
|
|
|
|
return TRUE;
|
1993-09-04 12:09:32 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
1996-11-02 15:24:07 +01:00
|
|
|
/***********************************************************************
|
2000-03-28 22:22:59 +02:00
|
|
|
* BRUSH_GetObject
|
1996-11-02 15:24:07 +01:00
|
|
|
*/
|
2009-01-27 16:30:43 +01:00
|
|
|
static INT BRUSH_GetObject( HGDIOBJ handle, INT count, LPVOID buffer )
|
1993-09-04 12:09:32 +02:00
|
|
|
{
|
2009-01-28 16:20:56 +01:00
|
|
|
BRUSHOBJ *brush = GDI_GetObjPtr( handle, OBJ_BRUSH );
|
2003-07-26 22:39:46 +02:00
|
|
|
|
2009-01-27 16:30:43 +01:00
|
|
|
if (!brush) return 0;
|
|
|
|
if (buffer)
|
|
|
|
{
|
|
|
|
if (count > sizeof(brush->logbrush)) count = sizeof(brush->logbrush);
|
|
|
|
memcpy( buffer, &brush->logbrush, count );
|
|
|
|
}
|
|
|
|
else count = sizeof(brush->logbrush);
|
|
|
|
GDI_ReleaseObj( handle );
|
1993-09-04 12:09:32 +02:00
|
|
|
return count;
|
|
|
|
}
|