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 <wtf/PassOwnPtr.h>
30 static PassOwnPtr<Zoom> create(Evas_Object* viewWidget)
32 return adoptPtr(new Zoom(viewWidget));
36 void start(const WebCore::IntPoint& centerPoint, const WebCore::IntPoint& viewLocation);
37 void update(const double zoom, const WebCore::IntPoint& centerPoint);
41 static const int s_zoomCenterDistanceSquareThreshold = 1;
42 static const double s_scaleFactorThreshold;
44 static Eina_Bool zoomAnimatorCallback(void*);
47 Zoom(Evas_Object* viewWidget);
51 Evas_Object* m_viewWidget;
53 bool m_isZoomInformationUpdated;
54 double m_baseScaleFactor;
55 double m_newScaleFactor;
56 double m_currentScaleFactor;
57 WebCore::IntPoint m_baseScrollPosition;
58 WebCore::IntPoint m_newScrollPosition;
59 WebCore::IntPoint m_basisPoint;
60 WebCore::IntPoint m_centerPoint;
61 WebCore::IntPoint m_viewLocation;
62 Ecore_Animator* m_zoomAnimator;