Commit be3809f0 authored by Hans Breuer's avatar Hans Breuer Committed by Hans Breuer

use g_strcasecmp(), some poor platforms don't have strcasecmp()

2001-10-28  Hans Breuer  <hans@breuer.org>

	* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
	don't have strcasecmp()

	* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
	to remove the idle funcs in gtk_text_view_destroy (). To reduce
	code duplication wrap it in its own function and use it in
	gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()

	* gdk/win32/gdkdrawable-win32.c : implement the finalize
	method like the X11 version does, allow to set_colormap NULL
	* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
	set_colormap, also some adaption to X11 version :
	(gdk_window_hide) call _gdk_window_clear_update_area
	(gdk_window_reparent) call _gdk_window_init_position

	* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
	call gdk_window_resize() after all hints are set, because the
	window resizing process (WM_GETMINMAXINFO) takes all of them into
	account

	* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean

	* gdk/win32/gdkvisual-win32.c : register GdkVisual with
	sizeof (GdkVisualPrivate)

	* gdk/gdk.def gtk/gtk.def : upated externals

	* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
	  gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
	from now on use make.msc from $(TOP)/glib/build/win32

	* gtk/stock-icons/makefile.msc : add stock_missing_image
parent 15d20507
2001-10-28 Hans Breuer <hans@breuer.org>
* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
don't have strcasecmp()
* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
to remove the idle funcs in gtk_text_view_destroy (). To reduce
code duplication wrap it in its own function and use it in
gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()
* gdk/win32/gdkdrawable-win32.c : implement the finalize
method like the X11 version does, allow to set_colormap NULL
* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
set_colormap, also some adaption to X11 version :
(gdk_window_hide) call _gdk_window_clear_update_area
(gdk_window_reparent) call _gdk_window_init_position
* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
call gdk_window_resize() after all hints are set, because the
window resizing process (WM_GETMINMAXINFO) takes all of them into
account
* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean
* gdk/win32/gdkvisual-win32.c : register GdkVisual with
sizeof (GdkVisualPrivate)
* gdk/gdk.def gtk/gtk.def : upated externals
* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
from now on use make.msc from $(TOP)/glib/build/win32
* gtk/stock-icons/makefile.msc : add stock_missing_image
2001-11-08 Tor Lillqvist <tml@iki.fi>
* README.win32: Add headers. Add section about ActiveIMM.
......
2001-10-28 Hans Breuer <hans@breuer.org>
* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
don't have strcasecmp()
* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
to remove the idle funcs in gtk_text_view_destroy (). To reduce
code duplication wrap it in its own function and use it in
gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()
* gdk/win32/gdkdrawable-win32.c : implement the finalize
method like the X11 version does, allow to set_colormap NULL
* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
set_colormap, also some adaption to X11 version :
(gdk_window_hide) call _gdk_window_clear_update_area
(gdk_window_reparent) call _gdk_window_init_position
* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
call gdk_window_resize() after all hints are set, because the
window resizing process (WM_GETMINMAXINFO) takes all of them into
account
* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean
* gdk/win32/gdkvisual-win32.c : register GdkVisual with
sizeof (GdkVisualPrivate)
* gdk/gdk.def gtk/gtk.def : upated externals
* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
from now on use make.msc from $(TOP)/glib/build/win32
* gtk/stock-icons/makefile.msc : add stock_missing_image
2001-11-08 Tor Lillqvist <tml@iki.fi>
* README.win32: Add headers. Add section about ActiveIMM.
......
2001-10-28 Hans Breuer <hans@breuer.org>
* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
don't have strcasecmp()
* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
to remove the idle funcs in gtk_text_view_destroy (). To reduce
code duplication wrap it in its own function and use it in
gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()
* gdk/win32/gdkdrawable-win32.c : implement the finalize
method like the X11 version does, allow to set_colormap NULL
* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
set_colormap, also some adaption to X11 version :
(gdk_window_hide) call _gdk_window_clear_update_area
(gdk_window_reparent) call _gdk_window_init_position
* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
call gdk_window_resize() after all hints are set, because the
window resizing process (WM_GETMINMAXINFO) takes all of them into
account
* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean
* gdk/win32/gdkvisual-win32.c : register GdkVisual with
sizeof (GdkVisualPrivate)
* gdk/gdk.def gtk/gtk.def : upated externals
* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
from now on use make.msc from $(TOP)/glib/build/win32
* gtk/stock-icons/makefile.msc : add stock_missing_image
2001-11-08 Tor Lillqvist <tml@iki.fi>
* README.win32: Add headers. Add section about ActiveIMM.
......
2001-10-28 Hans Breuer <hans@breuer.org>
* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
don't have strcasecmp()
* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
to remove the idle funcs in gtk_text_view_destroy (). To reduce
code duplication wrap it in its own function and use it in
gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()
* gdk/win32/gdkdrawable-win32.c : implement the finalize
method like the X11 version does, allow to set_colormap NULL
* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
set_colormap, also some adaption to X11 version :
(gdk_window_hide) call _gdk_window_clear_update_area
(gdk_window_reparent) call _gdk_window_init_position
* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
call gdk_window_resize() after all hints are set, because the
window resizing process (WM_GETMINMAXINFO) takes all of them into
account
* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean
* gdk/win32/gdkvisual-win32.c : register GdkVisual with
sizeof (GdkVisualPrivate)
* gdk/gdk.def gtk/gtk.def : upated externals
* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
from now on use make.msc from $(TOP)/glib/build/win32
* gtk/stock-icons/makefile.msc : add stock_missing_image
2001-11-08 Tor Lillqvist <tml@iki.fi>
* README.win32: Add headers. Add section about ActiveIMM.
......
2001-10-28 Hans Breuer <hans@breuer.org>
* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
don't have strcasecmp()
* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
to remove the idle funcs in gtk_text_view_destroy (). To reduce
code duplication wrap it in its own function and use it in
gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()
* gdk/win32/gdkdrawable-win32.c : implement the finalize
method like the X11 version does, allow to set_colormap NULL
* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
set_colormap, also some adaption to X11 version :
(gdk_window_hide) call _gdk_window_clear_update_area
(gdk_window_reparent) call _gdk_window_init_position
* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
call gdk_window_resize() after all hints are set, because the
window resizing process (WM_GETMINMAXINFO) takes all of them into
account
* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean
* gdk/win32/gdkvisual-win32.c : register GdkVisual with
sizeof (GdkVisualPrivate)
* gdk/gdk.def gtk/gtk.def : upated externals
* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
from now on use make.msc from $(TOP)/glib/build/win32
* gtk/stock-icons/makefile.msc : add stock_missing_image
2001-11-08 Tor Lillqvist <tml@iki.fi>
* README.win32: Add headers. Add section about ActiveIMM.
......
2001-10-28 Hans Breuer <hans@breuer.org>
* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
don't have strcasecmp()
* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
to remove the idle funcs in gtk_text_view_destroy (). To reduce
code duplication wrap it in its own function and use it in
gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()
* gdk/win32/gdkdrawable-win32.c : implement the finalize
method like the X11 version does, allow to set_colormap NULL
* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
set_colormap, also some adaption to X11 version :
(gdk_window_hide) call _gdk_window_clear_update_area
(gdk_window_reparent) call _gdk_window_init_position
* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
call gdk_window_resize() after all hints are set, because the
window resizing process (WM_GETMINMAXINFO) takes all of them into
account
* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean
* gdk/win32/gdkvisual-win32.c : register GdkVisual with
sizeof (GdkVisualPrivate)
* gdk/gdk.def gtk/gtk.def : upated externals
* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
from now on use make.msc from $(TOP)/glib/build/win32
* gtk/stock-icons/makefile.msc : add stock_missing_image
2001-11-08 Tor Lillqvist <tml@iki.fi>
* README.win32: Add headers. Add section about ActiveIMM.
......
2001-10-28 Hans Breuer <hans@breuer.org>
* gtk/gtkfontsel.c : use g_strcasecmp(), some poor platforms
don't have strcasecmp()
* gtk/gtktextview.c : to fix crashing on e.g. TextView::find need
to remove the idle funcs in gtk_text_view_destroy (). To reduce
code duplication wrap it in its own function and use it in
gtk_text_view_unrealize () and gtk_text_view_destroy_layout ()
* gdk/win32/gdkdrawable-win32.c : implement the finalize
method like the X11 version does, allow to set_colormap NULL
* gdk/win32/gdkwindow-win32.c : adapt GdkWindowImplWin32::
set_colormap, also some adaption to X11 version :
(gdk_window_hide) call _gdk_window_clear_update_area
(gdk_window_reparent) call _gdk_window_init_position
* gdk/win32/gdkwindow-win32.c (gdk_window_set_geometry_hints) :
call gdk_window_resize() after all hints are set, because the
window resizing process (WM_GETMINMAXINFO) takes all of them into
account
* gdk/win32/gdkfont-win32.c : make gdk_font_equal return a gboolean
* gdk/win32/gdkvisual-win32.c : register GdkVisual with
sizeof (GdkVisualPrivate)
* gdk/gdk.def gtk/gtk.def : upated externals
* gdk/makefile.msc gdk/win32/makefile.msc gdk-pixbuf/makefile.msc
gdk-pixbuf/pixops/makefile.msc gtk/makefile.msc.in tests/makefile.msc :
from now on use make.msc from $(TOP)/glib/build/win32
* gtk/stock-icons/makefile.msc : add stock_missing_image
2001-11-08 Tor Lillqvist <tml@iki.fi>
* README.win32: Add headers. Add section about ActiveIMM.
......
......@@ -3,7 +3,7 @@ PRJ_TOP = ..
PACKAGE = gdk_pixbuf
PKG_VER = $(GDK_PIXBUF_VER)
!INCLUDE $(TOP)/build/win32/make.msc
!INCLUDE $(TOP)/glib/build/win32/make.msc
!IFNDEF PERL
PERL = perl
......
......@@ -2,7 +2,7 @@ TOP = ../../..
PACKAGE = pixops
PRJ_TOP = ..\..
!INCLUDE $(TOP)/build/win32/make.msc
!INCLUDE $(TOP)/glib/build/win32/make.msc
PKG_CFLAGS = -I.. $(GLIB_CFLAGS)
......
......@@ -398,6 +398,7 @@ EXPORTS
gdk_window_hide
gdk_window_hints_get_type
gdk_window_iconify
gdk_window_invalidate_maybe_recurse
gdk_window_invalidate_rect
gdk_window_invalidate_region
gdk_window_is_viewable
......
......@@ -7,7 +7,7 @@
## how to install for yourself.
TOP = ../..
!INCLUDE $(TOP)/build/win32/make.msc
!INCLUDE $(TOP)/glib/build/win32/make.msc
# Location of the Wintab toolkit. Downloadable from http://www.pointing.com.
# definition should possibly go to build/win32/module.def, too.
......@@ -41,7 +41,7 @@ PERL = perl
!ENDIF
CFLAGS = -I . -I .. $(GLIB_CFLAGS) $(PANGO_CFLAGS) -I ../gdk-pixbuf \
-DG_ENABLE_DEBUG -DHAVE_CONFIG_H -DGDK_ENABLE_BROKEN -DGDK_VERSION=\"$(GTK_VER)\"
$(G_DEBUGGING) -DHAVE_CONFIG_H -DGDK_ENABLE_BROKEN -DGDK_VERSION=\"$(GTK_VER)\"
EXTRALIBS = $(WTKIT)\lib\i386\wntab32x.lib $(GLIB_LIBS) \
..\gdk-pixbuf\gdk_pixbuf-$(GDK_PIXBUF_VER).lib $(PANGOWIN32_LIBS)
......@@ -57,7 +57,9 @@ all: \
gdkenumtypes.c \
gdk-win32-backend \
gdk-win32-$(GTK_VER).dll \
testgdk.exe
testgdk.exe \
gdk-win32-$(GTK_VER)s.lib \
# gdk-x11-$(GTK_VER).dll \
gdk_OBJECTS = \
gdk.obj \
......@@ -123,6 +125,14 @@ gdkconfig.h : gdkconfig.h.win32
gdk-win32-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def win32\gdk-win32.lib
$(CC) $(CFLAGS) -LD -Fegdk-win32-$(GTK_VER).dll $(gdk_OBJECTS) win32\gdk-win32.lib $(EXTRALIBS) gdi32.lib user32.lib imm32.lib shell32.lib ole32.lib uuid.lib win32\gdk.res $(LDFLAGS) /def:gdk.def
gdk-win32-$(GTK_VER)s.lib : $(gdk_OBJECTS)
lib /out:gdk-win32-$(GTK_VER)s.lib $(gdk_OBJECTS) win32\gdk-win32.lib
gdk-x11-$(GTK_VER).dll : $(gdk_OBJECTS) gdk.def x11\gdk-x11.lib
$(CC) $(CFLAGS) -LD -Fegdk-x11-$(GTK_VER).dll $(gdk_OBJECTS) \
$(PANGO)\pango\pangox-$(PANGO_VER).lib \
x11\gdk-x11.lib $(X11_LIBS) $(EXTRALIBS) user32.lib $(LDFLAGS) /def:gdk.def
testgdk.exe : gdk-win32-$(GTK_VER).dll testgdk.obj
$(CC) -Fetestgdk.exe testgdk.obj gdk-win32-$(GTK_VER).lib $(EXTRALIBS) $(LDFLAGS)
......
......@@ -114,6 +114,8 @@ static GdkVisual* gdk_win32_get_visual (GdkDrawable *drawable);
static void gdk_drawable_impl_win32_class_init (GdkDrawableImplWin32Class *klass);
static void gdk_drawable_impl_win32_finalize (GObject *object);
static gpointer parent_class = NULL;
GType
......@@ -148,9 +150,12 @@ static void
gdk_drawable_impl_win32_class_init (GdkDrawableImplWin32Class *klass)
{
GdkDrawableClass *drawable_class = GDK_DRAWABLE_CLASS (klass);
GObjectClass *object_class = G_OBJECT_CLASS (klass);
parent_class = g_type_class_peek_parent (klass);
object_class->finalize = gdk_drawable_impl_win32_finalize;
drawable_class->create_gc = _gdk_win32_gc_new;
drawable_class->draw_rectangle = gdk_win32_draw_rectangle;
drawable_class->draw_arc = gdk_win32_draw_arc;
......@@ -173,6 +178,14 @@ gdk_drawable_impl_win32_class_init (GdkDrawableImplWin32Class *klass)
drawable_class->get_image = _gdk_win32_get_image;
}
static void
gdk_drawable_impl_win32_finalize (GObject *object)
{
gdk_drawable_set_colormap (GDK_DRAWABLE (object), NULL);
G_OBJECT_CLASS (parent_class)->finalize (object);
}
/*****************************************************
* Win32 specific implementations of generic functions *
*****************************************************/
......@@ -193,8 +206,6 @@ gdk_win32_set_colormap (GdkDrawable *drawable,
{
GdkDrawableImplWin32 *impl;
g_return_if_fail (colormap != NULL);
impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
if (impl->colormap == colormap)
......
......@@ -1725,7 +1725,7 @@ gdk_font_id (const GdkFont *font)
return 0;
}
gint
gboolean
gdk_font_equal (const GdkFont *fonta,
const GdkFont *fontb)
{
......
......@@ -67,7 +67,7 @@ gdk_visual_get_type (void)
(GClassInitFunc) gdk_visual_class_init,
NULL, /* class_finalize */
NULL, /* class_data */
sizeof (GdkVisual),
sizeof (GdkVisualPrivate),
0, /* n_preallocs */
(GInstanceInitFunc) NULL,
};
......
......@@ -177,15 +177,18 @@ gdk_window_impl_win32_set_colormap (GdkDrawable *drawable,
GdkDrawableImplWin32 *draw_impl;
g_return_if_fail (GDK_IS_WINDOW_IMPL_WIN32 (drawable));
g_return_if_fail (gdk_colormap_get_visual (cmap) != gdk_drawable_get_visual (drawable));
impl = GDK_WINDOW_IMPL_WIN32 (drawable);
draw_impl = GDK_DRAWABLE_IMPL_WIN32 (drawable);
GDK_DRAWABLE_GET_CLASS (draw_impl)->set_colormap (drawable, cmap);
/* chain up */
GDK_DRAWABLE_CLASS (parent_class)->set_colormap (drawable, cmap);
/* XXX */
g_print("gdk_window_impl_win32_set_colormap: XXX\n");
if (cmap)
{
/* XXX */
g_print("gdk_window_impl_win32_set_colormap: XXX\n");
}
}
static void
......@@ -896,6 +899,9 @@ gdk_window_hide (GdkWindow *window)
(guint) GDK_WINDOW_HWND (window)));
private->state |= GDK_WINDOW_STATE_WITHDRAWN;
_gdk_window_clear_update_area (window);
if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_TOPLEVEL)
ShowOwnedPopups (GDK_WINDOW_HWND (window), FALSE);
......@@ -1082,6 +1088,9 @@ gdk_window_reparent (GdkWindow *window,
GdkWindowImplWin32 *impl;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
g_return_if_fail (new_parent == NULL || GDK_IS_WINDOW (new_parent));
g_return_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_ROOT);
if (!new_parent)
new_parent = _gdk_parent_root;
......@@ -1123,6 +1132,7 @@ gdk_window_reparent (GdkWindow *window,
gdk_window_set_static_win_gravity (window, parent_private->guffaw_gravity);
parent_private->children = g_list_prepend (parent_private->children, window);
_gdk_window_init_position (GDK_WINDOW (window_private));
}
void
......@@ -1255,6 +1265,14 @@ gdk_window_set_hints (GdkWindow *window,
if (flags)
{
GdkGeometry geom;
gint geom_mask = 0;
geom.min_width = min_width;
geom.min_height = min_height;
geom.max_width = max_width;
geom.max_height = max_height;
if (flags & GDK_HINT_POS)
{
if (!GetWindowPlacement (GDK_WINDOW_HWND (window), &size_hints))
......@@ -1302,47 +1320,12 @@ gdk_window_set_hints (GdkWindow *window,
}
if (flags & GDK_HINT_MIN_SIZE)
{
rect.left = 0;
rect.top = 0;
rect.right = min_width;
rect.bottom = min_height;
dwStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
dwExStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
SafeAdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle);
impl->hint_min_width = rect.right - rect.left;
impl->hint_min_height = rect.bottom - rect.top;
/* Also check if he current size of the window is in bounds. */
GetClientRect (GDK_WINDOW_HWND (window), &rect);
if (rect.right < min_width && rect.bottom < min_height)
gdk_window_resize (window, min_width, min_height);
else if (rect.right < min_width)
gdk_window_resize (window, min_width, rect.bottom);
else if (rect.bottom < min_height)
gdk_window_resize (window, rect.right, min_height);
}
geom_mask |= GDK_HINT_MIN_SIZE;
if (flags & GDK_HINT_MAX_SIZE)
{
rect.left = 0;
rect.top = 0;
rect.right = max_width;
rect.bottom = max_height;
dwStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_STYLE);
dwExStyle = GetWindowLong (GDK_WINDOW_HWND (window), GWL_EXSTYLE);
AdjustWindowRectEx (&rect, dwStyle, FALSE, dwExStyle);
impl->hint_max_width = rect.right - rect.left;
impl->hint_max_height = rect.bottom - rect.top;
/* Again, check if the window is too large currently. */
GetClientRect (GDK_WINDOW_HWND (window), &rect);
if (rect.right > max_width && rect.bottom > max_height)
gdk_window_resize (window, max_width, max_height);
else if (rect.right > max_width)
gdk_window_resize (window, max_width, rect.bottom);
else if (rect.bottom > max_height)
gdk_window_resize (window, rect.right, max_height);
}
geom_mask |= GDK_HINT_MAX_SIZE;
gdk_window_set_geometry_hints (window, &geom, geom_mask);
}
}
......@@ -1356,6 +1339,7 @@ gdk_window_set_geometry_hints (GdkWindow *window,
RECT rect;
DWORD dwStyle;
DWORD dwExStyle;
gint new_width = 0, new_height = 0;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
......@@ -1385,13 +1369,20 @@ gdk_window_set_geometry_hints (GdkWindow *window,
/* Also check if he current size of the window is in bounds */
GetClientRect (GDK_WINDOW_HWND (window), &rect);
if (rect.right < geometry->min_width
&& rect.bottom < geometry->min_height)
gdk_window_resize (window, geometry->min_width, geometry->min_height);
{
new_width = geometry->min_width; new_height = geometry->min_height;
}
else if (rect.right < geometry->min_width)
gdk_window_resize (window, geometry->min_width, rect.bottom);
{
new_width = geometry->min_width; new_height = rect.bottom;
}
else if (rect.bottom < geometry->min_height)
gdk_window_resize (window, rect.right, geometry->min_height);
{
new_width = rect.right; new_height = geometry->min_height;
}
}
if (geom_mask & GDK_HINT_MAX_SIZE)
......@@ -1414,12 +1405,22 @@ gdk_window_set_geometry_hints (GdkWindow *window,
GetClientRect (GDK_WINDOW_HWND (window), &rect);
if (rect.right > geometry->max_width
&& rect.bottom > geometry->max_height)
gdk_window_resize (window, geometry->max_width, geometry->max_height);
{
new_width = geometry->max_width; new_height = geometry->max_height;
}
else if (rect.right > geometry->max_width)
gdk_window_resize (window, geometry->max_width, rect.bottom);
{
new_width = geometry->max_width; new_height = rect.bottom;
}
else if (rect.bottom > geometry->max_height)
gdk_window_resize (window, rect.right, geometry->max_height);
{
new_width = rect.right; new_height = geometry->max_height;
}
}
/* finally apply new size constraints */
if (new_width != 0 && new_height != 0)
gdk_window_resize (window, new_width, new_height);
/* I don't know what to do when called with zero base_width and height. */
if (geom_mask & GDK_HINT_BASE_SIZE
......@@ -1614,7 +1615,6 @@ gdk_window_set_cursor (GdkWindow *window,
GdkCursorPrivate *cursor_private;
HCURSOR hcursor;
HCURSOR hprevcursor;
POINT pt;
g_return_if_fail (window != NULL);
g_return_if_fail (GDK_IS_WINDOW (window));
......
......@@ -9,13 +9,13 @@ WTKIT = ..\..\..\wtkit126
# Nothing much configurable below
TOP = ../../..
!INCLUDE $(TOP)/build/win32/make.msc
!INCLUDE $(TOP)/glib/build/win32/make.msc
GTK_VER=1.3
CFLAGS = -I. -I.. -I..\.. $(GLIB_CFLAGS) $(PANGO_CFLAGS) \
-I$(WTKIT)\include -I$(GLIB) \
$(G_DEBUGGING) -DHAVE_CONFIG_H -DINSIDE_GDK_WIN32
$(G_DEBUGGING) -DHAVE_CONFIG_H -DINSIDE_GDK_WIN32 -DGDK_VERSION=\"$(GTK_VER)\"
all: \
..\..\config.h \
......
......@@ -87,8 +87,6 @@ EXPORTS
GTK_TYPE_WINDOW_TYPE
GTK_TYPE_WRAP_MODE
_gtk_drag_dest_handle_event
_gtk_drag_source_handle_event
gtk_accel_group_activate
gtk_accel_group_add
gtk_accel_group_attach
......@@ -221,6 +219,7 @@ EXPORTS
gtk_cell_renderer_text_get_type
gtk_cell_renderer_text_new
gtk_cell_renderer_text_set_fixed_height_from_font
gtk_cell_renderer_toggle_get_active
gtk_cell_renderer_toggle_get_radio
gtk_cell_renderer_toggle_get_type
gtk_cell_renderer_toggle_new
......@@ -705,14 +704,17 @@ EXPORTS
gtk_idle_add_priority
gtk_idle_remove
gtk_idle_remove_by_data
gtk_im_context_delete_surrounding
gtk_im_context_filter_keypress
gtk_im_context_focus_in
gtk_im_context_focus_out
gtk_im_context_get_preedit_string
gtk_im_context_get_surrounding
gtk_im_context_get_type
gtk_im_context_reset
gtk_im_context_set_client_window
gtk_im_context_set_cursor_location
gtk_im_context_set_surrounding
gtk_im_context_set_use_preedit
gtk_im_context_simple_add_table
gtk_im_context_simple_get_type
......@@ -900,6 +902,7 @@ EXPORTS
gtk_marshal_BOOLEAN__BOXED
gtk_marshal_BOOLEAN__BOXED_BOXED
gtk_marshal_BOOLEAN__ENUM
gtk_marshal_BOOLEAN__INT_INT
gtk_marshal_BOOLEAN__OBJECT_BOXED_BOXED
gtk_marshal_BOOLEAN__OBJECT_INT_INT_UINT
gtk_marshal_BOOLEAN__OBJECT_STRING_STRING_BOXED
......@@ -909,9 +912,7 @@ EXPORTS
gtk_marshal_STRING__DOUBLE
gtk_marshal_VOID__BOOLEAN_BOOLEAN_BOOLEAN
gtk_marshal_VOID__BOXED_BOXED
gtk_marshal_VOID__BOXED_BOXED_BOXED
gtk_marshal_VOID__BOXED_BOXED_POINTER
gtk_marshal_VOID__BOXED_INT
gtk_marshal_VOID__BOXED_OBJECT
gtk_marshal_VOID__BOXED_POINTER
gtk_marshal_VOID__BOXED_STRING_INT
......@@ -1578,7 +1579,6 @@ EXPORTS
gtk_text_mark_get_visible
gtk_text_mark_set_visible
gtk_text_new
gtk_text_pixbuf_type
gtk_text_set_adjustments
gtk_text_set_editable
gtk_text_set_line_wrap
......@@ -1864,7 +1864,6 @@ EXPORTS
gtk_tree_view_column_get_min_width
gtk_tree_view_column_get_reorderable
gtk_tree_view_column_get_sizing
gtk_tree_view_column_get_sizing
gtk_tree_view_column_get_sort_column_id
gtk_tree_view_column_get_sort_indicator
gtk_tree_view_column_get_sort_order
......@@ -1896,6 +1895,8 @@ EXPORTS
gtk_tree_view_column_set_widget
gtk_tree_view_columns_autosize
gtk_tree_view_create_row_drag_icon
gtk_tree_view_enable_model_drag_source
gtk_tree_view_enable_model_drag_dest
gtk_tree_view_expand_all
gtk_tree_view_expand_row
gtk_tree_view_get_background_area
......@@ -1942,8 +1943,6 @@ EXPORTS
gtk_tree_view_set_headers_visible
gtk_tree_view_set_model
gtk_tree_view_set_reorderable
gtk_tree_view_set_rows_drag_dest
gtk_tree_view_set_rows_drag_source
gtk_tree_view_set_rules_hint
gtk_tree_view_set_search_column
gtk_tree_view_set_search_equal_func
......@@ -2118,6 +2117,7 @@ EXPORTS
gtk_window_get_default_icon_list
gtk_window_get_default_size
gtk_window_get_destroy_with_parent
gtk_window_get_focus
gtk_window_get_frame_dimensions
gtk_window_get_gravity
gtk_window_get_has_frame
......
......@@ -555,7 +555,7 @@ gtk_font_selection_show_available_fonts (GtkFontSelection *fontsel)
gtk_clist_append (GTK_CLIST (fontsel->font_clist), (char **)&name);
if (!strcasecmp (name, "sans"))
if (!g_strcasecmp (name, "sans"))
match_row = i;
}
......@@ -915,7 +915,7 @@ gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
n_families = GTK_CLIST (fontsel->font_clist)->rows;
for (i = 0; i < n_families; i++)
{
if (strcasecmp (pango_font_family_get_name (fontsel->families[i]),
if (g_strcasecmp (pango_font_family_get_name (fontsel->families[i]),
pango_font_description_get_family (new_desc)) == 0)
new_family = fontsel->families[i];
}
......
......@@ -2165,6 +2165,22 @@ gtk_text_view_place_cursor_onscreen (GtkTextView *text_view)
return FALSE;
}
static void
gtk_text_view_remove_validate_idles (GtkTextView *text_view)
{
if (text_view->first_validate_idle != 0)
{
g_source_remove (text_view->first_validate_idle);
text_view->first_validate_idle = 0;
}
if (text_view->incremental_validate_idle != 0)
{
g_source_remove (text_view->incremental_validate_idle);
text_view->incremental_validate_idle = 0;
}
}
static void
gtk_text_view_destroy (GtkObject *object)
{
......@@ -2175,6 +2191,7 @@ gtk_text_view_destroy (GtkObject *object)
layout = text_view->layout;
gtk_text_view_remove_validate_idles (text_view);
gtk_text_view_set_buffer (text_view, NULL);
gtk_text_view_destroy_layout (text_view);
......@@ -3080,17 +3097,7 @@ gtk_text_view_unrealize (GtkWidget *widget)
text_view->cursor_gc = NULL;
}
if (text_view->first_validate_idle)
{
g_source_remove (text_view->first_validate_idle);
text_view->first_validate_idle = 0;
}
if (text_view->incremental_validate_idle)
{
g_source_remove (text_view->incremental_validate_idle);
text_view->incremental_validate_idle = 0;
}
gtk_text_view_remove_validate_idles (text_view);