2 * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
21 #ifndef qdesktopwebpageproxy_h
22 #define qdesktopwebpageproxy_h
24 #include "QtWebPageProxy.h"
25 #include "DrawingAreaProxy.h"
26 #include <wtf/PassOwnPtr.h>
28 class QDesktopWebViewPrivate;
30 using namespace WebKit;
32 class QDesktopWebPageProxy : public QtWebPageProxy
35 QDesktopWebPageProxy(QDesktopWebViewPrivate*, WKContextRef, WKPageGroupRef = 0);
37 virtual bool handleEvent(QEvent*);
40 void paintContent(QPainter* painter, const QRect& area);
43 /* PageClient overrides. */
44 virtual PassOwnPtr<DrawingAreaProxy> createDrawingAreaProxy();
45 virtual void setViewportArguments(const WebCore::ViewportArguments&);
46 #if ENABLE(TOUCH_EVENTS)
47 virtual void doneWithTouchEvent(const NativeWebTouchEvent&, bool wasEventHandled);
50 virtual void timerEvent(QTimerEvent*);
52 bool handleMouseMoveEvent(QGraphicsSceneMouseEvent*);
53 bool handleMousePressEvent(QGraphicsSceneMouseEvent*);
54 bool handleMouseReleaseEvent(QGraphicsSceneMouseEvent*);
55 bool handleMouseDoubleClickEvent(QGraphicsSceneMouseEvent*);
56 bool handleWheelEvent(QGraphicsSceneWheelEvent*);
57 bool handleHoverMoveEvent(QHoverEvent*);
58 bool handleDragEnterEvent(QGraphicsSceneDragDropEvent*);
59 bool handleDragLeaveEvent(QGraphicsSceneDragDropEvent*);
60 bool handleDragMoveEvent(QGraphicsSceneDragDropEvent*);
61 bool handleDropEvent(QGraphicsSceneDragDropEvent*);
64 QBasicTimer m_tripleClickTimer;
67 #endif /* qdesktopwebpageproxy_h */