Use -Wall. Add gdkpango-win32.o

2000-09-07  Tor Lillqvist  <tml@iki.fi>

	* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o

	* gdk/win32/gdkwin32.h: Add more definitions missing from the free
	w32api headers.

	* gdk/win32/gdkprivate-win32.h: Add a couple of missing
	declarations.

	* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
	(gdk_win32_get_colormap): A line had been deleted by mistake.

	* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
	(gdk_event_translate): Handle more virtual keycodes to be able to
	generate GDK events for Control-comma, Control-period, etc.

	* gtk/gtk.def: Add some missing entry points.

2000-09-07  Tor Lillqvist  <tml@iki.fi>

	* makefile.mingw.in: Use own version number for gdk-pixbuf DLLs,
	like on Unix.
This commit is contained in:
Tor Lillqvist 2000-09-07 19:51:32 +00:00 committed by Tor Lillqvist
parent 2bcef62f0b
commit 6ffe1dcf10
15 changed files with 388 additions and 183 deletions

View File

@ -1,3 +1,22 @@
2000-09-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o
* gdk/win32/gdkwin32.h: Add more definitions missing from the free
w32api headers.
* gdk/win32/gdkprivate-win32.h: Add a couple of missing
declarations.
* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
(gdk_win32_get_colormap): A line had been deleted by mistake.
* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
(gdk_event_translate): Handle more virtual keycodes to be able to
generate GDK events for Control-comma, Control-period, etc.
* gtk/gtk.def: Add some missing entry points.
Thu Sep 7 11:47:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:

View File

@ -1,3 +1,22 @@
2000-09-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o
* gdk/win32/gdkwin32.h: Add more definitions missing from the free
w32api headers.
* gdk/win32/gdkprivate-win32.h: Add a couple of missing
declarations.
* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
(gdk_win32_get_colormap): A line had been deleted by mistake.
* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
(gdk_event_translate): Handle more virtual keycodes to be able to
generate GDK events for Control-comma, Control-period, etc.
* gtk/gtk.def: Add some missing entry points.
Thu Sep 7 11:47:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:

View File

@ -1,3 +1,22 @@
2000-09-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o
* gdk/win32/gdkwin32.h: Add more definitions missing from the free
w32api headers.
* gdk/win32/gdkprivate-win32.h: Add a couple of missing
declarations.
* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
(gdk_win32_get_colormap): A line had been deleted by mistake.
* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
(gdk_event_translate): Handle more virtual keycodes to be able to
generate GDK events for Control-comma, Control-period, etc.
* gtk/gtk.def: Add some missing entry points.
Thu Sep 7 11:47:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:

View File

@ -1,3 +1,22 @@
2000-09-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o
* gdk/win32/gdkwin32.h: Add more definitions missing from the free
w32api headers.
* gdk/win32/gdkprivate-win32.h: Add a couple of missing
declarations.
* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
(gdk_win32_get_colormap): A line had been deleted by mistake.
* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
(gdk_event_translate): Handle more virtual keycodes to be able to
generate GDK events for Control-comma, Control-period, etc.
* gtk/gtk.def: Add some missing entry points.
Thu Sep 7 11:47:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:

View File

@ -1,3 +1,22 @@
2000-09-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o
* gdk/win32/gdkwin32.h: Add more definitions missing from the free
w32api headers.
* gdk/win32/gdkprivate-win32.h: Add a couple of missing
declarations.
* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
(gdk_win32_get_colormap): A line had been deleted by mistake.
* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
(gdk_event_translate): Handle more virtual keycodes to be able to
generate GDK events for Control-comma, Control-period, etc.
* gtk/gtk.def: Add some missing entry points.
Thu Sep 7 11:47:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:

View File

@ -1,3 +1,22 @@
2000-09-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o
* gdk/win32/gdkwin32.h: Add more definitions missing from the free
w32api headers.
* gdk/win32/gdkprivate-win32.h: Add a couple of missing
declarations.
* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
(gdk_win32_get_colormap): A line had been deleted by mistake.
* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
(gdk_event_translate): Handle more virtual keycodes to be able to
generate GDK events for Control-comma, Control-period, etc.
* gtk/gtk.def: Add some missing entry points.
Thu Sep 7 11:47:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:

View File

@ -1,3 +1,22 @@
2000-09-07 Tor Lillqvist <tml@iki.fi>
* gdk/win32/makefile.mingw.in: Use -Wall. Add gdkpango-win32.o
* gdk/win32/gdkwin32.h: Add more definitions missing from the free
w32api headers.
* gdk/win32/gdkprivate-win32.h: Add a couple of missing
declarations.
* gdk/win32/gdkdrawable-win32.c: Remove gcc -Wall warnings.
(gdk_win32_get_colormap): A line had been deleted by mistake.
* gdk/win32/gdkevents-win32.c: Remove lint (gcc -Wall) here, too.
(gdk_event_translate): Handle more virtual keycodes to be able to
generate GDK events for Control-comma, Control-period, etc.
* gtk/gtk.def: Add some missing entry points.
Thu Sep 7 11:47:02 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtktextbuffer.c gtk/gtkimcontext.c gtk/gtkwidget.c:

View File

@ -1,3 +1,8 @@
2000-09-07 Tor Lillqvist <tml@iki.fi>
* makefile.mingw.in: Use own version number for gdk-pixbuf DLLs,
like on Unix.
2000-08-12 Tor Lillqvist <tml@iki.fi>
* gdk_pixbuf.def: Add missing entry point.

View File

