Don't install headers for code that we don't build.
And don't include those headers in gsk.h.
Just as we do in gdk, require applications to include
the backend-specific headers they need explicitly.
Update the one affected demo, gtk4-node-editor.
We use a compilation symbol in our build to allow the inclusion of
specific headers while building GTK, to avoid the need to include only
the global header.
Each namespace has its own compilation symbol because we used to have
different libraries, and strict symbol visibility between libraries;
now that we have a single library, and we can use private symbols across
namespaces while building GTK, we should have a single compilation
symbol, and simplify the build rules.
Use cairo-script-interpreter to parse the scripts that generate cairo
nodes.
This requires libcairoscriptinterpreter.so to work properly, but if
it isn't found we disable this (unimportant for normal functioning)
code and just emits a parser warning.
The testsuite requires it however or it will fail.
A new test is included that tests all of this.
Base the rewrite on testsuite/css/parser/test-css-parser - we now
require the node file to match a reference node and track the errors it
triggers.
We also no longer use gtester.
Instead of the previous approach using GVariant, this new approach uses
human-readable text files as the serialization format for render nodes.
The format is a custom one, but it is inspired by QML and conforms to
the CSS syntax. Because of that, we can use the CSS machinery from GTK
to parse it, and in particular share code to parse properties that GTK's
CSS machinery also supports, such as colors.
This commit breaks all existing usages of node files - such as the
testsuite and various test tools - they will be fixed in further
commits.
This reverts commit 8e74eb382f.
This code is not necessary. It worked around a bug in graphene where
graphene was requiring stricter alignment than glib allocators could
guarantee.
The code is mostly stolen from graphene.
Allocators support any alignment, but their implementation
only calls system aligned allocator functions if malloc()
is not aligned to 16-byte boundaries. If it is aligned,
the implementation just calls malloc() regardless of which
alignment is requested by the caller.
This can be fixed by saving the result of meson malloc()
alignment check and adding a few conditions to the implementation,
but right now GSK and GTK only need 16-byte alignment either way.
This includes a copy of the diff(1) algorithm used by git diff by Davide
Libenzi.
It's used for the common case ofcontainer nodes having only very few
changes for the few nodes of child widgets that changed (like a button
lighting up when hilighted or a spinning spinner).