[Tizen] Add SetVideoHole() for EFL window 99/319699/1
authordongsug.song <dongsug.song@samsung.com>
Sat, 15 Feb 2025 08:56:09 +0000 (17:56 +0900)
committerdongsug.song <dongsug.song@samsung.com>
Sat, 15 Feb 2025 08:56:09 +0000 (17:56 +0900)
Change-Id: I8ed3d64acde277cc883ba436e9904578ec3c67a5

dali-toolkit/devel-api/controls/web-view/web-view.cpp
dali-toolkit/devel-api/controls/web-view/web-view.h
dali-toolkit/internal/controls/web-view/web-view-impl.cpp
dali-toolkit/internal/controls/web-view/web-view-impl.h

index 065e8717bc5da197531f57360c88b7877cc0dca6..27fe02612b49fe5595f4418c1fc6f487c095093c 100755 (executable)
@@ -499,6 +499,10 @@ void WebView::FeedMouseWheel(bool yDirection, int step, int x, int y)
   Dali::Toolkit::GetImpl(*this).FeedMouseWheel(yDirection, step, x, y);
 }
 
+void WebView::SetVideoHole(bool enabled, bool isWaylandWindow)
+{
+  Dali::Toolkit::GetImpl(*this).SetVideoHole(enabled, isWaylandWindow);
+}
 
 WebView::WebView(Internal::WebView& implementation)
 : Control(implementation)
index 8b2e7c7be61b12564c41f012779a76afa1bd6840..3719c79d9beaeb2bb5dcf3747cb95aa8c6e0be99 100755 (executable)
@@ -864,6 +864,13 @@ public:
    */
   void FeedMouseWheel(bool yDirection, int step, int x, int y);
 
+  /**
+   * @brief Enable video hole for a specific window type.
+   * @param[in] enabled True if enabled, false othewise.
+   * @param[in] isWaylandWindow True if wayland window, false if EFL window.
+   */
+  void SetVideoHole(bool enabled, bool isWaylandWindow);
+
   /**
    * @brief Register DeviceConnectionChanged callback.
    *
@@ -878,7 +885,6 @@ public:
    */
   void RegisterDeviceListGetCallback(Dali::WebEnginePlugin::WebEngineDeviceListGetCallback callback);
 
-
 public: // Not intended for application developers
   /// @cond internal
   /**
index f37a00cc7b1a6b50bc8d7c3f8adb6d2bd9a4658c..cfacd74f8394aeee377ae720961524d9a17359b3 100644 (file)
@@ -1014,6 +1014,19 @@ void WebView::FeedMouseWheel(bool yDirection, int step, int x, int y)
   }
 }
 
+void WebView::SetVideoHole(bool enabled, bool isWaylandWindow)
+{
+  mVideoHoleEnabled = enabled;
+
+  EnableBlendMode(!mVideoHoleEnabled);
+
+  if(mWebEngine)
+  {
+    DALI_LOG_DEBUG_INFO("WebView[%p] SetVideoHole(%d) isWaylandWindow(%d)\n", this, mVideoHoleEnabled, isWaylandWindow);
+    mWebEngine.SetVideoHole(mVideoHoleEnabled, isWaylandWindow);
+  }
+}
+
 void WebView::OnFrameRendered()
 {
   if(mFrameRenderedCallback)
index 8cf453c3a41d020f183b72aef7a5b35f64190a1f..ba517780f67eefccc72f55e9b84899c434992e56 100644 (file)
@@ -497,6 +497,11 @@ public:
    */
   void FeedMouseWheel(bool yDirection, int step, int x, int y);
 
+  /**
+   * @copydoc Dali::Toolkit::WebView::SetVideoHole()
+   */
+  void SetVideoHole(bool enabled, bool isWaylandWindow);
+
 public: // Properties
   /**
    * @brief Called when a property of an object of this type is set.