Supports to set/get full screen sized window 78/300078/7
authorWonsik Jung <sidein@samsung.com>
Mon, 16 Oct 2023 11:01:18 +0000 (20:01 +0900)
committerWonsik Jung <sidein@samsung.com>
Tue, 24 Oct 2023 04:31:32 +0000 (13:31 +0900)
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

18 files changed:
dali/devel-api/adaptor-framework/window-devel.cpp
dali/devel-api/adaptor-framework/window-devel.h
dali/internal/window-system/android/window-base-android.cpp
dali/internal/window-system/android/window-base-android.h
dali/internal/window-system/common/window-base.h
dali/internal/window-system/common/window-impl.cpp
dali/internal/window-system/common/window-impl.h
dali/internal/window-system/macos/window-base-mac.h
dali/internal/window-system/macos/window-base-mac.mm
dali/internal/window-system/tizen-wayland/ecore-wl/window-base-ecore-wl.h
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.h
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/window-base-ecore-x.h
dali/internal/window-system/windows/window-base-win.cpp
dali/internal/window-system/windows/window-base-win.h
dali/internal/window-system/x11/window-base-x.cpp
dali/internal/window-system/x11/window-base-x.h

index 32ce990..30cf358 100644 (file)
@@ -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();
index eaed6a7..ca2e3e4 100644 (file)
@@ -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.
index c2cbdf4..6766567 100644 (file)
@@ -469,6 +469,16 @@ bool WindowBaseAndroid::KeyboardUnGrab()
   return false;
 }
 
+void WindowBaseAndroid::SetFullScreen(bool fullscreen)
+{
+  return;
+}
+
+bool WindowBaseAndroid::GetFullScreen()
+{
+  return false;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index c2a183c..2638cb3 100644 (file)
@@ -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
index 782bc9e..4a80d81 100644 (file)
@@ -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
 
   /**
index 0169aed..d78acb8 100644 (file)
@@ -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
index e294770..99611db 100644 (file)
@@ -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.
index 0cfa0cc..425bcc5 100644 (file)
@@ -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;
index 06f9f58..374698d 100644 (file)
@@ -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
index 9621acd..08bfd90 100644 (file)
@@ -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
index add39ec..c8b8e64 100644 (file)
@@ -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
index 0546e89..6acb007 100644 (file)
@@ -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
index 1b91b48..4356914 100644 (file)
@@ -1056,6 +1056,16 @@ bool WindowBaseEcoreX::KeyboardUnGrab()
   return false;
 }
 
+void WindowBaseEcoreX::SetFullScreen(bool fullscreen)
+{
+  return;
+}
+
+bool WindowBaseEcoreX::GetFullScreen()
+{
+  return false;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index b5330f4..0219289 100644 (file)
@@ -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
index 8f78ca7..dead822 100644 (file)
@@ -691,6 +691,16 @@ bool WindowBaseWin::KeyboardUnGrab()
   return false;
 }
 
+void WindowBaseWin::SetFullScreen(bool fullscreen)
+{
+  return;
+}
+
+bool WindowBaseWin::GetFullScreen()
+{
+  return false;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index d615730..ab5089f 100644 (file)
@@ -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
index 1f21851..3b44812 100644 (file)
@@ -992,6 +992,16 @@ bool WindowBaseX::KeyboardUnGrab()
   return false;
 }
 
+void WindowBaseX::SetFullScreen(bool fullscreen)
+{
+  return;
+}
+
+bool WindowBaseX::GetFullScreen()
+{
+  return false;
+}
+
 } // namespace Adaptor
 
 } // namespace Internal
index f102627..b7dc54c 100644 (file)
@@ -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