Alexandre Julliard 7ff1c415b4 Release 970525
Tue May 20 19:20:23 1997  Pablo Saratxaga <srtxg@linux.chanae.stben.be>

	* [resources/sysres_Es.rc]
	Updated CHOOSE_FONT, CHOOSE_COLOR, EDITMENU for Spanish.

Mon May 19 22:06:04 1997  Michiel van Loon <mfvl@xs4all.nl>

	* [multimedia/mcistring.c]
	Corrected bug for device!element command.

	* [multimedia/mmaux.c]
	Replaced printf and fprintf calls by dprintf_mmaux.

	* [multimedia/audio.c]
	Corrected debugmessage in wodGetVolume.
	Include code for MCI_CUE command.

	* [multimedia/mmsystem.c]
	Added the MCIERR_SEQ error messages.

	* [if1632/mmsystem.spec] [multimedia/audio.c] [multimedia/mmsystem.c]
	Changed call structure of waveInOpen and waveOutOpen.

	* [multimedia/mmsystem.c] [multimedia/audio.c] [multimedia/midi.c]
	  [multimedia/mmaux.c] [multimedia/mcicda.c] [multimedia/mcianim.c]
	  [multimedia/mcistring.c] [include/mmsystem.h]
	Changed the deviceID scheme.

	* [include/queue.h] [include/win16drv.h] [msdos/dpmi.c]
	  [windows/user.c] [windows/driver.c] [graphic/wing.c]
	  [graphics/x11drv/bitmap.c] [misc/wsprintf.c] [misc/crtdll.c]
	Removed compiler warnings.

Mon May 19 01:32:24 1997  Alex Korobka <alex@trantor.pharm.sunysb.edu>

	* [controls/menu.c] [windows/win.c] [windows/graphics.c]
	Popup menu shade, new system menu implementation, 
	ModifyMenu() fixes, better check mark painting.

	* [windows/mdi.c]
	MDI client fix for Win32.

Sat May 17 12:02:11 1997  Albrecht Kleine  <kleine@ak.sax.de>

	* [objects/metafile.c]
	Added handling of META_DIBBITBLT, META_SETTEXTJUSTIFICATION
	plus bugfix in META_EXTTEXTOUT (start_of_text etc.)

Thu May 15 22:52:00 1997  Jimen Ching  <jching@flex.com>

	* [loader/ne_image.c]
	Make sure dgroup is valid by checking pModule->flags consistently.
1997-05-25 13:58:18 +00:00

85 lines
2.1 KiB
C

/*
* GDI bitmap objects
*
* Copyright 1993 Alexandre Julliard
*/
#include <stdio.h>
#include <stdlib.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include "gdi.h"
#include "callback.h"
#include "dc.h"
#include "bitmap.h"
#include "heap.h"
#include "stddebug.h"
#include "debug.h"
extern void CLIPPING_UpdateGCRegion(DC* );
/***********************************************************************
* X11DRV_BITMAP_Init
*/
BOOL32 X11DRV_BITMAP_Init(void)
{
Pixmap tmpPixmap;
/* Create the necessary GCs */
if ((tmpPixmap = XCreatePixmap( display, rootWindow, 1, 1, 1 )))
{
BITMAP_monoGC = XCreateGC( display, tmpPixmap, 0, NULL );
XSetGraphicsExposures( display, BITMAP_monoGC, False );
XFreePixmap( display, tmpPixmap );
}
if (screenDepth != 1)
{
if ((tmpPixmap = XCreatePixmap(display, rootWindow, 1,1,screenDepth)))
{
BITMAP_colorGC = XCreateGC( display, tmpPixmap, 0, NULL );
XSetGraphicsExposures( display, BITMAP_colorGC, False );
XFreePixmap( display, tmpPixmap );
}
}
return TRUE;
}
/***********************************************************************
* X11DRV_BITMAP_SelectObject
*/
HBITMAP32 X11DRV_BITMAP_SelectObject( DC * dc, HBITMAP32 hbitmap,
BITMAPOBJ * bmp )
{
HRGN32 hrgn;
HBITMAP32 prevHandle = dc->w.hBitmap;
if (!(dc->w.flags & DC_MEMORY)) return 0;
if (dc->w.hVisRgn)
SetRectRgn32( dc->w.hVisRgn, 0, 0,
bmp->bitmap.bmWidth, bmp->bitmap.bmHeight );
else
{
hrgn = CreateRectRgn32(0, 0, bmp->bitmap.bmWidth, bmp->bitmap.bmHeight);
if (!hrgn) return 0;
dc->w.hVisRgn = hrgn;
}
dc->u.x.drawable = bmp->pixmap;
dc->w.hBitmap = hbitmap;
/* Change GC depth if needed */
if (dc->w.bitsPerPixel != bmp->bitmap.bmBitsPixel)
{
XFreeGC( display, dc->u.x.gc );
dc->u.x.gc = XCreateGC( display, dc->u.x.drawable, 0, NULL );
dc->w.bitsPerPixel = bmp->bitmap.bmBitsPixel;
DC_InitDC( dc );
}
else CLIPPING_UpdateGCRegion( dc ); /* Just update GC clip region */
return prevHandle;
}