initial import
[vuplus_webkit] / Source / WebKit2 / UIProcess / qt / qdesktopwebpageproxy.h
1 /*
2  * Copyright (C) 2010, 2011 Nokia Corporation and/or its subsidiary(-ies)
3  *
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.
8  *
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.
13  *
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.
18  *
19  */
20
21 #ifndef qdesktopwebpageproxy_h
22 #define qdesktopwebpageproxy_h
23
24 #include "QtWebPageProxy.h"
25 #include "DrawingAreaProxy.h"
26 #include <wtf/PassOwnPtr.h>
27
28 class QDesktopWebViewPrivate;
29
30 using namespace WebKit;
31
32 class QDesktopWebPageProxy : public QtWebPageProxy
33 {
34 public:
35     QDesktopWebPageProxy(QDesktopWebViewPrivate*, WKContextRef, WKPageGroupRef = 0);
36
37     virtual bool handleEvent(QEvent*);
38
39 protected:
40     void paintContent(QPainter* painter, const QRect& area);
41
42 private:
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);
48 #endif
49
50     virtual void timerEvent(QTimerEvent*);
51
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*);
62
63     QPoint m_tripleClick;
64     QBasicTimer m_tripleClickTimer;
65 };
66
67 #endif /* qdesktopwebpageproxy_h */