os.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. /*************************************************************************/
  2. /* os.h */
  3. /*************************************************************************/
  4. /* This file is part of: */
  5. /* GODOT ENGINE */
  6. /* https://godotengine.org */
  7. /*************************************************************************/
  8. /* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
  9. /* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
  10. /* */
  11. /* Permission is hereby granted, free of charge, to any person obtaining */
  12. /* a copy of this software and associated documentation files (the */
  13. /* "Software"), to deal in the Software without restriction, including */
  14. /* without limitation the rights to use, copy, modify, merge, publish, */
  15. /* distribute, sublicense, and/or sell copies of the Software, and to */
  16. /* permit persons to whom the Software is furnished to do so, subject to */
  17. /* the following conditions: */
  18. /* */
  19. /* The above copyright notice and this permission notice shall be */
  20. /* included in all copies or substantial portions of the Software. */
  21. /* */
  22. /* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
  23. /* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
  24. /* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
  25. /* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
  26. /* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
  27. /* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
  28. /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
  29. /*************************************************************************/
  30. #ifndef OS_H
  31. #define OS_H
  32. #include "core/engine.h"
  33. #include "core/image.h"
  34. #include "core/io/logger.h"
  35. #include "core/list.h"
  36. #include "core/os/main_loop.h"
  37. #include "core/ustring.h"
  38. #include "core/vector.h"
  39. #include <stdarg.h>
  40. class Mutex;
  41. class OS {
  42. static OS *singleton;
  43. static uint64_t target_ticks;
  44. String _execpath;
  45. List<String> _cmdline;
  46. bool _keep_screen_on;
  47. bool low_processor_usage_mode;
  48. int low_processor_usage_mode_sleep_usec;
  49. bool _verbose_stdout;
  50. bool _debug_stdout;
  51. String _local_clipboard;
  52. uint64_t _msec_splash;
  53. bool _no_window;
  54. int _exit_code;
  55. int _orientation;
  56. bool _allow_hidpi;
  57. bool _allow_layered;
  58. bool _use_vsync;
  59. bool _vsync_via_compositor;
  60. char *last_error;
  61. void *_stack_bottom;
  62. CompositeLogger *_logger;
  63. bool restart_on_exit;
  64. List<String> restart_commandline;
  65. protected:
  66. void _set_logger(CompositeLogger *p_logger);
  67. public:
  68. typedef void (*ImeCallback)(void *p_inp, String p_text, Point2 p_selection);
  69. typedef bool (*HasServerFeatureCallback)(const String &p_feature);
  70. enum PowerState {
  71. POWERSTATE_UNKNOWN, /**< cannot determine power status */
  72. POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */
  73. POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */
  74. POWERSTATE_CHARGING, /**< Plugged in, charging battery */
  75. POWERSTATE_CHARGED /**< Plugged in, battery charged */
  76. };
  77. enum RenderThreadMode {
  78. RENDER_THREAD_UNSAFE,
  79. RENDER_THREAD_SAFE,
  80. RENDER_SEPARATE_THREAD
  81. };
  82. struct VideoMode {
  83. int width, height;
  84. bool fullscreen;
  85. bool resizable;
  86. bool borderless_window;
  87. bool maximized;
  88. bool always_on_top;
  89. bool use_vsync;
  90. bool vsync_via_compositor;
  91. bool layered;
  92. float get_aspect() const { return (float)width / (float)height; }
  93. VideoMode(int p_width = 1024, int p_height = 600, bool p_fullscreen = false, bool p_resizable = true, bool p_borderless_window = false, bool p_maximized = false, bool p_always_on_top = false, bool p_use_vsync = false, bool p_vsync_via_compositor = false) {
  94. width = p_width;
  95. height = p_height;
  96. fullscreen = p_fullscreen;
  97. resizable = p_resizable;
  98. borderless_window = p_borderless_window;
  99. maximized = p_maximized;
  100. always_on_top = p_always_on_top;
  101. use_vsync = p_use_vsync;
  102. vsync_via_compositor = p_vsync_via_compositor;
  103. layered = false;
  104. }
  105. };
  106. protected:
  107. friend class Main;
  108. HasServerFeatureCallback has_server_feature_callback;
  109. RenderThreadMode _render_thread_mode;
  110. // functions used by main to initialize/deinitialize the OS
  111. void add_logger(Logger *p_logger);
  112. virtual void initialize_core() = 0;
  113. virtual Error initialize(const VideoMode &p_desired, int p_video_driver, int p_audio_driver) = 0;
  114. virtual void set_main_loop(MainLoop *p_main_loop) = 0;
  115. virtual void delete_main_loop() = 0;
  116. virtual void finalize() = 0;
  117. virtual void finalize_core() = 0;
  118. virtual void set_cmdline(const char *p_execpath, const List<String> &p_args);
  119. void _ensure_user_data_dir();
  120. virtual bool _check_internal_feature_support(const String &p_feature) = 0;
  121. public:
  122. typedef int64_t ProcessID;
  123. static OS *get_singleton();
  124. virtual void global_menu_add_item(const String &p_menu, const String &p_label, const Variant &p_signal, const Variant &p_meta){};
  125. virtual void global_menu_add_separator(const String &p_menu){};
  126. virtual void global_menu_remove_item(const String &p_menu, int p_idx){};
  127. virtual void global_menu_clear(const String &p_menu){};
  128. void print_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, Logger::ErrorType p_type = Logger::ERR_ERROR);
  129. void print(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
  130. void printerr(const char *p_format, ...) _PRINTF_FORMAT_ATTRIBUTE_2_3;
  131. virtual void alert(const String &p_alert, const String &p_title = "ALERT!") = 0;
  132. virtual String get_stdin_string(bool p_block = true) = 0;
  133. enum MouseMode {
  134. MOUSE_MODE_VISIBLE,
  135. MOUSE_MODE_HIDDEN,
  136. MOUSE_MODE_CAPTURED,
  137. MOUSE_MODE_CONFINED
  138. };
  139. virtual void set_mouse_mode(MouseMode p_mode);
  140. virtual MouseMode get_mouse_mode() const;
  141. virtual void warp_mouse_position(const Point2 &p_to) {}
  142. virtual Point2 get_mouse_position() const = 0;
  143. virtual int get_mouse_button_state() const = 0;
  144. virtual void set_window_title(const String &p_title) = 0;
  145. virtual void set_clipboard(const String &p_text);
  146. virtual String get_clipboard() const;
  147. virtual void set_video_mode(const VideoMode &p_video_mode, int p_screen = 0) = 0;
  148. virtual VideoMode get_video_mode(int p_screen = 0) const = 0;
  149. virtual void get_fullscreen_mode_list(List<VideoMode> *p_list, int p_screen = 0) const = 0;
  150. enum VideoDriver {
  151. VIDEO_DRIVER_GLES3,
  152. VIDEO_DRIVER_GLES2,
  153. VIDEO_DRIVER_MAX,
  154. };
  155. virtual int get_video_driver_count() const;
  156. virtual const char *get_video_driver_name(int p_driver) const;
  157. virtual int get_current_video_driver() const = 0;
  158. virtual int get_audio_driver_count() const;
  159. virtual const char *get_audio_driver_name(int p_driver) const;
  160. virtual int get_tablet_driver_count() const { return 0; };
  161. virtual String get_tablet_driver_name(int p_driver) const { return ""; };
  162. virtual String get_current_tablet_driver() const { return ""; };
  163. virtual void set_current_tablet_driver(const String &p_driver){};
  164. virtual PoolStringArray get_connected_midi_inputs();
  165. virtual void open_midi_inputs();
  166. virtual void close_midi_inputs();
  167. virtual int get_screen_count() const { return 1; }
  168. virtual int get_current_screen() const { return 0; }
  169. virtual void set_current_screen(int p_screen) {}
  170. virtual Point2 get_screen_position(int p_screen = -1) const { return Point2(); }
  171. virtual Size2 get_screen_size(int p_screen = -1) const { return get_window_size(); }
  172. virtual int get_screen_dpi(int p_screen = -1) const { return 72; }
  173. virtual float get_screen_scale(int p_screen = -1) const { return 1.0; }
  174. virtual float get_screen_max_scale() const { return 1.0; };
  175. virtual Point2 get_window_position() const { return Vector2(); }
  176. virtual void set_window_position(const Point2 &p_position) {}
  177. virtual Size2 get_max_window_size() const { return Size2(); };
  178. virtual Size2 get_min_window_size() const { return Size2(); };
  179. virtual Size2 get_window_size() const = 0;
  180. virtual Size2 get_real_window_size() const { return get_window_size(); }
  181. virtual void set_min_window_size(const Size2 p_size) {}
  182. virtual void set_max_window_size(const Size2 p_size) {}
  183. virtual void set_window_size(const Size2 p_size) {}
  184. virtual void set_window_fullscreen(bool p_enabled) {}
  185. virtual bool is_window_fullscreen() const { return true; }
  186. virtual void set_window_resizable(bool p_enabled) {}
  187. virtual bool is_window_resizable() const { return false; }
  188. virtual void set_window_minimized(bool p_enabled) {}
  189. virtual bool is_window_minimized() const { return false; }
  190. virtual void set_window_maximized(bool p_enabled) {}
  191. virtual bool is_window_maximized() const { return true; }
  192. virtual void set_window_always_on_top(bool p_enabled) {}
  193. virtual bool is_window_always_on_top() const { return false; }
  194. virtual bool is_window_focused() const { return true; }
  195. virtual void set_console_visible(bool p_enabled) {}
  196. virtual bool is_console_visible() const { return false; }
  197. virtual void request_attention() {}
  198. virtual void center_window();
  199. // Returns window area free of hardware controls and other obstacles.
  200. // The application should use this to determine where to place UI elements.
  201. //
  202. // Keep in mind the area returned is in window coordinates rather than
  203. // viewport coordinates - you should perform the conversion on your own.
  204. //
  205. // The maximum size of the area is Rect2(0, 0, window_size.width, window_size.height).
  206. virtual Rect2 get_window_safe_area() const {
  207. Size2 window_size = get_window_size();
  208. return Rect2(0, 0, window_size.width, window_size.height);
  209. }
  210. virtual void set_borderless_window(bool p_borderless) {}
  211. virtual bool get_borderless_window() { return 0; }
  212. virtual bool get_window_per_pixel_transparency_enabled() const { return false; }
  213. virtual void set_window_per_pixel_transparency_enabled(bool p_enabled) {}
  214. virtual void set_ime_active(const bool p_active) {}
  215. virtual void set_ime_position(const Point2 &p_pos) {}
  216. virtual Point2 get_ime_selection() const { return Point2(); }
  217. virtual String get_ime_text() const { return String(); }
  218. virtual Error open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path = false) { return ERR_UNAVAILABLE; }
  219. virtual Error close_dynamic_library(void *p_library_handle) { return ERR_UNAVAILABLE; }
  220. virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional = false) { return ERR_UNAVAILABLE; }
  221. virtual void set_keep_screen_on(bool p_enabled);
  222. virtual bool is_keep_screen_on() const;
  223. virtual void set_low_processor_usage_mode(bool p_enabled);
  224. virtual bool is_in_low_processor_usage_mode() const;
  225. virtual void set_low_processor_usage_mode_sleep_usec(int p_usec);
  226. virtual int get_low_processor_usage_mode_sleep_usec() const;
  227. virtual String get_executable_path() const;
  228. virtual Error execute(const String &p_path, const List<String> &p_arguments, bool p_blocking = true, ProcessID *r_child_id = NULL, String *r_pipe = NULL, int *r_exitcode = NULL, bool read_stderr = false, Mutex *p_pipe_mutex = NULL) = 0;
  229. virtual Error kill(const ProcessID &p_pid) = 0;
  230. virtual int get_process_id() const;
  231. virtual void vibrate_handheld(int p_duration_ms = 500);
  232. virtual Error shell_open(String p_uri);
  233. virtual Error set_cwd(const String &p_cwd);
  234. virtual bool has_environment(const String &p_var) const = 0;
  235. virtual String get_environment(const String &p_var) const = 0;
  236. virtual bool set_environment(const String &p_var, const String &p_value) const = 0;
  237. virtual String get_name() const = 0;
  238. virtual List<String> get_cmdline_args() const { return _cmdline; }
  239. virtual String get_model_name() const;
  240. virtual MainLoop *get_main_loop() const = 0;
  241. virtual void yield();
  242. enum Weekday {
  243. DAY_SUNDAY,
  244. DAY_MONDAY,
  245. DAY_TUESDAY,
  246. DAY_WEDNESDAY,
  247. DAY_THURSDAY,
  248. DAY_FRIDAY,
  249. DAY_SATURDAY
  250. };
  251. enum Month {
  252. /// Start at 1 to follow Windows SYSTEMTIME structure
  253. /// https://msdn.microsoft.com/en-us/library/windows/desktop/ms724950(v=vs.85).aspx
  254. MONTH_JANUARY = 1,
  255. MONTH_FEBRUARY,
  256. MONTH_MARCH,
  257. MONTH_APRIL,
  258. MONTH_MAY,
  259. MONTH_JUNE,
  260. MONTH_JULY,
  261. MONTH_AUGUST,
  262. MONTH_SEPTEMBER,
  263. MONTH_OCTOBER,
  264. MONTH_NOVEMBER,
  265. MONTH_DECEMBER
  266. };
  267. struct Date {
  268. int year;
  269. Month month;
  270. int day;
  271. Weekday weekday;
  272. bool dst;
  273. };
  274. struct Time {
  275. int hour;
  276. int min;
  277. int sec;
  278. };
  279. struct TimeZoneInfo {
  280. int bias;
  281. String name;
  282. };
  283. virtual Date get_date(bool local = false) const = 0;
  284. virtual Time get_time(bool local = false) const = 0;
  285. virtual TimeZoneInfo get_time_zone_info() const = 0;
  286. virtual String get_iso_date_time(bool local = false) const;
  287. virtual uint64_t get_unix_time() const;
  288. virtual uint64_t get_system_time_secs() const;
  289. virtual uint64_t get_system_time_msecs() const;
  290. virtual void delay_usec(uint32_t p_usec) const = 0;
  291. virtual void add_frame_delay(bool p_can_draw);
  292. virtual uint64_t get_ticks_usec() const = 0;
  293. uint32_t get_ticks_msec() const;
  294. uint64_t get_splash_tick_msec() const;
  295. virtual bool can_draw() const = 0;
  296. virtual bool is_userfs_persistent() const { return true; }
  297. bool is_stdout_verbose() const;
  298. bool is_stdout_debug_enabled() const;
  299. virtual void disable_crash_handler() {}
  300. virtual bool is_disable_crash_handler() const { return false; }
  301. virtual void initialize_debugging() {}
  302. enum CursorShape {
  303. CURSOR_ARROW,
  304. CURSOR_IBEAM,
  305. CURSOR_POINTING_HAND,
  306. CURSOR_CROSS,
  307. CURSOR_WAIT,
  308. CURSOR_BUSY,
  309. CURSOR_DRAG,
  310. CURSOR_CAN_DROP,
  311. CURSOR_FORBIDDEN,
  312. CURSOR_VSIZE,
  313. CURSOR_HSIZE,
  314. CURSOR_BDIAGSIZE,
  315. CURSOR_FDIAGSIZE,
  316. CURSOR_MOVE,
  317. CURSOR_VSPLIT,
  318. CURSOR_HSPLIT,
  319. CURSOR_HELP,
  320. CURSOR_MAX
  321. };
  322. virtual bool has_virtual_keyboard() const;
  323. virtual void show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect = Rect2(), bool p_multiline = false, int p_max_input_length = -1, int p_cursor_start = -1, int p_cursor_end = -1);
  324. virtual void hide_virtual_keyboard();
  325. // returns height of the currently shown virtual keyboard (0 if keyboard is hidden)
  326. virtual int get_virtual_keyboard_height() const;
  327. virtual void set_cursor_shape(CursorShape p_shape);
  328. virtual CursorShape get_cursor_shape() const;
  329. virtual void set_custom_mouse_cursor(const RES &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot);
  330. virtual bool get_swap_ok_cancel() { return false; }
  331. virtual void dump_memory_to_file(const char *p_file);
  332. virtual void dump_resources_to_file(const char *p_file);
  333. virtual void print_resources_in_use(bool p_short = false);
  334. virtual void print_all_resources(String p_to_file = "");
  335. virtual uint64_t get_static_memory_usage() const;
  336. virtual uint64_t get_static_memory_peak_usage() const;
  337. virtual uint64_t get_dynamic_memory_usage() const;
  338. virtual uint64_t get_free_static_memory() const;
  339. RenderThreadMode get_render_thread_mode() const { return _render_thread_mode; }
  340. virtual String get_locale() const;
  341. String get_safe_dir_name(const String &p_dir_name, bool p_allow_dir_separator = false) const;
  342. virtual String get_godot_dir_name() const;
  343. virtual String get_data_path() const;
  344. virtual String get_config_path() const;
  345. virtual String get_cache_path() const;
  346. virtual String get_bundle_resource_dir() const;
  347. virtual String get_user_data_dir() const;
  348. virtual String get_resource_dir() const;
  349. enum SystemDir {
  350. SYSTEM_DIR_DESKTOP,
  351. SYSTEM_DIR_DCIM,
  352. SYSTEM_DIR_DOCUMENTS,
  353. SYSTEM_DIR_DOWNLOADS,
  354. SYSTEM_DIR_MOVIES,
  355. SYSTEM_DIR_MUSIC,
  356. SYSTEM_DIR_PICTURES,
  357. SYSTEM_DIR_RINGTONES,
  358. };
  359. virtual String get_system_dir(SystemDir p_dir) const;
  360. virtual Error move_to_trash(const String &p_path) { return FAILED; }
  361. virtual void set_no_window_mode(bool p_enable);
  362. virtual bool is_no_window_mode_enabled() const;
  363. virtual bool has_touchscreen_ui_hint() const;
  364. enum ScreenOrientation {
  365. SCREEN_LANDSCAPE,
  366. SCREEN_PORTRAIT,
  367. SCREEN_REVERSE_LANDSCAPE,
  368. SCREEN_REVERSE_PORTRAIT,
  369. SCREEN_SENSOR_LANDSCAPE,
  370. SCREEN_SENSOR_PORTRAIT,
  371. SCREEN_SENSOR,
  372. };
  373. virtual void set_screen_orientation(ScreenOrientation p_orientation);
  374. ScreenOrientation get_screen_orientation() const;
  375. virtual void enable_for_stealing_focus(ProcessID pid) {}
  376. virtual void move_window_to_foreground() {}
  377. virtual void debug_break();
  378. virtual void release_rendering_thread();
  379. virtual void make_rendering_thread();
  380. virtual void swap_buffers();
  381. virtual void set_native_icon(const String &p_filename);
  382. virtual void set_icon(const Ref<Image> &p_icon);
  383. virtual int get_exit_code() const;
  384. virtual void set_exit_code(int p_code);
  385. virtual int get_processor_count() const;
  386. virtual String get_unique_id() const;
  387. virtual Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track);
  388. virtual bool native_video_is_playing() const;
  389. virtual void native_video_pause();
  390. virtual void native_video_unpause();
  391. virtual void native_video_stop();
  392. virtual bool can_use_threads() const;
  393. virtual Error dialog_show(String p_title, String p_description, Vector<String> p_buttons, Object *p_obj, String p_callback);
  394. virtual Error dialog_input_text(String p_title, String p_description, String p_partial, Object *p_obj, String p_callback);
  395. enum LatinKeyboardVariant {
  396. LATIN_KEYBOARD_QWERTY,
  397. LATIN_KEYBOARD_QWERTZ,
  398. LATIN_KEYBOARD_AZERTY,
  399. LATIN_KEYBOARD_QZERTY,
  400. LATIN_KEYBOARD_DVORAK,
  401. LATIN_KEYBOARD_NEO,
  402. LATIN_KEYBOARD_COLEMAK,
  403. };
  404. virtual LatinKeyboardVariant get_latin_keyboard_variant() const;
  405. virtual int keyboard_get_layout_count() const;
  406. virtual int keyboard_get_current_layout() const;
  407. virtual void keyboard_set_current_layout(int p_index);
  408. virtual String keyboard_get_layout_language(int p_index) const;
  409. virtual String keyboard_get_layout_name(int p_index) const;
  410. virtual bool is_joy_known(int p_device);
  411. virtual String get_joy_guid(int p_device) const;
  412. enum EngineContext {
  413. CONTEXT_EDITOR,
  414. CONTEXT_PROJECTMAN,
  415. CONTEXT_ENGINE,
  416. };
  417. virtual void set_context(int p_context);
  418. //amazing hack because OpenGL needs this to be set on a separate thread..
  419. //also core can't access servers, so a callback must be used
  420. typedef void (*SwitchVSyncCallbackInThread)(bool);
  421. static SwitchVSyncCallbackInThread switch_vsync_function;
  422. void set_use_vsync(bool p_enable);
  423. bool is_vsync_enabled() const;
  424. //real, actual overridable function to switch vsync, which needs to be called from graphics thread if needed
  425. virtual void _set_use_vsync(bool p_enable) {}
  426. void set_vsync_via_compositor(bool p_enable);
  427. bool is_vsync_via_compositor_enabled() const;
  428. virtual OS::PowerState get_power_state();
  429. virtual int get_power_seconds_left();
  430. virtual int get_power_percent_left();
  431. virtual void force_process_input(){};
  432. bool has_feature(const String &p_feature);
  433. void set_has_server_feature_callback(HasServerFeatureCallback p_callback);
  434. bool is_layered_allowed() const { return _allow_layered; }
  435. bool is_hidpi_allowed() const { return _allow_hidpi; }
  436. void set_restart_on_exit(bool p_restart, const List<String> &p_restart_arguments);
  437. bool is_restart_on_exit_set() const;
  438. List<String> get_restart_on_exit_arguments() const;
  439. virtual bool request_permission(const String &p_name) { return true; }
  440. virtual bool request_permissions() { return true; }
  441. virtual Vector<String> get_granted_permissions() const { return Vector<String>(); }
  442. virtual void process_and_drop_events() {}
  443. OS();
  444. virtual ~OS();
  445. };
  446. VARIANT_ENUM_CAST(OS::PowerState);
  447. #endif