12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- #ifndef __COCOS2D_UI_WEBVIEWIMPL_IOS_H_
- #define __COCOS2D_UI_WEBVIEWIMPL_IOS_H_
- #include <stdint.h>
- #include <iosfwd>
- @class UIWebViewWrapper;
- namespace cocos2d {
-
- class Data;
- class Renderer;
- class Mat4;
-
- namespace experimental {
- namespace ui{
-
- class WebView;
- class WebViewImpl {
- public:
- WebViewImpl(WebView *webView);
- virtual ~WebViewImpl();
- void setJavascriptInterfaceScheme(const std::string &scheme);
- void loadData(const cocos2d::Data &data,
- const std::string &MIMEType,
- const std::string &encoding,
- const std::string &baseURL);
- void loadHTMLString(const std::string &string, const std::string &baseURL);
- void loadURL(const std::string &url);
- void loadURL(const std::string &url, bool cleanCachedData);
- void loadFile(const std::string &fileName);
- void stopLoading();
- void reload();
- bool canGoBack();
- bool canGoForward();
- void goBack();
- void goForward();
- void evaluateJS(const std::string &js);
- void setScalesPageToFit(const bool scalesPageToFit);
- virtual void draw(cocos2d::Renderer *renderer, cocos2d::Mat4 const &transform, uint32_t flags);
- virtual void setVisible(bool visible);
- void setBounces(bool bounces);
- private:
- UIWebViewWrapper *_uiWebViewWrapper;
- WebView *_webView;
- };
- }
- }
- }
- #endif
|