Commit Graph

346 Commits

Author SHA1 Message Date
Maximiliano Sandoval R
94c2072be8
meson: Use a valid SPDX identifier
See https://mesonbuild.com/Reference-manual.html#license
2021-07-16 11:14:46 +02:00
Marco Trevisan (Treviño)
d5f2b69d0c build: Get typelib dir dynamically using gobject-introspection dependency
We hardcoded the typelib directory for only an arch (and a distro),
while we can just get it from gobject-introspection pkg config if tests
are enabled.
2021-07-08 04:59:10 +02:00
Xavier Claessens
0fd790eb8d Meson: Only g-ir-scanner warnings fatal when buit with -Dwerror=true
Also fix deprecation warning that requires using fatal_warnings kwarg
from Meson 0.55.0.

Fixes: #4072.
2021-06-25 11:38:11 -04:00
Matthias Clasen
143770f16d 4.3.1 2021-06-09 18:23:47 -04:00
Dan Cîrnaț
13b94dab10 Conditional check for gdesktopappinfo header
GDesktopAppInfo is not available on macOS and needs to be disabled
2021-05-06 10:38:41 +02:00
Matthias Clasen
6a24e0c7c3 Add an introspection api test
Every beginning is small... just check one constant for now.
2021-05-05 19:18:32 -04:00
Matthias Clasen
c8eeb46aa5 Merge branch 'update-ci-to-f34' into 'master'
WIP ci: Update the image to Fedora 34

See merge request GNOME/gtk!3516
2021-05-05 23:17:07 +00:00
Matthias Clasen
930ff499ee Confine -mf16c to a single source file
We can't use this flag for any code that may get run
outside the __builtin_cpu_supports() check, and meson
doesn't allow per-file cflags. So we have to split this
code off into its own static library.
2021-05-05 18:58:23 -04:00
Xavier Claessens
f4dc24c3da Meson: gdk-pixbuf jpeg/png options changed to feature 2021-05-05 16:40:57 -04:00
Carlos Garnacho
be4216e051 gdk/wayland: Support the xdg-activation wayland protocol
This protocol implements the IPC necessary to focus application
windows across launcher/launchee. Add support for it.
2021-05-03 17:20:50 +02:00
Matthias Clasen
ead06fdb35 Bump version to 4.3.0
We are going to add new API.

Fix up affected tests.
2021-05-02 21:01:56 -04:00
David Lechner
2a610267eb gdk/wayland/cursor/os-compatibility: fix build when memfd_create is not available
When building for homebrew/linuxbrew on Ubuntu 16.04, memfd_create() is
not available and causes the build to fail.

This adds a proper check for the function.
2021-04-27 11:46:39 -05:00
Emmanuele Bassi
dbe4543969 Merge branch 'gtksecurememory-updates' into 'master'
gtksecurememory: Request that secure memory not be dumped to disk

See merge request GNOME/gtk!3452
2021-04-17 23:46:38 +00:00
Jason Francis
b27ec5ebde
meson: check for madvise() 2021-04-17 19:30:20 -04:00
Matthias Clasen
4164abd9f7 build: Quiet the compiler
Don't use -Wnull-dereference when assertions are
disabled, since that causes the compiler to see
NULL everywhere.
2021-04-12 22:11:05 -04:00
Emmanuele Bassi
a871a1bdb5 build: Don't append multiple flags as a string
The gtk_debug_cflags variable is an array, with each argument stored in
a separate string; if we add multiple arguments inside the same string
we break the escaping rules.

Fixes: #3864
2021-04-12 21:23:57 -04:00
Chun-wei Fan
65b35457fd meson.build: Check for F16C on 32-bit Visual Studio
It is also possible to enable F16C instructions on 32-bit Visual Studio builds,
so also check for the compiler's ability to build F16C code on Visual Studio
32-bit instead of just bailing out.
2021-04-12 18:13:42 +08:00
Chun-wei Fan
6d6c8c59eb meson.build: Improve F16C detection on Visual Studio
The __builtin_cpu...() intrisics are strictly for GCC/CLang-based compilers, so
don't use them in the checking code on Visual Studio.  The test code will still
compile without this change, but will certainly fail if we want it to link.
2021-04-12 18:13:42 +08:00
Matthias Clasen
885a6b8ebc gsk: Add runtime checks for F16C
Use an IFUNC resolver to determine whether we can use
intrinsics for FP16 conversion. This requires the functions
to be no longer inline.

