The notification portal v2 accepts a sealable `memfd`. We can load
`GBytesIcon` and `GLoadableIcon` into a `memfd` automatically. For version 1
of the portal we can load `GLoadableIcon` into a `GBytesIcon` to
increase support for more `GIcon` formats.
This doesn't include `GEmblemedIcon` it's likely that it will be
deprecated soon https://gitlab.gnome.org/GNOME/glib/-/issues/3544
Closes: https://gitlab.gnome.org/GNOME/glib/-/issues/3108
Version 2 of the portal has a lot of additional features but we need to
check the version before sending new properties because version 1 would
fail with the new properties. New properties are added in a future commit.
The portal and GTK notifications will diverge, since they follow
different specs. For now it wasn't a problem since the portal was
strongly limited and essentially the same as the org.gtk.Notifications
interface. The serialization code is mostly the same as the already existing
serialization code.
These have all been added manually, as I’ve finished all the files which
I can automatically detect.
All the license headers in this commit are for LGPL-2.1-or-later, and
all have been double-checked against the license paragraph in the file
header.
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
Helps: #1415