Revert "[CherryPick] Input Method upversion"
[framework/web/webkit-efl.git] / Source / WebKit2 / UIProcess / API / efl / EwkViewImpl.h
1 /*
2    Copyright (C) 2011 Samsung Electronics
3    Copyright (C) 2012 Intel Corporation. All rights reserved.
4
5     This library is free software; you can redistribute it and/or
6     modify it under the terms of the GNU Library General Public
7     License as published by the Free Software Foundation; either
8     version 2 of the License, or (at your option) any later version.
9
10     This library is distributed in the hope that it will be useful,
11     but WITHOUT ANY WARRANTY; without even the implied warranty of
12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13     Library General Public License for more details.
14
15     You should have received a copy of the GNU Library General Public License
16     along with this library; see the file COPYING.LIB.  If not, write to
17     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18     Boston, MA 02110-1301, USA.
19 */
20
21 #ifndef EwkViewImpl_h
22 #define EwkViewImpl_h
23
24 #include <Evas.h>
25 #include <WebCore/IntPoint.h>
26
27 namespace WebCore {
28 class AffineTransform;
29 }
30
31 // FIXME: we have to include ewk_view.h instead of typedef,
32 // because there are "circular include" in the local code unlike open source,
33 // so we can not do typedef again here.
34 //typedef struct Ewk_View_Smart_Data Ewk_View_Smart_Data;
35 #include "ewk_view.h"
36
37 class EwkViewImpl {
38 public:
39
40     explicit EwkViewImpl(Evas_Object* view);
41     ~EwkViewImpl();
42
43     static EwkViewImpl* fromEvasObject(const Evas_Object* view);
44
45     Evas_Object* view() { return m_view; }
46
47 #if ENABLE(TIZEN_WEBKIT2_TILED_BACKING_STORE)
48     WebCore::AffineTransform transformFromView() const;
49     WebCore::AffineTransform transformToView() const;
50 #endif
51     WebCore::AffineTransform transformToScene() const;
52     WebCore::AffineTransform transformFromScene() const;
53     WebCore::AffineTransform transformToScreen() const;
54
55 #if USE(TILED_BACKING_STORE)
56     void setScaleFactor(float scaleFactor) { m_scaleFactor = scaleFactor; }
57     float scaleFactor() const { return m_scaleFactor; }
58
59     void setScrollPosition(WebCore::IntPoint position) { m_scrollPosition = position; }
60     const WebCore::IntPoint scrollPosition() const { return m_scrollPosition; }
61 #endif
62
63 private:
64     inline Ewk_View_Smart_Data* smartData() const;
65
66     Evas_Object* m_view;
67 #if USE(TILED_BACKING_STORE)
68     float m_scaleFactor;
69     WebCore::IntPoint m_scrollPosition;
70 #endif
71 };
72
73 #endif // EwkViewImpl_h