/*
 * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the License);
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef __TIZEN_UIX_GESTURE_COMMON_H__
#define __TIZEN_UIX_GESTURE_COMMON_H__

#include <tizen.h>

#ifdef __cplusplus
extern "C" {
#endif

#ifndef TIZEN_ERROR_GESTURE
#define TIZEN_ERROR_GESTURE             -0x03090000
#endif

/*
 * @file gesture_common.h
 * @brief This file contains gesture's common struct info.
 */

/**
 * @addtogroup CAPI_UIX_GESTURE_MODULE
 * @{
 */

/**
 * @brief Delivery through hand_gesture_recognition_cb() of gesture data handle.
 * @since_tizen @if WEARABLE 6.0 @endif
 */
typedef struct hand_gesture_data_s* hand_gesture_data_h;

/**
 * @brief Enumerations for hand gesture function error.
 *
 * @since_tizen @if WEARABLE 6.0 @endif
 */
typedef enum {
	HAND_GESTURE_ERROR_NONE		= TIZEN_ERROR_NONE,			/**< Successful */
	HAND_GESTURE_ERROR_NOT_SUPPORTED 	= TIZEN_ERROR_NOT_SUPPORTED,		/**< Not supported */
	HAND_GESTURE_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,	/**< Invalid function parameter */
	HAND_GESTURE_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION,	/**< Function not implemented */
	HAND_GESTURE_ERROR_OUT_OF_MEMORY 	= TIZEN_ERROR_OUT_OF_MEMORY,		/**< Out of memory */
	HAND_GESTURE_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,	/**< Permission denied */
	HAND_GESTURE_ERROR_ALREADY_STARTED	= TIZEN_ERROR_GESTURE | 0x01,		/**< Recognition is already started */
	HAND_GESTURE_ERROR_NOT_STARTED	= TIZEN_ERROR_GESTURE | 0x02,		/**< Recognition is not started */
	HAND_GESTURE_ERROR_OPERATION_FAILED	= TIZEN_ERROR_GESTURE | 0x04,		/**< Operation failed because of a system error */
} hand_gesture_error_e;

/**
 * @brief Enumerations for hand gesture types.
 * @since_tizen @if WEARABLE 6.0 @endif
 */
typedef enum {
	HAND_GESTURE_NONE			= 1,	/**< Nothing type */
	HAND_GESTURE_WRIST_UP		= 2,	/**< The wearable device is moved and faced up */
} hand_gesture_type_e;

/**
 * @brief Enumerations for gesture recognition option.
 * @details If the default option is used, the system tries to reduce power consumption.
 *          For example, the recognition engine may stop detecting gestures if the display is turned off.
 *          Using #HAND_GESTURE_OPTION_ALWAYS_ON disables such power-saving functionalities.
 *
 * @since_tizen @if WEARABLE 6.0 @endif
 */
typedef enum {
	HAND_GESTURE_OPTION_DEFAULT		= 1,	/**< Running in the default setting */
	HAND_GESTURE_OPTION_ALWAYS_ON	= 2,	/**< Trying to detect gestures always */
} hand_gesture_option_e;


/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif /* __TIZEN_UIX_GESTURE_COMMON_H__ */
