Skip to content

Commit 3c5ffcf

Browse files
committed
Update macOS Cairo to 1.18.4 with universal binary support (arm64 + x86_64)
1 parent 9fdb12d commit 3c5ffcf

File tree

12 files changed

+1099
-358
lines changed

12 files changed

+1099
-358
lines changed
Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,34 @@
1-
/* Generated by configure. Do not edit. */
2-
#ifndef CAIRO_FEATURES_H
1+
/*
2+
* Autogenerated by the Meson build system.
3+
* Do not edit, your changes will be lost.
4+
*/
5+
6+
#pragma once
7+
38
#define CAIRO_FEATURES_H
49

510
#define CAIRO_HAS_IMAGE_SURFACE 1
11+
12+
#define CAIRO_HAS_MIME_SURFACE 1
13+
14+
#define CAIRO_HAS_OBSERVER_SURFACE 1
15+
616
#define CAIRO_HAS_PDF_SURFACE 1
17+
718
#define CAIRO_HAS_PNG_FUNCTIONS 1
19+
820
#define CAIRO_HAS_PS_SURFACE 1
21+
922
#define CAIRO_HAS_QUARTZ_FONT 1
23+
24+
#define CAIRO_HAS_QUARTZ_IMAGE_SURFACE 1
25+
1026
#define CAIRO_HAS_QUARTZ_SURFACE 1
27+
1128
#define CAIRO_HAS_RECORDING_SURFACE 1
29+
30+
#define CAIRO_HAS_SCRIPT_SURFACE 1
31+
1232
#define CAIRO_HAS_SVG_SURFACE 1
13-
#define CAIRO_HAS_USER_FONT 1
1433

15-
/*#undef CAIRO_HAS_EGL_FUNCTIONS */
16-
/*#undef CAIRO_HAS_FC_FONT */
17-
/*#undef CAIRO_HAS_FT_FONT */
18-
/*#undef CAIRO_HAS_GLX_FUNCTIONS */
19-
/*#undef CAIRO_HAS_GOBJECT_FUNCTIONS */
20-
/*#undef CAIRO_HAS_WGL_FUNCTIONS */
21-
/*#undef CAIRO_HAS_WIN32_FONT */
22-
/*#undef CAIRO_HAS_WIN32_SURFACE */
23-
/*#undef CAIRO_HAS_XCB_SHM_FUNCTIONS */
24-
/*#undef CAIRO_HAS_XLIB_SURFACE */
25-
/*#undef CAIRO_HAS_XLIB_XRENDER_SURFACE */
26-
27-
#endif
34+
#define CAIRO_HAS_USER_FONT 1

blocks/Cairo/include/macosx/cairo-pdf.h

Lines changed: 63 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,18 +45,17 @@ CAIRO_BEGIN_DECLS
4545

4646
/**
4747
* cairo_pdf_version_t:
48-
* @CAIRO_PDF_VERSION_1_4: The version 1.4 of the PDF specification.
49-
* @CAIRO_PDF_VERSION_1_5: The version 1.5 of the PDF specification.
48+
* @CAIRO_PDF_VERSION_1_4: The version 1.4 of the PDF specification. (Since 1.10)
49+
* @CAIRO_PDF_VERSION_1_5: The version 1.5 of the PDF specification. (Since 1.10)
50+
* @CAIRO_PDF_VERSION_1_6: The version 1.6 of the PDF specification. (Since 1.18)
51+
* @CAIRO_PDF_VERSION_1_7: The version 1.7 of the PDF specification. (Since 1.18)
5052
*
5153
* #cairo_pdf_version_t is used to describe the version number of the PDF
5254
* specification that a generated PDF file will conform to.
5355
*
54-
* Since 1.10
55-
*/
56-
typedef enum _cairo_pdf_version {
57-
CAIRO_PDF_VERSION_1_4,
58-
CAIRO_PDF_VERSION_1_5
59-
} cairo_pdf_version_t;
56+
* Since: 1.10
57+
**/
58+
typedef enum _cairo_pdf_version { CAIRO_PDF_VERSION_1_4, CAIRO_PDF_VERSION_1_5, CAIRO_PDF_VERSION_1_6, CAIRO_PDF_VERSION_1_7 } cairo_pdf_version_t;
6059

