GtkRoot: Drop overlap with GtkNative

Drop the parts from the GtkRoot interface
that have been taken over by GtkNative.
This commit is contained in:
Matthias Clasen 2019-05-26 17:39:11 +00:00
parent 5de06f47cf
commit f2447e06af
3 changed files with 2 additions and 78 deletions

View File

@ -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

View File

@ -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);

View File

@ -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