| 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 18 matching lines...) Expand all Loading... |
| 29 int OnMotionEvent(const char* funtion, int64_t when, | 29 int OnMotionEvent(const char* funtion, int64_t when, |
| 30 float move_x, float move_y); | 30 float move_x, float move_y); |
| 31 int OnKeyEvent(const char* funtion, int64_t when, int32_t flags, | 31 int OnKeyEvent(const char* funtion, int64_t when, int32_t flags, |
| 32 int32_t key_code, int32_t meta_state, int32_t repeat); | 32 int32_t key_code, int32_t meta_state, int32_t repeat); |
| 33 void FinishMainIsolate(); | 33 void FinishMainIsolate(); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 int Invoke(const char *function, int argc, Dart_Handle* args, | 36 int Invoke(const char *function, int argc, Dart_Handle* args, |
| 37 bool failIfNotDefined = true); | 37 bool failIfNotDefined = true); |
| 38 | 38 |
| 39 static int ErrorExit(const char* format, ...); | |
| 40 static Dart_Handle CheckError(Dart_Handle); | 39 static Dart_Handle CheckError(Dart_Handle); |
| 41 | 40 |
| 42 static bool CreateIsolateAndSetupHelper(const char* script_uri, | 41 static bool CreateIsolateAndSetupHelper(const char* script_uri, |
| 43 const char* main, | 42 const char* main, |
| 44 void* data, | 43 void* data, |
| 45 char** error); | 44 char** error); |
| 46 static bool CreateIsolateAndSetup(const char* script_uri, | 45 static bool CreateIsolateAndSetup(const char* script_uri, |
| 47 const char* main, | 46 const char* main, |
| 48 void* data, char** error); | 47 void* data, char** error); |
| 49 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, | 48 static Dart_Handle LibraryTagHandler(Dart_LibraryTag tag, |
| 50 Dart_Handle library, | 49 Dart_Handle library, |
| 51 Dart_Handle urlHandle); | 50 Dart_Handle urlHandle); |
| 52 static Dart_Handle LoadSourceFromFile(const char* url); | 51 static Dart_Handle LoadSourceFromFile(const char* url); |
| 53 static void ShutdownIsolate(void* callback_data); | 52 static void ShutdownIsolate(void* callback_data); |
| 54 | 53 |
| 55 ISized* surface_; | 54 ISized* surface_; |
| 56 Dart_Isolate isolate_; | 55 Dart_Isolate isolate_; |
| 57 bool initialized_vm_; | 56 bool initialized_vm_; |
| 58 bool initialized_script_; | 57 bool initialized_script_; |
| 59 char* main_script_; | 58 char* main_script_; |
| 60 static char* extension_script_; | 59 static char* extension_script_; |
| 61 }; | 60 }; |
| 62 | 61 |
| 63 #endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ | 62 #endif // EMBEDDERS_OPENGLUI_COMMON_VM_GLUE_H_ |
| 64 | 63 |
| OLD | NEW |