Large changes to the Win32 backend, partially made necessary by the

2000-05-02  Tor Lillqvist  <tml@iki.fi>

Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)

* README.win32: Add the above comment about versions.

* gdk/gdkwindow.c: Don't use backing store for now on Win32.

* gdk/gdk.def: Update.

* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.

* gdk/makefile.{cygwin,msc}: Update.

* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.

* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.

* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.

* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.

* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.

* gdk/win32/gdkgc-win32.c: Largish changes.

* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.

* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.

* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.

* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.

* gtk/gtkstyle.c: Include <string.h>.
This commit is contained in:
Tor Lillqvist 2000-05-01 22:06:49 +00:00 committed by Tor Lillqvist
parent 33dc3d6d4c
commit 1f149b3a8d
37 changed files with 1349 additions and 597 deletions

View File

@ -1,3 +1,70 @@
2000-05-02 Tor Lillqvist <tml@iki.fi>
Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)
* README.win32: Add the above comment about versions.
* gdk/gdkwindow.c: Don't use backing store for now on Win32.
* gdk/gdk.def: Update.
* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.
* gdk/makefile.{cygwin,msc}: Update.
* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.
* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.
* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.
* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.
* gdk/win32/gdkgc-win32.c: Largish changes.
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.
* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.
* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.
* gtk/gtkstyle.c: Include <string.h>.
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,

View File

@ -1,3 +1,70 @@
2000-05-02 Tor Lillqvist <tml@iki.fi>
Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)
* README.win32: Add the above comment about versions.
* gdk/gdkwindow.c: Don't use backing store for now on Win32.
* gdk/gdk.def: Update.
* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.
* gdk/makefile.{cygwin,msc}: Update.
* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.
* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.
* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.
* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.
* gdk/win32/gdkgc-win32.c: Largish changes.
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.
* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.
* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.
* gtk/gtkstyle.c: Include <string.h>.
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,

View File

@ -1,3 +1,70 @@
2000-05-02 Tor Lillqvist <tml@iki.fi>
Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)
* README.win32: Add the above comment about versions.
* gdk/gdkwindow.c: Don't use backing store for now on Win32.
* gdk/gdk.def: Update.
* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.
* gdk/makefile.{cygwin,msc}: Update.
* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.
* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.
* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.
* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.
* gdk/win32/gdkgc-win32.c: Largish changes.
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.
* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.
* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.
* gtk/gtkstyle.c: Include <string.h>.
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,

View File

@ -1,3 +1,70 @@
2000-05-02 Tor Lillqvist <tml@iki.fi>
Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)
* README.win32: Add the above comment about versions.
* gdk/gdkwindow.c: Don't use backing store for now on Win32.
* gdk/gdk.def: Update.
* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.
* gdk/makefile.{cygwin,msc}: Update.
* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.
* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.
* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.
* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.
* gdk/win32/gdkgc-win32.c: Largish changes.
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.
* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.
* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.
* gtk/gtkstyle.c: Include <string.h>.
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,

View File

@ -1,3 +1,70 @@
2000-05-02 Tor Lillqvist <tml@iki.fi>
Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)
* README.win32: Add the above comment about versions.
* gdk/gdkwindow.c: Don't use backing store for now on Win32.
* gdk/gdk.def: Update.
* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.
* gdk/makefile.{cygwin,msc}: Update.
* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.
* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.
* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.
* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.
* gdk/win32/gdkgc-win32.c: Largish changes.
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.
* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.
* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.
* gtk/gtkstyle.c: Include <string.h>.
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,

View File

@ -1,3 +1,70 @@
2000-05-02 Tor Lillqvist <tml@iki.fi>
Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)
* README.win32: Add the above comment about versions.
* gdk/gdkwindow.c: Don't use backing store for now on Win32.
* gdk/gdk.def: Update.
* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.
* gdk/makefile.{cygwin,msc}: Update.
* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.
* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.
* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.
* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.
* gdk/win32/gdkgc-win32.c: Largish changes.
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.
* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.
* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.
* gtk/gtkstyle.c: Include <string.h>.
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,

View File