Sadly, it turns out that __builtin_cpu_supports ("f16c")
doesn't compile on the systems where we want it to prevent
us from getting a SIGILL at runtime.
2021-04-07 22:21:23 -04:00
Matthias Clasen
9d81c129fc Add an option to disable F16C
And add a compile time check for the presence of this
CPU feature.
2021-04-07 22:21:23 -04:00
Matthias Clasen
ccbbc2f2ba 4.2.0 2021-03-30 11:00:55 -04:00
Emmanuele Bassi
5da3308572 build: Dist the API references
Copy them into the dist root from the build root, so that they will be
available in the release archive.
2021-03-30 15:42:40 +01:00
Matthias Clasen
2496ab0902 Be explicit when building gdk-pixbuf subproject
We require png and jpeg loaders.
2021-03-25 22:52:30 -04:00
Matthias Clasen
d882def373 Merge branch 'meson-install-script' into 'master'
Meson: Use gnome.install_script()

See merge request GNOME/gtk!3135
2021-03-22 12:45:45 +00:00
Matthias Clasen
df4b564d69 build: Disable g_assert in release builds
The ngl renderer is heavily using g_assert, and it
is written with the assumption that these assertions
will be compiled out in release builds.
2021-03-21 16:05:10 -04:00
Matthias Clasen
cbda61d3fb 4.1.2 2021-03-14 21:48:48 -04:00
Emmanuele Bassi
0ba2a3a191 Generate GTK API reference(s) with gi-docgen
Stop using gtk-doc, and switch to gi-docgen.

The gi-docgen tool generates API references through the introspection
data, which has various benefits:

 - it does not parse C code
 - it does not generate and run C code to introspect types at build time
 - it does not present a different API from the one we're exporting

Additionally, gi-docgen:

 - does not generate DocBook XML in order to generate HTML
 - does not go through xsltproc
 - parses proper Markdown

