Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: samples/android_sample/jni/vm_glue.h

Issue 11434046: Android rayshader sample. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 #ifndef VM_GLUE_H
2 #define VM_GLUE_H
3
4 #include <android_native_app_glue.h>
5 #include "include/dart_api.h"
6 #include "bin/dartutils.h"
7 //#include "timer.h"
8 #include "graphics.h"
9 //#include "context.h"
10
11 class VMGlue {
12 public:
13 VMGlue(Graphics* pGraphics);
14
15 int initializeVM();
16 int startMainIsolate();
17 int callSetup();
18 int callUpdate();
19 int onMotionEvent(const char* function, int64_t when,
20 float lMoveX, float lMoveY);
21 int onKeyEvent(const char* pFunction, int64_t pWhen, int32_t pFlags,
22 int32_t pKeyCode, int32_t pMetaState, int32_t pRepeat);
23 void finishMainIsolate();
24
25 private:
26 int invoke(const char *function, int argc, Dart_Handle* args);
27
28 static int ErrorExit(const char* format, ...);
29 static Dart_Handle SetupRuntimeOptions(CommandLineOptions* options,
30 const char* executable_name,
31 const char* script_name);
32 static bool CreateIsolateAndSetupHelper(const char* script_uri,
33 const char* main,
34 void* data,
35 char** error);
36 static bool CreateIsolateAndSetup(const char* script_uri,
37 const char* main,
38 void* data, char** error);
39 static void ShutdownIsolate(void* callback_data);
40
41 Graphics *mGraphics;
42 Dart_Isolate mIsolate;
43 bool mInitializedVM;
44 bool mInitializedScript;
45 };
46
47 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698