diff --git a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs index 5cf427cf10f..84427a9d14a 100755 --- a/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs +++ b/src/Tizen.NUI/src/internal/Interop/Interop.Window.cs @@ -393,6 +393,13 @@ internal static partial class Window [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_KeyboardUnGrab")] [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] public static extern bool KeyboardUnGrab(global::System.Runtime.InteropServices.HandleRef window); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_SetFullScreen")] + public static extern void SetFullScreen(global::System.Runtime.InteropServices.HandleRef window, bool fullscreen); + + [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_GetFullScreen")] + [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)] + public static extern bool GetFullScreen(global::System.Runtime.InteropServices.HandleRef window); } } } diff --git a/src/Tizen.NUI/src/public/Window/Window.cs b/src/Tizen.NUI/src/public/Window/Window.cs index 3779dfeb3e9..6df4dd112cf 100755 --- a/src/Tizen.NUI/src/public/Window/Window.cs +++ b/src/Tizen.NUI/src/public/Window/Window.cs @@ -2423,6 +2423,32 @@ public Layer FindLayerByID(uint id) return ret; } + /// + /// Sets to resize window with full screen. + /// If full screen size is set for the window, + /// window will be resized with full screen. + /// In addition, the full screen sized window's z-order is the highest. + /// + /// If fullscreen is true, set fullscreen or unset. + [EditorBrowsable(EditorBrowsableState.Never)] + public void SetFullScreen(bool fullscreen) + { + Interop.Window.SetFullScreen(SwigCPtr, fullscreen); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Gets whether the full screen sized window or not. + /// + /// Returns true if the full screen sized window is. + [EditorBrowsable(EditorBrowsableState.Never)] + public bool GetFullScreen() + { + bool ret = Interop.Window.GetFullScreen(SwigCPtr); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } + /// /// Get Native Window handle. /// diff --git a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/WindowTest.cs b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/WindowTest.cs index f3fe59be6e8..583bc7da17d 100644 --- a/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/WindowTest.cs +++ b/test/Tizen.NUI.Samples/Tizen.NUI.Samples/Samples/WindowTest.cs @@ -179,6 +179,16 @@ public void OnKeyEvent(object sender, Window.KeyEventArgs e) case KEY_NUM_7: mainWin.SetMimimumSize(new Size2D(100, 100)); break; + case KEY_NUM_8: + if(mainWin.GetFullScreen() == false) + { + mainWin.SetFullScreen(true); + } + else + { + mainWin.SetFullScreen(false); + } + break; default: log.Fatal(tag, $"no test!"); diff --git a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs index 0e5955f1ab3..e4e814a7518 100755 --- a/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs +++ b/test/Tizen.NUI.Tests/Tizen.NUI.Devel.Tests/testcase/public/Window/TSWindow.cs @@ -1625,5 +1625,29 @@ public void WindowRequestResizeToServer() tlog.Debug(tag, $"WindowRequestResizeToServer END (OK)"); } + + [Test] + [Category("P1")] + [Description("Window SetFullScreen")] + [Property("SPEC", "Tizen.NUI.Window.SetFullScreen M")] + [Property("SPEC_URL", "-")] + [Property("CRITERIA", "MR")] + public void SetFullScreen() + { + tlog.Debug(tag, $"SetFullScreen START"); + + try + { + win.SetFullScreen(true); + Assert.IsTrue(win.GetFullScreen()); + } + catch (Exception e) + { + tlog.Debug(tag, e.Message.ToString()); + Assert.Fail("Caught Exception : Failed!"); + } + + tlog.Debug(tag, $"SetFullScreen END (OK)"); + } } }