Which makes it markedly faster than gtk-doc has ever been.
2021-03-11 16:37:30 +00:00
Xavier Claessens
629e70f89d Meson: Use gnome.post_install()
See https://github.com/mesonbuild/meson/pull/8272 and
https://github.com/mesonbuild/meson/issues/8268.
2021-03-08 21:19:09 -05:00
Xavier Claessens
405dc7f557 meson: override gtk4 dependency
This allows applications that depends on gtk4 to build it as subproject
without hardcoding 'gtk_dep' variable name in their build definition.
2021-03-08 21:06:33 -05:00
BogDan Vatra
72700d1644 Allow GTK4 to be added as a subproject 2021-02-26 09:27:02 +02:00
Matthias Clasen
1f284fcd70 4.1.1 2021-02-23 20:59:16 -05:00
Matthias Clasen
5ff843f97d Stop passing introspection=false to graphene
This should no longer be possible (and the introspection
option is no longer a boolean.
2021-02-12 16:04:15 -05:00
Timm Bäder
6e4bba3d75 build: Check for mallinfo2 instead of mallinfo
Similar to e89fcbfad6
but the tests we use mallinfo() in really aren't important to not worth
the effort to differentiate between mallinfo and mallinfo2. Only check
for mallinfo2().
2021-02-12 08:39:40 +01:00
David Lechner
b509809f34 meson: use correct module file extension on macOS
GModule requires the .so file extension on macOS for historic reasons.
However Meson defaults to .dylib for modules, so we need to override
it to get the correct extension.

Fixes #3645.
2021-02-05 16:54:28 -06:00
Emmanuele Bassi
51bc6ce2e4 build: Disable subproject Cairo tests
There's really no point in running them.
2021-01-29 16:31:10 +00:00
Matthias Clasen
ac0f524722 build: Redo the tools build
Move the tools directory to be toplevel, and instead of
recompiling sources twice, link them with the our new
static libgtk.a.
2021-01-28 12:27:07 -05:00
Matthias Clasen
e6f0103940 Merge branch 'version-bump' into 'master'
Version bump

See merge request GNOME/gtk!3093
2021-01-19 04:48:26 +00:00
Matthias Clasen
ee43a6a603 Bump version to 4.1
master is now open for 4.2 API additions.

Includes an update for the one test we have that
has the version number in its expected output.
2021-01-18 23:09:44 -05:00
Matthias Clasen
1edbc1f1f9 Merge branch 'wip/jtojnar/fix-pc-vulcan' into 'master'
build: Use Meson’s module for building .pc files

Closes #3517

See merge request GNOME/gtk!3005
2021-01-19 04:04:34 +00:00
Matthias Clasen
146b4c93ba 4.0.2 2021-01-18 22:23:57 -05:00
Matthias Clasen
13ef82fc4d dist: Add a dist script to generate css
When I added the sassc option, I failed to ensure that
the theme css is included in the tarballs. This is required
to make tarball builds with -Dsassc=disabled work.
2021-01-12 08:42:18 -05:00
Matthias Clasen
60835227a1 4.0.1 2021-01-09 01:30:13 -05:00
Matthias Clasen
77feb51b9c Pass coretext=enabled to harfbuzz
When we use harfbuzz as a subproject on OS X,
we (or rather, pango) need coretext support.
2021-01-03 21:34:04 -05:00
Matthias Clasen
d55f938f7c printing: cairo-pdf is needed
The print backends need cairos pdf support, which is
contingent on zlib, so enable that when using cairo
as a subproject, as we do in ci for MacOS.
2021-01-03 21:34:04 -05:00
Matthias Clasen
45bb4dc80c ci: Add a macos build
Most of this is cribbed from glib.

We don't use COMMON_MESON_FLAGS here, since disabling
-Werror one subproject at a time is too painful for
all the promoted sub-sub-projects. This needs a better
solution in meson.

Since this is a full rebuild of the entire stack, limit
this to master and merge requests.
2021-01-03 21:34:04 -05:00
Jan Tojnar
7d5826ccf7
build: Fix vulkan reference in pc file
A mistake in string concatenation caused the vulcan dependency to be omitted.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
2020-12-27 06:42:29 +01:00
Jan Tojnar
2c9f2325e2
build: Use Meson’s module for building .pc files
Using the module will prevent trivial bugs caused by incorrect string concatenation.

This is just a literal translation. In the future we might rely on Meson auto-detecting fields from library declaration.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/3517
2020-12-27 06:27:59 +01:00
Emmanuele Bassi
fa35e3b874 Pass the bindir to the post-install script 2020-12-20 16:33:25 +00:00
Emmanuele Bassi
2da8d9b0ac Do not build gdk-pixbuf's man page
When using it as a sub-project. We don't really need them.
2020-12-17 20:50:16 +00:00
Matthias Clasen
591c2f0595 4.0 2020-12-16 12:12:58 -05:00
Emmanuele Bassi
618186723a build: Remove unused backend_immodules variable
We don't have input method modules any more.
2020-12-15 11:20:19 +00:00
Emmanuele Bassi
a5986f0dcd build: Use get_supported_link_arguments()
Instead of hand-coding it ourselves, let Meson deal with linker
arguments discovery.
2020-12-15 11:19:39 +00:00
Emmanuele Bassi
2457f3d54c build: Bump up the SONAME for GTK4
We released all the 3.9x development snapshots using:

  libgtk-4.0.so.0.xxxx.y

which means that the 4.0.0 release of GTK will have a lower SONAME than
the snapshots. To avoid that, bump the SONAME to 1.xxxx.y.

Fixes: #3392
2020-12-09 12:19:50 +00:00
Emmanuele Bassi
1cc207af32 build: Tie interface age to the development cycle
We don't want to increase the interface age manually, because we're
going to end up forgetting about it.

Instead, we should tie it to the rest of the version:

 - in stable (even minor) cycles, we don't add new API; the interface
   age is the same as the micro version
 - in unstable (odd minor) cycles, every new release might have new API,
   or updates to newly added API; keep the interface age to 0

This removes one more manual thing to change during release, and keeps
us honest with our promise not to add symbols during stable cycles.
2020-12-09 12:19:50 +00:00
Matthias Clasen
398a74d871 3.99.5 2020-12-08 10:58:40 -05:00
Emmanuele Bassi
803b147483 Disable deprecation warnings from GLib
We don't want to test the latest changes in GLib in our own build.
2020-11-23 13:04:11 +00:00
Emmanuele Bassi
de7833b6a0 Use the right GLib macros for version checking
There's a typo in the name, and we never noticed.
2020-11-23 12:06:22 +00:00
Matthias Clasen
3eaae748d3 3.99.4 2020-11-04 21:46:10 -05:00
Xavier Claessens
6ae9f7e7c3 meson: Simplify xinerama dependency check 2020-10-17 09:54:47 -04:00
Xavier Claessens
efbbfb6547 meson: Simplify how cairo dependencies are checked
There is no reason to fallback to find_library for cairo and still rely
on pkg-config for all other dependencies, and just when using MSVC. When
building and pkg-config is not working it is preferable to fallback to a
subproject just like for all other dependencies.

Also add cairo.wrap now that meson support has been merged upstream.
2020-10-17 09:54:47 -04:00
Matthias Clasen
1021e12121 3.99.3 2020-10-15 23:03:03 -04:00
Xavier Claessens
fe89fd2317 meson: Fix error when epoxy is a subproject on Windows
epoxy_dep cannot be used in a configure time check when it comes from a
subproject. Use variables set in pc file instead.

This requires https://github.com/anholt/libepoxy/pull/231.
2020-10-15 08:01:16 -04:00
Timm Bäder
ef7c5747c4 build: Only add -Wcast-align for gcc
Either we or clang needs to get its shit together about this warning.
But using it during development with clang just makes actually usable
warnings get lost in a flood of -Wcast-align warnings.
2020-10-14 15:06:12 -04:00
Christian Hergert
fb02c99868 macos: port gtk to GDK_WINDOWING_MACOS
For the various uses of GDK_WINDOWING_QUARTZ, we need to use
alternatives from GDK_WINDOWING_MACOS.

Some minor loss of functionality is here, such as icons sent with
application menus. That can certainly be added back at a future
point.
2020-10-14 15:06:12 -04:00
Matthias Clasen
2d927d0ee0 build: Require sysprof 3.38.0
We use sysprof_collector_request_counters, which
was introduced in sysprof 3.38.0.
2020-10-14 15:05:46 -04:00
Matthias Clasen
ffb51b6888 Require gtk-doc 1.33
We'll hopefully get a gtk-doc release out with that
version number soon.
2020-10-01 15:09:26 -04:00
Matthias Clasen
21c8bc2b47 build: Require meson 0.54 2020-09-30 15:26:20 -04:00
Xavier Claessens
fd1e8afe9d meson: Change introspection option to yielding feature
Yielding option means that if pango is built as a subproject, it will
take the value of that option from the parent project (e.g. gst-build).
For that to work it must be of the same type, which is "feature" instead
of "boolean" in all GStreamer modules.
2020-09-30 15:11:27 -04:00
Matthias Clasen
218b905a88 3.99.2 2020-09-29 14:44:31 -04:00
Matthias Clasen
6b9622f0da Try one more time to fix win32 ci 2020-09-19 08:13:35 -04:00
Matthias Clasen
69d5dc7c9a fontchooser: Determine sample text intelligently
Look at the languages supported by a font, and pick
a suitable sample text from the pango list of sample
texts. We can only implement this on platforms using
fontconfig, since it relies on pangofc apis.

This bumps the pango dependency to 1.47.1.
2020-09-18 23:04:39 -04:00
Timm Bäder
40ee7186bf build: Unify two if statements
They both check glib_minor_req.is_odd()
2020-09-15 05:21:53 +02:00
Emmanuele Bassi
107e49002d Check for mlock()
We use it in the secure memory allocator, if it's available.
2020-09-08 23:50:12 +01:00
Matthias Clasen
f70e37a341 Merge branch 'release-script' into 'master'
Release script

See merge request GNOME/gtk!2530
2020-09-04 15:30:35 +00:00
Matthias Clasen
a8eae7afaa build: Move the gtk-doc dep to the toplevel
We want to include the gtk-doc subproject in release
tarballs, using --include-subprojects, but that only
works if we've actually built the subproject. And
enabling gtk-doc for dist builds is problematic -
it tends to break meson dist.

So declare the gtk-doc dependency independent of
-Dgtk_doc, and use --force-fallback-for for it.
2020-09-04 09:57:14 -04:00
Emmanuele Bassi
1896d7f463 build: Make sysprof truly optional
We are falling back to the sysprof subproject even if sysprof support
has been explicitly disabled.

Fixes: #3118
2020-09-04 12:02:15 +01:00
Nirbheek Chauhan
b25871438d meson: Fix Vulkan dependency checking
The dependency block was completely wrong. It was:

1. Not searching for the lib manually when -Dvulkan=enabled (default).
   The else block was only hit when -Dvulkan=auto.
2. Unconditionally searching for the vulkan library in the else block
   when -Dvulkan=disabled

The manual searching is also not required because Meson has a custom
'vulkan' dependency class that already supports Windows, and is more
correct than the code here. Specifically, the current code does not
support picking up the Vulkan SDK from a custom path.

Fixes #3108
2020-09-04 11:50:50 +05:30
Matthias Clasen
1a131a04d3 3.99.1 2020-09-03 14:20:06 -04:00
Matthias Clasen
c4d350c260 build: Start using meson feature options
Use feature options for things that are optional features,
update the docs.

Visible changes here is that the 'print-backends' option
got renamed to 'print' to go better with 'media', and the
'tracker3' option got renamed to 'tracker'.

For options that have been changed into features, the
syntax now is -Dfeature=enabled or -Dfeature=disabled
or -Dfeature=auto.
2020-08-23 16:45:15 -04:00
Matthias Clasen
e915a1aa7f Rename the profiler option
We don't support any profilers other than sysprof,
so name the option accordingly. While we are at it,
change it to a meson feature option, so
-Dprofiler=true becomes -Dsysprof=enabled
2020-08-21 18:51:48 -04:00
Matthias Clasen
81e88c1d9e Alterative sysprof build support
Don't link libgtk against libsysprof. We only
need that for the test-performance binary.
2020-08-21 18:28:29 -04:00
Christian Hergert
5a5b30681e testsuite: use SysprofProfiler for profiling
Instead of using sysprof-cli to profile subprocesses, this uses
libsysprof's SysprofProfiler directly so that we can avoid an indirect
subprocess as well as disabling the polkit nag.

To do this, we have to link against libsysprof instead of
libsysprof-capture. This is limited to the -Dbuild-tests=true and
-Dprofiler=true case.
2020-08-21 13:51:52 -07:00
Matthias Clasen
d4e069a629 Port tracing to the sysprof collector api
Use the new sysprof collector api to do tracing.
2020-08-21 10:55:01 -04:00
Matthias Clasen
15325fe546 Bump the pango dependency
Require pango 1.45.5, so we can use pango_color_parse_with_alpha.
2020-08-02 23:30:33 -04:00
Matthias Clasen
e0d1aac8a5 Bump the glib dependency
Some of the new apis we want to use to avoid
deprecations were only introduced in 2.65.
2020-07-31 13:07:31 -04:00
Matthias Clasen
554954d126 3.99.0 2020-07-30 22:16:31 -04:00
Chun-wei Fan
12a23162b3 build: Check for EGL support in libepoxy on Windows
...EGL support needs to be explicitly enabled during the build of
libepoxy on Windows as it is not enabled by default on Windows.

With this, we can add an EGL renderer for Windows that make use of
Google's libANGLE, which is a library that translates OpenGL/ES calls
to Direct3D 9/11, which will provide better hardware compatibility
on Windows and would act as one of the foundations to resolve issue #105.
2020-07-30 14:26:33 +08:00
Christian Hergert
459af3acab build: bump to sysprof 4 ABI
Sysprof has moved to a new ABI which removes GLib from the capture library
so that GLib itself can link against sysprof-capture.

This bumps the library ABI so we can keep things coordinated between all
the new tracing layers in the stack.
2020-07-28 11:22:33 -07:00
Christian Hergert
0243736003 macos: support ARM/PowerPC time conversion for DisplayLink times
When converting DisplayLink frame presentation times, we need to take into
account the arch-specific types. This tracks changes in GNOME/GLib!1566 so
that precision is not lost.
2020-07-27 12:49:57 -07:00
Emmanuele Bassi
c63087a563 Remove ATK
To build a better world sometimes means having to tear the old one down.
        -- Alexander Pierce, "Captain America: The Winter Soldier"

ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:

 - it maps to a very specific implementation, AT-SPI, which is Linux and
   Unix specific
 - it requires implementing the same functionality in three different
   layers of the stack: AT-SPI, ATK, and GTK
 - only GTK uses it; every other Linux and Unix toolkit and application
   talks to AT-SPI directly, including assistive technologies

Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:

 - add an "accessible" interface, implemented by GTK objects directly,
   which describe the accessible role and state changes for every UI
   element
 - add an "assistive technology context" to proxy a native accessibility
   API, and assign it to every widget
 - implement the AT context depending on the platform

For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Christian Hergert
9dbf99d91a macos: prototype new GDK backend for macOS
This is fairly substantial rewrite of the GDK backend for quartz and
renamed to macOS to allow for a greenfield implementation.

Many things have come across from the quartz implementation fairly
intact such as the eventloop integration design and discovery of
event windows from the NSEvent.

However much has been changed to fit in with the new GDK design and
how removal of child GdkWindow have been completely eliminated.
Furthermore, the new GdkPopup allows for regular NSWindow to be used
to provide popovers unlike the previous implementation.

The object design more closely follows the ideal for a GDK backend.

Views have been broken out into subclasses so that we can support
multiple GSK renderer paths such as GL and Cairo (and Metal in the
future). However mixed mode GL and Cairo will not be supported. Currently
only the Cairo renderer has been implemented.

A new frame clock implementation using CVDisplayLink provides more
accurate information about when to draw drawing the next frame. Some
testing will need to be done here to understand the power implications
of this.

This implementation has also gained edge snapping for CSD windows. Some
work was also done to ensure that CSD windows have opaque regions
registered with the display server.

     ** This is still very much a work-in-progress **

Some outstanding work that needs to be done:

 - Finish a GL context for macOS and alternate NSView for GL rendering
   (possibly using speciailized CALayer for OpenGL).
 - Input rework to ensure that we don't loose remapping of keys that was
   dropped from GDK during GTK 4 development.
 - Make sure input methods continue to work.
 - Drag-n-Drop is still very much a work in progress
 - High resolution input scrolling needs various work in GDK to land
   first before we can plumb that to NSEvent.
 - gtk/ has a number of things based on GDK_WINDOWING_QUARTZ that need
   to be updated to use the macOS backend.

But this is good enough to start playing with and breaking things which
is what I'd like to see.
2020-07-21 14:45:12 -07:00
Christian Hergert
add47bebc6 build: add ATK fallback subproject wrapper
Very similar to the other fallbacks we use.
2020-07-21 14:45:12 -07:00
Christian Hergert
514b62223d build: squash various warnings with Clang
Otherwise we have really chatty builds that make it difficult to catch
new issues when compiling.
2020-07-21 14:45:12 -07:00
Christian Hergert
7884ab6161 build: fix linking support on macOS with Clang
This was preventing any sort of building on macOS, even though the quartz
backend is currently non-functional. Fixing this is a pre-requisite to
getting a new macOS backend compiling.
2020-07-21 14:45:12 -07:00
Emmanuele Bassi
0c023bb5bb Clarify document
We don't use the branch name to determine whether we should enable or
disable deprecation warnings coming from our dependencies.
2020-06-18 17:36:44 +01:00
Emmanuele Bassi
c5481a125e Add libcloudproviders as a fallback subproject
We require a new version of libcloudproviders so that we can enable it
in our CI pipeline.
2020-06-17 14:06:20 -04:00
Matthias Clasen
2abb5b6419 3.98.5 2020-06-06 16:03:38 -04:00
Matthias Clasen
34841c3a5f Merge branch 'master.msvc' into 'master'
Fix latest GTK master on Visual Studio

See merge request GNOME/gtk!2028
2020-06-05 18:31:08 +00:00
Ray Strode
10f2b11fda x11: Add back support for the damage extension
commit 14bf58ec5d dropped support
for using the DAMAGE extension since there was no code that
needed it.

We're going to need it again, however, to address an NVidia
vendor driver issue.

This commit does the plumbing to add it back.
2020-06-05 10:01:13 -04:00
Chun-wei Fan
acd9c12667 modules: Fix build on Visual Studio
Visual Studio does not allow decorating functions with '__declspec (dllexport)'
if a prototype exists and is not decorated with '__declspec (dllexport)' as
well, so we cannot just decorate g_io_module_[load|unload|query] in the various
module sources with G_MODULE_EXPORT because the prototypes of these functions
have been marked with _GLIB_EXTERN, which equates to 'extern' unless overridden

Fix this by overriding _GLIB_EXTERN with the appropriate visibility flag, as we
have used to define _GDK_EXTERN.  Unfortunately, we can't just use _GDK_EXTERN
G_MODULE_EXPORT as they may have not been defined yet for our use

Do this across the board for all modules, even if they are not buildable on
Visual Studio nor Windows, for consistency's sake.
2020-06-05 11:16:45 +08:00