unify mobile/wearable/tv/common profile 75/104875/9
authorSungtaek Hong <sth253.hong@samsung.com>
Wed, 14 Dec 2016 12:53:35 +0000 (21:53 +0900)
committerSungtaek Hong <sth253.hong@samsung.com>
Tue, 20 Dec 2016 02:19:44 +0000 (18:19 -0800)
Change-Id: If091ed32bae6139af34c1c4d95dc81cbbc6b830e
Signed-off-by: Sungtaek Hong <sth253.hong@samsung.com>
Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
37 files changed:
CMakeLists.txt
inc/CMakeLists.txt [new file with mode: 0644]
inc/efl_extension.h.in
inc/wearable/common/efl_extension_common.h [deleted file]
inc/wearable/common/efl_extension_common_private.h [deleted file]
inc/wearable/common/efl_extension_index_layout.h [deleted file]
inc/wearable/common/efl_extension_more_option.h [deleted file]
inc/wearable/common/efl_extension_rotary_selector.h [deleted file]
inc/wearable/efl_extension.h.in [deleted file]
inc/wearable/efl_extension_common.h [new file with mode: 0644]
inc/wearable/efl_extension_common_private.h [new file with mode: 0644]
inc/wearable/efl_extension_events.h [deleted file]
inc/wearable/efl_extension_index_layout.h [new file with mode: 0644]
inc/wearable/efl_extension_more_option.h [new file with mode: 0644]
inc/wearable/efl_extension_private.h [deleted file]
inc/wearable/efl_extension_rotary_selector.h [new file with mode: 0644]
packaging/efl-extension.spec
src/CMakeLists.txt [new file with mode: 0755]
src/eext_events.c [deleted file]
src/efl_extension.c
src/efl_extension_events.c [new file with mode: 0644]
src/mobile/CMakeLists.txt [deleted file]
src/mobile/eext_floatingbutton.c
src/wearable/circle/efl_extension_circle_object.c
src/wearable/circle/efl_extension_circle_object_datetime.c
src/wearable/circle/efl_extension_circle_object_genlist.c
src/wearable/circle/efl_extension_circle_object_item.c
src/wearable/circle/efl_extension_circle_object_progressbar.c
src/wearable/circle/efl_extension_circle_object_scroller.c
src/wearable/circle/efl_extension_circle_object_slider.c
src/wearable/circle/efl_extension_circle_object_spinner.c
src/wearable/circle/efl_extension_circle_surface.c
src/wearable/circle/efl_extension_rotary.c
src/wearable/efl_extension.c [deleted file]
src/wearable/efl_extension_events.c [deleted file]
src/wearable/efl_extension_more_option.c
src/wearable/efl_extension_rotary_selector.c

index e79340fa14af72d777327c6b7699ed209f8f5ab8..1404f3d5edd409020c8c6118018e460a564da1e3 100644 (file)
@@ -9,16 +9,20 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX})
 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")
@@ -46,31 +50,29 @@ ADD_DEFINITIONS("-DVERSION=\"${VERSION}\"")
 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)
 
@@ -81,13 +83,9 @@ SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=/usr/lib")
 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()
diff --git a/inc/CMakeLists.txt b/inc/CMakeLists.txt
new file mode 100644 (file)
index 0000000..eb8998c
--- /dev/null
@@ -0,0 +1,48 @@
+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()
index a060aa2dabba3886d232cf30a07756971939da9c..f460ac919b934a6a76392270f91dfef7dbad5fdc 100644 (file)
@@ -48,12 +48,15 @@ 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.
- * @since_tizen 2.4
+ * @if MOBILE @since_tizen 2.4
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  *
  * @{
  */
@@ -70,7 +73,9 @@ extern "C" {
  *
  * @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);
 
@@ -85,7 +90,9 @@ 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);
 
