SET(EXEC_DIR ${PREFIX})
SET(BINDIR ${PREFIX}/bin)
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_WEARABLE")
+#IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_WEARABLE")
SET(LIBDIR ${PREFIX}/lib)
SET(INCDIR ${PREFIX}/include)
-ELSE()
-SET(LIBDIR ${CMAKE_INSTALL_LIBDIR})
-SET(INCDIR ${INCLUDE_INSTALL_DIR})
-SET(EDJDIR ${PREFIX}/share/${PROJECT_NAME}/themes)
-ENDIF()
+#SET(EDJDIR ${PREFIX}/share/${PROJECT_NAME}/themes)
+#ELSE()
+#SET(LIBDIR ${CMAKE_INSTALL_LIBDIR})
+#SET(INCDIR ${INCLUDE_INSTALL_DIR})
+#SET(EDJDIR ${PREFIX}/share/${PROJECT_NAME}/themes)
+#ENDIF()
+
+SET(UNIFIED_IMGDIR ${PREFIX}/share/${PROJECT_NAME}/images)
+SET(MOBILE_IMGDIR ${PREFIX}/share/${PROJECT_NAME}/mobile/images)
+SET(WEARABLE_IMGDIR ${PREFIX}/share/${PROJECT_NAME}/wearable/images)
-SET(IMGDIR ${PREFIX}/share/${PROJECT_NAME}/images)
SET(VERSION_MAJOR 0)
SET(VERSION ${VERSION_MAJOR}.1.0)
SET(VENDOR "samsung")
ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"")
ADD_DEFINITIONS("-DPLUGINDIR=\"${PLUGINDIR}\"")
-IF(NOT "$ENV{CFLAGS}" MATCHES "-DTIZEN_WEARABLE")
ADD_DEFINITIONS("-DEFL_EXTENSION_EDJ=\"${EDJDIR}/${PROJECT_NAME}.edj\"")
-ENDIF()
ADD_DEFINITIONS("-DIMG_DIR=\"${IMGDIR}\"")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden -Wall")
INCLUDE(FindPkgConfig)
-IF(NOT "$ENV{CFLAGS}" MATCHES "-DTIZEN_WEARABLE")
SET(COMMON_HEADERS)
SET(COMMON_DIR ../../../common/src)
+SET(UNIFIED_LIB_SRCS)
+SET(MOBILE_LIB_SRCS)
+SET(WEARABLE_LIB_SRCS)
SET(LIB_SRCS)
+SET(UNIFIED_INC_SRCS)
+SET(MOBILE_INC_SRCS)
+SET(WEARABLE_INC_SRCS)
+SET(INC_SRCS)
SET(LIB_NAME ${PROJECT_NAME})
-ENDIF()
-
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_WEARABLE")
-ADD_SUBDIRECTORY(wearable/src)
-ELSE()
-INCLUDE_DIRECTORIES(common/src/include)
-ADD_SUBDIRECTORY(common)
-INCLUDE_DIRECTORIES(mobile/src/include)
-ADD_SUBDIRECTORY(mobile)
-ENDIF()
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/inc)
+LINK_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/src)
+ADD_SUBDIRECTORY(inc)
+ADD_SUBDIRECTORY(src)
#ADD_SUBDIRECTORY(doc)
CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION lib/pkgconfig)
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_WEARABLE")
-INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/wearable/data/images/ DESTINATION ${IMGDIR} FILES_MATCHING PATTERN "*.png")
-ENDIF()
+#INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/images/ DESTINATION ${UNIFIED_IMGDIR} FILES_MATCHING PATTERN "*.png")
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/mobile/images/ DESTINATION ${MOBILE_IMGDIR} FILES_MATCHING PATTERN "*.png")
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/wearable/images/ DESTINATION ${WEARABLE_IMGDIR} FILES_MATCHING PATTERN "*.png")
# i18n
-IF("$ENV{CFLAGS}" MATCHES "-DTIZEN_WEARABLE")
ADD_SUBDIRECTORY(po)
-ELSE()
-#ADD_SUBDIRECTORY(po)
-ENDIF()
--- /dev/null
+SET(UNIFIED_LIB_INCS
+ efl_extension_events.h
+)
+SET(MOBILE_LIB_INCS
+ mobile/eext_floatingbutton.h
+)
+SET(WEARABLE_LIB_INCS
+ wearable/circle/efl_extension_circle_surface.h
+ wearable/circle/efl_extension_circle_object.h
+ wearable/circle/efl_extension_circle_object_progressbar.h
+ wearable/circle/efl_extension_circle_object_slider.h
+ wearable/circle/efl_extension_circle_object_genlist.h
+ wearable/circle/efl_extension_circle_object_datetime.h
+ wearable/circle/efl_extension_circle_object_scroller.h
+ wearable/circle/efl_extension_circle_object_spinner.h
+ wearable/circle/efl_extension_rotary.h
+ wearable/efl_extension_common.h
+ wearable/efl_extension_rotary_selector.h
+ wearable/efl_extension_more_option.h
+)
+
+SET(LIB_INCS
+ ${UNIFIED_LIB_INCS}
+ ${MOBILE_LIB_INCS}
+ ${WEARABLE_LIB_INCS}
+)
+
+FOREACH(inc ${LIB_INCS})
+ SET(LIB_HEADERS "${LIB_HEADERS}#include \"${inc}\"\n")
+ENDFOREACH(inc)
+
+CONFIGURE_FILE(
+ efl_extension.h.in efl_extension.h
+ @ONLY)
+
+SET(LIB_INCS
+ ${LIB_INCS}
+ mobile/eext_floatingbutton_common.h
+ mobile/eext_floatingbutton_legacy.h
+ mobile/eext_floatingbutton.eo.legacy.h
+ mobile/eext_floatingbutton_eo.h
+ efl_extension.h
+)
+
+FOREACH(inc ${LIB_INCS})
+ GET_FILENAME_COMPONENT(dir ${inc} PATH)
+ INSTALL(FILES ${inc} DESTINATION include/${LIB_NAME}/${dir})
+ENDFOREACH()
#endif
@HEADER_INCS@
+@LIB_HEADERS@
/**
* @defgroup EFL_EXTENSION_HARDWARE_KEYEVENT_GROUP Efl Extension Hardware Keyevent
* @ingroup CAPI_EFL_EXTENSION_MODULE
* @brief This group provides functionalities to grab hardware key events.
- * @since_tizen 2.4
+ * @if MOBILE @since_tizen 2.4
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
*
* @{
*/
*
* @return The result of keygrab set
*
- * @since_tizen 2.4
+ * @if MOBILE @since_tizen 2.4
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
*/
EAPI Eina_Bool eext_win_keygrab_set(Elm_Win *obj, const char *key);
*
* @return The result of keygrab unset
*
- * @since_tizen 2.4
+ * @if MOBILE @since_tizen 2.4
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
*/
EAPI Eina_Bool eext_win_keygrab_unset(Elm_Win *obj, const char *key);
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __EFL_EXTENSION_COMMON_H__
-#define __EFL_EXTENSION_COMMON_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @defgroup CAPI_EFL_EXTENSION_COMMON_UI_MODULE Efl Extension Common UI
- * @ingroup CAPI_EFL_EXTENSION_MODULE
- * @brief This module provides common ui-controls which are compatible for various devices.
- * @{
- */
-
-/**
- * @WEARABLE_ONLY
- * @typedef Eext_Object_Item
- * @brief An efl-extension object item handle.
-
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-typedef struct _Eext_Object_Item Eext_Object_Item;
-
-#define EEXT_OBJECT_ITEM Eext_Object_Item base
-
-struct _Eext_Object_Item {
- Evas_Object *obj;
- void *data;
-};
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __EFL_EXTENSION_COMMON_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __EFL_EXTENSION_COMMON_PRIVATE_H__
-#define __EFL_EXTENSION_COMMON_PRIVATE_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct _Eext_Index_Layout_Item Eext_Index_Layout_Item;
-struct _Eext_Index_Layout_Item {
- EEXT_OBJECT_ITEM;
- Eext_Circle_Object_Item *item;
-
- const char *letter;
- int priority;
- Eina_Bool selected;
-
- Evas_Smart_Cb func;
-};
-
-/* Index Layout data */
-typedef struct _Eext_Index_Layout_Data Eext_Index_Layout_Data;
-struct _Eext_Index_Layout_Data {
- Evas_Object *main_ly;
- Evas_Object *panel;
- Evas_Object *index;
- Evas_Object *cue;
- Ecore_Timer *hide_timer;
-
- int max_index;
- int max_item;
- int highlighted_index;
- int index_priority;
- int *item_index;
- int default_item_count;
-
- Eina_List *current_list;
- Eina_List *item_list;
- Eina_List *omit_list;
-
- Eina_Bool panel_hide;
- Eina_Bool second_list_exist;
-};
-
-/* Rotary Selector data */
-typedef struct _Eext_Rotary_Selector_Selector_Color Eext_Rotary_Selector_Selector_Color;
-struct _Eext_Rotary_Selector_Selector_Color {
- int r;
- int g;
- int b;
- int a;
- Eina_Bool set_flag;
-};
-
-typedef struct _Eext_Rotary_Selector_State_Data Eext_Rotary_Selector_State_Data;
-struct _Eext_Rotary_Selector_State_Data {
- Evas_Object *normal;
- Evas_Object *pressed;
-};
-
-typedef struct _Eext_Rotary_Selector_Selector_State_Color Eext_Rotary_Selector_Selector_State_Color;
-struct _Eext_Rotary_Selector_Selector_State_Color {
- Eext_Rotary_Selector_Selector_Color normal_color;
- Eext_Rotary_Selector_Selector_Color pressed_color;
- Eext_Rotary_Selector_Selector_Color disabled_color;
-};
-
-//for accessibility
-typedef enum
-{
- EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_NORMAL = 0,
- EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_LEFT,
- EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_RIGHT,
-} Eext_Rotary_Selector_Accessibility_Eventarea_Hightlihgted_State;
-//
-
-typedef struct _Eext_Rotary_Selector_Data Eext_Rotary_Selector_Data;
-struct _Eext_Rotary_Selector_Data {
- Evas_Object *parent;
- Evas_Object *rotary_selector;
- Evas_Object *event_area;
- Eina_List *item_list;
- int item_count;
- int selected_index;
- int current_page;
- Eina_Bool animation_direction;
- Ecore_Animator *previous_page_animator;
- Ecore_Animator *next_page_animator;
- double previous_page_animator_start_time;
- double next_page_animator_start_time;
- Eina_Bool next_page_animation_started;
- Eina_Bool previous_page_animation_started;
- Ecore_Timer *next_page_timer;
- Eina_Bool end_effect_animation_started;
- double end_effect_animator_start_time;
- Ecore_Animator *end_effect_animator;
- Ecore_Animator *item_update_animator;
- Eext_Rotary_Selector_Selector_State state;
- Eext_Rotary_Selector_Selector_State_Color selector_bg_image_color;
- Eext_Rotary_Selector_State_Data custom_content;
- Eina_Bool pressed;
- int pressed_item_index;
- Eina_Bool touched_item_changed;
- int radius;
- Evas_Coord item_width;
- Evas_Coord item_height;
- unsigned int rotary_event_time_stamp;
- Eina_Bool acceleration;
- //for accessibility
- Evas_Object *event_area_access_object;
- Eext_Rotary_Selector_Accessibility_Eventarea_Hightlihgted_State event_area_highlighted_state;
- Evas_Object *backup_first_item_for_atspi;
- Evas_Object *backup_last_item_for_atspi;
- int reading_page_number;
- Eina_Bool from_moreoption;
- Eina_Bool control_by_rotary
- //
-};
-
-typedef struct _Eext_Rotary_Selector_Item_Coords Eext_Rotary_Selector_Item_Coords;
-struct _Eext_Rotary_Selector_Item_Coords {
- double x;
- double y;
-};
-
-typedef struct _Eext_Rotary_Selector_Item_Color Eext_Rotary_Selector_Item_Color;
-struct _Eext_Rotary_Selector_Item_Color {
- int r;
- int g;
- int b;
- int a;
- Eina_Bool set_flag;
-};
-
-typedef struct _Eext_Rotary_Selector_Item_State_Color Eext_Rotary_Selector_Item_State_Color;
-struct _Eext_Rotary_Selector_Item_State_Color {
- Eext_Rotary_Selector_Item_Color normal_color;
- Eext_Rotary_Selector_Item_Color pressed_color;
- Eext_Rotary_Selector_Item_Color disabled_color;
-};
-
-typedef struct _Eext_Rotary_Selector_Item Eext_Rotary_Selector_Item;
-struct _Eext_Rotary_Selector_Item {
- EEXT_OBJECT_ITEM;
- int index;
- Evas_Object *parent;
- Evas_Object *rotary_selector;
- Eext_Rotary_Selector_Item_Coords coords;
- char *domain;
- char *text1;
- char *text2;
- Eext_Rotary_Selector_Item_State state;
- Eext_Rotary_Selector_Item_Color color;
- Eext_Rotary_Selector_State_Data item_bg_image;
- Eext_Rotary_Selector_State_Data item_icon;
- Eext_Rotary_Selector_State_Data selector_icon;
- Eext_Rotary_Selector_State_Data selector_content;
- Eext_Rotary_Selector_Item_State_Color item_bg_image_color;
- Eext_Rotary_Selector_Item_State_Color item_icon_color;
- Eext_Rotary_Selector_Item_State_Color selector_icon_color;
- Eext_Rotary_Selector_Item_State_Color custom_content_color;
- Evas_Object *content_icon;
- Evas_Object *custom_content;
-};
-
-
-/* More Option data */
-typedef struct _Eext_More_Option_Data Eext_More_Option_Data;
-struct _Eext_More_Option_Data {
- Evas_Object* parent;
- Evas_Object* more_option;
- Eina_List *item_list;
- Evas_Object* panel;
- Evas_Object* rotary_selector;
- Eext_More_Option_Direction direction;
- //for accessibility
- Evas_Object* cue_access_object;
- //
-};
-
-//for accessibility(internal API)
-void _rotary_selector_from_moreoption_set(Evas_Object *rotary_selector, Eina_Bool from_more_option);
-//
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __EFL_EXTENSION_COMMON_PRIVATE_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __EFL_EXTENSION_INDEX_H__
-#define __EFL_EXTENSION_INDEX_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @defgroup CAPI_EFL_EXTENSION_INDEX_LAYOUT_MODULE Efl Extension Index Layout
- * @ingroup CAPI_EFL_EXTENSION_COMMON_UI_MODULE
- * @brief Index layout is based on elm_layout with draggable index view, and an item of index
- * can be selected by rotary event.
- *
- * @details This widget emits the following signals.
- *
- * @li "changed": The index layout item is changed.
- * @li "index,show": The index layout item is shown.
- * @li "index,hide": The index layout item is hidden.
- *
- * @{
- */
-
-/**
- * @WEARABLE_ONLY
- * @brief Add a new index layout to the given parent
- * Elementary object.
- *
- * @param[in] parent The parent object
- * @return A new index layout handle,
- * otherwise @c NULL in case of an error
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Evas_Object* eext_index_layout_add(Evas_Object *parent);
-
-/**
- * @WEARABLE_ONLY
- * @brief Append a new item on a given index layout.
- *
- * @param[in] obj The index layout
- * @param[in] text The text under which the item should be indexed
- * @param[in] func The function to call when the item is clicked
- * @param[in] data The item data to set for the index's item
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item* eext_index_layout_item_append(Evas_Object *obj, const char *text, Evas_Smart_Cb func, void *data);
-
-/**
- * @WEARABLE_ONLY
- * @brief Prepend a new item on a given index layout.
- *
- * @param[in] obj The index layout object
- * @param[in] text The text under which the item should be indexed
- * @param[in] func The function to call when the item is clicked
- * @param[in] data The item data to set for the index's item
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item* eext_index_layout_item_prepend(Evas_Object *obj, const char *text, Evas_Smart_Cb func, void *data);
-
-/**
- * @WEARABLE_ONLY
- * @brief Insert a new item into the index object before the input index layout item.
- *
- * @param[in] obj The index layout object
- * @param[in] before The index layout item to insert before
- * @param[in] text The text under which the item should be indexed
- * @param[in] priority The priority of index layout item
- * @param[in] func The function to call when the item is clicked
- * @param[in] data The item data to set for the index's item
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item* eext_index_layout_item_insert_before(Evas_Object *obj, Eext_Object_Item *before, const char *text, Evas_Smart_Cb func, void *data);
-
-/**
- * @WEARABLE_ONLY
- * @brief Insert a new item into the index object after the input index layout item.
- *
- * @param[in] obj The index layout object
- * @param[in] after The index layout item to insert after
- * @param[in] text The text under which the item should be indexed
- * @param[in] priority The priority of index layout item
- * @param[in] func The function to call when the item is clicked
- * @param[in] data The item data to set for the index's item
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item* eext_index_layout_item_insert_after(Evas_Object *obj, Eext_Object_Item *after, const char *text, Evas_Smart_Cb func, void *data);
-
-/**
- * @WEARABLE_ONLY
- * @brief Remove all items from a given index layout object.
- *
- * @param[in] obj The index layout
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_index_layout_items_clear(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Delete an item which is the given index layout item.
- *
- * @param[in] item The index layout item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_index_layout_item_del(Eext_Object_Item *item);
-
-/**
- * @WEARABLE_ONLY
- * @brief Find a given index widget's item using item data.
- *
- * @param[in] obj The index layout
- * @param[in] data The item data pointed by the desired index layout item
- * @return The index layout item handle if found, otherwise @c NULL
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item* eext_index_layout_item_find(Evas_Object *obj, const void *data);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the last selected item, for a given index layout object.
- *
- * @param[in] obj The index layout object
- * @return The index layout item handle if selected, otherwise @c NULL
- *
- * @see eext_index_layout_item_selected_set()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item* eext_index_layout_selected_item_get(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the selected state of an item.
- *
- * @remarks Selected item will be highlighted.
- *
- * @param[in] item The index layout item
- * @param[in] selected The selected state
- *
- * @see eext_index_layout_selected_item_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_index_layout_selected_item_set(Eext_Object_Item *item);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the text to the given index layout item.
- *
- * @param[in] item The index layout item
- * @param[in] text The text under which the item should be indexed
- *
- * @see eext_index_layout_item_text_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_index_layout_item_text_set(Eext_Object_Item *item, const char *text);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the text (string) set on a given index layout item.
- *
- * @param[in] item The index layout item
- * @return The text string set on @a item
- *
- * @see eext_index_layout_item_text_set()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI const char* eext_index_layout_item_text_get(Eext_Object_Item *item);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __EFL_EXTENSION_INDEX_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __EFL_EXTENSION_MORE_OPTION_H__
-#define __EFL_EXTENSION_MORE_OPTION_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @defgroup CAPI_EFL_EXTENSION_MORE_OPTION_MODULE Efl Extension More Option
- * @ingroup CAPI_EFL_EXTENSION_COMMON_UI_MODULE
- * @brief More option is composed of the toggle(cue button) and more option view,
- * and more option can change a visibility through the toggle.
- *
- * @details More option is based on elm_panel, but more option is different
- * from elm_panel in that the former does not set the scrollable option.
- * To show the more option view, select the toggle or manually use
- * eext_more_option_opened_set(). To hide the more option view,
- * trigger the back event or manually use eext_more_option_opened_set().
- * Additionally, the toggle disappears when more option view appears.
- * On the other hand, the toggle appears when more option view disappears.
- * The more option view can be manually set by eext_more_option_opened_set() API.
- * An item of more option object can be selected by rotary event.
- *
- * This widget emits the following signals:
- * @li "item,selected": When the user selects an item.
- * @li "item,clicked": When the user selects the already selected item again
- * or selects a selector.
- * @li "more,option,opened": When more option view is shown.
- * @li "more,option,closed": When more option view is hidden.
- *
- * @{
- */
-
-/**
- * @brief Enumeration of More Option Diection type
- */
-typedef enum
-{
- EEXT_MORE_OPTION_DIRECTION_TOP, /**< More option (dis)appears from the top */
- EEXT_MORE_OPTION_DIRECTION_BOTTOM, /**< More option (dis)appears from the bottom */
- EEXT_MORE_OPTION_DIRECTION_LEFT, /**< More option (dis)appears from the left */
- EEXT_MORE_OPTION_DIRECTION_RIGHT /**< More option (dis)appears from the right */
-} Eext_More_Option_Direction;
-
-/**
- * @WEARABLE_ONLY
- * @brief Add a new more option.
- *
- * @details Because the return value is the elm_layout handle,
- * the elm_layout APIs can be applicable to more option handle.
- *
- * @param[in] parent The parent object
- * @return A new more option handle, otherwise @c NULL if it cannot be created
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Evas_Object * eext_more_option_add(Evas_Object *parent);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the direction of more option.
- *
- * @param[in] obj The more option
- * @param[in] direction The direction of more option
- *
- * @see eext_more_option_direction_get()
- * @ref Eext_More_Option_Direction
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_more_option_direction_set(Evas_Object *obj, Eext_More_Option_Direction direction);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get @ref Eext_More_Option_Direction.
- *
- * @param[in] obj The more option
- * @return A direction of more option
- *
- * @see eext_more_option_direction_set()
- * @ref Eext_More_Option_Direction
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_More_Option_Direction eext_more_option_direction_get(const Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Append a new item to a more option.
- *
- * @param[in] obj The more option
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @see @ref Eext_Object_Item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item * eext_more_option_item_append(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief prepend a new item to a more option.
- *
- * @param[in] obj The more option
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @see @ref Eext_Object_Item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item * eext_more_option_item_prepend(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Insert a new item into the more option after more option item @a after.
- *
- * @param[in] obj The more option
- * @param[in] after The more option item to insert after
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @see @ref Eext_Object_Item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item * eext_more_option_item_insert_after(Evas_Object *obj, Eext_Object_Item *after);
-
-/**
- * @WEARABLE_ONLY
- * @brief Insert a new item into the more option before more option item @a before.
- *
- * @param[in] obj The more option
- * @param[in] before The more option item to insert before
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @see @ref Eext_Object_Item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item * eext_more_option_item_insert_before(Evas_Object *obj, Eext_Object_Item *before);
-
-/**
- * @WEARABLE_ONLY
- * @brief Delete an item which is the given more option item @a item.
- *
- * @param[in] item The more option item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_more_option_item_del(Eext_Object_Item *item);
-
-/**
- * @WEARABLE_ONLY
- * @brief Remove all items from a given more option object.
- *
- * @param[in] obj The more option
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_more_option_items_clear(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the text of a more option object.
- *
- * @details The part name exists with the next.
- * @li "selector,main_text": This locates in the middle of the selector.
- * @li "selector,sub_text": This locates under the main_text.
- *
- * @param[in] item The more option item
- * @param[in] part_name The text part name to set (@c NULL for the default part)
- * @param[in] text The new text of the part
- *
- * @see eext_more_option_item_part_text_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_more_option_item_part_text_set(Eext_Object_Item *item, const char *part_name, const char *text);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the text of a more option object.
- *
- * @details The part name exists with the next.
- * @li "selector,main_text": This locates in the middle of the selector.
- * @li "selector,sub_text": This locates under the main_text.
- *
- * @param[in] item The more option item
- * @param[in] part_name The text part name to get (@c NULL for the default part)
- * @return The text of the part, otherwise @c NULL in case of an error
- *
- * @see eext_more_option_item_part_text_set()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI const char * eext_more_option_item_part_text_get(const Eext_Object_Item *item, const char *part_name);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the translatable text of a more option object.
- *
- * @details The part name exists with the next.
- * @li "selector,main_text": This locates in the middle of the selector.
- * @li "selector,sub_text": This locates under the main_text.
- *
- * @param[in] item The more option item
- * @param[in] part_name The text part name to set (@c NULL for the default part)
- * @param[in] domain The name of the domain which contains translatable text
- * @param[in] text ID of the new translatable text
- *
- * @see eext_more_option_item_part_text_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_more_option_item_domain_translatable_part_text_set(Eext_Object_Item *item, const char *part_name, const char *domain, const char *text);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the content to the part of a given container widget.
- *
- * @details The part name exists with the next.
- * @li "item,icon": This locates in the middle of the selector.
- *
- * @remarks The more option item may hold child objects as content at given parts.
- * This sets new content to a given part.
- * If any object is already set as a content object in the same part,
- * the previous object is automatically deleted. with this call.
- *
- * @param[in] item The more option item
- * @param[in] part_name The more option item's part name to set
- * @param[in] content The new content for that part
- *
- * @see eext_more_option_item_part_content_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_more_option_item_part_content_set(Eext_Object_Item *item, const char *part_name, Evas_Object *content);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the content from the part of a given container widget.
- *
- * @details The part name exists with the next.
- * @li "item,icon": This locates in the middle of the selector.
- *
- * @param[in] item The more option item
- * @param[in] part_name The more option item's part name to get
- * @return The content of the object at the given part,
- * otherwise @c NULL in case of an error
- *
- * @see eext_more_option_item_part_content_set()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Evas_Object * eext_more_option_item_part_content_get(const Eext_Object_Item *item, const char *part_name);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the visibility of more option view.
- *
- * @details If opened is @c EINA_TRUE, more option view in which
- * the rotary selector is included disappears and toggle appears.
- * If opened is @c EINA_FALSE, more option view in which
- * the rotary selector is included appears and toggle disappear.
- *
- * @remarks When more option is closed and opened again, the first item
- * is always selected.
- *
- * @param[in] obj The more option object
- * @param[in] opened If @c EINA_TRUE, the more option runs the animation to appear,
- * If @c EINA_FALSE, the more option runs the animation to disappear
- *
- * @see eext_more_option_opened_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_more_option_opened_set(Evas_Object *obj, Eina_Bool opened);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get whether the more option is set to be shown or to be hidden.
- *
- * @param[in] obj The more option object
- * @return If @c EINA_TRUE, more option is shown.
- * Otherwise @c EINA_FALSE, more option is hidden.
- *
- * @see eext_more_option_opened_set()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eina_Bool eext_more_option_opened_get(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the list of all items from a given more option object.
- *
- * @param[in] obj The more option object
- * @return All item lists of the more option..
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI const Eina_List* eext_more_option_items_get(const Evas_Object *obj);
-/**
- * @}
- */
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __EFL_EXTENSION_MORE_OPTION_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __EFL_EXTENSION_ROTARY_SELECTOR_H__
-#define __EFL_EXTENSION_ROTARY_SELECTOR_H__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @defgroup CAPI_EFL_EXTENSION_ROTARY_SELECTOR_MODULE Efl Extension Rotary Selector
- * @ingroup CAPI_EFL_EXTENSION_COMMON_UI_MODULE
- * @brief Rotary Selector is based on elm_layout, and an item can be
- * selected by rotary event or user item click.
- *
- * @details This widget emits the following signals.
- *
- * @li "item,selected": When the user selected an item.
- * @li "item,clicked": When selecting again the alredy selected item or selecting a selector.
- *
- * @{
- */
-
-/**
- * @brief Enumeration of Rotary Selector state
- */
-typedef enum
-{
- EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL = 0, /**< Selector is normal state */
- EEXT_ROTARY_SELECTOR_SELECTOR_STATE_PRESSED, /**< Selector is pressed state */
- EEXT_ROTARY_SELECTOR_SELECTOR_STATE_DISABLED, /**< Selector is disabled state */
-} Eext_Rotary_Selector_Selector_State;
-
-/**
- * @brief Enumeration of Rotary Selector item state
- */
-typedef enum
-{
- EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL = 0, /**< Selector Item is normal state */
- EEXT_ROTARY_SELECTOR_ITEM_STATE_PRESSED, /**< Selector Item is pressed state */
- EEXT_ROTARY_SELECTOR_ITEM_STATE_DISABLED, /**< Selector Item is disabled state */
-} Eext_Rotary_Selector_Item_State;
-
-/**
- * @WEARABLE_ONLY
- * @brief Add a new Rotary Selector.
- * @details Because the return value is the elm_layout handle,
- the elm_layout APIs can be applicable to rotary selector handle.
- *
- * @param[in] parent The parent object
- *
- * @return A new rotary selector handle, otherwise @c NULL if it cannot be created
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Evas_Object* eext_rotary_selector_add(Evas_Object *parent);
-
-/**
- * @WEARABLE_ONLY
- * @brief Append a new item to a rotary selector.
- *
- * @param[in] obj The rotary selector
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @see @ref Eext_Object_Item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item* eext_rotary_selector_item_append(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Prepend a new item to a rotary selector.
- *
- * @param[in] obj The rotary selector
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @see @ref Eext_Object_Item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item * eext_rotary_selector_item_prepend(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Insert a new item into a rotary selector after rotary selector item @a after.
- *
- * @param[in] obj The rotary selector
- * @param[in] after The rotary selector item to insert after
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @see @ref Eext_Object_Item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item * eext_rotary_selector_item_insert_after(Evas_Object *obj, Eext_Object_Item *after);
-
-/**
- * @WEARABLE_ONLY
- * @brief Insert a new item into a rotary selector before rotary selector item @a before.
- *
- * @param[in] obj The rotary selector
- * @param[in] before The rotary selector item to insert before
- * @return A handle to the item added, otherwise @c NULL in case of an error
- *
- * @see @ref Eext_Object_Item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item * eext_rotary_selector_item_insert_before(Evas_Object *obj, Eext_Object_Item *before);
-
-/**
- * @WEARABLE_ONLY
- * @brief Delete an item which is the given rotary selector item.
- *
- * @param[in] item The rotary selector item
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_item_del(Eext_Object_Item *item);
-
-/**
- * @WEARABLE_ONLY
- * @brief Remove all items from a given rotary selector object.
- *
- * @param[in] obj The rotary selector
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_items_clear(Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the text of a rotary selector object.
- *
- * @param[in] item The rotary selector item
- * @param[in] part_name The text part name to set (@c NULL for the default part)
- * @param[in] text The new text of the part
- *
- * @details This api supports following part names by default.
- *
- * @li "selector,main_text": Selector main text.
- * @li "selector,sub_text": Selector sub text.
- *
- * @see eext_rotary_selector_item_part_text_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_item_part_text_set(Eext_Object_Item *item, const char *part_name, const char *text);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the text of a rotary selector object.
- *
- * @param[in] item The rotary selector item
- * @param[in] part_name The text part name to get (@c NULL for the default part)
- * @return The text of the part, otherwise @c NULL for any error
- *
- * @details This api supports following part names by default.
- *
- * @li "selector,main_text": Selector main text.
- * @li "selector,sub_text": Selector sub text.
- *
- * @see eext_rotary_selector_item_part_text_set()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI const char* eext_rotary_selector_item_part_text_get(const Eext_Object_Item *item, const char *part_name);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the translatable text of a rotary selector object.
- *
- * @param[in] item The rotary selector item
- * @param[in] part_name The text part name to set (@c NULL for the default part)
- * @param[in] domain The name of the domain which contains translatable text
- * @param[in] text ID of the new translatable text
- *
- * @details This api supports following part names by default.
- *
- * @li "selector,main_text": Selector main text.
- * @li "selector,sub_text": Selector sub text.
- *
- * @see eext_rotary_selector_item_part_text_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_item_domain_translatable_part_text_set(Eext_Object_Item *item, const char *part_name, const char *domain, const char *text);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the content at a part of a given container widget.
- *
- * @remarks The rotary selector item may hold child objects as its contents in given parts.
- * This new content to a given part. If any object is already set as a content
- * object in the given part, the previous object is automatically deleted
- * with this call.
- *
- * @param[in] item The rotary selector item
- * @param[in] part_name The rotary selector item's part name to set
- * @param[in] state The rotary selector item part
- * @param[in] content The new content for that part
- *
- * @details This api supports following part names by default.
- *
- * @li "item,bg_image": Selector Item background image
- * @li "item,icon": Selector item icon
- * @li "selector,icon": Selector icon
- * @li "selector,content": Selector content
- *
- * @see eext_rotary_selector_item_part_content_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_item_part_content_set(Eext_Object_Item *item, const char *part_name, Eext_Rotary_Selector_Item_State state, Evas_Object *content);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the content at a part of a given container widget.
- *
- * @param[in] item The rotary selector item
- * @param[in] part_name The rotary selector item's part name to get
- * @param[in] state The rotary selector item part
- * @return The content of the object at the given part, otherwise @c NULL in case of an error
- *
- * @details This api supports following part names by default.
- *
- * @li "item,bg_image": Selector Item background image
- * @li "item,icon": Selector item icon
- * @li "selector,icon": Selector icon
- * @li "selector,content": Selector content
- *
- * @see eext_rotary_selector_item_part_content_set()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Evas_Object* eext_rotary_selector_item_part_content_get(const Eext_Object_Item *item, const char *part_name, Eext_Rotary_Selector_Item_State state);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the content at a part of a given container widget.
- *
- * @remarks The rotary selector may hold child objects as its contents in given parts.
- * This sets a new content to a given part. If any object is already set as a content
- * object in the given part, the previous object is automatically deleted
- * with this call.
- *
- * @param[in] obj The rotary selector
- * @param[in] part_name The rotary selector part name to set
- * @param[in] state The selector part
- * @param[in] content The new content for that part
- * @details This api supports following part names by default.
- *
- * @li "selector,bg_image": Selector background image.
- *
- * @see eext_rotary_selector_selector_part_content_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_part_content_set(Evas_Object *obj, const char *part_name, Eext_Rotary_Selector_Selector_State state, Evas_Object *content);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the content from the part of the given container widget.
- *
- * @param[in] obj The rotary selector.
- * @param[in] part_name The rotary selector part name to set
- * @param[in] state The selector part
- * @return The content of the object at the given part, otherwise @c NULL in case of an error
- *
- * @details This api supports following part names by default.
- *
- * @li "selector,bg_image": Selector background image.
- *
- * @see eext_rotary_selector_selector_part_content_set()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Evas_Object* eext_rotary_selector_part_content_get(const Evas_Object *obj, const char *part_name, Eext_Rotary_Selector_Selector_State state);
-
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the item part color of a rotary selector object.
- *
- * @param[in] item The rotary selector item
- * @param[in] part_name The item part name to set
- * @param[in] state The rotary selector item part
- * @param[in] r Red (0 - 255)
- * @param[in] g Green (0 - 255)
- * @param[in] b Blue (0 - 255)
- * @param[in] a Alpha (0 - 255)
- *
- * @details This api supports following part names by default.
- *
- * @li "item,bg_image": Selector Item background image
- * @li "item,icon": Selector item icon
- * @li "selector,icon": Selector icon
- * @li "selector,content": Selector content
- * @li "selector,main_text": Selector main text.
- * @li "selector,sub_text": Selector sub text.
- *
- * @see eext_rotary_selector_item_part_color_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_item_part_color_set(Eext_Object_Item *item, const char *part_name, Eext_Rotary_Selector_Item_State state, int r, int g, int b, int a);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the item part color of a rotary selector object.
- *
- * @param[in] item The rotary selector item
- * @param[in] part_name The item part name to get
- * @param[in] state The rotary selector item part
- * @param[out] r A pointer to Red (0 - 255)
- * @param[out] g A pointer to Green (0 - 255)
- * @param[out] b A pointer to Blue (0 - 255)
- * @param[out] a A pointer to Alpha (0 - 255)
- * @see eext_rotary_selector_item_part_color_set()
- *
- * @details This api supports following part names by default.
- *
- * @li "item,bg_image": Selector Item background image
- * @li "item,icon": Selector item icon
- * @li "selector,icon": Selector icon
- * @li "selector,content": Selector content
- * @li "selector,main_text": Selector main text.
- * @li "selector,sub_text": Selector sub text.
- *
- * @see eext_rotary_selector_item_part_color_get()
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_item_part_color_get(const Eext_Object_Item *item, const char *part_name, Eext_Rotary_Selector_Item_State state, int *r, int *g, int *b, int *a);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the selector part color of a rotary selector object.
- *
- * @param[in] obj The rotary selector
- * @param[in] part_name The selector part name to set
- * @param[in] state The selector part
- * @param[in] r Red (0 - 255)
- * @param[in] g Green (0 - 255)
- * @param[in] b Blue (0 - 255)
- * @param[in] a Alpha (0 - 255)
- *
- * @details This api defualt support part names.
- *
- * @li "selector,bg_image": Selector background image.
- *
- * @see eext_rotary_selector_part_color_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_part_color_set(Evas_Object *obj, const char *part_name, Eext_Rotary_Selector_Selector_State state, int r, int g, int b, int a);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the selector part color of a rotary selector object.
- *
- * @param[in] obj The rotary selector
- * @param[in] part_name The selector part name to get
- * @param[in] state The selector part
- * @param[out] r A pointer to Red (0 - 255)
- * @param[out] g A pointer to Green (0 - 255)
- * @param[out] b A pointer to Blue (0 - 255)
- * @param[out] a A pointer to Alpha (0 - 255)
- * @see eext_rotary_selector_item_part_color_set()
- *
- * @details This api defualt support part names.
- *
- * @li "selector,bg_image": Selector background image.
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_part_color_get(const Evas_Object *obj, const char *part_name, Eext_Rotary_Selector_Selector_State state, int *r, int *g, int *b, int *a);
-
-/**
- * @WEARABLE_ONLY
- * @brief Set the selected item of a rotary selector object.
- *
- * @param[in] obj The rotary selector
- * @param[in] item The rotary selector item
- * @see eext_rotary_selector_selected_item_get()
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_rotary_selector_selected_item_set(Evas_Object *obj, Eext_Object_Item *item);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the selected item of a rotary selector object.
- *
- * @param[in] obj The rotary selector
- * @see eext_rotary_selector_selected_item_set()
- * @return A selected item handle, otherwise @c NULL if it cannot be created
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI Eext_Object_Item* eext_rotary_selector_selected_item_get(const Evas_Object *obj);
-
-/**
- * @WEARABLE_ONLY
- * @brief Get the rotary selector item list of a rotary selector object.
- *
- * @param[in] obj The rotary selector
- * @return A rotary selector item list handle, otherwise @c NULL if it cannot be created
- *
- * @if WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI const Eina_List* eext_rotary_selector_items_get(const Evas_Object *obj);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __EFL_EXTENSION_ROTARY_SELECTOR_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __EFL_EXTENSION_H__
-#define __EFL_EXTENSION_H__
-
-#ifdef EAPI
-# undef EAPI
-#endif
-
-#ifdef _WIN32
-# ifdef EFL_EXTENSION_BUILD
-# ifdef DLL_EXPORT
-# define EAPI __declspec(dllexport)
-# else
-# define EAPI
-# endif /* ! DLL_EXPORT */
-# else
-# define EAPI __declspec(dllimport)
-# endif /* ! EFL_EXTENSION_BUILD */
-#else
-# ifdef __GNUC__
-# if __GNUC__ >= 4
-# define EAPI __attribute__ ((visibility("default")))
-# else
-# define EAPI
-# endif
-# else
-# define EAPI
-# endif
-#endif /* ! _WIN32 */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-@HEADER_INCS@
-@LIB_HEADERS@
-
-/**
- * @defgroup EFL_EXTENSION_HARDWARE_KEYEVENT_GROUP Efl Extension Hardware Keyevent
- * @ingroup CAPI_EFL_EXTENSION_MODULE
- * @brief This group provides functionalities to grab hardware key events.
- * @if MOBILE @since_tizen 2.4
- * @elseif WEARABLE @since_tizen 3.0
- * @endif
- *
- * @{
- */
-
-/**
- * @brief Set the keygrab of the Elm_Win object
- *
- * @details This API returns the sucessness of keygrab_set.
- * Key callback is only called when the window located in topmost(top of the window stack).
- *
- * @param[in] obj object to set the keygrab
- * The widget type of this object should be elm_win
- * @param[in] key keyname string to set keygrab
- *
- * @return The result of keygrab set
- *
- * @if MOBILE @since_tizen 2.4
- * @elseif WEARABLE @since_tizen 3.0
- * @endif
- */
-EAPI Eina_Bool eext_win_keygrab_set(Elm_Win *obj, const char *key);
-
-/**
- * @brief Unset the keygrab of the Elm_Win object
- *
- * @details This API returns the sucessness of keygrab_unset.
- *
- * @param[in] obj object to unset the keygrab
- * The widget type of this object should be elm_win
- * @param[in] key keyname string to unset keygrab
- *
- * @return The result of keygrab unset
- *
- * @if MOBILE @since_tizen 2.4
- * @elseif WEARABLE @since_tizen 3.0
- * @endif
- */
-EAPI Eina_Bool eext_win_keygrab_unset(Elm_Win *obj, const char *key);
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __EFL_EXTENSION_H__ */
-
--- /dev/null
+/*
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __EFL_EXTENSION_COMMON_H__
+#define __EFL_EXTENSION_COMMON_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup CAPI_EFL_EXTENSION_COMMON_UI_MODULE Efl Extension Common UI
+ * @ingroup CAPI_EFL_EXTENSION_MODULE
+ * @brief This module provides common ui-controls which are compatible for various devices.
+ * @{
+ */
+
+/**
+ * @WEARABLE_ONLY
+ * @typedef Eext_Object_Item
+ * @brief An efl-extension object item handle.
+
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+typedef struct _Eext_Object_Item Eext_Object_Item;
+
+#define EEXT_OBJECT_ITEM Eext_Object_Item base
+
+struct _Eext_Object_Item {
+ Evas_Object *obj;
+ void *data;
+};
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __EFL_EXTENSION_COMMON_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __EFL_EXTENSION_COMMON_PRIVATE_H__
+#define __EFL_EXTENSION_COMMON_PRIVATE_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct _Eext_Index_Layout_Item Eext_Index_Layout_Item;
+struct _Eext_Index_Layout_Item {
+ EEXT_OBJECT_ITEM;
+ Eext_Circle_Object_Item *item;
+
+ const char *letter;
+ int priority;
+ Eina_Bool selected;
+
+ Evas_Smart_Cb func;
+};
+
+/* Index Layout data */
+typedef struct _Eext_Index_Layout_Data Eext_Index_Layout_Data;
+struct _Eext_Index_Layout_Data {
+ Evas_Object *main_ly;
+ Evas_Object *panel;
+ Evas_Object *index;
+ Evas_Object *cue;
+ Ecore_Timer *hide_timer;
+
+ int max_index;
+ int max_item;
+ int highlighted_index;
+ int index_priority;
+ int *item_index;
+ int default_item_count;
+
+ Eina_List *current_list;
+ Eina_List *item_list;
+ Eina_List *omit_list;
+
+ Eina_Bool panel_hide;
+ Eina_Bool second_list_exist;
+};
+
+/* Rotary Selector data */
+typedef struct _Eext_Rotary_Selector_Selector_Color Eext_Rotary_Selector_Selector_Color;
+struct _Eext_Rotary_Selector_Selector_Color {
+ int r;
+ int g;
+ int b;
+ int a;
+ Eina_Bool set_flag;
+};
+
+typedef struct _Eext_Rotary_Selector_State_Data Eext_Rotary_Selector_State_Data;
+struct _Eext_Rotary_Selector_State_Data {
+ Evas_Object *normal;
+ Evas_Object *pressed;
+};
+
+typedef struct _Eext_Rotary_Selector_Selector_State_Color Eext_Rotary_Selector_Selector_State_Color;
+struct _Eext_Rotary_Selector_Selector_State_Color {
+ Eext_Rotary_Selector_Selector_Color normal_color;
+ Eext_Rotary_Selector_Selector_Color pressed_color;
+ Eext_Rotary_Selector_Selector_Color disabled_color;
+};
+
+//for accessibility
+typedef enum
+{
+ EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_NORMAL = 0,
+ EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_LEFT,
+ EEXT_ROTARY_SELECTOR_ACCESSIBILITY_EVENTAREA_HIGHTLIHGTED_STATE_RIGHT,
+} Eext_Rotary_Selector_Accessibility_Eventarea_Hightlihgted_State;
+//
+
+typedef struct _Eext_Rotary_Selector_Data Eext_Rotary_Selector_Data;
+struct _Eext_Rotary_Selector_Data {
+ Evas_Object *parent;
+ Evas_Object *rotary_selector;
+ Evas_Object *event_area;
+ Eina_List *item_list;
+ int item_count;
+ int selected_index;
+ int current_page;
+ Eina_Bool animation_direction;
+ Ecore_Animator *previous_page_animator;
+ Ecore_Animator *next_page_animator;
+ double previous_page_animator_start_time;
+ double next_page_animator_start_time;
+ Eina_Bool next_page_animation_started;
+ Eina_Bool previous_page_animation_started;
+ Ecore_Timer *next_page_timer;
+ Eina_Bool end_effect_animation_started;
+ double end_effect_animator_start_time;
+ Ecore_Animator *end_effect_animator;
+ Ecore_Animator *item_update_animator;
+ Eext_Rotary_Selector_Selector_State state;
+ Eext_Rotary_Selector_Selector_State_Color selector_bg_image_color;
+ Eext_Rotary_Selector_State_Data custom_content;
+ Eina_Bool pressed;
+ int pressed_item_index;
+ Eina_Bool touched_item_changed;
+ int radius;
+ Evas_Coord item_width;
+ Evas_Coord item_height;
+ unsigned int rotary_event_time_stamp;
+ Eina_Bool acceleration;
+ //for accessibility
+ Evas_Object *event_area_access_object;
+ Eext_Rotary_Selector_Accessibility_Eventarea_Hightlihgted_State event_area_highlighted_state;
+ Evas_Object *backup_first_item_for_atspi;
+ Evas_Object *backup_last_item_for_atspi;
+ int reading_page_number;
+ Eina_Bool from_moreoption;
+ Eina_Bool control_by_rotary
+ //
+};
+
+typedef struct _Eext_Rotary_Selector_Item_Coords Eext_Rotary_Selector_Item_Coords;
+struct _Eext_Rotary_Selector_Item_Coords {
+ double x;
+ double y;
+};
+
+typedef struct _Eext_Rotary_Selector_Item_Color Eext_Rotary_Selector_Item_Color;
+struct _Eext_Rotary_Selector_Item_Color {
+ int r;
+ int g;
+ int b;
+ int a;
+ Eina_Bool set_flag;
+};
+
+typedef struct _Eext_Rotary_Selector_Item_State_Color Eext_Rotary_Selector_Item_State_Color;
+struct _Eext_Rotary_Selector_Item_State_Color {
+ Eext_Rotary_Selector_Item_Color normal_color;
+ Eext_Rotary_Selector_Item_Color pressed_color;
+ Eext_Rotary_Selector_Item_Color disabled_color;
+};
+
+typedef struct _Eext_Rotary_Selector_Item Eext_Rotary_Selector_Item;
+struct _Eext_Rotary_Selector_Item {
+ EEXT_OBJECT_ITEM;
+ int index;
+ Evas_Object *parent;
+ Evas_Object *rotary_selector;
+ Eext_Rotary_Selector_Item_Coords coords;
+ char *domain;
+ char *text1;
+ char *text2;
+ Eext_Rotary_Selector_Item_State state;
+ Eext_Rotary_Selector_Item_Color color;
+ Eext_Rotary_Selector_State_Data item_bg_image;
+ Eext_Rotary_Selector_State_Data item_icon;
+ Eext_Rotary_Selector_State_Data selector_icon;
+ Eext_Rotary_Selector_State_Data selector_content;
+ Eext_Rotary_Selector_Item_State_Color item_bg_image_color;
+ Eext_Rotary_Selector_Item_State_Color item_icon_color;
+ Eext_Rotary_Selector_Item_State_Color selector_icon_color;
+ Eext_Rotary_Selector_Item_State_Color custom_content_color;
+ Evas_Object *content_icon;
+ Evas_Object *custom_content;
+};
+
+
+/* More Option data */
+typedef struct _Eext_More_Option_Data Eext_More_Option_Data;
+struct _Eext_More_Option_Data {
+ Evas_Object* parent;
+ Evas_Object* more_option;
+ Eina_List *item_list;
+ Evas_Object* panel;
+ Evas_Object* rotary_selector;
+ Eext_More_Option_Direction direction;
+ //for accessibility
+ Evas_Object* cue_access_object;
+ //
+};
+
+//for accessibility(internal API)
+void _rotary_selector_from_moreoption_set(Evas_Object *rotary_selector, Eina_Bool from_more_option);
+//
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __EFL_EXTENSION_COMMON_PRIVATE_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __EFL_EXTENSION_EVENTS_H__
-#define __EFL_EXTENSION_EVENTS_H__
-
-#include <Elementary.h>
-
-#ifdef EAPI
-# undef EAPI
-#endif
-
-#ifdef _WIN32
-# ifdef EFL_EXTENSION_BUILD
-# ifdef DLL_EXPORT
-# define EAPI __declspec(dllexport)
-# else
-# define EAPI
-# endif /* ! DLL_EXPORT */
-# else
-# define EAPI __declspec(dllimport)
-# endif /* ! EFL_EXTENSION_BUILD */
-#else
-# ifdef __GNUC__
-# if __GNUC__ >= 4
-# define EAPI __attribute__ ((visibility("default")))
-# else
-# define EAPI
-# endif
-# else
-# define EAPI
-# endif
-#endif /* ! _WIN32 */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @defgroup CAPI_EFL_EXTENSION_EVENT_MODULE Efl Extension Event
- * @ingroup CAPI_EFL_EXTENSION_MODULE
- * @brief This module provides functionalities to handle back/send key events.
- * @{
- */
-
-/**
- * @brief Convenient macro function that sends back key events to the popup
- * to be removed.
- *
- * @details Popup will be removed when it has the back key event with
- * eext_object_event_callback_add()
- *
- * @param[in] data user data
- * @param[in] obj target object
- * @param[in] event_info event information
- *
- * @see eext_object_event_callback_add()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-static inline void
-eext_popup_back_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- evas_object_del(obj);
-}
-
-/**
- * @brief Convenient macro function that sends back key events to the ctxpopup
- * to be dismissed.
- *
- * @details Ctxpopup will be dismissed when it has the back key event with
- * eext_object_event_callback_add()
- *
- * @param[in] data user data
- * @param[in] obj target object
- * @param[in] event_info event information
- *
- * @see eext_object_event_callback_add()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-static inline void
-eext_ctxpopup_back_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- elm_ctxpopup_dismiss(obj);
-}
-
-/**
- * @brief Convenient macro function that sends more key events to the naviframe
- * top item.
- *
- * @details More key action of naviframe will be executed when naviframe has the
- * more key event with eext_object_event_callback_add()
- *
- * @param[in] data user data
- * @param[in] obj target object
- * @param[in] event_info event information
- *
- * @see eext_object_event_callback_add()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-static inline void
-eext_naviframe_more_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- Elm_Object_Item *top = elm_naviframe_top_item_get(obj);
- if (!top) return;
- Evas_Object *more_btn = elm_object_item_part_content_get(top,
- "toolbar_more_btn");
- if (more_btn)
- evas_object_smart_callback_call(more_btn, "clicked", NULL);
-}
-
-/**
- * @brief Convenient macro function that pop the naviframe item.
- *
- * @details Naviframe will be popped when naviframe has the back key event
- * with eext_object_event_callback_add()
- *
- * @param[in] data user data
- * @param[in] obj target object
- * @param[in] event_info event information
- *
- * @see eext_object_event_callback_add()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-static inline void
-eext_naviframe_back_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- elm_naviframe_item_pop(obj);
-}
-
-/**
- * Identifier of callbacks to be set for Ea events.
- *
- * @see eext_object_event_callback_add()
- * @see eext_object_event_callback_del()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-typedef enum _Eext_Callback_Type
-{
- EEXT_CALLBACK_BACK, /**< H/W Back Key Event */
- EEXT_CALLBACK_MORE, /**< H/W More Key Event */
- EEXT_CALLBACK_LAST /**< Reserved value. Acutally This is not matched to
- any meaningful behavior. */
-} Eext_Callback_Type;
-
-/**
- * @brief Ea event callback function signature.
- * @param[in] data user data
- * @param[in] obj target object
- * @param[in] event_info event information (if the event passes an additional in
- formation.)
- * @see eext_object_event_callback_add()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-typedef void (*Eext_Event_Cb)(void *data, Evas_Object *obj, void *event_info);
-
-/**
- * @brief Delete a callback function from an object.
- *
- * @details This function removes the most recently added callback from the
- * object @p obj which was triggered by the type @p type and
- * was calling the function @p func when triggered. If the removal is
- * successful it will also return the data pointer that was passed to
- * eext_object_event_callback_add() when the callback was added to
- * the object. If not successful @c NULl will be returned.
- *
- * @param[in] obj Object to remove a callback from.
- * @param[in] type The type of event that was triggering the callback.
- * @param[in] func The function that was to be called when the event was
- * triggered
- * @return data The data pointer that was to be passed to the callback.
- *
- * @see eext_object_event_callback_add()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void *eext_object_event_callback_del(Evas_Object *obj, Eext_Callback_Type type, Eext_Event_Cb func);
-
-/**
- * @brief Add (register) a callback function to a given evas object.
- *
- * @details This function adds a function callback to an object when the key
- * event occurs on object @p obj. The key event on the object is only
- * triggered when the object is the most top in objects stack and
- * visible. This means, like the naviframe widget, if your application
- * needs to have the events based on the view but not focus, you can
- * use this callback. A callback function must have the Eext_Event_Cb
- * prototype definition. The first parameter (@p data) in this
- * definition will have the same value passed to
- * eext_object_event_callback_add() as the @p data parameter, at
- * runtime. The second parameter @p obj is the evas object on which
- * event occurred. Finally, the third parameter @p event_info is a
- * pointer to a data structure that may or may not be passed to the
- * callback, depending on the event type that triggered the callback.
- * This is so because some events don't carry extra context with them,
- * but others do.
- *
- * @param[in] obj evas object.
- * @param[in] type The type of event that will trigger the callback.
- * @param[in] func The function to be called when the key event is triggered.
- * @param[in] data The data pointer to be passed to @p func.
- *
- * @see eext_object_event_callback_del()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-EAPI void eext_object_event_callback_add(Evas_Object *obj, Eext_Callback_Type type, Eext_Event_Cb func, void *data);
-
-/**
- * @brief Convenient macro function that cancels the selection of the entry.
- *
- * @param[in] data user data
- * @param[in] obj target object
- * @param[in] event_info event information
- *
- * @see eext_entry_selection_back_event_allow_set()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-static inline void
-eext_entry_back_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- if (elm_entry_selection_get(obj))
- elm_entry_select_none(obj);
-
- eext_object_event_callback_del(obj, EEXT_CALLBACK_BACK, eext_entry_back_cb);
- evas_object_data_set(obj, "eext_entry", NULL);
-}
-
-/**
- * @brief Convenient macro function that registers back key callback for entry.
- *
- * @details If the selection handler should be canceled when back key event is
- * triggered, then use this API.
- *
- * @param[in] data user data
- * @param[in] obj target object
- * @param[in] event_info event information
- *
- * @see eext_entry_selection_back_event_allow_set()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-static inline void
-eext_entry_selection_start_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- if (!evas_object_data_get(obj, "eext_entry"))
- {
- evas_object_data_set(obj, "eext_entry", (void *) 1);
- eext_object_event_callback_add(obj, EEXT_CALLBACK_BACK, eext_entry_back_cb,
- NULL);
- }
-}
-
-/**
- * @brief Convenient macro function that clears back key callback for entry.
- *
- * @param[in] data user data
- * @param[in] obj target object
- * @param[in] event_info event information
- *
- * @see eext_entry_selection_back_event_allow_set()
- * @see eext_object_event_callback_add()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-static inline void
-eext_entry_selection_cleared_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- if (evas_object_data_get(obj, "eext_entry"))
- {
- eext_object_event_callback_del(obj, EEXT_CALLBACK_BACK, eext_entry_back_cb);
- evas_object_data_set(obj, "eext_entry", NULL);
- }
-}
-
-/**
- * @brief Convenient macro function that handle the back event to cancel the
- * selection handler of the entry.
- * @details If the selection handler should be canceled (or not) when back key
- * event is triggered, then use this API.
- * @param[in] obj Entry object.
- * @param[in] allow @c EINA_TRUE allows the back event handling, @c EINA_FALSE
- * otherwise.
- * @see eext_object_event_callback_add()
- * @see eext_object_event_callback_del()
- * @if MOBILE @since_tizen 2.3
- * @elseif WEARABLE @since_tizen 2.3.1
- * @endif
- */
-static inline void
-eext_entry_selection_back_event_allow_set(Evas_Object *obj, Eina_Bool allow)
-{
- if (allow)
- {
- evas_object_smart_callback_add(obj, "selection,start",
- eext_entry_selection_start_cb, NULL);
- evas_object_smart_callback_add(obj, "selection,cleared",
- eext_entry_selection_cleared_cb, NULL);
- }
- else
- {
- evas_object_smart_callback_del(obj, "selection,start",
- eext_entry_selection_start_cb);
- evas_object_smart_callback_del(obj, "selection,cleared",
- eext_entry_selection_cleared_cb);
- }
-}
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __EFL_EXTENSION_EVENTS_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __EFL_EXTENSION_INDEX_H__
+#define __EFL_EXTENSION_INDEX_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup CAPI_EFL_EXTENSION_INDEX_LAYOUT_MODULE Efl Extension Index Layout
+ * @ingroup CAPI_EFL_EXTENSION_COMMON_UI_MODULE
+ * @brief Index layout is based on elm_layout with draggable index view, and an item of index
+ * can be selected by rotary event.
+ *
+ * @details This widget emits the following signals.
+ *
+ * @li "changed": The index layout item is changed.
+ * @li "index,show": The index layout item is shown.
+ * @li "index,hide": The index layout item is hidden.
+ *
+ * @{
+ */
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Add a new index layout to the given parent
+ * Elementary object.
+ *
+ * @param[in] parent The parent object
+ * @return A new index layout handle,
+ * otherwise @c NULL in case of an error
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Evas_Object* eext_index_layout_add(Evas_Object *parent);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Append a new item on a given index layout.
+ *
+ * @param[in] obj The index layout
+ * @param[in] text The text under which the item should be indexed
+ * @param[in] func The function to call when the item is clicked
+ * @param[in] data The item data to set for the index's item
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item* eext_index_layout_item_append(Evas_Object *obj, const char *text, Evas_Smart_Cb func, void *data);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Prepend a new item on a given index layout.
+ *
+ * @param[in] obj The index layout object
+ * @param[in] text The text under which the item should be indexed
+ * @param[in] func The function to call when the item is clicked
+ * @param[in] data The item data to set for the index's item
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item* eext_index_layout_item_prepend(Evas_Object *obj, const char *text, Evas_Smart_Cb func, void *data);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Insert a new item into the index object before the input index layout item.
+ *
+ * @param[in] obj The index layout object
+ * @param[in] before The index layout item to insert before
+ * @param[in] text The text under which the item should be indexed
+ * @param[in] priority The priority of index layout item
+ * @param[in] func The function to call when the item is clicked
+ * @param[in] data The item data to set for the index's item
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item* eext_index_layout_item_insert_before(Evas_Object *obj, Eext_Object_Item *before, const char *text, Evas_Smart_Cb func, void *data);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Insert a new item into the index object after the input index layout item.
+ *
+ * @param[in] obj The index layout object
+ * @param[in] after The index layout item to insert after
+ * @param[in] text The text under which the item should be indexed
+ * @param[in] priority The priority of index layout item
+ * @param[in] func The function to call when the item is clicked
+ * @param[in] data The item data to set for the index's item
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item* eext_index_layout_item_insert_after(Evas_Object *obj, Eext_Object_Item *after, const char *text, Evas_Smart_Cb func, void *data);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Remove all items from a given index layout object.
+ *
+ * @param[in] obj The index layout
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_index_layout_items_clear(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Delete an item which is the given index layout item.
+ *
+ * @param[in] item The index layout item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_index_layout_item_del(Eext_Object_Item *item);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Find a given index widget's item using item data.
+ *
+ * @param[in] obj The index layout
+ * @param[in] data The item data pointed by the desired index layout item
+ * @return The index layout item handle if found, otherwise @c NULL
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item* eext_index_layout_item_find(Evas_Object *obj, const void *data);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the last selected item, for a given index layout object.
+ *
+ * @param[in] obj The index layout object
+ * @return The index layout item handle if selected, otherwise @c NULL
+ *
+ * @see eext_index_layout_item_selected_set()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item* eext_index_layout_selected_item_get(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the selected state of an item.
+ *
+ * @remarks Selected item will be highlighted.
+ *
+ * @param[in] item The index layout item
+ * @param[in] selected The selected state
+ *
+ * @see eext_index_layout_selected_item_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_index_layout_selected_item_set(Eext_Object_Item *item);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the text to the given index layout item.
+ *
+ * @param[in] item The index layout item
+ * @param[in] text The text under which the item should be indexed
+ *
+ * @see eext_index_layout_item_text_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_index_layout_item_text_set(Eext_Object_Item *item, const char *text);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the text (string) set on a given index layout item.
+ *
+ * @param[in] item The index layout item
+ * @return The text string set on @a item
+ *
+ * @see eext_index_layout_item_text_set()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI const char* eext_index_layout_item_text_get(Eext_Object_Item *item);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __EFL_EXTENSION_INDEX_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __EFL_EXTENSION_MORE_OPTION_H__
+#define __EFL_EXTENSION_MORE_OPTION_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup CAPI_EFL_EXTENSION_MORE_OPTION_MODULE Efl Extension More Option
+ * @ingroup CAPI_EFL_EXTENSION_COMMON_UI_MODULE
+ * @brief More option is composed of the toggle(cue button) and more option view,
+ * and more option can change a visibility through the toggle.
+ *
+ * @details More option is based on elm_panel, but more option is different
+ * from elm_panel in that the former does not set the scrollable option.
+ * To show the more option view, select the toggle or manually use
+ * eext_more_option_opened_set(). To hide the more option view,
+ * trigger the back event or manually use eext_more_option_opened_set().
+ * Additionally, the toggle disappears when more option view appears.
+ * On the other hand, the toggle appears when more option view disappears.
+ * The more option view can be manually set by eext_more_option_opened_set() API.
+ * An item of more option object can be selected by rotary event.
+ *
+ * This widget emits the following signals:
+ * @li "item,selected": When the user selects an item.
+ * @li "item,clicked": When the user selects the already selected item again
+ * or selects a selector.
+ * @li "more,option,opened": When more option view is shown.
+ * @li "more,option,closed": When more option view is hidden.
+ *
+ * @{
+ */
+
+/**
+ * @brief Enumeration of More Option Diection type
+ */
+typedef enum
+{
+ EEXT_MORE_OPTION_DIRECTION_TOP, /**< More option (dis)appears from the top */
+ EEXT_MORE_OPTION_DIRECTION_BOTTOM, /**< More option (dis)appears from the bottom */
+ EEXT_MORE_OPTION_DIRECTION_LEFT, /**< More option (dis)appears from the left */
+ EEXT_MORE_OPTION_DIRECTION_RIGHT /**< More option (dis)appears from the right */
+} Eext_More_Option_Direction;
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Add a new more option.
+ *
+ * @details Because the return value is the elm_layout handle,
+ * the elm_layout APIs can be applicable to more option handle.
+ *
+ * @param[in] parent The parent object
+ * @return A new more option handle, otherwise @c NULL if it cannot be created
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Evas_Object * eext_more_option_add(Evas_Object *parent);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the direction of more option.
+ *
+ * @param[in] obj The more option
+ * @param[in] direction The direction of more option
+ *
+ * @see eext_more_option_direction_get()
+ * @ref Eext_More_Option_Direction
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_more_option_direction_set(Evas_Object *obj, Eext_More_Option_Direction direction);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get @ref Eext_More_Option_Direction.
+ *
+ * @param[in] obj The more option
+ * @return A direction of more option
+ *
+ * @see eext_more_option_direction_set()
+ * @ref Eext_More_Option_Direction
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_More_Option_Direction eext_more_option_direction_get(const Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Append a new item to a more option.
+ *
+ * @param[in] obj The more option
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @see @ref Eext_Object_Item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item * eext_more_option_item_append(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief prepend a new item to a more option.
+ *
+ * @param[in] obj The more option
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @see @ref Eext_Object_Item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item * eext_more_option_item_prepend(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Insert a new item into the more option after more option item @a after.
+ *
+ * @param[in] obj The more option
+ * @param[in] after The more option item to insert after
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @see @ref Eext_Object_Item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item * eext_more_option_item_insert_after(Evas_Object *obj, Eext_Object_Item *after);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Insert a new item into the more option before more option item @a before.
+ *
+ * @param[in] obj The more option
+ * @param[in] before The more option item to insert before
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @see @ref Eext_Object_Item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item * eext_more_option_item_insert_before(Evas_Object *obj, Eext_Object_Item *before);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Delete an item which is the given more option item @a item.
+ *
+ * @param[in] item The more option item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_more_option_item_del(Eext_Object_Item *item);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Remove all items from a given more option object.
+ *
+ * @param[in] obj The more option
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_more_option_items_clear(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the text of a more option object.
+ *
+ * @details The part name exists with the next.
+ * @li "selector,main_text": This locates in the middle of the selector.
+ * @li "selector,sub_text": This locates under the main_text.
+ *
+ * @param[in] item The more option item
+ * @param[in] part_name The text part name to set (@c NULL for the default part)
+ * @param[in] text The new text of the part
+ *
+ * @see eext_more_option_item_part_text_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_more_option_item_part_text_set(Eext_Object_Item *item, const char *part_name, const char *text);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the text of a more option object.
+ *
+ * @details The part name exists with the next.
+ * @li "selector,main_text": This locates in the middle of the selector.
+ * @li "selector,sub_text": This locates under the main_text.
+ *
+ * @param[in] item The more option item
+ * @param[in] part_name The text part name to get (@c NULL for the default part)
+ * @return The text of the part, otherwise @c NULL in case of an error
+ *
+ * @see eext_more_option_item_part_text_set()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI const char * eext_more_option_item_part_text_get(const Eext_Object_Item *item, const char *part_name);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the translatable text of a more option object.
+ *
+ * @details The part name exists with the next.
+ * @li "selector,main_text": This locates in the middle of the selector.
+ * @li "selector,sub_text": This locates under the main_text.
+ *
+ * @param[in] item The more option item
+ * @param[in] part_name The text part name to set (@c NULL for the default part)
+ * @param[in] domain The name of the domain which contains translatable text
+ * @param[in] text ID of the new translatable text
+ *
+ * @see eext_more_option_item_part_text_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_more_option_item_domain_translatable_part_text_set(Eext_Object_Item *item, const char *part_name, const char *domain, const char *text);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the content to the part of a given container widget.
+ *
+ * @details The part name exists with the next.
+ * @li "item,icon": This locates in the middle of the selector.
+ *
+ * @remarks The more option item may hold child objects as content at given parts.
+ * This sets new content to a given part.
+ * If any object is already set as a content object in the same part,
+ * the previous object is automatically deleted. with this call.
+ *
+ * @param[in] item The more option item
+ * @param[in] part_name The more option item's part name to set
+ * @param[in] content The new content for that part
+ *
+ * @see eext_more_option_item_part_content_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_more_option_item_part_content_set(Eext_Object_Item *item, const char *part_name, Evas_Object *content);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the content from the part of a given container widget.
+ *
+ * @details The part name exists with the next.
+ * @li "item,icon": This locates in the middle of the selector.
+ *
+ * @param[in] item The more option item
+ * @param[in] part_name The more option item's part name to get
+ * @return The content of the object at the given part,
+ * otherwise @c NULL in case of an error
+ *
+ * @see eext_more_option_item_part_content_set()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Evas_Object * eext_more_option_item_part_content_get(const Eext_Object_Item *item, const char *part_name);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the visibility of more option view.
+ *
+ * @details If opened is @c EINA_TRUE, more option view in which
+ * the rotary selector is included disappears and toggle appears.
+ * If opened is @c EINA_FALSE, more option view in which
+ * the rotary selector is included appears and toggle disappear.
+ *
+ * @remarks When more option is closed and opened again, the first item
+ * is always selected.
+ *
+ * @param[in] obj The more option object
+ * @param[in] opened If @c EINA_TRUE, the more option runs the animation to appear,
+ * If @c EINA_FALSE, the more option runs the animation to disappear
+ *
+ * @see eext_more_option_opened_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_more_option_opened_set(Evas_Object *obj, Eina_Bool opened);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get whether the more option is set to be shown or to be hidden.
+ *
+ * @param[in] obj The more option object
+ * @return If @c EINA_TRUE, more option is shown.
+ * Otherwise @c EINA_FALSE, more option is hidden.
+ *
+ * @see eext_more_option_opened_set()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eina_Bool eext_more_option_opened_get(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the list of all items from a given more option object.
+ *
+ * @param[in] obj The more option object
+ * @return All item lists of the more option..
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI const Eina_List* eext_more_option_items_get(const Evas_Object *obj);
+/**
+ * @}
+ */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __EFL_EXTENSION_MORE_OPTION_H__ */
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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 __EFL_EXTENSION_PRIVATE_H__
-#define __EFL_EXTENSION_PRIVATE_H__
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <strings.h>
-#include <unistd.h>
-#include <fontconfig/fontconfig.h>
-#include <fontconfig/fcfreetype.h>
-
-#define _(str) (gettext(str))
-#define LOCALE_DIR "/usr/share/locale"
-
-#ifdef EAPI
-# undef EAPI
-#endif
-
-#ifdef _WIN32
-# ifdef EFL_EXTENSION_BUILD
-# ifdef DLL_EXPORT
-# define EAPI __declspec(dllexport)
-# else
-# define EAPI
-# endif /* ! DLL_EXPORT */
-# else
-# define EAPI __declspec(dllimport)
-# endif /* ! EFL_EXTENSION_BUILD */
-#else
-# ifdef __GNUC__
-# if __GNUC__ >= 4
-# define EAPI __attribute__ ((visibility("default")))
-# else
-# define EAPI
-# endif
-# else
-# define EAPI
-# endif
-#endif /* ! _WIN32 */
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * @internal
- *
- * @ {
- */
-
-extern int _eext_log_dom;
-
-#define CRI(...) EINA_LOG_DOM_CRIT(_eext_log_dom, __VA_ARGS__)
-#define ERR(...) EINA_LOG_DOM_ERR(_eext_log_dom, __VA_ARGS__)
-#define WRN(...) EINA_LOG_DOM_WARN(_eext_log_dom, __VA_ARGS__)
-#define INF(...) EINA_LOG_DOM_INFO(_eext_log_dom, __VA_ARGS__)
-#define DBG(...) EINA_LOG_DOM_DBG(_eext_log_dom, __VA_ARGS__)
-
-#define __CONSTRUCTOR__ __attribute__ ((constructor))
-#define __DESTRUCTOR__ __attribute__ ((destructor))
-
-/* eina magic types */
-#define EEXT_MAGIC_NONE 0x87657890
-
-typedef unsigned int eext_magic;
-#define EEXT_MAGIC eext_magic __magic
-
-#define EEXT_MAGIC_SET(d, m) (d)->__magic = (m)
-#define EEXT_MAGIC_CHECK(d, m) ((d) && ((d)->__magic == (m)))
-#define EEXT_MAGIC_FAIL(d, m, fn) \
- _eext_magic_fail((d), (d) ? (d)->__magic : 0, (m), (fn));
-
-/**
- * @}
- */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __EFL_EXTENSION_PRIVATE_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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 __EFL_EXTENSION_ROTARY_SELECTOR_H__
+#define __EFL_EXTENSION_ROTARY_SELECTOR_H__
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @defgroup CAPI_EFL_EXTENSION_ROTARY_SELECTOR_MODULE Efl Extension Rotary Selector
+ * @ingroup CAPI_EFL_EXTENSION_COMMON_UI_MODULE
+ * @brief Rotary Selector is based on elm_layout, and an item can be
+ * selected by rotary event or user item click.
+ *
+ * @details This widget emits the following signals.
+ *
+ * @li "item,selected": When the user selected an item.
+ * @li "item,clicked": When selecting again the alredy selected item or selecting a selector.
+ *
+ * @{
+ */
+
+/**
+ * @brief Enumeration of Rotary Selector state
+ */
+typedef enum
+{
+ EEXT_ROTARY_SELECTOR_SELECTOR_STATE_NORMAL = 0, /**< Selector is normal state */
+ EEXT_ROTARY_SELECTOR_SELECTOR_STATE_PRESSED, /**< Selector is pressed state */
+ EEXT_ROTARY_SELECTOR_SELECTOR_STATE_DISABLED, /**< Selector is disabled state */
+} Eext_Rotary_Selector_Selector_State;
+
+/**
+ * @brief Enumeration of Rotary Selector item state
+ */
+typedef enum
+{
+ EEXT_ROTARY_SELECTOR_ITEM_STATE_NORMAL = 0, /**< Selector Item is normal state */
+ EEXT_ROTARY_SELECTOR_ITEM_STATE_PRESSED, /**< Selector Item is pressed state */
+ EEXT_ROTARY_SELECTOR_ITEM_STATE_DISABLED, /**< Selector Item is disabled state */
+} Eext_Rotary_Selector_Item_State;
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Add a new Rotary Selector.
+ * @details Because the return value is the elm_layout handle,
+ the elm_layout APIs can be applicable to rotary selector handle.
+ *
+ * @param[in] parent The parent object
+ *
+ * @return A new rotary selector handle, otherwise @c NULL if it cannot be created
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Evas_Object* eext_rotary_selector_add(Evas_Object *parent);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Append a new item to a rotary selector.
+ *
+ * @param[in] obj The rotary selector
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @see @ref Eext_Object_Item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item* eext_rotary_selector_item_append(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Prepend a new item to a rotary selector.
+ *
+ * @param[in] obj The rotary selector
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @see @ref Eext_Object_Item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item * eext_rotary_selector_item_prepend(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Insert a new item into a rotary selector after rotary selector item @a after.
+ *
+ * @param[in] obj The rotary selector
+ * @param[in] after The rotary selector item to insert after
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @see @ref Eext_Object_Item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item * eext_rotary_selector_item_insert_after(Evas_Object *obj, Eext_Object_Item *after);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Insert a new item into a rotary selector before rotary selector item @a before.
+ *
+ * @param[in] obj The rotary selector
+ * @param[in] before The rotary selector item to insert before
+ * @return A handle to the item added, otherwise @c NULL in case of an error
+ *
+ * @see @ref Eext_Object_Item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item * eext_rotary_selector_item_insert_before(Evas_Object *obj, Eext_Object_Item *before);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Delete an item which is the given rotary selector item.
+ *
+ * @param[in] item The rotary selector item
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_item_del(Eext_Object_Item *item);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Remove all items from a given rotary selector object.
+ *
+ * @param[in] obj The rotary selector
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_items_clear(Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the text of a rotary selector object.
+ *
+ * @param[in] item The rotary selector item
+ * @param[in] part_name The text part name to set (@c NULL for the default part)
+ * @param[in] text The new text of the part
+ *
+ * @details This api supports following part names by default.
+ *
+ * @li "selector,main_text": Selector main text.
+ * @li "selector,sub_text": Selector sub text.
+ *
+ * @see eext_rotary_selector_item_part_text_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_item_part_text_set(Eext_Object_Item *item, const char *part_name, const char *text);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the text of a rotary selector object.
+ *
+ * @param[in] item The rotary selector item
+ * @param[in] part_name The text part name to get (@c NULL for the default part)
+ * @return The text of the part, otherwise @c NULL for any error
+ *
+ * @details This api supports following part names by default.
+ *
+ * @li "selector,main_text": Selector main text.
+ * @li "selector,sub_text": Selector sub text.
+ *
+ * @see eext_rotary_selector_item_part_text_set()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI const char* eext_rotary_selector_item_part_text_get(const Eext_Object_Item *item, const char *part_name);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the translatable text of a rotary selector object.
+ *
+ * @param[in] item The rotary selector item
+ * @param[in] part_name The text part name to set (@c NULL for the default part)
+ * @param[in] domain The name of the domain which contains translatable text
+ * @param[in] text ID of the new translatable text
+ *
+ * @details This api supports following part names by default.
+ *
+ * @li "selector,main_text": Selector main text.
+ * @li "selector,sub_text": Selector sub text.
+ *
+ * @see eext_rotary_selector_item_part_text_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_item_domain_translatable_part_text_set(Eext_Object_Item *item, const char *part_name, const char *domain, const char *text);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the content at a part of a given container widget.
+ *
+ * @remarks The rotary selector item may hold child objects as its contents in given parts.
+ * This new content to a given part. If any object is already set as a content
+ * object in the given part, the previous object is automatically deleted
+ * with this call.
+ *
+ * @param[in] item The rotary selector item
+ * @param[in] part_name The rotary selector item's part name to set
+ * @param[in] state The rotary selector item part
+ * @param[in] content The new content for that part
+ *
+ * @details This api supports following part names by default.
+ *
+ * @li "item,bg_image": Selector Item background image
+ * @li "item,icon": Selector item icon
+ * @li "selector,icon": Selector icon
+ * @li "selector,content": Selector content
+ *
+ * @see eext_rotary_selector_item_part_content_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_item_part_content_set(Eext_Object_Item *item, const char *part_name, Eext_Rotary_Selector_Item_State state, Evas_Object *content);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the content at a part of a given container widget.
+ *
+ * @param[in] item The rotary selector item
+ * @param[in] part_name The rotary selector item's part name to get
+ * @param[in] state The rotary selector item part
+ * @return The content of the object at the given part, otherwise @c NULL in case of an error
+ *
+ * @details This api supports following part names by default.
+ *
+ * @li "item,bg_image": Selector Item background image
+ * @li "item,icon": Selector item icon
+ * @li "selector,icon": Selector icon
+ * @li "selector,content": Selector content
+ *
+ * @see eext_rotary_selector_item_part_content_set()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Evas_Object* eext_rotary_selector_item_part_content_get(const Eext_Object_Item *item, const char *part_name, Eext_Rotary_Selector_Item_State state);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the content at a part of a given container widget.
+ *
+ * @remarks The rotary selector may hold child objects as its contents in given parts.
+ * This sets a new content to a given part. If any object is already set as a content
+ * object in the given part, the previous object is automatically deleted
+ * with this call.
+ *
+ * @param[in] obj The rotary selector
+ * @param[in] part_name The rotary selector part name to set
+ * @param[in] state The selector part
+ * @param[in] content The new content for that part
+ * @details This api supports following part names by default.
+ *
+ * @li "selector,bg_image": Selector background image.
+ *
+ * @see eext_rotary_selector_selector_part_content_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_part_content_set(Evas_Object *obj, const char *part_name, Eext_Rotary_Selector_Selector_State state, Evas_Object *content);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the content from the part of the given container widget.
+ *
+ * @param[in] obj The rotary selector.
+ * @param[in] part_name The rotary selector part name to set
+ * @param[in] state The selector part
+ * @return The content of the object at the given part, otherwise @c NULL in case of an error
+ *
+ * @details This api supports following part names by default.
+ *
+ * @li "selector,bg_image": Selector background image.
+ *
+ * @see eext_rotary_selector_selector_part_content_set()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Evas_Object* eext_rotary_selector_part_content_get(const Evas_Object *obj, const char *part_name, Eext_Rotary_Selector_Selector_State state);
+
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the item part color of a rotary selector object.
+ *
+ * @param[in] item The rotary selector item
+ * @param[in] part_name The item part name to set
+ * @param[in] state The rotary selector item part
+ * @param[in] r Red (0 - 255)
+ * @param[in] g Green (0 - 255)
+ * @param[in] b Blue (0 - 255)
+ * @param[in] a Alpha (0 - 255)
+ *
+ * @details This api supports following part names by default.
+ *
+ * @li "item,bg_image": Selector Item background image
+ * @li "item,icon": Selector item icon
+ * @li "selector,icon": Selector icon
+ * @li "selector,content": Selector content
+ * @li "selector,main_text": Selector main text.
+ * @li "selector,sub_text": Selector sub text.
+ *
+ * @see eext_rotary_selector_item_part_color_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_item_part_color_set(Eext_Object_Item *item, const char *part_name, Eext_Rotary_Selector_Item_State state, int r, int g, int b, int a);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the item part color of a rotary selector object.
+ *
+ * @param[in] item The rotary selector item
+ * @param[in] part_name The item part name to get
+ * @param[in] state The rotary selector item part
+ * @param[out] r A pointer to Red (0 - 255)
+ * @param[out] g A pointer to Green (0 - 255)
+ * @param[out] b A pointer to Blue (0 - 255)
+ * @param[out] a A pointer to Alpha (0 - 255)
+ * @see eext_rotary_selector_item_part_color_set()
+ *
+ * @details This api supports following part names by default.
+ *
+ * @li "item,bg_image": Selector Item background image
+ * @li "item,icon": Selector item icon
+ * @li "selector,icon": Selector icon
+ * @li "selector,content": Selector content
+ * @li "selector,main_text": Selector main text.
+ * @li "selector,sub_text": Selector sub text.
+ *
+ * @see eext_rotary_selector_item_part_color_get()
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_item_part_color_get(const Eext_Object_Item *item, const char *part_name, Eext_Rotary_Selector_Item_State state, int *r, int *g, int *b, int *a);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the selector part color of a rotary selector object.
+ *
+ * @param[in] obj The rotary selector
+ * @param[in] part_name The selector part name to set
+ * @param[in] state The selector part
+ * @param[in] r Red (0 - 255)
+ * @param[in] g Green (0 - 255)
+ * @param[in] b Blue (0 - 255)
+ * @param[in] a Alpha (0 - 255)
+ *
+ * @details This api defualt support part names.
+ *
+ * @li "selector,bg_image": Selector background image.
+ *
+ * @see eext_rotary_selector_part_color_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_part_color_set(Evas_Object *obj, const char *part_name, Eext_Rotary_Selector_Selector_State state, int r, int g, int b, int a);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the selector part color of a rotary selector object.
+ *
+ * @param[in] obj The rotary selector
+ * @param[in] part_name The selector part name to get
+ * @param[in] state The selector part
+ * @param[out] r A pointer to Red (0 - 255)
+ * @param[out] g A pointer to Green (0 - 255)
+ * @param[out] b A pointer to Blue (0 - 255)
+ * @param[out] a A pointer to Alpha (0 - 255)
+ * @see eext_rotary_selector_item_part_color_set()
+ *
+ * @details This api defualt support part names.
+ *
+ * @li "selector,bg_image": Selector background image.
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_part_color_get(const Evas_Object *obj, const char *part_name, Eext_Rotary_Selector_Selector_State state, int *r, int *g, int *b, int *a);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Set the selected item of a rotary selector object.
+ *
+ * @param[in] obj The rotary selector
+ * @param[in] item The rotary selector item
+ * @see eext_rotary_selector_selected_item_get()
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI void eext_rotary_selector_selected_item_set(Evas_Object *obj, Eext_Object_Item *item);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the selected item of a rotary selector object.
+ *
+ * @param[in] obj The rotary selector
+ * @see eext_rotary_selector_selected_item_set()
+ * @return A selected item handle, otherwise @c NULL if it cannot be created
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI Eext_Object_Item* eext_rotary_selector_selected_item_get(const Evas_Object *obj);
+
+/**
+ * @WEARABLE_ONLY
+ * @brief Get the rotary selector item list of a rotary selector object.
+ *
+ * @param[in] obj The rotary selector
+ * @return A rotary selector item list handle, otherwise @c NULL if it cannot be created
+ *
+ * @if WEARABLE @since_tizen 2.3.1
+ * @endif
+ */
+EAPI const Eina_List* eext_rotary_selector_items_get(const Evas_Object *obj);
+
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __EFL_EXTENSION_ROTARY_SELECTOR_H__ */
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# Note that it can be modified after the wearable and others are unified.
-# if wearable || "undefined"
-%if "%{?profile}" != "common" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
%define server wayland
-%endif
Name: efl-extension
Summary: EFL extension library
URL: http://www.tizen.org/
Source0: %{name}-%{version}.tar.gz
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# Note that it can be modified after the wearable and others are unified.
-# if wearable || "undefined"
-%if "%{?profile}" != "common" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
BuildRequires: pkgconfig(eina)
BuildRequires: pkgconfig(ecore)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(fontconfig)
+BuildRequires: pkgconfig(dlog)
BuildRequires: cmake
BuildRequires: gettext
BuildRequires: pkgconfig(cairo)
+BuildRequires: eolian-devel
+Requires(post): /sbin/ldconfig
+Requires(postun): /sbin/ldconfig
%if "%{?server}" == "x"
BuildRequires: pkgconfig(ecore-x)
BuildRequires: pkgconfig(x11)
%else if "%{?server}" == "wayland"
BuildRequires: pkgconfig(ecore-wayland)
BuildRequires: pkgconfig(ecore-input)
-%endif
-%else
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(dlog)
-BuildRequires: cmake
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-#BuildRequires: pkgconfig(x11)
-#BuildRequires: pkgconfig(xext)
-#BuildRequires: pkgconfig(xi)
-#BuildRequires: pkgconfig(inputproto)
-BuildRequires: pkgconfig(fontconfig)
-BuildRequires: gettext
-#BuildRequires: pkgconfig(cairo)
BuildRequires: eolian-devel
BuildRequires: pkgconfig(glib-2.0)
%endif
-
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
export CFLAGS+=" -fvisibility=hidden -fPIC -Wall"
export LDFLAGS+=" -fvisibility=hidden -Wl,-z,defs -Wl,--hash-style=both -Wl,--as-needed"
-%if "%{profile}" == "mobile"
-export CFLAGS="$CFLAGS -DTIZEN_MOBILE"
-%else
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# Note that it can be modified after the wearable and others are unified.
-# if wearable || "undefined"
-%if "%{?profile}" != "common" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
-export CFLAGS="$CFLAGS -DTIZEN_WEARABLE"
-%endif
-%endif
-
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# Note that it can be modified after the wearable and others are unified.
-# if wearable || "undefined"
-%if "%{?profile}" != "common" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
%if "%{?server}" == "x"
cmake \
. -DCMAKE_INSTALL_PREFIX=/usr -DWITH_X=1
cmake \
. -DCMAKE_INSTALL_PREFIX=/usr
%endif
-%else
-%cmake
-%endif
make %{?jobs:-j%jobs}
%postun -p /sbin/ldconfig
-
%files
%defattr(-,root,root,-)
%{_libdir}/libefl-extension.so.*
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# Note that it can be modified after the wearable and others are unified.
-# if wearable || "undefined"
-%if "%{?profile}" != "common" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
%{_datadir}/locale/*
-%endif
-
%{_datadir}/license/%{name}
-
-%if "%{profile}" != "wearable"
-%{_datadir}/efl-extension/themes/*.edj
-%endif
+#%{_datadir}/efl-extension/themes/*.edj
+#%{_datadir}/efl-extension/images/*
+%{_datadir}/efl-extension/mobile/images/*
+%{_datadir}/efl-extension/wearable/images/*
%manifest %{name}.manifest
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# Note that it can be modified after the wearable and others are unified.
-# if wearable || "undefined"
-%if "%{?profile}" != "common" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
-%{_datadir}/efl-extension/images/*
-%endif
%files devel
%defattr(-,root,root,-)
-%{_includedir}/efl-extension/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/efl-extension.pc
-# This is for backward-compatibility. This does not deteriorate 4.0 Configurability
-# Note that it can be modified after the wearable and others are unified.
-# if wearable || "undefined"
-%if "%{?profile}" != "common" && "%{?profile}" != "mobile" && "%{?profile}" != "tv" && "%{?profile}" != "ivi"
-%{_includedir}/efl-extension/circle/*.h
-%{_includedir}/efl-extension/common/*.h
-%endif
+%{_includedir}/efl-extension/*.h
+%{_includedir}/efl-extension/mobile/*.h
+%{_includedir}/efl-extension/wearable/*.h
+%{_includedir}/efl-extension/wearable/circle/*.h
--- /dev/null
+add_definitions(-DEFL_EO_API_SUPPORT=1 -DEFL_BETA_API_SUPPORT=1)
+
+SET(UNIFIED_LIB_SRCS
+ efl_extension.c
+ efl_extension_events.c
+ )
+SET(UNIFIED_EO_FILES
+ )
+SET(MOBILE_LIB_SRCS
+ mobile/eext_floatingbutton.c
+ )
+SET(MOBILE_EO_FILES
+ mobile/eext_floatingbutton.eo
+ )
+
+SET(WEARABLE_LIB_SRCS
+ wearable/circle/efl_extension_circle_surface.c
+ wearable/circle/efl_extension_circle_object.c
+ wearable/circle/efl_extension_circle_object_item.c
+ wearable/circle/efl_extension_circle_object_progressbar.c
+ wearable/circle/efl_extension_circle_object_slider.c
+ wearable/circle/efl_extension_circle_object_genlist.c
+ wearable/circle/efl_extension_circle_object_datetime.c
+ wearable/circle/efl_extension_circle_object_scroller.c
+ wearable/circle/efl_extension_circle_object_spinner.c
+ wearable/circle/efl_extension_rotary.c
+ wearable/efl_extension_rotary_selector.c
+ wearable/efl_extension_more_option.c
+ )
+SET(WEARABLE_EO_FILES
+ )
+SET(LIB_SRCS
+ ${UNIFIED_LIB_SRCS}
+ ${MOBILE_LIB_SRCS}
+ ${WEARABLE_LIB_SRCS}
+ )
+SET(ALL_EO_FILES
+ ${UNIFIED_EO_FILES}
+ ${MOBILE_EO_FILES}
+ ${WEARABLE_EO_FILES}
+ )
+
+foreach(eo_file ${ALL_EO_FILES})
+ GET_FILENAME_COMPONENT(dir ${eo_file} PATH)
+ GET_FILENAME_COMPONENT(eo_file_name ${eo_file} NAME)
+ string(REPLACE .eo .eo.c out_c_file ${eo_file_name})
+ string(REPLACE .eo .eo.h out_h_file ${eo_file_name})
+ string(REPLACE .eo .eo.legacy.h out_legacy_file ${eo_file_name})
+ string(REPLACE .eo .c c_file ${eo_file_name})
+ add_custom_command(
+ OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${out_c_file}
+ COMMAND /usr/bin/eolian_gen ${eo_file} --eo --legacy --gc -I /usr/share/eolian/include -o ${dir}/${out_c_file}
+ COMMAND /usr/bin/eolian_gen ${eo_file} --eo --gh -I /usr/share/eolian/include -o "../inc/${dir}/${out_h_file}"
+ COMMAND /usr/bin/eolian_gen ${eo_file} --legacy --gh -I /usr/share/eolian/include -o "../inc/${dir}/${out_legacy_file}"
+ DEPENDS ${eo_file} ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/*.eo
+ COMMENT "Compiling Eo: ${eo_file}, Output eo : ${dir}/${out_c_file}"
+ VERBATIM)
+ add_custom_target(target_${eo_file_name} ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${dir}/${out_c_file})
+ SET (ALL_EO_TARGETS ${ALL_EO_TARGETS} target_${eo_file_name})
+endforeach(eo_file)
+
+
+ADD_LIBRARY(${LIB_NAME} SHARED ${LIB_SRCS})
+ADD_DEPENDENCIES(${LIB_NAME} ${ALL_EO_TARGETS})
+
+ADD_DEFINITIONS("-DEFL_EXTENSION_BUILD")
+IF(DEFINED WITH_X)
+ message("Build with X")
+ ADD_DEFINITIONS("-DWITH_X")
+ PKG_CHECK_MODULES(LIB_PKGS REQUIRED
+ eina
+ ecore
+ ecore-x
+ elementary
+ cairo
+ x11
+ xext
+ xi
+ inputproto
+ fontconfig
+ )
+ELSEIF(DEFINED WITH_WAYLAND)
+ message("Build with Wayland")
+ ADD_DEFINITIONS("-DWITH_WAYLAND")
+ PKG_CHECK_MODULES(LIB_PKGS REQUIRED
+ eina
+ ecore
+ ecore-wayland
+ ecore-input
+ elementary
+ cairo
+ fontconfig
+ )
+ELSEIF(DEFINED WIN32)
+ message("Build on Windows")
+ ADD_DEFINITIONS("-DDLL_EXPORT")
+ PKG_CHECK_MODULES(LIB_PKGS REQUIRED
+ eina
+ ecore
+ elementary
+ evil
+ cairo
+ fontconfig
+ )
+ELSE()
+ message("Build without X and Wayland")
+ PKG_CHECK_MODULES(LIB_PKGS REQUIRED
+ eina
+ ecore
+ elementary
+ cairo
+ fontconfig
+ )
+ENDIF()
+
+FOREACH(flag ${LIB_PKGS_CFLAGS})
+ SET(LIB_CFLAGS "${LIB_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+FOREACH(flag ${LIB_PKGS_LDFLAGS})
+ message("LIB_PKGS_LDFLAGS ${flag}")
+ENDFOREACH(flag)
+FOREACH(flag ${LIB_TARGET_PKGS_LDFLAGS})
+ message("LIB_TARGET_PKGS_LDFLAGS ${flag}")
+ENDFOREACH(flag)
+
+SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES COMPILE_FLAGS "${LIB_CFLAGS}")
+SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${VERSION})
+SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
+TARGET_LINK_LIBRARIES(${LIB_NAME} ${LIB_PKGS_LDFLAGS} ${LIB_TARGET_PKGS_LDFLAGS})
+
+INSTALL(TARGETS ${LIB_NAME} DESTINATION lib)
+#INSTALL(FILES ${ALL_EO_FILES} DESTINATION share/eolian/include/efl-extension)
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "efl_extension.h"
-#include "efl_extension_private.h"
-
-typedef struct _Eext_Event_Mgr Eext_Event_Mgr;
-
-struct _Eext_Event_Mgr
-{
- Eina_List *obj_events;
- Evas *e;
- Evas_Object *key_grab_rect;
-};
-
-typedef struct _Eext_Object_Event
-{
- Evas_Object *obj;
- Evas_Object *parent;
- Eina_List *callbacks;
- Eina_Bool delete_me : 1;
- Eina_Bool on_callback : 1;
-} Eext_Object_Event;
-
-typedef struct _Eext_Event_Callback
-{
- Eext_Callback_Type type;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
- void *data;
-} Eext_Event_Callback;
-
-const char *EEXT_OBJ_KEY_EVENT_MGR = "_eext_obj_key_event_mgr";
-const char *EEXT_OBJ_KEY_OBJ_EVENT = "_eext_obj_key_obj_event";
-const char *EEXT_KEY_BACK = "XF86Back";
-const char *EEXT_KEY_BACK2 = "XF86Stop";
-const char *EEXT_KEY_BACK3 = "Escape";
-const char *EEXT_KEY_MENU = "XF86Menu";
-const char *EEXT_KEY_MENU2 = "XF86Send";
-const char *EEXT_KEY_MENU3 = "Menu";
-
-
-static Eina_List *event_mgrs = NULL;
-
-static void
-_eext_event_mgr_del(Eext_Event_Mgr *event_mgr)
-{
- if (event_mgr->obj_events) return;
-
- //Redundant Event Mgr. Remove it.
- evas_object_del(event_mgr->key_grab_rect);
- event_mgrs = eina_list_remove(event_mgrs, event_mgr);
- free(event_mgr);
-}
-
-static void
-_eext_object_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- Eext_Event_Mgr *event_mgr = evas_object_data_get(obj, EEXT_OBJ_KEY_EVENT_MGR);
- Eext_Object_Event *obj_event = data;
- Eina_List *l;
- Eext_Event_Callback *callback;
-
- l = eina_list_data_find_list(event_mgr->obj_events, obj_event);
- if (!l) return;
-
- event_mgr->obj_events = eina_list_remove_list(event_mgr->obj_events, l);
-
- EINA_LIST_FREE(obj_event->callbacks, callback) free(callback);
- obj_event->callbacks = NULL;
-
- if (obj_event->on_callback) obj_event->delete_me = EINA_TRUE;
- else free(obj_event);
-
- _eext_event_mgr_del(event_mgr);
-}
-
-static int
-_eext_layer_sort_cb(const void *data1, const void *data2)
-{
- const Eext_Object_Event *obj_event = data1;
- const Eext_Object_Event *obj_event2 = data2;
-
- //1. Layer Compare
- int layer1 = evas_object_layer_get(obj_event->obj);
- int layer2 = evas_object_layer_get(obj_event2->obj);
-
- return (layer1 < layer2) ? -1 : 1;
-}
-
-static Evas_Object *
-_eext_top_parent_candidates(Eina_List **candidates, Evas *e)
-{
- Evas_Object *temp;
- Evas_Object *parent;
- Eina_List *l, *l_next;
- Eext_Object_Event *obj_event;
- Eina_List *_candidates = *candidates;
- Eina_Bool found = EINA_FALSE;
-
- //Get the top parent lists
- EINA_LIST_FOREACH(_candidates, l, obj_event)
- {
- temp = obj_event->obj;
- parent = obj_event->obj;
- while (temp)
- {
- parent = temp;
- temp = evas_object_smart_parent_get(temp);
- }
- obj_event->parent = parent;
- }
-
- //Leave only parent candidates.
- parent = evas_object_top_get(e);
-
- while (parent)
- {
- EINA_LIST_FOREACH(_candidates, l, obj_event)
- {
- if (parent == obj_event->parent)
- {
- found = EINA_TRUE;
- obj_event->parent = NULL;
- }
- }
- if (found) break;
- parent = evas_object_below_get(parent);
- }
-
- //Redundant parents (no candidates)
- EINA_LIST_FOREACH_SAFE(_candidates, l, l_next, obj_event)
- {
- if (!obj_event->parent) continue;
- _candidates = eina_list_remove_list(_candidates, l);
- }
-
- *candidates = _candidates;
- return parent;
-}
-
-static Eext_Object_Event *
-_eext_find_event_target(Eina_List *candidates, Evas_Object *parent, Eext_Callback_Type type)
-{
- Eext_Object_Event *obj_event = NULL;
- Eina_List *l, *ll;
- Evas_Object *obj;
- Eina_List *members = NULL;
- Eext_Event_Callback *callback;
-
- if (eo_isa(parent, EVAS_OBJECT_SMART_CLASS))
- members = evas_object_smart_members_get(parent);
-
- if (members)
- {
- EINA_LIST_REVERSE_FOREACH(members, l, obj)
- {
- obj_event = _eext_find_event_target(candidates, obj, type);
- //got you!
- if (obj_event)
- {
- EINA_LIST_FOREACH(obj_event->callbacks, ll, callback)
- {
- if (callback->type == type)
- {
- eina_list_free(members);
- return obj_event;
- }
- }
- }
- }
- eina_list_free(members);
- }
-
- EINA_LIST_REVERSE_FOREACH(candidates, l, obj_event)
- {
- //got you!
- if (parent == obj_event->obj)
- {
- EINA_LIST_FOREACH(obj_event->callbacks, ll, callback)
- {
- if (callback->type == type)
- return obj_event;
- }
- }
- }
-
- return NULL;
-}
-
-static Eext_Object_Event *
-_eext_top_obj_event_find(Eext_Event_Mgr *event_mgr, Eext_Callback_Type type)
-{
- Eext_Object_Event *obj_event = NULL;
- Eina_List *l, *l_next;
- Eina_List *candidates = NULL;
- Evas_Object *parent;
- int top_layer;
- Eina_Bool invisible;
-
- //1. filter the invisible objs
- EINA_LIST_FOREACH(event_mgr->obj_events, l, obj_event)
- {
- parent = obj_event->obj;
- invisible = EINA_FALSE;
-
- while (parent)
- {
- if (!evas_object_visible_get(parent))
- {
- invisible = EINA_TRUE;
- break;
- }
- parent = evas_object_smart_parent_get(parent);
- }
- if (invisible) continue;
- candidates = eina_list_append(candidates, obj_event);
- }
- if (!candidates) return NULL; //no visible objects.
- if (eina_list_count(candidates) == 1) goto found;
-
- //2.1. sort by layer order
- candidates = eina_list_sort(candidates, eina_list_count(candidates),
- _eext_layer_sort_cb);
-
- //2.2. leave the only top layer
- obj_event = eina_list_data_get(eina_list_last(candidates));
- top_layer = evas_object_layer_get(obj_event->obj);
-
- EINA_LIST_FOREACH_SAFE(candidates, l, l_next, obj_event)
- {
- if (evas_object_layer_get(obj_event->obj) < top_layer)
- candidates = eina_list_remove_list(candidates, l);
- }
- if (eina_list_count(candidates) == 1) goto found;
-
- //3. find the top parent candidate.
- parent = _eext_top_parent_candidates(&candidates, event_mgr->e);
- if (eina_list_count(candidates) == 1) goto found;
-
- //4. find the target in this parent tree.
- obj_event = _eext_find_event_target(candidates, parent, type);
- eina_list_free(candidates);
- return obj_event;
-
-found:
- obj_event = eina_list_data_get(candidates);
- eina_list_free(candidates);
- return obj_event;
-}
-
-static void
-_eext_key_grab_rect_key_up_cb(void *data, Evas *e, Evas_Object *obj,
- void *event_info)
-{
- Evas_Event_Key_Down *ev = event_info;
- Eext_Event_Mgr *event_mgr = data;
- Eext_Object_Event *obj_event;
- Eext_Event_Callback *callback;
- Eext_Callback_Type type;
- Eina_List *l;
-
- if (!strcmp(ev->keyname, EEXT_KEY_BACK) ||
- !strcmp(ev->keyname, EEXT_KEY_BACK2) ||
- !strcmp(ev->keyname, EEXT_KEY_BACK3))
- type = EEXT_CALLBACK_BACK;
- else if (!strcmp(ev->keyname, EEXT_KEY_MENU) ||
- !strcmp(ev->keyname, EEXT_KEY_MENU2) ||
- !strcmp(ev->keyname, EEXT_KEY_MENU3))
- type = EEXT_CALLBACK_MORE;
- else return;
-
- obj_event = _eext_top_obj_event_find(event_mgr, type);
- if (!obj_event) return;
-
- obj_event->on_callback = EINA_TRUE;
- EINA_LIST_FOREACH(obj_event->callbacks, l, callback)
- {
- if (callback->type != type) continue;
- callback->func(callback->data, obj_event->obj, (void*) type);
- if (obj_event->delete_me) break;
- }
- if (obj_event->delete_me) free(obj_event);
- else obj_event->on_callback = EINA_FALSE;
-}
-
-static void
-_eext_key_grab_obj_create(Eext_Event_Mgr *event_mgr)
-{
- Evas_Object *key_grab_rect = evas_object_rectangle_add(event_mgr->e);
-
- evas_object_event_callback_add(key_grab_rect, EVAS_CALLBACK_KEY_UP,
- _eext_key_grab_rect_key_up_cb, event_mgr);
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_BACK, 0, 0, EINA_FALSE))
- LOGE("Failed to grab BACK KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_BACK2, 0, 0, EINA_FALSE))
- LOGE("Failed to grab BACK KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_BACK3, 0, 0, EINA_FALSE))
- LOGE("Failed to grab BACK KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_MENU, 0, 0, EINA_FALSE))
- LOGE("Failed to grab MENU KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_MENU2, 0, 0, EINA_FALSE))
- LOGE("Failed to grab MENU KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_MENU3, 0, 0, EINA_FALSE))
- LOGE("Failed to grab MENU KEY\n");
-
- event_mgr->key_grab_rect = key_grab_rect;
-}
-
-static Eext_Event_Mgr *
-_eext_event_mgr_new(Evas *e)
-{
- Eext_Event_Mgr *event_mgr = calloc(1, sizeof(Eext_Event_Mgr));
- if (!event_mgr)
- {
- LOGE("Failed to allocate event manager");
- return NULL;
- }
- event_mgr->e = e;
- _eext_key_grab_obj_create(event_mgr);
-
- return event_mgr;
-}
-
-EAPI void *
-eext_object_event_callback_del(Evas_Object *obj, Eext_Callback_Type type, Eext_Event_Cb func)
-{
- Eext_Object_Event *obj_event;
- Eext_Event_Mgr *event_mgr;
- Eina_List *l;
- Eext_Event_Callback *callback;
- void *data;
-
- //Check the validation
- event_mgr = evas_object_data_get(obj, EEXT_OBJ_KEY_EVENT_MGR);
- obj_event = evas_object_data_get(obj, EEXT_OBJ_KEY_OBJ_EVENT);
-
- if (!event_mgr || !obj_event)
- {
- LOGW("This object(%p) hasn't been registered before", obj);
- return NULL;
- }
-
- //Remove the callback data
- EINA_LIST_REVERSE_FOREACH(obj_event->callbacks, l, callback)
- {
- if ((callback->func == func) && (callback->type == type)) break;
- }
-
- if (!callback)
- {
- LOGW("This object(%p) hasn't been registered before with the given type(%d) and func(%p)", obj, type, func);
- return NULL;
- }
-
- data = callback->data;
- obj_event->callbacks = eina_list_remove_list(obj_event->callbacks, l);
- free(callback);
-
- //This object is not managed anymore.
- if (!obj_event->callbacks)
- {
- evas_object_data_set(obj, EEXT_OBJ_KEY_OBJ_EVENT, NULL);
- evas_object_data_set(obj, EEXT_OBJ_KEY_EVENT_MGR, NULL);
- Eina_List *l = eina_list_data_find_list(event_mgr->obj_events,
- obj_event);
- if (l)
- event_mgr->obj_events = eina_list_remove_list(event_mgr->obj_events,
- l);
- if (obj_event->on_callback) obj_event->delete_me = EINA_TRUE;
- else free(obj_event);
-
- evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, _eext_object_del_cb);
- }
-
- _eext_event_mgr_del(event_mgr);
-
- return data;
-}
-
-EAPI void
-eext_object_event_callback_add(Evas_Object *obj, Eext_Callback_Type type, Eext_Event_Cb func, void *data)
-{
- Eext_Event_Mgr *event_mgr;
- Evas *e;
- Eext_Object_Event *obj_event = NULL;
- Eina_List *l;
- Eext_Event_Callback *callback;
- Eina_Bool new_event_mgr = EINA_TRUE;
-
- //Check the registered event manager for this Evas.
- e = evas_object_evas_get(obj);
-
- EINA_LIST_FOREACH(event_mgrs, l, event_mgr)
- {
- if (event_mgr->e == e)
- {
- new_event_mgr = EINA_FALSE;
- break;
- }
- }
-
- //New Evas comes. Create new event manager for this Evas.
- if (new_event_mgr)
- {
- if (!(event_mgr = _eext_event_mgr_new(e))) return;
- event_mgrs = eina_list_append(event_mgrs, event_mgr);
- }
-
- obj_event = evas_object_data_get(obj, EEXT_OBJ_KEY_OBJ_EVENT);
-
- //New Object Event. Probably user adds eext_object_event_callback first time.
- if (!obj_event)
- {
- obj_event = calloc(1, sizeof(Eext_Object_Event));
- if (!obj_event)
- {
- LOGE("Failed to allocate object event");
- return;
- }
- evas_object_data_set(obj, EEXT_OBJ_KEY_OBJ_EVENT, obj_event);
- evas_object_data_set(obj, EEXT_OBJ_KEY_EVENT_MGR, event_mgr);
- evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
- _eext_object_del_cb,
- obj_event);
- event_mgr->obj_events = eina_list_append(event_mgr->obj_events,
- obj_event);
- obj_event->obj = obj;
- }
-
- //Append this callback.
- callback = calloc(1, sizeof(Eext_Event_Callback));
- if (!callback)
- {
- LOGE("Failed to allocate event callback");
- return;
- }
- callback->type = type;
- callback->func = func;
- callback->data = data;
-
- obj_event->callbacks = eina_list_append(obj_event->callbacks, callback);
-}
* Local *
*===========================================================================*/
+int _eext_log_dom = -1;
+
static const char *
_magic_string_get(eext_magic m)
{
__CONSTRUCTOR__ static void
eext_mod_init(void)
{
+ eina_init();
+ _eext_log_dom = eina_log_domain_register("efl-extension", EINA_COLOR_LIGHTBLUE);
+ if (!_eext_log_dom)
+ {
+ EINA_LOG_ERR("could not register efl-extension log domain.");
+ _eext_log_dom = EINA_LOG_DOMAIN_GLOBAL;
+ }
+ INF("Init");
}
__DESTRUCTOR__ static void
eext_mod_shutdown(void)
{
+ INF("Shutdown\n");
+ if ((_eext_log_dom > -1) && (_eext_log_dom != EINA_LOG_DOMAIN_GLOBAL))
+ {
+ eina_log_domain_unregister(_eext_log_dom);
+ _eext_log_dom = -1;
+ }
+
+ eina_shutdown();
}
void
_eext_magic_fail(const void *d, eext_magic m, eext_magic req_m, const char *fname)
{
- LOGE("\n*** MAGIC FAIL (%s) ***\n", fname);
+ ERR("\n*** MAGIC FAIL (%s) ***\n", fname);
if (!d)
- LOGE(" Input handle pointer is NULL!");
+ ERR(" Input handle pointer is NULL!");
else if (m == EEXT_MAGIC_NONE)
- LOGE(" Input handle has already been freed!");
+ ERR(" Input handle has already been freed!");
else if (m != req_m)
- LOGE(" Input handle is wrong type\n"
+ ERR(" Input handle is wrong type\n"
" Expected: %08x - %s\n"
" Supplied: %08x - %s",
(unsigned int)req_m, _magic_string_get(req_m),
(unsigned int)m, _magic_string_get(m));
- gchar **envp = g_get_environ();
- if (g_environ_getenv(envp, "EEXT_ERROR_ABORT")) abort();
+// gchar **envp = g_get_environ();
+// if (g_environ_getenv(envp, "EEXT_ERROR_ABORT")) abort();
+ if (getenv("EEXT_ERROR_ABORT")) abort();
}
/*===========================================================================*
if (strcmp(elm_object_widget_type_get(obj), "Elm_Win"))
{
- LOGE(" Input object is not elm_win widget");
+ ERR(" Input object is not elm_win widget");
return 0;
}
if (engine_name &&
Eina_Bool ret = EINA_FALSE;
ret = elm_win_keygrab_set(obj, key, 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST);
if (!ret)
- LOGE(" Can't set keygrab of [%s].", key);
+ ERR(" Can't set keygrab of [%s].", key);
return ret;
}
Eina_Bool ret = EINA_FALSE;
ret = elm_win_keygrab_unset(obj, key, 0, 0);
if (!ret)
- LOGE(" Can't unset keygrab of [%s].", key);
+ ERR(" Can't unset keygrab of [%s].", key);
return ret;
}
--- /dev/null
+/*
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Licensed under the Flora License, Version 1.1 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * 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.
+ */
+
+#include "efl_extension.h"
+#include "efl_extension_private.h"
+
+typedef struct _Eext_Event_Mgr Eext_Event_Mgr;
+
+struct _Eext_Event_Mgr
+{
+ Eina_List *obj_events;
+ Evas *e;
+ Evas_Object *key_grab_rect;
+};
+
+typedef struct _Eext_Object_Event
+{
+ Evas_Object *obj;
+ Evas_Object *parent;
+ Eina_List *callbacks;
+ Eina_Bool delete_me : 1;
+ Eina_Bool on_callback : 1;
+} Eext_Object_Event;
+
+typedef struct _Eext_Event_Callback
+{
+ Eext_Callback_Type type;
+ void (*func)(void *data, Evas_Object *obj, void *event_info);
+ void *data;
+} Eext_Event_Callback;
+
+const char *EEXT_OBJ_KEY_EVENT_MGR = "_eext_obj_key_event_mgr";
+const char *EEXT_OBJ_KEY_OBJ_EVENT = "_eext_obj_key_obj_event";
+const char *EEXT_KEY_STOP = "XF86Stop";
+const char *EEXT_KEY_STOP2 = "Escape";
+const char *EEXT_KEY_STOP3 = "XF86Back";
+const char *EEXT_KEY_SEND = "XF86Send";
+const char *EEXT_KEY_SEND2 = "Menu";
+const char *EEXT_KEY_SEND3 = "XF86Menu";
+const char *EEXT_KEY_BACK = "XF86Back";
+const char *EEXT_KEY_BACK2 = "XF86Stop";
+const char *EEXT_KEY_BACK3 = "Escape";
+const char *EEXT_KEY_MENU = "XF86Menu";
+const char *EEXT_KEY_MENU2 = "XF86Send";
+const char *EEXT_KEY_MENU3 = "Menu";
+
+
+static Eina_List *event_mgrs = NULL;
+
+static void
+_eext_event_mgr_del(Eext_Event_Mgr *event_mgr)
+{
+ if (event_mgr->obj_events) return;
+
+ //Redundant Event Mgr. Remove it.
+ evas_object_del(event_mgr->key_grab_rect);
+ event_mgrs = eina_list_remove(event_mgrs, event_mgr);
+ free(event_mgr);
+}
+
+static void
+_eext_object_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ Eext_Event_Mgr *event_mgr = evas_object_data_get(obj, EEXT_OBJ_KEY_EVENT_MGR);
+ Eext_Object_Event *obj_event = data;
+ Eina_List *l;
+ Eext_Event_Callback *callback;
+
+ l = eina_list_data_find_list(event_mgr->obj_events, obj_event);
+ if (!l) return;
+
+ event_mgr->obj_events = eina_list_remove_list(event_mgr->obj_events, l);
+
+ EINA_LIST_FREE(obj_event->callbacks, callback) free(callback);
+ obj_event->callbacks = NULL;
+
+ if (obj_event->on_callback) obj_event->delete_me = EINA_TRUE;
+ else free(obj_event);
+
+ _eext_event_mgr_del(event_mgr);
+}
+
+static int
+_eext_layer_sort_cb(const void *data1, const void *data2)
+{
+ const Eext_Object_Event *obj_event = data1;
+ const Eext_Object_Event *obj_event2 = data2;
+
+ //1. Layer Compare
+ int layer1 = evas_object_layer_get(obj_event->obj);
+ int layer2 = evas_object_layer_get(obj_event2->obj);
+
+ return (layer1 < layer2) ? -1 : 1;
+}
+
+static Evas_Object *
+_eext_top_parent_candidates(Eina_List **candidates, Evas *e)
+{
+ Evas_Object *temp;
+ Evas_Object *parent;
+ Eina_List *l, *l_next;
+ Eext_Object_Event *obj_event;
+ Eina_List *_candidates = *candidates;
+ Eina_Bool found = EINA_FALSE;
+
+ //Get the top parent lists
+ EINA_LIST_FOREACH(_candidates, l, obj_event)
+ {
+ temp = obj_event->obj;
+ parent = obj_event->obj;
+ while (temp)
+ {
+ parent = temp;
+ temp = evas_object_smart_parent_get(temp);
+ }
+ obj_event->parent = parent;
+ }
+
+ //Leave only parent candidates.
+ parent = evas_object_top_get(e);
+
+ while (parent)
+ {
+ EINA_LIST_FOREACH(_candidates, l, obj_event)
+ {
+ if (parent == obj_event->parent)
+ {
+ found = EINA_TRUE;
+ obj_event->parent = NULL;
+ }
+ }
+ if (found) break;
+ parent = evas_object_below_get(parent);
+ }
+
+ //Redundant parents (no candidates)
+ EINA_LIST_FOREACH_SAFE(_candidates, l, l_next, obj_event)
+ {
+ if (!obj_event->parent) continue;
+ _candidates = eina_list_remove_list(_candidates, l);
+ }
+
+ *candidates = _candidates;
+ return parent;
+}
+
+static Eext_Object_Event *
+_eext_find_event_target(Eina_List *candidates, Evas_Object *parent, Eext_Callback_Type type)
+{
+ Eext_Object_Event *obj_event = NULL;
+ Eina_List *l, *ll;
+ Evas_Object *obj;
+ Eina_List *members = NULL;
+ Eext_Event_Callback *callback;
+
+// if (eo_isa(parent, EVAS_OBJECT_SMART_CLASS))
+ if (eo_isa(parent, evas_object_smart_class_get()))
+ members = evas_object_smart_members_get(parent);
+
+ if (members)
+ {
+ EINA_LIST_REVERSE_FOREACH(members, l, obj)
+ {
+ obj_event = _eext_find_event_target(candidates, obj, type);
+ //got you!
+ if (obj_event)
+ {
+ EINA_LIST_FOREACH(obj_event->callbacks, ll, callback)
+ {
+ if (callback->type == type)
+ {
+ eina_list_free(members);
+ return obj_event;
+ }
+ }
+ }
+ }
+ eina_list_free(members);
+ }
+
+ EINA_LIST_REVERSE_FOREACH(candidates, l, obj_event)
+ {
+ //got you!
+ if (parent == obj_event->obj)
+ {
+ EINA_LIST_FOREACH(obj_event->callbacks, ll, callback)
+ {
+ if (callback->type == type)
+ return obj_event;
+ }
+ }
+ }
+
+ return NULL;
+}
+
+static Eext_Object_Event *
+_eext_top_obj_event_find(Eext_Event_Mgr *event_mgr, Eext_Callback_Type type)
+{
+ Eext_Object_Event *obj_event = NULL;
+ Eina_List *l, *l_next;
+ Eina_List *candidates = NULL;
+ Evas_Object *parent;
+ int top_layer;
+ Eina_Bool invisible;
+
+ //1. filter the invisible objs
+ EINA_LIST_FOREACH(event_mgr->obj_events, l, obj_event)
+ {
+ parent = obj_event->obj;
+ invisible = EINA_FALSE;
+
+ while (parent)
+ {
+ if (!evas_object_visible_get(parent))
+ {
+ invisible = EINA_TRUE;
+ break;
+ }
+ parent = evas_object_smart_parent_get(parent);
+ }
+ if (invisible) continue;
+ candidates = eina_list_append(candidates, obj_event);
+ }
+ if (!candidates) return NULL; //no visible objects.
+ if (eina_list_count(candidates) == 1) goto found;
+
+ //2.1. sort by layer order
+ candidates = eina_list_sort(candidates, eina_list_count(candidates),
+ _eext_layer_sort_cb);
+
+ //2.2. leave the only top layer
+ obj_event = eina_list_data_get(eina_list_last(candidates));
+ top_layer = evas_object_layer_get(obj_event->obj);
+
+ EINA_LIST_FOREACH_SAFE(candidates, l, l_next, obj_event)
+ {
+ if (evas_object_layer_get(obj_event->obj) < top_layer)
+ candidates = eina_list_remove_list(candidates, l);
+ }
+ if (eina_list_count(candidates) == 1) goto found;
+
+ //3. find the top parent candidate.
+ parent = _eext_top_parent_candidates(&candidates, event_mgr->e);
+ if (eina_list_count(candidates) == 1) goto found;
+
+ //4. find the target in this parent tree.
+ obj_event = _eext_find_event_target(candidates, parent, type);
+ eina_list_free(candidates);
+ return obj_event;
+
+found:
+ obj_event = eina_list_data_get(candidates);
+ eina_list_free(candidates);
+ return obj_event;
+}
+
+static void
+_eext_key_grab_rect_key_up_cb(void *data, Evas *e, Evas_Object *obj,
+ void *event_info)
+{
+ Evas_Event_Key_Down *ev = event_info;
+ Eext_Event_Mgr *event_mgr = data;
+ Eext_Object_Event *obj_event;
+ Eext_Event_Callback *callback;
+ Eext_Callback_Type type;
+ Eina_List *l;
+
+ obj_event = _eext_top_obj_event_find(event_mgr, type);
+ if (!obj_event) return;
+
+ if (!strcmp(ev->keyname, EEXT_KEY_SEND) ||
+ !strcmp(ev->keyname, EEXT_KEY_SEND2) ||
+ !strcmp(ev->keyname, EEXT_KEY_SEND3))
+ type = EEXT_CALLBACK_MORE;
+ else if (!strcmp(ev->keyname, EEXT_KEY_STOP) ||
+ !strcmp(ev->keyname, EEXT_KEY_STOP2) ||
+ !strcmp(ev->keyname, EEXT_KEY_STOP3) ||
+ !strcmp(ev->keyname, EEXT_KEY_BACK) ||
+ !strcmp(ev->keyname, EEXT_KEY_BACK2) ||
+ !strcmp(ev->keyname, EEXT_KEY_BACK3))
+ type = EEXT_CALLBACK_BACK;
+ else if (!strcmp(ev->keyname, EEXT_KEY_SEND) ||
+ !strcmp(ev->keyname, EEXT_KEY_SEND2) ||
+ !strcmp(ev->keyname, EEXT_KEY_SEND3) ||
+ !strcmp(ev->keyname, EEXT_KEY_MENU) ||
+ !strcmp(ev->keyname, EEXT_KEY_MENU2) ||
+ !strcmp(ev->keyname, EEXT_KEY_MENU3))
+ type = EEXT_CALLBACK_MORE;
+ else return;
+
+ obj_event->on_callback = EINA_TRUE;
+ EINA_LIST_FOREACH(obj_event->callbacks, l, callback)
+ {
+ if (callback->type != type) continue;
+ callback->func(callback->data, obj_event->obj, (void*) type);
+ if (obj_event->delete_me) break;
+ }
+ if (obj_event->delete_me) free(obj_event);
+ else obj_event->on_callback = EINA_FALSE;
+}
+
+static void
+_eext_key_grab_obj_create(Eext_Event_Mgr *event_mgr)
+{
+ Evas_Object *key_grab_rect = evas_object_rectangle_add(event_mgr->e);
+
+ evas_object_event_callback_add(key_grab_rect, EVAS_CALLBACK_KEY_UP,
+ _eext_key_grab_rect_key_up_cb, event_mgr);
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_STOP, 0, 0, EINA_FALSE))
+ ERR("Failed to grab END KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_STOP2, 0, 0, EINA_FALSE))
+ ERR("Failed to grab END KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_STOP3, 0, 0, EINA_FALSE))
+ ERR("Failed to grab END KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_SEND, 0, 0, EINA_FALSE))
+ ERR("Failed to grab MORE KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_SEND2, 0, 0, EINA_FALSE))
+ ERR("Failed to grab MORE KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_SEND3, 0, 0, EINA_FALSE))
+ ERR("Failed to grab MORE KEY\n");
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_BACK, 0, 0, EINA_FALSE))
+ ERR ("Failed to grab BACK KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_BACK2, 0, 0, EINA_FALSE))
+ ERR("Failed to grab BACK KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_BACK3, 0, 0, EINA_FALSE))
+ ERR("Failed to grab BACK KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_MENU, 0, 0, EINA_FALSE))
+ ERR("Failed to grab MENU KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_MENU2, 0, 0, EINA_FALSE))
+ ERR("Failed to grab MENU KEY\n");
+
+ if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_MENU3, 0, 0, EINA_FALSE))
+ ERR("Failed to grab MENU KEY\n");
+
+ event_mgr->key_grab_rect = key_grab_rect;
+}
+
+static Eext_Event_Mgr *
+_eext_event_mgr_new(Evas *e)
+{
+ Eext_Event_Mgr *event_mgr = calloc(1, sizeof(Eext_Event_Mgr));
+ if (!event_mgr)
+ {
+ ERR("Failed to allocate event manager");
+ return NULL;
+ }
+ event_mgr->e = e;
+ _eext_key_grab_obj_create(event_mgr);
+
+ return event_mgr;
+}
+
+EAPI void *
+eext_object_event_callback_del(Evas_Object *obj, Eext_Callback_Type type, Eext_Event_Cb func)
+{
+ Eext_Object_Event *obj_event;
+ Eext_Event_Mgr *event_mgr;
+ Eina_List *l;
+ Eext_Event_Callback *callback;
+ void *data;
+
+ //Check the validation
+ event_mgr = evas_object_data_get(obj, EEXT_OBJ_KEY_EVENT_MGR);
+ obj_event = evas_object_data_get(obj, EEXT_OBJ_KEY_OBJ_EVENT);
+
+ if (!event_mgr || !obj_event)
+ {
+ WRN("This object(%p) hasn't been registered before", obj);
+ return NULL;
+ }
+
+ //Remove the callback data
+ EINA_LIST_REVERSE_FOREACH(obj_event->callbacks, l, callback)
+ {
+ if ((callback->func == func) && (callback->type == type)) break;
+ }
+
+ if (!callback)
+ {
+ WRN("This object(%p) hasn't been registered before with the given type(%d) and func(%p)", obj, type, func);
+ return NULL;
+ }
+
+ data = callback->data;
+ obj_event->callbacks = eina_list_remove_list(obj_event->callbacks, l);
+ free(callback);
+
+ //This object is not managed anymore.
+ if (!obj_event->callbacks)
+ {
+ evas_object_data_set(obj, EEXT_OBJ_KEY_OBJ_EVENT, NULL);
+ evas_object_data_set(obj, EEXT_OBJ_KEY_EVENT_MGR, NULL);
+ Eina_List *l = eina_list_data_find_list(event_mgr->obj_events,
+ obj_event);
+ if (l)
+ event_mgr->obj_events = eina_list_remove_list(event_mgr->obj_events,
+ l);
+ if (obj_event->on_callback) obj_event->delete_me = EINA_TRUE;
+ else free(obj_event);
+
+ evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, _eext_object_del_cb);
+ }
+
+ _eext_event_mgr_del(event_mgr);
+
+ return data;
+}
+
+EAPI void
+eext_object_event_callback_add(Evas_Object *obj, Eext_Callback_Type type, Eext_Event_Cb func, void *data)
+{
+ Eext_Event_Mgr *event_mgr;
+ Evas *e;
+ Eext_Object_Event *obj_event = NULL;
+ Eina_List *l;
+ Eext_Event_Callback *callback;
+ Eina_Bool new_event_mgr = EINA_TRUE;
+
+ //Check the registered event manager for this Evas.
+ e = evas_object_evas_get(obj);
+
+ EINA_LIST_FOREACH(event_mgrs, l, event_mgr)
+ {
+ if (event_mgr->e == e)
+ {
+ new_event_mgr = EINA_FALSE;
+ break;
+ }
+ }
+
+ //New Evas comes. Create new event manager for this Evas.
+ if (new_event_mgr)
+ {
+ if (!(event_mgr = _eext_event_mgr_new(e))) return;
+ event_mgrs = eina_list_append(event_mgrs, event_mgr);
+ }
+
+ obj_event = evas_object_data_get(obj, EEXT_OBJ_KEY_OBJ_EVENT);
+
+ //New Object Event. Probably user adds eext_object_event_callback first time.
+ if (!obj_event)
+ {
+ obj_event = calloc(1, sizeof(Eext_Object_Event));
+ if (!obj_event)
+ {
+ ERR("Failed to allocate object event");
+ return;
+ }
+ evas_object_data_set(obj, EEXT_OBJ_KEY_OBJ_EVENT, obj_event);
+ evas_object_data_set(obj, EEXT_OBJ_KEY_EVENT_MGR, event_mgr);
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
+ _eext_object_del_cb,
+ obj_event);
+ event_mgr->obj_events = eina_list_append(event_mgr->obj_events,
+ obj_event);
+ obj_event->obj = obj;
+ }
+
+ //Append this callback.
+ callback = calloc(1, sizeof(Eext_Event_Callback));
+ if (!callback)
+ {
+ ERR("Failed to allocate event callback");
+ return;
+ }
+ callback->type = type;
+ callback->func = func;
+ callback->data = data;
+
+ obj_event->callbacks = eina_list_append(obj_event->callbacks, callback);
+}
+++ /dev/null
-add_definitions(-DEFL_EO_API_SUPPORT=1 -DEFL_BETA_API_SUPPORT=1)
-
-SET(LIB_SRCS
- ${LIB_SRCS}
- eext_floatingbutton.c
- )
-SET (ALL_EO_FILES
- eext_floatingbutton.eo
- )
-
-foreach(eo_file ${ALL_EO_FILES})
- string(REPLACE .eo .eo.c out_c_file ${eo_file})
- string(REPLACE .eo .eo.h out_h_file ${eo_file})
- string(REPLACE .eo .eo.legacy.h out_legacy_file ${eo_file})
- string(REPLACE .eo .c c_file ${eo_file})
- add_custom_command(
- OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${out_c_file}
- COMMAND /usr/bin/eolian_gen ${eo_file} --eo --legacy --gc -I /usr/share/eolian/include -o ${out_c_file}
- COMMAND /usr/bin/eolian_gen ${eo_file} --eo --gh -I /usr/share/eolian/include -o "../include/${out_h_file}"
- COMMAND /usr/bin/eolian_gen ${eo_file} --legacy --gh -I /usr/share/eolian/include -o "../include/${out_legacy_file}"
- DEPENDS ${eo_file} ${CMAKE_CURRENT_SOURCE_DIR}/*.eo
- COMMENT "Compiling Eo: ${eo_file}, Output eo : ${out_c_file}"
- VERBATIM)
- add_custom_target(target_${eo_file} ALL DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${out_c_file})
- SET (ALL_EO_TARGETS ${ALL_EO_TARGETS} target_${eo_file})
-endforeach(eo_file)
-
-ADD_LIBRARY(${LIB_NAME} SHARED ${LIB_SRCS})
-ADD_DEPENDENCIES(${LIB_NAME} ${ALL_EO_TARGETS})
-
-ADD_DEFINITIONS("-DEXPORT_API=__attribute__((visibility(\"default\")))")
-PKG_CHECK_MODULES(LIB_PKGS REQUIRED
- elementary
- dlog
- fontconfig
- glib-2.0
- )
-
-FOREACH(flag ${LIB_PKGS_CFLAGS})
- SET(LIB_CFLAGS "${LIB_CFLAGS} ${flag}")
-ENDFOREACH(flag)
-
-SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES COMPILE_FLAGS "${LIB_CFLAGS}")
-SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES VERSION ${VERSION})
-SET_TARGET_PROPERTIES(${LIB_NAME} PROPERTIES SOVERSION ${VERSION_MAJOR})
-TARGET_LINK_LIBRARIES(${LIB_NAME} ${LIB_PKGS_LDFLAGS} ${LIB_TARGET_PKGS_LDFLAGS})
-
-INSTALL(TARGETS ${LIB_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
-#INSTALL(FILES ${ALL_EO_FILES} DESTINATION share/eolian/include/efl-extension)
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "../../data/HD-inc.edc"
+#include "../../data/mobile/HD-inc.edc"
#include <elm_widget.h>
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
static void
_eext_circle_object_del_cb(void *data,
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
#define EEXT_CIRCLE_OBJECT_DATETIME_TYPE "Eext_Circle_Object_Datetime"
#define MIN_DAYS_IN_MONTH 28
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
#define EEXT_CIRCLE_OBJECT_GENLIST_TYPE "Eext_Circle_Object_Genlist"
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
static void _eext_circle_object_item_color_transit_animator_del(Eext_Circle_Object_Item *item);
static void _eext_circle_object_item_angle_transit_animator_del(Eext_Circle_Object_Item *item);
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
#define EEXT_CIRCLE_OBJECT_PROGRESSBAR_TYPE "Eext_Circle_Progressbar"
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
#define EEXT_CIRCLE_OBJECT_SCROLLER_TYPE "Eext_Circle_Object_Scroller"
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
#define EEXT_CIRCLE_OBJECT_SLIDER_TYPE "Eext_Circle_Object_Slider"
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
#define EEXT_CIRCLE_OBJECT_SPINNER_TYPE "Eext_Circle_Object_Spinner"
#define SPINNER_ITEM_NAME "default"
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
static void _eext_circle_surface_del_internal(Eext_Circle_Surface *surface);
static void _eext_circle_surface_render(void *data);
*/
#include <Elementary.h>
-#include "circle/efl_extension_rotary.h"
+#include "wearable/circle/efl_extension_rotary.h"
#include "efl_extension_private.h"
#ifdef WITH_X
#include <Ecore_X.h>
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "efl_extension.h"
-#include "efl_extension_private.h"
-
-/*===========================================================================*
- * Local *
- *===========================================================================*/
-
-int _eext_log_dom = -1;
-
-static const char *
-_magic_string_get(eext_magic m)
-{
- switch (m) {
- case EEXT_MAGIC_NONE:
- return "None (Freed Object)";
-
- default:
- return "<UNKNOWN>";
- }
-}
-
-__CONSTRUCTOR__ static void
-eext_mod_init(void)
-{
- eina_init();
- _eext_log_dom = eina_log_domain_register("efl-extension", EINA_COLOR_LIGHTBLUE);
- if (!_eext_log_dom)
- {
- EINA_LOG_ERR("could not register efl-extension log domain.");
- _eext_log_dom = EINA_LOG_DOMAIN_GLOBAL;
- }
- INF("Init");
-}
-
-__DESTRUCTOR__ static void
-eext_mod_shutdown(void)
-{
- INF("Shutdown\n");
- if ((_eext_log_dom > -1) && (_eext_log_dom != EINA_LOG_DOMAIN_GLOBAL))
- {
- eina_log_domain_unregister(_eext_log_dom);
- _eext_log_dom = -1;
- }
-
- eina_shutdown();
-}
-
-
-/*===========================================================================*
- * Global *
- *===========================================================================*/
-
-void
-_eext_magic_fail(const void *d, eext_magic m, eext_magic req_m, const char *fname)
-{
- ERR("\n*** MAGIC FAIL (%s) ***\n", fname);
-
- if (!d)
- ERR(" Input handle pointer is NULL!");
- else if (m == EEXT_MAGIC_NONE)
- ERR(" Input handle has already been freed!");
- else if (m != req_m)
- ERR(" Input handle is wrong type\n"
- " Expected: %08x - %s\n"
- " Supplied: %08x - %s",
- (unsigned int)req_m, _magic_string_get(req_m),
- (unsigned int)m, _magic_string_get(m));
-
- if (getenv("EEXT_ERROR_ABORT")) abort();
-}
-
-/*===========================================================================*
- * API *
- *===========================================================================*/
-
-EAPI Eina_Bool
-eext_win_keygrab_set(Elm_Win *obj, const char *key)
-{
- Eina_Bool ret = EINA_FALSE;
- ret = elm_win_keygrab_set(obj, key, 0, 0, 0, ELM_WIN_KEYGRAB_TOPMOST);
- if (!ret)
- ERR(" Can't set keygrab of [%s].", key);
- return ret;
-}
-EAPI Eina_Bool
-eext_win_keygrab_unset(Elm_Win *obj, const char *key)
-{
- Eina_Bool ret = EINA_FALSE;
- ret = elm_win_keygrab_unset(obj, key, 0, 0);
- if (!ret)
- ERR(" Can't unset keygrab of [%s].", key);
- return ret;
-}
+++ /dev/null
-/*
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Licensed under the Flora License, Version 1.1 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://floralicense.org/license/
- *
- * 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.
- */
-
-#include "efl_extension.h"
-#include "efl_extension_private.h"
-
-typedef struct _Eext_Event_Mgr Eext_Event_Mgr;
-
-struct _Eext_Event_Mgr
-{
- Eina_List *obj_events;
- Evas *e;
- Evas_Object *key_grab_rect;
-};
-
-typedef struct _Eext_Object_Event
-{
- Evas_Object *obj;
- Evas_Object *parent;
- Eina_List *callbacks;
- Eina_Bool delete_me : 1;
- Eina_Bool on_callback : 1;
-} Eext_Object_Event;
-
-typedef struct _Eext_Event_Callback
-{
- Eext_Callback_Type type;
- void (*func)(void *data, Evas_Object *obj, void *event_info);
- void *data;
-} Eext_Event_Callback;
-
-const char *EEXT_OBJ_KEY_EVENT_MGR = "_eext_obj_key_event_mgr";
-const char *EEXT_OBJ_KEY_OBJ_EVENT = "_eext_obj_key_obj_event";
-const char *EEXT_KEY_STOP = "XF86Stop";
-const char *EEXT_KEY_STOP2 = "Escape";
-const char *EEXT_KEY_STOP3 = "XF86Back";
-const char *EEXT_KEY_SEND = "XF86Send";
-const char *EEXT_KEY_SEND2 = "Menu";
-const char *EEXT_KEY_SEND3 = "XF86Menu";
-
-
-static Eina_List *event_mgrs = NULL;
-
-static void
-_eext_event_mgr_del(Eext_Event_Mgr *event_mgr)
-{
- if (event_mgr->obj_events) return;
-
- //Redundant Event Mgr. Remove it.
- evas_object_del(event_mgr->key_grab_rect);
- event_mgrs = eina_list_remove(event_mgrs, event_mgr);
- free(event_mgr);
-}
-
-static void
-_eext_object_del_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- Eext_Event_Mgr *event_mgr = evas_object_data_get(obj, EEXT_OBJ_KEY_EVENT_MGR);
- Eext_Object_Event *obj_event = data;
- Eina_List *l;
- Eext_Event_Callback *callback;
-
- l = eina_list_data_find_list(event_mgr->obj_events, obj_event);
- if (!l) return;
-
- event_mgr->obj_events = eina_list_remove_list(event_mgr->obj_events, l);
-
- EINA_LIST_FREE(obj_event->callbacks, callback) free(callback);
- obj_event->callbacks = NULL;
-
- if (obj_event->on_callback) obj_event->delete_me = EINA_TRUE;
- else free(obj_event);
-
- _eext_event_mgr_del(event_mgr);
-}
-
-static int
-_eext_layer_sort_cb(const void *data1, const void *data2)
-{
- const Eext_Object_Event *obj_event = data1;
- const Eext_Object_Event *obj_event2 = data2;
-
- //1. Layer Compare
- int layer1 = evas_object_layer_get(obj_event->obj);
- int layer2 = evas_object_layer_get(obj_event2->obj);
-
- return (layer1 < layer2) ? -1 : 1;
-}
-
-static Evas_Object *
-_eext_top_parent_candidates(Eina_List **candidates, Evas *e)
-{
- Evas_Object *temp;
- Evas_Object *parent;
- Eina_List *l, *l_next;
- Eext_Object_Event *obj_event;
- Eina_List *_candidates = *candidates;
- Eina_Bool found = EINA_FALSE;
-
- //Get the top parent lists
- EINA_LIST_FOREACH(_candidates, l, obj_event)
- {
- temp = obj_event->obj;
- parent = obj_event->obj;
- while (temp)
- {
- parent = temp;
- temp = evas_object_smart_parent_get(temp);
- }
- obj_event->parent = parent;
- }
-
- //Leave only parent candidates.
- parent = evas_object_top_get(e);
-
- while (parent)
- {
- EINA_LIST_FOREACH(_candidates, l, obj_event)
- {
- if (parent == obj_event->parent)
- {
- found = EINA_TRUE;
- obj_event->parent = NULL;
- }
- }
- if (found) break;
- parent = evas_object_below_get(parent);
- }
-
- //Redundant parents (no candidates)
- EINA_LIST_FOREACH_SAFE(_candidates, l, l_next, obj_event)
- {
- if (!obj_event->parent) continue;
- _candidates = eina_list_remove_list(_candidates, l);
- }
-
- *candidates = _candidates;
- return parent;
-}
-
-static Eext_Object_Event *
-_eext_find_event_target(Eina_List *candidates, Evas_Object *parent)
-{
- Eext_Object_Event *obj_event = NULL;
- Eina_List *l;
- Evas_Object *obj;
- Eina_List *members = evas_object_smart_members_get(parent);
- if (members)
- {
- EINA_LIST_REVERSE_FOREACH(members, l, obj)
- {
- obj_event = _eext_find_event_target(candidates, obj);
- //got you!
- if (obj_event)
- {
- eina_list_free(members);
- return obj_event;
- }
- }
- eina_list_free(members);
- }
-
- EINA_LIST_REVERSE_FOREACH(candidates, l, obj_event)
- {
- //got you!
- if (parent == obj_event->obj) return obj_event;
- }
-
- return NULL;
-}
-
-static Eext_Object_Event *
-_eext_top_obj_event_find(Eext_Event_Mgr *event_mgr)
-{
- Eext_Object_Event *obj_event = NULL;
- Eina_List *l, *l_next;
- Eina_List *candidates = NULL;
- Evas_Object *parent;
- int top_layer;
- Eina_Bool invisible;
-
- //1. filter the invisible objs
- EINA_LIST_FOREACH(event_mgr->obj_events, l, obj_event)
- {
- parent = obj_event->obj;
- invisible = EINA_FALSE;
-
- while (parent)
- {
- if (!evas_object_visible_get(parent))
- {
- invisible = EINA_TRUE;
- break;
- }
- parent = evas_object_smart_parent_get(parent);
- }
- if (invisible) continue;
- candidates = eina_list_append(candidates, obj_event);
- }
- if (!candidates) return NULL; //no visible objects.
- if (eina_list_count(candidates) == 1) goto found;
-
- //2.1. sort by layer order
- candidates = eina_list_sort(candidates, eina_list_count(candidates),
- _eext_layer_sort_cb);
-
- //2.2. leave the only top layer
- obj_event = eina_list_data_get(eina_list_last(candidates));
- top_layer = evas_object_layer_get(obj_event->obj);
-
- EINA_LIST_FOREACH_SAFE(candidates, l, l_next, obj_event)
- {
- if (evas_object_layer_get(obj_event->obj) < top_layer)
- candidates = eina_list_remove_list(candidates, l);
- }
- if (eina_list_count(candidates) == 1) goto found;
-
- //3. find the top parent candidate.
- parent = _eext_top_parent_candidates(&candidates, event_mgr->e);
- if (eina_list_count(candidates) == 1) goto found;
-
- //4. find the target in this parent tree.
- obj_event = _eext_find_event_target(candidates, parent);
- eina_list_free(candidates);
- return obj_event;
-
-found:
- obj_event = eina_list_data_get(candidates);
- eina_list_free(candidates);
- return obj_event;
-}
-
-static void
-_eext_key_grab_rect_key_up_cb(void *data, Evas *e, Evas_Object *obj,
- void *event_info)
-{
- Evas_Event_Key_Down *ev = event_info;
- Eext_Event_Mgr *event_mgr = data;
- Eext_Object_Event *obj_event;
- Eext_Event_Callback *callback;
- Eext_Callback_Type type;
- Eina_List *l;
-
- obj_event = _eext_top_obj_event_find(event_mgr);
- if (!obj_event) return;
-
- if (!strcmp(ev->keyname, EEXT_KEY_STOP) ||
- !strcmp(ev->keyname, EEXT_KEY_STOP2) ||
- !strcmp(ev->keyname, EEXT_KEY_STOP3))
- type = EEXT_CALLBACK_BACK;
- else if (!strcmp(ev->keyname, EEXT_KEY_SEND) ||
- !strcmp(ev->keyname, EEXT_KEY_SEND2) ||
- !strcmp(ev->keyname, EEXT_KEY_SEND3))
- type = EEXT_CALLBACK_MORE;
- else return;
-
- obj_event->on_callback = EINA_TRUE;
- EINA_LIST_FOREACH(obj_event->callbacks, l, callback)
- {
- if (callback->type != type) continue;
- callback->func(callback->data, obj_event->obj, (void*) type);
- if (obj_event->delete_me) break;
- }
- if (obj_event->delete_me) free(obj_event);
- else obj_event->on_callback = EINA_FALSE;
-}
-
-static void
-_eext_key_grab_obj_create(Eext_Event_Mgr *event_mgr)
-{
- Evas_Object *key_grab_rect = evas_object_rectangle_add(event_mgr->e);
-
- evas_object_event_callback_add(key_grab_rect, EVAS_CALLBACK_KEY_UP,
- _eext_key_grab_rect_key_up_cb, event_mgr);
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_STOP, 0, 0, EINA_FALSE))
- ERR("Failed to grab END KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_STOP2, 0, 0, EINA_FALSE))
- ERR("Failed to grab END KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_STOP3, 0, 0, EINA_FALSE))
- ERR("Failed to grab END KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_SEND, 0, 0, EINA_FALSE))
- ERR("Failed to grab MORE KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_SEND2, 0, 0, EINA_FALSE))
- ERR("Failed to grab MORE KEY\n");
-
- if (!evas_object_key_grab(key_grab_rect, EEXT_KEY_SEND3, 0, 0, EINA_FALSE))
- ERR("Failed to grab MORE KEY\n");
-
- event_mgr->key_grab_rect = key_grab_rect;
-}
-
-static Eext_Event_Mgr *
-_eext_event_mgr_new(Evas *e)
-{
- Eext_Event_Mgr *event_mgr = calloc(1, sizeof(Eext_Event_Mgr));
- if (!event_mgr)
- {
- ERR("Failed to allocate event manager");
- return NULL;
- }
- event_mgr->e = e;
- _eext_key_grab_obj_create(event_mgr);
-
- return event_mgr;
-}
-
-EAPI void *
-eext_object_event_callback_del(Evas_Object *obj, Eext_Callback_Type type, Eext_Event_Cb func)
-{
- Eext_Object_Event *obj_event;
- Eext_Event_Mgr *event_mgr;
- Eina_List *l;
- Eext_Event_Callback *callback;
- void *data;
-
- //Check the validation
- event_mgr = evas_object_data_get(obj, EEXT_OBJ_KEY_EVENT_MGR);
- obj_event = evas_object_data_get(obj, EEXT_OBJ_KEY_OBJ_EVENT);
-
- if (!event_mgr || !obj_event)
- {
- WRN("This object(%p) hasn't been registered before", obj);
- return NULL;
- }
-
- //Remove the callback data
- EINA_LIST_REVERSE_FOREACH(obj_event->callbacks, l, callback)
- {
- if ((callback->func == func) && (callback->type == type)) break;
- }
-
- if (!callback)
- {
- WRN("This object(%p) hasn't been registered before with the given type(%d) and func(%p)", obj, type, func);
- return NULL;
- }
-
- data = callback->data;
- obj_event->callbacks = eina_list_remove_list(obj_event->callbacks, l);
- free(callback);
-
- //This object is not managed anymore.
- if (!obj_event->callbacks)
- {
- evas_object_data_set(obj, EEXT_OBJ_KEY_OBJ_EVENT, NULL);
- evas_object_data_set(obj, EEXT_OBJ_KEY_EVENT_MGR, NULL);
- Eina_List *l = eina_list_data_find_list(event_mgr->obj_events,
- obj_event);
- if (l)
- event_mgr->obj_events = eina_list_remove_list(event_mgr->obj_events,
- l);
- if (obj_event->on_callback) obj_event->delete_me = EINA_TRUE;
- else free(obj_event);
-
- evas_object_event_callback_del(obj, EVAS_CALLBACK_DEL, _eext_object_del_cb);
- }
-
- _eext_event_mgr_del(event_mgr);
-
- return data;
-}
-
-EAPI void
-eext_object_event_callback_add(Evas_Object *obj, Eext_Callback_Type type, Eext_Event_Cb func, void *data)
-{
- Eext_Event_Mgr *event_mgr;
- Evas *e;
- Eext_Object_Event *obj_event = NULL;
- Eina_List *l;
- Eext_Event_Callback *callback;
- Eina_Bool new_event_mgr = EINA_TRUE;
-
- //Check the registered event manager for this Evas.
- e = evas_object_evas_get(obj);
-
- EINA_LIST_FOREACH(event_mgrs, l, event_mgr)
- {
- if (event_mgr->e == e)
- {
- new_event_mgr = EINA_FALSE;
- break;
- }
- }
-
- //New Evas comes. Create new event manager for this Evas.
- if (new_event_mgr)
- {
- if (!(event_mgr = _eext_event_mgr_new(e))) return;
- event_mgrs = eina_list_append(event_mgrs, event_mgr);
- }
-
- obj_event = evas_object_data_get(obj, EEXT_OBJ_KEY_OBJ_EVENT);
-
- //New Object Event. Probably user adds eext_object_event_callback first time.
- if (!obj_event)
- {
- obj_event = calloc(1, sizeof(Eext_Object_Event));
- if (!obj_event)
- {
- ERR("Failed to allocate object event");
- return;
- }
- evas_object_data_set(obj, EEXT_OBJ_KEY_OBJ_EVENT, obj_event);
- evas_object_data_set(obj, EEXT_OBJ_KEY_EVENT_MGR, event_mgr);
- evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
- _eext_object_del_cb,
- obj_event);
- event_mgr->obj_events = eina_list_append(event_mgr->obj_events,
- obj_event);
- obj_event->obj = obj;
- }
-
- //Append this callback.
- callback = calloc(1, sizeof(Eext_Event_Callback));
- if (!callback)
- {
- ERR("Failed to allocate event callback");
- return;
- }
- callback->type = type;
- callback->func = func;
- callback->data = data;
-
- obj_event->callbacks = eina_list_append(obj_event->callbacks, callback);
-}
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
-#include "common/efl_extension_common_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
+#include "wearable/efl_extension_common_private.h"
#define EEXT_MORE_OPTION_DATA_KEY "eext_more_option_data"
#include "efl_extension.h"
#include "efl_extension_private.h"
-#include "circle/efl_extension_circle_private.h"
-#include "common/efl_extension_common_private.h"
+#include "wearable/circle/efl_extension_circle_private.h"
+#include "wearable/efl_extension_common_private.h"
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//