void QtWebPageEventHandler::handleWheelEvent(QWheelEvent* ev) { QTransform fromItemTransform = m_webPage->transformFromItem(); m_webPageProxy->handleWheelEvent(NativeWebWheelEvent(ev, fromItemTransform)); // FIXME: Handle whether the page used the wheel event or not. if (m_interactionEngine) m_interactionEngine->wheelEvent(ev); }
void GestureController::DragGesture::handleDrag(const GdkEvent* event, double x, double y) { ASSERT(m_inDrag); GUniquePtr<GdkEvent> scrollEvent(gdk_event_new(GDK_SCROLL)); scrollEvent->scroll.time = event->touch.time; scrollEvent->scroll.x = m_start.x(); scrollEvent->scroll.y = m_start.y(); scrollEvent->scroll.x_root = event->touch.x_root; scrollEvent->scroll.y_root = event->touch.y_root; scrollEvent->scroll.direction = GDK_SCROLL_SMOOTH; scrollEvent->scroll.delta_x = (m_offset.x() - x) / Scrollbar::pixelsPerLineStep(); scrollEvent->scroll.delta_y = (m_offset.y() - y) / Scrollbar::pixelsPerLineStep(); scrollEvent->scroll.state = event->touch.state; m_page.handleWheelEvent(NativeWebWheelEvent(scrollEvent.get())); }
void QtWebPageEventHandler::handleWheelEvent(QWheelEvent* ev) { QTransform fromItemTransform = m_webPage->transformFromItem(); m_webPageProxy->handleWheelEvent(NativeWebWheelEvent(ev, fromItemTransform)); }
void WebViewNix::sendWheelEvent(const NIXWheelEvent& event) { page()->handleWheelEvent(NativeWebWheelEvent(event)); }