Release 0.6
Tue Jan 4 13:01:33 1994 David Metcalfe <david@prism.demon.co.uk>
* [window/caret.c]
Modified code to use system timer.
Jan 9, 94 martin2@trgcorp.solucorp.qc.ca (Martin Ayotte)
* [windows/win.c]
Windows create if required new XLIB MenuBar & CaptionBar.
* [windows/defwnd.c]
WM_CALCSIZE Move & Resize caption, menubar & scrollbars.
(I'm not sure it's the good place for it, but it work...)
* [loader/resource.c]
optimize in FindResourceByNumber, make lseek() if next type ...
* [controls/scroll.c]
scrollbar buttons are now using system resources bitmaps.
* [controls/caption.c] - new file ...
captionbar showing title, close button with SysMenu,
and other buttons using system resources bitmaps.
* [controls/menu.c]
New functions: SetMenuItemBitmaps() with 'glues',
Make new version of LoadMenu() & ParseMenu(),
( put #define USE_POPUPMENU ).
Implementation of MenuBar functions.
* [sysres.dll]
New bitmaps for system such OBM_CLOSE, OBM_MINIMIZE, OBM_UPARROWI.
New SYSMENU menu, it don't work yet ! :-((
Tue Jan 11 05:27:45 1994 julliard@di.epfl.ch (Alexandre Julliard
* [memory/atom.c]
Fixed a bug that could cause atoms to be case-sensitive.
* [misc/rect.c]
Bug fix in SubtractRect().
* [objects/clipping.c]
Bug fix when setting the clip mask to an empty region.
* [windows/dce.c]
Bug fix in ReleaseDC().
* [windows/dialog.c]
Call AdjustWindowRectEx() before creating the dialog window.
Added support for DS_MODALFRAME style.
* [windows/event.c]
Cleaned up event handling and removed old Xt stuff.
Moved double-click handling to windows/message.c
* [windows/focus.c]
Bug fix: only set the X focus when the window is viewable.
* [windows/graphics.c]
Rewritten DrawReliefRect() to use brush instead of pen, and
to use the system colors.
* [windows/message.c]
Implemented WM_NCHITTEST message sending, and non-client
mouse messages.
Cleaned up double-click handling, and removed the Xt code.
* [windows/nonclient.c] (New file)
Implemented AdjustWindowRect().
Implemented WM_NCCALCSIZE, WM_NCHITTEST and WM_NCPAINT handling.
* [windows/painting.c]
Added sending of the WM_NCPAINT message in BeginPaint().
* [windows/sysmetrics.c] [include/sysmetrics.h] (New files)
Implemented system metrics.
* [windows/win.c]
Bug fix in setting the parent and owner in CreateWindow().
Removed the Xt code.
* [windows/winpos.c]
Added sending of the WM_NCPAINT message in SetWindowPos().
Removed the Xt code.
diff --git a/objects/brush.c b/objects/brush.c
index 11a430b..582349e 100644
--- a/objects/brush.c
+++ b/objects/brush.c
@@ -8,8 +8,6 @@
#include "gdi.h"
-extern Display * XT_display;
-extern Screen * XT_screen;
#define NB_HATCH_STYLES 6
diff --git a/objects/clipping.c b/objects/clipping.c
index 5776eb8..7504b12 100644
--- a/objects/clipping.c
+++ b/objects/clipping.c
@@ -20,15 +20,22 @@
if (dc->w.hGCClipRgn)
{
RGNOBJ *obj = (RGNOBJ *) GDI_GetObjPtr(dc->w.hGCClipRgn, REGION_MAGIC);
- XSetClipMask( XT_display, dc->u.x.gc, obj->region.pixmap );
- XSetClipOrigin( XT_display, dc->u.x.gc,
- dc->w.DCOrgX + obj->region.box.left,
- dc->w.DCOrgY + obj->region.box.top );
+ if (obj->region.pixmap)
+ {
+ XSetClipMask( display, dc->u.x.gc, obj->region.pixmap );
+ XSetClipOrigin( display, dc->u.x.gc,
+ dc->w.DCOrgX + obj->region.box.left,
+ dc->w.DCOrgY + obj->region.box.top );
+ }
+ else /* Clip everything */
+ {
+ XSetClipRectangles( display, dc->u.x.gc, 0, 0, NULL, 0, 0 );
+ }
}
else
{
- XSetClipMask( XT_display, dc->u.x.gc, None );
- XSetClipOrigin( XT_display, dc->u.x.gc, dc->w.DCOrgX, dc->w.DCOrgY );
+ XSetClipMask( display, dc->u.x.gc, None );
+ XSetClipOrigin( display, dc->u.x.gc, dc->w.DCOrgX, dc->w.DCOrgY );
}
}
diff --git a/objects/dib.c b/objects/dib.c
index 735e449..15e3d09 100644
--- a/objects/dib.c
+++ b/objects/dib.c
@@ -44,7 +44,7 @@
XImage * image;
int bytesPerLine = (bmp->biWidth * bmp->biBitCount + 31) / 32 * 4;
- image = XCreateImage( XT_display, DefaultVisualOfScreen( XT_screen ),
+ image = XCreateImage( display, DefaultVisualOfScreen( screen ),
bmp->biBitCount, ZPixmap, 0, bmpData,
bmp->biWidth, bmp->biHeight, 32, bytesPerLine );
if (!image) return 0;
diff --git a/objects/font.c b/objects/font.c
index 10bc76b..8345e0b 100644
--- a/objects/font.c
+++ b/objects/font.c
@@ -11,9 +11,6 @@
#include <X11/Xatom.h>
#include "gdi.h"
-extern Display * XT_display;
-extern Screen * XT_screen;
-
/***********************************************************************
* FONT_MatchFont
diff --git a/objects/gdiobj.c b/objects/gdiobj.c
index cc539a4..1b98fc8 100644
--- a/objects/gdiobj.c
+++ b/objects/gdiobj.c
@@ -8,8 +8,6 @@
#include "gdi.h"
-extern Display * XT_display;
-extern Screen * XT_screen;
MDESC *GDI_Heap = NULL;
diff --git a/objects/linedda.c b/objects/linedda.c
index 6d8a1cfe..e61290d 100644
--- a/objects/linedda.c
+++ b/objects/linedda.c
@@ -7,7 +7,7 @@
static char Copyright[] = "Copyright Bob Amstadt, 1993";
#include <stdlib.h>
-#include "win.h"
+#include "windows.h"
/**********************************************************************
* LineDDA (GDI.100)
diff --git a/objects/palette.c b/objects/palette.c
index 511cf3f..f107a61 100644
--- a/objects/palette.c
+++ b/objects/palette.c
@@ -18,9 +18,6 @@
#include "gdi.h"
-extern Display * XT_display;
-extern Screen * XT_screen;
-
extern Colormap COLOR_WinColormap;
GDIOBJHDR * PALETTE_systemPalette;
@@ -36,7 +33,7 @@
HPALETTE hpalette;
LOGPALETTE * palPtr;
- size = DefaultVisual( XT_display, DefaultScreen(XT_display) )->map_entries;
+ size = DefaultVisual( display, DefaultScreen(display) )->map_entries;
palPtr = malloc( sizeof(LOGPALETTE) + (size-1)*sizeof(PALETTEENTRY) );
if (!palPtr) return FALSE;
palPtr->palVersion = 0x300;
@@ -46,7 +43,7 @@
for (i = 0; i < size; i++)
{
color.pixel = i;
- XQueryColor( XT_display, COLOR_WinColormap, &color );
+ XQueryColor( display, COLOR_WinColormap, &color );
palPtr->palPalEntry[i].peRed = color.red >> 8;
palPtr->palPalEntry[i].peGreen = color.green >> 8;
palPtr->palPalEntry[i].peBlue = color.blue >> 8;
@@ -132,7 +129,7 @@
palPtr = (PALETTEOBJ *) GDI_GetObjPtr( hpalette, PALETTE_MAGIC );
if (!palPtr) return 0;
- if ((COLOR_WinColormap != DefaultColormapOfScreen(XT_screen)) &&
+ if ((COLOR_WinColormap != DefaultColormapOfScreen(screen)) &&
(hpalette == STOCK_DEFAULT_PALETTE))
{
if ((color & 0xffffff) == 0) return 0; /* Entry 0 is black */
diff --git a/objects/pen.c b/objects/pen.c
index fa49ef3..a0a7ad7 100644
--- a/objects/pen.c
+++ b/objects/pen.c
@@ -8,9 +8,6 @@
#include "gdi.h"
-extern Display * XT_display;
-extern Screen * XT_screen;
-
/***********************************************************************
* CreatePen (GDI.61)
diff --git a/objects/text.c b/objects/text.c
index 07aef58..787b0f7 100644
--- a/objects/text.c
+++ b/objects/text.c
@@ -6,15 +6,8 @@
static char Copyright[] = "Copyright Alexandre Julliard, 1993";
-#include <X11/Intrinsic.h>
-#include <X11/StringDefs.h>
-#include <X11/Core.h>
-#include <X11/Shell.h>
#include <X11/Xatom.h>
-#include "message.h"
-#include "callback.h"
-#include "win.h"
#include "gdi.h"
#define TAB 9
@@ -224,8 +217,8 @@
if (flags & DT_SINGLELINE)
{
- if (flags & DT_VCENTER) y = (rect->top + rect->bottom -
- size.cy) / 2;
+ if (flags & DT_VCENTER) y = rect->top +
+ (rect->bottom - rect->top) / 2 - size.cy / 2;
else if (flags & DT_BOTTOM) y = rect->bottom - size.cy;
}