forked from AuroraMiddleware/gtk
Update.
2000-10-09 Tor Lillqvist <tml@iki.fi> * README.win32: Update. * gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two lines that had been deleted by mistake (?). * gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle also the case fg==white and bg==black (but still not randomly coloured cursors). Thanks to Wolfgang Sourdeau. * gdk/win32/*.c: Silence gcc -Wall. * gtk/gtk.def: Add missing entry points. Fixes by Hans Breuer: * gdk/makefile.msc * gdk/win32/makefile.msc: Update. * gdk/testgdk.c: If compiling with debugging (with _DEBUG defined, some MSVC thing, presumably), cause breakpoint on failures. Add GDK_NOR case. Call g_log_set_always_fatal. * gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle should be pased by reference. * gdk/win32/gdkprivate-win32.h: Correct declaration accordingly. * gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert. * gdk/win32/gdkevents-win32.c * gdk/win32/gdkwindow-win32.c: Handle WM_CREATE. * gdk/win32/gdkgc-win32.c: Fix mixups of drawable and implementation object. * gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables, not just windows. * gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize): Use the wrapper object.
This commit is contained in:
parent
ea708d50f2
commit
658b4b1da8
43
ChangeLog
43
ChangeLog
@ -1,3 +1,46 @@
|
||||
2000-10-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
|
||||
lines that had been deleted by mistake (?).
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
|
||||
also the case fg==white and bg==black (but still not randomly
|
||||
coloured cursors). Thanks to Wolfgang Sourdeau.
|
||||
|
||||
* gdk/win32/*.c: Silence gcc -Wall.
|
||||
|
||||
* gtk/gtk.def: Add missing entry points.
|
||||
|
||||
Fixes by Hans Breuer:
|
||||
|
||||
* gdk/makefile.msc
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
|
||||
some MSVC thing, presumably), cause breakpoint on failures. Add
|
||||
GDK_NOR case. Call g_log_set_always_fatal.
|
||||
|
||||
* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
|
||||
should be pased by reference.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.
|
||||
|
||||
* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.
|
||||
|
||||
* gdk/win32/gdkevents-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
|
||||
implementation object.
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
|
||||
not just windows.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
|
||||
Use the wrapper object.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* Makefile.am (SRC_SUBDIRS): contrib subdir
|
||||
|
@ -1,3 +1,46 @@
|
||||
2000-10-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
|
||||
lines that had been deleted by mistake (?).
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
|
||||
also the case fg==white and bg==black (but still not randomly
|
||||
coloured cursors). Thanks to Wolfgang Sourdeau.
|
||||
|
||||
* gdk/win32/*.c: Silence gcc -Wall.
|
||||
|
||||
* gtk/gtk.def: Add missing entry points.
|
||||
|
||||
Fixes by Hans Breuer:
|
||||
|
||||
* gdk/makefile.msc
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
|
||||
some MSVC thing, presumably), cause breakpoint on failures. Add
|
||||
GDK_NOR case. Call g_log_set_always_fatal.
|
||||
|
||||
* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
|
||||
should be pased by reference.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.
|
||||
|
||||
* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.
|
||||
|
||||
* gdk/win32/gdkevents-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
|
||||
implementation object.
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
|
||||
not just windows.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
|
||||
Use the wrapper object.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* Makefile.am (SRC_SUBDIRS): contrib subdir
|
||||
|
@ -1,3 +1,46 @@
|
||||
2000-10-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
|
||||
lines that had been deleted by mistake (?).
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
|
||||
also the case fg==white and bg==black (but still not randomly
|
||||
coloured cursors). Thanks to Wolfgang Sourdeau.
|
||||
|
||||
* gdk/win32/*.c: Silence gcc -Wall.
|
||||
|
||||
* gtk/gtk.def: Add missing entry points.
|
||||
|
||||
Fixes by Hans Breuer:
|
||||
|
||||
* gdk/makefile.msc
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
|
||||
some MSVC thing, presumably), cause breakpoint on failures. Add
|
||||
GDK_NOR case. Call g_log_set_always_fatal.
|
||||
|
||||
* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
|
||||
should be pased by reference.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.
|
||||
|
||||
* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.
|
||||
|
||||
* gdk/win32/gdkevents-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
|
||||
implementation object.
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
|
||||
not just windows.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
|
||||
Use the wrapper object.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* Makefile.am (SRC_SUBDIRS): contrib subdir
|
||||
|
@ -1,3 +1,46 @@
|
||||
2000-10-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
|
||||
lines that had been deleted by mistake (?).
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
|
||||
also the case fg==white and bg==black (but still not randomly
|
||||
coloured cursors). Thanks to Wolfgang Sourdeau.
|
||||
|
||||
* gdk/win32/*.c: Silence gcc -Wall.
|
||||
|
||||
* gtk/gtk.def: Add missing entry points.
|
||||
|
||||
Fixes by Hans Breuer:
|
||||
|
||||
* gdk/makefile.msc
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
|
||||
some MSVC thing, presumably), cause breakpoint on failures. Add
|
||||
GDK_NOR case. Call g_log_set_always_fatal.
|
||||
|
||||
* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
|
||||
should be pased by reference.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.
|
||||
|
||||
* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.
|
||||
|
||||
* gdk/win32/gdkevents-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
|
||||
implementation object.
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
|
||||
not just windows.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
|
||||
Use the wrapper object.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* Makefile.am (SRC_SUBDIRS): contrib subdir
|
||||
|
@ -1,3 +1,46 @@
|
||||
2000-10-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
|
||||
lines that had been deleted by mistake (?).
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
|
||||
also the case fg==white and bg==black (but still not randomly
|
||||
coloured cursors). Thanks to Wolfgang Sourdeau.
|
||||
|
||||
* gdk/win32/*.c: Silence gcc -Wall.
|
||||
|
||||
* gtk/gtk.def: Add missing entry points.
|
||||
|
||||
Fixes by Hans Breuer:
|
||||
|
||||
* gdk/makefile.msc
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
|
||||
some MSVC thing, presumably), cause breakpoint on failures. Add
|
||||
GDK_NOR case. Call g_log_set_always_fatal.
|
||||
|
||||
* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
|
||||
should be pased by reference.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.
|
||||
|
||||
* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.
|
||||
|
||||
* gdk/win32/gdkevents-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
|
||||
implementation object.
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
|
||||
not just windows.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
|
||||
Use the wrapper object.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* Makefile.am (SRC_SUBDIRS): contrib subdir
|
||||
|
@ -1,3 +1,46 @@
|
||||
2000-10-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
|
||||
lines that had been deleted by mistake (?).
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
|
||||
also the case fg==white and bg==black (but still not randomly
|
||||
coloured cursors). Thanks to Wolfgang Sourdeau.
|
||||
|
||||
* gdk/win32/*.c: Silence gcc -Wall.
|
||||
|
||||
* gtk/gtk.def: Add missing entry points.
|
||||
|
||||
Fixes by Hans Breuer:
|
||||
|
||||
* gdk/makefile.msc
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
|
||||
some MSVC thing, presumably), cause breakpoint on failures. Add
|
||||
GDK_NOR case. Call g_log_set_always_fatal.
|
||||
|
||||
* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
|
||||
should be pased by reference.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.
|
||||
|
||||
* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.
|
||||
|
||||
* gdk/win32/gdkevents-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
|
||||
implementation object.
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
|
||||
not just windows.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
|
||||
Use the wrapper object.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* Makefile.am (SRC_SUBDIRS): contrib subdir
|
||||
|
@ -1,3 +1,46 @@
|
||||
2000-10-09 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update.
|
||||
|
||||
* gdk/win32/gdkgeometry-win32.c (gdk_window_clip_changed): Add two
|
||||
lines that had been deleted by mistake (?).
|
||||
|
||||
* gdk/win32/gdkcursor-win32.c (gdk_cursor_new_from_pixmap): Handle
|
||||
also the case fg==white and bg==black (but still not randomly
|
||||
coloured cursors). Thanks to Wolfgang Sourdeau.
|
||||
|
||||
* gdk/win32/*.c: Silence gcc -Wall.
|
||||
|
||||
* gtk/gtk.def: Add missing entry points.
|
||||
|
||||
Fixes by Hans Breuer:
|
||||
|
||||
* gdk/makefile.msc
|
||||
* gdk/win32/makefile.msc: Update.
|
||||
|
||||
* gdk/testgdk.c: If compiling with debugging (with _DEBUG defined,
|
||||
some MSVC thing, presumably), cause breakpoint on failures. Add
|
||||
GDK_NOR case. Call g_log_set_always_fatal.
|
||||
|
||||
* gdk/win32/gdkwin32id.c (gdk_win32_handle_table_insert): Handle
|
||||
should be pased by reference.
|
||||
|
||||
* gdk/win32/gdkprivate-win32.h: Correct declaration accordingly.
|
||||
|
||||
* gdk/win32/*.c: Correct calls to gdk_win32_handle_table_insert.
|
||||
|
||||
* gdk/win32/gdkevents-win32.c
|
||||
* gdk/win32/gdkwindow-win32.c: Handle WM_CREATE.
|
||||
|
||||
* gdk/win32/gdkgc-win32.c: Fix mixups of drawable and
|
||||
implementation object.
|
||||
|
||||
* gdk/win32/gdkimage-win32.c (gdk_image_get): Handle drawables,
|
||||
not just windows.
|
||||
|
||||
* gdk/win32/gdkpixmap-win32.c (gdk_pixmap_impl_win32_finalize):
|
||||
Use the wrapper object.
|
||||
|
||||
2000-10-06 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* Makefile.am (SRC_SUBDIRS): contrib subdir
|
||||
|
27
README.win32
27
README.win32
@ -1,22 +1,23 @@
|
||||
This current (CVS) version of the Win32 backend does *not* even
|
||||
compile properly. A zipfile with an older snapshot (from before the
|
||||
merge of the no-flicker branch, and the other recent additions), is
|
||||
available from http://www.gimp.org/win32/. That should be use by
|
||||
"production" code until this CVS version is useable. (But note, the
|
||||
Win32 backend has never been claimed to be "production quality",
|
||||
although it works OK for the GIMP.)
|
||||
|
||||
The Win32 port of GTk+ is a work in progress, and not as stable or
|
||||
correct as the Unix/X11 version. For more information about the Win32
|
||||
port, see http://www.gimp.org/win32/ or
|
||||
http://www.iki.fi/tml/gimp/win32/ .
|
||||
|
||||
To build GTk+ on Win32, you need either the Microsoft compiler and
|
||||
tools, or gcc-2.95 or later. The mingw setup of gcc is preferred, but
|
||||
This current (CVS) version of the Win32 backend does *not* necessarily
|
||||
even compile properly. A zipfile with an older snapshot (from before
|
||||
the merge of the no-flicker branch, and the other recent additions),
|
||||
is available from http://www.gimp.org/win32/. That should be used by
|
||||
"production" code until this CVS version is useable. (But note, the
|
||||
Win32 backend has never been claimed to be "production quality",
|
||||
although it works OK for the GIMP.)
|
||||
|
||||
To build GTk+ on Win32, you need either gcc-2.95 or later, or the
|
||||
Microsoft compiler and tools. The mingw setup of gcc is preferred, but
|
||||
you can run gcc also under cygwin-b20.1 or later. Compile in
|
||||
gdk\win32, gdk and gtk with `nmake -f makefile.msc` or `make -f
|
||||
makefile.cygwin`. The name makefile.cygwin is misleading, it should
|
||||
really be called makefile.mingw.
|
||||
gdk\win32, gdk and gtk with `make -f makefile.mingw` (gcc) or `nmake
|
||||
-f makefile.msc` (MSVC). The name makefile.mingw needs an explanation:
|
||||
It refers to the target, not the build environment. As build
|
||||
envíronment, only cygwin is tested. GNU Make is definitely needed.
|
||||
|
||||
See the README.win32 file in the GLib distribution for instructions
|
||||
how to build with gcc.
|
||||
|
@ -6,7 +6,11 @@
|
||||
## There is no install target, you have to decide where and
|
||||
## how to install for yourself.
|
||||
|
||||
TOP = ../..
|
||||
!INCLUDE $(TOP)/build/win32/make.msc
|
||||
|
||||
# Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
|
||||
# definition should possibly go to build/win32/module.def, too.
|
||||
WTKIT = ..\..\wtkit126
|
||||
|
||||
###############################################################
|
||||
@ -28,16 +32,19 @@ CC = cl -G5 -GF $(OPTIMIZE) -W3 -nologo
|
||||
|
||||
LDFLAGS = /link $(LINKDEBUG)
|
||||
|
||||
GLIB_VER=1.3
|
||||
# overwrite version?
|
||||
GTK_VER=1.3
|
||||
|
||||
GLIB = ..\..\glib
|
||||
CFLAGS = -I . -I .. -I $(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
|
||||
CFLAGS = -I . -I .. $(GLIB_CFLAGS) $(PANGO_CFLAGS) -I ../gdk-pixbuf \
|
||||
-DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
|
||||
EXTRALIBS = $(WTKIT)\lib\i386\wntab32x.lib $(GLIB_LIBS) \
|
||||
..\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib $(PANGOWIN32_LIBS)
|
||||
|
||||
all: \
|
||||
..\config.h \
|
||||
gdkconfig.h \
|
||||
gdk-$(GTK_VER).dll
|
||||
gdk-$(GTK_VER).dll \
|
||||
testgdk.exe
|
||||
|
||||
gdk_OBJECTS = \
|
||||
gdk.obj \
|
||||
@ -49,6 +56,12 @@ gdk_OBJECTS = \
|
||||
gdkgc.obj \
|
||||
gdkglobals.obj \
|
||||
gdkimage.obj \
|
||||
gdkkeyuni.obj \
|
||||
gdkpango.obj \
|
||||
gdkpixmap.obj \
|
||||
gdkregion-generic.obj \
|
||||
gdkpixbuf-render.obj \
|
||||
gdkpolyreg-generic.obj \
|
||||
gdkrgb.obj \
|
||||
gdkrectangle.obj \
|
||||
gdkwindow.obj
|
||||
@ -60,7 +73,10 @@ gdkconfig.h : gdkconfig.h.win32
|
||||
copy gdkconfig.h.win32 gdkconfig.h
|
||||
|
||||
gdk-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32\gdk-win32.lib
|
||||
$(CC) $(CFLAGS) -LD -Fegdk-$(GTK_VER).dll $(gdk_OBJECTS) win32\gdk-win32.lib $(WTKIT)\lib\i386\wntab32x.lib $(GLIB)\glib-$(GLIB_VER).lib gdi32.lib user32.lib imm32.lib shell32.lib ole32.lib uuid.lib win32\gdk.res $(LDFLAGS) /def:gdk.def
|
||||
$(CC) $(CFLAGS) -LD -Fegdk-$(GTK_VER).dll $(gdk_OBJECTS) win32\gdk-win32.lib $(EXTRALIBS) gdi32.lib user32.lib imm32.lib shell32.lib ole32.lib uuid.lib win32\gdk.res $(LDFLAGS) /def:gdk.def
|
||||
|
||||
testgdk.exe : gdk-$(GTK_VER).dll testgdk.obj
|
||||
$(CC) -Fetestgdk.exe testgdk.obj gdk-$(GTK_VER).lib $(EXTRALIBS) $(LDFLAGS)
|
||||
|
||||
.c.obj :
|
||||
$(CC) $(CFLAGS) -GD -c -DGDK_COMPILATION -DG_LOG_DOMAIN=\"Gdk\" $<
|
||||
|
@ -78,11 +78,24 @@
|
||||
#define QTESTF(expr, failfmt) \
|
||||
CQTESTF (TRUE, expr, failfmt)
|
||||
|
||||
#ifndef _DEBUG
|
||||
#define ASSERT(expr) \
|
||||
do { \
|
||||
if (!QTEST (expr)) \
|
||||
printf ("That is fatal. Goodbye\n"), exit (1);\
|
||||
} while (0)
|
||||
#else
|
||||
static void
|
||||
my_break()
|
||||
{
|
||||
G_BREAKPOINT();
|
||||
}
|
||||
#define ASSERT(expr) \
|
||||
do { \
|
||||
if (!QTEST (expr)) \
|
||||
printf ("That is fatal. Goodbye\n"), my_break();\
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define N(a) (sizeof(a)/sizeof(*a))
|
||||
|
||||
@ -475,6 +488,8 @@ test_gc_function (GdkFunction function,
|
||||
QTEST (newpixel == ((oldpixel | (~foreground)) & mask)); break;
|
||||
case GDK_NAND:
|
||||
QTEST (newpixel == (((~oldpixel) | (~foreground)) & mask)); break;
|
||||
case GDK_NOR:
|
||||
QTEST (newpixel == (~oldpixel & ~mask)); break;
|
||||
case GDK_SET:
|
||||
QTEST (newpixel == ((~0) & mask)); break;
|
||||
default:
|
||||
@ -900,8 +915,14 @@ tests (void)
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GLogLevelFlags fatal_mask;
|
||||
|
||||
gdk_init (&argc, &argv);
|
||||
|
||||
fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
|
||||
fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
|
||||
g_log_set_always_fatal (fatal_mask);
|
||||
|
||||
tests ();
|
||||
|
||||
return return_value;
|
||||
|
@ -122,7 +122,7 @@ gdk_cursor_new (GdkCursorType cursor_type)
|
||||
if (hcursor == NULL)
|
||||
WIN32_API_FAILED ("LoadCursor");
|
||||
GDK_NOTE (MISC, g_print ("gdk_cursor_new: %#x %d\n",
|
||||
hcursor, cursor_type));
|
||||
(guint) hcursor, cursor_type));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -140,6 +140,14 @@ gdk_cursor_new (GdkCursorType cursor_type)
|
||||
return cursor;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
color_is_white (GdkColor *color)
|
||||
{
|
||||
return (color->red == 0xFFFF
|
||||
&& color->green == 0xFFFF
|
||||
&& color->blue == 0xFFFF);
|
||||
}
|
||||
|
||||
GdkCursor*
|
||||
gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
GdkPixmap *mask,
|
||||
@ -157,6 +165,7 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
gint width, height, cursor_width, cursor_height;
|
||||
guchar residue;
|
||||
gint ix, iy;
|
||||
const gboolean bg_is_white = color_is_white (bg);
|
||||
|
||||
g_return_val_if_fail (GDK_IS_PIXMAP (source), NULL);
|
||||
g_return_val_if_fail (GDK_IS_PIXMAP (mask), NULL);
|
||||
@ -193,7 +202,13 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
/* Such complex bit manipulation for this simple task, sigh.
|
||||
* The X cursor and Windows cursor concepts are quite different.
|
||||
* We assume here that we are always called with fg == black and
|
||||
* bg == white.
|
||||
* bg == white, *or* the other way around. Random colours won't work.
|
||||
* (Well, you will get a cursor, but not in those colours.)
|
||||
*/
|
||||
|
||||
/* Note: The comments below refer to the case fg==black and
|
||||
* bg==white, as that was what was implemented first. The fg==white
|
||||
* (the "if (fg->pixel)" branches) case was added later.
|
||||
*/
|
||||
|
||||
/* First set masked-out source bits, as all source bits matter on Windoze.
|
||||
@ -205,7 +220,10 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
q = (guchar *) mask_image->mem + iy*mask_image->bpl;
|
||||
|
||||
for (ix = 0; ix < ((width-1)/8+1); ix++)
|
||||
*p++ |= ~(*q++);
|
||||
if (bg_is_white)
|
||||
*p++ |= ~(*q++);
|
||||
else
|
||||
*p++ &= *q++;
|
||||
}
|
||||
|
||||
/* XOR mask is initialized to zero */
|
||||
@ -217,7 +235,11 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
q = xor_mask + iy*cursor_width/8;
|
||||
|
||||
for (ix = 0; ix < ((width-1)/8+1); ix++)
|
||||
*q++ = ~(*p++);
|
||||
if (bg_is_white)
|
||||
*q++ = ~(*p++);
|
||||
else
|
||||
*q++ = *p++;
|
||||
|
||||
q[-1] &= ~residue; /* Clear left-over bits */
|
||||
}
|
||||
|
||||
@ -232,6 +254,7 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
|
||||
for (ix = 0; ix < ((width-1)/8+1); ix++)
|
||||
*q++ = ~(*p++);
|
||||
|
||||
q[-1] |= residue; /* Set left-over bits */
|
||||
}
|
||||
|
||||
@ -240,11 +263,11 @@ gdk_cursor_new_from_pixmap (GdkPixmap *source,
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_cursor_new_from_pixmap: "
|
||||
"%#x (%dx%d) %#x (%dx%d) = %#x (%dx%d)\n",
|
||||
GDK_PIXMAP_HBITMAP (source),
|
||||
(guint) GDK_PIXMAP_HBITMAP (source),
|
||||
source_impl->width, source_impl->height,
|
||||
GDK_PIXMAP_HBITMAP (mask),
|
||||
(guint) GDK_PIXMAP_HBITMAP (mask),
|
||||
mask_impl->width, mask_impl->height,
|
||||
hcursor, cursor_width, cursor_height));
|
||||
(guint) hcursor, cursor_width, cursor_height));
|
||||
|
||||
g_free (xor_mask);
|
||||
g_free (and_mask);
|
||||
@ -270,7 +293,7 @@ _gdk_cursor_destroy (GdkCursor *cursor)
|
||||
private = (GdkCursorPrivate *) cursor;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("_gdk_cursor_destroy: %#x\n",
|
||||
(cursor->type == GDK_CURSOR_IS_PIXMAP) ? private->hcursor : 0));
|
||||
(cursor->type == GDK_CURSOR_IS_PIXMAP) ? (guint) private->hcursor : 0));
|
||||
|
||||
if (cursor->type == GDK_CURSOR_IS_PIXMAP)
|
||||
if (!DestroyCursor (private->hcursor))
|
||||
|
@ -791,7 +791,7 @@ target_context_new (void)
|
||||
result->context = gdk_drag_context_new ();
|
||||
result->context->is_source = FALSE;
|
||||
|
||||
GDK_NOTE (DND, g_print ("target_context_new: %#x\n", result));
|
||||
GDK_NOTE (DND, g_print ("target_context_new: %p\n", result));
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -810,7 +810,7 @@ source_context_new (void)
|
||||
result->context = gdk_drag_context_new ();
|
||||
result->context->is_source = TRUE;
|
||||
|
||||
GDK_NOTE (DND, g_print ("source_context_new: %#x\n", result));
|
||||
GDK_NOTE (DND, g_print ("source_context_new: %p\n", result));
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -951,7 +951,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
|
||||
MSG *msg = (MSG *) xev;
|
||||
HANDLE hdrop;
|
||||
POINT pt;
|
||||
gint nfiles, i, k;
|
||||
gint nfiles, i;
|
||||
guchar fileName[MAX_PATH], linkedFile[MAX_PATH];
|
||||
|
||||
if (text_uri_list_atom == GDK_NONE)
|
||||
@ -959,7 +959,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
|
||||
|
||||
if (msg->message == WM_DROPFILES)
|
||||
{
|
||||
GDK_NOTE (DND, g_print ("WM_DROPFILES: %#x\n", msg->hwnd));
|
||||
GDK_NOTE (DND, g_print ("WM_DROPFILES: %#x\n", (guint) msg->hwnd));
|
||||
|
||||
context = gdk_drag_context_new ();
|
||||
private = PRIVATE_DATA (context);
|
||||
@ -1075,9 +1075,9 @@ GdkDragContext *
|
||||
gdk_drag_begin (GdkWindow *window,
|
||||
GList *targets)
|
||||
{
|
||||
GList *tmp_list;
|
||||
source_drag_context *ctx;
|
||||
#ifdef OLE2_DND
|
||||
GList *tmp_list;
|
||||
data_object *dobj;
|
||||
HRESULT hResult;
|
||||
DWORD dwEffect;
|
||||
@ -1149,12 +1149,11 @@ gdk_drag_find_window (GdkDragContext *context,
|
||||
GdkWindow **dest_window,
|
||||
GdkDragProtocol *protocol)
|
||||
{
|
||||
GdkDragContextPrivateWin32 *private = PRIVATE_DATA (context);
|
||||
HWND recipient;
|
||||
POINT pt;
|
||||
|
||||
GDK_NOTE (DND, g_print ("gdk_drag_find_window: %#x +%d+%d\n",
|
||||
(drag_window ? GDK_WINDOW_HWND (drag_window) : 0),
|
||||
(drag_window ? (guint) GDK_WINDOW_HWND (drag_window) : 0),
|
||||
x_root, y_root));
|
||||
|
||||
pt.x = x_root;
|
||||
@ -1164,7 +1163,7 @@ gdk_drag_find_window (GdkDragContext *context,
|
||||
*dest_window = NULL;
|
||||
else
|
||||
{
|
||||
*dest_window = gdk_win32_handle_table_lookup (recipient);
|
||||
*dest_window = gdk_win32_handle_table_lookup (GPOINTER_TO_UINT(recipient));
|
||||
if (*dest_window)
|
||||
gdk_drawable_ref (*dest_window);
|
||||
*protocol = GDK_DRAG_PROTO_WIN32_DROPFILES;
|
||||
@ -1266,7 +1265,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_WINDOW_HWND (window)));
|
||||
(guint) 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
|
||||
|
@ -1197,7 +1197,7 @@ propagate (GdkWindow **window,
|
||||
if ((*doesnt_want_it) (GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (*window)->impl)->event_mask, msg))
|
||||
{
|
||||
/* Owner doesn't want it, propagate to parent. */
|
||||
if (GDK_WINDOW (GDK_WINDOW_OBJECT (window)->parent) == gdk_parent_root)
|
||||
if (GDK_WINDOW (GDK_WINDOW_OBJECT (*window)->parent) == gdk_parent_root)
|
||||
{
|
||||
/* No parent; check if grabbed */
|
||||
if (grab_window != NULL)
|
||||
@ -1396,6 +1396,30 @@ gdk_event_translate (GdkEvent *event,
|
||||
PostMessage (msg->hwnd, msg->message,
|
||||
msg->wParam, msg->lParam);
|
||||
}
|
||||
#ifndef WITHOUT_WM_CREATE
|
||||
else if (WM_CREATE == msg->message)
|
||||
{
|
||||
window = (UNALIGNED GdkWindow*) (((LPCREATESTRUCT) msg->lParam)->lpCreateParams);
|
||||
GDK_WINDOW_HWND (window) = msg->hwnd;
|
||||
GDK_NOTE (EVENTS, g_print ("gdk_event_translate: created %#x\n",
|
||||
(guint) msg->hwnd));
|
||||
# if 0
|
||||
/* This should handle allmost all the other window==NULL cases.
|
||||
* This code is executed while gdk_window_new is in it's
|
||||
* CreateWindowEx call.
|
||||
* Don't insert xid there a second time, if it's done here.
|
||||
*/
|
||||
gdk_drawable_ref (window);
|
||||
gdk_win32_handle_table_insert (&GDK_WINDOW_HWND(window), window);
|
||||
# endif
|
||||
}
|
||||
else
|
||||
{
|
||||
GDK_NOTE (EVENTS, g_print ("gdk_event_translate: %s for %#x (NULL)\n",
|
||||
gdk_win32_message_name(msg->message),
|
||||
(guint) msg->hwnd));
|
||||
}
|
||||
#endif
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -945,9 +945,9 @@ gdk_win32_hdc_get (GdkDrawable *drawable,
|
||||
|
||||
g_assert (win32_gc->hdc == NULL);
|
||||
|
||||
win32_gc->hwnd = GDK_DRAWABLE_HANDLE (drawable);
|
||||
|
||||
if (GDK_IS_PIXMAP (drawable))
|
||||
win32_gc->hwnd = GDK_DRAWABLE_IMPL_WIN32(drawable)->handle;
|
||||
|
||||
if (GDK_IS_PIXMAP_IMPL_WIN32 (drawable))
|
||||
{
|
||||
if ((win32_gc->hdc = CreateCompatibleDC (NULL)) == NULL)
|
||||
WIN32_GDI_FAILED ("CreateCompatibleDC"), ok = FALSE;
|
||||
@ -1151,7 +1151,7 @@ gdk_win32_hdc_release (GdkDrawable *drawable,
|
||||
WIN32_GDI_FAILED ("UnrealizeObject");
|
||||
}
|
||||
#endif
|
||||
if (GDK_IS_PIXMAP (drawable))
|
||||
if (GDK_IS_PIXMAP_IMPL_WIN32 (drawable))
|
||||
{
|
||||
if (!DeleteDC (win32_gc->hdc))
|
||||
WIN32_GDI_FAILED ("DeleteDC");
|
||||
|
@ -682,8 +682,8 @@ gdk_window_queue_translation (GdkWindow *window,
|
||||
item->u.translate.dx = dx;
|
||||
item->u.translate.dy = dy;
|
||||
|
||||
GDK_NOTE (EVENTS, g_print ("gdk_window_queue_translation %#x %d %d,%d\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
GDK_NOTE (EVENTS, g_print ("gdk_window_queue_translation %#x %ld %d,%d\n",
|
||||
(guint) GDK_WINDOW_HWND (window),
|
||||
item->serial,
|
||||
dx, dy));
|
||||
|
||||
@ -702,8 +702,8 @@ _gdk_windowing_window_queue_antiexpose (GdkWindow *window,
|
||||
item->type = GDK_WINDOW_QUEUE_ANTIEXPOSE;
|
||||
item->u.antiexpose.area = area;
|
||||
|
||||
GDK_NOTE (EVENTS, g_print ("_gdk_windowing_window_queue_antiexpose %#x %d %dx%d@+%d+%d\n",
|
||||
GDK_WINDOW_HWND (window),
|
||||
GDK_NOTE (EVENTS, g_print ("_gdk_windowing_window_queue_antiexpose %#x %ld %dx%d@+%d+%d\n",
|
||||
(guint) GDK_WINDOW_HWND (window),
|
||||
item->serial,
|
||||
area->extents.x2 - area->extents.x1,
|
||||
area->extents.y2 - area->extents.y1,
|
||||
@ -727,8 +727,8 @@ _gdk_window_process_expose (GdkWindow *window,
|
||||
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (GDK_WINDOW_OBJECT (window)->impl);
|
||||
|
||||
GDK_NOTE (EVENTS, g_print ("_gdk_window_process_expose %#x %d %dx%d@+%d+%d\n",
|
||||
GDK_WINDOW_HWND (window), serial,
|
||||
GDK_NOTE (EVENTS, g_print ("_gdk_window_process_expose %#x %ld %dx%d@+%d+%d\n",
|
||||
(guint) GDK_WINDOW_HWND (window), serial,
|
||||
area->width, area->height, area->x, area->y));
|
||||
|
||||
while (tmp_list)
|
||||
@ -802,8 +802,6 @@ gdk_window_tmp_reset_bg (GdkWindow *window)
|
||||
|
||||
if (obj->bg_pixmap)
|
||||
{
|
||||
HBITMAP hbitmap;
|
||||
|
||||
/* ??? */
|
||||
}
|
||||
else
|
||||
@ -825,6 +823,9 @@ gdk_window_clip_changed (GdkWindow *window,
|
||||
if (((GdkWindowObject *)window)->input_only)
|
||||
return;
|
||||
|
||||
obj = (GdkWindowObject *) window;
|
||||
impl = GDK_WINDOW_IMPL_WIN32 (obj->impl);
|
||||
|
||||
old_clip_region = gdk_region_rectangle (old_clip);
|
||||
new_clip_region = gdk_region_rectangle (new_clip);
|
||||
|
||||
@ -845,4 +846,3 @@ gdk_window_clip_changed (GdkWindow *window,
|
||||
gdk_region_destroy (new_clip_region);
|
||||
gdk_region_destroy (old_clip_region);
|
||||
}
|
||||
|
||||
|
@ -344,9 +344,9 @@ gdk_image_get (GdkWindow *window,
|
||||
BITMAP bm;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), NULL);
|
||||
g_return_val_if_fail (GDK_IS_DRAWABLE (window), NULL);
|
||||
|
||||
if (GDK_WINDOW_DESTROYED (window))
|
||||
if (GDK_IS_WINDOW (window) && GDK_WINDOW_DESTROYED (window))
|
||||
return NULL;
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_image_get: %#x %dx%d@+%d+%d\n",
|
||||
|
@ -31,6 +31,7 @@
|
||||
#include <stdio.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "gdk.h"
|
||||
#include "gdkinput.h"
|
||||
#include "gdkinternals.h"
|
||||
#include "gdkprivate-win32.h"
|
||||
@ -84,9 +85,6 @@ gdk_device_get_history (GdkDevice *device,
|
||||
GdkTimeCoord ***events,
|
||||
gint *n_events)
|
||||
{
|
||||
GdkTimeCoord **coords;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (window != NULL, FALSE);
|
||||
g_return_val_if_fail (GDK_IS_WINDOW (window), FALSE);
|
||||
g_return_val_if_fail (events != NULL, FALSE);
|
||||
@ -720,7 +718,9 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
GdkWindow *window)
|
||||
{
|
||||
#ifdef HAVE_WINTAB
|
||||
#if !USE_SYSCONTEXT
|
||||
GdkWindow *current_window;
|
||||
#endif
|
||||
GdkWindowObject *obj;
|
||||
GdkWindowImplWin32 *impl;
|
||||
GdkInputWindow *input_window;
|
||||
@ -729,7 +729,6 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
POINT pt;
|
||||
|
||||
PACKET packet;
|
||||
gint return_val;
|
||||
gint k;
|
||||
gint x, y;
|
||||
|
||||
@ -892,7 +891,7 @@ _gdk_input_other_event (GdkEvent *event,
|
||||
& (GDK_BUTTON1_MASK | GDK_BUTTON2_MASK
|
||||
| GDK_BUTTON3_MASK | GDK_BUTTON4_MASK
|
||||
| GDK_BUTTON5_MASK));
|
||||
GDK_NOTE (EVENTS, g_print ("WINTAB button %s:%d %g,%g %g %g,%g\n",
|
||||
GDK_NOTE (EVENTS, g_print ("WINTAB button %s:%d %g,%g\n",
|
||||
(event->button.type == GDK_BUTTON_PRESS ?
|
||||
"press" : "release"),
|
||||
event->button.button,
|
||||
|
@ -106,12 +106,12 @@ gdk_pixmap_impl_win32_finalize (GObject *object)
|
||||
GdkPixmap *wrapper = GDK_PIXMAP (GDK_DRAWABLE_IMPL_WIN32 (impl)->wrapper);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_pixmap_impl_win32_finalize: %#x\n",
|
||||
GDK_PIXMAP_HBITMAP (object)));
|
||||
(guint) GDK_PIXMAP_HBITMAP (wrapper)));
|
||||
|
||||
if (!DeleteObject (GDK_PIXMAP_HBITMAP (object)))
|
||||
if (!DeleteObject (GDK_PIXMAP_HBITMAP (wrapper)))
|
||||
WIN32_GDI_FAILED ("DeleteObject");
|
||||
|
||||
gdk_win32_handle_table_remove (GDK_PIXMAP_HBITMAP (object));
|
||||
gdk_win32_handle_table_remove (GDK_PIXMAP_HBITMAP (wrapper));
|
||||
|
||||
G_OBJECT_CLASS (parent_class)->finalize (object);
|
||||
}
|
||||
@ -268,9 +268,10 @@ gdk_pixmap_new (GdkWindow *window,
|
||||
}
|
||||
ReleaseDC (GDK_WINDOW_HWND (window), hdc);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("... = %#x\n", GDK_PIXMAP_HBITMAP (pixmap)));
|
||||
GDK_NOTE (MISC, g_print ("... = %#x\n",
|
||||
(guint) GDK_PIXMAP_HBITMAP (pixmap)));
|
||||
|
||||
gdk_win32_handle_table_insert (GDK_PIXMAP_HBITMAP (pixmap), pixmap);
|
||||
gdk_win32_handle_table_insert (&GDK_PIXMAP_HBITMAP (pixmap), pixmap);
|
||||
|
||||
return pixmap;
|
||||
}
|
||||
@ -352,12 +353,13 @@ gdk_bitmap_create_from_data (GdkWindow *window,
|
||||
draw_impl->handle = CreateBitmap (width, height, 1, 1, bits);
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_bitmap_create_from_data: %dx%d = %#x\n",
|
||||
width, height, GDK_PIXMAP_HBITMAP (pixmap)));
|
||||
width, height,
|
||||
(guint) GDK_PIXMAP_HBITMAP (pixmap)));
|
||||
|
||||
g_free (bits);
|
||||
|
||||
draw_impl->colormap = NULL;
|
||||
gdk_win32_handle_table_insert (GDK_PIXMAP_HBITMAP (pixmap), pixmap);
|
||||
gdk_win32_handle_table_insert (&GDK_PIXMAP_HBITMAP (pixmap), pixmap);
|
||||
|
||||
return pixmap;
|
||||
}
|
||||
@ -389,7 +391,7 @@ gdk_pixmap_create_from_data (GdkWindow *window,
|
||||
|
||||
GDK_NOTE (MISC, g_print ("gdk_pixmap_create_from_data: %dx%dx%d = %#x\n",
|
||||
width, height, depth,
|
||||
GDK_PIXMAP_HBITMAP (result)));
|
||||
(guint) GDK_PIXMAP_HBITMAP (result)));
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -402,7 +404,7 @@ gdk_pixmap_foreign_new (GdkNativeWindow anid)
|
||||
GdkPixmapImplWin32 *pix_impl;
|
||||
HBITMAP hbitmap;
|
||||
SIZE size;
|
||||
unsigned int x_ret, y_ret, w_ret, h_ret, bw_ret, depth_ret;
|
||||
unsigned int w_ret, h_ret;
|
||||
|
||||
/* check to make sure we were passed a HBITMAP */
|
||||
g_return_val_if_fail(GetObjectType ((HGDIOBJ) anid) == OBJ_BITMAP, NULL);
|
||||
@ -427,7 +429,7 @@ gdk_pixmap_foreign_new (GdkNativeWindow anid)
|
||||
pix_impl->width = w_ret;
|
||||
pix_impl->height = h_ret;
|
||||
|
||||
gdk_win32_handle_table_insert (GDK_PIXMAP_HBITMAP (pixmap), pixmap);
|
||||
gdk_win32_handle_table_insert (&GDK_PIXMAP_HBITMAP (pixmap), pixmap);
|
||||
|
||||
return pixmap;
|
||||
}
|
||||
|
@ -30,7 +30,20 @@
|
||||
#include <gdk/gdkprivate.h>
|
||||
#include "gdkwin32.h"
|
||||
|
||||
void gdk_win32_handle_table_insert (HANDLE handle,
|
||||
/* Routines from gdkgeometry-win32.c */
|
||||
void
|
||||
_gdk_window_init_position (GdkWindow *window);
|
||||
void
|
||||
_gdk_window_move_resize_child (GdkWindow *window,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
|
||||
void gdk_win32_selection_init (void);
|
||||
void gdk_win32_dnd_exit (void);
|
||||
|
||||
void gdk_win32_handle_table_insert (HANDLE *handle,
|
||||
gpointer data);
|
||||
void gdk_win32_handle_table_remove (HANDLE handle);
|
||||
|
||||
|
@ -110,6 +110,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* Missing messages */
|
||||
#ifndef WM_SYNCPAINT
|
||||
#define WM_SYNCPAINT 0x88
|
||||
#endif
|
||||
#ifndef WM_MOUSEWHEEL
|
||||
#define WM_MOUSEWHEEL 0X20A
|
||||
#endif
|
||||
|
@ -43,9 +43,8 @@ gdk_handle_compare (HANDLE *a,
|
||||
return (*a == *b);
|
||||
}
|
||||
|
||||
/* Note that the handle is passed by value to this function! */
|
||||
void
|
||||
gdk_win32_handle_table_insert (HANDLE handle,
|
||||
gdk_win32_handle_table_insert (HANDLE *handle,
|
||||
gpointer data)
|
||||
{
|
||||
g_return_if_fail (handle != NULL);
|
||||
@ -54,7 +53,7 @@ gdk_win32_handle_table_insert (HANDLE handle,
|
||||
handle_ht = g_hash_table_new ((GHashFunc) gdk_handle_hash,
|
||||
(GCompareFunc) gdk_handle_compare);
|
||||
|
||||
g_hash_table_insert (handle_ht, &handle, data);
|
||||
g_hash_table_insert (handle_ht, handle, data);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -222,7 +222,7 @@ _gdk_windowing_window_init (void)
|
||||
impl->width = width;
|
||||
impl->height = height;
|
||||
|
||||
gdk_win32_handle_table_insert (gdk_root_window, gdk_parent_root);
|
||||
gdk_win32_handle_table_insert (&gdk_root_window, gdk_parent_root);
|
||||
}
|
||||
|
||||
/* The Win API function AdjustWindowRect may return negative values
|
||||
@ -570,6 +570,7 @@ gdk_window_new (GdkWindow *parent,
|
||||
WideCharToMultiByte (GetACP (), 0, wctitle, -1,
|
||||
mbtitle, 3*titlelen, NULL, NULL);
|
||||
|
||||
#ifdef WITHOUT_WM_CREATE
|
||||
draw_impl->handle = CreateWindowEx (dwExStyle,
|
||||
MAKEINTRESOURCE(klass),
|
||||
mbtitle,
|
||||
@ -580,6 +581,43 @@ gdk_window_new (GdkWindow *parent,
|
||||
NULL,
|
||||
gdk_app_hmodule,
|
||||
NULL);
|
||||
#else
|
||||
{
|
||||
HWND hwndNew =
|
||||
CreateWindowEx (dwExStyle,
|
||||
MAKEINTRESOURCE(klass),
|
||||
mbtitle,
|
||||
dwStyle,
|
||||
x, y,
|
||||
width, height,
|
||||
hparent,
|
||||
NULL,
|
||||
gdk_app_hmodule,
|
||||
window);
|
||||
if (GDK_WINDOW_HWND (window) != hwndNew)
|
||||
{
|
||||
g_warning("gdk_window_new: gdk_event_translate::WM_CREATE (%#x, %#x) HWND mismatch.",
|
||||
GDK_WINDOW_HWND (window), hwndNew);
|
||||
|
||||
/* HB: IHMO due to a race condition the handle was increased by
|
||||
* one, which causes much trouble. Because I can't find the
|
||||
* real bug, try to workaround it ...
|
||||
* To reproduce: compile with MSVC 5, DEBUG=1
|
||||
*/
|
||||
# if 0
|
||||
gdk_win32_handle_table_remove (GDK_WINDOW_HWND (window));
|
||||
GDK_WINDOW_HWND (window) = hwndNew;
|
||||
gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window);
|
||||
# else
|
||||
/* the old behaviour, but with warning */
|
||||
GDK_WINDOW_HWND (window) = hwndNew;
|
||||
# endif
|
||||
|
||||
}
|
||||
}
|
||||
gdk_drawable_ref (window);
|
||||
gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window);
|
||||
#endif
|
||||
|
||||
GDK_NOTE (MISC,
|
||||
g_print ("gdk_window_new: %s %s %dx%d@+%d+%d %#x = %#x\n"
|
||||
@ -606,8 +644,10 @@ gdk_window_new (GdkWindow *parent,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#ifdef WITHOUT_WM_CREATE
|
||||
gdk_drawable_ref (window);
|
||||
gdk_win32_handle_table_insert (GDK_WINDOW_HWND (window), window);
|
||||
gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window);
|
||||
#endif
|
||||
|
||||
gdk_window_set_cursor (window, ((attributes_mask & GDK_WA_CURSOR) ?
|
||||
(attributes->cursor) :
|
||||
@ -659,7 +699,7 @@ gdk_window_foreign_new (GdkNativeWindow anid)
|
||||
private->depth = gdk_visual_get_system ()->depth;
|
||||
|
||||
gdk_drawable_ref (window);
|
||||
gdk_win32_handle_table_insert (GDK_WINDOW_HWND (window), window);
|
||||
gdk_win32_handle_table_insert (&GDK_WINDOW_HWND (window), window);
|
||||
|
||||
return window;
|
||||
}
|
||||
|
@ -8,6 +8,9 @@ WTKIT = ..\..\..\wtkit126
|
||||
|
||||
# Nothing much configurable below
|
||||
|
||||
TOP = ../../..
|
||||
!INCLUDE $(TOP)/build/win32/make.msc
|
||||
|
||||
!IFNDEF DEBUG
|
||||
# Full optimization:
|
||||
OPTIMIZE = -Ox -MD
|
||||
@ -21,11 +24,9 @@ CC = cl -G5 -GF $(OPTIMIZE) -W3 -nologo
|
||||
|
||||
LDFLAGS = /link /machine:ix86 $(LINKDEBUG)
|
||||
|
||||
GLIB_VER=1.3
|
||||
GTK_VER=1.3
|
||||
|
||||
GLIB = ..\..\..\glib
|
||||
CFLAGS = -I. -I.. -I..\.. -I$(WTKIT)\include -I$(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
|
||||
CFLAGS = -I. -I.. -I..\.. $(GLIB_CFLAGS) $(PANGO_CFLAGS) -I$(WTKIT)\include -I$(GLIB) -DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_VERSION=\"$(GTK_VER)\"
|
||||
|
||||
all: \
|
||||
..\..\config.h \
|
||||
@ -46,11 +47,13 @@ gdk_win32_OBJECTS = \
|
||||
gdkglobals-win32.obj \
|
||||
gdkim-win32.obj \
|
||||
gdkimage-win32.obj \
|
||||
gdkinput.obj \
|
||||
gdkinput-win32.obj \
|
||||
gdkmain-win32.obj \
|
||||
gdkpango-win32.obj \
|
||||
gdkpixmap-win32.obj \
|
||||
gdkproperty-win32.obj \
|
||||
gdkregion-win32.obj \
|
||||
# gdkregion-win32.obj \
|
||||
gdkselection-win32.obj \
|
||||
gdkvisual-win32.obj \
|
||||
gdkwin32id.obj \
|
||||
|
@ -1117,6 +1117,7 @@ EXPORTS
|
||||
gtk_text_buffer_get_iter_at_mark
|
||||
gtk_text_buffer_get_iter_at_offset
|
||||
gtk_text_buffer_get_line_count
|
||||
gtk_text_buffer_get_tag_table
|
||||
gtk_text_buffer_create_mark
|
||||
gtk_text_buffer_create_tag
|
||||
gtk_text_buffer_delete_mark
|
||||
@ -1141,18 +1142,24 @@ EXPORTS
|
||||
gtk_text_get_type
|
||||
gtk_text_insert
|
||||
gtk_text_iter_backward_chars
|
||||
gtk_text_iter_backward_to_tag_toggle
|
||||
gtk_text_iter_begins_tag
|
||||
gtk_text_iter_forward_chars
|
||||
gtk_text_iter_forward_line
|
||||
gtk_text_iter_forward_search
|
||||
gtk_text_iter_forward_to_tag_toggle
|
||||
gtk_text_iter_ends_tag
|
||||
gtk_text_iter_equal
|
||||
gtk_text_iter_get_attributes
|
||||
gtk_text_iter_get_line
|
||||
gtk_text_iter_get_offset
|
||||
gtk_text_iter_get_text
|
||||
gtk_text_iter_get_toggled_tags
|
||||
gtk_text_iter_is_last
|
||||
gtk_text_iter_next_char
|
||||
gtk_text_iter_prev_char
|
||||
gtk_text_iter_spew
|
||||
gtk_text_iter_toggles_tag
|
||||
gtk_text_new
|
||||
gtk_text_set_adjustments
|
||||
gtk_text_set_editable
|
||||
@ -1160,6 +1167,7 @@ EXPORTS
|
||||
gtk_text_set_point
|
||||
gtk_text_set_word_wrap
|
||||
gtk_text_tag_get_type
|
||||
gtk_text_tag_table_lookup
|
||||
gtk_text_thaw
|
||||
gtk_text_unknown_char
|
||||
gtk_text_unknown_char_utf8
|
||||
|
Loading…
Reference in New Issue
Block a user