Skip to content

Commit

Permalink
Avoid exposing OSType in objc2-foundation
Browse files Browse the repository at this point in the history
  • Loading branch information
madsmtm committed Dec 10, 2024
1 parent bfd6600 commit 146f44f
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions framework-crates/objc2-core-ml/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

#[allow(unused)]
pub(crate) type OSType = u32;
1 change: 1 addition & 0 deletions framework-crates/objc2-core-ml/translation-config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
framework = "CoreML"
crate = "objc2-core-ml"
required-dependencies = ["objc2-foundation"]
custom-lib-rs = true
macos = "10.13"
maccatalyst = "10.13"
ios = "11.0"
Expand Down
3 changes: 3 additions & 0 deletions framework-crates/objc2-file-provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

#[allow(unused)]
pub(crate) type OSType = u32;
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
framework = "FileProvider"
crate = "objc2-file-provider"
required-dependencies = ["objc2-foundation"]
custom-lib-rs = true
macos = "10.15"
ios = "11.0"
visionos = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion framework-crates/objc2-foundation/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,6 @@ pub(crate) type Boolean = u8; // unsigned char
#[allow(unused)]
pub(crate) type FourCharCode = u32;
#[allow(unused)]
pub type OSType = FourCharCode;
pub(crate) type OSType = FourCharCode;
#[allow(unused)]
pub(crate) type UTF32Char = u32; // Or maybe Rust's char?
3 changes: 3 additions & 0 deletions framework-crates/objc2-osa-kit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

#[allow(unused)]
pub(crate) type OSType = u32;
1 change: 1 addition & 0 deletions framework-crates/objc2-osa-kit/translation-config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
framework = "OSAKit"
crate = "objc2-osa-kit"
required-dependencies = ["objc2-app-kit", "objc2-foundation"]
custom-lib-rs = true
macos = "10.4"

# Needs `Component` from Core Services / Carbon Core / Component Manager
Expand Down
3 changes: 3 additions & 0 deletions framework-crates/objc2-screen-capture-kit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

#[allow(unused)]
pub(crate) type OSType = u32;
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
framework = "ScreenCaptureKit"
crate = "objc2-screen-capture-kit"
required-dependencies = ["objc2-foundation"]
custom-lib-rs = true
macos = "12.3"

# Needs `dispatch_queue_t`
Expand Down
3 changes: 3 additions & 0 deletions framework-crates/objc2-vision/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@ extern crate std;
mod generated;
#[allow(unused_imports, unreachable_pub)]
pub use self::generated::*;

#[allow(unused)]
pub(crate) type OSType = u32;
1 change: 1 addition & 0 deletions framework-crates/objc2-vision/translation-config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
framework = "Vision"
crate = "objc2-vision"
required-dependencies = ["objc2-foundation"]
custom-lib-rs = true
macos = "10.13"
maccatalyst = "13.0"
ios = "11.0"
Expand Down

0 comments on commit 146f44f

Please sign in to comment.