6160
cairo_public cairo_surface_t *
6261
cairo_pdf_surface_create (const char *filename,
@@ -85,6 +84,62 @@ cairo_pdf_surface_set_size (cairo_surface_t *surface,
8584
double width_in_points,
8685
double height_in_points);
8786

87+
/**
88+
* cairo_pdf_outline_flags_t:
89+
* @CAIRO_PDF_OUTLINE_FLAG_OPEN: The outline item defaults to open in the PDF viewer (Since 1.16)
90+
* @CAIRO_PDF_OUTLINE_FLAG_BOLD: The outline item is displayed by the viewer in bold text (Since 1.16)
91+
* @CAIRO_PDF_OUTLINE_FLAG_ITALIC: The outline item is displayed by the viewer in italic text (Since 1.16)
92+
*
93+
* #cairo_pdf_outline_flags_t is used by the
94+
* cairo_pdf_surface_add_outline() function specify the attributes of
95+
* an outline item. These flags may be bitwise-or'd to produce any
96+
* combination of flags.
97+
*
98+
* Since: 1.16
99+
**/
100+
typedef enum _cairo_pdf_outline_flags {
101+
CAIRO_PDF_OUTLINE_FLAG_OPEN = 0x1,
102+
CAIRO_PDF_OUTLINE_FLAG_BOLD = 0x2,
103+
CAIRO_PDF_OUTLINE_FLAG_ITALIC = 0x4,
104+
} cairo_pdf_outline_flags_t;
105+
106+
#define CAIRO_PDF_OUTLINE_ROOT 0
107+
108+
cairo_public int cairo_pdf_surface_add_outline( cairo_surface_t* surface, int parent_id, const char* utf8, const char* link_attribs, cairo_pdf_outline_flags_t flags );
109+
110+
/**
111+
* cairo_pdf_metadata_t:
112+
* @CAIRO_PDF_METADATA_TITLE: The document title (Since 1.16)
113+
* @CAIRO_PDF_METADATA_AUTHOR: The document author (Since 1.16)
114+
* @CAIRO_PDF_METADATA_SUBJECT: The document subject (Since 1.16)
115+
* @CAIRO_PDF_METADATA_KEYWORDS: The document keywords (Since 1.16)
116+
* @CAIRO_PDF_METADATA_CREATOR: The document creator (Since 1.16)
117+
* @CAIRO_PDF_METADATA_CREATE_DATE: The document creation date (Since 1.16)
118+
* @CAIRO_PDF_METADATA_MOD_DATE: The document modification date (Since 1.16)
119+
*
120+
* #cairo_pdf_metadata_t is used by the
121+
* cairo_pdf_surface_set_metadata() function specify the metadata to set.
122+
*
123+
* Since: 1.16
124+
**/
125+
typedef enum _cairo_pdf_metadata {
126+
CAIRO_PDF_METADATA_TITLE,
127+
CAIRO_PDF_METADATA_AUTHOR,
128+
CAIRO_PDF_METADATA_SUBJECT,
129+
CAIRO_PDF_METADATA_KEYWORDS,
130+
CAIRO_PDF_METADATA_CREATOR,
131+
CAIRO_PDF_METADATA_CREATE_DATE,
132+
CAIRO_PDF_METADATA_MOD_DATE,
133+
} cairo_pdf_metadata_t;
134+
135+
cairo_public void cairo_pdf_surface_set_metadata( cairo_surface_t* surface, cairo_pdf_metadata_t metadata, const char* utf8 );
136+
137+
cairo_public void cairo_pdf_surface_set_custom_metadata( cairo_surface_t* surface, const char* name, const char* value );
138+
139+
cairo_public void cairo_pdf_surface_set_page_label( cairo_surface_t* surface, const char* utf8 );
140+
141+
cairo_public void cairo_pdf_surface_set_thumbnail_size( cairo_surface_t* surface, int width, int height );
142+
88143
CAIRO_END_DECLS
89144

90145
#else /* CAIRO_HAS_PDF_SURFACE */

blocks/Cairo/include/macosx/cairo-ps.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,15 @@ CAIRO_BEGIN_DECLS
4949

5050
/**
5151
* cairo_ps_level_t:
52-
* @CAIRO_PS_LEVEL_2: The language level 2 of the PostScript specification.
53-
* @CAIRO_PS_LEVEL_3: The language level 3 of the PostScript specification.
52+
* @CAIRO_PS_LEVEL_2: The language level 2 of the PostScript specification. (Since 1.6)
53+
* @CAIRO_PS_LEVEL_3: The language level 3 of the PostScript specification. (Since 1.6)
5454
*
5555
* #cairo_ps_level_t is used to describe the language level of the
5656
* PostScript Language Reference that a generated PostScript file will
5757
* conform to.
58-
*/
58+
*
59+
* Since: 1.6
60+
**/
5961
typedef enum _cairo_ps_level {
6062
CAIRO_PS_LEVEL_2,
6163
CAIRO_PS_LEVEL_3
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/* cairo - a vector graphics library with display and print output
2+
*
3+
* Copyright © 2008 Mozilla Corporation
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it either under the terms of the GNU Lesser General Public
7+
* License version 2.1 as published by the Free Software Foundation
8+
* (the "LGPL") or, at your option, under the terms of the Mozilla
9+
* Public License Version 1.1 (the "MPL"). If you do not alter this
10+
* notice, a recipient may use your version of this file under either
11+
* the MPL or the LGPL.
12+
*
13+
* You should have received a copy of the LGPL along with this library
14+
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
15+
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
16+
* You should have received a copy of the MPL along with this library
17+
* in the file COPYING-MPL-1.1
18+
*
19+
* The contents of this file are subject to the Mozilla Public License
20+
* Version 1.1 (the "License"); you may not use this file except in
21+
* compliance with the License. You may obtain a copy of the License at
22+
* http://www.mozilla.org/MPL/
23+
*
24+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
25+
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
26+
* the specific language governing rights and limitations.
27+
*
28+
* The Original Code is the cairo graphics library.
29+
*
30+
* The Initial Developer of the Original Code is Mozilla Foundation.
31+
*
32+
* Contributor(s):
33+
* Vladimir Vukicevic <vladimir@mozilla.com>
34+
*/
35+
36+
#ifndef CAIRO_QUARTZ_IMAGE_H
37+
#define CAIRO_QUARTZ_IMAGE_H
38+
39+
#include "cairo.h"
40+
41+
#if CAIRO_HAS_QUARTZ_IMAGE_SURFACE
42+
43+
#include <Carbon/Carbon.h>
44+
45+
CAIRO_BEGIN_DECLS
46+
47+
cairo_public cairo_surface_t *
48+
cairo_quartz_image_surface_create (cairo_surface_t *image_surface);
49+
50+
cairo_public cairo_surface_t *
51+
cairo_quartz_image_surface_get_image (cairo_surface_t *surface);
52+
53+
CAIRO_END_DECLS
54+
55+
#else /* CAIRO_HAS_QUARTZ_IMAGE_SURFACE */
56+
# error Cairo was not compiled with support for the quartz-image backend
57+
#endif /* CAIRO_HAS_QUARTZ_IMAGE_SURFACE */
58+
59+
#endif /* CAIRO_QUARTZ_IMAGE_H */

blocks/Cairo/include/macosx/cairo-quartz.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* cairo - a vector graphics library with display and print output
22
*
3-
* Copyright © 2006, 2007 Mozilla Corporation
3+
* Copyright © 2006, 2007 Mozilla Corporation
44
*
55
* This library is free software; you can redistribute it and/or
66
* modify it either under the terms of the GNU Lesser General Public
@@ -66,12 +66,9 @@ cairo_quartz_surface_get_cg_context (cairo_surface_t *surface);
6666
cairo_public cairo_font_face_t *
6767
cairo_quartz_font_face_create_for_cgfont (CGFontRef font);
6868

69-
#ifndef __LP64__
70-
cairo_public cairo_font_face_t *
71-
cairo_quartz_font_face_create_for_atsu_font_id (ATSUFontID font_id);
72-
#endif
69+
cairo_public cairo_font_face_t* cairo_quartz_font_face_create_for_atsu_font_id( ATSUFontID font_id );
7370

74-
#endif /* CAIRO_HAS_QUARTZ_FONT */
71+
#endif /* CAIRO_HAS_QUARTZ_FONT */
7572

7673
CAIRO_END_DECLS
7774

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
/* cairo - a vector graphics library with display and print output
2+
*
3+
* Copyright © 2008 Chris Wilson
4+
*
5+
* This library is free software; you can redistribute it and/or
6+
* modify it either under the terms of the GNU Lesser General Public
7+
* License version 2.1 as published by the Free Software Foundation
8+
* (the "LGPL") or, at your option, under the terms of the Mozilla
9+
* Public License Version 1.1 (the "MPL"). If you do not alter this
10+
* notice, a recipient may use your version of this file under either
11+
* the MPL or the LGPL.
12+
*
13+
* You should have received a copy of the LGPL along with this library
14+
* in the file COPYING-LGPL-2.1; if not, write to the Free Software
15+
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA
16+
* You should have received a copy of the MPL along with this library
17+
* in the file COPYING-MPL-1.1
18+
*
19+
* The contents of this file are subject to the Mozilla Public License
20+
* Version 1.1 (the "License"); you may not use this file except in
21+
* compliance with the License. You may obtain a copy of the License at
22+
* http://www.mozilla.org/MPL/
23+
*
24+
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY
25+
* OF ANY KIND, either express or implied. See the LGPL or the MPL for
26+
* the specific language governing rights and limitations.
27+
*
28+
* The Original Code is the cairo graphics library.
29+
*
30+
* The Initial Developer of the Original Code is Chris Wilson
31+
*
32+
* Contributor(s):
33+
* Chris Wilson <chris@chris-wilson.co.uk>
34+
*/
35+
36+
#ifndef CAIRO_SCRIPT_H
37+
#define CAIRO_SCRIPT_H
38+
39+
#include "cairo.h"
40+
41+
#if CAIRO_HAS_SCRIPT_SURFACE
42+
43+
CAIRO_BEGIN_DECLS
44+
45+
/**
46+
* cairo_script_mode_t:
47+
* @CAIRO_SCRIPT_MODE_ASCII: the output will be in readable text (default). (Since 1.12)
48+
* @CAIRO_SCRIPT_MODE_BINARY: the output will use byte codes. (Since 1.12)
49+
*
50+
* A set of script output variants.
51+
*
52+
* Since: 1.12
53+
**/
54+
typedef enum {
55+
CAIRO_SCRIPT_MODE_ASCII,
56+
CAIRO_SCRIPT_MODE_BINARY
57+
} cairo_script_mode_t;
58+
59+
cairo_public cairo_device_t *
60+
cairo_script_create (const char *filename);
61+
62+
cairo_public cairo_device_t *
63+
cairo_script_create_for_stream (cairo_write_func_t write_func,
64+
void *closure);
65+
66+
cairo_public void
67+
cairo_script_write_comment (cairo_device_t *script,
68+
const char *comment,
69+
int len);
70+
71+
cairo_public void
72+
cairo_script_set_mode (cairo_device_t *script,
73+
cairo_script_mode_t mode);
74+
75+
cairo_public cairo_script_mode_t
76+
cairo_script_get_mode (cairo_device_t *script);
77+
78+
cairo_public cairo_surface_t *
79+
cairo_script_surface_create (cairo_device_t *script,
80+
cairo_content_t content,
81+
double width,
82+
double height);
83+
84+
cairo_public cairo_surface_t *
85+
cairo_script_surface_create_for_target (cairo_device_t *script,
86+
cairo_surface_t *target);
87+
88+
cairo_public cairo_status_t
89+
cairo_script_from_recording_surface (cairo_device_t *script,
90+
cairo_surface_t *recording_surface);
91+
92+
CAIRO_END_DECLS
93+
94+
#else /*CAIRO_HAS_SCRIPT_SURFACE*/
95+
# error Cairo was not compiled with support for the CairoScript backend
96+
#endif /*CAIRO_HAS_SCRIPT_SURFACE*/
97+
98+
#endif /*CAIRO_SCRIPT_H*/

0 commit comments

Comments
 (0)