From 97d290e466bfdf1bb0fa68d828c3a3cb13f138de Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sat, 10 Jan 2015 15:47:34 +0800 Subject: x11-fullscreen support through GDScript( OS.set_fullscreen(bool) ) --- core/os/os.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index d4deff2f5e..e8de28e86a 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -149,6 +149,10 @@ public: virtual void set_video_mode(const VideoMode& p_video_mode,int p_screen=0)=0; virtual VideoMode get_video_mode(int p_screen=0) const=0; virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; + + //MSC + virtual void set_fullscreen(bool fullscreen)=0; + virtual bool is_fullscreen() const=0; virtual void set_iterations_per_second(int p_ips); virtual int get_iterations_per_second() const; -- cgit v1.2.3 From 0d2ec19082e9ebff07ab1ab8e365e2db9ee3268b Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sat, 10 Jan 2015 18:38:30 +0800 Subject: API change to set_fullscreen(enabled,screen) --- core/os/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index e8de28e86a..b86b122623 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -151,7 +151,7 @@ public: virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; //MSC - virtual void set_fullscreen(bool fullscreen)=0; + virtual void set_fullscreen(bool p_enabled,int p_screen=0)=0; virtual bool is_fullscreen() const=0; virtual void set_iterations_per_second(int p_ips); -- cgit v1.2.3 From a8e3c5c0b7fb202bcceb06b9373b5b6a4ff8f9b8 Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sun, 11 Jan 2015 01:07:23 +0800 Subject: First attempt of restoring the window at the old position --- core/os/os.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index b86b122623..9de2e3556b 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -69,11 +69,12 @@ public: }; struct VideoMode { - int width,height; + int x,y,width,height; bool fullscreen; bool resizable; float get_aspect() const { return (float)width/(float)height; } - VideoMode(int p_width=640,int p_height=480,bool p_fullscreen=false, bool p_resizable = true) { width=p_width; height=p_height; fullscreen=p_fullscreen; resizable = p_resizable; } + VideoMode(int p_x=0, int p_y=0,int p_width=640,int p_height=480,bool p_fullscreen=false, bool p_resizable = true) + { x=p_x; y=p_y; width=p_width; height=p_height; fullscreen=p_fullscreen; resizable = p_resizable; } }; protected: friend class Main; -- cgit v1.2.3 From ac558c15eaeb45b3e7ae2604e26ca1dffb60b779 Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sun, 11 Jan 2015 15:47:27 +0800 Subject: get_window_position() + set_window_position() added --- core/os/os.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index 9de2e3556b..9089e7de76 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -69,12 +69,11 @@ public: }; struct VideoMode { - int x,y,width,height; + int width,height; bool fullscreen; bool resizable; float get_aspect() const { return (float)width/(float)height; } - VideoMode(int p_x=0, int p_y=0,int p_width=640,int p_height=480,bool p_fullscreen=false, bool p_resizable = true) - { x=p_x; y=p_y; width=p_width; height=p_height; fullscreen=p_fullscreen; resizable = p_resizable; } + VideoMode(int p_width=640,int p_height=480,bool p_fullscreen=false, bool p_resizable = true) {width=p_width; height=p_height; fullscreen=p_fullscreen; resizable = p_resizable; } }; protected: friend class Main; @@ -152,6 +151,8 @@ public: virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; //MSC + virtual Point2 get_window_position() const=0; + virtual void set_window_position(const Point2& p_position)=0; virtual void set_fullscreen(bool p_enabled,int p_screen=0)=0; virtual bool is_fullscreen() const=0; -- cgit v1.2.3 From 466e251abecf3686f0caac40ab886155e43cc0a6 Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sun, 11 Jan 2015 17:36:56 +0800 Subject: get_window_size() + set_window_size() added --- core/os/os.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index 9089e7de76..7e9fdcc579 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -150,9 +150,10 @@ public: virtual VideoMode get_video_mode(int p_screen=0) const=0; virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; - //MSC virtual Point2 get_window_position() const=0; virtual void set_window_position(const Point2& p_position)=0; + virtual Size2 get_window_size() const=0; + virtual void set_window_size(const Size2 p_size)=0; virtual void set_fullscreen(bool p_enabled,int p_screen=0)=0; virtual bool is_fullscreen() const=0; -- cgit v1.2.3 From 3c8b047b111cf20b3823851e298ce42bdf941871 Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sun, 11 Jan 2015 18:52:42 +0800 Subject: get_screen_count() added --- core/os/os.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index 7e9fdcc579..68769e7ad4 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -150,6 +150,7 @@ public: virtual VideoMode get_video_mode(int p_screen=0) const=0; virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; + virtual int get_screen_count() const=0; virtual Point2 get_window_position() const=0; virtual void set_window_position(const Point2& p_position)=0; virtual Size2 get_window_size() const=0; -- cgit v1.2.3 From f9d0de0d2a82456f3553499fcbc1c487b59fed1c Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sun, 11 Jan 2015 19:35:53 +0800 Subject: get_screen_size() added --- core/os/os.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index 68769e7ad4..edb5d57c5f 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -151,6 +151,7 @@ public: virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; virtual int get_screen_count() const=0; + virtual Size2 get_screen_size(int p_screen=0) const=0; virtual Point2 get_window_position() const=0; virtual void set_window_position(const Point2& p_position)=0; virtual Size2 get_window_size() const=0; -- cgit v1.2.3 From c0d363266755de3ac87f61600f23921d881d99e2 Mon Sep 17 00:00:00 2001 From: hurikhan Date: Tue, 13 Jan 2015 15:44:39 +0800 Subject: introduced the scons experimental_wm_api switch: ================================================ Usage: scons p=x11 experimental_wm_api=yes --- core/os/os.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index edb5d57c5f..c2534287bc 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -150,6 +150,7 @@ public: virtual VideoMode get_video_mode(int p_screen=0) const=0; virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; +#ifdef EXPERIMENTAL_WM_API virtual int get_screen_count() const=0; virtual Size2 get_screen_size(int p_screen=0) const=0; virtual Point2 get_window_position() const=0; @@ -158,7 +159,8 @@ public: virtual void set_window_size(const Size2 p_size)=0; virtual void set_fullscreen(bool p_enabled,int p_screen=0)=0; virtual bool is_fullscreen() const=0; - +#endif + virtual void set_iterations_per_second(int p_ips); virtual int get_iterations_per_second() const; -- cgit v1.2.3 From ce7c7a862ebe37fada7708c342c07d70fa80465a Mon Sep 17 00:00:00 2001 From: hurikhan Date: Tue, 13 Jan 2015 17:25:50 +0800 Subject: get_screen_position() added --- core/os/os.h | 1 + 1 file changed, 1 insertion(+) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index c2534287bc..1ef05e45c8 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -152,6 +152,7 @@ public: #ifdef EXPERIMENTAL_WM_API virtual int get_screen_count() const=0; + virtual Point2 get_screen_position(int p_screen=0) const=0; virtual Size2 get_screen_size(int p_screen=0) const=0; virtual Point2 get_window_position() const=0; virtual void set_window_position(const Point2& p_position)=0; -- cgit v1.2.3 From 790d8ecbb9a0a0ac67520b84fc621c34f910d817 Mon Sep 17 00:00:00 2001 From: hurikhan Date: Wed, 14 Jan 2015 12:02:59 +0800 Subject: get_screen() + set_screen() added --- core/os/os.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index 1ef05e45c8..2d4e937974 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -152,13 +152,15 @@ public: #ifdef EXPERIMENTAL_WM_API virtual int get_screen_count() const=0; + virtual int get_screen() const=0; + virtual void set_screen(int p_screen)=0; virtual Point2 get_screen_position(int p_screen=0) const=0; virtual Size2 get_screen_size(int p_screen=0) const=0; virtual Point2 get_window_position() const=0; virtual void set_window_position(const Point2& p_position)=0; virtual Size2 get_window_size() const=0; virtual void set_window_size(const Size2 p_size)=0; - virtual void set_fullscreen(bool p_enabled,int p_screen=0)=0; + virtual void set_fullscreen(bool p_enabled)=0; virtual bool is_fullscreen() const=0; #endif -- cgit v1.2.3 From d269344bbd19d9653fff3c2a230261b8fa00d7f6 Mon Sep 17 00:00:00 2001 From: hurikhan Date: Thu, 15 Jan 2015 22:50:23 +0900 Subject: WIP -- set_resizable() + is_resizable added --- core/os/os.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index 2d4e937974..f1a9de1edf 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -162,6 +162,8 @@ public: virtual void set_window_size(const Size2 p_size)=0; virtual void set_fullscreen(bool p_enabled)=0; virtual bool is_fullscreen() const=0; + virtual void set_resizable(bool p_enabled)=0; + virtual bool is_resizable() const=0; #endif virtual void set_iterations_per_second(int p_ips); -- cgit v1.2.3 From 716971655eb9ab7909447e2f5d4911b6f45164bb Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sat, 17 Jan 2015 00:18:45 +0900 Subject: added the following methods: * set_minimized(bool) * bool is_minimized() * set_maximized(bool) * bool is_maximized() --- core/os/os.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index f1a9de1edf..c04a91e302 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -164,6 +164,10 @@ public: virtual bool is_fullscreen() const=0; virtual void set_resizable(bool p_enabled)=0; virtual bool is_resizable() const=0; + virtual void set_minimized(bool p_enabled)=0; + virtual bool is_minimized() const=0; + virtual void set_maximized(bool p_enabled)=0; + virtual bool is_maximized() const=0; #endif virtual void set_iterations_per_second(int p_ips); -- cgit v1.2.3 From f5d2e1f42cca1c5b078073133fccda63c556a0da Mon Sep 17 00:00:00 2001 From: hurikhan Date: Sun, 15 Feb 2015 18:26:49 +0800 Subject: Renamed EXPERIMENTAL_WM_API to NEW_WM_API --- core/os/os.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/os/os.h') diff --git a/core/os/os.h b/core/os/os.h index c04a91e302..6301bd495f 100644 --- a/core/os/os.h +++ b/core/os/os.h @@ -150,7 +150,7 @@ public: virtual VideoMode get_video_mode(int p_screen=0) const=0; virtual void get_fullscreen_mode_list(List *p_list,int p_screen=0) const=0; -#ifdef EXPERIMENTAL_WM_API +#ifdef NEW_WM_API virtual int get_screen_count() const=0; virtual int get_screen() const=0; virtual void set_screen(int p_screen)=0; -- cgit v1.2.3