From 72b14f11b9dd84a40fc570bbc6fc2b2b3530d4b4 Mon Sep 17 00:00:00 2001 From: Wonsik Jung Date: Mon, 16 Oct 2023 20:01:18 +0900 Subject: [PATCH] Supports to set/get full screen sized window To support set/get full screen sized window. The full screen sized window means the window is resized with screen size. In addition, this window is the z-order is the highest. Change-Id: I5363a5ac727d2e35c650644cfe0831217ef38682 --- dali/devel-api/adaptor-framework/window-devel.cpp | 10 ++++++++++ dali/devel-api/adaptor-framework/window-devel.h | 19 +++++++++++++++++++ .../window-system/android/window-base-android.cpp | 10 ++++++++++ .../window-system/android/window-base-android.h | 10 ++++++++++ dali/internal/window-system/common/window-base.h | 17 +++++++++++++++++ dali/internal/window-system/common/window-impl.cpp | 10 ++++++++++ dali/internal/window-system/common/window-impl.h | 10 ++++++++++ dali/internal/window-system/macos/window-base-mac.h | 10 ++++++++++ dali/internal/window-system/macos/window-base-mac.mm | 10 ++++++++++ .../tizen-wayland/ecore-wl/window-base-ecore-wl.h | 10 ++++++++++ .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp | 14 ++++++++++++++ .../tizen-wayland/ecore-wl2/window-base-ecore-wl2.h | 10 ++++++++++ .../window-system/ubuntu-x11/window-base-ecore-x.cpp | 10 ++++++++++ .../window-system/ubuntu-x11/window-base-ecore-x.h | 10 ++++++++++ .../window-system/windows/window-base-win.cpp | 10 ++++++++++ dali/internal/window-system/windows/window-base-win.h | 10 ++++++++++ dali/internal/window-system/x11/window-base-x.cpp | 10 ++++++++++ dali/internal/window-system/x11/window-base-x.h | 10 ++++++++++ 18 files changed, 200 insertions(+) diff --git a/dali/devel-api/adaptor-framework/window-devel.cpp b/dali/devel-api/adaptor-framework/window-devel.cpp index 32ce990..30cf358 100644 --- a/dali/devel-api/adaptor-framework/window-devel.cpp +++ b/dali/devel-api/adaptor-framework/window-devel.cpp @@ -344,6 +344,16 @@ bool KeyboardUnGrab(Window window) return GetImplementation(window).KeyboardUnGrab(); } +void SetFullScreen(Window window, bool fullscreen) +{ + GetImplementation(window).SetFullScreen(fullscreen); +} + +bool GetFullScreen(Window window) +{ + return GetImplementation(window).GetFullScreen(); +} + InterceptKeyEventSignalType& InterceptKeyEventSignal(Window window) { return GetImplementation(window).InterceptKeyEventSignal(); diff --git a/dali/devel-api/adaptor-framework/window-devel.h b/dali/devel-api/adaptor-framework/window-devel.h index eaed6a7..ca2e3e4 100644 --- a/dali/devel-api/adaptor-framework/window-devel.h +++ b/dali/devel-api/adaptor-framework/window-devel.h @@ -621,6 +621,25 @@ DALI_ADAPTOR_API bool KeyboardGrab(Window window, Device::Subclass::Type deviceS DALI_ADAPTOR_API bool KeyboardUnGrab(Window window); /** + * @brief Sets full screen sized window. + * If full screen size is set for the window, + * window will be resized with full screen size. + * In addition, the full screen sized window's z-order is the highest. + * + * @param[in] window The window instance. + * @param[in] fullscreen true to set fullscreen, false to unset. + */ +DALI_ADAPTOR_API void SetFullScreen(Window window, bool fullscreen); + +/** + * @brief Gets whether the full screen sized window or not + * + * @param[in] window The window instance. + * @return Returns true if the full screen sized window is. + */ +DALI_ADAPTOR_API bool GetFullScreen(Window window); + +/** * @brief The user would connect to this signal to intercept a KeyEvent at window. * * Intercepts KeyEvents in the window before dispatching KeyEvents to the control. diff --git a/dali/internal/window-system/android/window-base-android.cpp b/dali/internal/window-system/android/window-base-android.cpp index c2cbdf4..6766567 100644 --- a/dali/internal/window-system/android/window-base-android.cpp +++ b/dali/internal/window-system/android/window-base-android.cpp @@ -469,6 +469,16 @@ bool WindowBaseAndroid::KeyboardUnGrab() return false; } +void WindowBaseAndroid::SetFullScreen(bool fullscreen) +{ + return; +} + +bool WindowBaseAndroid::GetFullScreen() +{ + return false; +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/android/window-base-android.h b/dali/internal/window-system/android/window-base-android.h index c2a183c..2638cb3 100644 --- a/dali/internal/window-system/android/window-base-android.h +++ b/dali/internal/window-system/android/window-base-android.h @@ -494,6 +494,16 @@ public: */ bool KeyboardUnGrab() override; + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetFullScreen() + */ + void SetFullScreen(bool fullscreen) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetFullScreen() + */ + bool GetFullScreen() override; + private: /** * Second stage initialization diff --git a/dali/internal/window-system/common/window-base.h b/dali/internal/window-system/common/window-base.h index 782bc9e..4a80d81 100644 --- a/dali/internal/window-system/common/window-base.h +++ b/dali/internal/window-system/common/window-base.h @@ -530,6 +530,23 @@ public: */ virtual bool KeyboardUnGrab() = 0; + /** + * @brief Sets full screen sized window. + * If full screen size is set for the window, + * window will be resized with full screen size. + * In addition, the full screen sized window's z-order is the highest. + * + * @param[in] fullscreen true to set fullscreen, false to unset. + */ + virtual void SetFullScreen(bool fullscreen) = 0; + + /** + * @brief Gets whether the full screen sized window or not + * + * @return Returns true if the full screen sized window is. + */ + virtual bool GetFullScreen() = 0; + // Signals /** diff --git a/dali/internal/window-system/common/window-impl.cpp b/dali/internal/window-system/common/window-impl.cpp index 0169aed..d78acb8 100644 --- a/dali/internal/window-system/common/window-impl.cpp +++ b/dali/internal/window-system/common/window-impl.cpp @@ -1460,6 +1460,16 @@ bool Window::KeyboardUnGrab() return mWindowBase->KeyboardUnGrab(); } +void Window::SetFullScreen(bool fullscreen) +{ + mWindowBase->SetFullScreen(fullscreen); +} + +bool Window::GetFullScreen() +{ + return mWindowBase->GetFullScreen(); +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/common/window-impl.h b/dali/internal/window-system/common/window-impl.h index e294770..99611db 100644 --- a/dali/internal/window-system/common/window-impl.h +++ b/dali/internal/window-system/common/window-impl.h @@ -547,6 +547,16 @@ public: // Dali::Internal::Adaptor::SceneHolder */ bool KeyboardUnGrab(); + /** + * @copydoc Dali::DevelWindow::SetFullScreen() + */ + void SetFullScreen(bool fullscreen); + + /** + * @copydoc Dali::DevelWindow::GetFullScreen() + */ + bool GetFullScreen(); + private: /** * @brief Enumeration for orietation mode. diff --git a/dali/internal/window-system/macos/window-base-mac.h b/dali/internal/window-system/macos/window-base-mac.h index 0cfa0cc..425bcc5 100644 --- a/dali/internal/window-system/macos/window-base-mac.h +++ b/dali/internal/window-system/macos/window-base-mac.h @@ -427,6 +427,16 @@ public: */ bool KeyboardUnGrab() override; + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetFullScreen() + */ + void SetFullScreen(bool fullscreen) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetFullScreen() + */ + bool GetFullScreen() override; + private: // Undefined WindowBaseCocoa(const WindowBaseCocoa&) = delete; diff --git a/dali/internal/window-system/macos/window-base-mac.mm b/dali/internal/window-system/macos/window-base-mac.mm index 06f9f58..374698d 100644 --- a/dali/internal/window-system/macos/window-base-mac.mm +++ b/dali/internal/window-system/macos/window-base-mac.mm @@ -762,6 +762,16 @@ bool WindowBaseCocoa::KeyboardUnGrab() return false; } +void WindowBaseCocoa::SetFullScreen(bool fullscreen) +{ + return; +} + +bool WindowBaseCocoa::GetFullScreen() +{ + return false; +} + } // namespace Dali::Internal::Adaptor @implementation CocoaView diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h index 9621acd..08bfd90 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h @@ -549,6 +549,16 @@ public: */ bool KeyboardUnGrab() override; + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetFullScreen() + */ + void SetFullScreen(bool fullscreen) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetFullScreen() + */ + bool GetFullScreen() override; + private: /** * Second stage initialization diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp index add39ec..c8b8e64 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp @@ -3491,6 +3491,20 @@ bool WindowBaseEcoreWl2::KeyboardUnGrab() return ecore_wl2_window_keyboard_ungrab(mEcoreWindow); } +void WindowBaseEcoreWl2::SetFullScreen(bool fullscreen) +{ + DALI_LOG_RELEASE_INFO("ecore_wl2_window_fullscreen_set, window: [%p], fullscreen [%d]\n", mEcoreWindow, fullscreen); + START_DURATION_CHECK(); + ecore_wl2_window_fullscreen_set(mEcoreWindow, fullscreen); + ecore_wl2_window_commit(mEcoreWindow, EINA_TRUE); + FINISH_DURATION_CHECK("ecore_wl2_window_fullscreen_set"); +} + +bool WindowBaseEcoreWl2::GetFullScreen() +{ + return ecore_wl2_window_fullscreen_get(mEcoreWindow); +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h index 0546e89..6acb007 100644 --- a/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h +++ b/dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h @@ -631,6 +631,16 @@ public: */ bool KeyboardUnGrab() override; + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetFullScreen() + */ + void SetFullScreen(bool fullscreen) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetFullScreen() + */ + bool GetFullScreen() override; + private: /** * Second stage initialization diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp index 1b91b48..4356914 100644 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp @@ -1056,6 +1056,16 @@ bool WindowBaseEcoreX::KeyboardUnGrab() return false; } +void WindowBaseEcoreX::SetFullScreen(bool fullscreen) +{ + return; +} + +bool WindowBaseEcoreX::GetFullScreen() +{ + return false; +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h index b5330f4..0219289 100644 --- a/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h +++ b/dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h @@ -499,6 +499,16 @@ public: */ bool KeyboardUnGrab() override; + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetFullScreen() + */ + void SetFullScreen(bool fullscreen) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetFullScreen() + */ + bool GetFullScreen() override; + private: /** * Second stage initialization diff --git a/dali/internal/window-system/windows/window-base-win.cpp b/dali/internal/window-system/windows/window-base-win.cpp index 8f78ca7..dead822 100644 --- a/dali/internal/window-system/windows/window-base-win.cpp +++ b/dali/internal/window-system/windows/window-base-win.cpp @@ -691,6 +691,16 @@ bool WindowBaseWin::KeyboardUnGrab() return false; } +void WindowBaseWin::SetFullScreen(bool fullscreen) +{ + return; +} + +bool WindowBaseWin::GetFullScreen() +{ + return false; +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/windows/window-base-win.h b/dali/internal/window-system/windows/window-base-win.h index d615730..ab5089f 100644 --- a/dali/internal/window-system/windows/window-base-win.h +++ b/dali/internal/window-system/windows/window-base-win.h @@ -481,6 +481,16 @@ public: */ bool KeyboardUnGrab() override; + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetFullScreen() + */ + void SetFullScreen(bool fullscreen) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetFullScreen() + */ + bool GetFullScreen() override; + private: /** * Second stage initialization diff --git a/dali/internal/window-system/x11/window-base-x.cpp b/dali/internal/window-system/x11/window-base-x.cpp index 1f21851..3b44812 100644 --- a/dali/internal/window-system/x11/window-base-x.cpp +++ b/dali/internal/window-system/x11/window-base-x.cpp @@ -992,6 +992,16 @@ bool WindowBaseX::KeyboardUnGrab() return false; } +void WindowBaseX::SetFullScreen(bool fullscreen) +{ + return; +} + +bool WindowBaseX::GetFullScreen() +{ + return false; +} + } // namespace Adaptor } // namespace Internal diff --git a/dali/internal/window-system/x11/window-base-x.h b/dali/internal/window-system/x11/window-base-x.h index f102627..b7dc54c 100644 --- a/dali/internal/window-system/x11/window-base-x.h +++ b/dali/internal/window-system/x11/window-base-x.h @@ -503,6 +503,16 @@ public: */ bool KeyboardUnGrab() override; + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::SetFullScreen() + */ + void SetFullScreen(bool fullscreen) override; + + /** + * @copydoc Dali::Internal::Adaptor::WindowBase::GetFullScreen() + */ + bool GetFullScreen() override; + private: /** * Second stage initialization -- 2.7.4