Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for BackgroundAssets framework #357

Merged
merged 2 commits into from
Jan 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions crates/header-translator/framework-includes.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@

#import <Metal/Metal.h>

#import <BackgroundAssets/BackgroundAssets.h>

#import <WebKit/WebKit.h>
2 changes: 2 additions & 0 deletions crates/header-translator/src/data/BackgroundAssets.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
data! {
}
1 change: 1 addition & 0 deletions crates/header-translator/src/data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ mod macros;
data! {
mod AppKit;
mod AuthenticationServices;
mod BackgroundAssets;
mod CoreAnimation;
mod CoreData;
mod Foundation;
Expand Down
3 changes: 3 additions & 0 deletions crates/header-translator/translation-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ imports = ["AppKit", "CoreData", "Foundation"]
[library.AuthenticationServices]
imports = ["AuthenticationServices", "Foundation"]

[library.BackgroundAssets]
imports = ["BackgroundAssets", "Foundation"]

[library.WebKit]
imports = ["WebKit", "AppKit", "Foundation"]

Expand Down
19 changes: 17 additions & 2 deletions crates/icrate/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ AuthenticationServices = [
# Temporary, since some structs and statics use these
"Foundation_NSURL",
]
BackgroundAssets = ["Foundation"]
CoreAnimation = ["Foundation"]
CoreData = [
"Foundation",
Expand Down Expand Up @@ -175,14 +176,15 @@ WebKit = [
]

# Helps with CI
unstable-frameworks-all = ["unstable-frameworks-ios", "unstable-frameworks-macos-12"]
unstable-frameworks-all = ["unstable-frameworks-ios", "unstable-frameworks-macos-13"]
unstable-frameworks-gnustep = ["AppKit_all", "Foundation_all"]
unstable-frameworks-gnustep-32bit = ["Foundation_all"]
unstable-frameworks-ios = ["AuthenticationServices_all", "CoreData_all", "CoreAnimation_all", "Foundation_all", "Metal_all", "WebKit_all"]
unstable-frameworks-ios = ["AuthenticationServices_all", "BackgroundAssets_all", "CoreData_all", "CoreAnimation_all", "Foundation_all", "Metal_all", "WebKit_all"]
unstable-frameworks-macos-10-7 = ["AppKit_all", "CoreAnimation_all", "CoreData_all", "Foundation_all", "WebKit_all"]
unstable-frameworks-macos-10-13 = ["unstable-frameworks-macos-10-7"]
unstable-frameworks-macos-11 = ["unstable-frameworks-macos-10-13", "AuthenticationServices_all", "Metal_all"]
unstable-frameworks-macos-12 = ["unstable-frameworks-macos-11"]
unstable-frameworks-macos-13 = ["unstable-frameworks-macos-12", "BackgroundAssets_all"]

# Temporary fixes until we can autogenerate these
Foundation_NSProxy = []
Expand Down Expand Up @@ -1176,6 +1178,19 @@ AuthenticationServices_all = [
"AuthenticationServices_ASWebAuthenticationSessionRequest",
"AuthenticationServices_ASWebAuthenticationSessionWebBrowserSessionManager",
]
BackgroundAssets_BAAppExtensionInfo = []
BackgroundAssets_BADownload = []
BackgroundAssets_BADownloadManager = []
BackgroundAssets_BAURLDownload = [
"BackgroundAssets_BADownload",
]
BackgroundAssets_all = [
"BackgroundAssets",
"BackgroundAssets_BAAppExtensionInfo",
"BackgroundAssets_BADownload",
"BackgroundAssets_BADownloadManager",
"BackgroundAssets_BAURLDownload",
]
CoreAnimation_CAAnimation = []
CoreAnimation_CAAnimationGroup = [
"CoreAnimation_CAAnimation",
Expand Down
7 changes: 7 additions & 0 deletions crates/icrate/src/BackgroundAssets/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#[path = "../generated/BackgroundAssets/mod.rs"]
mod generated;

pub use self::generated::*;

#[link(name = "BackgroundAssets", kind = "framework")]
extern "C" {}
2 changes: 1 addition & 1 deletion crates/icrate/src/generated
2 changes: 2 additions & 0 deletions crates/icrate/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ mod macros;
pub mod AppKit;
#[cfg(feature = "AuthenticationServices")]
pub mod AuthenticationServices;
#[cfg(feature = "BackgroundAssets")]
pub mod BackgroundAssets;
#[cfg(feature = "CoreAnimation")]
pub mod CoreAnimation;
#[cfg(feature = "CoreData")]
Expand Down