Add support for opening Xcursor files

Sadly, they don't have a canonical extension, and they don't show up
in the browser.  We might want to employ some level of sniffing.
The first 16 bytes are enough to identify a lot.
This commit is contained in:
2021-11-17 13:45:42 +01:00
parent e8754f43a6
commit db7a28b187
6 changed files with 151 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ project('fastiv', 'c', default_options : ['c_std=gnu99'], version : '0.1.0')
# TODO(p): Use libraw_r later, when we start parallelizing/preloading.
libraw = dependency('libraw', required : get_option('libraw'))
librsvg = dependency('librsvg-2.0', required : get_option('librsvg'))
xcursor = dependency('xcursor', required : get_option('xcursor'))
gdkpixbuf = dependency('gdk-pixbuf-2.0', required : get_option('gdk-pixbuf'))
dependencies = [
dependency('gtk+-3.0'),
@@ -12,6 +13,7 @@ dependencies = [
dependency('pixman-1'),
libraw,
librsvg,
xcursor,
gdkpixbuf,
meson.get_compiler('c').find_library('m', required : false),
]
@@ -21,6 +23,7 @@ conf.set_quoted('PROJECT_NAME', meson.project_name())
conf.set_quoted('PROJECT_VERSION', meson.project_version())
conf.set('HAVE_LIBRAW', libraw.found())
conf.set('HAVE_LIBRSVG', librsvg.found())
conf.set('HAVE_XCURSOR', xcursor.found())
conf.set('HAVE_GDKPIXBUF', gdkpixbuf.found())
configure_file(
output : 'config.h',