Created
June 12, 2014 04:42
-
-
Save kuwabarahiroshi/22ee19e620110b40b15d to your computer and use it in GitHub Desktop.
ApiDefinition.cs for WebViewJavascriptBridge
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using MonoTouch.ObjCRuntime; | |
using MonoTouch.Foundation; | |
using MonoTouch.UIKit; | |
namespace CocoaPods | |
{ | |
delegate void WVJBResponseCallback (NSObject responseData); | |
delegate void WVJBHandler (NSObject data, [BlockCallback] WVJBResponseCallback responseCallback); | |
[BaseType (typeof(NSObject))] | |
interface WebViewJavascriptBridge : IUIWebViewDelegate | |
{ | |
[Static, Export ("bridgeForWebView:handler:")] | |
WebViewJavascriptBridge BridgeForWebView (UIWebView webView, WVJBHandler handler); | |
[Static, Export ("bridgeForWebView:webViewDelegate:handler:")] | |
WebViewJavascriptBridge BridgeForWebView (UIWebView webView, NSObject webViewDelegate, WVJBHandler handler); | |
[Static, Export ("enableLogging")] | |
void EnableLogging (); | |
[Export ("send:")] | |
void Send (NSObject message); | |
[Export ("send:responseCallback:")] | |
void Send (NSObject message, WVJBResponseCallback responseCallback); | |
[Export ("registerHandler:handler:")] | |
void RegisterHandler (string handlerName, WVJBHandler handler); | |
[Export ("callHandler:")] | |
void CallHandler (string handlerName); | |
[Export ("callHandler:data:")] | |
void CallHandler (string handlerName, NSObject data); | |
[Export ("callHandler:data:responseCallback:")] | |
void CallHandler (string handlerName, NSObject data, WVJBResponseCallback responseCallback); | |
[Export ("reset")] | |
void Reset (); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment