[gtk/surface-cleanup: 2/2] Rename gdk_surface_queue_expose
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/surface-cleanup: 2/2] Rename gdk_surface_queue_expose
- Date: Thu, 30 Jul 2020 02:43:25 +0000 (UTC)
commit 4d012a6d95f68aac4be821e2e6d96c8ac48f742f
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jul 29 22:40:01 2020 -0400
Rename gdk_surface_queue_expose
We don't have expose events anymore; instead, there
is a ::render signal. So rename queue_expose to
queue_render to match.
Update all callers.
docs/reference/gdk/gdk4-sections.txt | 2 +-
gdk/gdksurface.c | 36 +++++++++++++++++-------------------
gdk/gdksurface.h | 2 +-
gtk/gtkwidget.c | 2 +-
gtk/inspector/fpsoverlay.c | 4 ++--
gtk/inspector/updatesoverlay.c | 4 ++--
6 files changed, 24 insertions(+), 26 deletions(-)
---
diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt
index d8245a6d26..7e814ee81f 100644
--- a/docs/reference/gdk/gdk4-sections.txt
+++ b/docs/reference/gdk/gdk4-sections.txt
@@ -190,7 +190,7 @@ gdk_surface_create_vulkan_context
gdk_surface_create_cairo_context
<SUBSECTION>
-gdk_surface_queue_expose
+gdk_surface_queue_render
gdk_surface_get_frame_clock
<SUBSECTION>
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index 57febdc98f..a26754b694 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -1355,15 +1355,15 @@ gdk_surface_paint_on_clock (GdkFrameClock *clock,
g_object_unref (surface);
}
-/**
+/*
* gdk_surface_invalidate_rect:
* @surface: a #GdkSurface
* @rect: (allow-none): rectangle to invalidate or %NULL to invalidate the whole
* surface
*
- * A convenience wrapper around gdk_surface_invalidate_region() which
- * invalidates a rectangular region. See
- * gdk_surface_invalidate_region() for details.
+ * A convenience wrapper around gdk_surface_invalidate_region()
+ * which invalidates a rectangular region.
+ * See gdk_surface_invalidate_region() for details.
**/
void
gdk_surface_invalidate_rect (GdkSurface *surface,
@@ -1406,19 +1406,17 @@ impl_surface_add_update_area (GdkSurface *impl_surface,
}
/**
- * gdk_surface_queue_expose:
+ * gdk_surface_queue_render:
* @surface: a #GdkSurface
*
- * Forces an expose event for @surface to be scheduled.
- *
- * If the invalid area of @surface is empty, an expose event will
- * still be emitted. Its invalid region will be empty.
+ * Forces a #GdkSurface::render signal emission for @surface
+ * to be scheduled.
*
* This function is useful for implementations that track invalid
* regions on their own.
**/
void
-gdk_surface_queue_expose (GdkSurface *surface)
+gdk_surface_queue_render (GdkSurface *surface)
{
cairo_region_t *region;
@@ -1434,12 +1432,12 @@ gdk_surface_queue_expose (GdkSurface *surface)
* @surface: a #GdkSurface
* @region: a #cairo_region_t
*
- * Adds @region to the update area for @surface. The update area is the
- * region that needs to be redrawn, or “dirty region.”
+ * Adds @region to the update area for @surface. The update area is
+ * the region that needs to be redrawn, or “dirty region.”
*
- * GDK will process all updates whenever the frame clock schedules a redraw,
- * so there’s no need to do forces redraws manually, you just need to
- * invalidate regions that you know should be redrawn.
+ * GDK will process all updates whenever the frame clock schedules a
+ * redraw, so there’s no need to do forces redraws manually, you just
+ * need to invalidate regions that you know should be redrawn.
**/
void
gdk_surface_invalidate_region (GdkSurface *surface,
@@ -1473,8 +1471,8 @@ gdk_surface_invalidate_region (GdkSurface *surface,
* _gdk_surface_clear_update_area:
* @surface: a #GdkSurface.
*
- * Internal function to clear the update area for a surface. This
- * is called when the surface is hidden or destroyed.
+ * Internal function to clear the update area for a surface.
+ * This is called when the surface is hidden or destroyed.
**/
void
_gdk_surface_clear_update_area (GdkSurface *surface)
@@ -1497,8 +1495,8 @@ _gdk_surface_clear_update_area (GdkSurface *surface)
* Temporarily freezes a surface such that it won’t receive expose
* events. The surface will begin receiving expose events again when
* gdk_surface_thaw_updates() is called. If gdk_surface_freeze_updates()
- * has been called more than once, gdk_surface_thaw_updates() must be called
- * an equal number of times to begin processing exposes.
+ * has been called more than once, gdk_surface_thaw_updates() must be
+ * called an equal number of times to begin processing exposes.
**/
void
gdk_surface_freeze_updates (GdkSurface *surface)
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index 60d80558bf..077c012a3f 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -206,7 +206,7 @@ GDK_AVAILABLE_IN_ALL
void gdk_surface_beep (GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
-void gdk_surface_queue_expose (GdkSurface *surface);
+void gdk_surface_queue_render (GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
GdkFrameClock* gdk_surface_get_frame_clock (GdkSurface *surface);
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 249e5b630d..81b05591de 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -3418,7 +3418,7 @@ gtk_widget_queue_draw (GtkWidget *widget)
priv->draw_needed = TRUE;
g_clear_pointer (&priv->render_node, gsk_render_node_unref);
if (GTK_IS_NATIVE (widget) && _gtk_widget_get_realized (widget))
- gdk_surface_queue_expose (gtk_native_get_surface (GTK_NATIVE (widget)));
+ gdk_surface_queue_render (gtk_native_get_surface (GTK_NATIVE (widget)));
}
}
diff --git a/gtk/inspector/fpsoverlay.c b/gtk/inspector/fpsoverlay.c
index 9c1e8e58a1..fcc8da691c 100644
--- a/gtk/inspector/fpsoverlay.c
+++ b/gtk/inspector/fpsoverlay.c
@@ -141,7 +141,7 @@ gtk_fps_overlay_force_redraw (GtkWidget *widget,
GdkFrameClock *clock,
gpointer unused)
{
- gdk_surface_queue_expose (gtk_native_get_surface (gtk_widget_get_native (widget)));
+ gdk_surface_queue_render (gtk_native_get_surface (gtk_widget_get_native (widget)));
return G_SOURCE_REMOVE;
}
@@ -251,7 +251,7 @@ gtk_fps_overlay_queue_draw (GtkInspectorOverlay *overlay)
g_hash_table_iter_init (&iter, self->infos);
while (g_hash_table_iter_next (&iter, &widget, NULL))
- gdk_surface_queue_expose (gtk_native_get_surface (gtk_widget_get_native (widget)));
+ gdk_surface_queue_render (gtk_native_get_surface (gtk_widget_get_native (widget)));
}
static void
diff --git a/gtk/inspector/updatesoverlay.c b/gtk/inspector/updatesoverlay.c
index 18f1087c16..cac2a1c4f3 100644
--- a/gtk/inspector/updatesoverlay.c
+++ b/gtk/inspector/updatesoverlay.c
@@ -108,7 +108,7 @@ gtk_widget_updates_tick (GtkWidget *widget,
gtk_update_free (draw);
}
- gdk_surface_queue_expose (gtk_native_get_surface (gtk_widget_get_native (widget)));
+ gdk_surface_queue_render (gtk_native_get_surface (gtk_widget_get_native (widget)));
if (draw)
{
g_queue_push_tail (updates->updates, draw);
@@ -249,7 +249,7 @@ gtk_updates_overlay_queue_draw (GtkInspectorOverlay *overlay)
g_hash_table_iter_init (&iter, self->toplevels);
while (g_hash_table_iter_next (&iter, &widget, NULL))
- gdk_surface_queue_expose (gtk_native_get_surface (gtk_widget_get_native (widget)));
+ gdk_surface_queue_render (gtk_native_get_surface (gtk_widget_get_native (widget)));
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]