introduced the scons experimental_wm_api switch:

================================================

Usage:
    scons p=x11 experimental_wm_api=yes
This commit is contained in:
hurikhan 2015-01-13 15:44:39 +08:00
parent 6b6c526048
commit c0d3632667
6 changed files with 50 additions and 3 deletions

View file

@ -176,6 +176,7 @@ bool _OS::is_video_mode_fullscreen(int p_screen) const {
}
#ifdef EXPERIMENTAL_WM_API
int _OS::get_screen_count() const {
return OS::get_singleton()->get_screen_count();
}
@ -207,6 +208,7 @@ void _OS::set_fullscreen(bool p_enabled,int p_screen) {
bool _OS::is_fullscreen() const {
return OS::get_singleton()->is_fullscreen();
}
#endif
void _OS::set_use_file_access_save_and_swap(bool p_enable) {
@ -664,6 +666,7 @@ 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 EXPERIMENTAL_WM_API
ObjectTypeDB::bind_method(_MD("get_screen_count"),&_OS::get_screen_count);
ObjectTypeDB::bind_method(_MD("get_screen_size"),&_OS::get_screen_size,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("get_window_position"),&_OS::get_window_position);
@ -672,6 +675,7 @@ void _OS::_bind_methods() {
ObjectTypeDB::bind_method(_MD("set_window_size"),&_OS::set_window_size);
ObjectTypeDB::bind_method(_MD("set_fullscreen","enabled","screen"),&_OS::set_fullscreen,DEFVAL(0));
ObjectTypeDB::bind_method(_MD("is_fullscreen"),&_OS::is_fullscreen);
#endif
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);

View file

@ -108,6 +108,7 @@ public:
bool is_video_mode_resizable(int p_screen=0) const;
Array get_fullscreen_mode_list(int p_screen=0) const;
#ifdef EXPERIMENTAL_WM_API
virtual int get_screen_count() const;
virtual Size2 get_screen_size(int p_screen=0) const;
virtual Point2 get_window_position() const;
@ -116,6 +117,7 @@ public:
virtual void set_window_size(const Size2& p_size);
void set_fullscreen(bool p_enabled, int p_screen=0);
bool is_fullscreen() const;
#endif
Error native_video_play(String p_path, float p_volume, String p_audio_track, String p_subtitle_track);
bool native_video_is_playing();