merge with master
[platform/framework/native/uix.git] / inc / FUixSensorMotionCommon.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FUixSensorMotionCommon.h
20  * @brief       This is the header file for the declarations of the enumerations of the Sensor namespace.
21  *
22  * This header file contains the declarations of the enumerations of the Sensor namespace.
23  */
24
25 #ifndef _FUIX_SENSOR_MOTION_COMMON_H_
26 #define _FUIX_SENSOR_MOTION_COMMON_H_
27
28 namespace Tizen { namespace Uix { namespace Sensor
29 {
30
31 /**
32  * @enum        MotionType
33  *
34  * Defines the types of motions provided.
35  *
36  * @since       2.0
37  *
38  * @see     Motion::SetEnabled()
39  */
40 enum MotionType
41 {
42         MOTION_TYPE_NONE = 0x0000,      /**< The motion type: None */
43         MOTION_TYPE_SNAP = 0x0001,      /**< The motion type: Snap */
44         MOTION_TYPE_SHAKE = 0x0002,     /**< The motion type: Shake */
45         MOTION_TYPE_DOUBLETAP = 0x0004, /**< The motion type: Tap */
46         MOTION_TYPE_MOVE_TO_EAR = 0x0008, /**< The motion type: Move to ear @b Since: @b 2.1 */
47         MOTION_TYPE_ALL = 0xFFFF,       /**< The motion type: All */
48 };
49
50 /**
51  * @enum  MotionState
52  *
53  * Defines the state of motions. @n
54  * Some event can only be found in a subset of states described below.
55  *
56  * @since       2.0
57  *
58  * @see     IMotionEventListener::OnShakeDetected()
59  */
60 enum MotionState
61 {
62         MOTION_STARTED,     /**< The specified motion has just started */
63         MOTION_INPROGRESS,  /**< The specified motion is happening */
64         MOTION_ENDED,       /**< The specified motion has just ended */
65         MOTION_CANCELLED,   /**< The specified motion has just canceled */
66 };
67
68 /**
69  * @enum  MotionSnapType
70  *
71  * Defines the types of snap provided.
72  *
73  * @since       2.0
74  *
75  * @see     IMotionEventListener::OnSnapDetected()
76  */
77 enum MotionSnapType
78 {
79         MOTION_SNAP_X_POSITIVE, /**< Snaps to positive X */
80         MOTION_SNAP_X_NEGATIVE, /**< Snaps to negative X */
81         MOTION_SNAP_Y_POSITIVE, /**< Snaps to positive Y */
82         MOTION_SNAP_Y_NEGATIVE, /**< Snaps to negative Y */
83         MOTION_SNAP_Z_POSITIVE, /**< Snaps to positive Z */
84         MOTION_SNAP_Z_NEGATIVE, /**< Snaps to negative Z */
85 };
86
87 } } } // Tizen::Uix::Sensor
88
89 #endif //_FUIX_SENSOR_MOTION_COMMON_H_