@ -6,7 +6,7 @@ TOP = ../..
include ../build/win32/make.mingw
# Possibly override GTK+ version from build/win32/module.defs
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
GDK_PIXBUF_VER = @GDK_PIXBUF_MAJOR@.@GDK_PIXBUF_MINOR@
OPTIMIZE = -g
@ -15,7 +15,7 @@ DEPCFLAGS = $(GLIB_CFLAGS)
all : \
../config.h \
gdk_pixbuf-$(GTK_VER).dll \
gdk_pixbuf-$(GDK_PIXBUF_VER).dll \
pixbufloader-bmp.dll \
pixbufloader-gif.dll \
pixbufloader-ico.dll \
@ -40,8 +40,8 @@ gdk_pixbuf_OBJECTS = \
../config.h : ../config.h.win32
cp $< $@
gdk_pixbuf-$(GTK_VER).dll : $(gdk_pixbuf_OBJECTS) gdk_pixbuf.def
$(GLIB)/build-dll gdk_pixbuf $(GTK_VER) gdk_pixbuf.def $(gdk_pixbuf_OBJECTS) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS)
gdk_pixbuf-$(GDK_PIXBUF_VER).dll : $(gdk_pixbuf_OBJECTS) gdk_pixbuf.def
$(GLIB)/build-dll gdk_pixbuf $(GDK_PIXBUF_VER) gdk_pixbuf.def $(gdk_pixbuf_OBJECTS) -L ../gdk -lgdk-$(GTK_VER) $(GLIB_LIBS)
pixops/libpixops.a :
cd pixops && $(MAKE) -f makefile.mingw libpixops.a
@ -49,17 +49,17 @@ pixops/libpixops.a :
pixbufloader_bmp_OBJECTS = io-bmp.o
pixbufloader-bmp.dll : $(pixbufloader_bmp_OBJECTS) pixbufloader_bmp.def
$(GLIB)/build-dll pixbufloader-bmp - pixbufloader_bmp.def $(pixbufloader_bmp_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS)
$(GLIB)/build-dll pixbufloader-bmp - pixbufloader_bmp.def $(pixbufloader_bmp_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS)
pixbufloader_gif_OBJECTS = io-gif.o
pixbufloader-gif.dll : $(pixbufloader_gif_OBJECTS) pixbufloader_gif.def
$(GLIB)/build-dll pixbufloader-gif - pixbufloader_gif.def $(pixbufloader_gif_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS)
$(GLIB)/build-dll pixbufloader-gif - pixbufloader_gif.def $(pixbufloader_gif_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS)
pixbufloader_ico_OBJECTS = io-ico.o
pixbufloader-ico.dll : $(pixbufloader_ico_OBJECTS) pixbufloader_ico.def
$(GLIB)/build-dll pixbufloader-ico - pixbufloader_ico.def $(pixbufloader_ico_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS)
$(GLIB)/build-dll pixbufloader-ico - pixbufloader_ico.def $(pixbufloader_ico_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS)
pixbufloader_jpeg_OBJECTS = io-jpeg.o
@ -67,7 +67,7 @@ io-jpeg.o : io-jpeg.c
$(CC) $(CFLAGS) $(JPEG_CFLAGS) -c $<
pixbufloader-jpeg.dll : $(pixbufloader_jpeg_OBJECTS) pixbufloader_jpeg.def
$(GLIB)/build-dll pixbufloader-jpeg - pixbufloader_jpeg.def $(pixbufloader_jpeg_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS) $(JPEG_LIBS)
$(GLIB)/build-dll pixbufloader-jpeg - pixbufloader_jpeg.def $(pixbufloader_jpeg_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(JPEG_LIBS)
pixbufloader_png_OBJECTS = io-png.o
@ -75,22 +75,22 @@ io-png.o : io-png.c
$(CC) $(CFLAGS) $(PNG_CFLAGS) -c $<
pixbufloader-png.dll : $(pixbufloader_png_OBJECTS) pixbufloader_png.def
$(GLIB)/build-dll pixbufloader-png - pixbufloader_png.def $(pixbufloader_png_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS) $(PNG_LIBS)
$(GLIB)/build-dll pixbufloader-png - pixbufloader_png.def $(pixbufloader_png_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(PNG_LIBS)
pixbufloader_pnm_OBJECTS = io-pnm.o
pixbufloader-pnm.dll : $(pixbufloader_pnm_OBJECTS) pixbufloader_pnm.def
$(GLIB)/build-dll pixbufloader-pnm - pixbufloader_pnm.def $(pixbufloader_pnm_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS)
$(GLIB)/build-dll pixbufloader-pnm - pixbufloader_pnm.def $(pixbufloader_pnm_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS)
pixbufloader_ras_OBJECTS = io-ras.o
pixbufloader-ras.dll : $(pixbufloader_ras_OBJECTS) pixbufloader_ras.def
$(GLIB)/build-dll pixbufloader-ras - pixbufloader_ras.def $(pixbufloader_ras_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS)
$(GLIB)/build-dll pixbufloader-ras - pixbufloader_ras.def $(pixbufloader_ras_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS)
pixbufloader_tiff_OBJECTS = io-tiff.o
pixbufloader-tiff.dll : $(pixbufloader_tiff_OBJECTS) pixbufloader_tiff.def
$(GLIB)/build-dll pixbufloader-tiff - pixbufloader_tiff.def $(pixbufloader_tiff_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(ZLIB_LIBS)
$(GLIB)/build-dll pixbufloader-tiff - pixbufloader_tiff.def $(pixbufloader_tiff_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS) $(TIFF_LIBS) $(JPEG_LIBS) $(ZLIB_LIBS)
io-tiff.o : io-tiff.c
$(CC) $(CFLAGS) $(TIFF_CFLAGS) -c $<
@ -98,15 +98,15 @@ io-tiff.o : io-tiff.c
pixbufloader_wbmp_OBJECTS = io-wbmp.o
pixbufloader-wbmp.dll : $(pixbufloader_wbmp_OBJECTS) pixbufloader_wbmp.def
$(GLIB)/build-dll pixbufloader-wbmp - pixbufloader_wbmp.def $(pixbufloader_wbmp_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS)
$(GLIB)/build-dll pixbufloader-wbmp - pixbufloader_wbmp.def $(pixbufloader_wbmp_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS)
pixbufloader_xpm_OBJECTS = io-xpm.o
pixbufloader-xpm.dll : $(pixbufloader_xpm_OBJECTS) pixbufloader_xpm.def
$(GLIB)/build-dll pixbufloader-xpm - pixbufloader_xpm.def $(pixbufloader_xpm_OBJECTS) -L . -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS)
$(GLIB)/build-dll pixbufloader-xpm - pixbufloader_xpm.def $(pixbufloader_xpm_OBJECTS) -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GLIB_LIBS)
test-gdk-pixbuf.exe : test-gdk-pixbuf.o gdk_pixbuf-$(GTK_VER).dll
$(CC) $(CFLAGS) -o $@ test-gdk-pixbuf.o -L . -lgdk_pixbuf-$(GTK_VER) $(GTK_LIBS) $(GLIB_LIBS)
test-gdk-pixbuf.exe : test-gdk-pixbuf.o gdk_pixbuf-$(GDK_PIXBUF_VER).dll
$(CC) $(CFLAGS) -o $@ test-gdk-pixbuf.o -L . -lgdk_pixbuf-$(GDK_PIXBUF_VER) $(GTK_LIBS) $(GLIB_LIBS)
# Hack to get an updated makefile.mingw automatically after updating
# makefile.mingw.in. Only for developer use.

View File

@ -178,6 +178,8 @@ gdk_win32_get_colormap (GdkDrawable *drawable)
{
GdkDrawableImplWin32 *impl;
impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
return impl->colormap;
}
@ -221,8 +223,8 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable,
POINT pts[4];
gboolean ok = TRUE;
GDK_NOTE (MISC, g_print ("gdk_win32_draw_rectangle: %#x (%d) %s%dx%d@+%d+%d\n",
GDK_DRAWABLE_HANDLE (drawable),
GDK_NOTE (MISC, g_print ("gdk_win32_draw_rectangle: %#x (%p) %s%dx%d@+%d+%d\n",
(guint) GDK_DRAWABLE_HANDLE (drawable),
gc_private,
(filled ? "fill " : ""),
width, height, x, y));
@ -319,13 +321,12 @@ gdk_win32_draw_arc (GdkDrawable *drawable,
gint angle1,
gint angle2)
{
GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc);
const GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_BACKGROUND;
HDC hdc;
int nXStartArc, nYStartArc, nXEndArc, nYEndArc;
GDK_NOTE (MISC, g_print ("gdk_draw_arc: %#x %d,%d,%d,%d %d %d\n",
GDK_DRAWABLE_HANDLE (drawable),
(guint) GDK_DRAWABLE_HANDLE (drawable),
x, y, width, height, angle1, angle2));
/* Seems that drawing arcs with width or height <= 2 fails, at least
@ -396,8 +397,9 @@ gdk_win32_draw_polygon (GdkDrawable *drawable,
gboolean ok = TRUE;
int i;
GDK_NOTE (MISC, g_print ("gdk_win32_draw_polygon: %#x (%d) %d\n",
GDK_DRAWABLE_HANDLE (drawable), gc_private,
GDK_NOTE (MISC, g_print ("gdk_win32_draw_polygon: %#x (%p) %d\n",
(guint) GDK_DRAWABLE_HANDLE (drawable),
gc_private,
npoints));
if (npoints < 2)
@ -510,7 +512,6 @@ gdk_win32_draw_text (GdkDrawable *drawable,
const gchar *text,
gint text_length)
{
GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc);
const GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_FONT;
wchar_t *wcstr, wc;
gint wlen;
@ -526,7 +527,7 @@ gdk_win32_draw_text (GdkDrawable *drawable,
arg.hdc = gdk_win32_hdc_get (drawable, gc, mask);
GDK_NOTE (MISC, g_print ("gdk_draw_text: %#x (%d,%d) \"%.*s\" (len %d)\n",
GDK_DRAWABLE_HANDLE (drawable),
(guint) GDK_DRAWABLE_HANDLE (drawable),
x, y,
(text_length > 10 ? 10 : text_length),
text, text_length));
@ -560,9 +561,8 @@ gdk_win32_draw_text_wc (GdkDrawable *drawable,
const GdkWChar *text,
gint text_length)
{
GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc);
const GdkGCValuesMask mask = GDK_GC_FOREGROUND|GDK_GC_FONT;
gint i, wlen;
gint i;
wchar_t *wcstr;
gdk_draw_text_arg arg;
@ -576,7 +576,7 @@ gdk_win32_draw_text_wc (GdkDrawable *drawable,
arg.hdc = gdk_win32_hdc_get (drawable, gc, mask);
GDK_NOTE (MISC, g_print ("gdk_draw_text_wc: %#x (%d,%d) len: %d\n",
GDK_DRAWABLE_HANDLE (drawable),
(guint) GDK_DRAWABLE_HANDLE (drawable),
x, y, text_length));
if (sizeof (wchar_t) != sizeof (GdkWChar))
@ -608,8 +608,6 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
gint width,
gint height)
{
GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc);
GdkDrawableImplWin32 *src_impl = GDK_DRAWABLE_IMPL_WIN32 (src);
HDC hdc;
HDC srcdc;
HGDIOBJ hgdiobj;
@ -620,8 +618,9 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
GDK_NOTE (MISC, g_print ("gdk_draw_pixmap: dest: %#x @+%d+%d"
"src: %#x %dx%d@+%d+%d\n",
GDK_DRAWABLE_HANDLE (drawable), xdest, ydest,
GDK_PIXMAP_HBITMAP (src),
(guint) GDK_DRAWABLE_HANDLE (drawable),
xdest, ydest,
(guint) GDK_PIXMAP_HBITMAP (src),
width, height, xsrc, ysrc));
hdc = gdk_win32_hdc_get (drawable, gc, 0);
@ -643,7 +642,7 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
OffsetRgn (outside_rgn, xdest, ydest);
GDK_NOTE (MISC, (GetRgnBox (outside_rgn, &r),
g_print ("...calling InvalidateRgn, "
"bbox: %dx%d@+%d+%d\n",
"bbox: %ldx%ld@+%ld+%ld\n",
r.right - r.left - 1, r.bottom - r.top - 1,
r.left, r.top)));
InvalidateRgn (GDK_DRAWABLE_HANDLE (drawable), outside_rgn, TRUE);
@ -756,7 +755,8 @@ gdk_win32_draw_points (GdkDrawable *drawable,
fg = gdk_colormap_color (impl->colormap, gc_private->foreground);
GDK_NOTE (MISC, g_print ("gdk_draw_points: %#x %dx%.06x\n",
GDK_DRAWABLE_HANDLE (drawable), npoints, fg));
(guint) GDK_DRAWABLE_HANDLE (drawable),
npoints, (guint) fg));
for (i = 0; i < npoints; i++)
SetPixel (hdc, points[i].x, points[i].y, fg);
@ -778,7 +778,7 @@ gdk_win32_draw_segments (GdkDrawable *drawable,
int i;
GDK_NOTE (MISC, g_print ("gdk_win32_draw_segments: %#x nsegs: %d\n",
GDK_DRAWABLE_HANDLE (drawable), nsegs));
(guint) GDK_DRAWABLE_HANDLE (drawable), nsegs));
hdc = gdk_win32_hdc_get (drawable, gc, mask);
@ -880,8 +880,6 @@ gdk_win32_draw_glyphs (GdkDrawable *drawable,
gint y,
PangoGlyphString *glyphs)
{
GdkDrawableImplWin32 *impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc);
const GdkGCValuesMask mask = GDK_GC_FOREGROUND;
HDC hdc;
@ -904,7 +902,6 @@ gdk_win32_draw_image (GdkDrawable *drawable,
gint height)
{
GdkDrawableImplWin32 *impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc);
GdkImagePrivateWin32 *image_private = (GdkImagePrivateWin32 *) image;
GdkColormapPrivateWin32 *colormap_private = (GdkColormapPrivateWin32 *) impl->colormap;
HDC hdc, memdc;

View File

@ -133,7 +133,6 @@ static GSourceFuncs event_funcs = {
GPollFD event_poll_fd;
static GdkWindow *current_window = NULL;
static HWND active = NULL;
static gint current_x, current_y;
static gdouble current_x_root, current_y_root;
static UINT gdk_ping_msg;
@ -148,11 +147,11 @@ static PFN_TrackMouseEvent track_mouse_event = NULL;
static gboolean use_ime_composition = FALSE;
LRESULT CALLBACK
gdk_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
static LRESULT
real_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
GdkEventPrivate event;
GdkEvent *eventp;
@ -162,9 +161,6 @@ gdk_window_procedure (HWND hwnd,
gint ret_val;
gboolean ret_val_flag;
GDK_NOTE (EVENTS, g_print ("gdk_window_procedure: %#x %s\n",
hwnd, gdk_win32_message_name (message)));
msg.hwnd = hwnd;
msg.message = message;
msg.wParam = wparam;
@ -271,12 +267,33 @@ gdk_window_procedure (HWND hwnd,
}
}
LRESULT CALLBACK
gdk_window_procedure (HWND hwnd,
UINT message,
WPARAM wparam,
LPARAM lparam)
{
LRESULT retval;
GDK_NOTE (EVENTS, g_print ("gdk_window_procedure: %#lx %s\n",
(gulong) hwnd, gdk_win32_message_name (message)));
retval = real_window_procedure (hwnd, message, wparam, lparam);
GDK_NOTE (EVENTS, g_print ("gdk_window_procedure: %#lx returns %ld\n",
(gulong) hwnd, retval));
return retval;
}
void
gdk_events_init (void)
{
HRESULT hres;
#ifdef USE_TRACKMOUSEEVENT
HMODULE user32, imm32;
HINSTANCE commctrl32;
#endif
gdk_ping_msg = RegisterWindowMessage ("gdk-ping");
GDK_NOTE (EVENTS, g_print ("gdk-ping = %#.03x\n",
@ -297,12 +314,12 @@ gdk_events_init (void)
if (hres == S_OK)
{
GDK_NOTE (EVENTS, g_print ("IActiveIMMApp created %#x\n",
GDK_NOTE (EVENTS, g_print ("IActiveIMMApp created %p\n",
active_imm_app));
(*active_imm_app->lpVtbl->Activate) (active_imm_app, TRUE);
hres = (*active_imm_app->lpVtbl->QueryInterface) (active_imm_app, &IID_IActiveIMMMessagePumpOwner, &active_imm_msgpump_owner);
GDK_NOTE (EVENTS, g_print ("IActiveIMMMessagePumpOwner created %#x\n",
GDK_NOTE (EVENTS, g_print ("IActiveIMMMessagePumpOwner created %p\n",
active_imm_msgpump_owner));
(active_imm_msgpump_owner->lpVtbl->Start) (active_imm_msgpump_owner);
}
@ -496,10 +513,10 @@ gdk_pointer_grab (GdkWindow *window,
{
if (!GDK_WINDOW_DESTROYED (window))
{
GDK_NOTE (EVENTS, g_print ("gdk_pointer_grab: %#x %s %#x %s\n",
GDK_WINDOW_HWND (window),
GDK_NOTE (EVENTS, g_print ("gdk_pointer_grab: %#lx %s %#lx %s\n",
(gulong) GDK_WINDOW_HWND (window),
(owner_events ? "TRUE" : "FALSE"),
hcursor,
(gulong) hcursor,
event_mask_string (event_mask)));
p_grab_mask = event_mask;
p_grab_owner_events = (owner_events != 0);
@ -606,8 +623,8 @@ gdk_keyboard_grab (GdkWindow *window,
g_return_val_if_fail (window != NULL, 0);
g_return_val_if_fail (GDK_IS_WINDOW (window), 0);
GDK_NOTE (EVENTS, g_print ("gdk_keyboard_grab %#x\n",
GDK_WINDOW_HWND (window)));
GDK_NOTE (EVENTS, g_print ("gdk_keyboard_grab %#lx\n",
(gulong) GDK_WINDOW_HWND (window)));
if (!GDK_WINDOW_DESTROYED (window))
{
@ -646,38 +663,6 @@ gdk_keyboard_ungrab (guint32 time)
k_grab_window = NULL;
}
static void
gdk_io_destroy (gpointer data)
{
GdkIOClosure *closure = data;
if (closure->notify)
closure->notify (closure->data);
g_free (closure);
}
static gboolean
gdk_io_invoke (GIOChannel *source,
GIOCondition condition,
gpointer data)
{
GdkIOClosure *closure = data;
GdkInputCondition gdk_cond = 0;
if (condition & (G_IO_IN | G_IO_PRI))
gdk_cond |= GDK_INPUT_READ;
if (condition & G_IO_OUT)
gdk_cond |= GDK_INPUT_WRITE;
if (condition & (G_IO_ERR | G_IO_HUP | G_IO_NVAL))
gdk_cond |= GDK_INPUT_EXCEPTION;
if (closure->condition & gdk_cond)
closure->function (closure->data, g_io_channel_unix_get_fd (source), gdk_cond);
return TRUE;
}
static GdkFilterReturn
gdk_event_apply_filters (MSG *msg,
GdkEvent *event,
@ -835,16 +820,18 @@ build_keypress_event (GdkWindowImplWin32 *impl,
if (ucount == 0)
event->key.keyval = GDK_VoidSymbol;
else if (msg->message == WM_CHAR || msg->message == WM_SYSCHAR)
if (msg->wParam < ' ')
{
event->key.keyval = msg->wParam + '@';
/* This is needed in case of Alt+nnn or Alt+0nnn (on the numpad)
* where nnn<32
*/
event->key.state |= GDK_CONTROL_MASK;
}
else
event->key.keyval = gdk_unicode_to_keyval (wbuf[0]);
{
if (msg->wParam < ' ')
{
event->key.keyval = msg->wParam + '@';
/* This is needed in case of Alt+nnn or Alt+0nnn (on the numpad)
* where nnn<32
*/
event->key.state |= GDK_CONTROL_MASK;
}
else
event->key.keyval = gdk_unicode_to_keyval (wbuf[0]);
}
build_key_event_state (event);
@ -873,7 +860,6 @@ build_keypress_event (GdkWindowImplWin32 *impl,
while (ucleft-- > 0)
{
int first;
int i;
wchar_t c = *wcp++;
if (c < 0x80)
@ -1004,7 +990,7 @@ print_event (GdkEvent *event)
case GDK_NO_EXPOSE: g_print ("GDK_NO_EXPOSE "); break;
case GDK_SCROLL: g_print ("GDK_SCROLL "); break;
}
g_print ("%#x ", GDK_WINDOW_HWND (event->any.window));
g_print ("%#lx ", (gulong) GDK_WINDOW_HWND (event->any.window));
switch (event->any.type)
{
@ -1062,6 +1048,9 @@ print_event (GdkEvent *event)
"???")))));
print_event_state (event->scroll.state);
break;
default:
/* Nothing */
break;
}
g_print ("\n");
}
@ -1172,7 +1161,7 @@ translate_mouse_coords (GdkWindow *window1,
ClientToScreen (GDK_WINDOW_HWND (window1), &pt);
ScreenToClient (GDK_WINDOW_HWND (window2), &pt);
msg->lParam = MAKELPARAM (pt.x, pt.y);
GDK_NOTE (EVENTS, g_print ("...new coords are (%d,%d)\n", pt.x, pt.y));
GDK_NOTE (EVENTS, g_print ("...new coords are (%ld,%ld)\n", pt.x, pt.y));
}
static gboolean
@ -1195,8 +1184,8 @@ propagate (GdkWindow **window,
}
else
{
GDK_NOTE (EVENTS, g_print ("...sending to grabber %#x\n",
GDK_WINDOW_HWND (grab_window)));
GDK_NOTE (EVENTS, g_print ("...sending to grabber %#lx\n",
(gulong) GDK_WINDOW_HWND (grab_window)));
gdk_drawable_unref (*window);
*window = grab_window;
gdk_drawable_ref (*window);
@ -1224,8 +1213,9 @@ propagate (GdkWindow **window,
else
{
/* Grabbed! */
GDK_NOTE (EVENTS, g_print ("...sending to grabber %#x\n",
GDK_WINDOW_HWND (grab_window)));
GDK_NOTE (EVENTS,
g_print ("...sending to grabber %#lx\n",
(gulong) GDK_WINDOW_HWND (grab_window)));
gdk_drawable_unref (*window);
*window = grab_window;
gdk_drawable_ref (*window);
@ -1243,8 +1233,8 @@ propagate (GdkWindow **window,
gdk_drawable_unref (*window);
*window = GDK_WINDOW (GDK_WINDOW_OBJECT (*window)->parent);
gdk_drawable_ref (*window);
GDK_NOTE (EVENTS, g_print ("...propagating to %#x\n",
GDK_WINDOW_HWND (*window)));
GDK_NOTE (EVENTS, g_print ("...propagating to %#lx\n",
(gulong) GDK_WINDOW_HWND (*window)));
/* The only branch where we actually continue the loop */
}
}
@ -1338,7 +1328,6 @@ gdk_event_translate (GdkEvent *event,
{
DWORD pidActWin;
DWORD pidThis;
DWORD dwStyle;
PAINTSTRUCT paintstruct;
HDC hdc;
HDC bgdc;
@ -1362,17 +1351,14 @@ gdk_event_translate (GdkEvent *event,
GdkWindow *orig_window, *new_window;
GdkColormapPrivateWin32 *colormap_private;
GdkEventMask mask;
GdkPixmap *pixmap;
GdkPixmapImplWin32 *pixmap_impl;
int button;
int i, j, n, k;
int i, j;
gchar buf[256];
gchar *msgname;
gboolean return_val;
gboolean flag;
return_val = FALSE;
@ -1402,8 +1388,8 @@ gdk_event_translate (GdkEvent *event,
* removed it. Repost the same message to our queue so that
* we will get it later when we are prepared.
*/
GDK_NOTE(MISC, g_print("gdk_event_translate: %#x %s posted.\n",
msg->hwnd,
GDK_NOTE(MISC, g_print("gdk_event_translate: %#lx %s posted.\n",
(gulong) msg->hwnd,
msg->message == WM_MOVE ?
"WM_MOVE" : "WM_SIZE"));
@ -1432,8 +1418,8 @@ gdk_event_translate (GdkEvent *event,
if (msg->message == gdk_selection_notify_msg)
{
GDK_NOTE (EVENTS, g_print ("gdk_selection_notify_msg: %#x\n",
msg->hwnd));
GDK_NOTE (EVENTS, g_print ("gdk_selection_notify_msg: %#lx\n",
(gulong) msg->hwnd));
event->selection.type = GDK_SELECTION_NOTIFY;
event->selection.window = window;
@ -1448,8 +1434,8 @@ gdk_event_translate (GdkEvent *event,
}
else if (msg->message == gdk_selection_request_msg)
{
GDK_NOTE (EVENTS, g_print ("gdk_selection_request_msg: %#x\n",
msg->hwnd));
GDK_NOTE (EVENTS, g_print ("gdk_selection_request_msg: %#lx\n",
(gulong) msg->hwnd));
event->selection.type = GDK_SELECTION_REQUEST;
event->selection.window = window;
@ -1465,8 +1451,8 @@ gdk_event_translate (GdkEvent *event,
}
else if (msg->message == gdk_selection_clear_msg)
{
GDK_NOTE (EVENTS, g_print ("gdk_selection_clear_msg: %#x\n",
msg->hwnd));
GDK_NOTE (EVENTS, g_print ("gdk_selection_clear_msg: %#lx\n",
(gulong) msg->hwnd));
event->selection.type = GDK_SELECTION_CLEAR;
event->selection.window = window;
@ -1521,8 +1507,8 @@ gdk_event_translate (GdkEvent *event,
{
case WM_INPUTLANGCHANGE:
GDK_NOTE (EVENTS,
g_print ("WM_INPUTLANGCHANGE: %#x charset %d locale %x\n",
msg->hwnd, msg->wParam, msg->lParam));
g_print ("WM_INPUTLANGCHANGE: %#lx charset %lu locale %lx\n",
(gulong) msg->hwnd, (gulong) msg->wParam, msg->lParam));
window_impl->input_locale = (HKL) msg->lParam;
TranslateCharsetInfo ((DWORD FAR *) msg->wParam,
&window_impl->charset_info,
@ -1532,9 +1518,9 @@ gdk_event_translate (GdkEvent *event,
case WM_SYSKEYUP:
case WM_SYSKEYDOWN:
GDK_NOTE (EVENTS,
g_print ("WM_SYSKEY%s: %#x %s %#x %s\n",
g_print ("WM_SYSKEY%s: %#lx %s %#x %s\n",
(msg->message == WM_SYSKEYUP ? "UP" : "DOWN"),
msg->hwnd,
(gulong) msg->hwnd,
(GetKeyNameText (msg->lParam, buf,
sizeof (buf)) > 0 ?
buf : ""),
@ -1560,9 +1546,9 @@ gdk_event_translate (GdkEvent *event,
case WM_KEYUP:
case WM_KEYDOWN:
GDK_NOTE (EVENTS,
g_print ("WM_KEY%s: %#x %s %#x %s\n",
g_print ("WM_KEY%s: %#lx %s %#x %s\n",
(msg->message == WM_KEYUP ? "UP" : "DOWN"),
msg->hwnd,
(gulong) msg->hwnd,
(GetKeyNameText (msg->lParam, buf,
sizeof (buf)) > 0 ?
buf : ""),
@ -1757,15 +1743,49 @@ gdk_event_translate (GdkEvent *event,
ignore_wm_char = FALSE;
break;
case VK_OEM_PLUS: /* On my Win98, the '+' key comes in
* as VK_OEM_PLUS
* as VK_OEM_PLUS, etc.
*/
case VK_OEM_COMMA:
case VK_OEM_MINUS:
case VK_OEM_PERIOD:
case VK_OEM_2:
case VK_OEM_4:
case VK_OEM_5:
case VK_OEM_6:
if (!is_altgr_key && (GetKeyState (VK_CONTROL) < 0
|| GetKeyState (VK_MENU) < 0))
/* Control- or Alt-plus won't come in as WM_CHAR,
* but beware of AltGr-plus which is backslash on
* Finnish keyboards
*/
event->key.keyval = '+';
/* All these VK_OEM keycodes happen to be the corresponding ASCII
* char + 0x90
*/
event->key.keyval = '+' - 0x90;
else
ignore_wm_char = FALSE;
break;
case VK_OEM_1:
if (!is_altgr_key && (GetKeyState (VK_CONTROL) < 0
|| GetKeyState (VK_MENU) < 0))
/* ;: on US keyboard */
event->key.keyval = ';';
else
ignore_wm_char = FALSE;
break;
case VK_OEM_3:
if (!is_altgr_key && (GetKeyState (VK_CONTROL) < 0
|| GetKeyState (VK_MENU) < 0))
/* `~ on US keyboard */
event->key.keyval = '`';
else
ignore_wm_char = FALSE;
break;
case VK_OEM_7:
if (!is_altgr_key && (GetKeyState (VK_CONTROL) < 0
|| GetKeyState (VK_MENU) < 0))
/* '" on US keyboard */
event->key.keyval = '\'';
else
ignore_wm_char = FALSE;
break;
@ -1809,24 +1829,24 @@ gdk_event_translate (GdkEvent *event,
if (!use_ime_composition)
break;
GDK_NOTE (EVENTS, g_print ("WM_IME_COMPOSITION: %#x %#x\n",
msg->hwnd, msg->lParam));
GDK_NOTE (EVENTS, g_print ("WM_IME_COMPOSITION: %#lx %#lx\n",
(gulong) msg->hwnd, msg->lParam));
if (msg->lParam & GCS_RESULTSTR)
goto wm_char;
break;
case WM_IME_CHAR:
GDK_NOTE (EVENTS,
g_print ("WM_IME_CHAR: %#x bytes: %#.04x\n",
msg->hwnd, msg->wParam));
g_print ("WM_IME_CHAR: %#lx bytes: %#.04x\n",
(gulong) msg->hwnd, msg->wParam));
goto wm_char;
case WM_CHAR:
case WM_SYSCHAR:
GDK_NOTE (EVENTS,
g_print ("WM_%sCHAR: %#x %#x %#s %s\n",
g_print ("WM_%sCHAR: %#lx %#x %s %s\n",
(msg->message == WM_CHAR ? "" : "SYS"),
msg->hwnd, msg->wParam,
(gulong) msg->hwnd, msg->wParam,
decode_key_lparam (msg->lParam),
(ignore_wm_char ? "ignored" : "")));
@ -1894,9 +1914,9 @@ gdk_event_translate (GdkEvent *event,
buttondown0:
GDK_NOTE (EVENTS,
g_print ("WM_%cBUTTONDOWN: %#x (%d,%d)\n",
g_print ("WM_%cBUTTONDOWN: %#lx (%d,%d)\n",
" LMR"[button],
msg->hwnd,
(gulong) msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
if (GDK_WINDOW_OBJECT (window)->extension_events != 0
@ -1961,9 +1981,9 @@ gdk_event_translate (GdkEvent *event,
buttonup0:
GDK_NOTE (EVENTS,
g_print ("WM_%cBUTTONUP: %#x (%d,%d)\n",
g_print ("WM_%cBUTTONUP: %#lx (%d,%d)\n",
" LMR"[button],
msg->hwnd,
(gulong) msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
if (GDK_WINDOW_OBJECT (window)->extension_events != 0
@ -2007,8 +2027,8 @@ gdk_event_translate (GdkEvent *event,
case WM_MOUSEMOVE:
GDK_NOTE (EVENTS,
g_print ("WM_MOUSEMOVE: %#x %#x (%d,%d)\n",
msg->hwnd, msg->wParam,
g_print ("WM_MOUSEMOVE: %#lx %#x (%d,%d)\n",
(gulong) msg->hwnd, msg->wParam,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
/* If we haven't moved, don't create any event.
@ -2061,8 +2081,8 @@ gdk_event_translate (GdkEvent *event,
case WM_NCMOUSEMOVE:
GDK_NOTE (EVENTS,
g_print ("WM_NCMOUSEMOVE: %#x x,y: %d %d\n",
msg->hwnd,
g_print ("WM_NCMOUSEMOVE: %#lx x,y: %d %d\n",
(gulong) msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
if (track_mouse_event == NULL
&& current_window != NULL
@ -2095,7 +2115,7 @@ gdk_event_translate (GdkEvent *event,
break;
case WM_MOUSEWHEEL:
GDK_NOTE (EVENTS, g_print ("WM_MOUSEWHEEL: %#x\n", msg->hwnd));
GDK_NOTE (EVENTS, g_print ("WM_MOUSEWHEEL: %#lx\n", (gulong) msg->hwnd));
if (GDK_WINDOW_OBJECT (window)->extension_events != 0
&& gdk_input_ignore_core)
@ -2148,7 +2168,7 @@ gdk_event_translate (GdkEvent *event,
#ifdef USE_TRACKMOUSEEVENT
case WM_MOUSELEAVE:
GDK_NOTE (EVENTS, g_print ("WM_MOUSELEAVE: %#x\n", msg->hwnd));
GDK_NOTE (EVENTS, g_print ("WM_MOUSELEAVE: %#lx\n", (gulong) msg->hwnd));
if (!(window_impl->event_mask & GDK_LEAVE_NOTIFY_MASK))
break;
@ -2186,10 +2206,10 @@ gdk_event_translate (GdkEvent *event,
case WM_SETFOCUS:
case WM_KILLFOCUS:
GDK_NOTE (EVENTS, g_print ("WM_%sFOCUS: %#x\n",
GDK_NOTE (EVENTS, g_print ("WM_%sFOCUS: %#lx\n",
(msg->message == WM_SETFOCUS ?
"SET" : "KILL"),
msg->hwnd));
(gulong) msg->hwnd));
if (!(window_impl->event_mask & GDK_FOCUS_CHANGE_MASK))
break;
@ -2201,8 +2221,8 @@ gdk_event_translate (GdkEvent *event,
break;
case WM_ERASEBKGND:
GDK_NOTE (EVENTS, g_print ("WM_ERASEBKGND: %#x dc %#x\n",
msg->hwnd, msg->wParam));
GDK_NOTE (EVENTS, g_print ("WM_ERASEBKGND: %#lx dc %#x\n",
(gulong) msg->hwnd, msg->wParam));
if (GDK_WINDOW_DESTROYED (window))
break;
@ -2250,11 +2270,11 @@ gdk_event_translate (GdkEvent *event,
GetClipBox (hdc, &rect);
GDK_NOTE (EVENTS,
g_print ("...%dx%d@+%d+%d BG_PIXEL %.06x\n",
g_print ("...%ldx%ld@+%ld+%ld BG_PIXEL %.06lx\n",
rect.right - rect.left,
rect.bottom - rect.top,
rect.left, rect.top,
bg));
(gulong) bg));
hbr = CreateSolidBrush (bg);
#if 0
g_print ("...CreateSolidBrush (%.08x) = %.08x\n", bg, hbr);
@ -2281,10 +2301,10 @@ gdk_event_translate (GdkEvent *event,
else
{
GDK_NOTE (EVENTS,
g_print ("...blitting pixmap %#x (%dx%d) "
g_print ("...blitting pixmap %#lx (%dx%d) "
"all over the place,\n"
"...clip box = %dx%d@+%d+%d\n",
GDK_PIXMAP_HBITMAP (pixmap),
"...clip box = %ldx%ld@+%ld+%ld\n",
(gulong) GDK_PIXMAP_HBITMAP (pixmap),
pixmap_impl->width, pixmap_impl->height,
rect.right - rect.left, rect.bottom - rect.top,
rect.left, rect.top));
@ -2339,21 +2359,21 @@ gdk_event_translate (GdkEvent *event,
case WM_PAINT:
if (!GetUpdateRect(msg->hwnd, NULL, FALSE))
{
GDK_NOTE (EVENTS, g_print ("WM_PAINT: %#x no update rect\n",
msg->hwnd));
GDK_NOTE (EVENTS, g_print ("WM_PAINT: %#lx no update rect\n",
(gulong) msg->hwnd));
break;
}
hdc = BeginPaint (msg->hwnd, &paintstruct);
GDK_NOTE (EVENTS,
g_print ("WM_PAINT: %#x %dx%d@+%d+%d %s dc %#x\n",
msg->hwnd,
g_print ("WM_PAINT: %#lx %ldx%ld@+%ld+%ld %s dc %#lx\n",
(gulong) msg->hwnd,
paintstruct.rcPaint.right - paintstruct.rcPaint.left,
paintstruct.rcPaint.bottom - paintstruct.rcPaint.top,
paintstruct.rcPaint.left, paintstruct.rcPaint.top,
(paintstruct.fErase ? "erase" : ""),
hdc));
(gulong) hdc));
EndPaint (msg->hwnd, &paintstruct);
@ -2389,8 +2409,8 @@ gdk_event_translate (GdkEvent *event,
break;
case WM_SETCURSOR:
GDK_NOTE (EVENTS, g_print ("WM_SETCURSOR: %#x %#x %#x\n",
msg->hwnd,
GDK_NOTE (EVENTS, g_print ("WM_SETCURSOR: %#lx %#x %#x\n",
(gulong) msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
if (LOWORD (msg->lParam) != HTCLIENT)
@ -2405,7 +2425,7 @@ gdk_event_translate (GdkEvent *event,
if (hcursor != NULL)
{
GDK_NOTE (EVENTS, g_print ("...SetCursor(%#x)\n", hcursor));
GDK_NOTE (EVENTS, g_print ("...SetCursor(%#lx)\n", (gulong) hcursor));
SetCursor (hcursor);
*ret_val_flagp = TRUE;
*ret_valp = TRUE;
@ -2413,8 +2433,8 @@ gdk_event_translate (GdkEvent *event,
break;
case WM_SHOWWINDOW:
GDK_NOTE (EVENTS, g_print ("WM_SHOWWINDOW: %#x %d\n",
msg->hwnd,
GDK_NOTE (EVENTS, g_print ("WM_SHOWWINDOW: %#lx %d\n",
(gulong) msg->hwnd,
msg->wParam));
if (!(window_impl->event_mask & GDK_STRUCTURE_MASK))
@ -2436,8 +2456,8 @@ gdk_event_translate (GdkEvent *event,
case WM_SIZE:
GDK_NOTE (EVENTS,
g_print ("WM_SIZE: %#x %s %dx%d\n",
msg->hwnd,
g_print ("WM_SIZE: %#lx %s %dx%d\n",
(gulong) msg->hwnd,
(msg->wParam == SIZE_MAXHIDE ? "MAXHIDE" :
(msg->wParam == SIZE_MAXIMIZED ? "MAXIMIZED" :
(msg->wParam == SIZE_MAXSHOW ? "MAXSHOW" :
@ -2496,7 +2516,7 @@ gdk_event_translate (GdkEvent *event,
break;
case WM_GETMINMAXINFO:
GDK_NOTE (EVENTS, g_print ("WM_GETMINMAXINFO: %#x\n", msg->hwnd));
GDK_NOTE (EVENTS, g_print ("WM_GETMINMAXINFO: %#lx\n", (gulong) msg->hwnd));
mmi = (MINMAXINFO*) msg->lParam;
if (window_impl->hint_flags & GDK_HINT_MIN_SIZE)
@ -2515,8 +2535,8 @@ gdk_event_translate (GdkEvent *event,
break;
case WM_MOVE:
GDK_NOTE (EVENTS, g_print ("WM_MOVE: %#x (%d,%d)\n",
msg->hwnd,
GDK_NOTE (EVENTS, g_print ("WM_MOVE: %#lx (%d,%d)\n",
(gulong) msg->hwnd,
LOWORD (msg->lParam), HIWORD (msg->lParam)));
if (!(window_impl->event_mask & GDK_STRUCTURE_MASK))
@ -2543,7 +2563,7 @@ gdk_event_translate (GdkEvent *event,
break;
case WM_CLOSE:
GDK_NOTE (EVENTS, g_print ("WM_CLOSE: %#x\n", msg->hwnd));
GDK_NOTE (EVENTS, g_print ("WM_CLOSE: %#lx\n", (gulong) msg->hwnd));
event->any.type = GDK_DELETE;
event->any.window = window;
@ -2566,10 +2586,10 @@ gdk_event_translate (GdkEvent *event,
flag = FALSE;
GDK_NOTE (EVENTS, flag = TRUE);
if (flag)
g_print ("WM_%s: %#x %#x (%s)\n",
g_print ("WM_%s: %#lx %#x (%s)\n",
(msg->message == WM_RENDERFORMAT ? "RENDERFORMAT" :
"RENDERALLFORMATS"),
msg->hwnd,
(gulong) msg->hwnd,
msg->wParam,
(msg->wParam == CF_TEXT ? "CF_TEXT" :
(msg->wParam == CF_DIB ? "CF_DIB" :
@ -2611,7 +2631,7 @@ gdk_event_translate (GdkEvent *event,
#endif /* No delayed rendering */
case WM_DESTROY:
GDK_NOTE (EVENTS, g_print ("WM_DESTROY: %#x\n", msg->hwnd));
GDK_NOTE (EVENTS, g_print ("WM_DESTROY: %#lx\n", (gulong) msg->hwnd));
event->any.type = GDK_DESTROY;
event->any.window = window;
@ -2640,20 +2660,20 @@ gdk_event_translate (GdkEvent *event,
* constants as case labels.
*/
case WT_PACKET:
GDK_NOTE (EVENTS, g_print ("WT_PACKET: %#x %d %#x\n",
msg->hwnd,
GDK_NOTE (EVENTS, g_print ("WT_PACKET: %#lx %d %#lx\n",
(gulong) msg->hwnd,
msg->wParam, msg->lParam));
goto wintab;
case WT_CSRCHANGE:
GDK_NOTE (EVENTS, g_print ("WT_CSRCHANGE: %#x %d %#x\n",
msg->hwnd,
GDK_NOTE (EVENTS, g_print ("WT_CSRCHANGE: %#lx %d %#lx\n",
(gulong) msg->hwnd,
msg->wParam, msg->lParam));
goto wintab;
case WT_PROXIMITY:
GDK_NOTE (EVENTS, g_print ("WT_PROXIMITY: %#x %#x %d %d\n",
msg->hwnd, msg->wParam,
GDK_NOTE (EVENTS, g_print ("WT_PROXIMITY: %#lx %#x %d %d\n",
(gulong) msg->hwnd, msg->wParam,
LOWORD (msg->lParam),
HIWORD (msg->lParam)));
/* Fall through */
@ -2664,9 +2684,9 @@ gdk_event_translate (GdkEvent *event,
#endif
default:
GDK_NOTE (EVENTS, g_print ("%s: %#x %#x %#x\n",
GDK_NOTE (EVENTS, g_print ("%s: %#lx %#x %#lx\n",
gdk_win32_message_name (msg->message),
msg->hwnd,
(gulong) msg->hwnd,
msg->wParam, msg->lParam));
}
@ -2699,16 +2719,13 @@ done:
void
gdk_events_queue (void)
{
GList *node;
GdkEvent *event;
MSG msg;
LRESULT lres;
while (!gdk_event_queue_find_first ()
&& PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
GDK_NOTE (EVENTS, g_print ("PeekMessage: %#x %s\n",
msg.hwnd, gdk_win32_message_name (msg.message)));
GDK_NOTE (EVENTS, g_print ("PeekMessage: %#lx %s\n",
(gulong) msg.hwnd, gdk_win32_message_name (msg.message)));
if (active_imm_msgpump_owner == NULL
|| (active_imm_msgpump_owner->lpVtbl->OnTranslateMessage) (active_imm_msgpump_owner, &msg) != S_OK)

View File

@ -76,6 +76,12 @@ gchar *gdk_win32_last_error_string (void);
void gdk_win32_api_failed (const gchar *where,
gint line,
const gchar *api);
void gdk_other_api_failed (const gchar *where,
gint line,
const gchar *api);
void gdk_win32_gdi_failed (const gchar *where,
gint line,
const gchar *api);
#ifdef __GNUC__
#define WIN32_API_FAILED(api) gdk_win32_api_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)

View File

@ -67,10 +67,47 @@ extern "C" {
#define FS_VIETNAMESE 0x100
#endif
/* Some virtual keycodes are missing */
#ifndef VM_OEM_PLUS
#define VK_OEM_PLUS 0xBB
#endif
#ifndef VK_OEM_COMMA
#define VK_OEM_COMMA 0xBC
#endif
#ifndef VK_OEM_MINUS
#define VK_OEM_MINUS 0xBD
#endif
#ifndef VK_OEM_PERIOD
#define VK_OEM_PERIOD 0xBE
#endif
#ifndef VK_OEM_1
#define VK_OEM_1 0xBA
#endif
#ifndef VK_OEM_2
#define VK_OEM_2 0xBF
#endif
#ifndef VK_OEM_3
#define VK_OEM_3 0xC0
#endif
#ifndef VK_OEM_4
#define VK_OEM_4 0xDB
#endif
#ifndef VK_OEM_5
#define VK_OEM_5 0xDC
#endif
#ifndef VK_OEM_6
#define VK_OEM_6 0xDD
#endif
#ifndef VK_OEM_7
#define VK_OEM_7 0xDE
#endif
#ifndef VK_OEM_8
#define VK_OEM_8 0xDF
#endif
/* Missing messages */
#ifndef WM_MOUSEWHEEL

View File

@ -13,7 +13,7 @@ include ../../build/win32/make.mingw
# Possibly override GTK+ version from build/win32/module.defs
GTK_VER = @GTK_MAJOR_VERSION@.@GTK_MINOR_VERSION@
OPTIMIZE = -g
OPTIMIZE = -g -Wall
INCLUDES = -I ../.. -I .. -I $(WTKIT)/include
DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
@ -42,6 +42,7 @@ gdk_win32_OBJECTS = \
gdkinput.o \
gdkinput-win32.o \
gdkmain-win32.o \
gdkpango-win32.o \
gdkpixmap-win32.o \
gdkproperty-win32.o \
gdkselection-win32.o \

View File

@ -1274,6 +1274,8 @@ EXPORTS
gtk_widget_add_accelerator
gtk_widget_add_events
gtk_widget_class_path
gtk_widget_create_pango_context
gtk_widget_create_pango_layout
gtk_widget_destroy
gtk_widget_destroyed
gtk_widget_draw
@ -1293,7 +1295,9 @@ EXPORTS
gtk_widget_get_direction
gtk_widget_get_events
gtk_widget_get_extension_events
gtk_widget_get_modifier_style
gtk_widget_get_name
gtk_widget_get_pango_context
gtk_widget_get_parent_window
gtk_widget_get_pointer
gtk_widget_get_style
@ -1310,7 +1314,12 @@ EXPORTS
gtk_widget_is_ancestor
gtk_widget_lock_accelerators
gtk_widget_map
gtk_widget_modify_base
gtk_widget_modify_bg
gtk_widget_modify_fg
gtk_widget_modify_font
gtk_widget_modify_style
gtk_widget_modify_text
gtk_widget_new
gtk_widget_newv
gtk_widget_path