diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-03-22 19:00:50 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-03-22 19:00:50 -0300 |
commit | 23e13ce3c209da13a7bbf771cf31588045ad432e (patch) | |
tree | cef883c01a1662a2f2e08ce85e639a4b49175985 /core/bind/core_bind.cpp | |
parent | e9f94ce8d2cc6805e74fffdf733e6dc5b5c530f5 (diff) |
fixes to new window management API
-needs testing on Linux
-needs testing on Windows
-NEED SOMEONE TO IMPLEMENT IT ON OSX!! PLEASE HELP!
Diffstat (limited to 'core/bind/core_bind.cpp')
-rw-r--r-- | core/bind/core_bind.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/core/bind/core_bind.cpp b/core/bind/core_bind.cpp index 858f5cec27..5839467388 100644 --- a/core/bind/core_bind.cpp +++ b/core/bind/core_bind.cpp @@ -176,17 +176,17 @@ bool _OS::is_video_mode_fullscreen(int p_screen) const { } -#ifdef NEW_WM_API + int _OS::get_screen_count() const { return OS::get_singleton()->get_screen_count(); } -int _OS::get_screen() const { - return OS::get_singleton()->get_screen(); +int _OS::get_current_screen() const { + return OS::get_singleton()->get_current_screen(); } -void _OS::set_screen(int p_screen) { - OS::get_singleton()->set_screen(p_screen); +void _OS::set_current_screen(int p_screen) { + OS::get_singleton()->set_current_screen(p_screen); } Point2 _OS::get_screen_position(int p_screen) const { @@ -213,38 +213,38 @@ void _OS::set_window_size(const Size2& p_size) { OS::get_singleton()->set_window_size(p_size); } -void _OS::set_fullscreen(bool p_enabled) { - OS::get_singleton()->set_fullscreen(p_enabled); +void _OS::set_window_fullscreen(bool p_enabled) { + OS::get_singleton()->set_window_fullscreen(p_enabled); } -bool _OS::is_fullscreen() const { - return OS::get_singleton()->is_fullscreen(); +bool _OS::is_window_fullscreen() const { + return OS::get_singleton()->is_window_fullscreen(); } -void _OS::set_resizable(bool p_enabled) { - OS::get_singleton()->set_resizable(p_enabled); +void _OS::set_window_resizable(bool p_enabled) { + OS::get_singleton()->set_window_resizable(p_enabled); } -bool _OS::is_resizable() const { - return OS::get_singleton()->is_resizable(); +bool _OS::is_window_resizable() const { + return OS::get_singleton()->is_window_resizable(); } -void _OS::set_minimized(bool p_enabled) { - OS::get_singleton()->set_minimized(p_enabled); +void _OS::set_window_minimized(bool p_enabled) { + OS::get_singleton()->set_window_minimized(p_enabled); } -bool _OS::is_minimized() const { - return OS::get_singleton()->is_minimized(); +bool _OS::is_window_minimized() const { + return OS::get_singleton()->is_window_minimized(); } -void _OS::set_maximized(bool p_enabled) { - OS::get_singleton()->set_maximized(p_enabled); +void _OS::set_window_maximized(bool p_enabled) { + OS::get_singleton()->set_window_maximized(p_enabled); } -bool _OS::is_maximized() const { - return OS::get_singleton()->is_maximized(); +bool _OS::is_window_maximized() const { + return OS::get_singleton()->is_window_maximized(); } -#endif + void _OS::set_use_file_access_save_and_swap(bool p_enable) { @@ -706,25 +706,25 @@ void _OS::_bind_methods() { ObjectTypeDB::bind_method(_MD("is_video_mode_resizable","screen"),&_OS::is_video_mode_resizable,DEFVAL(0)); ObjectTypeDB::bind_method(_MD("get_fullscreen_mode_list","screen"),&_OS::get_fullscreen_mode_list,DEFVAL(0)); -#ifdef NEW_WM_API + ObjectTypeDB::bind_method(_MD("get_screen_count"),&_OS::get_screen_count); - ObjectTypeDB::bind_method(_MD("get_screen"),&_OS::get_screen); - ObjectTypeDB::bind_method(_MD("set_screen"),&_OS::set_screen); + ObjectTypeDB::bind_method(_MD("get_current_screen"),&_OS::get_current_screen); + ObjectTypeDB::bind_method(_MD("set_current_screen"),&_OS::set_current_screen); ObjectTypeDB::bind_method(_MD("get_screen_position"),&_OS::get_screen_position,DEFVAL(0)); ObjectTypeDB::bind_method(_MD("get_screen_size"),&_OS::get_screen_size,DEFVAL(0)); ObjectTypeDB::bind_method(_MD("get_window_position"),&_OS::get_window_position); ObjectTypeDB::bind_method(_MD("set_window_position"),&_OS::set_window_position); ObjectTypeDB::bind_method(_MD("get_window_size"),&_OS::get_window_size); ObjectTypeDB::bind_method(_MD("set_window_size"),&_OS::set_window_size); - ObjectTypeDB::bind_method(_MD("set_fullscreen","enabled"),&_OS::set_fullscreen); - ObjectTypeDB::bind_method(_MD("is_fullscreen"),&_OS::is_fullscreen); - ObjectTypeDB::bind_method(_MD("set_resizable","enabled"),&_OS::set_resizable); - ObjectTypeDB::bind_method(_MD("is_resizable"),&_OS::is_resizable); - ObjectTypeDB::bind_method(_MD("set_minimized", "enabled"),&_OS::set_minimized); - ObjectTypeDB::bind_method(_MD("is_minimized"),&_OS::is_minimized); - ObjectTypeDB::bind_method(_MD("set_maximized", "enabled"),&_OS::set_maximized); - ObjectTypeDB::bind_method(_MD("is_maximized"),&_OS::is_maximized); -#endif + ObjectTypeDB::bind_method(_MD("set_window_fullscreen","enabled"),&_OS::set_window_fullscreen); + ObjectTypeDB::bind_method(_MD("is_window_fullscreen"),&_OS::is_window_fullscreen); + ObjectTypeDB::bind_method(_MD("set_window_resizable","enabled"),&_OS::set_window_resizable); + ObjectTypeDB::bind_method(_MD("is_window_resizable"),&_OS::is_window_resizable); + ObjectTypeDB::bind_method(_MD("set_window_minimized", "enabled"),&_OS::set_window_minimized); + ObjectTypeDB::bind_method(_MD("is_window_minimized"),&_OS::is_window_minimized); + ObjectTypeDB::bind_method(_MD("set_window_maximized", "enabled"),&_OS::set_window_maximized); + ObjectTypeDB::bind_method(_MD("is_window_maximized"),&_OS::is_window_maximized); + ObjectTypeDB::bind_method(_MD("set_iterations_per_second","iterations_per_second"),&_OS::set_iterations_per_second); ObjectTypeDB::bind_method(_MD("get_iterations_per_second"),&_OS::get_iterations_per_second); |