savedStateSize = 0;
}
- void Create()
+ public void Create()
{
int msgpipe[2];
if(pipe(msgpipe))
if(androidActivity.ident < 0)
androidActivity.ident = (LooperID)ALooper_pollAll(0, null, &androidActivity.events, (void**)&androidActivity.source);
+
+ if(gotInit && androidActivity.window)
+ {
+ int w = ANativeWindow_getWidth(androidActivity.window);
+ int h = ANativeWindow_getHeight(androidActivity.window);
+ if(desktopW != w || desktopH != h)
+ {
+ guiApp.SetDesktopPosition(0, 0, w, h, true);
+ desktopW = w;
+ desktopH = h;
+ guiApp.desktop.Update(null);
+ }
+ }
+
while(androidActivity.ident >= 0)
{
AndroidPollSource source = androidActivity.source;
}
}
*/
- if(gotInit && androidActivity.window)
- {
- int w = ANativeWindow_getWidth(androidActivity.window);
- int h = ANativeWindow_getHeight(androidActivity.window);
- if(desktopW != w || desktopH != h)
- {
- guiApp.SetDesktopPosition(0, 0, w, h, true);
- desktopW = w;
- desktopH = h;
- guiApp.desktop.Update(null);
- }
- }
eventAvailable = true;
if(androidActivity.destroyRequested)
}
- char ** GraphicsDrivers(int * numDrivers)
+ const char ** GraphicsDrivers(int * numDrivers)
{
- static char *graphicsDrivers[] = { "OpenGL" };
+ static const char *graphicsDrivers[] = { "OpenGL" };
*numDrivers = sizeof(graphicsDrivers) / sizeof(char *);
- return (char **)graphicsDrivers;
+ return (const char **)graphicsDrivers;
}
void GetCurrentMode(bool * fullScreen, int * resolution, int * colorDepth, int * refreshRate)
// -- Window manipulation ---
- void SetRootWindowCaption(Window window, char * name)
+ void SetRootWindowCaption(Window window, const char * name)
{
}
// -- Mouse cursor ---
- void SetMouseCursor(int cursor)
+ void SetMouseCursor(Window window, int cursor)
{
if(cursor == -1)
{
if(window && window.windowData)
{
}
- }
+ }
void ClearClipboard()
{
{
bool result = false;
if((clipBoard.text = new0 byte[size]))
- result = true;
+ result = true;
return result;
}
void SetTimerResolution(uint hertz)
{
// timerDelay = hertz ? (1000000 / hertz) : MAXINT;
- }
+ }
bool SetIcon(Window window, BitmapResource resource)
{
//PrintLn("Got a motion input event: ", action);
/*
if(action == 8) //AMOTION_EVENT_ACTION_SCROLL)
- axis = AMotionEvent_getAxisValue(event, 9, index); //AMOTION_EVENT_AXIS_VSCROLL);
+ axis = AMotionEvent_getAxisValue(event, 9, index); //AMOTION_EVENT_AXIS_VSCROLL);
*/
AInputQueue_finishEvent(inputQueue, event, 1);
{
Module app;
-
+
// Evolve the Application class into a GuiApplication
eInstance_Evolve((Instance *)&__androidCurrentModule, class(GuiApplication));