diff --git a/docs/reference/gdk/gdk4-sections.txt b/docs/reference/gdk/gdk4-sections.txt index ef45df6a6c..ccf21accd7 100644 --- a/docs/reference/gdk/gdk4-sections.txt +++ b/docs/reference/gdk/gdk4-sections.txt @@ -216,7 +216,6 @@ gdk_surface_get_pass_through gdk_surface_move gdk_surface_resize gdk_surface_move_resize -gdk_surface_scroll gdk_surface_has_native gdk_surface_raise gdk_surface_lower diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c index 6e9239ffae..45ecc83dc3 100644 --- a/gdk/gdksurface.c +++ b/gdk/gdksurface.c @@ -3932,58 +3932,6 @@ gdk_surface_move_to_rect (GdkSurface *surface, rect_anchor_dy); } -/** - * gdk_surface_scroll: - * @surface: a #GdkSurface - * @dx: Amount to scroll in the X direction - * @dy: Amount to scroll in the Y direction - * - * Scroll the contents of @surface, both pixels and children, by the - * given amount. @surface itself does not move. Portions of the surface - * that the scroll operation brings in from offscreen areas are - * invalidated. The invalidated region may be bigger than what would - * strictly be necessary. - * - * For X11, a minimum area will be invalidated if the surface has no - * subsurfaces, or if the edges of the surface’s parent do not extend - * beyond the edges of the surface. In other cases, a multi-step process - * is used to scroll the surface which may produce temporary visual - * artifacts and unnecessary invalidations. - **/ -void -gdk_surface_scroll (GdkSurface *surface, - gint dx, - gint dy) -{ - GList *tmp_list; - - g_return_if_fail (GDK_IS_SURFACE (surface)); - - if (dx == 0 && dy == 0) - return; - - if (surface->destroyed) - return; - - /* First move all child surfaces, without causing invalidation */ - - tmp_list = surface->children; - while (tmp_list) - { - GdkSurface *child = GDK_SURFACE (tmp_list->data); - - /* Just update the positions, the bits will move with the copy */ - child->x += dx; - child->y += dy; - - tmp_list = tmp_list->next; - } - - recompute_visible_regions (surface, TRUE); - - gdk_surface_invalidate_rect_full (surface, NULL, TRUE); -} - static void gdk_surface_set_cursor_internal (GdkSurface *surface, GdkDevice *device, diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h index 88e5ea6bd7..2f6e7371f9 100644 --- a/gdk/gdksurface.h +++ b/gdk/gdksurface.h @@ -513,10 +513,6 @@ gboolean gdk_surface_get_focus_on_map (GdkSurface *surface); GDK_AVAILABLE_IN_ALL void gdk_surface_set_focus_on_map (GdkSurface *surface, gboolean focus_on_map); -GDK_AVAILABLE_IN_ALL -void gdk_surface_scroll (GdkSurface *surface, - gint dx, - gint dy); /* * This allows for making shaped (partially transparent) surfaces diff --git a/tests/testgtk.c b/tests/testgtk.c index 01f2f409f3..b4982e02b2 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -6909,160 +6909,6 @@ create_snapshot (GtkWidget *widget) } -/* - * Test scrolling - */ - -static int scroll_test_pos = 0.0; - -static void -scroll_test_draw (GtkDrawingArea *darea, - cairo_t *cr, - int width, - int height, - gpointer adjustment) -{ - gint i,j; - gint imin, imax, jmin, jmax; - GdkRectangle clip; - - gdk_cairo_get_clip_rectangle (cr, &clip); - - imin = (clip.x) / 10; - imax = (clip.x + clip.width + 9) / 10; - - jmin = ((int)gtk_adjustment_get_value (adjustment) + clip.y) / 10; - jmax = ((int)gtk_adjustment_get_value (adjustment) + clip.y + clip.height + 9) / 10; - - for (i=imin; i