class EE::Window::PlatformHelper¶
Overview¶
#include <platformhelper.hpp> class PlatformHelper { public: // construction virtual ~PlatformHelper(); // methods virtual bool openURL(const std::string& url) = 0; virtual char* iconv(const char* tocode, const char* fromcode, const char* inbuf, size_t inbytesleft) = 0; virtual void iconvFree(char* buf) = 0; virtual bool setNativeScrollMomentumEnabled(bool enabled); virtual bool setWindowTitleBarSeparatorVisible(void* window, bool visible); virtual bool setWindowTitleBarColor(void* window, Uint8 red, Uint8 green, Uint8 blue); virtual void* getActivity() = 0; virtual void* getJNIEnv() = 0; virtual std::string getExternalStoragePath() = 0; virtual std::string getInternalStoragePath() = 0; virtual std::string getApkPath() = 0; virtual bool isExternalStorageReadable() = 0; virtual bool isExternalStorageWritable() = 0; };
Detailed Documentation¶
Methods¶
virtual bool openURL(const std::string& url) = 0
Open a URL in a separate, system-provided application.
Returns:
true if success
virtual bool setNativeScrollMomentumEnabled(bool enabled)
Enables or disables momentum generated by the native window system for scroll devices.
Returns:
true when the platform supports changing this setting.
virtual bool setWindowTitleBarSeparatorVisible(void* window, bool visible)
Controls the native separator below a window title bar.
Returns:
true when the platform and window support changing this setting.
virtual bool setWindowTitleBarColor(void* window, Uint8 red, Uint8 green, Uint8 blue)
Sets a native window title bar color from 8-bit RGB components.
Returns:
true when the platform and window support changing this setting.
virtual void* getActivity() = 0
Returns:
The Activity object for the application
virtual void* getJNIEnv() = 0
Returns:
The JNI environment for the current thread
virtual std::string getExternalStoragePath() = 0
Returns:
The path used for external storage for this application. This path is unique to your application, but is public and can be written to by other applications.
virtual std::string getInternalStoragePath() = 0
Returns:
The path used for internal storage for this application. This path is unique to your application and cannot be written to by other applications.
virtual std::string getApkPath() = 0
Returns:
The application APK file path
virtual bool isExternalStorageReadable() = 0
Returns:
True if the external storage is readable.
virtual bool isExternalStorageWritable() = 0
Returns:
True if the external storage is writeable.