| 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" |
| 11 #include "embedders/openglui/common/isized.h" | 11 #include "embedders/openglui/common/isized.h" |
| 12 #include "include/dart_api.h" | 12 #include "include/dart_api.h" |
| 13 | 13 |
| 14 class VMGlue { | 14 class VMGlue { |
| 15 public: | 15 public: |
| 16 explicit VMGlue(ISized* surface, | 16 explicit VMGlue(ISized* surface, |
| 17 const char* script_path, | 17 const char* script_path, |
| 18 const char* extension_script = NULL, | 18 const char* extension_script = NULL, |
| 19 const char* main_script = NULL); | 19 const char* main_script = NULL, |
| 20 int setup_flag = 0); |
| 20 ~VMGlue() { | 21 ~VMGlue() { |
| 21 delete[] main_script_; | 22 delete[] main_script_; |
| 22 delete[] extension_script_; | 23 delete[] extension_script_; |
| 23 } | 24 } |
| 24 | 25 |
| 25 int InitializeVM(); | 26 int InitializeVM(); |
| 26 int StartMainIsolate(); | 27 int StartMainIsolate(); |
| 27 int CallSetup(bool force = false); | 28 int CallSetup(bool force = false); |
| 28 int CallUpdate(); | 29 int CallUpdate(); |
| 29 int CallShutdown(); | 30 int CallShutdown(); |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 static void ShutdownIsolate(void* callback_data); | 64 static void ShutdownIsolate(void* callback_data); |
| 64 | 65 |
| 65 static bool initialized_vm_; | 66 static bool initialized_vm_; |
| 66 static char* extension_script_; | 67 static char* extension_script_; |
| 67 ISized* surface_; | 68 ISized* surface_; |
| 68 Dart_Isolate isolate_; | 69 Dart_Isolate isolate_; |
| 69 bool initialized_script_; | 70 bool initialized_script_; |
| 70 char* main_script_; | 71 char* main_script_; |
| 71 float x_, y_, z_; // Last values from accelerometer. | 72 float x_, y_, z_; // Last values from accelerometer. |
| 72 bool accelerometer_changed_; | 73 bool accelerometer_changed_; |
| 74 int setup_flag_; |
| 73 }; | 75 }; |
| 74 | 76 |
| 75 #endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ | 77 #endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ |
| 76 | 78 |
| OLD | NEW |