Skip to content

Commit

Permalink
Merge pull request #355 from silvanshade/webkit
Browse files Browse the repository at this point in the history
Webkit
  • Loading branch information
madsmtm authored Jan 18, 2023
2 parents c5fd147 + 1485677 commit 01778b4
Show file tree
Hide file tree
Showing 12 changed files with 658 additions and 5 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 @@ -19,3 +19,5 @@
#import <AuthenticationServices/AuthenticationServices.h>

#import <Metal/Metal.h>

#import <WebKit/WebKit.h>
2 changes: 2 additions & 0 deletions crates/header-translator/src/data/WebKit.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 @@ -10,4 +10,5 @@ data! {
mod CoreData;
mod Foundation;
mod Metal;
mod WebKit;
}
21 changes: 21 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.WebKit]
imports = ["WebKit", "AppKit", "Foundation"]

###
### Attributes that change a function/method's calling convention.
###
Expand Down Expand Up @@ -337,6 +340,8 @@ skipped = true
skipped = true
[protocol.NSWindowRestoration.methods.restoreWindowWithIdentifier_state_completionHandler]
skipped = true
[protocol.WebPlugInViewFactory.methods.plugInViewWithArguments]
skipped = true

# Custom implementation for now
[struct.NSRange]
Expand Down Expand Up @@ -827,3 +832,19 @@ skipped = true
skipped = true
[fn.MTLPackedFloat3Make]
skipped = true

# Needs `JSGlobalContextRef` from JavaScriptCore
[class.WebFrame.methods.globalContext]
skipped = true
# Needs `JSObjectRef` from JavaScriptCore
[class.WebScriptObject.methods.JSObject]
skipped = true

# error: translator assertion failure: invalid error nullability (left: Unspecified) (Right: Nullable)
[class.WebHistory.methods]
loadFromURL_error = { skipped = true }
saveToURL_error = { skipped = true }

[class.WKWebView.methods]
# uses `SecTrustRef` from Security.framework (not yet translated)
serverTrust = { skipped = true }
Loading

0 comments on commit 01778b4

Please sign in to comment.