diff --git a/inc/wearable/common/efl_extension_common.h b/inc/wearable/common/efl_extension_common.h
deleted file mode 100644 (file)
index 816c824..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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__ */
diff --git a/inc/wearable/common/efl_extension_common_private.h b/inc/wearable/common/efl_extension_common_private.h
deleted file mode 100644 (file)
index 8c221df..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
- * 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__ */
diff --git a/inc/wearable/common/efl_extension_index_layout.h b/inc/wearable/common/efl_extension_index_layout.h
deleted file mode 100644 (file)
index abbcebe..0000000
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
- * 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__ */
diff --git a/inc/wearable/common/efl_extension_more_option.h b/inc/wearable/common/efl_extension_more_option.h
deleted file mode 100644 (file)
index 1ec1c37..0000000
+++ /dev/null
@@ -1,344 +0,0 @@
-/*
- * 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__ */
diff --git a/inc/wearable/common/efl_extension_rotary_selector.h b/inc/wearable/common/efl_extension_rotary_selector.h
deleted file mode 100644 (file)
index 1ac2c2f..0000000
+++ /dev/null
@@ -1,456 +0,0 @@
-/*
- * 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__ */
diff --git a/inc/wearable/efl_extension.h.in b/inc/wearable/efl_extension.h.in
deleted file mode 100644 (file)
index f460ac9..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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__ */
-
diff --git a/inc/wearable/efl_extension_common.h b/inc/wearable/efl_extension_common.h
new file mode 100644 (file)
index 0000000..816c824
--- /dev/null
@@ -0,0 +1,56 @@
+/*
+ * 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__ */
diff --git a/inc/wearable/efl_extension_common_private.h b/inc/wearable/efl_extension_common_private.h
new file mode 100644 (file)
index 0000000..8c221df
--- /dev/null
@@ -0,0 +1,205 @@
+/*
+ * 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__ */
diff --git a/inc/wearable/efl_extension_events.h b/inc/wearable/efl_extension_events.h
deleted file mode 100644 (file)
index 128ba2d..0000000
+++ /dev/null
@@ -1,347 +0,0 @@
-/*
- * 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__ */
diff --git a/inc/wearable/efl_extension_index_layout.h b/inc/wearable/efl_extension_index_layout.h
new file mode 100644 (file)
index 0000000..abbcebe
--- /dev/null
@@ -0,0 +1,218 @@
+/*
+ * 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__ */
diff --git a/inc/wearable/efl_extension_more_option.h b/inc/wearable/efl_extension_more_option.h
new file mode 100644 (file)
index 0000000..1ec1c37
--- /dev/null
@@ -0,0 +1,344 @@
+/*
+ * 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__ */
diff --git a/inc/wearable/efl_extension_private.h b/inc/wearable/efl_extension_private.h
deleted file mode 100644 (file)
index ca7f8be..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * 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__ */
diff --git a/inc/wearable/efl_extension_rotary_selector.h b/inc/wearable/efl_extension_rotary_selector.h
new file mode 100644 (file)
index 0000000..1ac2c2f
--- /dev/null
@@ -0,0 +1,456 @@
+/*
+ * 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__ */
index cea4ac1d96d51253aa186fc39618733c828dac19..a612046de3966fc1d078ab6d1ce347ef1deba36c 100644 (file)
@@ -1,9 +1,4 @@
-# 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
@@ -14,17 +9,17 @@ License:    Flora-1.1
 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)
@@ -34,25 +29,10 @@ BuildRequires:  pkgconfig(inputproto)
 %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
 
@@ -79,21 +59,6 @@ EFL extension library providing small utility functions (devel)
 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
@@ -104,9 +69,6 @@ cmake \
 cmake \
        . -DCMAKE_INSTALL_PREFIX=/usr
 %endif
-%else
-%cmake
-%endif
 
 make %{?jobs:-j%jobs}
 
@@ -123,43 +85,26 @@ cp %{_builddir}/%{buildsubdir}/LICENSE %{buildroot}/%{_datadir}/license/%{name}
 
 %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
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100755 (executable)
index 0000000..2220113
--- /dev/null
@@ -0,0 +1,132 @@
+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)
diff --git a/src/eext_events.c b/src/eext_events.c
deleted file mode 100644 (file)
index 254646b..0000000
+++ /dev/null
@@ -1,460 +0,0 @@
-/*
- * 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);
-}
index 32b79845b9c43565f890b983b13749255db2288f..a7ed5a4995528e171afc96a1f62b62d54821cd94 100644 (file)
@@ -21,6 +21,8 @@
  *                                 Local                                     *
  *===========================================================================*/
 
+int _eext_log_dom = -1;
+
 static const char *
 _magic_string_get(eext_magic m)
 {
@@ -36,11 +38,27 @@ _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();
 }
 
 
