Commit 6ffe1dcf authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist
Browse files

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.
parent 2bcef62f
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:
......
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:
......
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:
......
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:
......
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:
......
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:
......
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:
......
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.
......
......@@ -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.
......
......@@ -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;
......
......@@ -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,