]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/win_gtk.c
free old resources in DoLoad(), apparently fixes memory leaks with gstreamer 0.10...
[wxWidgets.git] / src / gtk / win_gtk.c
index 0457c7ac9e29d3c3c3fa379f2d0f2c00b9864387..09bd29432c4c15404f33ae8c7fddd555fccb9d87 100644 (file)
 extern "C" {
 #endif /* __cplusplus */
 
+typedef struct _GtkPizzaChild GtkPizzaChild;
+typedef struct _GtkPizzaClass GtkPizzaClass;
 typedef struct _GtkPizzaAdjData  GtkPizzaAdjData;
 
+struct _GtkPizzaClass
+{
+  GtkContainerClass parent_class;
+
+  void  (*set_scroll_adjustments)   (GtkPizza     *pizza,
+                                     GtkAdjustment  *hadjustment,
+                                     GtkAdjustment  *vadjustment);
+};
+
+struct _GtkPizzaChild
+{
+    GtkWidget *widget;
+    gint x;
+    gint y;
+};
+
 struct _GtkPizzaAdjData
 {
     gint dx;
@@ -40,8 +58,6 @@ static void gtk_pizza_size_request  (GtkWidget        *widget,
                                      GtkRequisition   *requisition);
 static void gtk_pizza_size_allocate (GtkWidget        *widget,
                                      GtkAllocation    *allocation);
-static gint gtk_pizza_expose        (GtkWidget        *widget,
-                                     GdkEventExpose   *event);
 static void gtk_pizza_style_set     (GtkWidget *widget,
                                      GtkStyle  *previous_style);
 static void gtk_pizza_add           (GtkContainer     *container,
@@ -148,7 +164,6 @@ 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;
-    widget_class->expose_event = gtk_pizza_expose;
     widget_class->style_set = gtk_pizza_style_set;
 
     container_class->add = gtk_pizza_add;
@@ -279,8 +294,6 @@ gtk_pizza_put (GtkPizza   *pizza,
     child_info->widget = widget;
     child_info->x = x;
     child_info->y = y;
-    child_info->width = width;
-    child_info->height = height;
 
     pizza->children = g_list_append (pizza->children, child_info);
 
@@ -289,6 +302,7 @@ gtk_pizza_put (GtkPizza   *pizza,
 
     gtk_widget_set_parent (widget, GTK_WIDGET (pizza));
 
+    gtk_widget_set_size_request( widget, width, height );
     if (GTK_WIDGET_REALIZED (pizza))
         gtk_pizza_allocate_child (pizza, child_info);
 }
@@ -326,16 +340,9 @@ gtk_pizza_set_size (GtkPizza   *pizza,
 
         if (child->widget == widget)
         {
-            if ((child->x == x) &&
-                (child->y == y) &&
-                (child->width == width) &&
-                (child->height == height)) return;
-
             child->x = x;
             child->y = y;
-            child->width = width;
-            child->height = height;
-            
+
             gtk_widget_set_size_request (widget, width, height);
 
             return;
@@ -563,26 +570,6 @@ gtk_pizza_size_allocate (GtkWidget     *widget,
     }
 }
 
-static gint
-gtk_pizza_expose (GtkWidget      *widget,
-                  GdkEventExpose *event)
-{
-    GtkPizza *pizza;
-
-    g_return_val_if_fail (widget != NULL, FALSE);
-    g_return_val_if_fail (GTK_IS_PIZZA (widget), FALSE);
-    g_return_val_if_fail (event != NULL, FALSE);
-
-    pizza = (GtkPizza*)widget;
-
-    if (event->window != pizza->bin_window)
-        return FALSE;
-
-    pizza_parent_class->expose_event(widget, event);
-
-    return FALSE;
-}
-
 static void
 gtk_pizza_style_set(GtkWidget *widget, GtkStyle  *previous_style)
 {