From 7d771148677a28ce1c0edde11c0635d12884403f Mon Sep 17 00:00:00 2001 From: Gwanglim Lee Date: Mon, 30 May 2016 18:34:58 +0900 Subject: [PATCH] Added efl_util.h.in to choose since version at build time instead of two separated header files. Change-Id: I75b3757d0e2bb7f2fd36e3f0a59eb6ef6d12b5d2 --- CMakeLists.txt | 4 +- include/{common/efl_util.h => efl_util.h.in} | 64 ++-- include/wearable/efl_util.h | 435 --------------------------- packaging/capi-ui-efl-util.spec | 12 + 4 files changed, 47 insertions(+), 468 deletions(-) rename include/{common/efl_util.h => efl_util.h.in} (92%) delete mode 100644 include/wearable/efl_util.h diff --git a/CMakeLists.txt b/CMakeLists.txt index fb7891c..ab41c1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,11 +9,9 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX}) IF (TIZEN_WEARABLE) ADD_DEFINITIONS("-DTIZEN_WEARABLE") - SET(INC_DIR "include/wearable") -ELSE (TIZEN_WEARABLE) - SET(INC_DIR "include/common") ENDIF (TIZEN_WEARABLE) +SET(INC_DIR include) INCLUDE_DIRECTORIES(${INC_DIR}) # required dependencies diff --git a/include/common/efl_util.h b/include/efl_util.h.in similarity index 92% rename from include/common/efl_util.h rename to include/efl_util.h.in index c8fbd42..2508d67 100644 --- a/include/common/efl_util.h +++ b/include/efl_util.h.in @@ -52,12 +52,12 @@ typedef enum EFL_UTIL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ EFL_UTIL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ EFL_UTIL_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - EFL_UTIL_ERROR_NO_SUCH_DEVICE = TIZEN_ERROR_NO_SUCH_DEVICE, /**< @platform No such device or address (@b Since: 2.4) */ - EFL_UTIL_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< @platform Function not implemented (@b Since: 2.4) */ - EFL_UTIL_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< @platform Not supported (@b Since: 2.4) */ + EFL_UTIL_ERROR_NO_SUCH_DEVICE = TIZEN_ERROR_NO_SUCH_DEVICE, /**< @platform No such device or address (@b Since: $TZ_CFG_VER_24_OR_30$) */ + EFL_UTIL_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< @platform Function not implemented (@b Since: $TZ_CFG_VER_24_OR_30$) */ + EFL_UTIL_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< @platform Not supported (@b Since: $TZ_CFG_VER_24_OR_30$) */ EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE = TIZEN_ERROR_EFL_UTIL | 0x01, /**< Window type not supported */ - EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL = TIZEN_ERROR_EFL_UTIL | 0x02, /**< @platform Screenshot initialization fail (@b Since: 2.4) */ - EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL = TIZEN_ERROR_EFL_UTIL | 0x03 /**< @platform Screenshot execution fail (@b Since: 2.4) */ + EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL = TIZEN_ERROR_EFL_UTIL | 0x02, /**< @platform Screenshot initialization fail (@b Since: $TZ_CFG_VER_24_OR_30$) */ + EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL = TIZEN_ERROR_EFL_UTIL | 0x03 /**< @platform Screenshot execution fail (@b Since: $TZ_CFG_VER_24_OR_30$) */ } efl_util_error_e; /** @@ -66,19 +66,19 @@ typedef enum */ typedef enum { - EFL_UTIL_NOTIFICATION_LEVEL_1, /**< Default notification level. (Deprecated since 2.4. Use EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT instead.) */ - EFL_UTIL_NOTIFICATION_LEVEL_2, /**< Higher notification level than default. (Deprecated since 2.4. Use EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM instead.) */ - EFL_UTIL_NOTIFICATION_LEVEL_3, /**< The highest notification level. (Deprecated since 2.4. Use EFL_UTIL_NOTIFICATION_LEVEL_TOP instead.) */ - EFL_UTIL_NOTIFICATION_LEVEL_NONE = -1, /**< No (reset) notification level. This value makes the window place in normal layer. (@b Since: 2.4) */ - EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT = 10, /**< Default notification level. (@b Since: 2.4) */ - EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM = 20, /**< Higher notification level than default. (@b Since: 2.4) */ - EFL_UTIL_NOTIFICATION_LEVEL_HIGH = 30, /**< Higher notification level than medium. (@b Since: 2.4) */ - EFL_UTIL_NOTIFICATION_LEVEL_TOP = 40 /**< The highest notification level. (@b Since: 2.4) */ + EFL_UTIL_NOTIFICATION_LEVEL_1, /**< Default notification level. (Deprecated since $TZ_CFG_VER_24_OR_30$. Use EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT instead.) */ + EFL_UTIL_NOTIFICATION_LEVEL_2, /**< Higher notification level than default. (Deprecated since $TZ_CFG_VER_24_OR_30$. Use EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM instead.) */ + EFL_UTIL_NOTIFICATION_LEVEL_3, /**< The highest notification level. (Deprecated since $TZ_CFG_VER_24_OR_30$. Use EFL_UTIL_NOTIFICATION_LEVEL_TOP instead.) */ + EFL_UTIL_NOTIFICATION_LEVEL_NONE = -1, /**< No (reset) notification level. This value makes the window place in normal layer. (@b Since: $TZ_CFG_VER_24_OR_30$) */ + EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT = 10, /**< Default notification level. (@b Since: $TZ_CFG_VER_24_OR_30$) */ + EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM = 20, /**< Higher notification level than default. (@b Since: $TZ_CFG_VER_24_OR_30$) */ + EFL_UTIL_NOTIFICATION_LEVEL_HIGH = 30, /**< Higher notification level than medium. (@b Since: $TZ_CFG_VER_24_OR_30$) */ + EFL_UTIL_NOTIFICATION_LEVEL_TOP = 40 /**< The highest notification level. (@b Since: $TZ_CFG_VER_24_OR_30$) */ } efl_util_notification_level_e; /** * @brief Enumeration of screen mode. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ */ typedef enum { @@ -92,7 +92,7 @@ typedef enum * @privlevel public * @privilege %http://tizen.org/privilege/window.priority.set * @remarks This API can be used for a notification type window only. - * Up to the version 2.4, it supports as async APIs. + * Up to the version $TZ_CFG_VER_24_OR_231$, it supports as async APIs. * But it is synchronous call since Tizen 3.0 * @param[in] window The EFL window * @param[in] level The notification window level @@ -109,7 +109,7 @@ API int efl_util_set_notification_window_level(Evas_Object *window, efl_util_not * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif * * @remarks This API can be used for a notification type window only. - * Up to the version 2.4, it supports as async APIs. + * Up to the version $TZ_CFG_VER_24_OR_231$, it supports as async APIs. * But it is synchronous call since Tizen 3.0 * @param[in] window The EFL window * @param[out] level The notification window level @@ -170,7 +170,7 @@ API int efl_util_unset_notification_window_level_error_cb(Evas_Object *window); * If the alpha window sets the visual state to the opaque, * then the window manager could handle it as the opaque window while calculating visibility. * This API will have no effect when used by a non-alpha window. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @param[in] window The EFL window * @param[in] opaque The value that indicates whether the window has set a visual state to opaque (0: unset, 1: set) * @return @c 0 on success, otherwise a negative error value @@ -186,12 +186,14 @@ API int efl_util_set_window_opaque_state(Evas_Object *window, int opaque); * the window manager requests the display system to keep the display on as long as the window is shown. * If the window is no longer shown, then the window manger request the display system to go back to normal operation. * Default screen mode of window is #EFL_UTIL_SCREEN_MODE_DEFAULT. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @privlevel public * @privilege %http://tizen.org/privilege/display * @remarks This API needs the privilege. * If the application which is not get the privilege use this API, the window manager generates the permission deny error. + $TZ_CFG_KEEP_BEGIN$ * The application can notice this error if it set the callback function using the efl_util_set_window_screen_mode_error_cb(). + $TZ_CFG_KEEP_END$ * @param[in] window The EFL window * @param[in] mode The screen mode * @return @c 0 on success, otherwise a negative error value @@ -203,7 +205,7 @@ API int efl_util_set_window_screen_mode(Evas_Object *window, efl_util_screen_mod /** * @brief Gets the screen mode of the specified window. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @param[in] window The EFL window * @param[out] mode The screen mode * @return @c 0 on success, otherwise a negative error value @@ -212,6 +214,7 @@ API int efl_util_set_window_screen_mode(Evas_Object *window, efl_util_screen_mod */ API int efl_util_get_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e *mode); +$TZ_CFG_KEEP_BEGIN$ /** * @deprecated Deprecated since 3.0. * @brief Called when an error occurs for setting window's screen mode @@ -255,6 +258,7 @@ API int efl_util_set_window_screen_mode_error_cb(Evas_Object *window, efl_util_w * @see efl_util_set_window_screen_mode_error_cb() */ API int efl_util_unset_window_screen_mode_error_cb(Evas_Object *window); +$TZ_CFG_KEEP_END$ /** * @brief Sets the user's preferred brightness of the specified window. @@ -304,7 +308,7 @@ API int efl_util_get_window_brightness(Evas_Object *window, int *brightness); /** * @platform * @brief Definition for the input generator handle. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ */ typedef struct _efl_util_inputgen_h * efl_util_inputgen_h; @@ -312,7 +316,7 @@ API int efl_util_get_window_brightness(Evas_Object *window, int *brightness); /** * @platform * @brief Enumeration of device type generated events. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ */ typedef enum { @@ -327,7 +331,7 @@ typedef enum /** * @platform * @brief Enumeration of touch event types. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ */ typedef enum { @@ -341,7 +345,7 @@ typedef enum /** * @platform * @brief Initializes system and check input generate functions are supported, open devices generated events. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @privlevel platform * @privilege %http://tizen.org/privilege/inputgenerator * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. @@ -360,7 +364,7 @@ API efl_util_inputgen_h efl_util_input_initialize_generator(efl_util_input_devic /** * @platform * @brief Deinitializes system and close opened devices. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @privlevel platform * @privilege %http://tizen.org/privilege/inputgenerator * @param[in] inputgen_h The efl_util_inputgen_h handle @@ -374,7 +378,7 @@ API int efl_util_input_deinitialize_generator(efl_util_inputgen_h inputgen_h); /** * @platform * @brief Generates all of key events using a opened device. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @privlevel platform * @privilege %http://tizen.org/privilege/inputgenerator * @param[in] key_name The key name want to generate @@ -389,7 +393,7 @@ API int efl_util_input_generate_key(efl_util_inputgen_h inputgen_h, const char * /** * @platform * @brief Generates a touch event using a opened device. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @privlevel platform * @privilege %http://tizen.org/privilege/inputgenerator * @param[in] idx The index of touched finger @@ -413,14 +417,14 @@ API int efl_util_input_generate_touch(efl_util_inputgen_h inputgen_h, int idx, e /** * @platform * @brief Definition for the screenshot handle. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ */ typedef struct _efl_util_screenshot_h * efl_util_screenshot_h; /** * @platform * @brief Initializes the screenshot. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @privlevel platform * @privilege %http://tizen.org/privilege/screenshot * @remarks The specific error code can be obtained using the get_last_result() @@ -440,7 +444,7 @@ API efl_util_screenshot_h efl_util_screenshot_initialize(int width, int height); /** * @platform * @brief Takes a screenshot and get a tbm_surface handle. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @privlevel platform * @privilege %http://tizen.org/privilege/screenshot * @remarks The specific error code can be obtained using the get_last_result() @@ -459,7 +463,7 @@ API tbm_surface_h efl_util_screenshot_take_tbm_surface(efl_util_screenshot_h scr /** * @platform * @brief Deinitializes the screenshot. - * @since_tizen 2.4 + * @since_tizen $TZ_CFG_VER_24_OR_30$ * @privlevel platform * @privilege %http://tizen.org/privilege/screenshot * @param[in] screenshot efl_util_screenshot_h handle diff --git a/include/wearable/efl_util.h b/include/wearable/efl_util.h deleted file mode 100644 index 67bd88c..0000000 --- a/include/wearable/efl_util.h +++ /dev/null @@ -1,435 +0,0 @@ -/* - * Copyright (c) 2011-2015 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_UI_EFL_UTIL_H__ -#define __TIZEN_UI_EFL_UTIL_H__ - -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef __GNUC__ -# if __GNUC__ >= 4 -# ifndef API -# define API __attribute__ ((visibility("default"))) -# endif -# endif -#endif - -/** - * @file efl_util.h - */ - -/** - * @addtogroup CAPI_EFL_UTIL_MODULE - * @{ - */ - -/** - * @brief Enumeration for EFL UTIL ERROR. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -typedef enum -{ - EFL_UTIL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - EFL_UTIL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - EFL_UTIL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */ - EFL_UTIL_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - EFL_UTIL_ERROR_NO_SUCH_DEVICE = TIZEN_ERROR_NO_SUCH_DEVICE, /**< @platform No such device or address (@b Since: 3.0) */ - EFL_UTIL_ERROR_INVALID_OPERATION = TIZEN_ERROR_INVALID_OPERATION, /**< @platform Function not implemented (@b Since: 3.0) */ - EFL_UTIL_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< @platform Not supported (@b Since: 3.0) */ - EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE = TIZEN_ERROR_EFL_UTIL | 0x01, /**< Window type not supported */ - EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL = TIZEN_ERROR_EFL_UTIL | 0x02, /**< @platform Screenshot initialization fail (@b Since: 3.0) */ - EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL = TIZEN_ERROR_EFL_UTIL | 0x03 /**< @platform Screenshot execution fail (@b Since: 3.0) */ -} efl_util_error_e; - -/** - * @brief Enumeration of notification window's priority level. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - */ -typedef enum -{ - EFL_UTIL_NOTIFICATION_LEVEL_1, /**< Default notification level. (Deprecated since 3.0. Use EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT instead.) */ - EFL_UTIL_NOTIFICATION_LEVEL_2, /**< Higher notification level than default. (Deprecated since 3.0. Use EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM instead.) */ - EFL_UTIL_NOTIFICATION_LEVEL_3, /**< The highest notification level. (Deprecated since 3.0. Use EFL_UTIL_NOTIFICATION_LEVEL_TOP instead.) */ - EFL_UTIL_NOTIFICATION_LEVEL_NONE = -1, /**< No (reset) notification level. This value makes the window place in normal layer. (@b Since: 3.0) */ - EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT = 10, /**< Default notification level. (@b Since: 3.0) */ - EFL_UTIL_NOTIFICATION_LEVEL_MEDIUM = 20, /**< Higher notification level than default. (@b Since: 3.0) */ - EFL_UTIL_NOTIFICATION_LEVEL_HIGH = 30, /**< Higher notification level than medium. (@b Since: 3.0) */ - EFL_UTIL_NOTIFICATION_LEVEL_TOP = 40 /**< The highest notification level. (@b Since: 3.0) */ -} efl_util_notification_level_e; - -/** - * @brief Enumeration of screen mode. - * @since_tizen 3.0 - */ -typedef enum -{ - EFL_UTIL_SCREEN_MODE_DEFAULT, /**< The mode which turns the screen off after a timeout. */ - EFL_UTIL_SCREEN_MODE_ALWAYS_ON, /**< The mode which keeps the screen turned on. */ -} efl_util_screen_mode_e; - -/** - * @brief Sets the priority level for the specified notification window. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @privlevel public - * @privilege %http://tizen.org/privilege/window.priority.set - * @remarks This API can be used for a notification type window only. - * Up to the version 2.3.1, it supports as async APIs. - * But it is synchronous call since Tizen 3.0 - * @param[in] window The EFL window - * @param[in] level The notification window level - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE Window type not supported - * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied - */ -API int efl_util_set_notification_window_level(Evas_Object *window, efl_util_notification_level_e level); - -/** - * @brief Gets the priority level for the specified notification window. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * - * @remarks This API can be used for a notification type window only. - * Up to the version 2.3.1, it supports as async APIs. - * But it is synchronous call since Tizen 3.0 - * @param[in] window The EFL window - * @param[out] level The notification window level - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE Window type not supported - */ -API int efl_util_get_notification_window_level(Evas_Object *window, efl_util_notification_level_e *level); - -/** - * @deprecated Deprecated since 3.0. - * @brief Called when an error occurs for setting notification window level - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @remarks An application can check error by the return value of efl_util_set_notification_window_level since 3.0. - * @param[in] window The EFL window - * @param[in] error_code The error code (#EFL_UTIL_ERROR_PERMISSION_DENIED) - * @param[in] user_data The user data passed from the callback registration function - * @see efl_util_set_notification_window_level_error_cb() - * @see efl_util_unset_notification_window_level_error_cb() - */ -typedef void (*efl_util_notification_window_level_error_cb)(Evas_Object *window, int error_code, void *user_data); - -/** - * @deprecated Deprecated since 3.0. - * @brief Registers a callback function to be invoked when an error which set the notification level occurs. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @remarks An application can check error by the return value of efl_util_set_notification_window_level since 3.0. - * @param[in] window The EFL window - * @param[in] callback The callback function to register - * @param[in] user_data The user data to be passed to the callback function - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Out of memory - * @post efl_util_notification_window_level_error_cb() will be invoked. - * @see efl_util_unset_notification_window_level_error_cb() - * @see efl_util_notification_window_level_error_cb() - */ -API int efl_util_set_notification_window_level_error_cb(Evas_Object *window, efl_util_notification_window_level_error_cb callback, void *user_data); - -/** - * @deprecated Deprecated since 3.0. - * @brief Unregisters the callback function. - * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif - * @remarks An application can check error by the return value of efl_util_set_notification_window_level since 3.0. - * @param[in] window The EFL window - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @see efl_util_set_notification_window_level_error_cb() - */ -API int efl_util_unset_notification_window_level_error_cb(Evas_Object *window); - -/** - * @brief Sets the alpha window's visual state to opaque state - * @details This API sets the alpha window's visual state to opaque state. - * If the alpha window sets the visual state to the opaque, - * then the window manager could handle it as the opaque window while calculating visibility. - * This API will have no effect when used by a non-alpha window. - * @since_tizen 3.0 - * @param[in] window The EFL window - * @param[in] opaque The value that indicates whether the window has set a visual state to opaque (0: unset, 1: set) - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - */ -API int efl_util_set_window_opaque_state(Evas_Object *window, int opaque); - -/** - * @brief Sets the window's screen mode. - * @details This API is useful when the application need to keep the display turned on. - * If the application set the mode to #EFL_UTIL_SCREEN_MODE_ALWAYS_ON to its window and the window is shown wholly or partially, - * the window manager requests the display system to keep the display on as long as the window is shown. - * If the window is no longer shown, then the window manger request the display system to go back to normal operation. - * Default screen mode of window is #EFL_UTIL_SCREEN_MODE_DEFAULT. - * @since_tizen 3.0 - * @privlevel public - * @privilege %http://tizen.org/privilege/display - * @remarks This API needs the privilege. - * If the application which is not get the privilege use this API, the window manager generates the permission deny error. - * @param[in] window The EFL window - * @param[in] mode The screen mode - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied - */ -API int efl_util_set_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e mode); - -/** - * @brief Gets the screen mode of the specified window. - * @since_tizen 3.0 - * @param[in] window The EFL window - * @param[out] mode The screen mode - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - */ -API int efl_util_get_window_screen_mode(Evas_Object *window, efl_util_screen_mode_e *mode); - -/** - * @brief Sets the user's preferred brightness of the specified window. - * @details This API is useful when the application need to change the brightness of the screen when it is appeared on the screen. - * If the application sets the brightness 0 to 100 to its window and the application window is shown wholly or partially, - * the window manager requests the display system to change the brightness of the screen using user's preferred brightness. - * If the window is no longer shown, then the window manger request the display system to go back to default brightness. - * If the brightness is less than 0, this means to use the default screen brightness. - * @since_tizen 3.0 - * @privlevel public - * @privilege %http://tizen.org/privilege/display - * @remarks This API needs the privilege. - * If the application which is not get the privilege use this API, the window manager generates the permission deny error. - * @param[in] window The EFL window - * @param[in] brightness The preferred brightness - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Permission denied - * @retval #EFL_UTIL_ERROR_OUT_OF_MEMORY Out of memory - * @see efl_util_get_window_brightness() - */ -API int efl_util_set_window_brightness(Evas_Object *window, int brightness); - -/** - * @brief Gets the user's preferred brightness of the specified window. - * @since_tizen 3.0 - * @param[in] window The EFL window - * @param[out] brightness The preferred brightness - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @see efl_util_set_window_brightness() - */ -API int efl_util_get_window_brightness(Evas_Object *window, int *brightness); - - -/** - * @} - */ - -/** - * @addtogroup CAPI_EFL_UTIL_INPUT_MODULE - * @{ - */ - - /** - * @platform - * @brief Definition for the input generator handle. - * @since_tizen 3.0 - */ - - typedef struct _efl_util_inputgen_h * efl_util_inputgen_h; - -/** - * @platform - * @brief Enumeration of device type generated events. - * @since_tizen 3.0 - */ -typedef enum -{ - EFL_UTIL_INPUT_DEVTYPE_NONE = 0x0, - EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN = (1 << 0), /**< Touch Screen device */ - EFL_UTIL_INPUT_DEVTYPE_KEYBOARD = (1 << 1), /**< Keyboard device */ - EFL_UTIL_INPUT_DEVTYPE_ALL = EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN | - EFL_UTIL_INPUT_DEVTYPE_KEYBOARD, /**< Both of touch screen and keyboard device */ - EFL_UTIL_INPUT_DEVTYPE_MAX = (1 << 10) -} efl_util_input_device_type_e; - -/** - * @platform - * @brief Enumeration of touch event types. - * @since_tizen 3.0 - */ -typedef enum -{ - EFL_UTIL_INPUT_TOUCH_NONE, - EFL_UTIL_INPUT_TOUCH_BEGIN, /**< Finger press. It is same a behavior put your finger on touch screen */ - EFL_UTIL_INPUT_TOUCH_UPDATE, /**< Finger move. It is same a behavior move your finger on touch screen */ - EFL_UTIL_INPUT_TOUCH_END, /**< Finger release. It is same a behavior release your finger on touch screen */ - EFL_UTIL_INPUT_TOUCH_MAX = 10 -} efl_util_input_touch_type_e; - -/** - * @platform - * @brief Initializes system and check input generate functions are supported, open devices generated events. - * @since_tizen 3.0 - * @privlevel platform - * @privilege %http://tizen.org/privilege/inputgenerator - * @remarks The specific error code can be obtained using the get_last_result() method. Error codes are described in Exception section. - * @param[in] dev_type The device type want to generate events (ex> EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN, EFL_UTIL_INPUT_DEVTYPE_KEYBOARD, EFL_UTIL_INPUT_DEVTYPE_ALL) - * @return #efl_util_inputgen_h on success, otherwise @c NULL - * @retval #efl_util_inputgen_h The input generator handle - * @exception #EFL_UTIL_ERROR_NONE Successful - * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @exception #EFL_UTIL_ERROR_NO_SUCH_DEVICE No such device or address - * @exception #EFL_UTIL_ERROR_INVALID_OPERATION Function not implemented - * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure - * @see efl_util_input_deinitialize_generator() - */ -API efl_util_inputgen_h efl_util_input_initialize_generator(efl_util_input_device_type_e dev_type); - -/** - * @platform - * @brief Deinitializes system and close opened devices. - * @since_tizen 3.0 - * @privlevel platform - * @privilege %http://tizen.org/privilege/inputgenerator - * @param[in] inputgen_h The efl_util_inputgen_h handle - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @see efl_util_input_initialize_generator() - */ -API int efl_util_input_deinitialize_generator(efl_util_inputgen_h inputgen_h); - -/** - * @platform - * @brief Generates all of key events using a opened device. - * @since_tizen 3.0 - * @privlevel platform - * @privilege %http://tizen.org/privilege/inputgenerator - * @param[in] key_name The key name want to generate - * @param[in] pressed The value that select key press or release (0: release, 1: press) - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate key - */ -API int efl_util_input_generate_key(efl_util_inputgen_h inputgen_h, const char *key_name, int pressed); - -/** - * @platform - * @brief Generates a touch event using a opened device. - * @since_tizen 3.0 - * @privlevel platform - * @privilege %http://tizen.org/privilege/inputgenerator - * @param[in] idx The index of touched finger - * @param[in] efl_util_input_touch_type_e The touch type (ex> EFL_UTIL_INPUT_TOUCH_BEGIN, EFL_UTIL_INPUT_TOUCH_UPDATE, EFL_UTIL_INPUT_TOUCH_END) - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #EFL_UTIL_ERROR_PERMISSION_DENIED Has no permission to generate touch - */ -API int efl_util_input_generate_touch(efl_util_inputgen_h inputgen_h, int idx, efl_util_input_touch_type_e touch_type, int x, int y); - -/** - * @} - */ - -/** - * @addtogroup CAPI_EFL_UTIL_SCREENSHOT_MODULE - * @{ - */ - -/** - * @platform - * @brief Definition for the screenshot handle. - * @since_tizen 3.0 - */ -typedef struct _efl_util_screenshot_h * efl_util_screenshot_h; - -/** - * @platform - * @brief Initializes the screenshot. - * @since_tizen 3.0 - * @privlevel platform - * @privilege %http://tizen.org/privilege/screenshot - * @remarks The specific error code can be obtained using the get_last_result() - * method. Error codes are described in Exception section. - * @param[in] width width of the screenshot surface - * @param[in] height height of the screenshot surface - * @return #efl_util_screenshot_h on success, otherwise @c NULL - * @retval #efl_util_screenshot_h The screenshot handle - * @exception #EFL_UTIL_ERROR_NONE Successful - * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @exception #EFL_UTIL_ERROR_OUT_OF_MEMORY Memory allocation failure - * @exception #EFL_UTIL_ERROR_SCREENSHOT_INIT_FAIL Initialization failure - * @see efl_util_screenshot_deinitialize() - */ -API efl_util_screenshot_h efl_util_screenshot_initialize(int width, int height); - -/** - * @platform - * @brief Takes a screenshot and get a tbm_surface handle. - * @since_tizen 3.0 - * @privlevel platform - * @privilege %http://tizen.org/privilege/screenshot - * @remarks The specific error code can be obtained using the get_last_result() - * The tbm_surface_h must be free by caller - * @param[in] screenshot efl_util_screenshot_h handle - * @return #tbm_surface_h on success, otherwise @c NULL - * @retval #tbm_surface_h The TBM surface handle - * @exception #EFL_UTIL_ERROR_NONE Successful - * @exception #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @exception #EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL Execution failure - * @see efl_util_screenshot_initialize() - * @see efl_util_screenshot_deinitialize() - */ -API tbm_surface_h efl_util_screenshot_take_tbm_surface(efl_util_screenshot_h screenshot); - -/** - * @platform - * @brief Deinitializes the screenshot. - * @since_tizen 3.0 - * @privlevel platform - * @privilege %http://tizen.org/privilege/screenshot - * @param[in] screenshot efl_util_screenshot_h handle - * @return @c 0 on success, otherwise a negative error value - * @retval #EFL_UTIL_ERROR_NONE Successful - * @retval #EFL_UTIL_ERROR_INVALID_PARAMETER Invalid parameter - * @see efl_util_screenshot_initialize() - */ -API int efl_util_screenshot_deinitialize(efl_util_screenshot_h screenshot); - -/** - * @} - */ - -#ifdef __cplusplus -} -#endif -#endif /* __TIZEN_UI_EFL_UTIL_H__ */ diff --git a/packaging/capi-ui-efl-util.spec b/packaging/capi-ui-efl-util.spec index 154f056..0b48d6e 100644 --- a/packaging/capi-ui-efl-util.spec +++ b/packaging/capi-ui-efl-util.spec @@ -36,6 +36,18 @@ Requires: %{name} = %{version}-%{release} %setup -q cp %{SOURCE1001} . +cp -a include/efl_util.h.in include/efl_util.h +%if "%{profile}" != "wearable" + sed -i 's/\$TZ_CFG_VER_24_OR_30\$/2.4/g' include/efl_util.h + sed -i 's/\$TZ_CFG_VER_24_OR_231\$/2.4/g' include/efl_util.h + sed -i '/\$TZ_CFG_KEEP_BEGIN\$/d' include/efl_util.h + sed -i '/\$TZ_CFG_KEEP_END\$/d' include/efl_util.h +%else + sed -i 's/\$TZ_CFG_VER_24_OR_30\$/3.0/g' include/efl_util.h + sed -i 's/\$TZ_CFG_VER_24_OR_231\$/2.3.1/g' include/efl_util.h + sed -ie '/\$TZ_CFG_KEEP_BEGIN\$/,/\$TZ_CFG_KEEP_END\$/{s/\$TZ_CFG_KEEP_BEGIN\$//p;d}' include/efl_util.h +%endif + %build export CFLAGS+=" -Werror " -- 2.7.4