GTK+ 4 Migration

From Inkscape Wiki
Jump to navigation Jump to search

A page to track the migration to Gtk4.

Preparation:

See: https://docs.gtk.org/gtk4/migrating-3to4.html

  • ☐ Do not use GTK-specific command line arguments
  • ☐ Do not use widget style properties
  • ☐ Review your window creation flags (3x src/ui/widget/color-slider.cpp)
  • ☐ Stop using direct access to GdkEvent structs
  • ☑ Stop using gdk_pointer_warp()
  • ☑ Stop using non-RGBA visuals
  • ☑ gtk_widget_set_app_paintable
  • ☐ Stop using GtkBox padding, fill and expand child properties
  • ☐ Stop using the state argument of GtkStyleContext getters
  • ☐ Stop using gdk_pixbuf_get_from_window() and gdk_cairo_set_source_window()
  • ☐ Stop using GtkButton's image-related API
  • ☐ Stop using GtkWidget event signals
  • ☐ Set a proper application ID
  • ☐ Stop using gtk_main() and related APIs (2geom tests, autotrace, script)
  • ☐ Reduce the use of gtk_widget_destroy()
  • ☐ Stop using the GtkWidget.destroy vfunc
  • ☐ Reduce the use of generic container APIs
  • ☐ Review your use of icon resources

At time of switch:

Some of these we maybe able to do earlier.

  • ☐ Subclassing widgets
  • ☐ Life-cycle handling
  • ☐ Stop using GdkScreen
  • ☐ Stop using the root window
  • ☐ Stop using GdkVisual
  • ☐ Stop using GdkDeviceManager
  • ☐ Adapt to GdkWindow API changes
  • ☐ The "iconified" window state has been renamed to "minimized"
  • ☐ Adapt to GdkEvent API changes
  • ☐ Stop using grabs
  • ☐ Adapt to coordinate API changes
  • ☐ Adapt to GdkKeymap API changes
  • ☐ Adapt to changes in keyboard modifier handling
  • ☐ Replace GtkClipboard with GdkClipboard
  • ☐ Stop using gtk_get_current_... APIs
  • ☐ Convert your UI files
  • ☐ Adapt to GtkBuilder API changes
  • ☐ Adapt to event controller API changes
  • ☐ Focus handling changes
  • ☐ Use the new apis for keyboard shortcuts
  • ☐ Stop using GtkEventBox
  • ☐ Stop using GtkButtonBox
  • ☐ Adapt to GtkBox API changes
  • ☐ Adapt to GtkWindow API changes
  • ☐ Adapt to GtkHeaderBar and GtkActionBar API changes
  • ☐ Adapt to GtkStack, GtkAssistant and GtkNotebook API changes
  • ☐ Adapt to button class hierarchy changes
  • ☐ Adapt to GtkScrolledWindow API changes
  • ☐ Adapt to GtkBin removal
  • ☐ Adapt to GtkContainer removal
  • ☐ Stop using GtkContainer::border-width
  • ☐ Adapt to coordinate API changes
  • ☐ Adapt to GtkStyleContext API changes
  • ☐ Adapt to GtkCssProvider API changes
  • ☐ Stop using GtkShadowType and GtkRelief properties
  • ☐ Adapt to GtkWidget's size request changes
  • ☐ Adapt to GtkWidget's size allocation changes
  • ☐ Switch to GtkWidget's children APIs
  • ☐ and about 50 more entries! ...