Drop gtk_widget_set_surface

Not used anymore. Only GtkNative's have surfaces.
This commit is contained in:
Matthias Clasen 2019-05-17 21:34:20 +00:00
parent 43bed7986a
commit b99962e7a2
5 changed files with 0 additions and 40 deletions

View File

@ -4529,7 +4529,6 @@ gtk_widget_has_visible_focus
gtk_widget_has_grab
gtk_widget_is_drawable
gtk_widget_is_toplevel
gtk_widget_set_surface
gtk_widget_set_receives_default
gtk_widget_get_receives_default
gtk_widget_set_support_multidevice

View File

@ -555,7 +555,6 @@ gtk_popover_realize (GtkWidget *widget)
priv->surface = gdk_surface_new_popup (display, gtk_widget_get_surface (priv->relative_to), priv->modal);
gtk_widget_set_surface (widget, priv->surface);
gdk_surface_set_widget (priv->surface, widget);
g_signal_connect_swapped (priv->surface, "notify::state", G_CALLBACK (surface_state_changed), widget);

View File

@ -8196,7 +8196,6 @@ gtk_widget_real_realize (GtkWidget *widget)
if (GTK_IS_NATIVE (widget))
{
g_assert (priv->surface != NULL);
priv->surface = gtk_native_get_surface (GTK_NATIVE (widget));
g_object_ref (priv->surface);
}
@ -11199,38 +11198,6 @@ gtk_widget_get_allocated_baseline (GtkWidget *widget)
return priv->baseline - margin.top - border.top - padding.top;
}
/**
* gtk_widget_set_surface:
* @widget: a #GtkWidget
* @surface: (transfer full): a #GdkSurface
*
* Sets a widgets surface. This function should only be used in a
* widgets #GtkWidget::realize implementation. The %surface passed is
* usually either new surface created with gdk_surface_new(), or the
* surface of its parent widget as returned by
* gtk_widget_get_parent_surface().
*
* Widgets must indicate whether they will create their own #GdkSurface
* by calling gtk_widget_set_has_surface(). This is usually done in the
* widgets init() function.
*
* Note that this function does not add any reference to @surface.
*/
void
gtk_widget_set_surface (GtkWidget *widget,
GdkSurface *surface)
{
GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (surface == NULL || GDK_IS_SURFACE (surface));
if (priv->surface != surface)
{
priv->surface = surface;
}
}
/**
* gtk_widget_get_surface:
* @widget: a #GtkWidget

View File

@ -552,9 +552,6 @@ void gtk_widget_set_child_visible (GtkWidget *widget,
GDK_AVAILABLE_IN_ALL
gboolean gtk_widget_get_child_visible (GtkWidget *widget);
GDK_AVAILABLE_IN_ALL
void gtk_widget_set_surface (GtkWidget *widget,
GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
GdkSurface * gtk_widget_get_surface (GtkWidget *widget);

View File

@ -5698,8 +5698,6 @@ gtk_window_realize (GtkWidget *widget)
}
priv->surface = surface;
gtk_widget_set_surface (widget, surface);
gdk_surface_set_widget (surface, widget);
g_signal_connect_swapped (surface, "notify::state", G_CALLBACK (surface_state_changed), widget);