Skip to content

Commit

Permalink
Adapt to no longer renamed ffi crates
Browse files Browse the repository at this point in the history
  • Loading branch information
bilelmoussaoui committed Jun 1, 2024
1 parent a5217af commit 585bcb7
Show file tree
Hide file tree
Showing 251 changed files with 374 additions and 305 deletions.
3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ libc = "0.2"
pango-sys = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.20", branch = "master", features = ["v1_46"]}
pango = {git = "https://github.com/gtk-rs/gtk-rs-core", version = "0.20", branch = "master", features = ["v1_46"]}
gir-format-check = "^0.1"
gdk4-x11-sys = {path = "gdk4-x11/sys", version = "0.9"}
gdk4-wayland-sys = {path = "gdk4-wayland/sys", version = "0.9"}
gdk4-win32-sys = {path = "gdk4-win32/sys", version = "0.9"}
gdk4-sys = {path = "gdk4/sys", version = "0.9"}
gdk = {package = "gdk4", path = "gdk4", version = "0.9"}
gsk4-sys = {path = "gsk4/sys", version = "0.9"}
Expand Down
10 changes: 5 additions & 5 deletions gdk4-wayland/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@ rust-version.workspace = true
version.workspace = true

[features]
v4_4 = ["ffi/v4_4", "gdk/v4_4"]
v4_10 = ["ffi/v4_10", "v4_4", "gdk/v4_10"]
v4_12 = ["ffi/v4_12", "v4_10", "gdk/v4_12"]
v4_16 = ["ffi/v4_16", "v4_12", "gdk/v4_16"]
v4_4 = ["gdk4-wayland-sys/v4_4", "gdk/v4_4"]
v4_10 = ["gdk4-wayland-sys/v4_10", "v4_4", "gdk/v4_10"]
v4_12 = ["gdk4-wayland-sys/v4_12", "v4_10", "gdk/v4_12"]
v4_16 = ["gdk4-wayland-sys/v4_16", "v4_12", "gdk/v4_16"]
wayland_crate = ["wayland-client", "wayland-backend"]
egl = ["khronos-egl"]

[dependencies]
ffi = {path = "./sys", package = "gdk4-wayland-sys", version = "0.9"}
gdk4-wayland-sys.workspace = true
gdk.workspace= true
gio.workspace = true
glib.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion gdk4-wayland/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#![allow(deprecated)]
#![cfg_attr(docsrs, feature(doc_cfg))]

pub use ffi;
pub use gdk;
pub use gdk4_wayland_sys as ffi;
pub use gio;
pub use glib;
#[cfg(all(feature = "v4_4", feature = "egl"))]
Expand Down
4 changes: 2 additions & 2 deletions gdk4-wayland/src/wayland_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ use wayland_client::{
Proxy,
};

use crate::WaylandDevice;
#[cfg(feature = "wayland_crate")]
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
use crate::prelude::*;
use crate::WaylandDevice;
use crate::{ffi, prelude::*};

