Commit graph

26 commits

Author SHA1 Message Date
Emmanuele Bassi
ba4d5fbd5d Build with hidden symbols by default
We should default on every platform we care about to hidden symbols, to
avoid leaking private symbols.

On Windows this is the default state of affairs with the MSVC toolchain;
with GCC and GCC-compatible toolchains, we need to opt into this
behaviour. Luckily for us, Cairo already has an annotation for public
symbols, so we can easily tweak it to include the visibility attribute.

When building ancillary libraries as part of the Cairo compilation on
Windows, we use a pre-processor symbol to ensure that we keep the
dllexport annotation. This avoids including the cairoint.h header file.

Fixes: #582
2023-08-16 16:33:04 +01:00
Behdad Esfahbod
d08e348dd6 [gobject] Bind cairo_glyph_t and cairo_text_cluster_t 2023-03-09 13:04:50 -07:00
Adrian Johnson
efe303d9db Remove autotools build 2023-01-08 22:27:47 +10:30
Emmanuele Bassi
4c38b3db99 gobject: Remove the use of volatile
It is pointless, and it has been deprecated by GLib:

  https://gitlab.gnome.org/GNOME/glib/-/issues/600
  http://c.isvolatileusefulwiththreads.com/

Now we're just getting compiler warnings with recent versions of GCC.
2021-08-15 19:29:53 +01:00
Uli Schlachter
1981fb6dfb meson: Use more dependency objects
For example, to depend on cairo-script, inccairoscript was added to
"include_directories:" and libcairoscript was added to "link_with:".
This commit instead uses the libcairoscript_dep dependency everywhere.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-05-22 07:59:52 +02:00
Emmanuele Bassi
bd13841257 Drop the conditional inclusion of config.h
We *always* generate this file, and we depend on its existence.

The idea behind HAVE_CONFIG_H was being able to include random files
from different projects, back in a time where "libraries" were literally
just random files instead of actual shared objects.

Since we're not in the '80s any more, and our build system(s) define
HAVE_CONFIG_H *and* generate the config.h header file, we don't need a
conditional guard around its inclusion.
2021-05-01 17:05:29 +01:00
Emmanuele Bassi
8336309794 meson: Define HAVE_CONFIG_H as a project flag
Precisely what Autotools does, instead of adding it as per-target C
argument.

Once we remove HAVE_CONFIG_H checks in every source file, we'll be able
to drop it.
2021-05-01 16:55:38 +01:00
Uli Schlachter
64e1fd70ec Merge branch 'ebassi/warnings-fixes' into 'master'
Avoid a bunch of compiler warnings

See merge request cairo/cairo!166
2021-04-27 16:30:44 +00:00
Emmanuele Bassi
efab74f5a1 Drop volatile from the GType registration
The `volatile` is unnecessary, and newer versions of GLib and GCC will
complain if you use it.
2021-04-27 16:59:35 +01:00
Emmanuele Bassi
b7d38e048f Use g_memdup2() with newer versions of GLib
The g_memdup() function has been deprecated, as it takes the size of the
memory area as an unsigned integer. The g_memdup2() replacement uses the
more appropriate size_t type, instead.
2021-04-27 16:54:22 +01:00
Tim-Philipp Müller
e9ccb1d8d0 meson: fix library versioning
Fixes #442
2020-12-15 00:22:37 +00:00
Xavier Claessens
70c01fb9d1 cairo-gobject: Missing cairo include directories
When cairo is a subproject and application uses libcairogobject_dep, it
was missing include directories set in libcairo_dep.
2020-10-07 11:50:07 -04:00
Xavier Claessens
084404cd15 meson: Use pkgmod.generate() for all cairo pc files
Also override each dependency so they can be used when cairo is used as
subproject.
2020-10-06 10:58:04 -04:00
Mathieu Duponchelle
596a82f2d1 Add meson build definitions
Co-Authored by:
Nirbheek Chauhan <nirbheek@centricular.com>
lb90 <luca.bacci982@gmail.com>
Tim-Philipp Müller <tim@centricular.com>
2020-07-31 12:21:50 +01:00
Adrian Johnson
747cab741c Add CAIRO_STATUS_WIN32_GDI_ERROR for GDI errors 2016-03-26 22:18:05 +10:30
Adrian Johnson
cdd5c92ced Add CAIRO_STATUS_FREETYPE_ERROR for errors returned by libfreetype 2016-03-26 21:45:59 +10:30
Adrian Johnson
8f6790123e Adding missing error status to utils 2016-03-26 19:06:03 +10:30
Nicola Fontana
59ccc3d72e gobject: Add wrapper around cairo_matrix_t
Reviewed-By: Benjamin Otte <otte@redhat.com>
Signed-off-by: Uli Schlachter <psychon@znc.in>
2013-03-23 19:47:54 +01:00
Chris Wilson
8cd604e18a gobject: Fix my typo s/TEST/TEXT/ in the previous commit
Again reported by Kouhei Sutou, who I am grateful for his deligence.
2013-01-04 14:03:40 +00:00
Kouhei Sutou
a4f221498c gobject: Fix "text_cluster_flags_get_type" typo
The macro missed the text from the name, rendering it useless.
2013-01-04 12:18:29 +00:00
Kouhei Sutou
ecc8c28b24 gobject: Add the correct macro name for the hint-metrics type
s/CAIRO_GOBJECT_TYPE_HNT_METRICS/CAIRO_GOBJECT_TYPE_HINT_METRICS/

However, as we have already released the broken headers, we need to
preserve that mistake in case applications are already using. Since it
is just a #define, there is little associated cost with carrying both
the incorrect spelling and the corrected define.
2013-01-03 15:07:18 +00:00
Chris Wilson
70cd3b473d api: Extend cairo_antialias_t to include performace/quality hints
The existing API only described the method to be used for performing
rasterisation and unlike other API provided no opportunity for the user
to give a hint as to how to trade off performance against speed. So in
order to no be overly prescriptive, we extend the NONE/GRAY/SUBPIXEL
methods with FAST/GOOD/BEST hints and leave the backend to decide how
best to achieve those goals.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2011-08-30 15:17:38 +01:00
Adrian Johnson
ed24deaa2e mesh: Add mesh pattern type and enum values
Add the mesh pattern type and an error status to be used to report an
incorrect construction of the pattern.

Update the backends to make them ready to handle the new pattern type,
even if it cannot be created yet.
2011-01-01 13:05:12 +01:00
Chris Wilson
8258532794 Reduce the cairo_device_type_t to only hold the used entries.
This should help clarify the documentation by not mentioning non-existent
devices and prevent any assumed coupling between surface-type values and
devices.
2010-09-06 13:11:22 +01:00
Benjamin Otte
3a8b8fcc2a gobject: Fix header defines 2010-09-01 21:14:40 +02:00
Benjamin Otte
661f4859cd Add cairo-gobject library
This library is supposed to contain GType declarations for Cairo types.
It is also meant to support gobject-introspection binding creation.
2010-08-07 20:19:27 +02:00