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

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
« no previous file with comments | « samples/android_sample/jni/types.h ('k') | samples/android_sample/jni/vm_glue.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #ifndef VM_GLUE_H
2 #define VM_GLUE_H
3
4 #include <android_native_app_glue.h>
5 #include "bin/dartutils.h"
6 #include "include/dart_api.h"
7 #include "jni/graphics.h"
8
9 class VMGlue {
10 public:
11 explicit VMGlue(Graphics* graphics);
12
13 int InitializeVM();
14 int StartMainIsolate();
15 int CallSetup();
16 int CallUpdate();
17 int OnMotionEvent(const char* function, int64_t when,
18 float move_x, float move_y);
19 int OnKeyEvent(const char* function, int64_t when, int32_t flags,
20 int32_t key_code, int32_t meta_state, int32_t repeat);
21 void FinishMainIsolate();
22
23 private:
24 int Invoke(const char *function, int argc, Dart_Handle* args);
25
26 static int ErrorExit(const char* format, ...);
27 static Dart_Handle SetupRuntimeOptions(CommandLineOptions* options,
28 const char* executable_name,
29 const char* script_name);
30 static bool CreateIsolateAndSetupHelper(const char* script_uri,
31 const char* main,
32 void* data,
33 char** error);
34 static bool CreateIsolateAndSetup(const char* script_uri,
35 const char* main,
36 void* data, char** error);
37 static void ShutdownIsolate(void* callback_data);
38
39 Graphics* graphics_;
40 Dart_Isolate isolate_;
41 bool initialized_vm_;
42 bool initialized_script_;
43 };
44
45 #endif
46
OLDNEW
« no previous file with comments | « samples/android_sample/jni/types.h ('k') | samples/android_sample/jni/vm_glue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698