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.
24 #include <Ecore_Evas.h>
25 #ifndef TIZEN_LEGACY_V_2_2_1
26 #include <sensor/sensor.h>
34 static MotionUI& motionUI();
37 void setTiltToZoom(Evas_Object*, bool, unsigned int);
39 void initializeTiltToZoom(Evas_Object*, const Evas_Coord_Point*);
40 void stopTiltToZoom();
41 bool isTiltToZoomStarted();
43 void updateTiltPosition(Evas_Coord_Point* position);
44 void scaleInitialize(double scale);
45 double syncScale(double scale, bool isTiltMode);
48 static Eina_Bool initializeSensor(void*);
49 static void tiltCallback(unsigned long long, int, int, void*);
57 static unsigned int s_tiltToZoomStartAngle;
59 Eina_Hash* m_tiltViewHash;
61 sensor_h m_sensorHandle;
62 Ecore_Timer* m_sensorTimer;
64 Evas_Object* m_ewkView;
65 Evas_Coord_Point m_tiltPosition;
66 bool m_isTiltToZoomStarted;
71 double m_lastTiltScale;
72 double m_lastPinchScale;
73 double tiltBaseScaleFactor;
74 double tiltScaleFactorUnit;