From a2d8ce854eb44b61371e3ba010717a2972350e03 Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Wed, 19 Jul 2000 10:34:52 +0000 Subject: [PATCH] There's no ONSCREEN/OFFSCREEN flag in gtk+ 1.3.1, so I had to #ifndef them out. Also used GTK_CLASS_TYPE... (For some reason, scrolling no longer works with gtk+ 1.3.1 now...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/win_gtk.c | 15 ++++++++++++++- src/gtk1/win_gtk.c | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/gtk/win_gtk.c b/src/gtk/win_gtk.c index 923a12d157..2ad696189b 100644 --- a/src/gtk/win_gtk.c +++ b/src/gtk/win_gtk.c @@ -14,6 +14,7 @@ #define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_NONE__POINTER_POINT #endif +#include "wx/gtk/setup.h" #include "wx/gtk/win_gtk.h" #include "gtk/gtksignal.h" #include "gtk/gtkprivate.h" @@ -160,7 +161,7 @@ gtk_pizza_class_init (GtkPizzaClass *klass) widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE(object_class), GTK_SIGNAL_OFFSET (GtkPizzaClass, set_scroll_adjustments), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT); @@ -295,8 +296,10 @@ gtk_pizza_put (GtkPizza *pizza, if (GTK_WIDGET_REALIZED (pizza)) gtk_widget_set_parent_window (widget, pizza->bin_window); +#ifndef __WXGTK20__ /* FIXME? */ if (!IS_ONSCREEN (x, y)) GTK_PRIVATE_SET_FLAG (widget, GTK_IS_OFFSCREEN); +#endif /* if (GTK_WIDGET_REALIZED (pizza)) @@ -477,7 +480,11 @@ gtk_pizza_map (GtkWidget *widget) if ( GTK_WIDGET_VISIBLE (child->widget) && !GTK_WIDGET_MAPPED (child->widget) && +#ifdef __WXGTK20__ + TRUE) +#else !GTK_WIDGET_IS_OFFSCREEN (child->widget)) +#endif { gtk_widget_map (child->widget); } @@ -812,7 +819,9 @@ gtk_pizza_remove (GtkContainer *container, /* security checks */ g_return_if_fail (GTK_IS_WIDGET (widget)); +#ifndef __WXGTK20__ GTK_PRIVATE_UNSET_FLAG (widget, GTK_IS_OFFSCREEN); +#endif break; } @@ -870,13 +879,17 @@ gtk_pizza_position_child (GtkPizza *pizza, gtk_widget_map (child->widget); } +#ifndef __WXGTK20__ if (GTK_WIDGET_IS_OFFSCREEN (child->widget)) GTK_PRIVATE_UNSET_FLAG (child->widget, GTK_IS_OFFSCREEN); +#endif } else { +#ifndef __WXGTK20__ if (!GTK_WIDGET_IS_OFFSCREEN (child->widget)) GTK_PRIVATE_SET_FLAG (child->widget, GTK_IS_OFFSCREEN); +#endif if (GTK_WIDGET_MAPPED (child->widget)) gtk_widget_unmap (child->widget); diff --git a/src/gtk1/win_gtk.c b/src/gtk1/win_gtk.c index 923a12d157..2ad696189b 100644 --- a/src/gtk1/win_gtk.c +++ b/src/gtk1/win_gtk.c @@ -14,6 +14,7 @@ #define gtk_marshal_NONE__POINTER_POINTER gtk_marshal_NONE__POINTER_POINT #endif +#include "wx/gtk/setup.h" #include "wx/gtk/win_gtk.h" #include "gtk/gtksignal.h" #include "gtk/gtkprivate.h" @@ -160,7 +161,7 @@ gtk_pizza_class_init (GtkPizzaClass *klass) widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments", GTK_RUN_LAST, - object_class->type, + GTK_CLASS_TYPE(object_class), GTK_SIGNAL_OFFSET (GtkPizzaClass, set_scroll_adjustments), gtk_marshal_NONE__POINTER_POINTER, GTK_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT); @@ -295,8 +296,10 @@ gtk_pizza_put (GtkPizza *pizza, if (GTK_WIDGET_REALIZED (pizza)) gtk_widget_set_parent_window (widget, pizza->bin_window); +#ifndef __WXGTK20__ /* FIXME? */ if (!IS_ONSCREEN (x, y)) GTK_PRIVATE_SET_FLAG (widget, GTK_IS_OFFSCREEN); +#endif /* if (GTK_WIDGET_REALIZED (pizza)) @@ -477,7 +480,11 @@ gtk_pizza_map (GtkWidget *widget) if ( GTK_WIDGET_VISIBLE (child->widget) && !GTK_WIDGET_MAPPED (child->widget) && +#ifdef __WXGTK20__ + TRUE) +#else !GTK_WIDGET_IS_OFFSCREEN (child->widget)) +#endif { gtk_widget_map (child->widget); } @@ -812,7 +819,9 @@ gtk_pizza_remove (GtkContainer *container, /* security checks */ g_return_if_fail (GTK_IS_WIDGET (widget)); +#ifndef __WXGTK20__ GTK_PRIVATE_UNSET_FLAG (widget, GTK_IS_OFFSCREEN); +#endif break; } @@ -870,13 +879,17 @@ gtk_pizza_position_child (GtkPizza *pizza, gtk_widget_map (child->widget); } +#ifndef __WXGTK20__ if (GTK_WIDGET_IS_OFFSCREEN (child->widget)) GTK_PRIVATE_UNSET_FLAG (child->widget, GTK_IS_OFFSCREEN); +#endif } else { +#ifndef __WXGTK20__ if (!GTK_WIDGET_IS_OFFSCREEN (child->widget)) GTK_PRIVATE_SET_FLAG (child->widget, GTK_IS_OFFSCREEN); +#endif if (GTK_WIDGET_MAPPED (child->widget)) gtk_widget_unmap (child->widget);