| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ | 5 #ifndef EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ |
| 6 #define EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ | 6 #define EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ |
| 7 | 7 |
| 8 #include <stdlib.h> | 8 #include <stdlib.h> |
| 9 | 9 |
| 10 #include "embedders/openglui/common/events.h" | 10 #include "embedders/openglui/common/events.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 void FinishMainIsolate(); | 45 void FinishMainIsolate(); |
| 46 | 46 |
| 47 private: | 47 private: |
| 48 int Invoke(const char *function, int argc, Dart_Handle* args, | 48 int Invoke(const char *function, int argc, Dart_Handle* args, |
| 49 bool failIfNotDefined = true); | 49 bool failIfNotDefined = true); |
| 50 | 50 |
| 51 static Dart_Handle CheckError(Dart_Handle); | 51 static Dart_Handle CheckError(Dart_Handle); |
| 52 | 52 |
| 53 static bool CreateIsolateAndSetupHelper(const char* script_uri, | 53 static Dart_Isolate CreateIsolateAndSetupHelper(const char* script_uri, |
| 54 const char* main, | 54 const char* main, |
| 55 void* data, | 55 void* data, |
| 56 char** error); | 56 char** error); |
| 57 static bool CreateIsolateAndSetup(const char* script_uri, | 57 static Dart_Isolate CreateIsolateAndSetup(const char* script_uri, |
| 58 const char* main, | 58 const char* main, |
| 59 void* data, char** error); | 59 void* data, char** error); |
| 60 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, | 60 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, |
| 61 Dart_Handle library, | 61 Dart_Handle library, |
| 62 Dart_Handle urlHandle); | 62 Dart_Handle urlHandle); |
| 63 static Dart_Handle LoadSourceFromFile(const char* url); | 63 static Dart_Handle LoadSourceFromFile(const char* url); |
| 64 static void ShutdownIsolate(void* callback_data); | 64 static void ShutdownIsolate(void* callback_data); |
| 65 | 65 |
| 66 static bool initialized_vm_; | 66 static bool initialized_vm_; |
| 67 static char* extension_script_; | 67 static char* extension_script_; |
| 68 ISized* surface_; | 68 ISized* surface_; |
| 69 Dart_Isolate isolate_; | 69 Dart_Isolate isolate_; |
| 70 bool initialized_script_; | 70 bool initialized_script_; |
| 71 char* main_script_; | 71 char* main_script_; |
| 72 float x_, y_, z_; // Last values from accelerometer. | 72 float x_, y_, z_; // Last values from accelerometer. |
| 73 bool accelerometer_changed_; | 73 bool accelerometer_changed_; |
| 74 int setup_flag_; | 74 int setup_flag_; |
| 75 }; | 75 }; |
| 76 | 76 |
| 77 #endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ | 77 #endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ |
| 78 | 78 |
| OLD | NEW |