#include "public/ewk_media_subtitle_info_product.h"
#include "public/ewk_user_media_internal.h"
#include "third_party/blink/public/platform/web_media_player.h"
-#include "tizen_src/chromium_impl/tizen/tizen_tv_platform.h"
#endif
#if defined(TIZEN_PEPPER_EXTENSIONS)
}
void EWebView::SetMouseEventsEnabled(bool enabled) {
-#if defined(OS_TIZEN_TV_PRODUCT)
- if (IsSmartMonitorType()) {
- if (rwhv())
- rwhv()->SetMouseEventsEnabled(enabled);
- }
-#endif
-
if (mouse_events_enabled_ == enabled)
return;
SmartCallback<EWebViewCallbacks::DeviceConnectionChanged>().call(
&device_type);
}
+
+bool EWebView::SetMousePointerSupport(bool support) {
+ if (mouse_pointer_support_ == support)
+ return true;
+
+ if (!rwhv()) {
+ LOG(ERROR) << __FUNCTION__ << "rwhv is null,just return!";
+ return false;
+ }
+
+ rwhv()->SetMouseEventsEnabled(support);
+ mouse_pointer_support_ = support;
+
+ return true;
+}
+
+bool EWebView::MousePointerSupport() const {
+ return mouse_pointer_support_;
+}
#endif
uint32_t current);
void NotifyMediaDeviceConnectionChanged(int device_type);
const std::string& GetActiveDRM() const;
+ bool SetMousePointerSupport(bool supported);
+ bool MousePointerSupport() const;
#if defined(TIZEN_MULTIMEDIA_DRMMANAGER_SUPPORT)
void NotifyDRMInitData(int init_type, const std::vector<unsigned char>& data);
int NotifyDRMInitComplete(unsigned int pssh_data_length,
#if defined(OS_TIZEN_TV_PRODUCT)
base::OnceClosure pending_setfocus_closure_;
+ bool mouse_pointer_support_ = true;
#endif
base::WeakPtrFactory<EWebView> weak_factory_ {this};
#endif
}
+/* LCOV_EXCL_START */
+Eina_Bool ewk_view_mouse_pointer_support_set(Evas_Object *view, Eina_Bool support)
+{
+#if defined(OS_TIZEN_TV_PRODUCT)
+ EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, EINA_FALSE);
+ LOG(INFO) << "ewk_view_mouse_pointer_support_set:"<<(!!support);
+ return impl->SetMousePointerSupport(!!support);
+#else
+ LOG_EWK_API_MOCKUP("Only for Tizen TV.");
+ return EINA_FALSE;
+#endif
+}
+
+Eina_Bool ewk_view_mouse_pointer_support_get(const Evas_Object *view)
+{
+#if defined(OS_TIZEN_TV_PRODUCT)
+ EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
+ return impl->MousePointerSupport();
+#else
+ LOG_EWK_API_MOCKUP("Only for Tizen TV.");
+ return EINA_FALSE;
+#endif
+}
+
/* LCOV_EXCL_STOP */
EXPORT_API void ewk_view_media_device_list_get(Evas_Object* o, Ewk_Media_Device_List_Get_Callback callback, void* user_data);
+
+/**
+ * Sets whether the ewk_view supports the mouse pointer(include support the mouse event and update the cursor) or not.
+ *
+ * The ewk_view will support the mouse pointer(include support the mouse event and update the cursor) if EINA_TRUE
+ * or not support the mouse pointer otherwise. The default value is EINA_TRUE.
+ *
+ * @param o view object to support/don't support the mouse pointer
+ * @param supported a state to set
+ *
+ * @return @c EINA_TRUE on success or @c EINA_FALSE on failure
+ */
+EXPORT_API Eina_Bool ewk_view_mouse_pointer_support_set(Evas_Object *view, Eina_Bool support);
+
+/**
+ * Queries if the ewk_view supports the mouse pointer(include support the mouse event and update the cursor).
+ *
+ * @param o view object to query if the mouse pointer are suppored
+ *
+ * @return @c EINA_TRUE if the mouse pointer are enabled or @c EINA_FALSE otherwise
+ */
+EXPORT_API Eina_Bool ewk_view_mouse_pointer_support_get(const Evas_Object *view);
+
+
#ifdef __cplusplus
}
#endif