From bc739e607ba2c5394f4d3d9967886b5c3dab36ba Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 28 May 2019 17:04:32 -0400 Subject: [PATCH] scrolled window: Make final --- gtk/gtkscrolledwindow.c | 23 +++++++++++++++++++ gtk/gtkscrolledwindow.h | 49 +---------------------------------------- 2 files changed, 24 insertions(+), 48 deletions(-) diff --git a/gtk/gtkscrolledwindow.c b/gtk/gtkscrolledwindow.c index 44a65b01e4..bc656e1613 100644 --- a/gtk/gtkscrolledwindow.c +++ b/gtk/gtkscrolledwindow.c @@ -196,6 +196,29 @@ /* Scrolled off indication */ #define UNDERSHOOT_SIZE 40 +typedef struct _GtkScrolledWindowClass GtkScrolledWindowClass; + +struct _GtkScrolledWindow +{ + GtkBin parent_instance; +}; + +struct _GtkScrolledWindowClass +{ + GtkBinClass parent_class; + + /* Unfortunately, GtkScrollType is deficient in that there is + * no horizontal/vertical variants for GTK_SCROLL_START/END, + * so we have to add an additional boolean flag. + */ + gboolean (*scroll_child) (GtkScrolledWindow *scrolled_window, + GtkScrollType scroll, + gboolean horizontal); + + void (* move_focus_out) (GtkScrolledWindow *scrolled_window, + GtkDirectionType direction); +}; + typedef struct { GtkWidget *scrollbar; diff --git a/gtk/gtkscrolledwindow.h b/gtk/gtkscrolledwindow.h index 8701e66f20..fdbdb67631 100644 --- a/gtk/gtkscrolledwindow.h +++ b/gtk/gtkscrolledwindow.h @@ -36,57 +36,10 @@ G_BEGIN_DECLS #define GTK_TYPE_SCROLLED_WINDOW (gtk_scrolled_window_get_type ()) #define GTK_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_SCROLLED_WINDOW, GtkScrolledWindow)) -#define GTK_SCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GTK_TYPE_SCROLLED_WINDOW, GtkScrolledWindowClass)) #define GTK_IS_SCROLLED_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_SCROLLED_WINDOW)) -#define GTK_IS_SCROLLED_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GTK_TYPE_SCROLLED_WINDOW)) -#define GTK_SCROLLED_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GTK_TYPE_SCROLLED_WINDOW, GtkScrolledWindowClass)) -typedef struct _GtkScrolledWindow GtkScrolledWindow; -typedef struct _GtkScrolledWindowClass GtkScrolledWindowClass; - -struct _GtkScrolledWindow -{ - GtkBin parent_instance; -}; - -/** - * GtkScrolledWindowClass: - * @parent_class: The parent class. - * @scroll_child: Keybinding signal which gets emitted when a - * keybinding that scrolls is pressed. - * @move_focus_out: Keybinding signal which gets emitted when focus is - * moved away from the scrolled window by a keybinding. - */ -struct _GtkScrolledWindowClass -{ - GtkBinClass parent_class; - - /*< public >*/ - - /* Action signals for keybindings. Do not connect to these signals - */ - - /* Unfortunately, GtkScrollType is deficient in that there is - * no horizontal/vertical variants for GTK_SCROLL_START/END, - * so we have to add an additional boolean flag. - */ - gboolean (*scroll_child) (GtkScrolledWindow *scrolled_window, - GtkScrollType scroll, - gboolean horizontal); - - void (* move_focus_out) (GtkScrolledWindow *scrolled_window, - GtkDirectionType direction); - - /*< private >*/ - - /* Padding for future expansion */ - void (*_gtk_reserved1) (void); - void (*_gtk_reserved2) (void); - void (*_gtk_reserved3) (void); - void (*_gtk_reserved4) (void); -}; - +typedef struct _GtkScrolledWindow GtkScrolledWindow; /** * GtkCornerType: