From 2e2d481748eb77a72e641df559c945439a794595 Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Tue, 09 Oct 2012 08:47:10 +0000 Subject: Touch: on long-press on a link or image show the Palette Show the same Palette as we show when a learner does a right click on a canvas element. We use the LongPress event controller from the toolkit for that. We can only hook this up to the browser widget once it is realized because we need to enable the touch events on the x11 window. When we recognized a long-press event we need to get the information about that canvas element from WebKit. The webkit_web_view_get_hit_test_result API [1] which we use when a right click is recognized does expect an event of type GdkEventButton to be passed. From the x, y coordinates we get with the pressed signal we can construct such an event and and pass that fake event to WebKit. In order to differentiate between a tap and a tap&hold event, we need to inhibit the release event to be further propagated if a long-press occurred before. We use a boolean to differentiate those two cases. [1] http://webkitgtk.org/reference/webkitgtk/stable/webkitgtk-webkitwebview.html#webkit-web-view-get-hit-test-result Signed-off-by: Simon Schampijer Acked-by: Manuel QuiƱones --- (limited to 'activity/activity.info') -- cgit v0.9.1