AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
00001 // 00002 // 00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine 00004 // 00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk 00006 // 00007 // For updates, tutorials and more details check out www.appeasymobile.com 00008 // 00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin. 00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support 00011 // 00012 // 00013 00014 #if !defined(_CCZ_PLATFORM_UI_H_) 00015 #define _CCZ_PLATFORM_UI_H_ 00016 00017 #include "IzPlatformUI.h" 00018 #include "CzTypes.h" 00019 00020 class CzPlatformUI: public IzPlatformUI 00021 { 00022 protected: 00023 struct WebViewData 00024 { 00025 CzUIWebView* ui_view; 00026 CzWebView view; 00027 int x, y, w, h; 00028 WebViewData(CzWebView v, int x, int y, int w, int h) { view = v; this->x = x; this->y = y; this->w = w; this->h = h; ui_view = NULL; } 00029 }; 00030 00031 // Properties 00032 protected: 00033 CzList<WebViewData*>* WebViews; 00034 public: 00035 // Properties end 00036 00037 protected: 00038 public: 00039 CzPlatformUI() : WebViews(NULL) {} 00040 int Init(); 00041 void Release(); 00042 00043 // Web view 00044 bool isWebViewAvailable() const; 00045 CzWebView CreateWebView(bool transparent = false); 00046 bool CreateWebViewModal(const char* uri); 00047 void DestroyWebView(CzWebView web_view); 00048 void NavigateWebView(CzWebView web_view, const char* uri); 00049 void SendJavascriptToWebView(CzWebView web_view, const char* script); 00050 void ShowWebView(CzWebView web_view, bool visible); 00051 void setWebViewDimensions(CzWebView web_view, int x, int y, int w, int h); 00052 void setWebViewUIView(CzWebView web_view, CzUIWebView* ui_view); 00053 00054 // Event notification 00055 void NotifyPageLoaded(CzWebView view, const char* uri); 00056 void NotifyPageLoading(CzWebView view, const char* uri); 00057 void NotifyPageError(CzWebView view, const char* uri); 00058 00059 // Web View Callbacks 00060 static int32 WebViewErrorCallback(CzWebView view, void *systemData, void *userData); 00061 static int32 WebViewStartedLoadingCallback(CzWebView view, void *systemData, void *userData); 00062 static int32 WebViewLoadedCallback(CzWebView view, void *systemData, void *userData); 00063 00064 }; 00065 00066 00067 #endif // _CCZ_PLATFORM_UI_H_