scanner: add a new --include-core-only option

When using this new option the generated code will include the new
core headers instead of the old ones. The default needs to remain
unchanged for backward compatibility with old code.
With this change the generated headers will now forward declare all
types and interfaces it uses; that is needed when generating headers
for a my-extension.xml with --include-core-only, since it may use
types defined in wayland.xml.
The same is done also without --include-core-only, since it is an
harmless change.
getopt_long() is used for the option handling.

Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
1 file changed