summaryrefslogtreecommitdiffstats
path: root/WebKit/efl/ewk/ewk_frame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/efl/ewk/ewk_frame.cpp')
-rw-r--r--WebKit/efl/ewk/ewk_frame.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp
index 5076be5..1cadc77 100644
--- a/WebKit/efl/ewk/ewk_frame.cpp
+++ b/WebKit/efl/ewk/ewk_frame.cpp
@@ -24,6 +24,7 @@
#include "config.h"
#include "ewk_frame.h"
+#include "DocumentMarkerController.h"
#include "EWebKit.h"
#include "EventHandler.h"
#include "FocusController.h"
@@ -36,6 +37,7 @@
#include "KURL.h"
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
+#include "PlatformTouchEvent.h"
#include "PlatformWheelEvent.h"
#include "ProgressTracker.h"
#include "RefPtr.h"
@@ -191,6 +193,7 @@ static void _ewk_frame_smart_add(Evas_Object* o)
sd->self = o;
_parent_sc.add(o);
+ evas_object_static_clip_set(sd->base.clipper, EINA_FALSE);
evas_object_move(sd->base.clipper, 0, 0);
evas_object_resize(sd->base.clipper, 0, 0);
@@ -1474,6 +1477,42 @@ Eina_Bool ewk_frame_feed_mouse_move(Evas_Object* o, const Evas_Event_Mouse_Move*
return sd->frame->eventHandler()->mouseMoved(event);
}
+Eina_Bool ewk_frame_feed_touch_event(Evas_Object* o, Ewk_Touch_Event_Type action, Eina_List* points, int metaState)
+{
+ Eina_Bool ret = EINA_FALSE;
+
+#if ENABLE(TOUCH_EVENTS)
+ EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(points, EINA_FALSE);
+
+ Evas_Coord x, y;
+ evas_object_geometry_get(sd->view, &x, &y, 0, 0);
+
+ WebCore::TouchEventType type = WebCore::TouchStart;
+ switch (action) {
+ case EWK_TOUCH_START:
+ type = WebCore::TouchStart;
+ break;
+ case EWK_TOUCH_END:
+ type = WebCore::TouchEnd;
+ break;
+ case EWK_TOUCH_MOVE:
+ type = WebCore::TouchMove;
+ break;
+ case EWK_TOUCH_CANCEL:
+ type = WebCore::TouchCancel;
+ break;
+ default:
+ return EINA_FALSE;
+ }
+
+ WebCore::PlatformTouchEvent te(points, WebCore::IntPoint(x, y), type, metaState);
+ ret = sd->frame->eventHandler()->handleTouchEvent(te);
+#endif
+ return ret;
+}
+
static inline Eina_Bool _ewk_frame_handle_key_scrolling(WebCore::Frame* frame, const WebCore::PlatformKeyboardEvent &event)
{
WebCore::ScrollDirection direction;