gdk/win32/gdkgc-win32.c Remove gcc -Wall warnings.

2000-10-22  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/gdkgc-win32.c
	* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.

	Patches by Hans Breuer:

	* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
	SetBkMode() and SetTextAlign() before calling
	pango_win32_render().

	* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
	Set hcliprgn to NULL after destroying it.
	(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.

	* gdk/win32/gdkgeometry-win32.c
	(_gdk_windowing_window_queue_antiexpose): More effective
	implementation.

	* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
	depth as default, not the visual's.

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
	against empty title.

	* gdk/win32/gdkprivate-win32.h: Define a helper macro,
	IMAGE_PRIVATE_DATA.

	* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
This commit is contained in:
Tor Lillqvist 2000-10-22 17:16:42 +00:00 committed by Tor Lillqvist
parent 5fd61965e4
commit f49a2a0055
14 changed files with 294 additions and 44 deletions

View File

@ -1,5 +1,8 @@
2000-10-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.
* gtk/makefile.mingw.in
* gtk/gtk.def: Updates.
@ -20,6 +23,31 @@
* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
something even if not implemented, to satisfy picky MSVC.
Patches by Hans Breuer:
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
SetBkMode() and SetTextAlign() before calling
pango_win32_render().
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
Set hcliprgn to NULL after destroying it.
(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.
* gdk/win32/gdkgeometry-win32.c
(_gdk_windowing_window_queue_antiexpose): More effective
implementation.
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
depth as default, not the visual's.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
against empty title.
* gdk/win32/gdkprivate-win32.h: Define a helper macro,
IMAGE_PRIVATE_DATA.
* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
2000-10-22 Robert Brady <robert@suse.co.uk>
* configure.in: Check for bind_textdomain_codeset

View File

@ -1,5 +1,8 @@
2000-10-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.
* gtk/makefile.mingw.in
* gtk/gtk.def: Updates.
@ -20,6 +23,31 @@
* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
something even if not implemented, to satisfy picky MSVC.
Patches by Hans Breuer:
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
SetBkMode() and SetTextAlign() before calling
pango_win32_render().
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
Set hcliprgn to NULL after destroying it.
(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.
* gdk/win32/gdkgeometry-win32.c
(_gdk_windowing_window_queue_antiexpose): More effective
implementation.
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
depth as default, not the visual's.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
against empty title.
* gdk/win32/gdkprivate-win32.h: Define a helper macro,
IMAGE_PRIVATE_DATA.
* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
2000-10-22 Robert Brady <robert@suse.co.uk>
* configure.in: Check for bind_textdomain_codeset

View File

@ -1,5 +1,8 @@
2000-10-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.
* gtk/makefile.mingw.in
* gtk/gtk.def: Updates.
@ -20,6 +23,31 @@
* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
something even if not implemented, to satisfy picky MSVC.
Patches by Hans Breuer:
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
SetBkMode() and SetTextAlign() before calling
pango_win32_render().
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
Set hcliprgn to NULL after destroying it.
(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.
* gdk/win32/gdkgeometry-win32.c
(_gdk_windowing_window_queue_antiexpose): More effective
implementation.
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
depth as default, not the visual's.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
against empty title.
* gdk/win32/gdkprivate-win32.h: Define a helper macro,
IMAGE_PRIVATE_DATA.
* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
2000-10-22 Robert Brady <robert@suse.co.uk>
* configure.in: Check for bind_textdomain_codeset

View File

@ -1,5 +1,8 @@
2000-10-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.
* gtk/makefile.mingw.in
* gtk/gtk.def: Updates.
@ -20,6 +23,31 @@
* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
something even if not implemented, to satisfy picky MSVC.
Patches by Hans Breuer:
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
SetBkMode() and SetTextAlign() before calling
pango_win32_render().
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
Set hcliprgn to NULL after destroying it.
(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.
* gdk/win32/gdkgeometry-win32.c
(_gdk_windowing_window_queue_antiexpose): More effective
implementation.
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
depth as default, not the visual's.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
against empty title.
* gdk/win32/gdkprivate-win32.h: Define a helper macro,
IMAGE_PRIVATE_DATA.
* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
2000-10-22 Robert Brady <robert@suse.co.uk>
* configure.in: Check for bind_textdomain_codeset

View File

@ -1,5 +1,8 @@
2000-10-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.
* gtk/makefile.mingw.in
* gtk/gtk.def: Updates.
@ -20,6 +23,31 @@
* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
something even if not implemented, to satisfy picky MSVC.
Patches by Hans Breuer:
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
SetBkMode() and SetTextAlign() before calling
pango_win32_render().
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
Set hcliprgn to NULL after destroying it.
(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.
* gdk/win32/gdkgeometry-win32.c
(_gdk_windowing_window_queue_antiexpose): More effective
implementation.
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
depth as default, not the visual's.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
against empty title.
* gdk/win32/gdkprivate-win32.h: Define a helper macro,
IMAGE_PRIVATE_DATA.
* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
2000-10-22 Robert Brady <robert@suse.co.uk>
* configure.in: Check for bind_textdomain_codeset

View File

@ -1,5 +1,8 @@
2000-10-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.
* gtk/makefile.mingw.in
* gtk/gtk.def: Updates.
@ -20,6 +23,31 @@
* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
something even if not implemented, to satisfy picky MSVC.
Patches by Hans Breuer:
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
SetBkMode() and SetTextAlign() before calling
pango_win32_render().
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
Set hcliprgn to NULL after destroying it.
(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.
* gdk/win32/gdkgeometry-win32.c
(_gdk_windowing_window_queue_antiexpose): More effective
implementation.
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
depth as default, not the visual's.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
against empty title.
* gdk/win32/gdkprivate-win32.h: Define a helper macro,
IMAGE_PRIVATE_DATA.
* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
2000-10-22 Robert Brady <robert@suse.co.uk>
* configure.in: Check for bind_textdomain_codeset

View File

@ -1,5 +1,8 @@
2000-10-22 Tor Lillqvist <tml@iki.fi>
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c: Remove gcc -Wall warnings.
* gtk/makefile.mingw.in
* gtk/gtk.def: Updates.
@ -20,6 +23,31 @@
* gtk/gtktextbtree.c (gtk_text_line_char_to_byte): Return
something even if not implemented, to satisfy picky MSVC.
Patches by Hans Breuer:
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_glyphs): Call
SetBkMode() and SetTextAlign() before calling
pango_win32_render().
* gdk/win32/gdkgc-win32.c (gdk_win32_gc_values_to_win32values):
Set hcliprgn to NULL after destroying it.
(gdk_gc_set_clip_rectangle): Delete hcliprgn and set to NULL.
* gdk/win32/gdkgeometry-win32.c
(_gdk_windowing_window_queue_antiexpose): More effective
implementation.
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_new): Use drawable's
depth as default, not the visual's.
* gdk/win32/gdkwindow-win32.c (gdk_window_set_title): Guard
against empty title.
* gdk/win32/gdkprivate-win32.h: Define a helper macro,
IMAGE_PRIVATE_DATA.
* gdk/win32/gdkimage-win32.c (gdk_image_get_type): Use it.
2000-10-22 Robert Brady <robert@suse.co.uk>
* configure.in: Check for bind_textdomain_codeset

View File

@ -885,6 +885,14 @@ gdk_win32_draw_glyphs (GdkDrawable *drawable,
hdc = gdk_win32_hdc_get (drawable, gc, mask);
/* HB: Maybe there should be a GDK_GC_PANGO flag for hdc_get */
/* default write mode is transparent (leave background) */
if (SetBkMode (hdc, TRANSPARENT) == 0)
WIN32_GDI_FAILED ("SetBkMode");
if (GDI_ERROR == SetTextAlign (hdc, TA_LEFT|TA_BOTTOM|TA_NOUPDATECP))
WIN32_GDI_FAILED ("SetTextAlign");
pango_win32_render (hdc, font, glyphs, x, y);
gdk_win32_hdc_release (drawable, gc, mask);

View File

@ -35,7 +35,6 @@
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
static void gdk_win32_gc_destroy (GdkGC *gc);
static void gdk_win32_gc_get_values (GdkGC *gc,
GdkGCValues *values);
static void gdk_win32_gc_set_values (GdkGC *gc,
@ -128,7 +127,7 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
{
win32_gc->foreground = values->foreground.pixel;
win32_gc->values_mask |= GDK_GC_FOREGROUND;
GDK_NOTE (MISC, (g_print ("fg=%.06x", win32_gc->foreground),
GDK_NOTE (MISC, (g_print ("fg=%.06lx", win32_gc->foreground),
s = ","));
}
@ -136,7 +135,7 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
{
win32_gc->background = values->background.pixel;
win32_gc->values_mask |= GDK_GC_BACKGROUND;
GDK_NOTE (MISC, (g_print ("%sbg=%.06x", s, win32_gc->background),
GDK_NOTE (MISC, (g_print ("%sbg=%.06lx", s, win32_gc->background),
s = ","));
}
@ -160,7 +159,7 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
else
{
win32_gc->values_mask &= ~GDK_GC_FONT;
GDK_NOTE (MISC, (g_print ("%sfont=NULL"),
GDK_NOTE (MISC, (g_print ("%sfont=NULL", s),
s = ","));
}
}
@ -256,9 +255,10 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
{
gdk_drawable_ref (win32_gc->tile);
win32_gc->values_mask |= GDK_GC_TILE;
GDK_NOTE (MISC, (g_print ("%stile=%#x", s,
GDK_PIXMAP_HBITMAP (win32_gc->tile)),
s = ","));
GDK_NOTE (MISC,
(g_print ("%stile=%#x", s,
(guint) GDK_PIXMAP_HBITMAP (win32_gc->tile)),
s = ","));
}
else
{
@ -306,9 +306,10 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
else
gdk_drawable_ref (win32_gc->stipple);
win32_gc->values_mask |= GDK_GC_STIPPLE;
GDK_NOTE (MISC, (g_print ("%sstipple=%#x", s,
GDK_PIXMAP_HBITMAP (win32_gc->stipple)),
s = ","));
GDK_NOTE (MISC,
(g_print ("%sstipple=%#x", s,
(guint) GDK_PIXMAP_HBITMAP (win32_gc->stipple)),
s = ","));
}
else
{
@ -325,8 +326,12 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
gdk_region_destroy (win32_gc->clip_region);
win32_gc->clip_region = NULL;
}
if (win32_gc->hcliprgn != NULL)
DeleteObject (win32_gc->hcliprgn);
{
DeleteObject (win32_gc->hcliprgn);
win32_gc->hcliprgn = NULL;
}
if (values->clip_mask != NULL)
{
@ -342,7 +347,7 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
win32_gc->hcliprgn = NULL;
win32_gc->values_mask &= ~GDK_GC_CLIP_MASK;
}
GDK_NOTE (MISC, (g_print ("%sclip=%#x", s, win32_gc->hcliprgn),
GDK_NOTE (MISC, (g_print ("%sclip=%#x", s, (guint) win32_gc->hcliprgn),
s = ","));
}
@ -691,14 +696,19 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
win32_gc = GDK_GC_WIN32 (gc);
if (win32_gc->hcliprgn)
{
DeleteObject (win32_gc->hcliprgn);
win32_gc->hcliprgn = NULL;
}
if (win32_gc->clip_region)
gdk_region_destroy (win32_gc->clip_region);
if (rectangle)
{
GDK_NOTE (MISC,
g_print ("gdk_gc_set_clip_rectangle: (%d) %dx%d@+%d+%d\n",
win32_gc,
g_print ("gdk_gc_set_clip_rectangle: %dx%d@+%d+%d\n",
rectangle->width, rectangle->height,
rectangle->x, rectangle->y));
win32_gc->clip_region = gdk_region_rectangle (rectangle);
@ -706,8 +716,8 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
}
else
{
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_rectangle: (%d) NULL\n",
win32_gc));
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_rectangle: NULL\n"));
win32_gc->clip_region = NULL;
win32_gc->values_mask &= ~GDK_GC_CLIP_MASK;
}
@ -729,18 +739,18 @@ gdk_gc_set_clip_region (GdkGC *gc,
if (region)
{
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_region: %d %dx%d+%d+%d\n",
win32_gc,
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_region: %dx%d+%d+%d\n",
region->extents.x2 - region->extents.x1,
region->extents.y2 - region->extents.y1,
region->extents.x1, region->extents.y1));
win32_gc->clip_region = gdk_region_copy (region);
win32_gc->values_mask |= GDK_GC_CLIP_MASK;
}
else
{
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_region: %d NULL\n",
win32_gc));
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_region: NULL\n"));
win32_gc->clip_region = NULL;
win32_gc->values_mask &= ~GDK_GC_CLIP_MASK;
}
@ -757,8 +767,6 @@ gdk_gc_copy (GdkGC *dst_gc,
{
GdkGCWin32 *dst_win32_gc;
GdkGCWin32 *src_win32_gc;
DWORD nbytes;
LPRGNDATA rgn;
g_return_if_fail (GDK_IS_GC_WIN32 (dst_gc));
g_return_if_fail (GDK_IS_GC_WIN32 (src_gc));
@ -774,9 +782,19 @@ gdk_gc_copy (GdkGC *dst_gc,
gdk_drawable_unref (dst_win32_gc->stipple);
if (dst_win32_gc->clip_region != NULL)
gdk_region_destroy (dst_win32_gc->clip_region);
if (dst_win32_gc->hcliprgn != NULL)
DeleteObject (dst_win32_gc->hcliprgn);
*dst_win32_gc = *src_win32_gc;
if (dst_win32_gc->hcliprgn)
{
/* create a new region, to copy to */
dst_win32_gc->hcliprgn = CreateRectRgn(0,0,1,1);
/* overwrite from source */
CombineRgn (dst_win32_gc->hcliprgn, src_win32_gc->hcliprgn,
NULL, RGN_COPY);
}
if (dst_win32_gc->clip_region != NULL)
dst_win32_gc->clip_region = gdk_region_copy (dst_win32_gc->clip_region);
if (dst_win32_gc->font != NULL)
@ -802,6 +820,8 @@ gdk_colormap_color (GdkColormap *colormap,
colormap_private = GDK_COLORMAP_PRIVATE_DATA (colormap);
g_return_val_if_fail(colormap_private != NULL, RGB (0,0,0));
if (colormap_private->xcolormap->rc_palette)
return PALETTEINDEX (pixel);
@ -862,7 +882,10 @@ predraw_set_foreground (GdkGC *gc,
else
{
colormap_private = GDK_COLORMAP_PRIVATE_DATA (colormap);
if (colormap_private->xcolormap->rc_palette)
/* maybe this should bail out with g_return_if_fail
* (colormap_private != NULL) ?
*/
if (colormap_private && colormap_private->xcolormap->rc_palette)
{
int k;
if (SelectPalette (win32_gc->hdc, colormap_private->xcolormap->palette,
@ -938,8 +961,6 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
GdkGCValuesMask usage)
{
GdkGCWin32 *win32_gc = (GdkGCWin32 *) gc;
GdkColormapPrivateWin32 *colormap_private =
(GdkColormapPrivateWin32 *) GDK_DRAWABLE_IMPL_WIN32 (drawable)->colormap;
gboolean ok = TRUE;
int flag;
@ -1023,7 +1044,7 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
rect->bottom = CLAMP (boxes[i].y2 + gc->clip_y_origin,
G_MINSHORT, G_MAXSHORT);
GDK_NOTE (MISC, g_print ("clip rgn box %d: %dx%d@+%d+%d\n",
GDK_NOTE (MISC, g_print ("clip rgn box %d: %ldx%ld@+%ld+%ld\n",
i,
rect->right-rect->left,
rect->bottom-rect->top,
@ -1063,10 +1084,10 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
HRGN hrgn;
RECT rect;
g_print ("gdk_win32_hdc_get: %d: %#x\n", win32_gc, win32_gc->hdc);
g_print ("gdk_win32_hdc_get: %#x\n", (guint) win32_gc->hdc);
obj = GetCurrentObject (win32_gc->hdc, OBJ_BRUSH);
GetObject (obj, sizeof (LOGBRUSH), &logbrush);
g_print ("brush: style: %s color: %.06x hatch: %#x\n",
g_print ("brush: style: %s color: %.06lx hatch: %#lx\n",
(logbrush.lbStyle == BS_HOLLOW ? "HOLLOW" :
(logbrush.lbStyle == BS_PATTERN ? "PATTERN" :
(logbrush.lbStyle == BS_SOLID ? "SOLID" :
@ -1111,7 +1132,7 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
else if (flag == 1)
{
GetRgnBox (hrgn, &rect);
g_print ("clip region bbox: %dx%d@+%d+%d\n",
g_print ("clip region bbox: %ldx%ld@+%ld+%ld\n",
rect.right - rect.left,
rect.bottom - rect.top,
rect.left, rect.top);

View File

@ -695,6 +695,7 @@ gboolean
_gdk_windowing_window_queue_antiexpose (GdkWindow *window,
GdkRegion *area)
{
#if 0
GdkWindowQueueItem *item = g_new (GdkWindowQueueItem, 1);
item->window = window;
@ -713,6 +714,25 @@ _gdk_windowing_window_queue_antiexpose (GdkWindow *window,
translate_queue = g_slist_append (translate_queue, item);
return TRUE;
#else
GdkRectangle r;
HRGN hrgn;
gdk_region_get_clipbox (area, &r);
hrgn = CreateRectRgn(r.x, r.y, r.width+1, r.height+1);
g_return_val_if_fail (area != NULL, FALSE);
GDK_NOTE (MISC, g_print ("_gdk_windowing_window_queue_antiexpose %#x\n",
(guint) GDK_WINDOW_HWND (window)));
/* HB: not quite sure if this is the right thing to do.
* (Region not to be proceesed by next WM_PAINT)
*/
ValidateRgn(GDK_WINDOW_HWND (window), hrgn);
DeleteObject(hrgn);
return TRUE;
#endif
}
void

View File

@ -42,8 +42,6 @@ static void gdk_image_init (GdkImage *image);
static void gdk_image_class_init (GdkImageClass *klass);
static void gdk_image_finalize (GObject *object);
#define PRIVATE_DATA(image) ((GdkImagePrivateWin32 *) GDK_IMAGE (image)->windowing_data)
GType
gdk_image_get_type (void)
{
@ -134,7 +132,7 @@ gdk_image_new_bitmap (GdkVisual *visual,
int bpl32 = ((w-1)/32 + 1)*4;
image = g_object_new (gdk_image_get_type (), NULL);
private = PRIVATE_DATA (image);
private = IMAGE_PRIVATE_DATA (image);
image->type = GDK_IMAGE_SHARED;
image->visual = visual;
@ -221,7 +219,7 @@ gdk_image_new (GdkImageType type,
"???")));
image = g_object_new (gdk_image_get_type (), NULL);
private = PRIVATE_DATA (image);
private = IMAGE_PRIVATE_DATA (image);
image->type = type;
image->visual = visual;
@ -315,8 +313,8 @@ gdk_image_new (GdkImageType type,
else
image->bpl = ((width*image->bpp - 1)/4 + 1)*4;
GDK_NOTE (MISC, g_print ("... = %#x mem = %#x, bpl = %d\n",
private->hbitmap, image->mem, image->bpl));
GDK_NOTE (MISC, g_print ("... = %#x mem = %p, bpl = %d\n",
(guint) private->hbitmap, image->mem, image->bpl));
return image;
}
@ -350,10 +348,11 @@ gdk_image_get (GdkWindow *window,
return NULL;
GDK_NOTE (MISC, g_print ("gdk_image_get: %#x %dx%d@+%d+%d\n",
GDK_DRAWABLE_HANDLE (window), width, height, x, y));
(guint) GDK_DRAWABLE_HANDLE (window),
width, height, x, y));
image = g_object_new (gdk_image_get_type (), NULL);
private = PRIVATE_DATA (image);
private = IMAGE_PRIVATE_DATA (image);
image->type = GDK_IMAGE_SHARED;
image->visual = gdk_drawable_get_visual (window);
@ -380,7 +379,7 @@ gdk_image_get (GdkWindow *window,
}
GetObject (GDK_PIXMAP_HBITMAP (window), sizeof (BITMAP), &bm);
GDK_NOTE (MISC,
g_print ("gdk_image_get: bmWidth = %d, bmHeight = %d, bmWidthBytes = %d, bmBitsPixel = %d\n",
g_print ("gdk_image_get: bmWidth:%ld bmHeight:%ld bmWidthBytes:%ld bmBitsPixel:%d\n",
bm.bmWidth, bm.bmHeight, bm.bmWidthBytes, bm.bmBitsPixel));
image->depth = bm.bmBitsPixel;
if (image->depth <= 8)
@ -554,8 +553,8 @@ gdk_image_get (GdkWindow *window,
else
image->bpl = ((width*image->bpp - 1)/4 + 1)*4;
GDK_NOTE (MISC, g_print ("... = %#x mem = %#x, bpl = %d\n",
private->hbitmap, image->mem, image->bpl));
GDK_NOTE (MISC, g_print ("... = %#x mem = %p, bpl = %d\n",
(guint) private->hbitmap, image->mem, image->bpl));
return image;
}
@ -644,7 +643,7 @@ gdk_win32_image_destroy (GdkImage *image)
g_return_if_fail (GDK_IS_IMAGE (image));
private = PRIVATE_DATA (image);
private = IMAGE_PRIVATE_DATA (image);
if (private == NULL) /* This means that gdk_image_exit() destroyed the
* image already, and now we're called a second
@ -652,8 +651,8 @@ gdk_win32_image_destroy (GdkImage *image)
*/
return;
GDK_NOTE (MISC, g_print ("gdk_win32_image_destroy: %#x%s\n",
private->hbitmap));
GDK_NOTE (MISC, g_print ("gdk_win32_image_destroy: %#x\n",
(guint) private->hbitmap));
switch (image->type)
{

View File

@ -178,7 +178,7 @@ gdk_pixmap_new (GdkWindow *window,
visual = gdk_drawable_get_visual (window);
if (depth == -1)
depth = visual->depth;
depth = gdk_drawable_get_depth (GDK_DRAWABLE (window));
GDK_NOTE (MISC, g_print ("gdk_pixmap_new: %dx%dx%d\n",
width, height, depth));

View File

@ -127,4 +127,6 @@ extern DWORD windows_version;
extern gint gdk_input_ignore_wintab;
#define IMAGE_PRIVATE_DATA(image) ((GdkImagePrivateWin32 *) GDK_IMAGE (image)->windowing_data)
#endif /* __GDK_PRIVATE_WIN32_H__ */

View File

@ -1369,6 +1369,10 @@ gdk_window_set_title (GdkWindow *window,
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (title != NULL);
/* Empty window titles not allowed, so set it to just a period. */
if (!title[0])
title = ".";
GDK_NOTE (MISC, g_print ("gdk_window_set_title: %#x %s\n",
GDK_WINDOW_HWND (window), title));