Commit 5ac61d3e authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

Include the build directory.

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

	* Makefile.am: Include the build directory.

	* configure.in: Generate build/Makefile and build/win32/Makefile.

	* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.

	* gdk/gdk.def
	* gtk/gtk.def: Updates.

	* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
	PANGOWIN32_LIBS and gdk_pixbuf.

	* gdk/win32: Compiles, but no doubt doesn't work at all.

	* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.

	* gdk/win32/gdkinput.c: New file, temporarily.

	* gdk/win32/gdkinput-win32.h: New file

	* gdk/win32/gdkinputprivate.h: Remove.

	* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
	made externally visible.
parent 37e80986
2000-07-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
* gdk/gdk.def
* gtk/gtk.def: Updates.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf.
* gdk/win32: Compiles, but no doubt doesn't work at all.
* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.
* gdk/win32/gdkinput.c: New file, temporarily.
* gdk/win32/gdkinput-win32.h: New file
* gdk/win32/gdkinputprivate.h: Remove.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible.
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
......@@ -33,12 +60,13 @@
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
don't use fields and variables called xcursor, xid, etc (leftovers
from the X11 backend).
Rename fields and variables called xcursor, xid, etc (these names
were leftovers from the X11 backend) to hcursor, hwnd, hbitmap etc.
Sat Jul 22 17:41:26 2000 Owen Taylor <otaylor@redhat.com>
......
2000-07-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
* gdk/gdk.def
* gtk/gtk.def: Updates.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf.
* gdk/win32: Compiles, but no doubt doesn't work at all.
* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.
* gdk/win32/gdkinput.c: New file, temporarily.
* gdk/win32/gdkinput-win32.h: New file
* gdk/win32/gdkinputprivate.h: Remove.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible.
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
......@@ -33,12 +60,13 @@
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
don't use fields and variables called xcursor, xid, etc (leftovers
from the X11 backend).
Rename fields and variables called xcursor, xid, etc (these names
were leftovers from the X11 backend) to hcursor, hwnd, hbitmap etc.
Sat Jul 22 17:41:26 2000 Owen Taylor <otaylor@redhat.com>
......
2000-07-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
* gdk/gdk.def
* gtk/gtk.def: Updates.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf.
* gdk/win32: Compiles, but no doubt doesn't work at all.
* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.
* gdk/win32/gdkinput.c: New file, temporarily.
* gdk/win32/gdkinput-win32.h: New file
* gdk/win32/gdkinputprivate.h: Remove.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible.
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
......@@ -33,12 +60,13 @@
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
don't use fields and variables called xcursor, xid, etc (leftovers
from the X11 backend).
Rename fields and variables called xcursor, xid, etc (these names
were leftovers from the X11 backend) to hcursor, hwnd, hbitmap etc.
Sat Jul 22 17:41:26 2000 Owen Taylor <otaylor@redhat.com>
......
2000-07-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
* gdk/gdk.def
* gtk/gtk.def: Updates.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf.
* gdk/win32: Compiles, but no doubt doesn't work at all.
* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.
* gdk/win32/gdkinput.c: New file, temporarily.
* gdk/win32/gdkinput-win32.h: New file
* gdk/win32/gdkinputprivate.h: Remove.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible.
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
......@@ -33,12 +60,13 @@
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
don't use fields and variables called xcursor, xid, etc (leftovers
from the X11 backend).
Rename fields and variables called xcursor, xid, etc (these names
were leftovers from the X11 backend) to hcursor, hwnd, hbitmap etc.
Sat Jul 22 17:41:26 2000 Owen Taylor <otaylor@redhat.com>
......
2000-07-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
* gdk/gdk.def
* gtk/gtk.def: Updates.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf.
* gdk/win32: Compiles, but no doubt doesn't work at all.
* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.
* gdk/win32/gdkinput.c: New file, temporarily.
* gdk/win32/gdkinput-win32.h: New file
* gdk/win32/gdkinputprivate.h: Remove.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible.
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
......@@ -33,12 +60,13 @@
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
don't use fields and variables called xcursor, xid, etc (leftovers
from the X11 backend).
Rename fields and variables called xcursor, xid, etc (these names
were leftovers from the X11 backend) to hcursor, hwnd, hbitmap etc.
Sat Jul 22 17:41:26 2000 Owen Taylor <otaylor@redhat.com>
......
2000-07-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
* gdk/gdk.def
* gtk/gtk.def: Updates.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf.
* gdk/win32: Compiles, but no doubt doesn't work at all.
* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.
* gdk/win32/gdkinput.c: New file, temporarily.
* gdk/win32/gdkinput-win32.h: New file
* gdk/win32/gdkinputprivate.h: Remove.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible.
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
......@@ -33,12 +60,13 @@
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
don't use fields and variables called xcursor, xid, etc (leftovers
from the X11 backend).
Rename fields and variables called xcursor, xid, etc (these names
were leftovers from the X11 backend) to hcursor, hwnd, hbitmap etc.
Sat Jul 22 17:41:26 2000 Owen Taylor <otaylor@redhat.com>
......
2000-07-25 Tor Lillqvist <tml@iki.fi>
* Makefile.am: Include the build directory.
* configure.in: Generate build/Makefile and build/win32/Makefile.
* config.h.win32: Add USE_GMODULE and USE_MMX for gdk-pixbuf.
* gdk/gdk.def
* gtk/gtk.def: Updates.
* gdk/makefile.mingw.in: Define GDK_COMPILATION. Link with
PANGOWIN32_LIBS and gdk_pixbuf.
* gdk/win32: Compiles, but no doubt doesn't work at all.
* gdk/win32/makefile.mingw.in: Define GDK_COMPILATION.
* gdk/win32/gdkinput.c: New file, temporarily.
* gdk/win32/gdkinput-win32.h: New file
* gdk/win32/gdkinputprivate.h: Remove.
* gtk/gtkrc.[ch] (gtk_win32_get_installation_directory): Renamed and
made externally visible.
2000-07-24 Elliot Lee <sopwith@redhat.com>
* gdk/gdkprivate.h: Remove gdk_*_lookup() defines, since they are defined by the
individual backends already.
......@@ -33,12 +60,13 @@
* gdk/win32/gdkcolor-win32.c
* gdk/win32/gdkcursor-win32.c
* gdk/win32/gdkdrawable-win32.c
* gdk/win32/gdkgc-win32.c
* gdk/win32/gdkimage-win32.c
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Update data structures. Cosmetics:
don't use fields and variables called xcursor, xid, etc (leftovers
from the X11 backend).
Rename fields and variables called xcursor, xid, etc (these names
were leftovers from the X11 backend) to hcursor, hwnd, hbitmap etc.
Sat Jul 22 17:41:26 2000 Owen Taylor <otaylor@redhat.com>
......
## Makefile.am for GTK+
SRC_SUBDIRS = gdk-pixbuf gdk modules gtk demos
SUBDIRS = po $(SRC_SUBDIRS) docs
SUBDIRS = po $(SRC_SUBDIRS) docs build
bin_SCRIPTS = gtk-config-2.0
......
......@@ -190,3 +190,8 @@
* (available in the Platform SDK)
*/
/* #define HAVE_DIMM_H 1 */
#define USE_GMODULE 1
#define USE_MMX 1
/* #undef HAVE_SIGSETJMP */
......@@ -993,6 +993,8 @@ docs/gtk-config.1
Makefile
gtk-config-2.0
po/Makefile.in
build/Makefile
build/win32/Makefile
demos/Makefile
docs/Makefile
docs/reference/Makefile
......
......@@ -46,6 +46,11 @@ EXPORTS
gdk_cursor_new_from_pixmap
gdk_cursor_ref
gdk_cursor_unref
gdk_device_set_axis_use
gdk_device_set_key
gdk_device_set_mode
gdk_device_set_source
gdk_devices_list
gdk_dnd_init
gdk_drag_abort
gdk_drag_begin
......@@ -70,13 +75,13 @@ EXPORTS
gdk_draw_polygon
gdk_draw_rectangle
gdk_draw_rgb_32_image
gdk_draw_rgb_32_image_dithalign
gdk_draw_rgb_image
gdk_draw_rgb_image_dithalign
gdk_draw_segments
gdk_draw_string
gdk_draw_text
gdk_draw_text_wc
gdk_drawable_alloc
gdk_drawable_get_colormap
gdk_drawable_get_size
gdk_drawable_get_type
......@@ -124,7 +129,6 @@ EXPORTS
gdk_fontset_load
gdk_free_compound_text
gdk_free_text_list
gdk_gc_alloc
gdk_gc_copy
gdk_gc_get_values
gdk_gc_new
......@@ -163,7 +167,6 @@ EXPORTS
gdk_im_end
gdk_im_ready
gdk_im_set_best_style
gdk_image_bitmap_new
gdk_image_get
gdk_image_get_pixel
gdk_image_new
......@@ -177,15 +180,9 @@ EXPORTS
gdk_input_add_full
gdk_input_exit
gdk_input_init
gdk_input_list_devices
gdk_input_motion_events
gdk_input_remove
gdk_input_set_axes
gdk_input_set_extension_events
gdk_input_set_key
gdk_input_set_mode
gdk_input_set_source
gdk_input_window_get_pointer
gdk_key_repeat_disable
gdk_key_repeat_restore
gdk_keyboard_grab
......@@ -205,7 +202,6 @@ EXPORTS
gdk_pixmap_create_from_data
gdk_pixmap_create_from_xpm
gdk_pixmap_create_from_xpm_d
gdk_pixmap_create_on_shared_image
gdk_pixmap_foreign_new
gdk_pixmap_new
gdk_pointer_grab
......@@ -236,10 +232,11 @@ EXPORTS
gdk_region_xor
gdk_rgb_cmap_free
gdk_rgb_cmap_new
gdk_rgb_colormap_ditherable
gdk_rgb_ditherable
gdk_rgb_gc_set_background
gdk_rgb_gc_set_foreground
gdk_rgb_get_cmap
gdk_rgb_get_colormap
gdk_rgb_get_visual
gdk_rgb_init
gdk_rgb_set_install
......@@ -285,6 +282,7 @@ EXPORTS
gdk_visual_ref
gdk_visual_unref
gdk_wcstombs
gdk_win32_handle_table_lookup
gdk_win32_hdc_get
gdk_win32_hdc_release
gdk_window_add_filter
......@@ -345,5 +343,3 @@ EXPORTS
gdk_window_shape_combine_mask
gdk_window_show
gdk_window_withdraw
gdk_xid_table_insert
gdk_xid_table_lookup
......@@ -15,7 +15,7 @@ OPTIMIZE = -g
INCLUDES = -I . -I .. -I ../gdk-pixbuf
DEPCFLAGS = $(GLIB_CFLAGS) $(PANGO_CFLAGS)
DEFINES = -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
DEFINES = -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\" -DGDK_COMPILATION
all: \
../config.h \
......@@ -58,7 +58,7 @@ win32/gdk-win32res.o : FRC
cd win32 && $(MAKE) -f makefile.mingw gdk-win32res.o
gdk-win32-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32/libgdk-win32.a win32/gdk-win32res.o win32/libwntab32x.a
$(GLIB)/build-dll gdk-win32 $(GTK_VER) gdk.def $(gdk_OBJECTS) win32/gdk-win32.a win32/wntab32x.a $(GLIB_LIBS) -lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid $(LDFLAGS) win32/gdk-win32res.o
$(GLIB)/build-dll gdk-win32 $(GTK_VER) gdk.def $(gdk_OBJECTS) win32/libgdk-win32.a win32/libwntab32x.a -L ../gdk-pixbuf -lgdk_pixbuf-$(GTK_VER) $(GLIB_LIBS) $(PANGOWIN32_LIBS) -lgdi32 -luser32 -limm32 -lshell32 -lole32 -luuid $(LDFLAGS) win32/gdk-win32res.o
win32/libwntab32x.a : FRC
cd win32 && $(MAKE) -f makefile.mingw libwntab32x.a
......
......@@ -34,8 +34,6 @@
#include "gdkcolor.h"
#include "gdkprivate-win32.h"
#define GDK_COLORMAP_PRIVATE_DATA(cmap) ((GdkColormapPrivateWin32 *) GDK_COLORMAP (cmap)->windowing_data)
static void free_colormap (Colormap colormap);
static gint gdk_colormap_match_color (GdkColormap *cmap,
......
......@@ -1113,7 +1113,7 @@ gdk_drag_find_window (GdkDragContext *context,
POINT pt;
GDK_NOTE (DND, g_print ("gdk_drag_find_window: %#x +%d+%d\n",
(drag_window ? GDK_DRAWABLE_XID (drag_window) : 0),
(drag_window ? GDK_WINDOW_HWND (drag_window) : 0),
x_root, y_root));
pt.x = x_root;
......@@ -1123,7 +1123,7 @@ gdk_drag_find_window (GdkDragContext *context,
*dest_window = NULL;
else
{
*dest_window = gdk_window_lookup (recipient);
*dest_window = gdk_win32_handle_table_lookup (recipient);
if (*dest_window)
gdk_drawable_ref (*dest_window);
*protocol = GDK_DRAG_PROTO_WIN32_DROPFILES;
......@@ -1225,7 +1225,7 @@ gdk_window_register_dnd (GdkWindow *window)
g_return_if_fail (window != NULL);
GDK_NOTE (DND, g_print ("gdk_window_register_dnd: %#x\n",
GDK_DRAWABLE_XID (window)));
GDK_WINDOW_HWND (window)));
/* We always claim to accept dropped files, but in fact we might not,
* of course. This function is called in such a way that it cannot know
......@@ -1244,7 +1244,7 @@ gdk_window_register_dnd (GdkWindow *window)
OTHER_API_FAILED ("CoLockObjectExternal");
else
{
hres = RegisterDragDrop (GDK_DRAWABLE_XID (window), &ctx->idt);
hres = RegisterDragDrop (GDK_WINDOW_HWND (window), &ctx->idt);
if (hres == DRAGDROP_E_ALREADYREGISTERED)
{
g_print ("DRAGDROP_E_ALREADYREGISTERED\n");
......
......@@ -229,7 +229,7 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable,
(filled ? "fill " : ""),
width, height, x, y));
hdc = gdk_gc_predraw (drawable, gc_private, mask);
hdc = gdk_win32_hdc_get (drawable, gc, mask);
#if 0
{
......@@ -307,7 +307,7 @@ gdk_win32_draw_rectangle (GdkDrawable *drawable,
SelectObject (hdc, oldbrush);
}
gdk_gc_postdraw (drawable, gc_private, mask);
gdk_win32_hdc_release (drawable, gc, mask);
}
static void
......@@ -336,7 +336,7 @@ gdk_win32_draw_arc (GdkDrawable *drawable,
if (width <= 2 || height <= 2 || angle2 == 0)
return;
hdc = gdk_gc_predraw (drawable, gc_private, mask);
hdc = gdk_win32_hdc_get (drawable, gc, mask);
if (angle2 >= 360*64)
{
......@@ -380,7 +380,7 @@ gdk_win32_draw_arc (GdkDrawable *drawable,
nXStartArc, nYStartArc, nXEndArc, nYEndArc))
WIN32_GDI_FAILED ("Arc");
}
gdk_gc_postdraw (drawable, gc_private, mask);
gdk_win32_hdc_release (drawable, gc, mask);
}
static void
......@@ -405,7 +405,7 @@ gdk_win32_draw_polygon (GdkDrawable *drawable,
if (npoints < 2)
return;
hdc = gdk_gc_predraw (drawable, gc_private, mask);
hdc = gdk_win32_hdc_get (drawable, gc, mask);
pts = g_new (POINT, npoints+1);
for (i = 0; i < npoints; i++)
......@@ -467,7 +467,7 @@ gdk_win32_draw_polygon (GdkDrawable *drawable,
}
}
g_free (pts);
gdk_gc_postdraw (drawable, gc_private, mask);
gdk_win32_hdc_release (drawable, gc, mask);
}
typedef struct
......@@ -525,7 +525,7 @@ gdk_win32_draw_text (GdkDrawable *drawable,
arg.x = x;
arg.y = y;
arg.hdc = gdk_gc_predraw (drawable, gc_private, mask);
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),
......@@ -550,7 +550,7 @@ gdk_win32_draw_text (GdkDrawable *drawable,
}
gdk_gc_postdraw (drawable, gc_private, mask);
gdk_win32_hdc_release (drawable, gc, mask);
}
static void
......@@ -575,7 +575,7 @@ gdk_win32_draw_text_wc (GdkDrawable *drawable,
arg.x = x;
arg.y = y;
arg.hdc = gdk_gc_predraw (drawable, gc_private, mask);
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),
......@@ -596,7 +596,7 @@ gdk_win32_draw_text_wc (GdkDrawable *drawable,
if (sizeof (wchar_t) != sizeof (GdkWChar))
g_free (wcstr);
gdk_gc_postdraw (drawable, gc_private, mask);
gdk_win32_hdc_release (drawable, gc, mask);
}
static void
......@@ -626,13 +626,13 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
GDK_PIXMAP_HBITMAP (src),
width, height, xsrc, ysrc));
hdc = gdk_gc_predraw (drawable, gc_private, 0);
hdc = gdk_win32_hdc_get (drawable, gc, 0);
gdk_drawable_get_size (src, &src_width, &src_height);
src_rgn = CreateRectRgn (0, 0, src_width + 1, src_height + 1);
draw_rgn = CreateRectRgn (xsrc, ysrc, xsrc + width + 1, ysrc + height + 1);
if (!GDK_IS_PIXMAP (drawable))
if (GDK_IS_WINDOW (drawable))
{
/* If we are drawing on a window, calculate the region that is
* outside the source pixmap, and invalidate that, causing it to
......@@ -738,7 +738,7 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
WIN32_GDI_FAILED ("BitBlt");
ReleaseDC (GDK_WINDOW_HWND (src), srcdc);
}
gdk_gc_postdraw (drawable, gc_private, 0);
gdk_win32_hdc_release (drawable, gc, 0);
}
static void
......@@ -751,21 +751,19 @@ gdk_win32_draw_points (GdkDrawable *drawable,
COLORREF fg;
GdkGCWin32 *gc_private = GDK_GC_WIN32 (gc);
GdkDrawableImplWin32 *impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
GdkColormapPrivateWin32 *colormap_private =
(GdkColormapPrivateWin32 *) impl->colormap;
int i;
hdc = gdk_gc_predraw (drawable, gc_private, 0);
hdc = gdk_win32_hdc_get (drawable, gc, 0);
fg = gdk_colormap_color (colormap_private, gc_private->foreground);
fg = gdk_colormap_color (impl->colormap, gc_private->foreground);
GDK_NOTE (MISC, g_print ("gdk_draw_points: %#x %dx%.06x\n",
GDK_DRAWABLE_XID (drawable), npoints, fg));
GDK_DRAWABLE_HANDLE (drawable), npoints, fg));
for (i = 0; i < npoints; i++)
SetPixel (hdc, points[i].x, points[i].y, fg);
gdk_gc_postdraw (drawable, gc_private, 0);
gdk_win32_hdc_release (drawable, gc, 0);
}
static void
......@@ -784,7 +782,7 @@ gdk_win32_draw_segments (GdkDrawable *drawable,
GDK_NOTE (MISC, g_print ("gdk_win32_draw_segments: %#x nsegs: %d\n",
GDK_DRAWABLE_HANDLE (drawable), nsegs));
hdc = gdk_gc_predraw (drawable, gc_private, mask);
hdc = gdk_win32_hdc_get (drawable, gc, mask);
if (gc_private->fill_style == GDK_OPAQUE_STIPPLED)
{
......@@ -832,7 +830,7 @@ gdk_win32_draw_segments (GdkDrawable *drawable,
WIN32_GDI_FAILED ("LineTo"), ok = FALSE;
}
}
gdk_gc_postdraw (drawable, gc_private, mask);
gdk_win32_hdc_release (drawable, gc, mask);
}
static void
......@@ -851,7 +849,7 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
if (npoints < 2)
return;
hdc = gdk_gc_predraw (drawable, gc_private, mask);
hdc = gdk_win32_hdc_get (drawable, gc, mask);
pts = g_new (POINT, npoints);
......@@ -873,7 +871,7 @@ gdk_win32_draw_lines (GdkDrawable *drawable,
if (!LineTo (hdc, points[npoints-1].x + 1, points[npoints-1].y))
WIN32_GDI_FAILED ("LineTo");
}
gdk_gc_postdraw (drawable, gc_private, mask);
gdk_win32_hdc_release (drawable, gc, mask);
}
static void
......@@ -889,11 +887,11 @@ gdk_win32_draw_glyphs (GdkDrawable *drawable,
const GdkGCValuesMask mask = GDK_GC_FOREGROUND;
HDC hdc;
hdc = gdk_gc_predraw (drawable, gc_private, mask);
hdc = gdk_win32_hdc_get (drawable, gc, mask);
pango_win32_render (hdc, font, glyphs, x, y);
gdk_gc_postdraw (drawable, gc_private, mask);
gdk_win32_hdc_release (drawable, gc, mask);
}
static void
......@@ -922,7 +920,7 @@ gdk_win32_draw_image (GdkDrawable *drawable,
gboolean ok = TRUE;
int i;
hdc = gdk_gc_predraw (drawable, gc_private, 0);
hdc = gdk_win32_hdc_get (drawable, gc, 0);
if (colormap_private && colormap_private->xcolormap->rc_palette)
{
......@@ -978,7 +976,7 @@ gdk_win32_draw_image (GdkDrawable *drawable,
if (memdc != NULL && !DeleteDC (memdc))
WIN32_GDI_FAILED ("DeleteDC");
}
gdk_gc_postdraw (drawable, gc_private, 0);
gdk_win32_hdc_release (drawable, gc, 0);
}
static gint
......
......@@ -38,16 +38,7 @@
#include <stdio.h>
#include "gdk.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#include "gdkdrawable-win32.h"
#include "gdkwindow-win32.h"
#include "gdkpixmap-win32.h"
#include "gdkkeysyms.h"
#include "gdkinputprivate.h"
#include <objbase.h>
#include <imm.h>
......@@ -58,9 +49,14 @@
#include "surrogate-dimm.h"
#endif
#ifdef HAVE_WINTAB
#include <wintab.h>
#endif
#include "gdk.h"
#include "gdkinternals.h"
#include "gdkdrawable-win32.h"
#include "gdkwindow-win32.h"
#include "gdkpixmap-win32.h"
#include "gdkinput-win32.h"
#include "gdkkeysyms.h"
#define PING() printf("%s: %d\n",__FILE__,__LINE__),fflush(stdout)
......@@ -330,7 +326,7 @@ gdk_events_init (void)
if (track_mouse_event != NULL)
GDK_NOTE (EVENTS, g_print ("Using TrackMouseEvent to detect leave events\n"));
#endif
if (IS_WIN_NT (windows_version) && (windows_version & 0xFF) == 5)
if (IS_WIN_NT () && (windows_version & 0xFF) == 5)
{
/* On Win2k (Beta 3, at least) WM_IME_CHAR doesn't seem to work
* correctly for non-Unicode applications. Handle
......@@ -488,7 +484,7 @@ gdk_pointer_grab (GdkWindow *window,
cursor_private = (GdkCursorPrivate*) cursor;
if (!confine_to || GDK_DRAWABLE_DESTROYED (confine_to))
if (!confine_to || GDK_WINDOW_DESTROYED (confine_to))
hwnd_confined_to = NULL;
else
hwnd_confined_to = GDK_WINDOW_HWND (confine_to);
......@@ -498,35 +494,32 @@ gdk_pointer_grab (GdkWindow *window,
else
hcursor = cursor_private->hcursor;