@ -1,3 +1,70 @@
2000-05-02 Tor Lillqvist <tml@iki.fi>
Large changes to the Win32 backend, partially made necessary by
the changes to the backend-independent internal
structures. Attempts to implement similar backing store stuff as
on X11. The current (CVS) version of the Win32 backend is *not* as
stable as it was before the no-flicker branch was merged. A
zipfile with that version is available from
http://www.gimp.org/win32/. That should be use by "production"
code until this CVS version is usable. (But note, the Win32
backend has never been claimed to be "production quality".)
* README.win32: Add the above comment about versions.
* gdk/gdkwindow.c: Don't use backing store for now on Win32.
* gdk/gdk.def: Update.
* gdk/gdkfont.h: Declare temporary Win32-only functions. Will
presumably be replaced by some more better mechanism as 1.4 gets
closer to release shape.
* gdk/makefile.{cygwin,msc}: Update.
* gdk/win32/*.c: Correct inclusions of the backend-specific and
internal headers. Change code according to changes in these. Use
gdk_drawable_*, not gdk_window_* where necessary.
* gdk/win32/gdkdnd-win32.c: Use MISC selector for GDK_NOTE, not
our old DND.
* gdk/win32/gdkdrawable-win32.c (gdk_win32_draw_text): Don't try
to interpret single characters as UTF-8. Thanks to Hans Breuer.
Use correct function name in warning messages.
* gdk/win32/gdkevents-win32.c: Use correct parameter lists for the
GSourceFuncs gdk_event_prepare and gdk_event_check.
(gdk_event_get_graphics_expose): Do implement, use
PeekMessage. Thanks to Hans Breuer.
(event_mask_string): Debugging function to print an GdkEventMask.
(gdk_pointer_grab): Use it.
* gdk/win32/gdkfont-win32.c: The Unicode subrange that the
(old) book I used claimed was Hangul actually is CJK Unified
Ideographs Extension A. Also, Hangul Syllables were missing.
Improve logging.
* gdk/win32/gdkgc-win32.c: Largish changes.
* gdk/win32/gdkim-win32.c (gdk_set_locale): Use
g_win32_getlocale() from GLib, and not setlocale() to get current
locale name.
* gdk/win32/gdkprivate-win32.h
* gdk/win32/gdkwin32.h: Move stuff from gdkprivate-win32.h to
gdkwin32.h, similarily as in the X11 backend.
* gdk/win32/gdkwindow-win32.c (gdk_propagate_shapes): Bugfix,
assignment was used instead of equals in if test. Thanks to Hans
Breuer.
* gdk/win32/makefile.{cygwin,msc}
* gtk/makefile.{cygwin,msc}: Updates. Better kludge to get the
path to the Win32 headers that works also with the mingw compiler.
* gtk/gtkstyle.c: Include <string.h>.
2000-04-26 Havoc Pennington <hp@redhat.com>
* gtk/gtklabel.c (gtk_label_get_text): Add this function,

View File

@ -3,10 +3,18 @@ correct as the Unix/X11 version. For more information about the Win32
port, see http://www.gimp.org/tml/gimp/win32/ or
http://www.iki.fi/tml/gimp/win32/ .
The current (CVS) version of the Win32 backend is *not* as stable as it
was before the no-flicker branch was merged. A zipfile with that
version is available from http://www.gimp.org/win32/. That should be
use by "production" code until this CVS version is usable. (But note,
the Win32 backend has never been claimed to be "production quality".)
To build GTk+ on Win32, you need either the Microsoft compiler and
tools, or gcc-2.95 or later running under cygwin-b20.1 or
later. Compile in gdk\win32, gdk and gtk with `nmake -f makefile.msc` or
`make -f makefile.cygwin`.
tools, or gcc-2.95 or later. 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.
See the README.win32 file in the GLib distribution for instructions
how to build with gcc.
@ -32,6 +40,6 @@ config.h.win32 file, and remove references to the gnu-intl library
from the makefiles.
Note that while the GNU gettext package is under the GPL, the "intl"
part of it as distributed with GNU libc is under the LGPL (like GTk+
or GLib). We want the LGPL one, even if they are the same, more or
less.
part of it which is distributed with GNU libc is under the LGPL (like
GTk+ or GLib). We want the LGPL one, even if they are the same, more
or less.

View File

@ -223,17 +223,17 @@ EXPORTS
gdk_region_empty
gdk_region_equal
gdk_region_get_clipbox
gdk_region_intersect
gdk_region_new
gdk_region_offset
gdk_region_point_in
gdk_region_polygon
gdk_region_rect_in
gdk_region_shrink
gdk_region_subtract
gdk_region_union
gdk_region_union_with_rect
gdk_regions_intersect
gdk_regions_subtract
gdk_regions_union
gdk_regions_xor
gdk_region_xor
gdk_rgb_cmap_free
gdk_rgb_cmap_new
gdk_rgb_ditherable
@ -258,6 +258,7 @@ EXPORTS
gdk_selection_send_notify
gdk_set_locale
gdk_set_show_events
gdk_set_sm_client_id
gdk_set_use_xshm
gdk_string_extents
gdk_string_height
@ -286,10 +287,12 @@ EXPORTS
gdk_wcstombs
gdk_window_add_filter
gdk_window_at_pointer
gdk_window_begin_paint_rect
gdk_window_clear
gdk_window_clear_area
gdk_window_clear_area_e
gdk_window_destroy
gdk_window_end_paint
gdk_window_foreign_new
gdk_window_get_children
gdk_window_get_deskrelative_origin
@ -304,6 +307,7 @@ EXPORTS
gdk_window_get_toplevels
gdk_window_get_user_data
gdk_window_hide
gdk_window_invalidate_rect
gdk_window_is_viewable
gdk_window_is_visible
gdk_window_lower
@ -311,6 +315,8 @@ EXPORTS
gdk_window_move
gdk_window_move_resize
gdk_window_new
gdk_window_process_all_updates
gdk_window_process_updates
gdk_window_raise
gdk_window_register_dnd
gdk_window_remove_filter

View File

@ -24,6 +24,13 @@ struct _GdkFont
gint descent;
};
#ifdef GDK_WINDOWING_WIN32
/* Temporary functions, will be replaced by something else for all backends
* eventually. Don't use!
*/
gchar** gdk_font_list_new (const gchar *font_pattern, gint *n_returned);
void gdk_font_list_free (gchar **font_list);
#endif
GdkFont* gdk_font_load (const gchar *font_name);
GdkFont* gdk_fontset_load (const gchar *fontset_name);
GdkFont* gdk_font_ref (GdkFont *font);
@ -83,6 +90,12 @@ void gdk_string_extents (GdkFont *font,
gint *ascent,
gint *descent);
#ifdef GDK_WINDOWING_WIN32
/* Ditto temporary */
gchar* gdk_font_full_name_get (GdkFont *font);
void gdk_font_full_name_free (gchar *name);
#endif
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -29,6 +29,12 @@
#include "gdk.h" /* For gdk_rectangle_union() */
#include "gdkpixmap.h"
#ifndef USE_BACKING_STORE
#ifndef GDK_WINDOWING_WIN32
#define USE_BACKING_STORE /* Doesn't work yet on Win32 */
#endif
#endif
typedef struct _GdkWindowPaint GdkWindowPaint;
struct _GdkWindowPaint
@ -435,6 +441,7 @@ void
gdk_window_begin_paint_region (GdkWindow *window,
GdkRegion *region)
{
#ifdef USE_BACKING_STORE
GdkWindowPrivate *private = (GdkWindowPrivate *)window;
GdkRectangle clip_box;
GdkWindowPaint *paint;
@ -520,11 +527,13 @@ gdk_window_begin_paint_region (GdkWindow *window,
gdk_region_destroy (init_region);
private->paint_stack = g_slist_prepend (private->paint_stack, paint);
#endif /* USE_BACKING_STORE */
}
void
gdk_window_end_paint (GdkWindow *window)
{
#ifdef USE_BACKING_STORE
GdkWindowPrivate *private = (GdkWindowPrivate *)window;
GdkWindowPaint *paint;
GdkGC *tmp_gc;
@ -570,6 +579,7 @@ gdk_window_end_paint (GdkWindow *window)
gdk_region_destroy (paint->region);
g_free (paint);
#endif /* USE_BACKING_STORE */
}
static void

View File

@ -6,7 +6,7 @@
## There is no install target, you have to decide where and
## how to install for yourself.
OPTIMIZE = -g -O
OPTIMIZE = -g
################################################################
@ -15,7 +15,6 @@ OPTIMIZE = -g -O
CC = gcc -mno-cygwin -mpentium -fnative-struct
CP = cp
LD = ld
GLIB_VER=1.3
GTK_VER=1.3

View File

@ -68,6 +68,7 @@
#include "gdkcc.h"
#include "gdkcolor.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#define MAX_IMAGE_COLORS 256

View File

@ -32,7 +32,7 @@
#include <time.h>
#include "gdkcolor.h"
#include "gdkwin32.h"
#include "gdkprivate-win32.h"
static gint gdk_colormap_match_color (GdkColormap *cmap,
GdkColor *color,
@ -45,7 +45,7 @@ static gint gdk_colormap_cmp (Colormap *a,
static GHashTable *colormap_hash = NULL;
static Status
static gboolean
alloc_color_cells(Colormap colormap,
gboolean contig,
unsigned long plane_masks_return[],
@ -1316,7 +1316,7 @@ default_colormap ()
GdkColormap*
gdk_colormap_new (GdkVisual *visual,
gint private_cmap)
gboolean private_cmap)
{
GdkColormap *colormap;
GdkColormapPrivateWin32 *private;
@ -1564,7 +1564,7 @@ gdk_colormap_change (GdkColormap *colormap,
gboolean
gdk_colors_alloc (GdkColormap *colormap,
gint contiguous,
gboolean contiguous,
gulong *planes,
gint nplanes,
gulong *pixels,
@ -1764,7 +1764,7 @@ gdk_colormap_alloc_colors_writeable (GdkColormap *colormap,
{
GdkColormapPrivateWin32 *private;
gulong *pixels;
Status status;
gboolean status;
gint i, index;
private = (GdkColormapPrivateWin32 *) colormap;

View File

@ -20,7 +20,8 @@
#include "config.h"
#include "gdkcursor.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
static const struct { const char *name; int type; } cursors[] = {
{ "x_cursor", 0 },

View File

@ -35,8 +35,8 @@
#include "gdkdnd.h"
#include "gdkproperty.h"
#include "gdkprivate.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#ifdef OLE2_DND
#include <ole2.h>
@ -144,9 +144,9 @@ gdk_drag_context_unref (GdkDragContext *context)
private->ref_count--;
GDK_NOTE (DND, g_print ("gdk_drag_context_unref: %d%s\n",
private->ref_count,
(private->ref_count == 0 ? " freeing" : "")));
GDK_NOTE (MISC, g_print ("gdk_drag_context_unref: %d%s\n",
private->ref_count,
(private->ref_count == 0 ? " freeing" : "")));
if (private->ref_count == 0)
{
@ -155,10 +155,10 @@ gdk_drag_context_unref (GdkDragContext *context)
g_list_free (context->targets);
if (context->source_window)
gdk_window_unref (context->source_window);
gdk_drawable_unref (context->source_window);
if (context->dest_window)
gdk_window_unref (context->dest_window);
gdk_drawable_unref (context->dest_window);
contexts = g_list_remove (contexts, private);
g_free (private);
@ -216,7 +216,7 @@ m_add_ref_target (IDropTarget __RPC_FAR *This)
target_drag_context *ctx = (target_drag_context *) This;
GdkDragContextPrivate *private = (GdkDragContextPrivate *) ctx->context;
GDK_NOTE (DND, g_print ("m_add_ref_target\n"));
GDK_NOTE (MISC, g_print ("m_add_ref_target\n"));
gdk_drag_context_ref (ctx->context);
return private->ref_count;
@ -227,7 +227,7 @@ m_query_interface_target (IDropTarget __RPC_FAR *This,
REFIID riid,
void __RPC_FAR *__RPC_FAR *ppvObject)
{
GDK_NOTE (DND, g_print ("m_query_interface_target\n"));
GDK_NOTE (MISC, g_print ("m_query_interface_target\n"));
*ppvObject = NULL;
@ -260,7 +260,7 @@ m_release_target (IDropTarget __RPC_FAR *This)
target_drag_context *ctx = (target_drag_context *) This;
GdkDragContextPrivate *private = (GdkDragContextPrivate *) ctx->context;
GDK_NOTE (DND, g_print ("m_release_target\n"));
GDK_NOTE (MISC, g_print ("m_release_target\n"));
gdk_drag_context_unref (ctx->context);
if (private->ref_count == 1)
@ -279,7 +279,7 @@ m_drag_enter (IDropTarget __RPC_FAR *This,
POINTL pt,
DWORD __RPC_FAR *pdwEffect)
{
GDK_NOTE (DND, g_print ("m_drag_enter\n"));
GDK_NOTE (MISC, g_print ("m_drag_enter\n"));
return E_UNEXPECTED;
}
@ -289,14 +289,14 @@ m_drag_over (IDropTarget __RPC_FAR *This,
POINTL pt,
DWORD __RPC_FAR *pdwEffect)
{
GDK_NOTE (DND, g_print ("m_drag_over\n"));
GDK_NOTE (MISC, g_print ("m_drag_over\n"));
return E_UNEXPECTED;
}
static HRESULT STDMETHODCALLTYPE
m_drag_leave (IDropTarget __RPC_FAR *This)
{
GDK_NOTE (DND, g_print ("m_drag_leave\n"));
GDK_NOTE (MISC, g_print ("m_drag_leave\n"));
return E_UNEXPECTED;
}
@ -307,7 +307,7 @@ m_drop (IDropTarget __RPC_FAR *This,
POINTL pt,
DWORD __RPC_FAR *pdwEffect)
{
GDK_NOTE (DND, g_print ("m_drop\n"));
GDK_NOTE (MISC, g_print ("m_drop\n"));
return E_UNEXPECTED;
}
@ -317,7 +317,7 @@ m_add_ref_source (IDropSource __RPC_FAR *This)
source_drag_context *ctx = (source_drag_context *) This;
GdkDragContextPrivate *private = (GdkDragContextPrivate *) ctx->context;
GDK_NOTE (DND, g_print ("m_add_ref_source\n"));
GDK_NOTE (MISC, g_print ("m_add_ref_source\n"));
gdk_drag_context_ref (ctx->context);
return private->ref_count;
@ -328,7 +328,7 @@ m_query_interface_source (IDropSource __RPC_FAR *This,
REFIID riid,
void __RPC_FAR *__RPC_FAR *ppvObject)
{
GDK_NOTE (DND, g_print ("m_query_interface_source\n"));
GDK_NOTE (MISC, g_print ("m_query_interface_source\n"));
*ppvObject = NULL;
@ -360,7 +360,7 @@ m_release_source (IDropSource __RPC_FAR *This)
source_drag_context *ctx = (source_drag_context *) This;
GdkDragContextPrivate *private = (GdkDragContextPrivate *) ctx->context;
GDK_NOTE (DND, g_print ("m_release_source\n"));
GDK_NOTE (MISC, g_print ("m_release_source\n"));
gdk_drag_context_unref (ctx->context);
if (private->ref_count == 1)
@ -377,7 +377,7 @@ m_query_continue_drag (IDropSource __RPC_FAR *This,
BOOL fEscapePressed,
DWORD grfKeyState)
{
GDK_NOTE (DND, g_print ("m_query_continue_drag\n"));
GDK_NOTE (MISC, g_print ("m_query_continue_drag\n"));
return E_UNEXPECTED;
}
@ -385,7 +385,7 @@ static HRESULT STDMETHODCALLTYPE
m_give_feedback (IDropSource __RPC_FAR *This,
DWORD dwEffect)
{
GDK_NOTE (DND, g_print ("m_give_feedback\n"));
GDK_NOTE (MISC, g_print ("m_give_feedback\n"));
return E_UNEXPECTED;
}
@ -665,7 +665,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
if (msg->message == WM_DROPFILES)
{
GDK_NOTE (DND, g_print ("WM_DROPFILES: %#x\n", msg->hwnd));
GDK_NOTE (MISC, g_print ("WM_DROPFILES: %#x\n", msg->hwnd));
context = gdk_drag_context_new ();
private = (GdkDragContextPrivate *) context;
@ -673,7 +673,7 @@ gdk_dropfiles_filter (GdkXEvent *xev,
context->is_source = FALSE;
context->source_window = gdk_parent_root;
context->dest_window = event->any.window;
gdk_window_ref (context->dest_window);
gdk_drawable_ref (context->dest_window);
/* WM_DROPFILES drops are always file names */
context->targets =
g_list_append (NULL, GUINT_TO_POINTER (text_uri_list_atom));
@ -703,13 +703,13 @@ gdk_dropfiles_filter (GdkXEvent *xev,
if (resolve_link (msg->hwnd, fileName, linkedFile, NULL))
{
g_string_append (result, linkedFile);
GDK_NOTE (DND, g_print ("...%s link to %s\n",
GDK_NOTE (MISC, g_print ("...%s link to %s\n",
fileName, linkedFile));
}
else
{
g_string_append (result, fileName);
GDK_NOTE (DND, g_print ("...%s\n", fileName));
GDK_NOTE (MISC, g_print ("...%s\n", fileName));
}
g_string_append (result, "\015\012");
}
@ -755,8 +755,8 @@ gdk_drag_do_leave (GdkDragContext *context, guint32 time)
{
if (context->dest_window)
{
GDK_NOTE (DND, g_print ("gdk_drag_do_leave\n"));
gdk_window_unref (context->dest_window);
GDK_NOTE (MISC, g_print ("gdk_drag_do_leave\n"));
gdk_drawable_unref (context->dest_window);
context->dest_window = NULL;
}
}
@ -770,12 +770,12 @@ gdk_drag_begin (GdkWindow *window,
g_return_val_if_fail (window != NULL, NULL);
GDK_NOTE (DND, g_print ("gdk_drag_begin\n"));
GDK_NOTE (MISC, g_print ("gdk_drag_begin\n"));
ctx = source_context_new ();
ctx->context->is_source = TRUE;
ctx->context->source_window = window;
gdk_window_ref (window);
gdk_drawable_ref (window);
tmp_list = g_list_last (targets);
ctx->context->targets = NULL;
@ -815,9 +815,9 @@ gdk_drag_find_window (GdkDragContext *context,
HWND recipient;
POINT pt;
GDK_NOTE (DND, g_print ("gdk_drag_find_window: %#x +%d+%d\n",
(drag_window ? GDK_DRAWABLE_XID (drag_window) : 0),
x_root, y_root));
GDK_NOTE (MISC, g_print ("gdk_drag_find_window: %#x +%d+%d\n",
(drag_window ? GDK_DRAWABLE_XID (drag_window) : 0),
x_root, y_root));
pt.x = x_root;
pt.y = y_root;
@ -828,7 +828,7 @@ gdk_drag_find_window (GdkDragContext *context,
{
*dest_window = gdk_window_lookup (recipient);
if (*dest_window)
gdk_window_ref (*dest_window);
gdk_drawable_ref (*dest_window);
*protocol = GDK_DRAG_PROTO_WIN32_DROPFILES;
}
}
@ -871,7 +871,7 @@ gdk_drag_status (GdkDragContext *context,
GdkDragAction action,
guint32 time)
{
GDK_NOTE (DND, g_print ("gdk_drag_status\n"));
GDK_NOTE (MISC, g_print ("gdk_drag_status\n"));
}
void
@ -900,7 +900,7 @@ gdk_destroy_filter (GdkXEvent *xev,
{
IDropTarget *idtp = (IDropTarget *) data;
GDK_NOTE (DND, g_print ("gdk_destroy_filter: WM_DESTROY: %#x\n", msg->hwnd));
GDK_NOTE (MISC, g_print ("gdk_destroy_filter: WM_DESTROY: %#x\n", msg->hwnd));
RevokeDragDrop (msg->hwnd);
CoLockObjectExternal (idtp, FALSE, TRUE);
}
@ -918,8 +918,8 @@ 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_NOTE (MISC, g_print ("gdk_window_register_dnd: %#x\n",
GDK_DRAWABLE_XID (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

View File

@ -33,10 +33,8 @@
#define G_PI 3.14159265358979323846
#endif
#include "gdkdrawable.h"
#include "gdkprivate.h"
#include "gdkwindow.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
static void gdk_win32_drawable_destroy (GdkDrawable *drawable);
@ -512,11 +510,19 @@ gdk_win32_draw_text (GdkDrawable *drawable,
text, text_length));
wcstr = g_new (wchar_t, text_length);
if ((wlen = gdk_nmbstowchar_ts (wcstr, text, text_length, text_length)) == -1)
g_warning ("gdk_draw_text: gdk_nmbstowchar_ts failed");
if (text_length == 1)
{
/* For single characters, don't try to interpret as UTF-8. */
wcstr[0] = (guchar) text[0];
gdk_wchar_text_handle (font, wcstr, 1, gdk_draw_text_handler, &arg);
}
else
gdk_wchar_text_handle (font, wcstr, wlen,
gdk_draw_text_handler, &arg);
{
if ((wlen = gdk_nmbstowchar_ts (wcstr, text, text_length, text_length)) == -1)
g_warning ("gdk_win32_draw_text: gdk_nmbstowchar_ts failed");
else
gdk_wchar_text_handle (font, wcstr, wlen, gdk_draw_text_handler, &arg);
}
g_free (wcstr);
@ -632,7 +638,7 @@ gdk_win32_draw_drawable (GdkDrawable *drawable,
#if 1 /* Don't know if this is necessary */
if (CombineRgn (draw_rgn, draw_rgn, src_rgn, RGN_AND) == COMPLEXREGION)
g_warning ("gdk_draw_pixmap: CombineRgn returned a COMPLEXREGION");
g_warning ("gdk_win32_draw_drawable: CombineRgn returned a COMPLEXREGION");
GetRgnBox (draw_rgn, &r);
if (r.left != xsrc

View File

@ -39,7 +39,8 @@
#include <stdio.h>
#include "gdk.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#include "gdkkeysyms.h"
@ -101,9 +102,11 @@ static gboolean gdk_event_translate (GdkEvent *event,
gint *ret_valp);
static gboolean gdk_event_prepare (gpointer source_data,
GTimeVal *current_time,
gint *timeout);
gint *timeout,
gpointer user_data);
static gboolean gdk_event_check (gpointer source_data,
GTimeVal *current_time);
GTimeVal *current_time,
gpointer user_data);
static gboolean gdk_event_dispatch (gpointer source_data,
GTimeVal *current_time,
gpointer user_data);
@ -200,7 +203,7 @@ gdk_WindowProc (HWND hWnd,
GDK_NOTE (EVENTS, g_print ("... compressing an CONFIGURE event\n"));
*((GdkEvent *)list->data) = event;
gdk_window_unref (event.any.window);
gdk_drawable_unref (event.any.window);
/* Wake up WaitMessage */
PostMessage (NULL, gdk_ping_msg, 0, 0);
return FALSE;
@ -224,7 +227,7 @@ gdk_WindowProc (HWND hWnd,
&((GdkEvent *)list->data)->expose.area,
&u);
((GdkEvent *)list->data)->expose.area = u;
gdk_window_unref (event.any.window);
gdk_drawable_unref (event.any.window);
#if 0
/* Wake up WaitMessage */
PostMessage (NULL, gdk_ping_msg, 0, 0);
@ -386,17 +389,16 @@ gdk_event_get_graphics_expose (GdkWindow *window)
{
MSG xevent;
GdkEvent *event;
GdkWindowPrivate *private = (GdkWindowPrivate *) window;
g_return_val_if_fail (window != NULL, NULL);
GDK_NOTE (EVENTS, g_print ("gdk_event_get_graphics_expose\n"));
#if 1
#if 0 /* ??? */
/* Some nasty bugs here, just return NULL for now. */
return NULL;
#else
if (GetMessage (&xevent, private->xwindow, WM_PAINT, WM_PAINT))
if (PeekMessage (&xevent, GDK_DRAWABLE_XID (window), WM_PAINT, WM_PAINT, PM_REMOVE))
{
event = gdk_event_new ();
@ -410,6 +412,42 @@ gdk_event_get_graphics_expose (GdkWindow *window)
#endif
}
static char *
event_mask_string (GdkEventMask mask)
{
static char bfr[500];
char *p = bfr;
*p = '\0';
#define BIT(x) \
if (mask & GDK_##x##_MASK) \
p += sprintf (p, "%s" #x, (p > bfr ? " " : ""))
BIT(EXPOSURE);
BIT(POINTER_MOTION);
BIT(POINTER_MOTION_HINT);
BIT(BUTTON_MOTION);
BIT(BUTTON1_MOTION);
BIT(BUTTON2_MOTION);
BIT(BUTTON3_MOTION);
BIT(BUTTON_PRESS);
BIT(BUTTON_RELEASE);
BIT(KEY_PRESS);
BIT(KEY_RELEASE);
BIT(ENTER_NOTIFY);
BIT(LEAVE_NOTIFY);
BIT(FOCUS_CHANGE);
BIT(STRUCTURE);
BIT(PROPERTY_CHANGE);
BIT(VISIBILITY_NOTIFY);
BIT(PROXIMITY_IN);
BIT(PROXIMITY_OUT);
BIT(SUBSTRUCTURE);
BIT(SCROLL);
#undef BIT
return bfr;
}
/*
*--------------------------------------------------------------
* gdk_pointer_grab
@ -435,7 +473,7 @@ gdk_event_get_graphics_expose (GdkWindow *window)
gint
gdk_pointer_grab (GdkWindow * window,
gint owner_events,
gboolean owner_events,
GdkEventMask event_mask,
GdkWindow * confine_to,
GdkCursor * cursor,
@ -478,14 +516,11 @@ gdk_pointer_grab (GdkWindow * window,
{
if (!GDK_DRAWABLE_DESTROYED (window))
{
GDK_NOTE (EVENTS, g_print ("gdk_pointer_grab: %#x %s %#x%s%s\n",
GDK_NOTE (EVENTS, g_print ("gdk_pointer_grab: %#x %s %#x %s\n",
xwindow,
(owner_events ? "TRUE" : "FALSE"),
xcursor,
(event_mask & GDK_BUTTON_PRESS_MASK) ?
" PRESS" : "",
(event_mask & GDK_BUTTON_RELEASE_MASK) ?
" RELEASE" : ""));
event_mask_string (event_mask)));
p_grab_mask = event_mask;
p_grab_owner_events = (owner_events != 0);
p_grab_automatic = FALSE;
@ -554,7 +589,7 @@ gdk_pointer_ungrab (guint32 time)
*--------------------------------------------------------------
*/
gint
gboolean
gdk_pointer_is_grabbed (void)
{
return p_grab_window != NULL;
@ -582,7 +617,7 @@ gdk_pointer_is_grabbed (void)
gint
gdk_keyboard_grab (GdkWindow * window,
gint owner_events,
gboolean owner_events,
guint32 time)
{
gint return_val;
@ -2674,7 +2709,7 @@ synthesize_crossing_events (GdkWindow *window,
event = gdk_event_new ();
event->crossing.type = GDK_LEAVE_NOTIFY;
event->crossing.window = curWnd;
gdk_window_ref (event->crossing.window);
gdk_drawable_ref (event->crossing.window);
event->crossing.subwindow = NULL;
event->crossing.time = xevent->time;
event->crossing.x = curX;
@ -2703,7 +2738,7 @@ synthesize_crossing_events (GdkWindow *window,
event = gdk_event_new ();
event->crossing.type = GDK_ENTER_NOTIFY;
event->crossing.window = window;
gdk_window_ref (event->crossing.window);
gdk_drawable_ref (event->crossing.window);
event->crossing.subwindow = NULL;
event->crossing.time = xevent->time;
event->crossing.x = LOWORD (xevent->lParam);
@ -2734,9 +2769,9 @@ synthesize_crossing_events (GdkWindow *window,
}
if (curWnd)
gdk_window_unref (curWnd);
gdk_drawable_unref (curWnd);
curWnd = window;
gdk_window_ref (curWnd);
gdk_drawable_ref (curWnd);
#ifdef USE_TRACKMOUSEEVENT
if (p_TrackMouseEvent != NULL)
{
@ -2789,9 +2824,9 @@ propagate (GdkWindow **window,
{
GDK_NOTE (EVENTS, g_print ("...sending to grabber %#x\n",
GDK_DRAWABLE_XID (grab_window)));
gdk_window_unref (*window);
gdk_drawable_unref (*window);
*window = grab_window;
gdk_window_ref (*window);
gdk_drawable_ref (*window);
return TRUE;
}
}
@ -2818,9 +2853,9 @@ propagate (GdkWindow **window,
/* Grabbed! */
GDK_NOTE (EVENTS, g_print ("...sending to grabber %#x\n",
GDK_DRAWABLE_XID (grab_window)));
gdk_window_unref (*window);
gdk_drawable_unref (*window);
*window = grab_window;
gdk_window_ref (*window);
gdk_drawable_ref (*window);
return TRUE;
}
}
@ -2832,9 +2867,9 @@ propagate (GdkWindow **window,
}
else
{
gdk_window_unref (*window);
gdk_drawable_unref (*window);
*window = ((GdkWindowPrivate *) *window)->parent;
gdk_window_ref (*window);
gdk_drawable_ref (*window);
GDK_NOTE (EVENTS, g_print ("...propagating to %#x\n",
GDK_DRAWABLE_XID (*window)));
/* The only branch where we actually continue the loop */
@ -2945,7 +2980,7 @@ gdk_event_translate (GdkEvent *event,
orig_window = window;
if (window != NULL)
gdk_window_ref (window);
gdk_drawable_ref (window);
else
{
/* Handle WM_QUIT here ? */
@ -2963,6 +2998,11 @@ 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",
xevent->hwnd,
xevent->message == WM_MOVE ?
"WM_MOVE" : "WM_SIZE"));
PostMessage (xevent->hwnd, xevent->message,
xevent->wParam, xevent->lParam);
}
@ -3398,7 +3438,7 @@ gdk_event_translate (GdkEvent *event,
GdkEvent *event2 = gdk_event_new ();
build_keypress_event (GDK_WINDOW_WIN32DATA (window), event2, xevent);
event2->key.window = window;
gdk_window_ref (window);
gdk_drawable_ref (window);
gdk_event_queue_append (event2);
GDK_NOTE (EVENTS, print_event (event2));
}
@ -3632,7 +3672,7 @@ gdk_event_translate (GdkEvent *event,
if (curWnd)
{
gdk_window_unref (curWnd);
gdk_drawable_unref (curWnd);
curWnd = NULL;
}
@ -3668,9 +3708,9 @@ gdk_event_translate (GdkEvent *event,
break;
if (newwindow != window)
{
gdk_window_unref (window);
gdk_drawable_unref (window);
window = newwindow;
gdk_window_ref (window);
gdk_drawable_ref (window);
}
ScreenToClient (xevent->hwnd, &pt);
if (!propagate (&window, xevent,
@ -3726,7 +3766,7 @@ gdk_event_translate (GdkEvent *event,
if (curWnd)
{
gdk_window_unref (curWnd);
gdk_drawable_unref (curWnd);
curWnd = NULL;
}
@ -3789,9 +3829,9 @@ gdk_event_translate (GdkEvent *event,
while (window
&& GDK_WINDOW_WIN32DATA (window)->bg_type == GDK_WIN32_BG_PARENT_RELATIVE)
{
gdk_window_unref (window);
gdk_drawable_unref (window);
window = ((GdkWindowPrivate *) window)->parent;
gdk_window_ref (window);
gdk_drawable_ref (window);
}
}
@ -3889,6 +3929,13 @@ gdk_event_translate (GdkEvent *event,
break;
case WM_PAINT:
if (!GetUpdateRect(xevent->hwnd, NULL, FALSE))
{
GDK_NOTE (EVENTS, g_print ("WM_PAINT: %#x no update rect\n",
xevent->hwnd));
break;
}
hdc = BeginPaint (xevent->hwnd, &paintstruct);
GDK_NOTE (EVENTS,
@ -3905,6 +3952,10 @@ gdk_event_translate (GdkEvent *event,
if (!(GDK_WINDOW_WIN32DATA (window)->event_mask & GDK_EXPOSURE_MASK))
break;
if ((paintstruct.rcPaint.right == paintstruct.rcPaint.left)
|| (paintstruct.rcPaint.bottom == paintstruct.rcPaint.top))
break;
event->expose.type = GDK_EXPOSE;
event->expose.window = window;
event->expose.area.x = paintstruct.rcPaint.left;
@ -4161,7 +4212,7 @@ gdk_event_translate (GdkEvent *event,
event->any.window = window;
if (window != NULL && window == curWnd)
{
gdk_window_unref (curWnd);
gdk_drawable_unref (curWnd);
curWnd = NULL;
}
@ -4209,11 +4260,11 @@ bypass_switch:
if (return_val)
{
if (event->any.window)
gdk_window_ref (event->any.window);
gdk_drawable_ref (event->any.window);
if (((event->any.type == GDK_ENTER_NOTIFY) ||
(event->any.type == GDK_LEAVE_NOTIFY)) &&
(event->crossing.subwindow != NULL))
gdk_window_ref (event->crossing.subwindow);
gdk_drawable_ref (event->crossing.subwindow);
GDK_NOTE (EVENTS, print_event (event));
}
@ -4225,7 +4276,7 @@ bypass_switch:
}
if (window)
gdk_window_unref (window);
gdk_drawable_unref (window);
return return_val;
}
@ -4265,7 +4316,8 @@ gdk_events_queue (void)
static gboolean
gdk_event_prepare (gpointer source_data,
GTimeVal *current_time,
gint *timeout)
gint *timeout,
gpointer user_data)
{
MSG msg;
gboolean retval;
@ -4284,7 +4336,8 @@ gdk_event_prepare (gpointer source_data,
static gboolean
gdk_event_check (gpointer source_data,
GTimeVal *current_time)
GTimeVal *current_time,
gpointer user_data)
{
MSG msg;
gboolean retval;

View File

@ -30,7 +30,8 @@
#include <ctype.h>
#include "gdkfont.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
static GHashTable *font_name_hash = NULL;
static GHashTable *fontset_name_hash = NULL;
@ -447,11 +448,15 @@ gdk_font_list_free (gchar **font_list)
}
/* This table classifies Unicode characters according to the Microsoft
* Unicode subset numbering. This is from the table in "Developing
* Unicode subset numbering. This is based on the table in "Developing
* International Software for Windows 95 and Windows NT". This is almost,
* but not quite, the same as the official Unicode block table in
* Blocks.txt from ftp.unicode.org. The bit number field is the bitfield
* number as in the FONTSIGNATURE struct's fsUsb field.
* There are some grave bugs in the table in the books. For instance
* it claims there are Hangul at U+3400..U+4DFF while this range in
* fact contains CJK Unified Ideographs Extension A. Also, the whole
* block of Hangul Syllables U+AC00..U+D7A3 is missing from the book.
*/
typedef enum
@ -647,14 +652,20 @@ static struct {
U_ENCLOSED_CJK, "Enclosed CJK" },
{ 0x3300, 0x33FF,
U_CJK_COMPATIBILITY, "CJK Compatibility" },
{ 0x3400, 0x3D2D,
U_HANGUL, "Hangul" },
{ 0x3D2E, 0x44B7,
U_HANGUL_SUPPLEMENTARY_A, "Hangul Supplementary-A" },
{ 0x44B8, 0x4DFF,
U_HANGUL_SUPPLEMENTARY_B, "Hangul Supplementary-B" },
/* The book claims:
* U+3400..U+3D2D = Hangul
* U+3D2E..U+44B7 = Hangul Supplementary A
* U+44B8..U+4DFF = Hangul Supplementary B
* but actually in Unicode
* U+3400..U+4DB5 = CJK Unified Ideographs Extension A
*/
{ 0x3400, 0x4DB5,
U_CJK_UNIFIED_IDEOGRAPHS, "CJK Unified Ideographs Extension A" },
{ 0x4E00, 0x9FFF,
U_CJK_UNIFIED_IDEOGRAPHS, "CJK Unified Ideographs" },
/* This was missing completely from the book's table. */
{ 0xAC00, 0xD7A3,
U_HANGUL, "Hangul Syllables" },
{ 0xE000, 0xF8FF,
U_PRIVATE_USE_AREA, "Private Use Area" },
{ 0xF900, 0xFAFF,
@ -829,6 +840,7 @@ check_unicode_subranges (UINT charset,
set_bit (U_SPACING_MODIFIER_LETTERS);
set_bit (U_BASIC_GREEK);
set_bit (U_CYRILLIC);
set_bit (U_HANGUL_JAMO);
set_bit (U_GENERAL_PUNCTUATION);
set_bit (U_SUPERSCRIPTS_AND_SUBSCRIPTS);
set_bit (U_CURRENCY_SYMBOLS);
@ -958,6 +970,7 @@ check_unicode_subranges (UINT charset,
set_bit (U_COMBINING_DIACRITICAL_MARKS_FOR_SYMBOLS);
set_bit (U_BASIC_GREEK);
set_bit (U_CYRILLIC);
set_bit (U_HANGUL_JAMO);
set_bit (U_GENERAL_PUNCTUATION);
set_bit (U_SUPERSCRIPTS_AND_SUBSCRIPTS);
set_bit (U_CURRENCY_SYMBOLS);
@ -1364,7 +1377,7 @@ gdk_font_load_internal (const gchar *font_name)
for (tries = 0; ; tries++)
{
GDK_NOTE (MISC, g_print ("...trying CreateFont(%d,%d,%d,%d,"
GDK_NOTE (MISC, g_print ("... trying CreateFont(%d,%d,%d,%d,"
"%d,%d,%d,%d,"
"%d,%d,%d,"
"%d,%#.02x,\"%s\")\n",
@ -1448,7 +1461,7 @@ gdk_font_load_internal (const gchar *font_name)
else
singlefont->codepage = 0;
GDK_NOTE (MISC, (g_print ("... = %#x %s cs %s cp%d ",
GDK_NOTE (MISC, (g_print ("... = %#x %s cs %s cp%d\n",
singlefont->xfont, face,
charset_name (singlefont->charset),
singlefont->codepage),
@ -1722,6 +1735,8 @@ gdk_wchar_text_handle (GdkFont *font,
g_assert (private->base.ref_count > 0);
GDK_NOTE (MISC, g_print ("gdk_wchar_text_handle: "));
while (wcp < end)
{
/* Split Unicode string into pieces of the same class */
@ -1745,10 +1760,15 @@ gdk_wchar_text_handle (GdkFont *font,
if (!list)
singlefont = NULL;
GDK_NOTE (MISC, g_print ("%d:%d:%d:%#x ",
start-wcstr, wcp-wcstr, block,
(singlefont ? singlefont->xfont : 0)));
/* Call the callback function */
(*handler) (singlefont, start, wcp+1 - start, arg);
wcp++;
}
GDK_NOTE (MISC, g_print ("\n"));
}
typedef struct

View File

@ -31,8 +31,9 @@
#include "gdkgc.h"
#include "gdkfont.h"
#include "gdkpixmap.h"
#include "gdkprivate.h"
#include "gdkwin32.h"
#include "gdkregion-generic.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
static void gdk_win32_gc_destroy (GdkGC *gc);
static void gdk_win32_gc_get_values (GdkGC *gc,
@ -55,8 +56,9 @@ static GdkGCClass gdk_win32_gc_class = {
static void
gdk_win32_gc_values_to_win32values (GdkGCValues *values,
GdkGCValuesMask mask,
GdkGCWin32Data *data)
GdkGC *gc)
{
GdkGCWin32Data *data = GDK_GC_WIN32DATA (gc);
char *s = "";
gint sw, sh;
@ -255,20 +257,28 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
if (mask & GDK_GC_CLIP_MASK)
{
if (data->clip_region != NULL)
if (!DeleteObject (data->clip_region))
WIN32_GDI_FAILED ("DeleteObject");
{
gdk_region_destroy (data->clip_region);
data->clip_region = NULL;
}
if (data->hcliprgn != NULL)
DeleteObject (data->hcliprgn);
if (values->clip_mask != NULL)
{
data->clip_region =
data->hcliprgn =
BitmapToRegion ((HBITMAP) GDK_DRAWABLE_XID (values->clip_mask));
data->values_mask |= GDK_GC_CLIP_MASK;
OffsetRgn (data->hcliprgn,
((GdkGCPrivate *) gc)->clip_x_origin,
((GdkGCPrivate *) gc)->clip_y_origin);
}
else
{
data->clip_region = NULL;
data->hcliprgn = NULL;
data->values_mask &= ~GDK_GC_CLIP_MASK;
}
GDK_NOTE (MISC, (g_print ("%sclip=%#x", s, data->clip_region),
GDK_NOTE (MISC, (g_print ("%sclip=%#x", s, data->hcliprgn),
s = ","));
}
@ -282,33 +292,29 @@ gdk_win32_gc_values_to_win32values (GdkGCValues *values,
if (mask & GDK_GC_TS_X_ORIGIN)
{
data->ts_x_origin = values->ts_x_origin;
data->values_mask |= GDK_GC_TS_X_ORIGIN;
GDK_NOTE (MISC, (g_print ("%sts_x=%d", s, data->ts_x_origin),
GDK_NOTE (MISC, (g_print ("%sts_x=%d", s, values->ts_x_origin),
s = ","));
}
if (mask & GDK_GC_TS_Y_ORIGIN)
{
data->ts_y_origin = values->ts_y_origin;
data->values_mask |= GDK_GC_TS_Y_ORIGIN;
GDK_NOTE (MISC, (g_print ("%sts_y=%d", s, data->ts_y_origin),
GDK_NOTE (MISC, (g_print ("%sts_y=%d", s, values->ts_y_origin),
s = ","));
}
if (mask & GDK_GC_CLIP_X_ORIGIN)
{
data->clip_x_origin = values->clip_x_origin;
data->values_mask |= GDK_GC_CLIP_X_ORIGIN;
GDK_NOTE (MISC, (g_print ("%sclip_x=%d", s, data->clip_x_origin),
GDK_NOTE (MISC, (g_print ("%sclip_x=%d", s, values->clip_x_origin),
s = ","));
}
if (mask & GDK_GC_CLIP_Y_ORIGIN)
{
data->clip_y_origin = values->clip_y_origin;
data->values_mask |= GDK_GC_CLIP_Y_ORIGIN;
GDK_NOTE (MISC, (g_print ("%sclip_y=%d", s, data->clip_y_origin),
GDK_NOTE (MISC, (g_print ("%sclip_y=%d", s, values->clip_y_origin),
s = ","));
}
@ -422,6 +428,8 @@ _gdk_win32_gc_new (GdkDrawable *drawable,
private->klass = &gdk_win32_gc_class;
private->klass_data = data = g_new (GdkGCWin32Data, 1);
data->clip_region = NULL;
data->foreground = black.pixel;
data->background = white.pixel;
data->font = NULL;
@ -429,19 +437,17 @@ _gdk_win32_gc_new (GdkDrawable *drawable,
data->fill_style = GDK_SOLID;
data->tile = NULL;
data->stipple = NULL;
data->clip_region = NULL;
data->ts_x_origin = data->ts_y_origin =
data->clip_x_origin = data->clip_y_origin = 0;
data->pen_style = PS_GEOMETRIC;
data->pen_width = 1;
data->values_mask = GDK_GC_FUNCTION | GDK_GC_FILL;
GDK_NOTE (MISC, g_print ("_gdk_win32_gc_new: "));
gdk_win32_gc_values_to_win32values (values, mask, data);
gdk_win32_gc_values_to_win32values (values, mask, gc);
data->hwnd = NULL;
data->xgc = NULL;
data->hcliprgn = NULL;
GDK_NOTE (MISC, g_print (" = %p\n", gc));
@ -453,6 +459,9 @@ gdk_win32_gc_destroy (GdkGC *gc)
{
GdkGCWin32Data *data = GDK_GC_WIN32DATA (gc);
if (data->clip_region)
gdk_region_destroy (data->clip_region);
if (data->values_mask & GDK_GC_FONT)
gdk_font_unref (data->font);
@ -462,9 +471,6 @@ gdk_win32_gc_destroy (GdkGC *gc)
if (data->values_mask & GDK_GC_STIPPLE)
gdk_drawable_unref (data->stipple);
if (data->values_mask & GDK_GC_CLIP_MASK)
DeleteObject (data->clip_region);
g_free (GDK_GC_WIN32DATA (gc));
}
@ -472,6 +478,7 @@ static void
gdk_win32_gc_get_values (GdkGC *gc,
GdkGCValues *values)
{
GdkGCPrivate *private = (GdkGCPrivate *) gc;
GdkGCWin32Data *data = GDK_GC_WIN32DATA (gc);
values->foreground.pixel = data->foreground;
@ -517,42 +524,14 @@ gdk_win32_gc_get_values (GdkGC *gc,
values->tile = data->tile;
values->stipple = data->stipple;
if (data->clip_region != NULL)
{
RECT rect;
HBRUSH hbr;
HDC hdc;
HGDIOBJ oldbitmap;
GdkPixmap *pixmap;
/* Also the X11 backend always returns a NULL clip_mask */
values->clip_mask = NULL;
GetRgnBox (data->clip_region, &rect);
pixmap =
gdk_pixmap_new (NULL, rect.right - rect.left, rect.bottom - rect.top,
1);
hbr = GetStockObject (WHITE_BRUSH);
if ((hdc = CreateCompatibleDC (NULL)) == NULL)
WIN32_GDI_FAILED ("CreateCompatibleDC");
if ((oldbitmap =
SelectObject (hdc, GDK_DRAWABLE_XID (pixmap))) == NULL)
WIN32_GDI_FAILED ("SelectObject");
hbr = GetStockObject (BLACK_BRUSH);
if (!FillRect (hdc, &rect, hbr))
WIN32_GDI_FAILED ("FillRect");
hbr = GetStockObject (WHITE_BRUSH);
if (!FillRgn (hdc, data->clip_region, hbr))
WIN32_GDI_FAILED ("FillRgn");
if (SelectObject (hdc, oldbitmap) == NULL)
WIN32_GDI_FAILED ("SelectObject");
DeleteDC (hdc);
values->clip_mask = pixmap;
}
else
values->clip_mask = NULL;
values->subwindow_mode = data->subwindow_mode;
values->ts_x_origin = data->ts_x_origin;
values->ts_y_origin = data->ts_y_origin;
values->clip_x_origin = data->clip_x_origin;
values->clip_y_origin = data->clip_y_origin;
values->ts_x_origin = private->ts_x_origin;
values->ts_y_origin = private->ts_y_origin;
values->clip_x_origin = private->clip_x_origin;
values->clip_y_origin = private->clip_y_origin;
values->graphics_exposures = data->graphics_exposures;
values->line_width = data->pen_width;
@ -585,11 +564,9 @@ gdk_win32_gc_set_values (GdkGC *gc,
GdkGCValues *values,
GdkGCValuesMask mask)
{
GdkGCWin32Data *data = GDK_GC_WIN32DATA (gc);
GDK_NOTE (MISC, g_print ("gdk_win32_gc_set_values: "));
gdk_win32_gc_values_to_win32values (values, mask, data);
gdk_win32_gc_values_to_win32values (values, mask, gc);
GDK_NOTE (MISC, g_print ("\n"));
}
static void
@ -668,9 +645,9 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
data = GDK_GC_WIN32DATA (gc);
if (data->clip_region != NULL)
if (!DeleteObject (data->clip_region))
WIN32_GDI_FAILED ("DeleteObject");
if (data->clip_region)
gdk_region_destroy (data->clip_region);
if (rectangle)
{
GDK_NOTE (MISC,
@ -678,12 +655,7 @@ gdk_gc_set_clip_rectangle (GdkGC *gc,
data,
rectangle->width, rectangle->height,
rectangle->x, rectangle->y));
if ((data->clip_region =
CreateRectRgn (rectangle->x, rectangle->y,
rectangle->x + rectangle->width,
rectangle->y + rectangle->height)) == NULL)
WIN32_GDI_FAILED ("CreateRectRgn");
data->clip_region = gdk_region_rectangle (rectangle);
data->values_mask |= GDK_GC_CLIP_MASK;
}
else
@ -700,32 +672,38 @@ void
gdk_gc_set_clip_region (GdkGC *gc,
GdkRegion *region)
{
GdkGCPrivate *private = (GdkGCPrivate *) gc;
GdkGCWin32Data *data;
g_return_if_fail (gc != NULL);
data = GDK_GC_WIN32DATA (gc);
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_region: (%d) %s\n",
data, (region != NULL ? "xxx" : "None")));
if (data->clip_region)
gdk_region_destroy (data->clip_region);
if (data->clip_region != NULL)
if (!DeleteObject (data->clip_region))
WIN32_GDI_FAILED ("DeleteObject");
if (region)
{
GdkRegionPrivate *region_private;
region_private = (GdkRegionPrivate*) region;
data->clip_region = CreateRectRgn (1, 1, 0, 0);
CombineRgn (data->clip_region, region_private->xregion, NULL, RGN_COPY);
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_region: %d %dx%d+%d+%d\n",
data,
region->extents.x2 - region->extents.x1,
region->extents.y2 - region->extents.y1,
region->extents.x1, region->extents.y1));
data->clip_region = gdk_region_copy (region);
data->values_mask |= GDK_GC_CLIP_MASK;
}
else
{
GDK_NOTE (MISC, g_print ("gdk_gc_set_clip_region: %d NULL\n",
data));
data->clip_region = NULL;
data->values_mask &= ~GDK_GC_CLIP_MASK;
}
private->clip_x_origin = 0;
private->clip_y_origin = 0;
data->values_mask &= ~(GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN);
}
void
@ -743,21 +721,12 @@ gdk_gc_copy (GdkGC *dst_gc, GdkGC *src_gc)
if (dst_data->stipple != NULL)
gdk_drawable_unref (dst_data->stipple);
if (dst_data->clip_region != NULL)
if (!DeleteObject (dst_data->clip_region))
WIN32_GDI_FAILED ("DeleteObject");
gdk_region_destroy (dst_data->clip_region);
*dst_data = *src_data;
if (dst_data->clip_region != NULL)
{
nbytes = GetRegionData (dst_data->clip_region, 0, NULL);
rgn = g_malloc (nbytes);
GetRegionData (dst_data->clip_region, nbytes, rgn);
if ((dst_data->clip_region = ExtCreateRegion (NULL, nbytes, rgn)) == NULL)
WIN32_GDI_FAILED ("ExtCreateRegion");
g_free (rgn);
}
dst_data->clip_region = gdk_region_copy (dst_data->clip_region);
if (dst_data->font != NULL)
gdk_font_ref (dst_data->font);
if (dst_data->tile != NULL)
@ -792,13 +761,15 @@ gdk_colormap_color (GdkColormapPrivateWin32 *colormap_private,
}
static void
predraw_set_foreground (GdkGCWin32Data *data,
GdkColormapPrivateWin32 *colormap_private)
predraw_set_foreground (GdkGCPrivate *gc_private,
GdkColormapPrivateWin32 *colormap_private,
gboolean *ok)
{
COLORREF fg;
LOGBRUSH logbrush;
HPEN hpen;
HBRUSH hbr;
GdkGCWin32Data *data = GDK_GC_WIN32DATA (gc_private);
if (colormap_private == NULL)
{
@ -825,7 +796,7 @@ predraw_set_foreground (GdkGCWin32Data *data,
logpal.palPalEntry[1].peBlue = 0xFF;
logpal.palPalEntry[1].peFlags = 0x00;
if ((hpal = CreatePalette ((LOGPALETTE *) &logpal)) == NULL)
WIN32_GDI_FAILED ("CreatePalette");
WIN32_GDI_FAILED ("CreatePalette"), *ok = FALSE;
}
SelectPalette (data->xgc, hpal, FALSE);
RealizePalette (data->xgc);
@ -836,11 +807,11 @@ predraw_set_foreground (GdkGCWin32Data *data,
int k;
if (SelectPalette (data->xgc, colormap_private->xcolormap->palette,
FALSE) == NULL)
WIN32_GDI_FAILED ("SelectPalette");
WIN32_GDI_FAILED ("SelectPalette"), *ok = FALSE;
if (TRUE || colormap_private->xcolormap->stale)
{
if ((k = RealizePalette (data->xgc)) == GDI_ERROR)
WIN32_GDI_FAILED ("RealizePalette");
WIN32_GDI_FAILED ("RealizePalette"), *ok = FALSE;
colormap_private->xcolormap->stale = FALSE;
}
#if 0
@ -852,49 +823,50 @@ predraw_set_foreground (GdkGCWin32Data *data,
fg = gdk_colormap_color (colormap_private, data->foreground);
if (SetTextColor (data->xgc, fg) == CLR_INVALID)
WIN32_GDI_FAILED ("SetTextColor");
WIN32_GDI_FAILED ("SetTextColor"), *ok = FALSE;
/* Create and select pen and brush. */
logbrush.lbStyle = BS_SOLID;
logbrush.lbColor = fg;
if ((hpen = ExtCreatePen (data->pen_style, data->pen_width,
&logbrush, 0, NULL)) == NULL)
if (*ok && (hpen = ExtCreatePen (data->pen_style, data->pen_width,
&logbrush, 0, NULL)) == NULL)
WIN32_GDI_FAILED ("ExtCreatePen");
if (SelectObject (data->xgc, hpen) == NULL)
WIN32_GDI_FAILED ("SelectObject");
WIN32_GDI_FAILED ("SelectObject"), *ok = FALSE;
switch (data->fill_style)
{
case GDK_OPAQUE_STIPPLED:
if ((hbr = CreatePatternBrush (GDK_DRAWABLE_XID (data->stipple))) == NULL)
WIN32_GDI_FAILED ("CreatePatternBrush");
if (*ok && (hbr = CreatePatternBrush (GDK_DRAWABLE_XID (data->stipple))) == NULL)
WIN32_GDI_FAILED ("CreatePatternBrush"), *ok = FALSE;
SetBrushOrgEx(data->xgc, data->ts_x_origin,
data->ts_y_origin, NULL);
if (*ok && !SetBrushOrgEx(data->xgc, gc_private->ts_x_origin,
gc_private->ts_y_origin, NULL))
WIN32_GDI_FAILED ("SetBrushOrgEx"), *ok = FALSE;
break;
case GDK_SOLID:
default:
if ((hbr = CreateSolidBrush (fg)) == NULL)
WIN32_GDI_FAILED ("CreateSolidBrush");
if (*ok && (hbr = CreateSolidBrush (fg)) == NULL)
WIN32_GDI_FAILED ("CreateSolidBrush"), *ok = FALSE;
break;
}
if (SelectObject (data->xgc, hbr) == NULL)
WIN32_GDI_FAILED ("SelectObject");
if (*ok && SelectObject (data->xgc, hbr) == NULL)
WIN32_GDI_FAILED ("SelectObject"), *ok = FALSE;
}
void
predraw_set_background (GdkGCWin32Data *data,
GdkColormapPrivateWin32 *colormap_private)
GdkColormapPrivateWin32 *colormap_private,
gboolean *ok)
{
COLORREF bg = gdk_colormap_color (colormap_private, data->background);
if (SetBkColor (data->xgc, bg) == CLR_INVALID)
WIN32_GDI_FAILED ("SetBkColor");
WIN32_GDI_FAILED ("SetBkColor"), *ok = FALSE;
}
HDC
@ -906,6 +878,8 @@ gdk_gc_predraw (GdkDrawable *drawable,
GdkColormapPrivateWin32 *colormap_private =
(GdkColormapPrivateWin32 *) drawable_private->colormap;
GdkGCWin32Data *data = GDK_GC_WIN32DATA (gc_private);
gboolean ok = TRUE;
int flag;
g_assert (data->xgc == NULL);
@ -914,49 +888,172 @@ gdk_gc_predraw (GdkDrawable *drawable,
if (GDK_DRAWABLE_TYPE (drawable) == GDK_DRAWABLE_PIXMAP)
{
if ((data->xgc = CreateCompatibleDC (NULL)) == NULL)
WIN32_GDI_FAILED ("CreateCompatibleDC");
WIN32_GDI_FAILED ("CreateCompatibleDC"), ok = FALSE;
if ((data->saved_dc = SaveDC (data->xgc)) == 0)
WIN32_GDI_FAILED ("SaveDC");
if (ok && (data->saved_dc = SaveDC (data->xgc)) == 0)
WIN32_GDI_FAILED ("SaveDC"), ok = FALSE;
if (SelectObject (data->xgc, data->hwnd) == NULL)
WIN32_GDI_FAILED ("SelectObject");
if (ok && SelectObject (data->xgc, data->hwnd) == NULL)
WIN32_GDI_FAILED ("SelectObject"), ok = FALSE;
}
else
{
if ((data->xgc = GetDC (data->hwnd)) == NULL)
WIN32_GDI_FAILED ("GetDC");
if ((data->saved_dc = SaveDC (data->xgc)) == 0)
if (ok && (data->saved_dc = SaveDC (data->xgc)) == 0)
WIN32_GDI_FAILED ("SaveDC");
}
if (usage & GDK_GC_FOREGROUND)
predraw_set_foreground (data, colormap_private);
if (ok && (usage & GDK_GC_FOREGROUND))
predraw_set_foreground (gc_private, colormap_private, &ok);
if ((usage & GDK_GC_BACKGROUND) && (data->values_mask & GDK_GC_BACKGROUND))
predraw_set_background (data, colormap_private);
if (ok
&& (usage & GDK_GC_BACKGROUND)
&& (data->values_mask & GDK_GC_BACKGROUND))
predraw_set_background (data, colormap_private, &ok);
if (usage & GDK_GC_FONT)
if (ok && (usage & GDK_GC_FONT))
{
if (SetBkMode (data->xgc, TRANSPARENT) == 0)
WIN32_GDI_FAILED ("SetBkMode");
WIN32_GDI_FAILED ("SetBkMode"), ok = FALSE;
if (SetTextAlign (data->xgc, TA_BASELINE) == GDI_ERROR)
WIN32_GDI_FAILED ("SetTextAlign");
if (ok && SetTextAlign (data->xgc, TA_BASELINE) == GDI_ERROR)
WIN32_GDI_FAILED ("SetTextAlign"), ok = FALSE;
}
if (data->values_mask & GDK_GC_FUNCTION)
if (ok && (data->values_mask & GDK_GC_FUNCTION))
if (SetROP2 (data->xgc, data->rop2) == 0)
WIN32_GDI_FAILED ("SetROP2");
WIN32_GDI_FAILED ("SetROP2"), ok = FALSE;
if ((data->values_mask & GDK_GC_CLIP_MASK)
if (data->values_mask & GDK_GC_CLIP_MASK)
g_assert ((data->clip_region != NULL) != (data->hcliprgn != NULL));
if (ok
&& (data->values_mask & GDK_GC_CLIP_MASK)
&& data->clip_region != NULL)
{
if (data->values_mask & (GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN))
OffsetRgn (data->clip_region,
data->clip_x_origin, data->clip_y_origin);
SelectClipRgn (data->xgc, data->clip_region);
HRGN hrgn;
RGNDATA *rgndata;
RECT *rect;
GdkRegionBox *boxes = data->clip_region->rects;
guint nbytes =
sizeof (RGNDATAHEADER) + (sizeof (RECT) * data->clip_region->numRects);
int i;
rgndata = g_malloc (nbytes);
rgndata->rdh.dwSize = sizeof (RGNDATAHEADER);
rgndata->rdh.iType = RDH_RECTANGLES;
rgndata->rdh.nCount = rgndata->rdh.nRgnSize = 0;
SetRect (&rgndata->rdh.rcBound,
G_MAXSHORT, G_MAXSHORT, G_MINSHORT, G_MINSHORT);
for (i = 0; i < data->clip_region->numRects; i++)
{
rect = ((RECT *) rgndata->Buffer) + rgndata->rdh.nCount++;
rect->left = CLAMP (boxes[i].x1 + gc_private->clip_x_origin,
G_MINSHORT, G_MAXSHORT);
rect->right = CLAMP (boxes[i].x2 + gc_private->clip_x_origin,
G_MINSHORT, G_MAXSHORT);
rect->top = CLAMP (boxes[i].y1 + gc_private->clip_y_origin,
G_MINSHORT, G_MAXSHORT);
rect->bottom = CLAMP (boxes[i].y2 + gc_private->clip_y_origin,
G_MINSHORT, G_MAXSHORT);
GDK_NOTE (MISC, g_print ("clip rgn box %d: %dx%d@+%d+%d\n",
i,
rect->right-rect->left,
rect->bottom-rect->top,
rect->left, rect->top));
if (rect->left < rgndata->rdh.rcBound.left)
rgndata->rdh.rcBound.left = rect->left;
if (rect->right > rgndata->rdh.rcBound.right)
rgndata->rdh.rcBound.right = rect->right;
if (rect->top < rgndata->rdh.rcBound.top)
rgndata->rdh.rcBound.top = rect->top;
if (rect->bottom > rgndata->rdh.rcBound.bottom)
rgndata->rdh.rcBound.bottom = rect->bottom;
}
if ((hrgn = ExtCreateRegion (NULL, nbytes, rgndata)) == NULL)
WIN32_API_FAILED ("ExtCreateRegion"), ok = FALSE;
if (ok && SelectClipRgn (data->xgc, hrgn) == ERROR)
WIN32_API_FAILED ("SelectClipRgn"), ok = FALSE;
if (hrgn != NULL)
DeleteObject (hrgn);
}
else if (ok
&& (data->values_mask & GDK_GC_CLIP_MASK)
&& data->hcliprgn != NULL)
{
if (SelectClipRgn (data->xgc, data->hcliprgn) == ERROR)
WIN32_API_FAILED ("SelectClipRgn"), ok = FALSE;
}
if (gdk_debug_flags & GDK_DEBUG_MISC)
{
HGDIOBJ obj;
LOGBRUSH logbrush;
EXTLOGPEN extlogpen;
HRGN hrgn;
RECT rect;
g_print ("gdk_gc_predraw: %d: %#x\n", data, data->xgc);
obj = GetCurrentObject (data->xgc, OBJ_BRUSH);
GetObject (obj, sizeof (LOGBRUSH), &logbrush);
g_print ("brush: style: %s color: %.06x hatch: %#x\n",
(logbrush.lbStyle == BS_HOLLOW ? "HOLLOW" :
(logbrush.lbStyle == BS_PATTERN ? "PATTERN" :
(logbrush.lbStyle == BS_SOLID ? "SOLID" :
"???"))),
logbrush.lbColor,
logbrush.lbHatch);
obj = GetCurrentObject (data->xgc, OBJ_PEN);
GetObject (obj, sizeof (EXTLOGPEN), &extlogpen);
g_print ("pen: type: %s style: %s endcap: %s join: %s width: %d brush: %s\n",
((extlogpen.elpPenStyle & PS_TYPE_MASK) ==
PS_GEOMETRIC ? "GEOMETRIC" : "COSMETIC"),
((extlogpen.elpPenStyle & PS_STYLE_MASK) ==
PS_NULL ? "NULL" :
((extlogpen.elpPenStyle & PS_STYLE_MASK) ==
PS_SOLID ? "SOLID" : "???")),
((extlogpen.elpPenStyle & PS_ENDCAP_MASK) ==
PS_ENDCAP_FLAT ? "FLAT" :
((extlogpen.elpPenStyle & PS_ENDCAP_MASK) ==
PS_ENDCAP_ROUND ? "ROUND" :
((extlogpen.elpPenStyle & PS_ENDCAP_MASK) ==
PS_ENDCAP_SQUARE ? "ROUND" :
((extlogpen.elpPenStyle & PS_ENDCAP_MASK) ==
PS_ENDCAP_SQUARE ? "ROUND" : "???")))),
((extlogpen.elpPenStyle & PS_JOIN_MASK) ==
PS_JOIN_BEVEL ? "BEVEL" :
((extlogpen.elpPenStyle & PS_JOIN_MASK) ==
PS_JOIN_MITER ? "MITER" :
((extlogpen.elpPenStyle & PS_JOIN_MASK) ==
PS_JOIN_ROUND ? "ROUND" : "???"))),
extlogpen.elpWidth,
(extlogpen.elpBrushStyle == BS_DIBPATTERN ? "DIBPATTERN" :
(extlogpen.elpBrushStyle == BS_DIBPATTERNPT ? "DIBPATTERNPT" :
(extlogpen.elpBrushStyle == BS_HATCHED ? "HATCHED" :
(extlogpen.elpBrushStyle == BS_HOLLOW ? "HOLLOW" :
(extlogpen.elpBrushStyle == BS_PATTERN ? "PATTERN" :
(extlogpen.elpBrushStyle == BS_SOLID ? "SOLID" : "???")))))));
hrgn = CreateRectRgn (0, 0, 0, 0);
if ((flag = GetClipRgn (data->xgc, hrgn)) == -1)
WIN32_API_FAILED ("GetClipRgn");
else if (flag == 0)
g_print ("no clip region\n");
else if (flag == 1)
{
GetRgnBox (hrgn, &rect);
g_print ("clip region bbox: %dx%d@+%d+%d\n",
rect.right - rect.left,
rect.bottom - rect.top,
rect.left, rect.top);
}
}
return data->xgc;
@ -1013,11 +1110,6 @@ gdk_gc_postdraw (GdkDrawable *drawable,
if (!DeleteObject (hbr))
WIN32_GDI_FAILED ("DeleteObject");
if ((data->values_mask & GDK_GC_CLIP_MASK)
&& data->clip_region != NULL
&& (data->values_mask & (GDK_GC_CLIP_X_ORIGIN | GDK_GC_CLIP_Y_ORIGIN)))
OffsetRgn (data->clip_region,
-data->clip_x_origin, -data->clip_y_origin);
data->xgc = NULL;
}
@ -1148,7 +1240,7 @@ BitmapToRegion (HBITMAP hBmp)
hDC = CreateCompatibleDC (hMemDC);
if (!hDC)
{
WIN32_GDI_FAILED ("CreateCompatibleDC #2");
WIN32_GDI_FAILED ("CreateCompatibleDC");
SelectObject (hMemDC, holdBmp);
DeleteObject (hbm8);
DeleteDC (hMemDC);

View File

@ -24,16 +24,15 @@
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
*/
#if HAVE_CONFIG_H
# include <config.h>
#endif
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <locale.h>
#include "gdkim.h"
#include "gdkpixmap.h"
#include "gdkprivate.h"
#include "gdkinternals.h"
#include "gdki18n.h"
#include "gdkwin32.h"
@ -53,14 +52,10 @@
gchar*
gdk_set_locale (void)
{
gchar *current_locale;
if (!setlocale (LC_ALL,""))
if (!setlocale (LC_ALL, ""))
g_warning ("locale not supported by C library");
current_locale = setlocale (LC_ALL, NULL);
return current_locale;
return g_win32_getlocale ();
}
void

View File

@ -26,10 +26,9 @@
#include "config.h"
#include "gdk.h" /* For gdk_error_trap_* / gdk_flush_* */
#include "gdkimage.h"
#include "gdkprivate.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
static void gdk_win32_image_destroy (GdkImage *image);
static void gdk_image_put (GdkImage *image,
@ -338,7 +337,7 @@ gdk_image_get (GdkWindow *window,
private->base.klass = &image_class;
image->type = GDK_IMAGE_SHARED;
image->visual = gdk_window_get_visual (window);
image->visual = gdk_drawable_get_visual (window);
image->width = width;
image->height = height;

View File

@ -31,8 +31,8 @@
#include <stdio.h>
#include <math.h>
#include "gdk.h"
#include "gdkinput.h"
#include "gdkinternals.h"
#include "gdkprivate.h"
#include "gdkwin32.h"
@ -337,7 +337,7 @@ gdk_input_init (void)
g_warning ("gdk_input_init: gdk_window_new failed");
return;
}
gdk_window_ref (wintab_window);
gdk_drawable_ref (wintab_window);
for (devix = 0; devix < ndevices; devix++)
{
@ -1006,7 +1006,7 @@ gdk_input_win32_other_event (GdkEvent *event,
if (window == NULL)
window = gdk_parent_root;
gdk_window_ref (window);
gdk_drawable_ref (window);
GDK_NOTE (EVENTS,
g_print ("gdk_input_win32_other_event: window=%#x (%d,%d)\n",
@ -1106,9 +1106,9 @@ gdk_input_win32_other_event (GdkEvent *event,
pt.x = x;
pt.y = y;
ClientToScreen (GDK_DRAWABLE_XID (window), &pt);
gdk_window_unref (window);
gdk_drawable_unref (window);
window = ((GdkWindowPrivate *) window)->parent;
gdk_window_ref (window);
gdk_drawable_ref (window);
ScreenToClient (GDK_DRAWABLE_XID (window), &pt);
x = pt.x;
y = pt.y;
@ -1602,7 +1602,7 @@ gdk_input_exit (void)
g_list_free (gdk_input_windows);
gdk_input_windows = NULL;
gdk_window_unref (wintab_window);
gdk_drawable_unref (wintab_window);
wintab_window = NULL;
#if 1

View File

@ -34,6 +34,7 @@
#include <io.h>
#include "gdk.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
#include "gdkinputprivate.h"
#include "gdkkeysyms.h"
@ -133,12 +134,12 @@ gdk_win32_gdi_failed (const gchar *where,
}
void
gdk_set_use_xshm (gint use_xshm)
gdk_set_use_xshm (gboolean use_xshm)
{
/* Always on */
}
gint
gboolean
gdk_get_use_xshm (void)
{
return TRUE;
@ -228,6 +229,12 @@ gdk_screen_height_mm (void)
return GetDeviceCaps (gdk_DC, VERTSIZE);
}
void
gdk_set_sm_client_id (const gchar* sm_client_id)
{
g_warning("gdk_set_sm_client_id %s", sm_client_id ? sm_client_id : "NULL");
}
void
gdk_key_repeat_disable (void)
{

View File

@ -32,8 +32,8 @@
#include <string.h>
#include "gdkpixmap.h"
#include "gdkprivate.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
typedef struct
{
@ -116,7 +116,20 @@ gdk_pixmap_new (GdkWindow *window,
g_return_val_if_fail (window == NULL || GDK_IS_WINDOW (window), NULL);
g_return_val_if_fail ((window != NULL) || (depth != -1), NULL);
#if 1
g_return_val_if_fail ((width != 0) && (height != 0), NULL);
#else
/* HB: Not The Right Thing to do, but a nice way to debug
* the backing store facility without immediate crashes ...
*/
if (width == 0 || height == 0)
{
g_warning("gdk_pixmap_new: size requested: %ld %ld", width, height);
/* testing: where does it crash next? */
if (width == 0) width = 1;
if (height == 0) height = 1;
}
#endif
if (!window)
window = gdk_parent_root;
@ -387,21 +400,23 @@ gdk_pixmap_seek_string (FILE *infile,
{
char instr[1024];
while (!feof (infile))
while (1)
{
fscanf (infile, "%1023s", instr);
if (fscanf (infile, "%1023s", instr) != 1)
return FALSE;
if (skip_comments == TRUE && strcmp (instr, "/*") == 0)
{
fscanf (infile, "%1023s", instr);
while (!feof (infile) && strcmp (instr, "*/") != 0)
fscanf (infile, "%1023s", instr);
fscanf(infile, "%1023s", instr);
do
{
if (fscanf (infile, "%1023s", instr) != 1)
return FALSE;
}
while (strcmp (instr, "*/") != 0);
}
if (strcmp (instr, str)==0)
else if (strcmp (instr, str) == 0)
return TRUE;
}
return FALSE;
}
static gint

View File

@ -27,252 +27,12 @@
#ifndef __GDK_PRIVATE_WIN32_H__
#define __GDK_PRIVATE_WIN32_H__
#define STRICT /* We want strict type checks */
#include <windows.h>
#include <commctrl.h>
/* Make up for some minor mingw32 lossage */
/* PS_JOIN_MASK is missing from the mingw32 headers */
#ifndef PS_JOIN_MASK
#define PS_JOIN_MASK (PS_JOIN_BEVEL|PS_JOIN_MITER|PS_JOIN_ROUND)
#endif
/* CLR_INVALID is missing */
#ifndef CLR_INVALID
#define CLR_INVALID CLR_NONE
#endif
/* Some charsets are missing */
#ifndef JOHAB_CHARSET
#define JOHAB_CHARSET 130
#endif
#ifndef VIETNAMESE_CHARSET
#define VIETNAMESE_CHARSET 163
#endif
#ifndef FS_VIETNAMESE
#define FS_VIETNAMESE 0x100
#endif
#ifndef VM_OEM_PLUS
#define VK_OEM_PLUS 0xBB
#endif
#include <time.h>
#include <gdk/gdktypes.h>
#include <gdk/gdkprivate.h>
#include <gdk/gdkcursor.h>
#include <gdk/gdkevents.h>
#include <gdk/gdkfont.h>
#include <gdk/gdkgc.h>
#include <gdk/gdkim.h>
#include <gdk/gdkimage.h>
#include <gdk/gdkvisual.h>
#include <gdk/gdkwindow.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Define corresponding Windows types for some X11 types, just for laziness.
*/
typedef PALETTEENTRY XColor;
typedef guint VisualID;
typedef int Status;
/* Define some of the X11 constants also here, again just for laziness */
/* Generic null resource */
#define None 0
/* Error codes */
#define Success 0
/* Grabbing status */
#define GrabSuccess 0
#define AlreadyGrabbed 2
/* Some structs are somewhat useful to emulate internally, just to
keep the code less #ifdefed. */
typedef struct {
HPALETTE palette; /* Palette handle used when drawing. */
guint size; /* Number of entries in the palette. */
gboolean stale; /* 1 if palette needs to be realized,
* otherwise 0. */
gboolean *in_use;
gboolean rc_palette; /* If RC_PALETTE is on in the RASTERCAPS */
gulong sizepalette; /* SIZEPALETTE if rc_palette */
} ColormapStruct, *Colormap;
typedef struct {
gint map_entries;
guint visualid;
guint bitspixel;
} Visual;
typedef struct {
Colormap colormap;
unsigned long red_max;
unsigned long red_mult;
unsigned long green_max;
unsigned long green_mult;
unsigned long blue_max;
unsigned long blue_mult;
unsigned long base_pixel;
} XStandardColormap;
typedef struct _GdkGCWin32Data GdkGCWin32Data;
typedef struct _GdkDrawableWin32Data GdkDrawableWin32Data;
typedef struct _GdkWindowWin32Data GdkWindowWin32Data;
typedef struct _GdkColormapPrivateWin32 GdkColormapPrivateWin32;
typedef struct _GdkCursorPrivate GdkCursorPrivate;
typedef struct _GdkWin32SingleFont GdkWin32SingleFont;
typedef struct _GdkFontPrivateWin32 GdkFontPrivateWin32;
typedef struct _GdkImagePrivateWin32 GdkImagePrivateWin32;
typedef struct _GdkVisualPrivate GdkVisualPrivate;
typedef struct _GdkRegionPrivate GdkRegionPrivate;
typedef struct _GdkICPrivate GdkICPrivate;
#define GDK_DRAWABLE_WIN32DATA(win) ((GdkDrawableWin32Data *)(((GdkDrawablePrivate*)(win))->klass_data))
#define GDK_WINDOW_WIN32DATA(win) ((GdkWindowWin32Data *)(((GdkDrawablePrivate*)(win))->klass_data))
#define GDK_GC_WIN32DATA(gc) ((GdkGCWin32Data *)(((GdkGCPrivate*)(gc))->klass_data))
struct _GdkGCWin32Data
{
/* A Windows Device Context (DC) is not equivalent to an X11
* GC. We can use a DC only in the window for which it was
* allocated, or (in the case of a memory DC) with the bitmap that
* has been selected into it. Thus, we have to release and
* reallocate a DC each time the GdkGC is used to paint into a new
* window or pixmap. We thus keep all the necessary values in the
* GdkGCWin32Data struct.
*/
HDC xgc;
GdkGCValuesMask values_mask;
gulong foreground; /* Pixel values from GdkColor, */
gulong background; /* not Win32 COLORREFs */
GdkFont *font;
gint rop2;
GdkFill fill_style;
GdkPixmap *tile;
GdkPixmap *stipple;
HRGN clip_region;
GdkSubwindowMode subwindow_mode;
gint ts_x_origin;
gint ts_y_origin;
gint clip_x_origin;
gint clip_y_origin;
gint graphics_exposures;
gint pen_width;
DWORD pen_style;
HANDLE hwnd; /* If a DC is allocated, for which window
* or what bitmap is selected into it
*/
int saved_dc;
};
struct _GdkDrawableWin32Data
{
HANDLE xid;
};
struct _GdkWindowWin32Data
{
GdkDrawableWin32Data drawable;
/* We must keep the event mask here to filter them ourselves */
gint event_mask;
/* Values for bg_type */
#define GDK_WIN32_BG_NORMAL 0
#define GDK_WIN32_BG_PIXEL 1
#define GDK_WIN32_BG_PIXMAP 2
#define GDK_WIN32_BG_PARENT_RELATIVE 3
#define GDK_WIN32_BG_TRANSPARENT 4
/* We draw the background ourselves at WM_ERASEBKGND */
guchar bg_type;
gulong bg_pixel; /* GdkColor pixel, not COLORREF */
GdkPixmap *bg_pixmap;
HCURSOR xcursor;
/* Window size hints */
gint hint_flags;
gint hint_x, hint_y;
gint hint_min_width, hint_min_height;
gint hint_max_width, hint_max_height;
gboolean extension_events_selected;
HKL input_locale;
CHARSETINFO charset_info;
};
struct _GdkCursorPrivate
{
GdkCursor cursor;
HCURSOR xcursor;
};
struct _GdkWin32SingleFont
{
HFONT xfont;
UINT charset;
UINT codepage;
FONTSIGNATURE fs;
};
struct _GdkFontPrivateWin32
{
GdkFontPrivate base;
GSList *fonts; /* List of GdkWin32SingleFonts */
GSList *names;
};
struct _GdkVisualPrivate
{
GdkVisual visual;
Visual *xvisual;
};
struct _GdkColormapPrivateWin32
{
GdkColormapPrivate base;
Colormap xcolormap;
gint private_val;
GHashTable *hash;
GdkColorInfo *info;
time_t last_sync_time;
};
struct _GdkImagePrivateWin32
{
GdkImagePrivate base;
HBITMAP ximage;
};
struct _GdkRegionPrivate
{
GdkRegion region;
HRGN xregion;
};
void gdk_win32_selection_init (void);
void gdk_win32_dnd_exit (void);
GdkColormap* gdk_colormap_lookup (Colormap xcolormap);
GdkVisual* gdk_visual_lookup (Visual *xvisual);
#include "gdkwin32.h"
void gdk_xid_table_insert (HANDLE *hnd,
gpointer data);
void gdk_xid_table_remove (HANDLE xid);
gpointer gdk_xid_table_lookup (HANDLE xid);
GdkGC * _gdk_win32_gc_new (GdkDrawable *drawable,
GdkGCValues *values,
@ -287,22 +47,24 @@ void gdk_gc_postdraw (GdkDrawable *drawable,
GdkGCValuesMask usage);
HRGN BitmapToRegion (HBITMAP hBmp);
gchar *gdk_font_full_name_get (GdkFont *font);
void gdk_sel_prop_store (GdkWindow *owner,
GdkAtom type,
gint format,
guchar *data,
gint length);
gint gdk_nmbstowcs (GdkWChar *dest,
gint gdk_nmbstowcs (GdkWChar *dest,
const gchar *src,
gint src_len,
gint dest_max);
gint gdk_nmbstowchar_ts (wchar_t *dest,
gint gdk_nmbstowchar_ts (wchar_t *dest,
const gchar *src,
gint src_len,
gint dest_max);
void gdk_wchar_text_handle (GdkFont *font,
void gdk_wchar_text_handle (GdkFont *font,
const wchar_t *wcstr,
int wclen,
void (*handler)(GdkWin32SingleFont *,
@ -311,16 +73,12 @@ void gdk_wchar_text_handle (GdkFont *font,
void *),
void *arg);
gchar *gdk_color_to_string (const GdkColor *);
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);
gchar *gdk_color_to_string (const GdkColor *);
gchar *gdk_win32_last_error_string (void);
void gdk_win32_api_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)
#define WIN32_GDI_FAILED(api) gdk_win32_gdi_failed (__FILE__ ":" __PRETTY_FUNCTION__, __LINE__, api)
@ -335,8 +93,6 @@ extern LRESULT CALLBACK gdk_WindowProc (HWND, UINT, WPARAM, LPARAM);
extern GdkDrawableClass _gdk_win32_drawable_class;
extern HWND gdk_root_window;
GDKVAR ATOM gdk_selection_property;
GDKVAR gchar *gdk_progclass;
extern gboolean gdk_event_func_from_window_proc;
extern HDC gdk_DC;
@ -353,9 +109,4 @@ extern GdkAtom gdk_ole2_dnd_atom;
extern DWORD windows_version;
#define IS_WIN_NT(dwVersion) (dwVersion < 0x80000000)
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __GDK_PRIVATE_WIN32_H__ */

View File

@ -30,8 +30,8 @@
#include "gdkproperty.h"
#include "gdkselection.h"
#include "gdkprivate.h"
#include "gdkwin32.h"
#include "gdkinternals.h"
#include "gdkprivate-win32.h"
GdkAtom
gdk_atom_intern (const gchar *atom_name,

View File

@ -1,3 +1,5 @@
#error this file should not be used, I think
/* GDK - The GIMP Drawing Kit
* Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
*

View File

@ -28,8 +28,11 @@
#include <string.h>
#include <gdk/gdk.h>
#include "gdkwin32.h"
#include "gdkproperty.h"
#include "gdkselection.h"
#include "gdkinternals.h"
#include "gdkprivate.h"
#include "gdkprivate-win32.h"
/* We emulate the GDK_SELECTION window properties by storing
* it's data in a per-window hashtable.
@ -74,11 +77,11 @@ gdk_sel_prop_store (GdkWindow *owner,
g_hash_table_insert (sel_prop_table, &GDK_DRAWABLE_XID (owner), prop);
}
gint
gboolean
gdk_selection_owner_set (GdkWindow *owner,
GdkAtom selection,
guint32 time,
gint send_event)
gboolean send_event)
{
gchar *sel_name;
HWND xwindow;

View File

@ -315,15 +315,6 @@ gdk_visual_lookup (Visual *xvisual)
return NULL;
}
GdkVisual*
gdkx_visual_get (VisualID xvisualid)
{
if (xvisualid == system_visual->xvisual->visualid)
return (GdkVisual*) system_visual;
else
return NULL;
}
static void
gdk_visual_decompose_mask (gulong mask,
gint *shift,

View File

@ -27,10 +27,271 @@
#ifndef __GDK_WIN32_H__
#define __GDK_WIN32_H__
#include <gdk/win32/gdkprivate-win32.h>
#include <gdk/gdkprivate.h>
#include <gdk/gdkcursor.h>
#include <time.h>
#include <locale.h>
#define STRICT /* We want strict type checks */
#include <windows.h>
#include <commctrl.h>
/* Make up for some minor w32api header lossage */
/* PS_JOIN_MASK is missing */
#ifndef PS_JOIN_MASK
#define PS_JOIN_MASK (PS_JOIN_BEVEL|PS_JOIN_MITER|PS_JOIN_ROUND)
#endif
/* CLR_INVALID is missing */
#ifndef CLR_INVALID
#define CLR_INVALID CLR_NONE
#endif
/* Some charsets are missing */
#ifndef JOHAB_CHARSET
#define JOHAB_CHARSET 130
#endif
#ifndef VIETNAMESE_CHARSET
#define VIETNAMESE_CHARSET 163
#endif
#ifndef FS_VIETNAMESE
#define FS_VIETNAMESE 0x100
#endif
#ifndef VM_OEM_PLUS
#define VK_OEM_PLUS 0xBB
#endif
#ifndef WM_GETOBJECT
#define WM_GETOBJECT 0x3D
#endif
#ifndef WM_NCXBUTTONDOWN
#define WM_NCXBUTTONDOWN 0xAB
#define WM_NCXBUTTONUP 0xAC
#define WM_NCXBUTTONDBLCLK 0xAD
#endif
#ifndef WM_CHANGEUISTATE
#define WM_CHANGEUISTATE 0x127
#define WM_UPDATEUISTATE 0x128
#define WM_QUERYUISTATE 0x129
#endif
#ifndef WM_XBUTTONDOWN
#define WM_XBUTTONDOWN 0x20B
#define WM_XBUTTONUP 0x20C
#define WM_XBUTTONDBLCLK 0x20D
#endif
#ifndef WM_IME_REQUEST
#define WM_IME_REQUEST 0x288
#endif
#ifndef WM_NCMOUSEHOVER
#define WM_NCMOUSEHOVER 0x2A0
#define WM_NCMOUSELEAVE 0x2A2
#endif
#ifndef WM_APPCOMMAND
#define WM_APPCOMMAND 0x319
#endif
#include <gdk/gdkprivate.h>
#include "gdkwin32.h"
/* Define corresponding Windows types for some X11 types, just for laziness. */
typedef PALETTEENTRY XColor;
/* Define some of the X11 constants also here, again just for laziness */
/* Error codes */
#define Success 0
/* Grabbing status */
#define GrabSuccess 0
#define AlreadyGrabbed 2
/* Some structs are somewhat useful to emulate internally, just to
* keep the code less #ifdefed.
*/
typedef struct {
HPALETTE palette; /* Palette handle used when drawing. */
guint size; /* Number of entries in the palette. */
gboolean stale; /* 1 if palette needs to be realized,
* otherwise 0. */
gboolean *in_use;
gboolean rc_palette; /* If RC_PALETTE is on in the RASTERCAPS */
gulong sizepalette; /* SIZEPALETTE if rc_palette */
} ColormapStruct, *Colormap;
typedef struct {
gint map_entries;
guint visualid;
guint bitspixel;
} Visual;
typedef struct {
Colormap colormap;
unsigned long red_max;
unsigned long red_mult;
unsigned long green_max;
unsigned long green_mult;
unsigned long blue_max;
unsigned long blue_mult;
unsigned long base_pixel;
} XStandardColormap;
typedef struct _GdkGCWin32Data GdkGCWin32Data;
typedef struct _GdkDrawableWin32Data GdkDrawableWin32Data;
typedef struct _GdkWindowWin32Data GdkWindowWin32Data;
typedef struct _GdkWin32PositionInfo GdkWin32PositionInfo;
typedef struct _GdkColormapPrivateWin32 GdkColormapPrivateWin32;
typedef struct _GdkCursorPrivate GdkCursorPrivate;
typedef struct _GdkWin32SingleFont GdkWin32SingleFont;
typedef struct _GdkFontPrivateWin32 GdkFontPrivateWin32;
typedef struct _GdkImagePrivateWin32 GdkImagePrivateWin32;
typedef struct _GdkVisualPrivate GdkVisualPrivate;
typedef struct _GdkRegionPrivate GdkRegionPrivate;
typedef struct _GdkICPrivate GdkICPrivate;
#define GDK_DRAWABLE_WIN32DATA(win) ((GdkDrawableWin32Data *)(((GdkDrawablePrivate*)(win))->klass_data))
#define GDK_WINDOW_WIN32DATA(win) ((GdkWindowWin32Data *)(((GdkDrawablePrivate*)(win))->klass_data))
#define GDK_GC_WIN32DATA(gc) ((GdkGCWin32Data *)(((GdkGCPrivate*)(gc))->klass_data))
struct _GdkGCWin32Data
{
GdkRegion *clip_region;
/* A Windows Device Context (DC) is not equivalent to an X11
* GC. We can use a DC only in the window for which it was
* allocated, or (in the case of a memory DC) with the bitmap that
* has been selected into it. Thus, we have to release and
* reallocate a DC each time the GdkGC is used to paint into a new
* window or pixmap. We thus keep all the necessary values in the
* GdkGCWin32Data struct.
*/
HDC xgc;
HRGN hcliprgn;
GdkGCValuesMask values_mask;
gulong foreground; /* Pixel values from GdkColor, */
gulong background; /* not Win32 COLORREFs */
GdkFont *font;
gint rop2;
GdkFill fill_style;
GdkPixmap *tile;
GdkPixmap *stipple;
GdkSubwindowMode subwindow_mode;
gint graphics_exposures;
gint pen_width;
DWORD pen_style;
HANDLE hwnd; /* If a DC is allocated, for which window
* or what bitmap is selected into it
*/
int saved_dc;
};
struct _GdkDrawableWin32Data
{
HANDLE xid;
};
struct _GdkWin32PositionInfo
{
gint x;
gint y;
gint width;
gint height;
gint x_offset; /* Offsets to add to Win32 coordinates */
gint y_offset; /* within window to get GDK coodinates */
gboolean big : 1;
gboolean mapped : 1;
gboolean no_bg : 1; /* Set when the window background is
* temporarily unset during resizing
* and scaling */
GdkRectangle clip_rect; /* visible rectangle of window */
};
struct _GdkWindowWin32Data
{
GdkDrawableWin32Data drawable;
GdkWin32PositionInfo position_info;
/* We must keep the event mask here to filter them ourselves */
gint event_mask;
/* Values for bg_type */
#define GDK_WIN32_BG_NORMAL 0
#define GDK_WIN32_BG_PIXEL 1
#define GDK_WIN32_BG_PIXMAP 2
#define GDK_WIN32_BG_PARENT_RELATIVE 3
#define GDK_WIN32_BG_TRANSPARENT 4
/* We draw the background ourselves at WM_ERASEBKGND */
guchar bg_type;
gulong bg_pixel;
GdkPixmap *bg_pixmap;
HCURSOR xcursor;
/* Window size hints */
gint hint_flags;
gint hint_x, hint_y;
gint hint_min_width, hint_min_height;
gint hint_max_width, hint_max_height;
gboolean extension_events_selected;
HKL input_locale;
CHARSETINFO charset_info;
};
struct _GdkCursorPrivate
{
GdkCursor cursor;
HCURSOR xcursor;
};
struct _GdkWin32SingleFont
{
HFONT xfont;
UINT charset;
UINT codepage;
FONTSIGNATURE fs;
};
struct _GdkFontPrivateWin32
{
GdkFontPrivate base;
GSList *fonts; /* List of GdkWin32SingleFonts */
GSList *names;
};
struct _GdkVisualPrivate
{
GdkVisual visual;
Visual *xvisual;
};
struct _GdkColormapPrivateWin32
{
GdkColormapPrivate base;
Colormap xcolormap;
gint private_val;
GHashTable *hash;
GdkColorInfo *info;
DWORD last_sync_time;
};
struct _GdkImagePrivateWin32
{
GdkImagePrivate base;
HBITMAP ximage;
};
#define GDK_ROOT_WINDOW() ((guint32) HWND_DESKTOP)
#define GDK_ROOT_PARENT() ((GdkWindow *) gdk_parent_root)
@ -41,14 +302,17 @@
#define GDK_COLORMAP_WIN32COLORMAP(cmap)(((GdkColormapPrivateWin32 *) cmap)->xcolormap)
#define GDK_VISUAL_XVISUAL(vis) (((GdkVisualPrivate *) vis)->xvisual)
#define GDK_WINDOW_XDISPLAY GDK_DRAWABLE_XDISPLAY
#define GDK_WINDOW_XWINDOW GDK_DRAWABLE_XID
#define GDK_FONT_XFONT(font) (((GdkWin32SingleFont *)((GdkFontPrivateWin32 *)font)->fonts->data)->xfont)
#define GDK_WINDOW_XDISPLAY GDK_DRAWABLE_XDISPLAY
GdkVisual* gdkx_visual_get (VisualID xvisualid);
GDKVAR gchar *gdk_progclass;
GDKVAR ATOM gdk_selection_property;
/* Functions to create GDK pixmaps and windows from their native equivalents */
GdkPixmap *gdk_pixmap_foreign_new (guint32 anid);
GdkWindow *gdk_window_foreign_new (guint32 anid);
/* Return the Gdk* for a particular HANDLE */
gpointer gdk_xid_table_lookup (HANDLE handle);
#endif /* __GDK_WIN32_H__ */

View File

@ -33,6 +33,8 @@
#include "gdkevents.h"
#include "gdkpixmap.h"
#include "gdkwindow.h"
#include "gdkinternals.h"
#include "gdkprivate.h"
#include "gdkprivate-win32.h"
#include "gdkinputprivate.h"
#include "gdkwin32.h"
@ -68,6 +70,8 @@ SafeAdjustWindowRectEx (RECT* lpRect,
return TRUE;
}
GdkDrawableClass _gdk_windowing_window_class;
static void
gdk_win32_window_destroy (GdkDrawable *drawable)
{
@ -92,21 +96,20 @@ gdk_win32_window_alloc (void)
GdkWindow *window;
GdkWindowPrivate *private;
static GdkDrawableClass klass;
static gboolean initialized = FALSE;
if (!initialized)
{
initialized = TRUE;
klass = _gdk_win32_drawable_class;
klass.destroy = gdk_win32_window_destroy;
_gdk_windowing_window_class = _gdk_win32_drawable_class;
_gdk_win32_drawable_class.destroy = gdk_win32_window_destroy;
}
window = _gdk_window_alloc ();
private = (GdkWindowPrivate *) window;
private->drawable.klass = &klass;
private->drawable.klass = &_gdk_windowing_window_class;
private->drawable.klass_data = g_new (GdkWindowWin32Data, 1);
GDK_WINDOW_WIN32DATA (window)->event_mask = 0;
@ -1012,11 +1015,11 @@ gdk_window_clear (GdkWindow *window)
void
gdk_window_clear_area (GdkWindow *window,
gint x,
gint y,
gint width,
gint height)
_gdk_windowing_window_clear_area (GdkWindow *window,
gint x,
gint y,
gint width,
gint height)
{
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
@ -1029,21 +1032,22 @@ gdk_window_clear_area (GdkWindow *window,
width = ((GdkDrawablePrivate *) window)->width - x;
if (height == 0)
height = ((GdkDrawablePrivate *) window)->height - y;
GDK_NOTE (MISC, g_print ("gdk_window_clear_area: %#x %dx%d@+%d+%d\n",
GDK_NOTE (MISC, g_print ("_gdk_windowing_window_clear_area: "
"%#x %dx%d@+%d+%d\n",
GDK_DRAWABLE_XID (window), width, height, x, y));
hdc = GetDC (GDK_DRAWABLE_XID (window));
IntersectClipRect (hdc, x, y, x + width, y + height);
IntersectClipRect (hdc, x, y, x + width + 1, y + height + 1);
SendMessage (GDK_DRAWABLE_XID (window), WM_ERASEBKGND, (WPARAM) hdc, 0);
ReleaseDC (GDK_DRAWABLE_XID (window), hdc);
}
}
void
gdk_window_clear_area_e (GdkWindow *window,
gint x,
gint y,
gint width,
gint height)
_gdk_windowing_window_clear_area_e (GdkWindow *window,
gint x,
gint y,
gint width,
gint height)
{
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
@ -1052,13 +1056,14 @@ gdk_window_clear_area_e (GdkWindow *window,
{
RECT rect;
GDK_NOTE (MISC, g_print ("gdk_window_clear_area_e: %#x %dx%d@+%d+%d\n",
GDK_NOTE (MISC, g_print ("_gdk_windowing_window_clear_area_e: "
"%#x %dx%d@+%d+%d\n",
GDK_DRAWABLE_XID (window), width, height, x, y));
rect.left = x;
rect.right = x + width;
rect.right = x + width + 1;
rect.top = y;
rect.bottom = y + height;
rect.bottom = y + height + 1;
if (!InvalidateRect (GDK_DRAWABLE_XID (window), &rect, TRUE))
WIN32_GDI_FAILED ("InvalidateRect");
UpdateWindow (GDK_DRAWABLE_XID (window));
@ -1342,6 +1347,8 @@ gdk_window_set_title (GdkWindow *window,
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (title != NULL);
g_return_if_fail (strlen (title) > 0);
GDK_NOTE (MISC, g_print ("gdk_window_set_title: %#x %s\n",
GDK_DRAWABLE_XID (window), title));
@ -1999,7 +2006,7 @@ gdk_propagate_shapes (HANDLE win,
for (i = 0; i < num; i++)
{
GetWindowPlacement (list[i], &placement);
if (placement.showCmd = SW_SHOWNORMAL)
if (placement.showCmd == SW_SHOWNORMAL)
{
childRegion = CreateRectRgnIndirect (&emptyRect);
GetWindowRgn (list[i], childRegion);

View File

@ -1,11 +1,11 @@
## Makefile for building the machine dependent part of GDK with gcc on cygwin
## Makefile for building the machine dependent part of GDK on Win32 with gcc
## Use: make -f makefile.cygwin
# Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
# We use the wntab32x.lib archive library directly (copy it as libwntab32x.a).
WTKIT = ../../../wtkit126
OPTIMIZE = -g -O
OPTIMIZE = -g
################################################################
@ -35,6 +35,7 @@ gdk_win32_OBJECTS = \
gdkevents-win32.o \
gdkfont-win32.o \
gdkgc-win32.o \
gdkgeometry-win32.o \
gdkglobals-win32.o \
gdkim-win32.o \
gdkimage-win32.o \
@ -42,20 +43,36 @@ gdk_win32_OBJECTS = \
gdkmain-win32.o \
gdkpixmap-win32.o \
gdkproperty-win32.o \
gdkregion-win32.o \
gdkpolyreg-generic.o \
gdkregion-generic.o \
gdkselection-win32.o \
gdkvisual-win32.o \
gdkwin32id.o \
gdkwindow-win32.o
../../config.h : ../../config.h.win32
cp ../../config.h.win32 ../../config.h
cp $< $@
../gdkconfig.h : ../gdkconfig.h.win32
cp ../gdkconfig.h.win32 ../gdkconfig.h
cp $< $@
gdkregion-generic.c: ../x11/gdkregion-generic.c
cp $< $@
gdkpolyreg-generic.c: ../x11/gdkpolyreg-generic.c
cp $< $@
gdkregion-generic.h: ../x11/gdkregion-generic.h
cp $< $@
gdkpoly-generic.h: ../x11/gdkpoly-generic.h
cp $< $@
gdkgc-win32.o:: gdkregion-generic.h
gdkpolyreg-generic.o:: gdkpoly-generic.h
# Kludge to get the path to the win32 headers
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's!/winver.h!!')
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015')
gdk-win32res.o : rc/gdk.rc gdk-build.tmp
m4 -DBUILDNUMBER=`cat gdk-build.tmp` <rc/gdk.rc >gdk-win32res.rc

View File

@ -29,6 +29,7 @@ CFLAGS = -I. -I.. -I..\.. -I$(WTKIT)\include -I$(GLIB) -DG_ENABLE_DEBUG -DHAVE_C
all: \
..\..\config.h \
..\gdkconfig.h \
gdk-win32.lib \
gdk.res
@ -41,6 +42,7 @@ gdk_win32_OBJECTS = \
gdkevents-win32.obj \
gdkfont-win32.obj \
gdkgc-win32.obj \
gdkgeometry-win32.obj \
gdkglobals-win32.obj \
gdkim-win32.obj \
gdkimage-win32.obj \
@ -49,6 +51,8 @@ gdk_win32_OBJECTS = \
gdkpixmap-win32.obj \
gdkproperty-win32.obj \
gdkregion-win32.obj \
gdkpolyreg-generic.obj \
gdkregion-generic.obj \
gdkselection-win32.obj \
gdkvisual-win32.obj \
gdkwin32id.obj \
@ -57,8 +61,26 @@ gdk_win32_OBJECTS = \
..\..\config.h : ..\..\config.h.win32
copy ..\..\config.h.win32 ..\..\config.h
..\gdkconfig.h : ..\gdkconfig.h.win32
copy ..\gdkconfig.h.win32 ..\gdkconfig.h
gdkregion-generic.c: ..\x11\gdkregion-generic.c
copy ..\x11\gdkregion-generic.c gdkregion-generic.c
gdkpolyreg-generic.c: ..\x11\gdkpolyreg-generic.c
copy ..\x11\gdkpolyreg-generic.c gdkpolyreg-generic.c
gdkregion-generic.h: ..\x11\gdkregion-generic.h
copy ..\x11\gdkregion-generic.h gdkregion-generic.h
gdkpoly-generic.h: ..\x11\gdkpoly-generic.h
copy ..\x11\gdkpoly-generic.h gdkpoly-generic.h
gdkgc-win32.o:: gdkregion-generic.h
gdkpolyreg-generic.o:: gdkpoly-generic.h
gdk.res : rc\gdk.rc
rc -r -fo gdk.res rc\gdk.rc
rc -DBUILDNUMBER=0 -r -fo gdk.res rc\gdk.rc
gdk-win32.lib : $(gdk_win32_OBJECTS)
lib -out:gdk-win32.lib $(gdk_win32_OBJECTS)

View File

@ -25,6 +25,7 @@
*/
#include <math.h>
#include <string.h>
#include "gtkgc.h"
#include "gtkrc.h"
#include "gtkstyle.h"

View File

@ -10,7 +10,7 @@ PTHREADS = ../../pthreads-snap-1999-05-30
PTHREAD_LIB = -L $(PTHREADS) -lpthread
PTHREAD_INC = -I $(PTHREADS)
OPTIMIZE = -g -O
OPTIMIZE = -g
################################################################
@ -333,7 +333,7 @@ gtk-$(GTK_VER).dll : generated $(gtk_OBJECTS) gtk.def gtk-win32res.o
.SUFFIXES: .c .o .i
# Kludge to get the path to the win32 headers
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's!/winver.h!!')
WIN32APIHEADERS = $(shell echo "\#include <winver.h>" | $(CC) -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015')
gtk-win32res.o : gtk.rc gtk-build.tmp
m4 -DBUILDNUMBER=`cat gtk-build.tmp` <gtk.rc >gtk-win32res.rc

View File

@ -337,7 +337,7 @@ gtktypebuiltins_evals.c: makeenums.pl gtk.defs
$(PERL) makeenums.pl arrays $(source_headers) $(gdk_headers) >gtktypebuiltins_evals.c
gtkmarshal.h gtkmarshal.c : gtkmarshal.list genmarshal.pl
$(PERL) genmarshal.pl
$(PERL) genmarshal.pl gtkmarshal.list s-gmh s-gmc
del gtkmarshal.c
rename s-gmc gtkmarshal.c
del gtkmarshal.h
@ -347,7 +347,7 @@ gtkmarshal.h gtkmarshal.c : gtkmarshal.list genmarshal.pl
# Linking:
#
gtk-$(GTK_VER).dll : $(gtk_OBJECTS) gtk.def
$(CC) $(CFLAGS) -LD -Fegtk-$(GTK_VER).dll $(gtk_OBJECTS) ..\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib gdi32.lib user32.lib $(LDFLAGS) /def:gtk.def
$(CC) $(CFLAGS) -LD -Fegtk-$(GTK_VER).dll $(gtk_OBJECTS) ..\gdk\gdk-$(GTK_VER).lib $(INTL)\gnu-intl.lib $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gmodule-$(GLIB_VER).lib gdi32.lib user32.lib advapi32.lib $(LDFLAGS) /def:gtk.def
# General rule for compiling the objects into the DLL
.c.obj :
@ -364,7 +364,7 @@ testdnd.obj : testdnd.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testdnd\" testdnd.c
testgtk.exe : gtk-$(GTK_VER).dll testgtk.obj
$(CC) $(CFLAGS) testgtk.obj gtk-$(GTK_VER).lib ..\gdk\gdk-$(GTK_VER).lib $(GLIB)\glib-$(GLIB_VER).lib $(LDFLAGS)
$(CC) $(CFLAGS) testgtk.obj gtk-$(GTK_VER).lib ..\gdk\gdk-$(GTK_VER).lib $(GLIB)\glib-$(GLIB_VER).lib $(GLIB)\gthread-$[GLIB_VER).lib $(LDFLAGS)
testgtk.obj : testgtk.c
$(CC) $(CFLAGS) -c -DG_LOG_DOMAIN=\"testgtk\" testgtk.c