Skip to content

Commit d3cde26

Browse files
authored
Merge pull request #1423 from gtk-rs/bilelmoussaoui/stop-renaming-ffi
Stop renaming ffi crates
2 parents a82a644 + 20de755 commit d3cde26

File tree

451 files changed

+655
-548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

451 files changed

+655
-548
lines changed

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ gio-sys = { path = "gio/sys", version = "0.20" }
4848
gio = { path = "gio", version = "0.20" }
4949
pango-sys = { path = "pango/sys", version = "0.20" }
5050
pango = { path = "pango", version = "0.20" }
51+
pangocairo-sys = { path = "pangocairo/sys", version = "0.20" }
5152
cairo-sys-rs = { path = "cairo/sys", version = "0.20" }
5253
cairo-rs = { path = "cairo", version = "0.20" }
5354
glib-macros = { path = "glib-macros", version = "0.20" }
55+
gdk-pixbuf-sys = { path = "gdk-pixbuf/sys", version = "0.20" }
56+
graphene-sys = { path = "graphene/sys", version = "0.20" }

cairo/Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,26 +17,26 @@ version.workspace = true
1717
name = "cairo"
1818

1919
[features]
20-
png = ["ffi/png"]
21-
pdf = ["ffi/pdf"]
22-
svg = ["ffi/svg"]
23-
ps = ["ffi/ps"]
24-
use_glib = ["glib", "ffi/use_glib"]
25-
v1_16 = ["ffi/v1_16"]
26-
v1_18 = ["v1_16", "ffi/v1_18"]
20+
png = ["cairo-sys-rs/png"]
21+
pdf = ["cairo-sys-rs/pdf"]
22+
svg = ["cairo-sys-rs/svg"]
23+
ps = ["cairo-sys-rs/ps"]
24+
use_glib = ["glib", "cairo-sys-rs/use_glib"]
25+
v1_16 = ["cairo-sys-rs/v1_16"]
26+
v1_18 = ["v1_16", "cairo-sys-rs/v1_18"]
2727
default = ["use_glib"]
28-
freetype = ["ffi/freetype", "freetype-rs"]
29-
script = ["ffi/script"]
30-
xcb = ["ffi/xcb"]
31-
xlib = ["ffi/xlib"]
32-
win32-surface = ["ffi/win32-surface"]
28+
freetype = ["cairo-sys-rs/freetype", "freetype-rs"]
29+
script = ["cairo-sys-rs/script"]
30+
xcb = ["cairo-sys-rs/xcb"]
31+
xlib = ["cairo-sys-rs/xlib"]
32+
win32-surface = ["cairo-sys-rs/win32-surface"]
3333

3434
[dependencies.glib]
3535
optional = true
3636
workspace = true
3737

3838
[dependencies]
39-
ffi = { package = "cairo-sys-rs", path = "sys", version = "0.20" }
39+
cairo-sys-rs.workspace = true
4040
libc.workspace = true
4141
bitflags.workspace = true
4242
thiserror.workspace = true

cairo/src/context.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ use std::{ffi::CString, fmt, mem::MaybeUninit, ops, ptr, slice};
88
use glib::translate::*;
99

1010
use crate::{
11-
ffi::{cairo_rectangle_list_t, cairo_t},
12-
utils::status_to_result,
13-
Antialias, Content, Error, FillRule, FontExtents, FontFace, FontOptions, FontSlant, FontWeight,
14-
Glyph, LineCap, LineJoin, Matrix, Operator, Path, Pattern, Rectangle, ScaledFont, Surface,
15-
TextCluster, TextClusterFlags, TextExtents,
11+
ffi, utils::status_to_result, Antialias, Content, Error, FillRule, FontExtents, FontFace,
12+
FontOptions, FontSlant, FontWeight, Glyph, LineCap, LineJoin, Matrix, Operator, Path, Pattern,
13+
Rectangle, ScaledFont, Surface, TextCluster, TextClusterFlags, TextExtents,
1614
};
1715

1816
pub struct RectangleList {
19-
ptr: *mut cairo_rectangle_list_t,
17+
ptr: *mut ffi::cairo_rectangle_list_t,
2018
}
2119

2220
impl ops::Deref for RectangleList {
@@ -55,7 +53,8 @@ impl fmt::Debug for RectangleList {
5553

5654
#[derive(Debug)]
5755
#[repr(transparent)]
58-
pub struct Context(ptr::NonNull<cairo_t>);
56+
#[doc(alias = "cairo_t")]
57+
pub struct Context(ptr::NonNull<ffi::cairo_t>);
5958

6059
#[cfg(feature = "use_glib")]
6160
#[cfg_attr(docsrs, doc(cfg(feature = "use_glib")))]
@@ -112,7 +111,7 @@ impl FromGlibPtrFull<*mut ffi::cairo_t> for Context {
112111
#[cfg(feature = "use_glib")]
113112
gvalue_impl!(
114113
Context,
115-
cairo_t,
114+
ffi::cairo_t,
116115
ffi::gobject::cairo_gobject_context_get_type
117116
);
118117

cairo/src/device.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use std::ptr;
1111
#[cfg(feature = "use_glib")]
1212
use glib::translate::*;
1313

14-
use crate::{utils::status_to_result, DeviceType, Error};
14+
use crate::{ffi, utils::status_to_result, DeviceType, Error};
1515
#[cfg(feature = "script")]
1616
use crate::{Content, RecordingSurface, ScriptMode, Surface};
1717

cairo/src/enums.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::fmt::Debug;
55
#[cfg(feature = "use_glib")]
66
use glib::translate::*;
77

8-
use crate::Error;
8+
use crate::{ffi, Error};
99

1010
// Helper macro for our GValue related trait impls
1111
#[cfg(feature = "use_glib")]

cairo/src/error.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use std::{fmt::Debug, io};
44

5+
use crate::ffi;
56
use thiserror::Error;
67

78
#[derive(Error, Debug, Clone, PartialEq, Copy, Eq)]

cairo/src/font/font_extents.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

3+
use crate::ffi;
34
use std::fmt;
45

56
#[derive(Clone, Copy)]

cairo/src/font/font_face.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use glib::translate::*;
1111

1212
#[cfg(feature = "freetype")]
1313
use crate::FtSynthesize;
14-
use crate::{utils::status_to_result, Error, FontSlant, FontType, FontWeight};
14+
use crate::{ffi, utils::status_to_result, Error, FontSlant, FontType, FontWeight};
1515

1616
#[cfg(feature = "freetype")]
1717
static FT_FACE_KEY: crate::UserDataKey<freetype::face::Face> = crate::UserDataKey::new();

cairo/src/font/font_options.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ use glib::translate::*;
1111

1212
#[cfg(feature = "v1_16")]
1313
use crate::font::font_face::to_optional_string;
14-
use crate::{utils::status_to_result, Antialias, Error, HintMetrics, HintStyle, SubpixelOrder};
14+
use crate::{
15+
ffi, utils::status_to_result, Antialias, Error, HintMetrics, HintStyle, SubpixelOrder,
16+
};
1517

1618
#[cfg(feature = "use_glib")]
1719
glib::wrapper! {

cairo/src/font/glyph.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// Take a look at the license at the top of the repository in the LICENSE file.
22

3+
use crate::ffi;
34
use std::fmt;
45

56
#[derive(Clone, Copy)]

0 commit comments

Comments
 (0)