From f2447e06af674d2f32688f11b3f65223ac290e91 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 26 May 2019 17:39:11 +0000 Subject: [PATCH] GtkRoot: Drop overlap with GtkNative Drop the parts from the GtkRoot interface that have been taken over by GtkNative. --- gtk/gtkroot.c | 64 -------------------------------------------- gtk/gtkroot.h | 10 +------ gtk/gtkrootprivate.h | 6 +---- 3 files changed, 2 insertions(+), 78 deletions(-) diff --git a/gtk/gtkroot.c b/gtk/gtkroot.c index 5f250509bb..95e8f69f26 100644 --- a/gtk/gtkroot.c +++ b/gtk/gtkroot.c @@ -50,27 +50,10 @@ gtk_root_default_get_display (GtkRoot *self) return gdk_display_get_default (); } -static GskRenderer * -gtk_root_default_get_renderer (GtkRoot *self) -{ - return NULL; -} - -static void -gtk_root_default_get_surface_transform (GtkRoot *self, - int *x, - int *y) -{ - *x = 0; - *y = 0; -} - static void gtk_root_default_init (GtkRootInterface *iface) { iface->get_display = gtk_root_default_get_display; - iface->get_renderer = gtk_root_default_get_renderer; - iface->get_surface_transform = gtk_root_default_get_surface_transform; g_object_interface_install_property (iface, g_param_spec_object ("focus-widget", @@ -91,53 +74,6 @@ gtk_root_get_display (GtkRoot *self) return iface->get_display (self); } -GskRenderer * -gtk_root_get_renderer (GtkRoot *self) -{ - GtkRootInterface *iface; - - g_return_val_if_fail (GTK_IS_ROOT (self), NULL); - - iface = GTK_ROOT_GET_IFACE (self); - return iface->get_renderer (self); -} - -void -gtk_root_get_surface_transform (GtkRoot *self, - int *x, - int *y) -{ - GtkRootInterface *iface; - - g_return_if_fail (GTK_IS_ROOT (self)); - g_return_if_fail (x != 0); - g_return_if_fail (y != 0); - - iface = GTK_ROOT_GET_IFACE (self); - return iface->get_surface_transform (self, x, y); -} - -/** - * gtk_root_get_for_surface: - * @surface: a #GdkSurface - * - * Finds the GtkRoot associated with the surface. - * - * Returns: (transfer none): the #GtkRoot that is associated with @surface - */ -GtkWidget * -gtk_root_get_for_surface (GdkSurface *surface) -{ - GtkWidget *widget; - - widget = (GtkWidget *)gdk_surface_get_widget (surface); - - if (widget && GTK_IS_ROOT (widget)) - return widget; - - return NULL; -} - /** * gtk_root_set_focus: * @self: a #GtkRoot diff --git a/gtk/gtkroot.h b/gtk/gtkroot.h index 4c7ae89e37..3136a00911 100644 --- a/gtk/gtkroot.h +++ b/gtk/gtkroot.h @@ -45,17 +45,9 @@ struct _GtkRootInterface GTypeInterface g_iface; /*< public >*/ - GdkDisplay * (* get_display) (GtkRoot *self); - GskRenderer * (* get_renderer) (GtkRoot *self); - - void (* get_surface_transform) (GtkRoot *root, - int *x, - int *y); + GdkDisplay * (* get_display) (GtkRoot *self); }; -GDK_AVAILABLE_IN_ALL -GtkWidget * gtk_root_get_for_surface (GdkSurface *surface); - GDK_AVAILABLE_IN_ALL void gtk_root_set_focus (GtkRoot *self, GtkWidget *focus); diff --git a/gtk/gtkrootprivate.h b/gtk/gtkrootprivate.h index 357bc6441f..ddf4fb01ef 100644 --- a/gtk/gtkrootprivate.h +++ b/gtk/gtkrootprivate.h @@ -5,12 +5,8 @@ G_BEGIN_DECLS -GdkDisplay * gtk_root_get_display (GtkRoot *root); -GskRenderer * gtk_root_get_renderer (GtkRoot *self); +GdkDisplay * gtk_root_get_display (GtkRoot *root); -void gtk_root_get_surface_transform (GtkRoot *self, - int *x, - int *y); enum { GTK_ROOT_PROP_FOCUS_WIDGET, GTK_ROOT_NUM_PROPERTIES