Move header into proper file
[platform/core/api/gesture.git] / include / gesture_common.h
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __TIZEN_UIX_GESTURE_COMMON_H__
18 #define __TIZEN_UIX_GESTURE_COMMON_H__
19
20 #include <tizen.h>
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 #ifndef TIZEN_ERROR_GESTURE
27 #define TIZEN_ERROR_GESTURE             -0x03090000
28 #endif
29
30 /*
31  * @file gesture_common.h
32  * @brief This file contains gesture's common struct info.
33  */
34
35 /**
36  * @addtogroup CAPI_UIX_GESTURE_MODULE
37  * @{
38  */
39
40 /**
41  * @brief Delivery through hand_gesture_recognition_cb() of gesture data handle.
42  * @since_tizen @if WEARABLE 6.0 @endif
43  */
44 typedef struct hand_gesture_data_s* hand_gesture_data_h;
45
46 /**
47  * @brief Enumerations for hand gesture function error.
48  *
49  * @since_tizen @if WEARABLE 6.0 @endif
50  */
51 typedef enum {
52         HAND_GESTURE_ERROR_NONE         = TIZEN_ERROR_NONE,                     /**< Successful */
53         HAND_GESTURE_ERROR_NOT_SUPPORTED        = TIZEN_ERROR_NOT_SUPPORTED,            /**< Not supported */
54         HAND_GESTURE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,   /**< Invalid function parameter */
55         HAND_GESTURE_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,   /**< Function not implemented */
56         HAND_GESTURE_ERROR_OUT_OF_MEMORY        = TIZEN_ERROR_OUT_OF_MEMORY,            /**< Out of memory */
57         HAND_GESTURE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,   /**< Permission denied */
58         HAND_GESTURE_ERROR_ALREADY_STARTED      = TIZEN_ERROR_GESTURE | 0x01,           /**< Recognition is already started */
59         HAND_GESTURE_ERROR_NOT_STARTED  = TIZEN_ERROR_GESTURE | 0x02,           /**< Recognition is not started */
60         HAND_GESTURE_ERROR_OPERATION_FAILED     = TIZEN_ERROR_GESTURE | 0x04,           /**< Operation failed because of a system error */
61 } hand_gesture_error_e;
62
63 /**
64  * @brief Enumerations for hand gesture types.
65  * @since_tizen @if WEARABLE 6.0 @endif
66  */
67 typedef enum {
68         HAND_GESTURE_NONE                       = 1,    /**< Nothing type */
69         HAND_GESTURE_WRIST_UP           = 2,    /**< The wearable device is moved and faced up */
70 } hand_gesture_type_e;
71
72 /**
73  * @brief Enumerations for gesture recognition option.
74  * @details If the default option is used, the system tries to reduce power consumption.
75  *          For example, the recognition engine may stop detecting gestures if the display is turned off.
76  *          Using #HAND_GESTURE_OPTION_ALWAYS_ON disables such power-saving functionalities.
77  *
78  * @since_tizen @if WEARABLE 6.0 @endif
79  */
80 typedef enum {
81         HAND_GESTURE_OPTION_DEFAULT             = 1,    /**< Running in the default setting */
82         HAND_GESTURE_OPTION_ALWAYS_ON   = 2,    /**< Trying to detect gestures always */
83 } hand_gesture_option_e;
84
85
86 /**
87  * @}
88  */
89
90 #ifdef __cplusplus
91 }
92 #endif
93
94 #endif /* __TIZEN_UIX_GESTURE_COMMON_H__ */