AndroidPlatform

Platform abstraction layer.

Represents application.

Constructors

this
this(android_app* state)
Undocumented in source.

Destructor

~this
~this()
Undocumented in source.

Members

Functions

closeWindow
void closeWindow(Window w)

close window

createWindow
Window createWindow(dstring windowCaption, Window parent, uint flags, uint width, uint height)

create window Args: windowCaption = window caption text parent = parent Window, or null if no parent flags = WindowFlag bit set, combination of Resizable, Modal, Fullscreen width = window width height = window height

drawWindow
void drawWindow(AndroidWindow w)
Undocumented in source. Be warned that the author may not have intended to support it.
enterMessageLoop
int enterMessageLoop()

Starts application message loop.

getClipboardText
dstring getClipboardText(bool mouseBuffer)

retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)

handle_cmd
void handle_cmd(int cmd)

Process the next main command.

handle_input
int handle_input(AInputEvent* event)

Process the next input event.

hasClipboardText
bool hasClipboardText(bool mouseBuffer)

check has clipboard text

initDisplay
int initDisplay()

Initialize an EGL context for the current display.

onThemeChanged
void onThemeChanged()

handle theme change: e.g. reload some themed resources

requestLayout
void requestLayout()

calls request layout for all windows

sendRedrawEvent
void sendRedrawEvent(AndroidWindow w, uint redrawEventCode)
Undocumented in source. Be warned that the author may not have intended to support it.
setClipboardText
void setClipboardText(dstring text, bool mouseBuffer)

sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)

showSoftKeyboard
void showSoftKeyboard(bool shouldShow)
Undocumented in source. Be warned that the author may not have intended to support it.
termDisplay
void termDisplay()

Tear down the EGL context currently associated with the display.

Properties

activeWindow
AndroidWindow activeWindow [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
isAnimationActive
bool isAnimationActive [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_activeWindow
AndroidWindow _activeWindow;
Undocumented in source.
_appFocused
bool _appFocused;
Undocumented in source.
_appstate
android_app* _appstate;
Undocumented in source.
_clipboardText
dstring _clipboardText;
Undocumented in source.
_context
EGLContext _context;
Undocumented in source.
_display
EGLDisplay _display;
Undocumented in source.
_drawbuf
GLDrawBuf _drawbuf;
Undocumented in source.
_engine
engine _engine;
Undocumented in source.
_height
int _height;
Undocumented in source.
_surface
EGLSurface _surface;
Undocumented in source.
_width
int _width;
Undocumented in source.
_windows
AndroidWindow[] _windows;
Undocumented in source.

Inherited Members

From Platform

_instance
Platform _instance;
Undocumented in source.
setInstance
void setInstance(Platform instance)
Undocumented in source. Be warned that the author may not have intended to support it.
instance
Platform instance [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
createWindow
Window createWindow(dstring windowCaption, Window parent, uint flags, uint width, uint height)

create window Args: windowCaption = window caption text parent = parent Window, or null if no parent flags = WindowFlag bit set, combination of Resizable, Modal, Fullscreen width = window width height = window height

GLVersionMajor
int GLVersionMajor;

OpenGL context major version. Note: if the version is invalid or not supported, this value will be set to supported one.

GLVersionMinor
int GLVersionMinor;

OpenGL context minor version. Note: if the version is invalid or not supported, this value will be set to supported one.

multisamples
int multisamples;

OpenGL multisamples amount. Note: 0, 2, 4, 8, or 16 are accepted. TODO: Not supported on Linux

getMultisamples
int getMultisamples()

Returns the amount of multisamples. Returns 0 if no OpenGL support

closeWindow
void closeWindow(Window w)

close window

enterMessageLoop
int enterMessageLoop()

Starts application message loop.

hasClipboardText
bool hasClipboardText(bool mouseBuffer)

check has clipboard text

getClipboardText
dstring getClipboardText(bool mouseBuffer)

retrieves text from clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)

setClipboardText
void setClipboardText(dstring text, bool mouseBuffer)

sets text to clipboard (when mouseBuffer == true, use mouse selection clipboard - under linux)

requestLayout
void requestLayout()

calls request layout for all windows

hasModalWindowsAbove
bool hasModalWindowsAbove(Window w)

returns true if there is some modal window opened above this window, and this window should not process mouse/key input and should not allow closing

_uiLanguage
string _uiLanguage;
Undocumented in source.
uiLanguage
string uiLanguage [@property getter]

returns currently selected UI language code

uiLanguage
string uiLanguage [@property setter]

set UI language (e.g. "en", "fr", "ru") - will relayout content of all windows if language has been changed

_themeId
string _themeId;
Undocumented in source.
uiTheme
string uiTheme [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
uiTheme
string uiTheme [@property setter]

sets application UI theme - will relayout content of all windows if theme has been changed

setDefaultLanguageAndThemeIfNecessary
void setDefaultLanguageAndThemeIfNecessary()

to set uiLanguage and themeId to default (en, theme_default) if not set yet

_uiDialogDisplayMode
ulong _uiDialogDisplayMode;
Undocumented in source.
uiDialogDisplayMode
ulong uiDialogDisplayMode [@property getter]

returns how dialogs should be displayed - as popup or window

uiDialogDisplayMode
ulong uiDialogDisplayMode [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
_resourceDirs
string[] _resourceDirs;
Undocumented in source.
resourceDirs
string[] resourceDirs [@property getter]

returns list of resource directories

resourceDirs
string[] resourceDirs [@property setter]

set list of directories to load resources from

openURL
bool openURL(string url)

open url in external browser

showInFileManager
bool showInFileManager(string pathName)

show directory or file in OS file manager (explorer, finder, etc...)

onThemeChanged
void onThemeChanged()

handle theme change: e.g. reload some themed resources

defaultWindowIcon
string defaultWindowIcon [@property setter]

sets default icon for new created windows

defaultWindowIcon
string defaultWindowIcon [@property getter]

gets default icon for new created windows

iconProvider
IconProviderBase iconProvider [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
iconProvider
IconProviderBase iconProvider [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
~this
~this()
Undocumented in source.

Meta