diff --git a/WebKit/WKNavigationDelegate.ml b/WebKit/WKNavigationDelegate.ml new file mode 100644 index 00000000..bb0cff1c --- /dev/null +++ b/WebKit/WKNavigationDelegate.ml @@ -0,0 +1,23 @@ +(* auto-generated, do not modify *) + +[@@@ocaml.warning "-33"] +open Runtime +open Objc + +open CoreFoundation +open CoreGraphics + +let webView'decidePolicyForNavigationAction'decisionHandler' imp = Define.method_spec ~cmd:(selector "webView:decidePolicyForNavigationAction:decisionHandler:") ~typ:(id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v40@0:8@16@24@?32" ~imp +let webView'decidePolicyForNavigationAction'preferences'decisionHandler' imp = Define.method_spec ~cmd:(selector "webView:decidePolicyForNavigationAction:preferences:decisionHandler:") ~typ:(id @-> id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v48@0:8@16@24@32@?40" ~imp +let webView'decidePolicyForNavigationResponse'decisionHandler' imp = Define.method_spec ~cmd:(selector "webView:decidePolicyForNavigationResponse:decisionHandler:") ~typ:(id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v40@0:8@16@24@?32" ~imp +let webView'didStartProvisionalNavigation' imp = Define.method_spec ~cmd:(selector "webView:didStartProvisionalNavigation:") ~typ:(id @-> id @-> returning (void)) ~enc:"v32@0:8@16@24" ~imp +let webView'didReceiveServerRedirectForProvisionalNavigation' imp = Define.method_spec ~cmd:(selector "webView:didReceiveServerRedirectForProvisionalNavigation:") ~typ:(id @-> id @-> returning (void)) ~enc:"v32@0:8@16@24" ~imp +let webView'didFailProvisionalNavigation'withError' imp = Define.method_spec ~cmd:(selector "webView:didFailProvisionalNavigation:withError:") ~typ:(id @-> id @-> id @-> returning (void)) ~enc:"v40@0:8@16@24@32" ~imp +let webView'didCommitNavigation' imp = Define.method_spec ~cmd:(selector "webView:didCommitNavigation:") ~typ:(id @-> id @-> returning (void)) ~enc:"v32@0:8@16@24" ~imp +let webView'didFinishNavigation' imp = Define.method_spec ~cmd:(selector "webView:didFinishNavigation:") ~typ:(id @-> id @-> returning (void)) ~enc:"v32@0:8@16@24" ~imp +let webView'didFailNavigation'withError' imp = Define.method_spec ~cmd:(selector "webView:didFailNavigation:withError:") ~typ:(id @-> id @-> id @-> returning (void)) ~enc:"v40@0:8@16@24@32" ~imp +let webView'didReceiveAuthenticationChallenge'completionHandler' imp = Define.method_spec ~cmd:(selector "webView:didReceiveAuthenticationChallenge:completionHandler:") ~typ:(id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v40@0:8@16@24@?32" ~imp +let webViewWebContentProcessDidTerminate' imp = Define.method_spec ~cmd:(selector "webViewWebContentProcessDidTerminate:") ~typ:(id @-> returning (void)) ~enc:"v24@0:8@16" ~imp +let webView'authenticationChallenge'shouldAllowDeprecatedTLS' imp = Define.method_spec ~cmd:(selector "webView:authenticationChallenge:shouldAllowDeprecatedTLS:") ~typ:(id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v40@0:8@16@24@?32" ~imp +let webView'navigationAction'didBecomeDownload' imp = Define.method_spec ~cmd:(selector "webView:navigationAction:didBecomeDownload:") ~typ:(id @-> id @-> id @-> returning (void)) ~enc:"v40@0:8@16@24@32" ~imp +let webView'navigationResponse'didBecomeDownload' imp = Define.method_spec ~cmd:(selector "webView:navigationResponse:didBecomeDownload:") ~typ:(id @-> id @-> id @-> returning (void)) ~enc:"v40@0:8@16@24@32" ~imp diff --git a/WebKit/WKUIDelegate.ml b/WebKit/WKUIDelegate.ml new file mode 100644 index 00000000..5ee252b1 --- /dev/null +++ b/WebKit/WKUIDelegate.ml @@ -0,0 +1,17 @@ +(* auto-generated, do not modify *) + +[@@@ocaml.warning "-33"] +open Runtime +open Objc + +open CoreFoundation +open CoreGraphics + +let webView'createWebViewWithConfiguration'forNavigationAction'windowFeatures' imp = Define.method_spec ~cmd:(selector "webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:") ~typ:(id @-> id @-> id @-> id @-> returning (id)) ~enc:"@48@0:8@16@24@32@40" ~imp +let webViewDidClose' imp = Define.method_spec ~cmd:(selector "webViewDidClose:") ~typ:(id @-> returning (void)) ~enc:"v24@0:8@16" ~imp +let webView'runJavaScriptAlertPanelWithMessage'initiatedByFrame'completionHandler' imp = Define.method_spec ~cmd:(selector "webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:") ~typ:(id @-> id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v48@0:8@16@24@32@?40" ~imp +let webView'runJavaScriptConfirmPanelWithMessage'initiatedByFrame'completionHandler' imp = Define.method_spec ~cmd:(selector "webView:runJavaScriptConfirmPanelWithMessage:initiatedByFrame:completionHandler:") ~typ:(id @-> id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v48@0:8@16@24@32@?40" ~imp +let webView'runJavaScriptTextInputPanelWithPrompt'defaultText'initiatedByFrame'completionHandler' imp = Define.method_spec ~cmd:(selector "webView:runJavaScriptTextInputPanelWithPrompt:defaultText:initiatedByFrame:completionHandler:") ~typ:(id @-> id @-> id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v56@0:8@16@24@32@40@?48" ~imp +let webView'requestMediaCapturePermissionForOrigin'initiatedByFrame'type'decisionHandler' imp = Define.method_spec ~cmd:(selector "webView:requestMediaCapturePermissionForOrigin:initiatedByFrame:type:decisionHandler:") ~typ:(id @-> id @-> id @-> llong @-> (ptr void) @-> returning (void)) ~enc:"v56@0:8@16@24@32q40@?48" ~imp +let webView'requestDeviceOrientationAndMotionPermissionForOrigin'initiatedByFrame'decisionHandler' imp = Define.method_spec ~cmd:(selector "webView:requestDeviceOrientationAndMotionPermissionForOrigin:initiatedByFrame:decisionHandler:") ~typ:(id @-> id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v48@0:8@16@24@32@?40" ~imp +let webView'runOpenPanelWithParameters'initiatedByFrame'completionHandler' imp = Define.method_spec ~cmd:(selector "webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:") ~typ:(id @-> id @-> id @-> (ptr void) @-> returning (void)) ~enc:"v48@0:8@16@24@32@?40" ~imp diff --git a/WebKit/WebKit.ml b/WebKit/WebKit.ml index 0335669a..5ccf74f4 100644 --- a/WebKit/WebKit.ml +++ b/WebKit/WebKit.ml @@ -74,6 +74,7 @@ module WKNSURLRequest = WKNSURLRequest module WKNavigation = WKNavigation module WKNavigationAction = WKNavigationAction module WKNavigationData = WKNavigationData +module WKNavigationDelegate = WKNavigationDelegate module WKNavigationResponse = WKNavigationResponse module WKNetworkSessionDelegate = WKNetworkSessionDelegate module WKNetworkSessionDelegateAllowingOnlyNonRedirectedJSON = WKNetworkSessionDelegateAllowingOnlyNonRedirectedJSON @@ -143,6 +144,7 @@ module WKTextInputWindowControllerClass = WKTextInputWindowControllerClass module WKTextListTouchBarViewController = WKTextListTouchBarViewController module WKTextTouchBarItemController = WKTextTouchBarItemController module WKTypeRefWrapper = WKTypeRefWrapper +module WKUIDelegate = WKUIDelegate module WKURLSchemeTaskImpl = WKURLSchemeTaskImpl module WKUserContentController = WKUserContentController module WKUserContentControllerClass = WKUserContentControllerClass diff --git a/bin/main.ml b/bin/main.ml index 4c578b25..7f1ca4c9 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -6,6 +6,9 @@ open AppKit let win_width = 400. let win_height = 300. +let m = NSTableViewDelegate.tableViewSelectionDidChange' (fun _self _cmd _tv -> ()) +let _ = Class.define ~methods: [m] "Hola" + let app_window () = let win = alloc NSWindow.self