From: Matthias Clasen Date: Sat, 5 May 2018 01:09:57 +0000 (-0400) Subject: Add some more content to the migration guide X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~22^2~317 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=702deee7994ffca96fa918053df8a4cd501075cd;p=gtk4.git Add some more content to the migration guide --- diff --git a/docs/reference/gtk/migrating-3to4.xml b/docs/reference/gtk/migrating-3to4.xml index 8a0a4639e9..7ed61f9dfb 100644 --- a/docs/reference/gtk/migrating-3to4.xml +++ b/docs/reference/gtk/migrating-3to4.xml @@ -217,9 +217,12 @@
- Adapt to GdkSurface API changes + Adapt to GdkWindow API changes - The gdk_surface_new() function has been replaced by a number of more + GdkWindow has been renamed to GdkSurface. + + + The gdk_window_new() function has been replaced by a number of more specialized constructors: gdk_surface_new_toplevel(), gdk_surface_new_popup(), gdk_surface_new_temp(), gdk_surface_new_child(), gdk_surface_new_input(), gdk_wayland_surface_new_subsurface(). Use the appropriate ones to create @@ -230,7 +233,7 @@ complicating the code and could not be supported across backends. - gdk_surface_reparent() is no longer available. + gdk_window_reparent() is no longer available.
@@ -416,8 +419,8 @@ GdkPixbuf is deemphasized A number of #GdkPixbuf-based APIs have been removed. The available replacements - are either using #GIcon, cairo_surface_t or the newly introduced #GdkTexture class - instead. + are either using #GIcon, or the newly introduced #GdkTexture or #GdkPaintable + classes instead. If you are dealing with pixbufs, you can use gdk_texture_new_for_pixbuf() @@ -426,12 +429,37 @@
- GtkWidget event signals are deemphasized + GtkWidget event signals are removed Event controllers and #GtkGestures have already been introduced in GTK+ 3 to handle input for many cases. In GTK+ 4, even more are available, such as #GtkEventControllerScroll and GtkEventControllerMotion, and the traditional widget signals for handling input, - such as #GtkWidget::motion-event or #GtkWidget::event have been deprecated. + such as #GtkWidget::motion-event or #GtkWidget::event have been removed. + +
+ +
+ Invalidation handling has changed + + Only gtk_widget_queue_draw() is left to mark a widget as needing redraw. + Variations like gtk_widget_queue_draw_rectangle() or gtk_widget_queue_draw_region() + are no longer available. + +
+ +
+ Stop using GtkWidget::draw + + The #GtkWidget::draw signal has been removed. Widgets need to implement the + #GtkWidget::snapshot function now. Connecting draw signal handlers is no longer possible. + +
+ +
+ Window content observation has changed + + Observing widget contents and widget size is now done by using the + #GtkWidgetPaintable object instead of connecting to widget signals.
@@ -475,6 +503,7 @@ #GtkCellRendererPixbuf:icon-size.
+