Make ewk_view_feed_touch_event is available.
Currently use tizen webview interface, but tizen webview interface will be
removed later.
Change-Id: I18d39d45280808a253ad7ed139cb777354b25221
Signed-off-by: yh106.jung <yh106.jung@samsung.com>
#include "devtools_delegate_efl.h"
#include "tizen_webview/public/tw_hit_test.h"
-#include "tizen_webview/public/tw_touch_point.h"
#include "tizen_webview/public/tw_web_context.h"
#include "tizen_webview/public/tw_webview.h"
#include "tizen_webview/public/tw_webview_delegate.h"
*handled = policy_decision->GetImpl()->GetNavigationPolicyHandler()->GetDecision() == NavigationPolicyHandlerEfl::Handled;
}
+void EWebView::HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers)
+{
+ const Eina_List* l;
+ void* data;
+ EINA_LIST_FOREACH(points, l, data) {
+ const Ewk_Touch_Point* point = static_cast<Ewk_Touch_Point*>(data);
+ if (point->state == EVAS_TOUCH_POINT_STILL) {
+ // Chromium doesn't expect (and doesn't like) these events.
+ continue;
+ }
+ if (rwhv()) {
+ Evas_Coord_Point pt;
+ pt.x = point->x;
+ pt.y = point->y;
+ ui::TouchEvent touch_event = MakeTouchEvent(
+ pt, point->state, point->id, evas_object());
+ rwhv()->HandleTouchEvent(&touch_event);
+ }
+ }
+}
+
/* FIXME: Figure out wher this code should be placed.
void EWebView::DispatchPostponedGestureEvent(ui::GestureEvent* event) {
Ewk_Settings* settings = GetSettings();
#include "base/id_map.h"
#include "context_menu_controller_efl.h"
#include "eweb_context.h"
+#include "ewk_touch.h"
#include "private/ewk_hit_test_private.h"
#include "private/ewk_auth_challenge_private.h"
#include "private/ewk_settings_private.h"
#include "tizen_webview/public/tw_back_forward_history.h"
#include "tizen_webview/public/tw_back_forward_list_impl.h"
#include "tizen_webview/public/tw_hit_test.h"
-#include "tizen_webview/public/tw_touch_event.h"
#include "tizen_webview/public/tw_callbacks.h"
#include "tizen_webview/public/tw_content_security_policy.h"
#include "tizen_webview/public/tw_find_options.h"
-#include "tizen_webview/public/tw_touch_event.h"
namespace content {
class RenderViewHost;
void SetTouchEventsEnabled(bool enabled);
bool MouseEventsEnabled() const;
void SetMouseEventsEnabled(bool enabled);
+ void HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers);
void Show();
void Hide();
bool ExecuteJavaScript(const char* script, tizen_webview::View_Script_Execute_Callback callback, void* userdata);
Eina_Bool ewk_view_feed_touch_event(Evas_Object *view, Ewk_Touch_Event_Type type, const Eina_List *points, const Evas_Modifier *modifiers)
{
-#if defined(EWK_REFACTOR)
EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false);
- impl->HandleTouchEvents(chromium_glue::to(type), points, modifiers);
+ impl->HandleTouchEvents(type, points, modifiers);
return true;
-#else
- LOG_EWK_API_MOCKUP("Not Supported by chromium");
-#endif
}
Eina_Bool ewk_view_touch_events_enabled_set(Evas_Object *view, Eina_Bool enabled)
return impl_->SetTouchEventsEnabled(enabled);
}
+void WebView::HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *point, const Evas_Modifier *modifiers) {
+ return impl_->HandleTouchEvents(type, point, modifiers);
+}
+
Hit_Test* WebView::RequestHitTestDataAt(int x, int y, Hit_Test_Mode mode) {
return impl_->RequestHitTestDataAt(x, y, mode);
}
#include "tizen_webview/public/tw_hit_test.h"
#include "tizen_webview/public/tw_find_options.h"
#include "tizen_webview/public/tw_macro.h"
-#include "tizen_webview/public/tw_touch_event.h"
+#include "ewk_touch.h"
#include "third_party/WebKit/public/web/WebViewModeEnums.h"
// TODO: Remove this dependency
// ---- Touch & Hit Test
bool TouchEventsEnabled() const;
void SetTouchEventsEnabled(bool enabled);
+ void HandleTouchEvents(Ewk_Touch_Event_Type type, const Eina_List *point, const Evas_Modifier *modifiers);
Hit_Test* RequestHitTestDataAt(int x, int y, Hit_Test_Mode mode);
Eina_Bool AsyncRequestHitTestDataAt(int x, int y, tizen_webview::Hit_Test_Mode mode, tizen_webview::View_Hit_Test_Request_Callback, void* user_data);