| 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 11 matching lines...) Expand all Loading... |
| 22 delete[] extension_script_; | 22 delete[] extension_script_; |
| 23 } | 23 } |
| 24 | 24 |
| 25 int InitializeVM(); | 25 int InitializeVM(); |
| 26 int StartMainIsolate(); | 26 int StartMainIsolate(); |
| 27 int CallSetup(bool force = false); | 27 int CallSetup(bool force = false); |
| 28 int CallUpdate(); | 28 int CallUpdate(); |
| 29 int CallShutdown(); | 29 int CallShutdown(); |
| 30 int OnMotionEvent(const char* funtion, int64_t when, | 30 int OnMotionEvent(const char* funtion, int64_t when, |
| 31 float move_x, float move_y); | 31 float move_x, float move_y); |
| 32 int OnKeyEvent(const char* funtion, int64_t when, int32_t flags, | 32 int OnKeyEvent(const char* funtion, int64_t when, int32_t key_code, |
| 33 int32_t key_code, int32_t meta_state, int32_t repeat); | 33 bool isAltKeyDown, bool isCtrlKeyDown, bool isShiftKeyDown, |
| 34 int32_t repeat); |
| 34 void FinishMainIsolate(); | 35 void FinishMainIsolate(); |
| 35 | 36 |
| 36 private: | 37 private: |
| 37 int Invoke(const char *function, int argc, Dart_Handle* args, | 38 int Invoke(const char *function, int argc, Dart_Handle* args, |
| 38 bool failIfNotDefined = true); | 39 bool failIfNotDefined = true); |
| 39 | 40 |
| 40 static Dart_Handle CheckError(Dart_Handle); | 41 static Dart_Handle CheckError(Dart_Handle); |
| 41 | 42 |
| 42 static bool CreateIsolateAndSetupHelper(const char* script_uri, | 43 static bool CreateIsolateAndSetupHelper(const char* script_uri, |
| 43 const char* main, | 44 const char* main, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 55 ISized* surface_; | 56 ISized* surface_; |
| 56 Dart_Isolate isolate_; | 57 Dart_Isolate isolate_; |
| 57 bool initialized_vm_; | 58 bool initialized_vm_; |
| 58 bool initialized_script_; | 59 bool initialized_script_; |
| 59 char* main_script_; | 60 char* main_script_; |
| 60 static char* extension_script_; | 61 static char* extension_script_; |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 #endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ | 64 #endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ |
| 64 | 65 |
| OLD | NEW |