gtk: Update to Gtk+3.6. Separate GtkScrolledWindow and GtkScrolledView.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Tue, 29 Jan 2013 05:07:53 +0000 (22:07 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Tue, 29 Jan 2013 05:07:53 +0000 (22:07 -0700)
Rename GtkScrollingWindow to GtkScrolledView and fix it to work with
Gtk+3.6.0 (in Ubuntu 12.10).  Create distinct classes for
GtkScrolledWindow and GtkScrolledView.  The former might be useful to
someone else, and substituting the latter for the former just invites
confusion.

doc/gtk/gtk.texinfo
src/gtk/Makefile-fragment
src/gtk/fix-demo.scm
src/gtk/gtk-shim.h
src/gtk/gtk-widget.scm
src/gtk/gtk.cdecl
src/gtk/gtk.pkg
src/gtk/gtkscrolledview.c.stay [moved from src/gtk/gtkscrollingwindow.c.stay with 56% similarity]
src/gtk/gtkscrolledview.h [new file with mode: 0644]
src/gtk/gtkscrollingwindow.h [deleted file]

index ce619c08865c50cf78c66c4d3e5855813bbc863f..7bde112e5b77de21e97f972c18c4abbbf59918fb 100644 (file)
@@ -120,6 +120,7 @@ directory of your build tree.
 
 The code can be found in @file{gtk-ev.scm}.
 
+@anchor{Fix Demo}
 @unnumberedsec Fix Demo
 
 The Gtk system provides a fixnum-centric canvas abstraction based on
@@ -1607,6 +1608,28 @@ scrolled window is placed ``bottom left'', the scrollbars will appear
 above and to the right.
 @end deffn
 
+@deffn Class <gtk-scrolled-view>
+A direct subclass of gtk-scrolled-window representing a reference to a
+GtkScrolledView.
+
+This specialization of GtkScrolledWindow overrides the widget geometry
+protocol to work somewhat differently.
+
+A GtkScrolledWindow is used to squeeze an overly large widget into a
+smaller space and allow the user to scroll it.  The geometry
+implementation ignores the natural size of the problem widget,
+expecting @code{gtk_widget_set_size_request} to override its minimum
+size.
+
+A GtkScrolledView is used to stick scrollbars on a viewport.  Its
+natural size is the natural size of the viewport, plus scrollbars,
+frame, etc.  Using @code{gtk_widget_set_size_request} is unnecessary
+and interferes with resizing.  The difference can be observed by
+replacing @code{gtk-scrolled-view-new} with
+@code{gtk-scrolled-window-new} in the fix layout demo.
+See @bref{Fix Demo}.
+@end deffn
+
 @node Scheme Widget, Fix Layout, Gtk Scrolled Window, API Reference
 @section Scheme Widget
 
index f0a80d50df7bf6d68445c81c23a763478152e7b5..1bab067ee351bad940343c7bbf17af64f101e2ea 100644 (file)
@@ -59,15 +59,15 @@ install:
                 | ../microcode/scheme --library ../lib --batch-mode` = "c"; \
        then $(MAKE) install-liarc-bundle; fi
 
-gtk-shim.so: gtk-shim.o gtkscrollingwindow.o scmwidget.o gtkio.o $(SHIM_LOADER)
-       $(LINK_SHIM) gtk-shim.o gtkscrollingwindow.o scmwidget.o gtkio.o       \
+gtk-shim.so: gtk-shim.o gtkscrolledview.o scmwidget.o gtkio.o $(SHIM_LOADER)
+       $(LINK_SHIM) gtk-shim.o gtkscrolledview.o scmwidget.o gtkio.o       \
                `pkg-config --libs gtk+-3.0 gthread-2.0` $(SHIM_LIBS)
 
-gtkscrollingwindow.o: gtkscrollingwindow.c gtkscrollingwindow.h
-       $(COMPILE_SHIM) `pkg-config --cflags gtk+-3.0` -c gtkscrollingwindow.c
+gtkscrolledview.o: gtkscrolledview.c gtkscrolledview.h
+       $(COMPILE_SHIM) `pkg-config --cflags gtk+-3.0` -c gtkscrolledview.c
 
-gtkscrollingwindow.c: gtkscrollingwindow.c.stay
-       cp -p gtkscrollingwindow.c.stay gtkscrollingwindow.c
+gtkscrolledview.c: gtkscrolledview.c.stay
+       cp -p gtkscrolledview.c.stay gtkscrolledview.c
 
 scmwidget.o: scmwidget.c scmwidget.h
        $(COMPILE_SHIM) `pkg-config --cflags gtk+-3.0` -c scmwidget.c
index ecfa7bcdb68dd0e0c882555dd303c91848a6b0e8..22b7782cc852cc1bc08448ca157884b8c0f878cb 100644 (file)
@@ -35,13 +35,13 @@ USA.
                    w (lambda (w) (%trace ";closed "w"\n") 0))
                   (gtk-container-set-border-width w 5)
                   w))
-        (scroller1 (gtk-scrolled-window-new))
-        (scroller2 (gtk-scrolled-window-new))
+        (scroller1 (gtk-scrolled-view-new))
+        (scroller2 (gtk-scrolled-view-new))
         (layout1 (let ((l (make-demo-layout 200 200)))
                    (gtk-widget-set-hexpand l #t)
                    (gtk-widget-set-vexpand l #t)
                    l))
-        (layout2 (let ((l (make-demo-layout 200 200)))
+        (layout2 (let ((l (make-demo-layout 200 300)))
                    (gtk-widget-set-hexpand l #t)
                    (gtk-widget-set-vexpand l #t)
                    l))
index 0fcb622766f8407552e9d83fca9458e69a071a74..3c337542f0c1df6a1cb99351a73eb2f1c30ed73b 100644 (file)
@@ -30,7 +30,7 @@ USA.
 
 #include <gtk/gtk.h>
 #include "scmwidget.h"
-#include "gtkscrollingwindow.h"
+#include "gtkscrolledview.h"
 
 typedef unsigned int uint;
 extern gboolean start_gtk (int *argc, char ***argv);
index fbb4139a92c4bf2a3277cbab21269905311af1bc..c6bd4f5b791aa86e9fe959759e7e31805e096e35 100644 (file)
@@ -681,7 +681,7 @@ USA.
 (define (gtk-scrolled-window-new)
   (let* ((window (make-gtk-scrolled-window))
         (alien (gobject-alien window)))
-    (C-call "gtk_scrolling_window_new" alien 0 0)
+    (C-call "gtk_scrolled_window_new" alien 0 0)
     (error-if-null alien "Could not create:" window)
     (C-call "g_object_ref_sink" alien alien)
     (set-gtk-widget-destroy-callback! window)
@@ -716,6 +716,20 @@ USA.
           object
           "a symbol -- one of TOP-LEFT, BOTTOM-LEFT, TOP-RIGHT or BOTTOM-RIGHT"
           operator))))
+
+(define-class (<gtk-scrolled-view> (constructor ()))
+  (<gtk-container>))
+
+(define-guarantee gtk-scrolled-view "a <gtk-scrolled-view>")
+
+(define (gtk-scrolled-view-new)
+  (let* ((window (make-gtk-scrolled-view))
+        (alien (gobject-alien window)))
+    (C-call "gtk_scrolled_view_new" alien 0 0)
+    (error-if-null alien "Could not create:" window)
+    (C-call "g_object_ref_sink" alien alien)
+    (set-gtk-widget-destroy-callback! window)
+    window))
 \f
 ;;; GtkPaneds
 
index 1f56dfc83320bbf082debff155861cba260f5d53..1d2ab6c6d42d2c4ff3e5f9ba5b25545628a21be9 100644 (file)
@@ -99,8 +99,8 @@ USA.
 
 ;;; miscellaneous
 
-(extern (* GtkWidget)                  ;gtkscrollingwindow.h
-       gtk_scrolling_window_new
+(extern (* GtkWidget)                  ;gtkscrolledview.h
+       gtk_scrolled_view_new
        (hadjustment (* GtkAdjustment))
        (vadjustment (* GtkAdjustment)))
 
index 16dace01ae62b0704799a1ee3494e57035e64862..609815cd388567f39f7b36c8cb471ba49846e29d 100644 (file)
@@ -209,6 +209,8 @@ USA.
          <gtk-scrolled-window> gtk-scrolled-window?
          guarantee-gtk-scrolled-window gtk-scrolled-window-new
          gtk-scrolled-window-set-policy gtk-scrolled-window-set-placement
+         <gtk-scrolled-view> gtk-scrolled-view?
+         guarantee-gtk-scrolled-view gtk-scrolled-view-new
          <gtk-paned> gtk-paned? gtk-paned-new
          gtk-paned-pack1 gtk-paned-pack2
          gtk-paned-get-child1 gtk-paned-get-child2)
similarity index 56%
rename from src/gtk/gtkscrollingwindow.c.stay
rename to src/gtk/gtkscrolledview.c.stay
index 38efa8ba01b497c3130ecfab12b32ba704c57ac1..0967c1f363540bab99aab7c3c0312780fc0e42cd 100644 (file)
@@ -1,19 +1,19 @@
-#include "gtkscrollingwindow.h"
+#include "gtkscrolledview.h"
 
 /**
- * SECTION:gtkscrollingwindow
+ * SECTION:gtkscrolledview
  * @Short_description: Adds scrollbars to its child widget
- * @Title: GtkScrollingWindow
+ * @Title: GtkScrolledView
  * @See_also: #GtkScrollable, #GtkViewport, #GtkAdjustment
  *
- * #GtkScrollingWindow is a #GtkBin subclass: it's a container that
+ * #GtkScrolledView is a #GtkBin subclass: it's a container that
  * accepts a single child widget (a GtkScrollable) and adds an
  * optional beveled frame and scrollbars.
  *
  * The position of the scrollbars is controlled by the scroll
  * adjustments. See #GtkAdjustment for the fields in an adjustment.
  *
- * #GtkScrollingWindow is a #GtkScrolledWindow subclass that overrides
+ * #GtkScrolledView is a #GtkScrolledWindow subclass that overrides
  * the geometry protocol to work as follows:
  *
  * A scrolled window (GtkScrolledWindow) is about squeezing an overly
  * It ignores the natural size of the problem widget, expecting a
  * gtk_widget_set_size_request to override (squeeze) it.
  *
- * A scrolling window (GtkScrollingWindow) is about sticking
- * scrollbars on a viewport -- a GtkScrollable.  Its natural size is
- * the natural size of the viewport, scrollbars and frame (with
- * spacing).  Using gtk_widget_set_size_request interferes with the
- * natural sizing (esp. shrinking of expandable viewports).
+ * A scrolled view (GtkScrolledView) is about sticking scrollbars on a
+ * viewport -- a GtkScrollable.  Its natural size is the natural size
+ * of the viewport, scrollbars and frame (with spacing).  Using
+ * gtk_widget_set_size_request interferes with the natural sizing
+ * (esp. shrinking of expandable viewports).
  */
 
 struct _GtkScrolledWindowPrivate
@@ -46,115 +46,45 @@ struct _GtkScrolledWindowPrivate
 
   gint     min_content_width;
   gint     min_content_height;
-
-  /* Kinetic scrolling */
-  GdkEvent              *button_press_event;
-  GdkWindow             *overshoot_window;
-  GdkDevice             *drag_device;
-  guint                  kinetic_scrolling         : 1;
-  guint                  capture_button_press      : 1;
-  guint                  in_drag                   : 1;
-  guint                  last_button_event_valid   : 1;
-
-  guint                  release_timeout_id;
-  guint                  deceleration_id;
-
-  gdouble                last_button_event_x_root;
-  gdouble                last_button_event_y_root;
-
-  gdouble                last_motion_event_x_root;
-  gdouble                last_motion_event_y_root;
-  guint32                last_motion_event_time;
-
-  gdouble                x_velocity;
-  gdouble                y_velocity;
-
-  gdouble                unclamped_hadj_value;
-  gdouble                unclamped_vadj_value;
 };
 
-static void
-gtk_scrolled_window_update_real_placement (GtkScrolledWindow *scrolled_window)
-{
-  GtkScrolledWindowPrivate *priv = scrolled_window->priv;
-  GtkSettings *settings;
-
-  settings = gtk_widget_get_settings (GTK_WIDGET (scrolled_window));
-
-  if (priv->window_placement_set || settings == NULL)
-    priv->real_window_placement = priv->window_placement;
-  else
-    g_object_get (settings,
-                 "gtk-scrolled-window-placement",
-                 &priv->real_window_placement,
-                 NULL);
-}
-
-static void
-gtk_scrolled_window_init (GtkScrolledWindow *scrolled_window)
-{
-  GtkScrolledWindowPrivate *priv;
-
-  scrolled_window->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (scrolled_window,
-                                                              GTK_TYPE_SCROLLED_WINDOW,
-                                                              GtkScrolledWindowPrivate);
-
-  gtk_widget_set_has_window (GTK_WIDGET (scrolled_window), FALSE);
-  gtk_widget_set_can_focus (GTK_WIDGET (scrolled_window), TRUE);
-
-  priv->hscrollbar = NULL;
-  priv->vscrollbar = NULL;
-  priv->hscrollbar_policy = GTK_POLICY_AUTOMATIC;
-  priv->vscrollbar_policy = GTK_POLICY_AUTOMATIC;
-  priv->hscrollbar_visible = FALSE;
-  priv->vscrollbar_visible = FALSE;
-  priv->focus_out = FALSE;
-  priv->window_placement = GTK_CORNER_TOP_LEFT;
-  gtk_scrolled_window_update_real_placement (scrolled_window);
-  priv->min_content_width = -1;
-  priv->min_content_height = -1;
-
-  gtk_scrolled_window_set_kinetic_scrolling (scrolled_window, TRUE);
-  gtk_scrolled_window_set_capture_button_press (scrolled_window, TRUE);
-}
-
-static void  gtk_scrolling_window_get_preferred_width   (GtkWidget           *widget,
+static void  gtk_scrolled_view_get_preferred_width   (GtkWidget           *widget,
                                                        gint                *minimum_size,
                                                        gint                *natural_size);
-static void  gtk_scrolling_window_get_preferred_height  (GtkWidget           *widget,
+static void  gtk_scrolled_view_get_preferred_height  (GtkWidget           *widget,
                                                        gint                *minimum_size,
                                                        gint                *natural_size);
-static void  gtk_scrolling_window_get_preferred_height_for_width  (GtkWidget           *layout,
+static void  gtk_scrolled_view_get_preferred_height_for_width  (GtkWidget           *layout,
                                                        gint                 width,
                                                        gint                *minimum_height,
                                                        gint                *natural_height);
-static void  gtk_scrolling_window_get_preferred_width_for_height  (GtkWidget           *layout,
+static void  gtk_scrolled_view_get_preferred_width_for_height  (GtkWidget           *layout,
                                                        gint                 width,
                                                        gint                *minimum_height,
                                                        gint                *natural_height);
 
-G_DEFINE_TYPE (GtkScrollingWindow, gtk_scrolling_window,
+G_DEFINE_TYPE (GtkScrolledView, gtk_scrolled_view,
               GTK_TYPE_SCROLLED_WINDOW)
 
 static void
-gtk_scrolling_window_class_init (GtkScrollingWindowClass *class)
+gtk_scrolled_view_class_init (GtkScrolledViewClass *class)
 {
   GtkWidgetClass *widget_class = (GtkWidgetClass*) class;
 
-  widget_class->get_preferred_width = gtk_scrolling_window_get_preferred_width;
-  widget_class->get_preferred_height = gtk_scrolling_window_get_preferred_height;
-  widget_class->get_preferred_height_for_width = gtk_scrolling_window_get_preferred_height_for_width;
-  widget_class->get_preferred_width_for_height = gtk_scrolling_window_get_preferred_width_for_height;
+  widget_class->get_preferred_width = gtk_scrolled_view_get_preferred_width;
+  widget_class->get_preferred_height = gtk_scrolled_view_get_preferred_height;
+  widget_class->get_preferred_height_for_width = gtk_scrolled_view_get_preferred_height_for_width;
+  widget_class->get_preferred_width_for_height = gtk_scrolled_view_get_preferred_width_for_height;
 }
 
 static void
-gtk_scrolling_window_init (GtkScrollingWindow *scrolling_window)
+gtk_scrolled_view_init (GtkScrolledView *scrolled_view)
 {
-  gtk_scrolled_window_init (GTK_SCROLLED_WINDOW (scrolling_window));
+  g_assert (GTK_SCROLLED_WINDOW (scrolled_view) ->priv != NULL);
 }
 
 /**
- * gtk_scrolling_window_new:
+ * gtk_scrolled_view_new:
  * @hadjustment: (allow-none): horizontal adjustment
  * @vadjustment: (allow-none): vertical adjustment
  *
@@ -168,10 +98,10 @@ gtk_scrolling_window_init (GtkScrollingWindow *scrolling_window)
  * Returns: a new scrolling window
  */
 GtkWidget*
-gtk_scrolling_window_new (GtkAdjustment *hadjustment,
-                         GtkAdjustment *vadjustment)
+gtk_scrolled_view_new (GtkAdjustment *hadjustment,
+                      GtkAdjustment *vadjustment)
 {
-  GtkWidget *scrolling_window;
+  GtkWidget *scrolled_view;
 
   if (hadjustment)
     g_return_val_if_fail (GTK_IS_ADJUSTMENT (hadjustment), NULL);
@@ -179,16 +109,14 @@ gtk_scrolling_window_new (GtkAdjustment *hadjustment,
   if (vadjustment)
     g_return_val_if_fail (GTK_IS_ADJUSTMENT (vadjustment), NULL);
 
-  scrolling_window = g_object_new (GTK_TYPE_SCROLLING_WINDOW,
-                                  "hadjustment", hadjustment,
-                                  "vadjustment", vadjustment,
-                                  NULL);
+  scrolled_view = g_object_new (GTK_TYPE_SCROLLED_VIEW,
+                               "hadjustment", hadjustment,
+                               "vadjustment", vadjustment,
+                               NULL);
 
-  return scrolling_window;
+  return scrolled_view;
 }
 
-extern gboolean ubuntu_overlay_scrollbar_get_enabled (void);
-
 static gint
 gtk_scrolled_window_get_scrollbar_spacing (GtkScrolledWindow *scrolled_window)
 {
@@ -196,9 +124,6 @@ gtk_scrolled_window_get_scrollbar_spacing (GtkScrolledWindow *scrolled_window)
     
   g_return_val_if_fail (GTK_IS_SCROLLED_WINDOW (scrolled_window), 0);
 
-  if (ubuntu_overlay_scrollbar_get_enabled ())
-    return 0;
-
   class = GTK_SCROLLED_WINDOW_GET_CLASS (scrolled_window);
 
   if (class->scrollbar_spacing >= 0)
@@ -216,7 +141,7 @@ gtk_scrolled_window_get_scrollbar_spacing (GtkScrolledWindow *scrolled_window)
 }
 
 static void
-gtk_scrolling_window_get_preferred_size (GtkWidget      *widget,
+gtk_scrolled_view_get_preferred_size (GtkWidget      *widget,
                                         GtkOrientation  orientation,
                                         gint           *minimum_size,
                                         gint           *natural_size)
@@ -251,7 +176,10 @@ gtk_scrolling_window_get_preferred_size (GtkWidget      *widget,
   }
 
   /* Add scrollbar size. */
-  if (priv->vscrollbar_policy != GTK_POLICY_NEVER)
+  if ((orientation == GTK_ORIENTATION_VERTICAL
+       && priv->hscrollbar_policy != GTK_POLICY_NEVER) ||
+      (orientation == GTK_ORIENTATION_HORIZONTAL
+       && priv->vscrollbar_policy != GTK_POLICY_NEVER))
     {
       gint min, nat;
       gint space = gtk_scrolled_window_get_scrollbar_spacing (scrolled_window);
@@ -298,23 +226,23 @@ gtk_scrolling_window_get_preferred_size (GtkWidget      *widget,
 }
 
 static void     
-gtk_scrolling_window_get_preferred_width (GtkWidget *widget,
+gtk_scrolled_view_get_preferred_width (GtkWidget *widget,
                                          gint      *minimum_size,
                                          gint      *natural_size)
 {
-  gtk_scrolling_window_get_preferred_size (widget, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size);
+  gtk_scrolled_view_get_preferred_size (widget, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size);
 }
 
 static void
-gtk_scrolling_window_get_preferred_height (GtkWidget *widget,
+gtk_scrolled_view_get_preferred_height (GtkWidget *widget,
                                           gint      *minimum_size,
                                           gint      *natural_size)
 {  
-  gtk_scrolling_window_get_preferred_size (widget, GTK_ORIENTATION_VERTICAL, minimum_size, natural_size);
+  gtk_scrolled_view_get_preferred_size (widget, GTK_ORIENTATION_VERTICAL, minimum_size, natural_size);
 }
 
 static void
-gtk_scrolling_window_get_preferred_height_for_width (GtkWidget *widget,
+gtk_scrolled_view_get_preferred_height_for_width (GtkWidget *widget,
                                                     gint       width,
                                                     gint      *minimum_height,
                                                     gint      *natural_height)
@@ -325,7 +253,7 @@ gtk_scrolling_window_get_preferred_height_for_width (GtkWidget *widget,
 }
 
 static void
-gtk_scrolling_window_get_preferred_width_for_height (GtkWidget *widget,
+gtk_scrolled_view_get_preferred_width_for_height (GtkWidget *widget,
                                                     gint       height,
                                                     gint      *minimum_width,
                                                     gint      *natural_width)
diff --git a/src/gtk/gtkscrolledview.h b/src/gtk/gtkscrolledview.h
new file mode 100644 (file)
index 0000000..5508728
--- /dev/null
@@ -0,0 +1,27 @@
+#include <gtk/gtk.h>
+
+#define GTK_TYPE_SCROLLED_VIEW            (gtk_scrolled_view_get_type ())
+#define GTK_SCROLLED_VIEW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SCROLLED_VIEW, GtkScrolledView))
+#define GTK_SCROLLED_VIEW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLED_VIEW, GtkScrolledViewClass))
+#define GTK_IS_SCROLLED_VIEW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SCROLLED_VIEW))
+#define GTK_IS_SCROLLED_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLED_VIEW))
+#define GTK_SCROLLED_VIEW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SCROLLED_VIEW, GtkScrolledViewClass))
+
+
+typedef struct _GtkScrolledView                GtkScrolledView;
+typedef struct _GtkScrolledViewClass   GtkScrolledViewClass;
+
+struct _GtkScrolledView
+{
+  GtkScrolledWindow scrolled;
+};
+
+struct _GtkScrolledViewClass
+{
+  GtkScrolledWindowClass parent_class;
+};
+
+
+GType          gtk_scrolled_view_get_type (void) G_GNUC_CONST;
+GtkWidget*     gtk_scrolled_view_new      (GtkAdjustment     *hadjustment,
+                                          GtkAdjustment     *vadjustment);
diff --git a/src/gtk/gtkscrollingwindow.h b/src/gtk/gtkscrollingwindow.h
deleted file mode 100644 (file)
index 72fce3e..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <gtk/gtk.h>
-
-#define GTK_TYPE_SCROLLING_WINDOW            (gtk_scrolling_window_get_type ())
-#define GTK_SCROLLING_WINDOW(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SCROLLING_WINDOW, GtkScrollingWindow))
-#define GTK_SCROLLING_WINDOW_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLING_WINDOW, GtkScrollingWindowClass))
-#define GTK_IS_SCROLLING_WINDOW(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SCROLLING_WINDOW))
-#define GTK_IS_SCROLLING_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLING_WINDOW))
-#define GTK_SCROLLING_WINDOW_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SCROLLING_WINDOW, GtkScrollingWindowClass))
-
-
-typedef struct _GtkScrollingWindow     GtkScrollingWindow;
-typedef struct _GtkScrollingWindowClass        GtkScrollingWindowClass;
-
-struct _GtkScrollingWindow
-{
-  GtkScrolledWindow scrolled;
-};
-
-struct _GtkScrollingWindowClass
-{
-  GtkScrolledWindowClass parent_class;
-};
-
-
-GType          gtk_scrolling_window_get_type (void) G_GNUC_CONST;
-GtkWidget*     gtk_scrolling_window_new      (GtkAdjustment     *hadjustment,
-                                             GtkAdjustment     *vadjustment);