@@ -51,21 +69,22 @@ eext_mod_shutdown(void)
 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();
 }
 
 /*===========================================================================*
@@ -82,7 +101,7 @@ eext_win_tzsh_native_window_get(const Elm_Win *obj)
 
    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 &&
@@ -110,7 +129,7 @@ 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)
-     LOGE("  Can't set keygrab of [%s].", key);
+     ERR("  Can't set keygrab of [%s].", key);
    return ret;
 }
 
@@ -120,6 +139,6 @@ 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)
-     LOGE("  Can't unset keygrab of [%s].", key);
+     ERR("  Can't unset keygrab of [%s].", key);
    return ret;
 }
diff --git a/src/efl_extension_events.c b/src/efl_extension_events.c
new file mode 100644 (file)
index 0000000..db8d0bd
--- /dev/null
@@ -0,0 +1,494 @@
+/*
+ * 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);
+}
diff --git a/src/mobile/CMakeLists.txt b/src/mobile/CMakeLists.txt
deleted file mode 100644 (file)
index 41a6f9d..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-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)
index 1f44c4e1a0747ca4ce6ba5a2f654a19b6c9daf47..a2a4fb4b262c559bd57bcbde1c9ca81f79d54781 100644 (file)
@@ -20,7 +20,7 @@
 
 #include "efl_extension.h"
 #include "efl_extension_private.h"
-#include "../../data/HD-inc.edc"
+#include "../../data/mobile/HD-inc.edc"
 
 #include <elm_widget.h>
 
index 8f8f79825ed273eac031d07d77a1d7e8bb9e778e..7a555ec2550f50f2c8b4600de36a486d89a1e720 100644 (file)
@@ -16,7 +16,7 @@
 
 #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,
index 4ab21ac461dbb2066123d6f3dd5a365a241ebabc..d48f1ff384ab90bc2576afdf0dc4a6035fe1afe9 100644 (file)
@@ -16,7 +16,7 @@
 
 #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
index a2d90c7c4459fd7452a15900f21134dcab2122e1..b68c02dc893a68d29572ec61ce6280c536939489 100644 (file)
@@ -16,7 +16,7 @@
 
 #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"
 
index 82f4437feea425f4fc1fc86d719eb8d0251e383b..1926ac1fea5f2307048a5993ff6b77e22d238edc 100644 (file)
@@ -16,7 +16,7 @@
 
 #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);
index ec85a9989de98f6b6d1ce239f4f9c22f6cedf8a2..da20b20af6b259417289a88e7574d514ad8399a6 100644 (file)
@@ -16,7 +16,7 @@
 
 #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"
 
index 78228b72b4ce63c744efaa947ca76481165c6b87..e035f8dd67881aa1640971afb14111b6b3359022 100644 (file)
@@ -16,7 +16,7 @@
 
 #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"
 
index daca6d75787a43e46302ed320a6f2cf48682b4ad..06844ca13009c571d14d4bb19a56233783df812d 100644 (file)
@@ -16,7 +16,7 @@
 
 #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"
 
index da491e674ad207135f23c4e73a37f68355ea0bd0..b5c5080d00ee05f959a39eedd1b11ea7010d6fc8 100644 (file)
@@ -16,7 +16,7 @@
 
 #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"
index 90dbc70677b7cd10fe50aa2a083ad47f8f91126a..bef4ea761586472c083f2094f50fd5b313f29e6b 100644 (file)
@@ -16,7 +16,7 @@
 
 #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);
index 754fe951d3db214fe8f7a17b4943f3cf6e4870eb..948b477059969170c10379f7407216666cc66dfd 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 #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>
diff --git a/src/wearable/efl_extension.c b/src/wearable/efl_extension.c
deleted file mode 100644 (file)
index 2bfc0a3..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * 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;
-}
diff --git a/src/wearable/efl_extension_events.c b/src/wearable/efl_extension_events.c
deleted file mode 100644 (file)
index 132ee3a..0000000
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- * 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);
-}
index 1855fbfc3785212b50679322d68855f42f9b224f..0f6e753796ea9a58fbefeef02d551f88ad2b3476 100644 (file)
@@ -16,8 +16,8 @@
 
 #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"
 
index b5b0fc18f7a35b5b4dbad910054bcb46d9fb17d2..13f9222484ba67b3c1a74718d17325b754b7bb4c 100644 (file)
@@ -16,8 +16,8 @@
 
 #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"
 
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
 //