2 * Copyright (C) 2012 Samsung Electronics
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.
25 #include <WebCore/IntPoint.h>
26 #include <WebCore/IntRect.h>
27 #include <wtf/PassOwnPtr.h>
33 static PassOwnPtr<SmartZoom> create(Evas_Object* viewWidget)
35 return adoptPtr(new SmartZoom(viewWidget));
39 void start(int x, int y);
40 void setZoomableArea(const WebCore::IntPoint&, const WebCore::IntRect&);
44 static const int s_numberOfCosineValue = 17;
45 static const float s_cosine[s_numberOfCosineValue];
46 static const int s_xMargin = 1;
47 static const int s_widthMargin = 4;
49 static Eina_Bool scaleAnimatorCallback(void*);
52 SmartZoom(Evas_Object*);
55 Evas_Object* m_viewWidget;
56 EwkViewImpl* m_viewImpl;
57 Ecore_Animator* m_scaleAnimator;
58 double m_baseScaleFactor;
59 double m_newScaleFactor;
60 double m_targetScaleFactor;
61 WebCore::IntPoint m_basisPoint;
62 WebCore::IntPoint m_baseScrollPosition;