Skip to content

Commit

Permalink
Merge pull request #357 from silvanshade/background-assets
Browse files Browse the repository at this point in the history
Add support for BackgroundAssets framework
  • Loading branch information
madsmtm authored Jan 19, 2023
2 parents c2fa0ab + 80be8a9 commit 53fff25
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 3 deletions.
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

0 comments on commit 53fff25

Please sign in to comment.