[gtk/wip/matthiasc/popup4: 67/105] Drop gtk_widget_register_surface
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup4: 67/105] Drop gtk_widget_register_surface
- Date: Wed, 24 Apr 2019 04:45:11 +0000 (UTC)
commit d046771f96c9bb5d9e1a2bc767196634f5a7c658
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 19 16:18:57 2019 -0400
Drop gtk_widget_register_surface
This is no longer used.
docs/reference/gtk/gtk4-sections.txt | 2 -
docs/reference/gtk/input-handling.xml | 3 +-
gtk/gtkwidget.c | 72 -----------------------------------
gtk/gtkwidget.h | 6 ---
4 files changed, 1 insertion(+), 82 deletions(-)
---
diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt
index 2331283531..be16a366e2 100644
--- a/docs/reference/gtk/gtk4-sections.txt
+++ b/docs/reference/gtk/gtk4-sections.txt
@@ -4492,8 +4492,6 @@ gtk_widget_get_has_tooltip
gtk_widget_set_has_tooltip
gtk_widget_trigger_tooltip_query
gtk_widget_get_surface
-gtk_widget_register_surface
-gtk_widget_unregister_surface
gtk_widget_get_allocated_width
gtk_widget_get_allocated_height
gtk_widget_get_allocation
diff --git a/docs/reference/gtk/input-handling.xml b/docs/reference/gtk/input-handling.xml
index d3d926e406..acebd0d47c 100644
--- a/docs/reference/gtk/input-handling.xml
+++ b/docs/reference/gtk/input-handling.xml
@@ -104,8 +104,7 @@
a #GdkSurface, which in turn represents a windowing system surface in the
backend. If a widget has grabbed the current input device, or all input
devices, the event is propagated to that #GtkWidget. Otherwise, it is
- propagated to the the #GtkWidget which called gtk_widget_register_surface()
- on the #GdkSurface receiving the event.
+ propagated to the the #GtkRoot which owns the #GdkSurface receiving the event.
</para>
<para>
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 97eb43e280..037146ee6b 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -8307,7 +8307,6 @@ gtk_widget_real_unrealize (GtkWidget *widget)
if (_gtk_widget_get_has_surface (widget))
{
- gtk_widget_unregister_surface (widget, priv->surface);
gdk_surface_destroy (priv->surface);
priv->surface = NULL;
}
@@ -11342,77 +11341,6 @@ gtk_widget_set_surface (GtkWidget *widget,
}
}
-static gboolean
-surface_expose (GdkSurface *surface,
- cairo_region_t *region,
- GtkWidget *widget)
-{
- gtk_widget_render (widget, surface, region);
-
- return TRUE;
-}
-
-static gboolean
-surface_event (GdkSurface *surface,
- GdkEvent *event,
- GtkWidget *widget)
-{
- gtk_main_do_event (event);
-
- return TRUE;
-}
-
-/**
- * gtk_widget_register_surface:
- * @widget: a #GtkWidget
- * @surface: a #GdkSurface
- *
- * Registers a #GdkSurface with the widget and sets it up so that
- * the widget receives events for it. Call gtk_widget_unregister_surface()
- * when destroying the surface.
- *
- * Before 3.8 you needed to call gdk_surface_set_user_data() directly to set
- * this up. This is now deprecated and you should use gtk_widget_register_surface()
- * instead. Old code will keep working as is, although some new features like
- * transparency might not work perfectly.
- */
-void
-gtk_widget_register_surface (GtkWidget *widget,
- GdkSurface *surface)
-{
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (GDK_IS_SURFACE (surface));
-
- g_assert (gdk_surface_get_widget (surface) == NULL);
- gdk_surface_set_widget (surface, widget);
-
- g_signal_connect (surface, "render", G_CALLBACK (surface_expose), widget);
- g_signal_connect (surface, "event", G_CALLBACK (surface_event), widget);
-}
-
-/**
- * gtk_widget_unregister_surface:
- * @widget: a #GtkWidget
- * @surface: a #GdkSurface
- *
- * Unregisters a #GdkSurface from the widget that was previously set up with
- * gtk_widget_register_surface(). You need to call this when the surface is
- * no longer used by the widget, such as when you destroy it.
- */
-void
-gtk_widget_unregister_surface (GtkWidget *widget,
- GdkSurface *surface)
-{
- g_return_if_fail (GTK_IS_WIDGET (widget));
- g_return_if_fail (GDK_IS_SURFACE (surface));
-
- g_assert (gdk_surface_get_widget (surface) == widget);
- gdk_surface_set_widget (surface, NULL);
-
- g_signal_handlers_disconnect_by_func (surface, surface_expose, widget);
- g_signal_handlers_disconnect_by_func (surface, surface_event, widget);
-}
-
/**
* gtk_widget_get_surface:
* @widget: a #GtkWidget
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 30741b9499..151dde2fd0 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -573,12 +573,6 @@ void gtk_widget_set_surface (GtkWidget *widget,
GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
GdkSurface * gtk_widget_get_surface (GtkWidget *widget);
-GDK_AVAILABLE_IN_ALL
-void gtk_widget_register_surface (GtkWidget *widget,
- GdkSurface *surface);
-GDK_AVAILABLE_IN_ALL
-void gtk_widget_unregister_surface (GtkWidget *widget,
- GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
int gtk_widget_get_allocated_width (GtkWidget *widget);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]