diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index 9b5973fb62..7e814ee81f 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -190,9 +190,7 @@ gdk_surface_create_vulkan_context gdk_surface_create_cairo_context -gdk_surface_queue_expose -gdk_surface_freeze_updates -gdk_surface_thaw_updates +gdk_surface_queue_render gdk_surface_get_frame_clock diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index b21c74a55d..6d7c7518b6 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -394,6 +394,10 @@ void gdk_surface_begin_move_drag (GdkSurface *surface, int y, guint32 timestamp); +void gdk_surface_freeze_updates (GdkSurface *surface); +void gdk_surface_thaw_updates (GdkSurface *surface); + + G_END_DECLS #endif /* __GDK_INTERNALS_H__ */ diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 62fc8196f6..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; @@ -1429,17 +1427,17 @@ gdk_surface_queue_expose (GdkSurface *surface) cairo_region_destroy (region); } -/** +/* * gdk_surface_invalidate_region: * @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, @@ -1469,12 +1467,12 @@ gdk_surface_invalidate_region (GdkSurface *surface, cairo_region_destroy (visible_region); } -/** +/* * _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) @@ -1490,15 +1488,15 @@ _gdk_surface_clear_update_area (GdkSurface *surface) } } -/** +/* * gdk_surface_freeze_updates: * @surface: a #GdkSurface * * 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) @@ -1510,7 +1508,7 @@ gdk_surface_freeze_updates (GdkSurface *surface) _gdk_frame_clock_uninhibit_freeze (surface->frame_clock); } -/** +/* * gdk_surface_thaw_updates: * @surface: a #GdkSurface * diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h index acd766b259..077c012a3f 100644 --- a/gdk/gdksurface.h +++ b/gdk/gdksurface.h @@ -206,12 +206,7 @@ GDK_AVAILABLE_IN_ALL void gdk_surface_beep (GdkSurface *surface); GDK_AVAILABLE_IN_ALL -void gdk_surface_queue_expose (GdkSurface *surface); - -GDK_AVAILABLE_IN_ALL -void gdk_surface_freeze_updates (GdkSurface *surface); -GDK_AVAILABLE_IN_ALL -void gdk_surface_thaw_updates (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