Skip to content

Make PhocViewChild a GObject and derive PhocSubsurface and PhocXdgPopup from it

Guido Günther requested to merge guidog/phoc:view-child into main

Prompted by the blurry popup fixed in !546 (merged) I looked into unifying the PhocViewChild logic between PhocXdgPopup and PhocSubsurface. We basically replace the open coded inheritance by using GObject which allows us to drop the ViewChildImpl struct.

As result not only this but also the subsurface creation logic used by PhocViews and PhocViewChilds became simpler.

There's some more goodies in the MR like making the doc generation more strict. See commit messages for details.

This is the rough flow:

  • Make PhocViewChild a GObject in it's own compilation unit
  • Add properties so "derived" types can become GObjects too
  • Make PhocSubsurface and PhocXdgPopup GObjects too
  • Move PhocViewChilds public functions over
  • Use finalize and constructed instead of home grown implementations
  • Add virtual functions for to reduce duplication and so we can drop the custom "interface"
  • Move Popup into it's own compilation unit (now that things are sufficiently disentangled)
  • (take a short detour to get rid of non-prefixed public functions)
  • Disentangle/deduplicate subsurface creation so we can
  • Finally drop phoc_view_child_setup
  • Move PhocSubsurface into it's own compilation unit too
  • Cleanup some more things

This is currently on top of !546 (merged) .

Merge request reports

Loading