impl WaylandDevice {
#[doc(alias = "gdk_wayland_device_get_wl_keyboard")]
Expand Down
3 changes: 3 additions & 0 deletions gdk4-wayland/src/wayland_display.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
// Take a look at the license at the top of the repository in the LICENSE file.

#[cfg(feature = "wayland_crate")]
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
use crate::ffi;
#[cfg(feature = "wayland_crate")]
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
use glib::{prelude::*, translate::*, Quark};
Expand Down
5 changes: 4 additions & 1 deletion gdk4-wayland/src/wayland_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
use wayland_client::{backend::ObjectId, protocol::wl_output::WlOutput, Proxy};
#[cfg(feature = "wayland_crate")]
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
use {crate::prelude::*, glib::translate::*};
use {
crate::{ffi, prelude::*},
glib::translate::*,
};

use crate::WaylandMonitor;

Expand Down
5 changes: 4 additions & 1 deletion gdk4-wayland/src/wayland_seat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
use wayland_client::{backend::ObjectId, protocol::wl_seat::WlSeat, Proxy};
#[cfg(feature = "wayland_crate")]
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
use {crate::prelude::*, glib::translate::*};
use {
crate::{ffi, prelude::*},
glib::translate::*,
};

use crate::WaylandSeat;

Expand Down
2 changes: 1 addition & 1 deletion gdk4-wayland/src/wayland_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use glib::translate::*;
#[cfg_attr(docsrs, doc(cfg(feature = "wayland_crate")))]
use wayland_client::{backend::ObjectId, protocol::wl_surface::WlSurface, Proxy};

use crate::{prelude::*, WaylandSurface};
use crate::{ffi, prelude::*, WaylandSurface};

mod sealed {
pub trait Sealed {}
Expand Down
2 changes: 1 addition & 1 deletion gdk4-wayland/src/wayland_toplevel.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use crate::WaylandToplevel;
use crate::{ffi, WaylandToplevel};
use glib::translate::*;
use std::boxed::Box as Box_;

Expand Down
4 changes: 2 additions & 2 deletions gdk4-win32/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ name = "gtk4-win32"
version = "4"

[features]
v4_4 = ["ffi/v4_4", "gdk/v4_4"]
v4_4 = ["gdk4-win32-sys/v4_4", "gdk/v4_4"]
egl = ["khronos-egl"]
win32 = ["windows"]

[dependencies]
ffi = { path = "./sys", version = "0.9", package = "gdk4-win32-sys"}
gdk4-win32-sys.workspace = true
gdk.workspace = true
gio.workspace = true
glib.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion gdk4-win32/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#![allow(deprecated)]
#![cfg_attr(docsrs, feature(doc_cfg))]

pub use ffi;
pub use gdk;
pub use gdk4_win32_sys as ffi;
pub use gio;
pub use glib;
#[cfg(feature = "win32")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4-win32/src/win32_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use glib::translate::*;
#[cfg_attr(docsrs, doc(cfg(all(feature = "v4_4", feature = "egl"))))]
use khronos_egl as egl;

use crate::{Win32Display, Win32MessageFilterReturn, MSG};
use crate::{ffi, Win32Display, Win32MessageFilterReturn, MSG};

impl Win32Display {
#[cfg(all(feature = "v4_4", feature = "egl"))]
Expand Down
2 changes: 1 addition & 1 deletion gdk4-win32/src/win32_hcursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::ptr::NonNull;

use glib::{translate::*, types::Pointee};

use crate::{prelude::*, Win32HCursor, HCURSOR};
use crate::{ffi, prelude::*, Win32HCursor, HCURSOR};

impl Win32HCursor {
#[doc(alias = "gdk_win32_hcursor_new")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4-win32/src/win32_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use glib::translate::*;

use crate::{prelude::*, Win32Surface, HWND};
use crate::{ffi, prelude::*, Win32Surface, HWND};

impl Win32Surface {
#[doc(alias = "gdk_win32_surface_lookup_for_display")]
Expand Down
8 changes: 4 additions & 4 deletions gdk4-x11/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ rust-version.workspace = true
version.workspace = true

[features]
v4_4 = ["ffi/v4_4", "gdk/v4_4"]
v4_10 = ["ffi/v4_10", "v4_4", "gdk/v4_10"]
v4_16 = ["ffi/v4_16", "v4_10", "gdk/v4_16"]
v4_4 = ["gdk4-x11-sys/v4_4", "gdk/v4_4"]
v4_10 = ["gdk4-x11-sys/v4_10", "v4_4", "gdk/v4_10"]
v4_16 = ["gdk4-x11-sys/v4_16", "v4_10", "gdk/v4_16"]
egl = ["khronos-egl"]
xlib = ["x11"]

[dependencies]
ffi = {path = "./sys", package = "gdk4-x11-sys", version = "0.9"}
gdk4-x11-sys.workspace = true
gdk.workspace = true
gio.workspace = true
glib.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/src/functions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ use glib::translate::*;
use x11::xlib::Atom as XAtom;

pub use crate::auto::functions::*;
use crate::X11Display;
#[cfg(not(feature = "xlib"))]
use crate::XAtom;
use crate::{ffi, X11Display};

#[doc(alias = "gdk_x11_get_xatom_by_name_for_display")]
pub fn x11_get_xatom_by_name_for_display(display: &X11Display, atom_name: impl IntoGStr) -> XAtom {
Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
#![allow(deprecated)]
#![cfg_attr(docsrs, feature(doc_cfg))]

pub use ffi;
pub use gdk;
pub use gdk4_x11_sys as ffi;
pub use gio;
pub use glib;
#[cfg(all(feature = "v4_4", feature = "egl"))]
Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/src/x11_display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use x11::xlib;
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
use x11::xlib::{Cursor as XCursor, Window as XWindow};

use crate::{prelude::*, X11Display};
use crate::{ffi, prelude::*, X11Display};
#[cfg(not(feature = "xlib"))]
use crate::{XCursor, XWindow};

Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/src/x11_monitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use glib::translate::*;
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
use x11::xlib::XID;

use crate::X11Monitor;
#[cfg(not(feature = "xlib"))]
use crate::XID;
use crate::{ffi, X11Monitor};

impl X11Monitor {
#[doc(alias = "gdk_x11_monitor_get_output")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/src/x11_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use glib::translate::*;
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
use x11::xlib::{self, XID};

use crate::X11Screen;
#[cfg(not(feature = "xlib"))]
use crate::XID;
use crate::{ffi, X11Screen};

impl X11Screen {
#[cfg(feature = "xlib")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4-x11/src/x11_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use glib::translate::*;
#[cfg_attr(docsrs, doc(cfg(feature = "xlib")))]
use x11::xlib::Window as XWindow;

use crate::X11Surface;
#[cfg(not(feature = "xlib"))]
use crate::XWindow;
use crate::{ffi, X11Surface};

impl X11Surface {
#[doc(alias = "gdk_x11_surface_get_xid")]
Expand Down
18 changes: 9 additions & 9 deletions gdk4/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ version.workspace = true
name = "gdk4"

[features]
v4_2 = ["ffi/v4_2"]
v4_4 = ["ffi/v4_4", "v4_2"]
v4_6 = ["ffi/v4_6", "v4_4"]
v4_8 = ["ffi/v4_8", "v4_6"]
v4_10 = ["ffi/v4_10", "v4_8"]
v4_12 = ["ffi/v4_12", "v4_10"]
v4_14 = ["ffi/v4_14", "v4_12"]
v4_16 = ["ffi/v4_16", "v4_14"]
v4_2 = ["gdk4-sys/v4_2"]
v4_4 = ["gdk4-sys/v4_4", "v4_2"]
v4_6 = ["gdk4-sys/v4_6", "v4_4"]
v4_8 = ["gdk4-sys/v4_8", "v4_6"]
v4_10 = ["gdk4-sys/v4_10", "v4_8"]
v4_12 = ["gdk4-sys/v4_12", "v4_10"]
v4_14 = ["gdk4-sys/v4_14", "v4_12"]
v4_16 = ["gdk4-sys/v4_16", "v4_14"]
gl = ["dep:gl"]

[dependencies]
ffi = {package = "gdk4-sys", path = "./sys", version = "0.9"}
gdk4-sys.workspace = true
cairo-rs.workspace = true
gdk-pixbuf.workspace = true
gio.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/button_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{ButtonEvent, EventType};

define_event! {
ButtonEvent,
ffi::GdkButtonEvent,
crate::ffi::GdkButtonEvent,
&[EventType::ButtonPress, EventType::ButtonRelease]
}

Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/cairo_interaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use cairo::{Context, Region};
use gdk_pixbuf::Pixbuf;
use glib::translate::*;

use crate::{Rectangle, Surface, RGBA};
use crate::{ffi, Rectangle, Surface, RGBA};

// rustdoc-stripper-ignore-next
/// Trait containing integration methods with [`cairo::Surface`].
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/clipboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{future, pin::Pin, ptr};

use glib::{translate::*, GString};

use crate::{prelude::*, Clipboard};
use crate::{ffi, prelude::*, Clipboard};

impl Clipboard {
#[doc(alias = "gdk_clipboard_read_async")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/content_deserializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use glib::{translate::*, value::FromValue};

use crate::ContentDeserializer;
use crate::{ffi, ContentDeserializer};

impl ContentDeserializer {
pub fn set_value(&self, value: glib::Value) {
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/content_formats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use glib::{translate::*, Slice};

use crate::{ContentFormats, ContentFormatsBuilder};
use crate::{ffi, ContentFormats, ContentFormatsBuilder};

impl ContentFormats {
#[doc(alias = "gdk_content_formats_get_gtypes")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/content_formats_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use glib::translate::*;

use crate::{ContentFormats, ContentFormatsBuilder};
use crate::{ffi, ContentFormats, ContentFormatsBuilder};

impl ContentFormatsBuilder {
#[doc(alias = "gdk_content_formats_builder_add_formats")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/content_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use glib::translate::*;

use crate::{prelude::*, ContentProvider};
use crate::{ffi, prelude::*, ContentProvider};

mod sealed {
pub trait Sealed {}
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/content_serializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use glib::{translate::*, value::FromValue};

use crate::ContentSerializer;
use crate::{ffi, ContentSerializer};

impl ContentSerializer {
#[doc(alias = "gdk_content_serializer_get_priority")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/crossing_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{CrossingEvent, EventType};

define_event! {
CrossingEvent,
ffi::GdkCrossingEvent,
crate::ffi::GdkCrossingEvent,
&[EventType::EnterNotify, EventType::LeaveNotify]
}

Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/cursor.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Take a look at the license at the top of the repository in the LICENSE file.

use crate::{Cursor, Texture};
use crate::{ffi, Cursor, Texture};
use glib::translate::*;
use std::boxed::Box as Box_;

Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/delete_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{DeleteEvent, EventType};

define_event! {
DeleteEvent,
ffi::GdkDeleteEvent,
crate::ffi::GdkDeleteEvent,
&[EventType::Delete]
}

Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/display.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use glib::translate::*;

use crate::{prelude::*, Display, Key, KeymapKey, ModifierType};
use crate::{ffi, prelude::*, Display, Key, KeymapKey, ModifierType};

#[derive(Debug, PartialEq, Eq, Ord, PartialOrd)]
pub enum Backend {
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/dmabuf_texture_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use glib::translate::*;

use crate::{DmabufTextureBuilder, Texture};
use crate::{ffi, DmabufTextureBuilder, Texture};

impl DmabufTextureBuilder {
#[doc(alias = "gdk_dmabuf_texture_builder_build")]
Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/dnd_event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use crate::{DNDEvent, EventType};

define_event! {
DNDEvent,
ffi::GdkDNDEvent,
crate::ffi::GdkDNDEvent,
&[EventType::DragEnter, EventType::DragLeave, EventType::DragMotion, EventType::DropStart]
}

Expand Down
2 changes: 1 addition & 1 deletion gdk4/src/drag_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use glib::{
translate::*,
};

use crate::{prelude::*, DragSurface, DragSurfaceSize};
use crate::{ffi, prelude::*, DragSurface, DragSurfaceSize};

mod sealed {
pub trait Sealed {}
Expand Down
Loading

0 comments on commit 585bcb7

Please sign in to comment.