X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/33611ebbd99217ef90f1178eed37e30385c121de..e1082c9fa8763696ea87c75b1435db9d3a2e1d7c:/src/gtk1/win_gtk.c?ds=inline diff --git a/src/gtk1/win_gtk.c b/src/gtk1/win_gtk.c index 96358744c4..dcc43deb5b 100644 --- a/src/gtk1/win_gtk.c +++ b/src/gtk1/win_gtk.c @@ -50,8 +50,10 @@ static void gtk_pizza_size_request (GtkWidget *widget, GtkRequisition *requisition); static void gtk_pizza_size_allocate (GtkWidget *widget, GtkAllocation *allocation); +#ifndef __WXGTK20__ static void gtk_pizza_draw (GtkWidget *widget, GdkRectangle *area); +#endif /* __WXGTK20__ */ static gint gtk_pizza_expose (GtkWidget *widget, GdkEventExpose *event); static void gtk_pizza_add (GtkContainer *container, @@ -146,7 +148,9 @@ gtk_pizza_class_init (GtkPizzaClass *klass) widget_class->unrealize = gtk_pizza_unrealize; widget_class->size_request = gtk_pizza_size_request; widget_class->size_allocate = gtk_pizza_size_allocate; +#ifndef __WXGTK20__ widget_class->draw = gtk_pizza_draw; +#endif widget_class->expose_event = gtk_pizza_expose; container_class->add = gtk_pizza_add; @@ -160,7 +164,6 @@ gtk_pizza_class_init (GtkPizzaClass *klass) widget_class->set_scroll_adjustments_signal = gtk_signal_new ("set_scroll_adjustments", GTK_RUN_LAST, - #ifdef __WXGTK20__ GTK_CLASS_TYPE(object_class), #else @@ -521,18 +524,20 @@ gtk_pizza_realize (GtkWidget *widget) attributes.width = widget->allocation.width; attributes.height = widget->allocation.height; +#ifndef __WXUNIVERSAL__ if (pizza->shadow_type == GTK_MYSHADOW_NONE) { /* no border, no changes to sizes */ - } else - if (pizza->shadow_type == GTK_MYSHADOW_THIN) + } + else if (pizza->shadow_type == GTK_MYSHADOW_THIN) { /* GTK_MYSHADOW_THIN == wxSIMPLE_BORDER */ attributes.x += 1; attributes.y += 1; attributes.width -= 2; attributes.height -= 2; - } else + } + else { /* GTK_MYSHADOW_IN == wxSUNKEN_BORDER */ /* GTK_MYSHADOW_OUT == wxRAISED_BORDER */ @@ -541,6 +546,7 @@ gtk_pizza_realize (GtkWidget *widget) attributes.width -= 4; attributes.height -= 4; } +#endif /* __WXUNIVERSAL__ */ /* minimal size */ if (attributes.width < 2) attributes.width = 2; @@ -705,6 +711,8 @@ gtk_pizza_size_allocate (GtkWidget *widget, } } +#ifndef __WXGTK20__ + static void gtk_pizza_draw (GtkWidget *widget, GdkRectangle *area) @@ -741,6 +749,8 @@ gtk_pizza_draw (GtkWidget *widget, } } +#endif /* __WXGTK20__ */ + static gint gtk_pizza_expose (GtkWidget *widget, GdkEventExpose *event) @@ -849,7 +859,7 @@ gtk_pizza_forall (GtkContainer *container, g_return_if_fail (container != NULL); g_return_if_fail (GTK_IS_PIZZA (container)); - g_return_if_fail (callback != NULL); + g_return_if_fail (callback != (GtkCallback)NULL); pizza = GTK_PIZZA (container); @@ -1045,6 +1055,7 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) { GtkWidget *widget; XEvent xevent; + XID win; gint x,y,w,h,border; @@ -1139,10 +1150,12 @@ gtk_pizza_scroll (GtkPizza *pizza, gint dx, gint dy) gtk_pizza_position_children (pizza); gdk_flush(); + + win = GDK_WINDOW_XWINDOW (pizza->bin_window); while (XCheckIfEvent(GDK_WINDOW_XDISPLAY (pizza->bin_window), &xevent, gtk_pizza_expose_predicate, - (XPointer)&GDK_WINDOW_XWINDOW (pizza->bin_window))) + (XPointer)&win)) { GdkEvent event; GtkWidget *event_widget;