--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+
+PROJECT(share-panel C)
+
+SET(VERSION 0.1.0)
+
+SET(PACKAGE "org.tizen.${PROJECT_NAME}")
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(RESDIR "${PREFIX}/res")
+SET(EDJEDIR "${RESDIR}/edje")
+SET(LOCALEDIR "${RESDIR}/locale")
+
+SET(SRCS
+ src/index.c
+ src/item.c
+ src/ui_manager.c
+ src/list.c
+ src/page.c
+ src/scroller.c
+ src/share_panel.c
+)
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/include)
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ aul
+ capi-appfw-application
+ capi-appfw-app-manager
+ capi-system-system-settings
+ capi-base-common
+ capi-content-mime-type
+ dlog
+ elementary
+ evas
+ feedback
+ isf
+ efl-extension
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -g -Wall -O2")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
+
+ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
+ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"")
+ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
+
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/res/A01-1_icon_Menu.png DESTINATION res/images)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PACKAGE}.xml DESTINATION /usr/share/packages)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PACKAGE}.efl DESTINATION /etc/smack/accesses.d)
+
+# subdir
+ADD_SUBDIRECTORY(res)
+ADD_SUBDIRECTORY(po)
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_DOC_H__
+#define __TIZEN_SHARE_PANEL_DOC_H__
+
+/**
+ * @defgroup CAPI_PANEL_SHARE_MODULE Share panel
+ * @brief If users want to share selected files with other apps, then users can use the share panel.\n
+ The share panel shows icons of apps which can handle selected files.\n
+ User can select an app to share them.
+ * @ingroup CAPI_PANEL_MODULE
+ *
+ * @section CAPI_PANEL_SHARE_MODULE_HEADER Required Header
+ * \#include <share_panel.h>
+ * @section CAPI_PANEL_SHARE_MODULE_OVERVIEW Overview
+ * It provides functions for adding an share panel (share_panel_create()) and deleting it (share_panel_destroy()) in an app.\n
+ * It is shown with (share_panel_show()) and hiden with (share_panel_hide()).\n
+ */
+
+#endif
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_CONF_H__
+#define __TIZEN_SHARE_PANEL_CONF_H__
+
+#define BASE_HEIGHT 800
+
+/* ITEM_ICON is changed from 74 to 63 about 87% decrease because of resolution issues. */
+#define ITEM_ICON_WIDTH 63
+#define ITEM_ICON_HEIGHT 63
+
+/* ITEM_WIDTH is changed from 123 to 107 about 87% decrease because of resolution issues. */
+#define ITEM_WIDTH 107
+/* ITEM_HEIGHT is changed from 166 to 144 about 87% decrease because of resolution issues. */
+#define ITEM_HEIGHT 144
+
+#define INDEX_HEIGHT 50
+#define TITLE_HEIGHT 54
+
+/* PANEL_HEIGHT is changed from 368 to 320 about 87% decrease because of resolution issues. */
+#define PANEL_HEIGHT (320+INDEX_HEIGHT)
+
+
+
+#endif /* __TIZEN_SHARE_PANEL_CONF_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_INDEX_H__
+#define __TIZEN_SHARE_PANEL_INDEX_H__
+
+#include <Evas.h>
+
+extern Evas_Object *_index_create(Evas_Object *ui_manager, unsigned int count);
+extern void _index_update(Evas_Object *index, unsigned int count);
+extern void _index_destroy(Evas_Object *index);
+
+extern void _index_bring_in(Evas_Object *index, int idx);
+
+#endif //__TIZEN_SHARE_PANEL_INDEX_H__
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_ITEM_H__
+#define __TIZEN_SHARE_PANEL_ITEM_H__
+
+#include <Elementary.h>
+
+extern Evas_Object *_item_create(Evas_Object *page, item_s *item_info);
+extern void _item_destroy(Evas_Object *item);
+
+#endif /* __TIZEN_SHARE_PANEL_ITEM_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_LIST_H__
+#define __TIZEN_SHARE_PANEL_LIST_H__
+
+#include <Elementary.h>
+
+Eina_List *_list_create(app_control_h control, bundle *b);
+void _list_destroy(Eina_List *list);
+
+#endif /* __TIZEN_SHARE_PANEL_LIST_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_LOG_H__
+#define __TIZEN_SHARE_PANEL_LOG_H__
+
+#include <dlog.h>
+
+#undef LOG_TAG
+#define LOG_TAG "SHARE_PANEL"
+
+#if !defined(_D)
+#define _D(fmt, arg...) LOGD(fmt"\n", ##arg)
+#endif
+
+#if !defined(_W)
+#define _W(fmt, arg...) LOGW(fmt"\n", ##arg)
+#endif
+
+#if !defined(_E)
+#define _E(fmt, arg...) LOGE(fmt"\n", ##arg)
+#endif
+
+#if !defined(_SD)
+#define _SD(fmt, arg...) SECURE_LOGD(fmt"\n", ##arg)
+#endif
+
+#if !defined(_SW)
+#define _SW(fmt, arg...) SECURE_LOGW(fmt"\n", ##arg)
+#endif
+
+#if !defined(_SE)
+#define _SE(fmt, arg...) SECURE_LOGE(fmt"\n", ##arg)
+#endif
+
+#define retv_if(expr, val) do { \
+ if(expr) { \
+ _E("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return (val); \
+ } \
+} while (0)
+
+#define ret_if(expr) do { \
+ if(expr) { \
+ _E("(%s) -> %s() return", #expr, __FUNCTION__); \
+ return; \
+ } \
+} while (0)
+
+#define goto_if(expr, val) do { \
+ if(expr) { \
+ _E("(%s) -> goto", #expr); \
+ goto val; \
+ } \
+} while (0)
+
+#define break_if(expr) { \
+ if(expr) { \
+ _E("(%s) -> break", #expr); \
+ break; \
+ } \
+}
+
+#define continue_if(expr) { \
+ if(expr) { \
+ _E("(%s) -> continue", #expr); \
+ continue; \
+ } \
+}
+
+#endif /* __TIZEN_SHARE_PANEL_LOG_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_PAGE_H__
+#define __TIZEN_SHARE_PANEL_PAGE_H__
+
+#include <Elementary.h>
+
+extern Evas_Object *_page_create(Evas_Object *scroller, int page_width, int page_height);
+extern void _page_destroy(Evas_Object *page);
+
+extern void _page_resize(Evas_Object *page, int width, int height);
+
+#endif /* __TIZEN_SHARE_PANEL_PAGE_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_SCROLLER_H__
+#define __TIZEN_SHARE_PANEL_SCROLLER_H__
+
+#include <Elementary.h>
+
+typedef enum {
+ SCROLLER_EVENT_TYPE_INVALID = 0,
+ SCROLLER_EVENT_TYPE_SCROLL,
+ SCROLLER_EVENT_TYPE_APPEND_PAGE,
+ SCROLLER_EVENT_TYPE_REMOVE_PAGE,
+ SCROLLER_EVENT_TYPE_MAX,
+} scroller_event_type_e;
+
+extern Evas_Object *_scroller_create(Evas_Object *ui_manager, share_panel_s *share_panel);
+extern void _scroller_destroy(Evas_Object *scroller);
+
+extern void _scroller_append_page(Evas_Object *scroller, Evas_Object *page);
+extern void _scroller_remove_page(Evas_Object *scroller, Evas_Object *page);
+
+extern void _scroller_append_list(Evas_Object *scroller, Eina_List *list, int page_width, int page_height);
+extern void _scroller_remove_list(Evas_Object *scroller, Eina_List *list);
+
+extern void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page);
+extern int _scroller_get_region_index(Evas_Object *scroller);
+extern unsigned int _scroller_count(Evas_Object *scroller);
+
+extern int _scroller_is_scrolling(Evas_Object *scroller);
+extern void _scroller_resize(Evas_Object *scroller, int width, int height);
+
+extern int _scroller_register_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *data), void *data);
+extern int _scroller_unregister_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *data));
+
+#endif /* __TIZEN_SHARE_PANEL_SCROLLER_H__ */
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_H__
+#define __TIZEN_SHARE_PANEL_H__
+
+#include <Elementary.h>
+#include <tizen_error.h>
+#include <app_control.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/** This definition will be removed */
+#ifndef TIZEN_ERROR_PANEL
+#define TIZEN_ERROR_PANEL -0x02850000
+#endif
+
+/**
+ * @file share_panel.h
+ * @brief This file declares the API of the libshare-panel library.
+ */
+
+/**
+ * @addtogroup CAPI_PANEL_SHARE_MODULE
+ * @{
+ */
+
+/**
+ * @brief Share panel handle.
+ * @since_tizen 2.4
+ */
+typedef struct _share_panel *share_panel_h;
+
+/**
+ * @brief Enumeration for values of share-panel response types.
+ * @since_tizen 2.4
+ */
+typedef enum share_panel_error {
+ SHARE_PANEL_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successfully handled */
+ SHARE_PANEL_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Request is not valid, invalid parameter or invalid argument value */
+ SHARE_PANEL_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Memory is not enough to handle a new request */
+ SHARE_PANEL_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Has no permission to share with */
+ SHARE_PANEL_ERROR_ALREADY_EXISTS = TIZEN_ERROR_PANEL | 0x01, /**< There is already a panel in the conformant */
+ SHARE_PANEL_ERROR_NOT_INITIALIZED = TIZEN_ERROR_PANEL | 0x02, /**< The panel is not initialized yet */
+ SHARE_PANEL_ERROR_INVALID_OPERATION = TIZEN_ERROR_PANEL | 0x04, /**< Invalid operation */
+} share_panel_error_e;
+
+/**
+ * @brief Creates a share panel.
+ * @since_tizen 2.4
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/packagemanager.info
+ * @privilege %http://tizen.org/privilege/appmanager.launch
+ * @remarks The caller app has to check the return value of this function.\n
+ *
+ * @param[in] conformant The caller's conformant
+ * @param[in] control The app control handler.\n
+ * This control needs a share operation among below operations.\n
+ * http://tizen.org/appcontrol/operation/share\n
+ * http://tizen.org/appcontrol/operation/multi_share\n
+ * http://tizen.org/appcontrol/operation/share_text\n
+ * These operations are defined in @ref CAPI_APP_CONTROL_MODULE.
+ * @param[out] share_panel The share panel handler
+ * @return @c SHARE_PANEL_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #SHARE_PANEL_ERROR_NONE Successful
+ * @retval #SHARE_PANEL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SHARE_PANEL_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #SHARE_PANEL_ERROR_PERMISSION_DENIED permission denied
+ * @retval #SHARE_PANEL_ERROR_INVALID_OPERATION Invalid operation
+ *
+ * @see share_panel_destroy()
+ * @see share_panel_show()
+ * @see share_panel_hide()
+ *
+ * @par Example
+ * @code
+ * #include <share_panel.h>
+ *
+ * static int app_control(void *data)
+ * {
+ * struct appdata *ad = data;
+ * share_panel_h share_panel = NULL;
+ * app_control_h control = NULL;
+ * int ret = APP_CONTROL_ERROR_NONE;
+ *
+ * if (!ad) {
+ * // Error handling
+ * }
+ *
+ * if (!ad->conformant) {
+ * // Error handling
+ * }
+ *
+ * ret = app_control_create(&control);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ * app_control_set_operation(control, "http://tizen.org/appcontrol/operation/share");
+ *
+ * ret = share_panel_create(ad->conformant, control, &share_panel);
+ * if (SHARE_PANEL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * ret = share_panel_show(share_panel);
+ * if (SHARE_PANEL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * ret = app_control_destroy(control);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * return 0;
+ * }
+ *
+ * @endcode
+ */
+extern int share_panel_create(app_control_h control, share_panel_h *share_panel);
+
+/**
+ * @brief Destroys the share panel.
+ * @since_tizen 2.4
+ * @remarks The caller app has to check the return value of this function.\n
+ *
+ * @param[in] share_panel_h Share panel handler
+ * @return @c SHARE_PANEL_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #SHARE_PANEL_ERROR_NONE Successful
+ * @retval #SHARE_PANEL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SHARE_PANEL_ERROR_NOT_INITIALIZED The panel is not initialized yet
+ *
+ * @see share_panel_create()
+ * @see share_panel_show()
+ * @see share_panel_hide()
+ *
+ * @par Example
+ * @code
+ * #include <share_panel.h>
+ *
+ * static int app_terminate(void *data)
+ * {
+ * struct appdata *ad = data;
+ * int ret = APP_CONTROL_ERROR_NONE;
+ *
+ * if (!ad) {
+ * // Error handling
+ * }
+ *
+ * if (!ad->share_panel) {
+ * // Error handling
+ * }
+ *
+ * ret = share_panel_hide(ad->share_panel);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * ret = share_panel_destroy(ad->share_panel);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ * ad->share_panel = NULL;
+ *
+ * return 0;
+ * }
+ *
+ * @endcode
+ */
+extern int share_panel_destroy(share_panel_h share_panel);
+
+/**
+ * @brief Shows the share panel, asynchronously.
+ * @since_tizen 2.4
+ * @remarks The caller app has to check the return value of this function.\n
+ * share_panel_show will activate an animation to display the panel.
+ *
+ * @param[in] share_panel_h Share panel handler
+ * @return @c SHARE_PANEL_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #SHARE_PANEL_ERROR_NONE Successful
+ * @retval #SHARE_PANEL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SHARE_PANEL_ERROR_NOT_INITIALIZED The panel is not initialized yet
+ *
+ * @see share_panel_create()
+ * @see share_panel_destroy()
+ * @see share_panel_hide()
+ *
+ * @par Example
+ * @code
+ * #include <share_panel.h>
+ *
+ * static int app_control(void *data)
+ * {
+ * struct appdata *ad = data;
+ * share_panel_h share_panel = NULL;
+ * app_control_h control = NULL;
+ * int ret = APP_CONTROL_ERROR_NONE;
+ *
+ * if (!ad) {
+ * // Error handling
+ * }
+ *
+ * if (!ad->conformant) {
+ * // Error handling
+ * }
+ *
+ * ret = app_control_create(&control);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ * app_control_set_operation(control, "http://tizen.org/appcontrol/operation/share");
+ *
+ * ret = share_panel_create(ad->conformant, control, &share_panel);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ * ad->share_panel = share_panel;
+ *
+ * ret = share_panel_show(share_panel);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * ret = app_control_destroy(control);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * return 0;
+ * }
+ * @endcode
+ */
+extern int share_panel_show(share_panel_h share_panel);
+
+/**
+ * @brief Hides the share panel, asynchronously.
+ * @since_tizen 2.4
+ * @remarks The caller app has to check the return value of this function.\n
+ * share_panel_hide will activate an animation to disappear the panel.
+ *
+ * @param[in] share_panel_h Share panel handler
+ * @return @c SHARE_PANEL_ERROR_NONE on success,
+ * otherwise a negative error value
+ * @retval #SHARE_PANEL_ERROR_NONE Successful
+ * @retval #SHARE_PANEL_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #SHARE_PANEL_ERROR_NOT_INITIALIZED The panel is not initialized yet
+ *
+ * @see share_panel_create()
+ * @see share_panel_destroy()
+ * @see share_panel_show()
+ *
+ * @par Example
+ * @code
+ * #include <share_panel.h>
+ *
+ * static int app_terminate(void *data)
+ * {
+ * struct appdata *ad = data;
+ * int ret = APP_CONTROL_ERROR_NONE;
+ *
+ * if (!ad) {
+ * // Error handling
+ * }
+ *
+ * if (!ad->share_panel) {
+ * // Error handling
+ * }
+ *
+ * ret = share_panel_hide(ad->share_panel);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ *
+ * ret = share_panel_destroy(ad->share_panel);
+ * if (APP_CONTROL_ERROR_NONE != ret) {
+ * // Error handling
+ * }
+ * ad->share_panel = NULL;
+ *
+ * return 0;
+ * }
+ *
+ * @endcode
+ */
+extern int share_panel_hide(share_panel_h share_panel);
+
+extern void share_panel_resize(share_panel_h share_panel, int width, int height);
+/**
+ * @}
+ */
+
+#ifdef __cplusplus
+}
+#endif
+#endif // __TIZEN_SHARE_PANEL_H__
+
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_INTERNAL_H__
+#define __TIZEN_SHARE_PANEL_INTERNAL_H__
+
+#include <Elementary.h>
+#include <app_control.h>
+
+#define DATA_KEY_SHARE_PANEL "__dksp__"
+#define DATA_KEY_SHARE_PANEL_INFO "__dkspi__"
+#define TABBAR_NAME_MORE "More"
+#define BUF_SIZE 128
+#define TIZEN_DATA_PATH "http://tizen.org/appcontrol/data/path"
+#define TIZEN_SHARE "http://tizen.org/appcontrol/operation/share"
+#define TIZEN_MULTI_SHARE "http://tizen.org/appcontrol/operation/multi_share"
+#define TIZEN_SHARE_TEXT "http://tizen.org/appcontrol/operation/share_text"
+#define DEFAULT_ICON "/usr/share/icons/A01-1_icon_Menu.png"
+#define KEY_BACK "XF86Back"
+
+
+
+enum {
+ SHARE_PANEL_SHOW_STATE_HIDE,
+ SHARE_PANEL_SHOW_STATE_HALF,
+};
+
+
+
+struct _share_panel {
+ Evas_Object *win;
+ Evas_Object *ui_manager;
+ Evas_Object *scroller;
+ Evas_Object *index;
+
+ Eina_List *list;
+ Ecore_Idler *append_idler;
+ Elm_Transit *transit;
+ app_control_h control;
+ bundle *b;
+
+ int root_width;
+ int root_height;
+ int page_width;
+ int page_height;
+ int show_state;
+};
+typedef struct _share_panel share_panel_s;
+
+
+
+struct _item {
+ bundle *b;
+
+ char *appid;
+ char *name;
+ char *icon;
+};
+typedef struct _item item_s;
+
+
+
+#endif // __TIZEN_SHARE_PANEL_INTERNAL_H__
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef __TIZEN_SHARE_PANEL_UI_MANAGER_H__
+#define __TIZEN_SHARE_PANEL_UI_MANAGER_H__
+
+#include <Elementary.h>
+
+extern Evas_Object *_ui_manager_create(share_panel_s *share_panel);
+extern void _ui_manager_destroy(Evas_Object *ui_manager);
+
+extern void _ui_manager_resize(Evas_Object *ui_manager, int width, int height);
+extern int _ui_manager_show(share_panel_h share_panel);
+extern int _ui_manager_hide(share_panel_h share_panel);
+
+extern void _ui_manager_reply_to_cancellation(share_panel_h share_panel);
+
+#endif /* __TIZEN_SHARE_PANEL_UI_MANAGER_H__ */
--- /dev/null
+org.tizen.share-panel pulseaudio rwxat- ------
+org.tizen.share-panel aul::launch r-x--- ------
+org.tizen.share-panel syslogd rwxat- ------
+org.tizen.share-panel app-svc::db rw---- ------
+org.tizen.share-panel sdbd rw---- ------
+org.tizen.share-panel system::media rw---- ------
+org.tizen.share-panel system::share rwxat- -----
+org.tizen.share-panel system::homedir rwxat- -----
+org.tizen.share-panel system::ext_storage rwxat- -----
--- /dev/null
+<manifest>
+ <request>
+ <domain name="org.tizen.share-panel"/>
+ </request>
+ <assign>
+ <filesystem path="/usr/apps/org.tizen.share-panel/bin/share-panel" label="org.tizen.share-panel" exec_label="org.tizen.share-panel" />
+ </assign>
+</manifest>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.share-panel" version="0.1.0" install-location="internal-only" api-version="2.4">
+ <label>share-panel</label>
+ <author email="jinny.yoon@samsung.com" href="www.samsung.com">Jin Yoon</author>
+ <author email="moon87.park@samsung.com" href="www.samsung.com">Moonkyoung Park</author>
+ <description>SHARE PANEL APPLICATION</description>
+ <ui-application appid="org.tizen.share-panel" exec="/usr/apps/org.tizen.share-panel/bin/share-panel" nodisplay="true" multiple="false" type="capp" taskmanage="false">
+ <label>Share panel</label>
+ <label xml:lang="en-us">Share panel</label>
+ </ui-application>
+</manifest>
--- /dev/null
+%define Exec share-panel
+%define AppInstallPath /usr/apps/%{name}
+
+Name: org.tizen.share-panel
+Summary: Share Panel
+Version: 0.1.0
+Release: 0
+Group: Application
+License: Apache-2.0
+Source0: %{name}-%{version}.tar.gz
+
+%if "%{?tizen_profile_name}" == "wearable"
+ExcludeArch: %{arm} %ix86 x86_64
+%endif
+
+%if "%{?tizen_profile_name}" == "tv"
+ExcludeArch: %{arm} %ix86 x86_64
+%endif
+
+BuildRequires: cmake
+BuildRequires: edje-tools
+BuildRequires: gettext-tools
+
+BuildRequires: pkgconfig(appcore-efl)
+BuildRequires: pkgconfig(aul)
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-appfw-app-manager)
+BuildRequires: pkgconfig(capi-system-system-settings)
+BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(capi-content-mime-type)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(edje)
+BuildRequires: pkgconfig(efl-extension)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(feedback)
+BuildRequires: pkgconfig(isf)
+
+%description
+Description: Share Panel
+
+%prep
+%setup -q
+
+%package devel
+Summary: Share panel library (devel)
+Group: Application
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Development files needed to build software that needs Share panel.
+
+%build
+export CFLAGS="$CFLAGS -DTIZEN_DEBUG_ENABLE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_DEBUG_ENABLE"
+export FFLAGS="$FFLAGS -DTIZEN_DEBUG_ENABLE"
+
+%if 0%{?tizen_build_binary_release_type_eng}
+export CFLAGS="$CFLAGS -DTIZEN_ENGINEER_MODE"
+export CXXFLAGS="$CXXFLAGS -DTIZEN_ENGINEER_MODE"
+export FFLAGS="$FFLAGS -DTIZEN_ENGINEER_MODE"
+%endif
+
+%cmake . -DCMAKE_INSTALL_PREFIX="%{AppInstallPath}" -DCMAKE_TARGET="%{Exec}" -DCMAKE_PACKAGE="%{name}"
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+%post
+
+%files
+%manifest %{name}.manifest
+%defattr(-,root,root,-)
+%{AppInstallPath}/bin/share-panel
+%{AppInstallPath}/res/*
+%{_datarootdir}/packages/%{name}.xml
+/etc/smack/accesses.d/%{name}.efl
+%{AppInstallPath}/res/locale/*/LC_MESSAGES/*
+
+
--- /dev/null
+# for i18n
+
+SET(POFILES
+ ar.po
+ az.po
+ bg.po
+ ca.po
+ cs.po
+ da.po
+ de.po
+ de_DE.po
+ el_GR.po
+ en.po
+ en_PH.po
+ en_US.po
+ es_ES.po
+ es_MX.po
+ es_US.po
+ et.po
+ eu.po
+ fi.po
+ fr.po
+ fr_CA.po
+ fr_FR.po
+ ga.po
+ gl.po
+ hi.po
+ hr.po
+ hu.po
+ hy.po
+ is.po
+ it_IT.po
+ ja_JP.po
+ ka.po
+ kk.po
+ ko_KR.po
+ lt.po
+ lv.po
+ mk.po
+ mn_MN.po
+ nb.po
+ nl.po
+ nl_NL.po
+ pl.po
+ pt_BR.po
+ pt_PT.po
+ ro.po
+ ru_RU.po
+ sk.po
+ sl.po
+ sr.po
+ sv.po
+ tr_TR.po
+ uk.po
+ uz.po
+ zh_CN.po
+ zh_HK.po
+ zh_SG.po
+ zh_TW.po
+)
+
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE("PO: ${pofile}")
+ GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+ SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${moFile}
+ COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+ DEPENDS ${absPofile}
+ )
+
+ INSTALL(FILES ${moFile} DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "مشاركة"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Paylaş"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Споделяне"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Compartir"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Sdílet"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Del"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Senden"
+
--- /dev/null
+msgid "IDS_ST_MBODY_HOME_SCREEN_WALLPAPER"
+msgstr "Hintergrund (Startbildschirm)"
+
+msgid "IDS_ST_BODY_GALLERY"
+msgstr "Galerie"
+
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr "Benachrichtigung"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN_ABB"
+msgstr "Startbildschirm"
+
+msgid "IDS_ST_BODY_WALLPAPER"
+msgstr "Hintergrundbild"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_SETTINGS"
+msgstr "Startseiten-Einstellungen"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_TYPE"
+msgstr "Startanzeige-Typ"
+
+msgid "IDS_COM_BUTTON_CANCEL"
+msgstr "Abbruch"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN"
+msgstr "Startbildschirm"
+
+msgid "IDS_ST_BODY_DEFAULT_HOME_SCREEN"
+msgstr "Klassicher Modus"
+
+msgid "IDS_ST_BUTTON2_SET_AS_HOME"
+msgstr "Home-Taste"
+
+msgid "IDS_ST_BODY_SELECT_APPLICATION"
+msgstr "Anwendung auswählen"
+
+msgid "IDS_ST_BODY_EASY_MODE"
+msgstr "Einfacher Modus"
+
+msgid "IDS_ST_BODY_THE_OVERALL_LAYOUT_OF_THE_HOME_SCREEN_WILL_BE_SIMPLIFIED"
+msgstr "Das generelle Layout des Startbildschirms wird vereinfacht."
+
+msgid "IDS_ST_BODY_HOME_SCREEN_STYLE"
+msgstr "Stil des Startbildschirms"
+
+msgid "IDS_LCKSCN_BODY_WALLPAPERS"
+msgstr "Hintergrund"
+
+msgid "IDS_SCR_POP_SCREEN_READER_IS_NOT_SUPPORTED_BY_PS_PRESS_THE_BACK_KEY_TO_RETURN_TO_THE_PREVIOUS_SCREEN"
+msgstr "Das Bildschirmleseprogramm wird von %s nicht unterstützt. Drücken Sie die Zurück-Taste, um zum vorherigen Bildschirm zurückzukehren."
+
+msgid "IDS_HELP_BODY_SELECT_AN_OPTION"
+msgstr "Option auswählen."
+
+msgid "IDS_COM_BODY_MENU_ABB"
+msgstr "Menü"
+
+msgid "IDS_HS_OPT_SPIRAL"
+msgstr "Spirale"
+
+msgid "IDS_HS_OPT_INNER_CUBE"
+msgstr "Innerer Kubus"
+
+msgid "IDS_HS_OPT_OUTER_CUBE"
+msgstr "Äußerer Kubus"
+
+msgid "IDS_HS_OPT_CAROUSEL"
+msgstr "Karussell"
+
+msgid "IDS_HS_HEADER_PAGE_NAVIGATION_EFFECT"
+msgstr "Effekt für Seitennavigation"
+
+msgid "IDS_ST_HEADER_SELECT_WALLPAPER_FROM_ABB"
+msgstr "Hintergrund auswählen aus"
+
+msgid "IDS_HS_POP_EASY_MODE_CAN_BE_DISABLED_IN_SETTINGS"
+msgstr "Der einfache Modus kann in den Einstellungen deaktiviert werden."
+
+msgid "IDS_ST_BODY_3D_ROTATION_M_EFFECT"
+msgstr "3D-Drehung"
+
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Lädt..."
+
+msgid "IDS_ST_POP_THE_FONT_SIZE_CAN_BE_INCREASED_TO_MAKE_TEXT_EASIER_TO_READ_CHANGE_THE_FONT_SIZE_NOW_Q"
+msgstr "Die Schrift kann vergrößert werden, damit Text leichter lesbar ist. Schriftgröße jetzt ändern?"
+
+msgid "IDS_ST_SK_CHANGE"
+msgstr "Ändern"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Κοινή χρήση"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Share"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Share"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Share"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Compartir"
+
--- /dev/null
+msgid "IDS_ST_MBODY_HOME_SCREEN_WALLPAPER"
+msgstr "Fondo de pantalla de inicio"
+
+msgid "IDS_ST_BODY_GALLERY"
+msgstr "Galería"
+
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr "Notificación"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN_ABB"
+msgstr "Pantalla de inicio"
+
+msgid "IDS_ST_BODY_WALLPAPER"
+msgstr "Fondo de pantalla"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_SETTINGS"
+msgstr "Configuración de pantalla de inicio"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_TYPE"
+msgstr "Tipo de pantalla de inicio"
+
+msgid "IDS_COM_BUTTON_CANCEL"
+msgstr "Cancelar"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN"
+msgstr "Pantalla de inicio"
+
+msgid "IDS_ST_BODY_DEFAULT_HOME_SCREEN"
+msgstr "Pantalla de inicio predeterminada"
+
+msgid "IDS_ST_BUTTON2_SET_AS_HOME"
+msgstr "Def. inicio"
+
+msgid "IDS_ST_BODY_SELECT_APPLICATION"
+msgstr "Seleccionar aplicación"
+
+msgid "IDS_ST_BODY_EASY_MODE"
+msgstr "Modo fácil"
+
+msgid "IDS_ST_BODY_THE_OVERALL_LAYOUT_OF_THE_HOME_SCREEN_WILL_BE_SIMPLIFIED"
+msgstr "Se simplificará el diseño general de la pantalla de inicio."
+
+msgid "IDS_ST_BODY_HOME_SCREEN_STYLE"
+msgstr "Estilo de pantalla de inicio"
+
+msgid "IDS_LCKSCN_BODY_WALLPAPERS"
+msgstr "Fondos de pantalla"
+
+msgid "IDS_SCR_POP_SCREEN_READER_IS_NOT_SUPPORTED_BY_PS_PRESS_THE_BACK_KEY_TO_RETURN_TO_THE_PREVIOUS_SCREEN"
+msgstr "El Lector de pantalla no es compatible con %s. Presione la tecla Atrás para regresar a la pantalla anterior."
+
+msgid "IDS_HELP_BODY_SELECT_AN_OPTION"
+msgstr "Seleccione una opción"
+
+msgid "IDS_COM_BODY_MENU_ABB"
+msgstr "Menú"
+
+msgid "IDS_HS_OPT_SPIRAL"
+msgstr "Espiral"
+
+msgid "IDS_HS_OPT_INNER_CUBE"
+msgstr "Cubo interior"
+
+msgid "IDS_HS_OPT_OUTER_CUBE"
+msgstr "Cubo exterior"
+
+msgid "IDS_HS_OPT_CAROUSEL"
+msgstr "Carrusel"
+
+msgid "IDS_HS_HEADER_PAGE_NAVIGATION_EFFECT"
+msgstr "Efecto de navegación de página"
+
+msgid "IDS_ST_HEADER_SELECT_WALLPAPER_FROM_ABB"
+msgstr "Selec. fondo de pantalla de"
+
+msgid "IDS_HS_POP_EASY_MODE_CAN_BE_DISABLED_IN_SETTINGS"
+msgstr "El modo fácil se puede desactivar en Configuración"
+
+msgid "IDS_ST_BODY_3D_ROTATION_M_EFFECT"
+msgstr "Rotación 3D"
+
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Cargando..."
+
+msgid "IDS_ST_POP_THE_FONT_SIZE_CAN_BE_INCREASED_TO_MAKE_TEXT_EASIER_TO_READ_CHANGE_THE_FONT_SIZE_NOW_Q"
+msgstr "El tamaño de la fuente se puede aumentar para poder leer el texto con más facilidad. ¿Cambiar el tamaño de la fuente ahora?"
+
+msgid "IDS_ST_SK_CHANGE"
+msgstr "Cambiar"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Compartir"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Jaga"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Partekatu"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Jaa"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Partager"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Partager"
+
--- /dev/null
+msgid "IDS_ST_MBODY_HOME_SCREEN_WALLPAPER"
+msgstr "Fond d'écran d'accueil"
+
+msgid "IDS_ST_BODY_GALLERY"
+msgstr "Galerie"
+
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr "Notification"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN_ABB"
+msgstr "Écran d'accueil"
+
+msgid "IDS_ST_BODY_WALLPAPER"
+msgstr "Fond d'écran"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_SETTINGS"
+msgstr "Paramètres de l'écran d'accueil"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_TYPE"
+msgstr "Type d'écran d'accueil"
+
+msgid "IDS_COM_BUTTON_CANCEL"
+msgstr "Annuler"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN"
+msgstr "Écran d'accueil"
+
+msgid "IDS_ST_BODY_DEFAULT_HOME_SCREEN"
+msgstr "Écran d'accueil par déf."
+
+msgid "IDS_ST_BUTTON2_SET_AS_HOME"
+msgstr "Accueil"
+
+msgid "IDS_ST_BODY_SELECT_APPLICATION"
+msgstr "Sélectionnez une application"
+
+msgid "IDS_ST_BODY_EASY_MODE"
+msgstr "Mode simplifié"
+
+msgid "IDS_ST_BODY_THE_OVERALL_LAYOUT_OF_THE_HOME_SCREEN_WILL_BE_SIMPLIFIED"
+msgstr "La disposition générale de l'écran d'accueil sera simplifiée."
+
+msgid "IDS_ST_BODY_HOME_SCREEN_STYLE"
+msgstr "Style d'écran d'accueil"
+
+msgid "IDS_LCKSCN_BODY_WALLPAPERS"
+msgstr "Fonds d'écran"
+
+msgid "IDS_SCR_POP_SCREEN_READER_IS_NOT_SUPPORTED_BY_PS_PRESS_THE_BACK_KEY_TO_RETURN_TO_THE_PREVIOUS_SCREEN"
+msgstr "Le lecteur d'écran n'est pas pris en charge par %s. Appuyez sur la touche Retour pour revenir à l'écran d'accueil."
+
+msgid "IDS_HELP_BODY_SELECT_AN_OPTION"
+msgstr "Sélectionnez une option."
+
+msgid "IDS_COM_BODY_MENU_ABB"
+msgstr "Menu"
+
+msgid "IDS_HS_OPT_SPIRAL"
+msgstr "Spirale"
+
+msgid "IDS_HS_OPT_INNER_CUBE"
+msgstr "Cube intérieur"
+
+msgid "IDS_HS_OPT_OUTER_CUBE"
+msgstr "Cube extérieur"
+
+msgid "IDS_HS_OPT_CAROUSEL"
+msgstr "Manège"
+
+msgid "IDS_HS_HEADER_PAGE_NAVIGATION_EFFECT"
+msgstr "Effet de navigation sur la page"
+
+msgid "IDS_ST_HEADER_SELECT_WALLPAPER_FROM_ABB"
+msgstr "Sélec. fond écran depuis"
+
+msgid "IDS_HS_POP_EASY_MODE_CAN_BE_DISABLED_IN_SETTINGS"
+msgstr "Le mode facile peut être désactivé dans Paramètres"
+
+msgid "IDS_ST_BODY_3D_ROTATION_M_EFFECT"
+msgstr "Rotation 3D"
+
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Chargement en cours."
+
+msgid "IDS_ST_POP_THE_FONT_SIZE_CAN_BE_INCREASED_TO_MAKE_TEXT_EASIER_TO_READ_CHANGE_THE_FONT_SIZE_NOW_Q"
+msgstr "Vous pouvez augmenter la taille de la police pour faciliter la lecture du texte. Changer la taille de la police maintenant ?"
+
+msgid "IDS_ST_SK_CHANGE"
+msgstr "Modifier"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Comhroinn"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Compartir"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "साझा करें"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Dijeli"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Megosztás"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Համօգտագործել"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Deila"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Condividi"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "共有"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "გაზიარება"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Бөлісу"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "공유"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Dalytis"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Kopīgot"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Сподели"
+
--- /dev/null
+msgid "IDS_COM_SK_CANCEL"
+msgstr "Цуцлах"
+
+msgid "IDS_ST_MBODY_HOME_SCREEN_WALLPAPER"
+msgstr "Эхлэл дэлгэцийн зураг"
+
+msgid "IDS_ST_BODY_GALLERY"
+msgstr "Галерей"
+
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr "Мэдэгдэл"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN_ABB"
+msgstr "Эхлэл дэлгэц"
+
+msgid "IDS_ST_HEADER_LOCK_SCREEN"
+msgstr "Түгжих дэлгэц"
+
+msgid "IDS_ST_BODY_WALLPAPER"
+msgstr "Ханын цаас"
+
+msgid "IDS_ST_BODY_HOME_AND_LOCK_SCREEN"
+msgstr "Эхлэл ба түгжих дэлгэц"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_SETTINGS"
+msgstr "Эхлэл дэлгэцийн тохиргоо"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_TYPE"
+msgstr "Эхлэл дэлгэцийн төрөл"
+
+msgid "IDS_COM_BUTTON_CANCEL"
+msgstr "Цуцлах"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN"
+msgstr "Эх дэлгэц"
+
+msgid "IDS_ST_BODY_DEFAULT_HOME_SCREEN"
+msgstr "Өгөгдмөл эхлэл дэлгэц"
+
+msgid "IDS_ST_BUTTON2_SET_AS_HOME"
+msgstr "Үндсэн болгож тогтоох"
+
+msgid "IDS_ST_BODY_SELECT_APPLICATION"
+msgstr "Програм сонгох"
+
+msgid "IDS_ST_BODY_EASY_MODE"
+msgstr "Хялбар горим"
+
+msgid "IDS_ST_BODY_THE_OVERALL_LAYOUT_OF_THE_HOME_SCREEN_WILL_BE_SIMPLIFIED"
+msgstr "Эхлэл дэлгэцийн ерөнхий байрлалыг хялбаршуулна"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_STYLE"
+msgstr "Эхлэл дэлгэцийн хэв маяг"
+
+msgid "IDS_LCKSCN_BODY_WALLPAPERS"
+msgstr "Ханын цааснууд"
+
+msgid "IDS_SCR_POP_SCREEN_READER_IS_NOT_SUPPORTED_BY_PS_PRESS_THE_BACK_KEY_TO_RETURN_TO_THE_PREVIOUS_SCREEN"
+msgstr "Дэлгэц уншигчийг %s дэмждэггүй. Өмнөх дэлгэц рүү буцахын тулд буцах товчлуурыг дар"
+
+msgid "IDS_HELP_BODY_SELECT_AN_OPTION"
+msgstr "Аль нэг сонголтыг идэвхжүүлнэ."
+
+msgid "IDS_COM_BODY_MENU_ABB"
+msgstr "Цэс"
+
+msgid "IDS_HS_OPT_SPIRAL"
+msgstr "Эргүүлэг"
+
+msgid "IDS_HS_OPT_INNER_CUBE"
+msgstr "Дотоод шоо"
+
+msgid "IDS_HS_OPT_OUTER_CUBE"
+msgstr "Гадна шоо"
+
+msgid "IDS_HS_OPT_CAROUSEL"
+msgstr "Морин тойруулга"
+
+msgid "IDS_HS_HEADER_PAGE_NAVIGATION_EFFECT"
+msgstr "Хуудас удирдах эффект"
+
+msgid "IDS_ST_HEADER_SELECT_WALLPAPER_FROM_ABB"
+msgstr "Дэлгэцийн зураг сонгох"
+
+msgid "IDS_HS_POP_EASY_MODE_CAN_BE_DISABLED_IN_SETTINGS"
+msgstr "Хялбар горимыг Тохиргоонд идэвхгүй болгож болно"
+
+msgid "IDS_HS_OPT_DISABLE_EASY_MODE"
+msgstr "Хялбар горим идэвхгүй болгох"
+
+msgid "IDS_ST_BODY_3D_ROTATION_M_EFFECT"
+msgstr "3D эргэлт"
+
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Ачаалж байна..."
+
+msgid "IDS_ST_POP_THE_FONT_SIZE_CAN_BE_INCREASED_TO_MAKE_TEXT_EASIER_TO_READ_CHANGE_THE_FONT_SIZE_NOW_Q"
+msgstr "Бичвэрийг уншихад амар болгохын тулд үсгийн хэмжээг өсгөж болно. Үсгийн хэмжээг одоо өөрчлөх үү?"
+
+msgid "IDS_ST_SK_CHANGE"
+msgstr "Өөрчлөх"
+
+msgid "IDS_ST_ACHEADER2_HOME_SCREEN_STYLE"
+msgstr "ЭХЛЭЛ ДЭЛГЭЦИЙН ХЭВ МАЯГ"
+
+msgid "IDS_HS_ACHEADER2_HOME_SCREEN"
+msgstr "ЭХЛЭЛ ДЭЛГЭЦ"
+
+msgid "IDS_COM_HEADER_SELECT_WALLPAPER"
+msgstr "Select wallpaper"
+
+msgid "IDS_ST_BODY_SLIDE"
+msgstr "Слайд хийх"
+
+msgid "IDS_ST_BUTTON2_DEFAULT_WALLPAPERS_ABB"
+msgstr "Өгөгдмөл ханын цаас"
+
+msgid "IDS_HS_BUTTON_DISABLE_ABB"
+msgstr "Идэвхгүй болг"
+
+msgid "IDS_STRAVEL_OPT_TRAVEL_WALLPAPER_ABB"
+msgstr "Аяллын ханын цаас"
+
+msgid "IDS_HS_POP_DISABLE_EASY_MODE_Q"
+msgstr "Хялбар горим идэвхгүй болгох уу?"
+
+msgid "IDS_ST_HEADER_CHANGE_FONT_SIZE_ABB"
+msgstr "Үсгийн хэмжээг өөрчлөх"
+
+msgid "IDS_HELP_BODY_CUBE"
+msgstr "Шоо"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Del"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Delen"
+
--- /dev/null
+msgid "IDS_ST_MBODY_HOME_SCREEN_WALLPAPER"
+msgstr "Achtergrond startscherm"
+
+msgid "IDS_ST_BODY_GALLERY"
+msgstr "Galerij"
+
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr "Melding"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN_ABB"
+msgstr "Startscherm"
+
+msgid "IDS_ST_BODY_WALLPAPER"
+msgstr "Achtergrond"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_SETTINGS"
+msgstr "Instellingen startscherm"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_TYPE"
+msgstr "Type startscherm"
+
+msgid "IDS_COM_BUTTON_CANCEL"
+msgstr "Annuleer"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN"
+msgstr "Startscherm"
+
+msgid "IDS_ST_BODY_DEFAULT_HOME_SCREEN"
+msgstr "Standaard startscherm"
+
+msgid "IDS_ST_BUTTON2_SET_AS_HOME"
+msgstr "Startpagina"
+
+msgid "IDS_ST_BODY_SELECT_APPLICATION"
+msgstr "Applicatie selecteren"
+
+msgid "IDS_ST_BODY_EASY_MODE"
+msgstr "Eenvoudige stand"
+
+msgid "IDS_ST_BODY_THE_OVERALL_LAYOUT_OF_THE_HOME_SCREEN_WILL_BE_SIMPLIFIED"
+msgstr "De algemene indeling van het startscherm wordt vereenvoudigd."
+
+msgid "IDS_ST_BODY_HOME_SCREEN_STYLE"
+msgstr "Stijl startscherm"
+
+msgid "IDS_LCKSCN_BODY_WALLPAPERS"
+msgstr "Achtergronden"
+
+msgid "IDS_SCR_POP_SCREEN_READER_IS_NOT_SUPPORTED_BY_PS_PRESS_THE_BACK_KEY_TO_RETURN_TO_THE_PREVIOUS_SCREEN"
+msgstr "Schermlezer wordt niet ondersteund door %s. Druk op de toets Terug om terug te gaan naar het vorige scherm."
+
+msgid "IDS_HELP_BODY_SELECT_AN_OPTION"
+msgstr "Selecteer een optie."
+
+msgid "IDS_COM_BODY_MENU_ABB"
+msgstr "Menu"
+
+msgid "IDS_HS_OPT_SPIRAL"
+msgstr "Spiraal"
+
+msgid "IDS_HS_OPT_INNER_CUBE"
+msgstr "Binnenste kubus"
+
+msgid "IDS_HS_OPT_OUTER_CUBE"
+msgstr "Buitenste kubus"
+
+msgid "IDS_HS_OPT_CAROUSEL"
+msgstr "Carrousel"
+
+msgid "IDS_HS_HEADER_PAGE_NAVIGATION_EFFECT"
+msgstr "Effect paginanavigatie"
+
+msgid "IDS_ST_HEADER_SELECT_WALLPAPER_FROM_ABB"
+msgstr "Achtergrond selecteren uit"
+
+msgid "IDS_HS_POP_EASY_MODE_CAN_BE_DISABLED_IN_SETTINGS"
+msgstr "Eenvoudige stand kan worden uitgeschakeld in Instellingen"
+
+msgid "IDS_ST_BODY_3D_ROTATION_M_EFFECT"
+msgstr "3D rotatie"
+
+msgid "IDS_ST_BODY_LOADING_ING"
+msgstr "Laden..."
+
+msgid "IDS_ST_POP_THE_FONT_SIZE_CAN_BE_INCREASED_TO_MAKE_TEXT_EASIER_TO_READ_CHANGE_THE_FONT_SIZE_NOW_Q"
+msgstr "Het lettertype kan worden vergroot om de tekst leesbaarder te maken. Tekstgrootte nu wijzigen?"
+
+msgid "IDS_ST_SK_CHANGE"
+msgstr "Wijzigen"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Udostępniaj"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Compartilhar"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Enviar"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Partajare"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Доступ"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Zdieľať"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Skupna raba"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Podeli"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Dela"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Paylaş"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Поділитися"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "Ulashish"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "共享"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "共享"
+
--- /dev/null
+msgid "IDS_ST_MBODY_HOME_SCREEN_WALLPAPER"
+msgstr "主屏墙纸"
+
+msgid "IDS_ST_BODY_GALLERY"
+msgstr "画廊"
+
+msgid "IDS_COM_HEADER_NOTIFICATION"
+msgstr "通知"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN_ABB"
+msgstr "主屏"
+
+msgid "IDS_ST_BODY_WALLPAPER"
+msgstr "墙纸"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_SETTINGS"
+msgstr "主屏设置"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_TYPE"
+msgstr "主屏类型"
+
+msgid "IDS_COM_BUTTON_CANCEL"
+msgstr "取消"
+
+msgid "IDS_ST_HEADER_HOME_SCREEN"
+msgstr "主屏"
+
+msgid "IDS_ST_BODY_DEFAULT_HOME_SCREEN"
+msgstr "默认主屏"
+
+msgid "IDS_ST_BUTTON2_SET_AS_HOME"
+msgstr "设置为首页"
+
+msgid "IDS_ST_BODY_SELECT_APPLICATION"
+msgstr "选择应用程序"
+
+msgid "IDS_ST_BODY_EASY_MODE"
+msgstr "简易模式"
+
+msgid "IDS_ST_BODY_THE_OVERALL_LAYOUT_OF_THE_HOME_SCREEN_WILL_BE_SIMPLIFIED"
+msgstr "主屏的总布局将简化"
+
+msgid "IDS_ST_BODY_HOME_SCREEN_STYLE"
+msgstr "主屏风格"
+
+msgid "IDS_SCR_POP_SCREEN_READER_IS_NOT_SUPPORTED_BY_PS_PRESS_THE_BACK_KEY_TO_RETURN_TO_THE_PREVIOUS_SCREEN"
+msgstr "%s 不支援屏幕阅读器。请按下返回键以回到前一个屏幕"
+
+msgid "IDS_HELP_BODY_SELECT_AN_OPTION"
+msgstr "选择一个选项。"
+
+msgid "IDS_COM_BODY_MENU_ABB"
+msgstr "菜单"
+
+msgid "IDS_HS_OPT_SPIRAL"
+msgstr "螺旋"
+
+msgid "IDS_HS_OPT_INNER_CUBE"
+msgstr "内立方"
+
+msgid "IDS_HS_OPT_OUTER_CUBE"
+msgstr "外立方"
+
+msgid "IDS_HS_OPT_CAROUSEL"
+msgstr "旋转木马轮播"
+
+msgid "IDS_HS_HEADER_PAGE_NAVIGATION_EFFECT"
+msgstr "页面导航效果"
+
+msgid "IDS_ST_HEADER_SELECT_WALLPAPER_FROM_ABB"
+msgstr "选择墙纸来源"
+
--- /dev/null
+msgid "IDS_AM_HEADER_SHARE"
+msgstr "共享"
+
--- /dev/null
+ADD_SUBDIRECTORY(edje)
--- /dev/null
+FILE(GLOB edc_files ${CMAKE_CURRENT_SOURCE_DIR}/*.edc)
+FOREACH(edc_file ${edc_files})
+ GET_FILENAME_COMPONENT( FName ${edc_file} NAME_WE )
+ MESSAGE("${FName}")
+ ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/${FName}.edj
+ COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../images
+ ${CMAKE_CURRENT_SOURCE_DIR}/${FName}.edc ${FName}.edj ${EDJE_CFLAGS}
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FName}.edc
+ )
+ ADD_CUSTOM_TARGET(${FName}.edj DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${FName}.edj)
+ ADD_DEPENDENCIES(${PROJECT_NAME} ${FName}.edj)
+ENDFOREACH(edc_file)
+
+# install edc files
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${EDJEDIR} FILES_MATCHING PATTERN "*.edj")
--- /dev/null
+../../include/conf.h
\ No newline at end of file
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+styles {
+ style {
+ /* Font size is changed from 24 to 20 because of resolution issues. */
+ name: "text_style";
+ base: "font=Tizen:style=Regular font_size=20 color=#ffffff align=center style=shadow shadow_color=#000000bf wrap=mixed ellipsis=-1";
+ tag: "br" "\n";
+ tag: "hilight" "+ font_weight=Bold";
+ tag: "b" "+ font_weight=Bold";
+ tag: "tab" "\t";
+ }
+}
+
+collections {
+ base_scale: 1.7;
+ group {
+ name: "item";
+ parts {
+ part {
+ name: "bg";
+ type: SWALLOW;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ }
+ }
+ part {
+ name: "icon";
+ type: SWALLOW;
+ mouse_events: 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.1 0.1; to: "bg"; }
+ rel2 { relative: 0.9 0.66; to: "bg"; }
+ color: 255 255 255 255;
+ visible: 1;
+ }
+ description {
+ state: "pressed" 0.0;
+ inherit: "default" 0.0;
+ color: 100 100 100 255;
+ }
+ }
+ part {
+ name: "name";
+ type: TEXTBLOCK;
+ mouse_events: 1;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.7; to: "bg"; }
+ rel2 { relative: 1.0 1.0; to: "bg"; }
+ align: 0.5 0.0;
+ color: 0 0 0 100;
+ text {
+ style: "text_style";
+ align: 0.5 0.0;
+ }
+ visible: 1;
+ }
+ }
+ part {
+ name: "button";
+ type: SWALLOW;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 1.0; to: "bg"; }
+ visible: 1;
+ }
+ }
+ } //parts
+ }
+} //collections
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "conf.edc"
+
+styles {
+ style {
+ name: "text_style";
+ base: "font=Tizen:style=Regular font_size=38 color=#3DBACD align=center wrap=mixed ellipsis=-1";
+ tag: "br" "\n";
+ tag: "hilight" "+ font_weight=Bold";
+ tag: "b" "+ font_weight=Bold";
+ tag: "tab" "\t";
+ }
+}
+
+collections {
+ base_scale: 1.7;
+ group {
+ name: "layout";
+ parts {
+ part {
+ name: "bg";
+ type: RECT;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ visible: 1;
+ color: 8 8 8 80;
+ }
+ }
+ part {
+ name: "event";
+ type: SWALLOW;
+ mouse_events: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; to: "bg"; }
+ rel2 { relative: 1.0 1.0; to: "bg"; }
+ visible: 1;
+ }
+ }
+ part {
+ name: "title,bg";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 ((BASE_HEIGHT - (PANEL_HEIGHT + TITLE_HEIGHT)) / BASE_HEIGHT); to: "bg"; }
+ rel2 { relative: 1.0 0.0; to: "scroller,bg"; }
+ align: 0.5 1.0;
+ visible: 1;
+ color: 250 250 250 255;
+ }
+ }
+ part {
+ name: "title";
+ type: TEXTBLOCK;
+ scale: 1;
+ description {
+ rel1.to: "title,bg";
+ rel2.to: "title,bg";
+ visible: 1;
+ text {
+ style: "text_style";
+ text: "share panel";
+ align: 0.5 0.5;
+ }
+ }
+ }
+ part {
+ name: "scroller,bg";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 ((BASE_HEIGHT - PANEL_HEIGHT) / BASE_HEIGHT); to: "bg"; }
+ rel2 { relative: 1.0 ((BASE_HEIGHT - INDEX_HEIGHT) / BASE_HEIGHT); to: "bg"; }
+ visible: 1;
+ color: 250 250 250 255;
+ }
+ }
+ part {
+ name: "scroller";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ rel1.to: "scroller,bg";
+ rel2.to: "scroller,bg";
+ visible: 1;
+ }
+ }
+ part {
+ name: "index,bg";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 ((BASE_HEIGHT - INDEX_HEIGHT) / BASE_HEIGHT); to: "bg"; }
+ rel2 { relative: 1.0 1.0; to: "bg"; }
+ visible: 1;
+ color: 250 250 250 255;
+ }
+ }
+ part {
+ name: "index";
+ type: SWALLOW;
+ scale: 1;
+ description {
+ rel1.to: "index,bg";
+ rel2.to: "index,bg";
+ visible: 1;
+ }
+ }
+ }
+ } //group
+} //collections
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define ITEM(part_name, relx, rely) \
+ part { \
+ name: "item_swallow_"part_name; \
+ type: SWALLOW; \
+ scale: 1; \
+ mouse_events: 1; \
+ description { \
+ state: "default" 0.0; \
+ visible: 1; \
+ fixed: 1 1; \
+ rel1 { relative: (relx) (rely); to, "frame"; } \
+ rel2 { relative: (relx) (rely); to, "frame"; } \
+ } \
+ } \
+
+#define ITEM_00_X (1.0/8.0)
+#define ITEM_00_Y (1.0/4.0)
+#define ITEM_01_X (3.0/8.0)
+#define ITEM_01_Y ITEM_00_Y
+#define ITEM_02_X (5.0/8.0)
+#define ITEM_02_Y ITEM_00_Y
+#define ITEM_03_X (7.0/8.0)
+#define ITEM_03_Y ITEM_00_Y
+
+#define ITEM_04_X ITEM_00_X
+#define ITEM_04_Y (3.0/4.0)
+#define ITEM_05_X ITEM_01_X
+#define ITEM_05_Y ITEM_04_Y
+#define ITEM_06_X ITEM_02_X
+#define ITEM_06_Y ITEM_04_Y
+#define ITEM_07_X ITEM_03_X
+#define ITEM_07_Y ITEM_04_Y
+
+collections {
+ base_scale: 1.7;
+ group {
+ name: "page";
+ parts {
+ part {
+ name: "bg";
+ type: SWALLOW;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.0 0.0; }
+ rel2 { relative: 1.0 1.0; }
+ visible: 1;
+ }
+ }
+ part {
+ name: "frame";
+ type: SPACER;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 24/540 0.05; to: "bg"; }
+ rel2 { relative: (540-24)/540 0.95; to: "bg"; }
+ }
+ }
+ ITEM("0", ITEM_00_X, ITEM_00_Y)
+ ITEM("1", ITEM_01_X, ITEM_01_Y)
+ ITEM("2", ITEM_02_X, ITEM_02_Y)
+ ITEM("3", ITEM_03_X, ITEM_03_Y)
+ ITEM("4", ITEM_04_X, ITEM_04_Y)
+ ITEM("5", ITEM_05_X, ITEM_05_Y)
+ ITEM("6", ITEM_06_X, ITEM_06_Y)
+ ITEM("7", ITEM_07_X, ITEM_07_Y)
+ }
+ } // group
+} // collections
+
+
+
+// End of file
--- /dev/null
+libdir=@LIBDIR@
+includedir=@INCLUDEDIR@
+
+Name: share-panel
+Description: share-panel supporting library
+Version: @VERSION@
+Requires: capi-base-common
+Libs: -L${libdir} -lshare-panel
+Cflags: -I${includedir}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+
+#include "log.h"
+#include "index.h"
+
+#define PRIVATE_DATA_KEY_CUR "pdkc"
+
+
+
+void _index_destroy(Evas_Object *index)
+{
+ ret_if(NULL == index);
+
+ evas_object_data_del(index, PRIVATE_DATA_KEY_CUR);
+ elm_index_item_clear(index);
+ evas_object_del(index);
+}
+
+
+
+Evas_Object *_index_create(Evas_Object *ui_manager, unsigned int count)
+{
+ Evas_Object *index = NULL;
+ register int i = 0;
+
+ retv_if(NULL == ui_manager, NULL);
+
+ index = elm_index_add(ui_manager);
+ retv_if(NULL == index, NULL);
+ elm_object_style_set(index, "pagecontrol");
+
+ elm_index_horizontal_set(index, EINA_TRUE);
+ elm_index_autohide_disabled_set(index, EINA_TRUE);
+
+ for (; i < count; i++) {
+ elm_index_item_append(index, NULL, NULL, (void *) i);
+ }
+ elm_index_level_go(index, 0);
+ evas_object_data_set(index, PRIVATE_DATA_KEY_CUR, NULL);
+ evas_object_show(index);
+
+ return index;
+}
+
+
+
+void _index_update(Evas_Object *index, unsigned int count)
+{
+ register int i = 0;
+ int cur_index = 0;
+
+ elm_index_item_clear(index);
+
+ for (; i < count; i++) {
+ elm_index_item_append(index, NULL, NULL, (void *) i);
+ }
+ elm_index_level_go(index, 0);
+ evas_object_show(index);
+
+ cur_index = (int) evas_object_data_get(index, PRIVATE_DATA_KEY_CUR);
+ _index_bring_in(index, cur_index);
+}
+
+
+
+void _index_bring_in(Evas_Object *index, int idx)
+{
+ Elm_Object_Item *idx_it;
+
+ idx_it = elm_index_item_find(index, (void *) idx);
+ ret_if(NULL == idx_it);
+ elm_index_item_selected_set(idx_it, EINA_TRUE);
+
+ evas_object_data_set(index, PRIVATE_DATA_KEY_CUR, (void *) idx);
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+#include <app.h>
+#include <aul.h>
+
+#include "share_panel_internal.h"
+#include "conf.h"
+#include "log.h"
+#include "item.h"
+
+
+
+#define DEFAULT_ICON "/usr/share/icons/A01-1_icon_Menu.png"
+static Evas_Object *__add_icon(Evas_Object *parent, const char *file)
+{
+ const char *real_icon_file = NULL;
+ Evas_Object *icon = NULL;
+
+ real_icon_file = file;
+ if (access(real_icon_file, R_OK) != 0) {
+ _E("Failed to access an icon(%s)", real_icon_file);
+ real_icon_file = DEFAULT_ICON;
+ }
+
+ icon = elm_icon_add(parent);
+ retv_if(!icon, NULL);
+
+ if (elm_image_file_set(icon, real_icon_file, NULL) == EINA_FALSE) {
+ _E("Icon file is not accessible (%s)", real_icon_file);
+ evas_object_del(icon);
+ return NULL;
+ }
+
+ evas_object_size_hint_min_set(icon, ELM_SCALE_SIZE(ITEM_ICON_WIDTH), ELM_SCALE_SIZE(ITEM_ICON_HEIGHT));
+
+ elm_image_preload_disabled_set(icon, EINA_TRUE);
+ elm_image_smooth_set(icon, EINA_TRUE);
+ elm_image_no_scale_set(icon, EINA_FALSE);
+ evas_object_show(icon);
+
+ return icon;
+}
+
+
+
+static void __item_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ item_s *item_info = data;
+ int ret = 0;
+
+ ret_if(!item_info);
+ ret_if(!item_info->appid);
+ ret_if(!item_info->b);
+ _D("item clicked, launch app : %s", item_info->appid);
+
+ ret = aul_forward_app(item_info->appid, item_info->b);
+ if (ret < 0) {
+ _E("Fail to launch app(%d)", ret);
+ }
+
+ ui_app_exit();
+}
+
+
+
+#define ITEM_EDJE_FILE EDJEDIR"/item.edj"
+Evas_Object *_item_create(Evas_Object *page, item_s *item_info)
+{
+ Evas_Object *item = NULL;
+ Evas_Object *item_bg = NULL;
+ Evas_Object *icon = NULL;
+ Evas_Object *button = NULL;
+ Evas *e = NULL;
+
+ char *name = NULL;
+
+ retv_if(!item_info, NULL);
+
+ item = elm_layout_add(page);
+ retv_if(!item, NULL);
+ elm_layout_file_set(item, ITEM_EDJE_FILE, "item");
+
+ e = evas_object_evas_get(page);
+ goto_if(!e, ERROR);
+
+ item_bg = evas_object_rectangle_add(e);
+ goto_if(!item_bg, ERROR);
+ evas_object_size_hint_weight_set(item_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_min_set(item_bg, ELM_SCALE_SIZE(ITEM_WIDTH), ELM_SCALE_SIZE(ITEM_HEIGHT));
+ evas_object_color_set(item_bg, 0, 0, 0, 0);
+ evas_object_repeat_events_set(item_bg, EINA_TRUE);
+ evas_object_show(item_bg);
+ elm_object_part_content_set(item, "bg", item_bg);
+ evas_object_show(item);
+
+ icon = __add_icon(item, item_info->icon);
+ goto_if(!icon, ERROR);
+ elm_object_part_content_set(item, "icon", icon);
+
+ name = item_info->name;
+ goto_if(!name, ERROR);
+ elm_object_part_text_set(item, "name", name);
+
+ button = elm_button_add(item);
+ goto_if(!button, ERROR);
+
+ elm_object_style_set(button, "focus");
+ elm_object_part_content_set(item, "button", button);
+ evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(button);
+ evas_object_smart_callback_add(button, "clicked", __item_clicked_cb, item_info);
+
+ return item;
+
+ERROR:
+ _item_destroy(item);
+ return NULL;
+
+}
+
+
+
+void _item_destroy(Evas_Object *item)
+{
+ Evas_Object *bg = NULL;
+ Evas_Object *button = NULL;
+ Evas_Object *icon = NULL;
+
+ ret_if(!item);
+
+ button = elm_object_part_content_unset(item, "button");
+ if (button) {
+ evas_object_smart_callback_del(button, "clicked", __item_clicked_cb);
+ }
+
+ icon = elm_object_part_content_unset(item, "icon");
+ if (icon) {
+ evas_object_del(icon);
+ }
+ bg = elm_object_part_content_unset(item, "bg");
+ if (bg) {
+ evas_object_del(bg);
+ }
+ evas_object_del(item);
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+#include <app_control.h>
+#include <app_manager.h>
+#include <glib.h>
+#include <mime_type.h>
+
+#include "share_panel_internal.h"
+#include "log.h"
+
+
+
+static bool __app_control_matched_cb(app_control_h service, const char *appid, void *user_data)
+{
+ Eina_List **list = user_data;
+ char *caller = NULL;
+ char *tmp = NULL;
+
+ retv_if(!list, false);
+ retv_if(!appid, false);
+
+ app_control_get_caller(service, &caller);
+
+ _SD("matched app : [%s]", appid);
+ if (caller && !strcmp(appid, caller)) {
+ _D("caller and callee is same");
+ return true;
+ }
+
+ tmp = strdup(appid);
+ retv_if(!tmp, false);
+ *list = eina_list_append(*list, tmp);
+ return true;
+}
+
+
+
+static void __create_single_share_list(app_control_h control, Eina_List **list)
+{
+ app_control_foreach_app_matched(control, __app_control_matched_cb, list);
+}
+
+
+
+static int __get_file_ext(const char *filepath, char **file_ext)
+{
+ const char *filename = NULL;
+ char *pdot = NULL;
+
+ retv_if(!filepath, -1);
+ retv_if(!file_ext, -1);
+
+ filename = ecore_file_file_get(filepath);
+
+ retv_if(!filename, -1);
+
+ pdot = strrchr(filename, '.');
+
+ if (!pdot) {
+ return -1;
+ } else if (pdot != filepath) {
+ *file_ext = pdot + 1;
+ return 0;
+ } else {
+ return -1;
+ }
+}
+
+
+
+static inline void __get_mime(const char *file_path, char **mime)
+{
+ char *ext = NULL;
+ int res;
+
+ ret_if(!file_path);
+
+ if (strncmp(file_path, "/", 1) == 0) {
+ res = __get_file_ext(file_path, &ext);
+ if (0 != res) {
+ _D("__get_file_ext error..");
+ } else {
+ mime_type_get_mime_type(ext, mime);
+ _D("mime type: [%s]", *mime);
+ }
+ } else if (strncmp(file_path, "file:/", 6) == 0) {
+ res = __get_file_ext(&file_path[5], &ext);
+ if (0 != res) {
+ _D("__get_file_ext error..");
+ } else {
+ mime_type_get_mime_type(ext, mime);
+ _D("mime type: [%s]", *mime);
+ }
+ } else if (strncmp(file_path, "file:///", 8) == 0) {
+ res = __get_file_ext(&file_path[7], &ext);
+ if (0 != res) {
+ _D("__get_file_ext error..");
+ } else {
+ mime_type_get_mime_type(ext, mime);
+ _D("mime type: [%s]", *mime);
+ }
+ }
+}
+
+
+
+static bool __app_control_file_matched_cb(app_control_h service, const char *appid, void *user_data)
+{
+ Eina_List **sublist = user_data;
+
+ *sublist = eina_list_append(*sublist, strdup(appid));
+ return true;
+}
+
+
+
+static void __intersect_match_list_with_mime(Eina_List **matchlist, const char *mime)
+{
+ app_control_h control;
+ Eina_List *l = NULL;
+ Eina_List *ln = NULL;
+ Eina_List *sublist = NULL;
+ Eina_List *sub_ln = NULL;
+
+ void *m_list_data = NULL;
+ void *s_list_data = NULL;
+ bool exist;
+
+ app_control_create(&control);
+ app_control_set_operation(control, TIZEN_MULTI_SHARE);
+ app_control_set_mime(control, mime);
+ app_control_foreach_app_matched(control, __app_control_file_matched_cb, &sublist);
+ app_control_destroy(control);
+
+ if (!*matchlist) {
+ *matchlist = sublist;
+ return;
+ }
+
+ EINA_LIST_FOREACH_SAFE(*matchlist, l, ln, m_list_data) {
+ exist = false;
+ EINA_LIST_FOREACH(sublist, sub_ln, s_list_data) {
+ if (!strcmp(m_list_data, s_list_data)) {
+ _SD("[%s] is inlcude!", m_list_data);
+ exist = true;
+ break;
+ }
+ }
+ if (!exist) {
+ _SD("[%s] is not include!", m_list_data);
+ *matchlist = eina_list_remove(*matchlist, m_list_data);
+ }
+ }
+
+ if (sublist) {
+ EINA_LIST_FREE(sublist, m_list_data) {
+ free(m_list_data);
+ }
+ }
+}
+
+
+
+static void __trim_uri(app_control_h control)
+{
+ char *uri = NULL;
+ char *tmp = NULL;
+
+ app_control_get_uri(control, &uri);
+ _SD("uri : [[[%s]]]", uri);
+ if (!uri) {
+ return;
+ }
+
+ if (!strncmp(uri, "/", 1)) {
+ tmp = uri;
+ } else if (!strncmp(uri, "file:///", 8)) {
+ tmp = &uri[7];
+ } else {
+ _E("file uri scheme is wrong");
+ free(uri);
+ return;
+ }
+
+ app_control_set_uri(control, tmp);
+ free(uri);
+}
+
+
+
+static void __create_multi_share_list(app_control_h control, Eina_List **matchlist)
+{
+ char **data_array = NULL;
+ char *mime = NULL;
+ Eina_List *mime_list = NULL;
+
+ int i;
+ int length = 0;
+ int res;
+
+ res = app_control_get_extra_data_array(control, TIZEN_DATA_PATH, &data_array, &length);
+ if (res != APP_CONTROL_ERROR_NONE) {
+ _E("app_control_get_extra_data_array failed..[%d]", res);
+ }
+ for (i = 0; i < length; i++) {
+ Eina_List *l = NULL;
+ char *tmp = NULL;
+
+ _SD("data_array[%d]= %s", i, data_array[i]);
+
+ __get_mime(data_array[i], &mime);
+ if (!mime) {
+ _E("no mime");
+ goto out;
+ }
+
+ EINA_LIST_FOREACH(mime_list, l, tmp) {
+ if (!strcmp(tmp, mime)) {
+ free(mime);
+ goto out;
+ }
+ }
+
+ mime_list = eina_list_prepend(mime_list, mime);
+ _SD("data_array[%d]= %s", i, data_array[i]);
+
+out:
+ free(data_array[i]);
+ }
+
+ free(data_array);
+
+ EINA_LIST_FREE(mime_list, mime) {
+ __intersect_match_list_with_mime(matchlist, mime);
+ free(mime);
+ mime = NULL;
+ }
+}
+
+
+
+static int __applist_compare(const void *com1, const void *com2)
+{
+ item_s *c1 = (item_s *)com1, *c2 = (item_s *)com2;
+ int res = 0;
+
+ res = strcasecmp(c1->name, c2->name);
+
+ return res;
+}
+
+
+
+static void __make_applist(bundle *b, Eina_List *matchlist, Eina_List **applist)
+{
+ Eina_List *l;
+ char *data = NULL;
+
+ ret_if(!b);
+
+ EINA_LIST_FOREACH(matchlist, l, data) {
+ item_s *app_s = NULL;
+ app_info_h app_info = NULL;
+
+ app_s = (item_s *) malloc(sizeof(item_s));
+ break_if(!app_s);
+
+ app_s->appid = strdup(data);
+ if (!app_s->appid) {
+ _E("strdup error");
+ free(app_s);
+ break;
+ }
+ app_s->b = b;
+
+ app_info_create(data, &app_info);
+ if (!app_info) {
+ _E("fail to create the app_info");
+ free(app_s->appid);
+ free(app_s);
+ break;
+ }
+
+ app_info_get_label(app_info, &app_s->name);
+ if (!app_s->name) {
+ _E("fail to create the app_name from app_info");
+ free(app_s->appid);
+ free(app_s);
+ app_info_destroy(app_info);
+ break;
+ }
+ _SD("icon_name : [%s]", app_s->name);
+
+ app_info_get_icon(app_info, &app_s->icon);
+ _SD("icon_path : [%s]", app_s->icon);
+
+ app_info_destroy(app_info);
+
+ if (!app_s->icon) {
+ app_s->icon = strdup(DEFAULT_ICON);
+ }
+
+ *applist = eina_list_sorted_insert(*applist, __applist_compare, app_s);
+ }
+}
+
+
+
+Eina_List *_list_create(app_control_h control, bundle *b)
+{
+ Eina_List *matchlist = NULL;
+ Eina_List *applist = NULL;
+ char *operation_type = NULL;
+ char *data = NULL;
+
+ retv_if(!control, NULL);
+ retv_if(!b, NULL);
+
+ app_control_get_operation(control, &operation_type);
+ retv_if(!operation_type, NULL);
+
+ __trim_uri(control);
+
+ if (!strcmp(operation_type, TIZEN_SHARE)
+ || !strcmp(operation_type, TIZEN_SHARE_TEXT)) {
+ _D("single share operation");
+ __create_single_share_list(control, &matchlist);
+ } else if (!strcmp(operation_type, TIZEN_MULTI_SHARE)) {
+ _D("multi share operation");
+ __create_multi_share_list(control, &matchlist);
+ } else {
+ _D("Wrong operation");
+ return NULL;
+ }
+
+ __make_applist(b, matchlist, &applist);
+
+ EINA_LIST_FREE(matchlist, data) {
+ free(data);
+ }
+
+ return applist;
+}
+
+
+
+void _list_destroy(Eina_List *list)
+{
+ ret_if(!list);
+ eina_list_free(list);
+}
+
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+
+#include "share_panel_internal.h"
+#include "conf.h"
+#include "log.h"
+#include "page.h"
+
+
+
+#define PAGE_EDJE_FILE EDJEDIR"/page.edj"
+Evas_Object *_page_create(Evas_Object *scroller, int page_width, int page_height)
+{
+ Evas_Object *page = NULL;
+ Evas_Object *page_bg = NULL;
+ Evas *e = NULL;
+
+ page = elm_layout_add(scroller);
+ retv_if(!page, NULL);
+ elm_layout_file_set(page, PAGE_EDJE_FILE, "page");
+
+ e = evas_object_evas_get(scroller);
+ goto_if(!e, ERROR);
+
+ page_bg = evas_object_rectangle_add(e);
+ goto_if(!page_bg, ERROR);
+ evas_object_size_hint_weight_set(page_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_min_set(page_bg, page_width, page_height);
+ evas_object_size_hint_max_set(page_bg, page_width, page_height);
+ evas_object_color_set(page_bg, 0, 0, 0, 0);
+ evas_object_repeat_events_set(page_bg, EINA_TRUE);
+ evas_object_show(page_bg);
+ elm_object_part_content_set(page, "bg", page_bg);
+
+ evas_object_show(page);
+ return page;
+
+ERROR:
+ _page_destroy(page);
+ return NULL;
+}
+
+
+
+void _page_destroy(Evas_Object *page)
+{
+ Evas_Object *bg = NULL;
+
+ ret_if(!page);
+
+ bg = elm_object_part_content_unset(page, "bg");
+ if (bg) {
+ evas_object_del(bg);
+ }
+
+ evas_object_del(page);
+}
+
+
+
+void _page_resize(Evas_Object *page, int width, int height)
+{
+ Evas_Object *bg = NULL;
+
+ ret_if(!page);
+
+ bg = elm_object_part_content_get(page, "bg");
+ ret_if(!bg);
+
+ evas_object_size_hint_min_set(bg, width, height);
+ evas_object_size_hint_max_set(bg, width, height);
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <Elementary.h>
+
+#include "share_panel.h"
+#include "share_panel_internal.h"
+#include "conf.h"
+#include "item.h"
+#include "log.h"
+#include "page.h"
+#include "scroller.h"
+
+#define PRIVATE_SCROLLER_IS_SCROLLING "p_is_sc"
+#define PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST "pdkec"
+
+
+
+struct _event_cb {
+ int event_type;
+ void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *user_data);
+ void *user_data;
+};
+typedef struct _event_cb event_cb_s;
+
+
+
+int _scroller_is_scrolling(Evas_Object *scroller)
+{
+ retv_if(!scroller, 0);
+ return (int)evas_object_data_get(scroller, PRIVATE_SCROLLER_IS_SCROLLING);
+}
+
+
+
+static void __anim_start_cb(void *data, Evas_Object *scroller, void *event_info)
+{
+ _D("start the scroller(%p) animation", scroller);
+ evas_object_data_set(scroller, PRIVATE_SCROLLER_IS_SCROLLING, (void *)1);
+}
+
+
+
+static void __anim_stop_cb(void *data, Evas_Object *scroller, void *event_info)
+{
+ _D("stop the scroller(%p) animation", scroller);
+ evas_object_data_del(scroller, PRIVATE_SCROLLER_IS_SCROLLING);
+}
+
+
+
+static void __drag_start_cb(void *data, Evas_Object *scroller, void *event_info)
+{
+ _D("start to drag the scroller(%p)", scroller);
+}
+
+
+
+static void __drag_stop_cb(void *data, Evas_Object *scroller, void *event_info)
+{
+ _D("stop to drag the scroller(%p) animation", scroller);
+}
+
+
+
+static void __scroll_cb(void *data, Evas_Object *scroller, void *event_info)
+{
+ share_panel_h share_panel = data;
+ Eina_List *event_cb_list = NULL;
+ const Eina_List *l = NULL;
+ const Eina_List *ln = NULL;
+ event_cb_s *event_cb_info = NULL;
+
+ ret_if(!share_panel);
+ ret_if(!scroller);
+
+ event_cb_list = evas_object_data_get(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST);
+ ret_if(!event_cb_list);
+
+ EINA_LIST_FOREACH_SAFE(event_cb_list, l, ln, event_cb_info) {
+ if (SCROLLER_EVENT_TYPE_SCROLL == event_cb_info->event_type) {
+ if (event_cb_info->event_cb) {
+ event_cb_info->event_cb(scroller, SCROLLER_EVENT_TYPE_SCROLL, NULL, event_cb_info->user_data);
+ }
+ }
+ }
+}
+
+
+
+Evas_Object *_scroller_create(Evas_Object *ui_manager, share_panel_h share_panel)
+{
+ Evas_Object *box = NULL;
+ Evas_Object *scroller = NULL;
+
+ retv_if(!ui_manager, NULL);
+ retv_if(!share_panel, NULL);
+
+ scroller = elm_scroller_add(ui_manager);
+ retv_if(!scroller, NULL);
+
+ elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_FALSE);
+ elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_OFF);
+ elm_scroller_page_scroll_limit_set(scroller, 1, 1);
+ elm_scroller_content_min_limit(scroller, EINA_FALSE, EINA_TRUE);
+ elm_scroller_single_direction_set(scroller, ELM_SCROLLER_SINGLE_DIRECTION_HARD);
+
+ elm_scroller_page_size_set(scroller, share_panel->page_width, -1);
+
+ elm_object_style_set(scroller, "effect");
+ evas_object_show(scroller);
+ elm_object_scroll_lock_y_set(scroller, EINA_TRUE);
+
+ evas_object_smart_callback_add(scroller, "scroll,anim,start", __anim_start_cb, NULL);
+ evas_object_smart_callback_add(scroller, "scroll,anim,stop", __anim_stop_cb, NULL);
+ evas_object_smart_callback_add(scroller, "scroll,drag,start", __drag_start_cb, NULL);
+ evas_object_smart_callback_add(scroller, "scroll,drag,stop", __drag_stop_cb, share_panel);
+ evas_object_smart_callback_add(scroller, "scroll", __scroll_cb, share_panel);
+
+ box = elm_box_add(scroller);
+ goto_if(!box, ERROR);
+
+ elm_box_horizontal_set(box, EINA_TRUE);
+ elm_box_align_set(box, 0.5, 0.0);
+ evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(box);
+
+ elm_object_content_set(scroller, box);
+
+ return scroller;
+
+ERROR:
+ if (scroller) {
+ evas_object_del(scroller);
+ }
+ return NULL;
+}
+
+
+
+void _scroller_destroy(Evas_Object *scroller)
+{
+ Evas_Object *box = NULL;
+ ret_if(!scroller);
+
+ box = elm_object_content_unset(scroller);
+ if (box) {
+ evas_object_del(box);
+ }
+
+ evas_object_del(scroller);
+}
+
+
+
+void _scroller_append_page(Evas_Object *scroller, Evas_Object *page)
+{
+ Evas_Object *box = NULL;
+ Eina_List *event_cb_list = NULL;
+ const Eina_List *l = NULL;
+ const Eina_List *ln = NULL;
+ event_cb_s *event_cb_info = NULL;
+
+ box = elm_object_content_get(scroller);
+ ret_if(!box);
+
+ elm_box_pack_end(box, page);
+
+ event_cb_list = evas_object_data_get(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST);
+ ret_if(!event_cb_list);
+
+ EINA_LIST_FOREACH_SAFE(event_cb_list, l, ln, event_cb_info) {
+ if (SCROLLER_EVENT_TYPE_APPEND_PAGE == event_cb_info->event_type) {
+ if (event_cb_info->event_cb) {
+ event_cb_info->event_cb(scroller, SCROLLER_EVENT_TYPE_APPEND_PAGE, NULL, event_cb_info->user_data);
+ }
+ }
+ }
+}
+
+
+
+void _scroller_remove_page(Evas_Object *scroller, Evas_Object *page)
+{
+ Evas_Object *box = NULL;
+ Evas_Object *tmp = NULL;
+ Eina_List *list = NULL;
+ Eina_List *event_cb_list = NULL;
+ const Eina_List *l = NULL;
+ const Eina_List *ln = NULL;
+ event_cb_s *event_cb_info = NULL;
+
+ int is_page_exist = 0;
+
+ box = elm_object_content_get(scroller);
+ ret_if(!box);
+
+ list = elm_box_children_get(box);
+ EINA_LIST_FREE(list, tmp) {
+ continue_if(!tmp);
+ if (page == tmp) {
+ is_page_exist = 1;
+ }
+ }
+
+ if (!is_page_exist) {
+ _D("No page to remove");
+ return;
+ }
+
+ elm_box_unpack(box, page);
+
+ event_cb_list = evas_object_data_get(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST);
+ ret_if(!event_cb_list);
+
+ EINA_LIST_FOREACH_SAFE(event_cb_list, l, ln, event_cb_info) {
+ if (SCROLLER_EVENT_TYPE_REMOVE_PAGE == event_cb_info->event_type) {
+ if (event_cb_info->event_cb) {
+ event_cb_info->event_cb(scroller, SCROLLER_EVENT_TYPE_REMOVE_PAGE, NULL, event_cb_info->user_data);
+ }
+ }
+ }
+}
+
+
+
+void _scroller_append_list(Evas_Object *scroller, Eina_List *list, int page_width, int page_height)
+{
+ Evas_Object *page = NULL;
+ int count = 0;
+ int i;
+
+ ret_if(!scroller);
+ ret_if(!list);
+
+ /* We'll implement this part */
+ count = eina_list_count(list);
+ if (!count) {
+ _D("no apps");
+ return;
+ }
+
+ _D("list count is %d", count);
+
+ for (i = 0; i < count; i++) {
+ Evas_Object *item = NULL;
+ char tmp[256];
+ if (i % 8 == 0) {
+ page = _page_create(scroller, page_width, page_height);
+ ret_if(!page);
+ _scroller_append_page(scroller, page);
+ }
+ item = _item_create(page, eina_list_nth(list, i));
+ ret_if(!item);
+ snprintf(tmp, sizeof(tmp), "item_swallow_%d", (i%8));
+ _D("swallow : %s", tmp);
+ elm_object_part_content_set(page, tmp, item);
+ }
+}
+
+
+
+void _scroller_remove_list(Evas_Object *scroller, Eina_List *list)
+{
+ ret_if(!scroller);
+ ret_if(!list);
+
+ /* We'll implement this part */
+}
+
+
+
+int _scroller_get_region_index(Evas_Object *scroller)
+{
+ int index = 0;
+ int x = 0;
+ int page_w = 0;
+
+ retv_if(!scroller, 0);
+
+ elm_scroller_region_get(scroller, &x, NULL, NULL, NULL);
+ elm_scroller_page_size_get(scroller, &page_w, NULL);
+
+ index = x / page_w;
+ x = x % page_w;
+ if (x > (page_w / 2)) {
+ index++;
+ }
+
+ return index;
+}
+
+
+
+unsigned int _scroller_count(Evas_Object *scroller)
+{
+ Evas_Object *box = NULL;
+ Eina_List *list = NULL;
+ int count = 0;
+
+ retv_if(!scroller, 0);
+
+ box = elm_object_content_get(scroller);
+ retv_if(!box, 0);
+
+ list = elm_box_children_get(box);
+ retv_if(!list, 0);
+
+ count = eina_list_count(list);
+ eina_list_free(list);
+
+ return count;
+}
+
+
+
+void _scroller_bring_in_page(Evas_Object *scroller, Evas_Object *page)
+{
+ Evas_Object *box = NULL;
+ Evas_Object *tmp = NULL;
+ Eina_List *list = NULL;
+ int index = 0;
+ int exist = 1;
+
+ ret_if(!scroller);
+ ret_if(!page);
+
+ box = elm_object_content_get(scroller);
+ ret_if(!box);
+
+ list = elm_box_children_get(box);
+ ret_if(!list);
+
+ EINA_LIST_FREE(list, tmp) {
+ continue_if(!tmp);
+ if (page == tmp) {
+ exist = 0;
+ }
+ index += exist;
+ }
+
+ if (exist) {
+ index = 0;
+ }
+
+ elm_scroller_page_bring_in(scroller, index, 0);
+}
+
+
+
+void _scroller_resize(Evas_Object *scroller, int width, int height)
+{
+ Evas_Object *box = NULL;
+ Evas_Object *page = NULL;
+ Eina_List *list = NULL;
+
+ ret_if(!scroller);
+
+ elm_scroller_page_size_set(scroller, width, height);
+ evas_object_size_hint_min_set(scroller, width, height);
+ evas_object_size_hint_max_set(scroller, width, height);
+
+ box = elm_object_content_get(scroller);
+ ret_if(!box);
+
+ evas_object_size_hint_min_set(box, width, height);
+ evas_object_size_hint_max_set(box, width, height);
+
+ list = elm_box_children_get(box);
+ ret_if(!list);
+
+ EINA_LIST_FREE(list, page) {
+ _page_resize(page, width, height);
+ }
+}
+
+
+
+int _scroller_register_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *user_data), void *user_data)
+{
+ Eina_List *event_cb_list = NULL;
+ event_cb_s *event_cb_info = NULL;
+
+ retv_if(!scroller, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(event_type <= SCROLLER_EVENT_TYPE_INVALID, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(event_type >= SCROLLER_EVENT_TYPE_MAX, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(!event_cb, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+
+ event_cb_info = calloc(1, sizeof(event_cb_s));
+ retv_if(!event_cb_info, SHARE_PANEL_ERROR_OUT_OF_MEMORY);
+
+ event_cb_info->event_type = event_type;
+ event_cb_info->event_cb = event_cb;
+ event_cb_info->user_data = user_data;
+
+ event_cb_list = evas_object_data_get(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST);
+ event_cb_list = eina_list_append(event_cb_list, event_cb_info);
+ evas_object_data_set(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST, event_cb_list);
+
+ return SHARE_PANEL_ERROR_NONE;
+}
+
+
+
+int _scroller_unregister_event_cb(Evas_Object *scroller, int event_type, void (*event_cb)(Evas_Object *scroller, int event_type, void *event_info, void *user_data))
+{
+ Eina_List *event_cb_list = NULL;
+ const Eina_List *l = NULL;
+ const Eina_List *ln = NULL;
+ event_cb_s *event_cb_info = NULL;
+
+ retv_if(!scroller, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(event_type <= SCROLLER_EVENT_TYPE_INVALID, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(event_type >= SCROLLER_EVENT_TYPE_MAX, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(!event_cb, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+
+ event_cb_list = evas_object_data_get(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST);
+ retv_if(!event_cb_list, SHARE_PANEL_ERROR_NOT_INITIALIZED);
+
+ EINA_LIST_FOREACH_SAFE(event_cb_list, l, ln, event_cb_info) {
+ if (event_cb_info->event_type == event_type
+ && event_cb_info->event_cb == event_cb) {
+ event_cb_list = eina_list_remove(event_cb_list, event_cb_info);
+ break;
+ }
+ }
+
+ evas_object_data_set(scroller, PRIVATE_DATA_KEY_EVENT_CALLBACK_LIST, event_cb_list);
+
+ return SHARE_PANEL_ERROR_NONE;
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app.h>
+#include <app_control.h>
+#include <app_control_internal.h>
+#include <aul.h>
+#include <bundle.h>
+#include <bundle_internal.h>
+#include <Elementary.h>
+#include <isf_control.h>
+#include <system_settings.h>
+
+#include "share_panel.h"
+#include "share_panel_internal.h"
+#include "conf.h"
+#include "ui_manager.h"
+#include "log.h"
+#include "scroller.h"
+
+#ifdef EAPI
+#undef EAPI
+#define EAPI __attribute__ ((visibility("default")))
+#endif
+
+#define SHARE_PANEL_DOMAIN "share-panel"
+#define TRANSIT_DURATION 0.5f
+
+
+
+typedef struct custom_effect {
+ Evas_Coord from_h;
+ Evas_Coord to_h;
+} custom_effect_s;
+
+
+
+EAPI void share_panel_resize(share_panel_h share_panel, int width, int height)
+{
+ ret_if(!share_panel);
+
+ if (width > height) {
+ _D("resize the share-panel to land");
+ } else {
+ _D("resize the share-panel to port");
+ }
+
+ _ui_manager_resize(share_panel->ui_manager, width, height);
+}
+
+
+
+static Eina_Bool _back_key_pressed(void *data, Evas_Object *obj, Evas_Object *src, Evas_Callback_Type type, void *event_info)
+{
+ Evas_Event_Key_Down *ev = event_info;
+ share_panel_h share_panel = data;
+
+ retv_if(!share_panel, EINA_FALSE);
+
+ _D("KEY PRESSED: %s", ev->key);
+ if (type == EVAS_CALLBACK_KEY_DOWN && !strncmp(KEY_BACK, ev->key, strlen(KEY_BACK))) {
+ _D("KEY PRESSED: %s", ev->key);
+
+ _ui_manager_reply_to_cancellation(share_panel);
+ ui_app_exit();
+ return EINA_TRUE;
+ } else {
+ return EINA_FALSE;
+ }
+}
+
+
+
+static void _rotate_cb(void *data, Evas_Object *obj, void *event)
+{
+ int angle = 0;
+ share_panel_h share_panel = data;
+
+ ret_if(!obj);
+ ret_if(!share_panel);
+
+ angle = elm_win_rotation_get(obj);
+ _D("Angle is %d degree", angle);
+
+ switch (angle) {
+ case 0:
+ case 180:
+ share_panel_resize(share_panel, share_panel->root_width, share_panel->root_height);
+ break;
+ case 90:
+ case 270:
+ share_panel_resize(share_panel, share_panel->root_height, share_panel->root_width);
+ break;
+ default:
+ _E("cannot reach here");
+ }
+}
+
+
+
+static Evas_Object *__create_win(share_panel_h share_panel)
+{
+ share_panel->win = elm_win_add(NULL, "Share Panel", ELM_WIN_BASIC);
+ retv_if(!share_panel->win, NULL);
+
+ if (elm_win_wm_rotation_supported_get(share_panel->win)) {
+ int rots[4] = {0, 90, 180, 270};
+ elm_win_wm_rotation_available_rotations_set(share_panel->win, rots, 4);
+ }
+
+ elm_win_screen_size_get(share_panel->win, NULL, NULL, &share_panel->root_width, &share_panel->root_height);
+ _D("screen size is (%d, %d)", share_panel->root_width, share_panel->root_height);
+
+ elm_object_event_callback_add(share_panel->win, _back_key_pressed, share_panel);
+ evas_object_smart_callback_add(share_panel->win, "wm,rotation,changed", _rotate_cb, share_panel);
+
+ elm_win_indicator_mode_set(share_panel->win, ELM_WIN_INDICATOR_HIDE);
+ elm_win_borderless_set(share_panel->win, EINA_TRUE);
+ elm_win_alpha_set(share_panel->win, EINA_TRUE);
+ evas_object_show(share_panel->win);
+
+ return share_panel->win;
+
+}
+
+
+
+static void __destroy_win(Evas_Object *win)
+{
+ evas_object_del(win);
+}
+
+
+
+EAPI int share_panel_create(app_control_h control, share_panel_h *share_panel)
+{
+ share_panel_h panel = NULL;
+
+ retv_if(!share_panel, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(!control, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+
+ bindtextdomain(SHARE_PANEL_DOMAIN, LOCALEDIR);
+
+ panel = calloc(1, sizeof(share_panel_s));
+ retv_if(!panel, SHARE_PANEL_ERROR_NOT_INITIALIZED);
+
+ app_control_export_as_bundle(control, &(panel->b));
+
+ goto_if(!__create_win(panel), ERROR);
+
+ if (panel->root_width > panel->root_height) {
+ panel->page_width = panel->root_height;
+ } else {
+ panel->page_width = panel->root_width;
+ }
+ panel->page_height = PANEL_HEIGHT;
+
+ panel->control = control;
+
+ panel->ui_manager = _ui_manager_create(panel);
+ goto_if(!panel->ui_manager, ERROR);
+
+ elm_win_resize_object_add(panel->win, panel->ui_manager);
+ share_panel_hide(panel);
+
+ *share_panel = panel;
+
+ return SHARE_PANEL_ERROR_NONE;
+
+ERROR:
+ if (panel->ui_manager) {
+ _ui_manager_destroy(panel->ui_manager);
+ }
+ free(panel);
+
+ return SHARE_PANEL_ERROR_NOT_INITIALIZED;
+}
+
+
+
+EAPI int share_panel_destroy(share_panel_h share_panel)
+{
+ retv_if(!share_panel, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+
+ app_control_destroy(share_panel->control);
+ _ui_manager_destroy(share_panel->ui_manager);
+
+ if (share_panel->win) {
+ __destroy_win(share_panel->win);
+ }
+
+ free(share_panel);
+
+ return SHARE_PANEL_ERROR_NONE;
+}
+
+
+
+EAPI int share_panel_show(share_panel_h share_panel)
+{
+ retv_if(!share_panel, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+
+ return _ui_manager_show(share_panel);
+}
+
+
+
+EAPI int share_panel_hide(share_panel_h share_panel)
+{
+ retv_if(!share_panel, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+
+ return _ui_manager_hide(share_panel);
+}
+
+
+
+static bool _create_cb(void *data)
+{
+ elm_app_base_scale_set(1.7);
+
+ return true;
+}
+
+
+
+static void _terminate_cb(void *data)
+{
+ share_panel_h *share_panel = data;
+
+ ret_if(!share_panel);
+
+ share_panel_hide(*share_panel);
+ share_panel_destroy(*share_panel);
+}
+
+
+
+static void _app_control(app_control_h control, void *data)
+{
+ share_panel_h *share_panel = data;
+ int ret = SHARE_PANEL_ERROR_NONE;
+
+ ret_if(!share_panel);
+
+ ret_if(!control);
+
+ ret = share_panel_create(control, share_panel);
+ if (SHARE_PANEL_ERROR_NONE != ret) {
+ _E("Fail to create the share panel");
+ return;
+ }
+
+ share_panel_show(*share_panel);
+}
+
+
+
+static void _pause_cb(void *data)
+{
+ _D("");
+
+}
+
+
+
+static void _language_changed(app_event_info_h event_info, void *data)
+{
+ char *lang = NULL;
+ int ret = SYSTEM_SETTINGS_ERROR_NONE;
+
+ _D("language changed");
+
+ ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, &lang);
+ if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
+ _E("Fail to get string value (%d", ret);
+ return;
+ }
+ ret_if(!lang);
+ elm_language_set(lang);
+
+ free(lang);
+
+}
+
+
+
+int main(int argc, char **argv)
+{
+ int ret;
+ ui_app_lifecycle_callback_s lifecycle_callback = {0, };
+ app_event_handler_h event_handlers[5] = {NULL, };
+ share_panel_h share_panel = NULL;
+
+ lifecycle_callback.create = _create_cb;
+ lifecycle_callback.terminate = _terminate_cb;
+ lifecycle_callback.pause = _pause_cb;
+ lifecycle_callback.resume = NULL;
+ lifecycle_callback.app_control = _app_control;
+
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, NULL, NULL);
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, NULL, NULL);
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL);
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, _language_changed, NULL);
+ ui_app_add_event_handler(&event_handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, NULL, NULL);
+
+ ret = ui_app_main(argc, argv, &lifecycle_callback, &share_panel);
+
+ return ret;
+}
--- /dev/null
+/*
+ * Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <app.h>
+#include <app_control_internal.h>
+#include <aul.h>
+#include <bundle.h>
+#include <bundle_internal.h>
+#include <Elementary.h>
+#include <launch/app_sock.h>
+
+#include "share_panel_internal.h"
+#include "share_panel.h"
+#include "log.h"
+#include "list.h"
+#include "page.h"
+#include "index.h"
+#include "scroller.h"
+#include "conf.h"
+#include "ui_manager.h"
+
+#define FILE_LAYOUT_EDJ EDJEDIR"/layout.edj"
+#define GROUP_LAYOUT "layout"
+
+
+
+static void __resize_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ Evas_Object *ui_manager = obj;
+
+ int x, y, w, h;
+
+ ret_if(!ui_manager);
+
+ evas_object_geometry_get(ui_manager, &x, &y, &w, &h);
+ _D("%s resize(%d, %d, %d, %d)", data, x, y, w, h);
+}
+
+
+
+static void _scroll_cb(Evas_Object *scroller, int event_type, void *event_info, void *data)
+{
+ Evas_Object *index = data;
+ int region_index = 0;
+
+ ret_if(!index);
+
+ region_index = _scroller_get_region_index(scroller);
+ _index_bring_in(index, region_index);
+
+ _D("Scroller region index is %d", region_index);
+}
+
+
+
+static void _append_page_cb(Evas_Object *scroller, int event_type, void *event_info, void *data)
+{
+ Evas_Object *index = data;
+ unsigned int count = 0;
+
+ ret_if(!index);
+
+ count = _scroller_count(scroller);
+ _index_update(index, count);
+
+ _D("Index was updated as %d", count);
+}
+
+
+
+static void _remove_page_cb(Evas_Object *scroller, int event_type, void *event_info, void *data)
+{
+ Evas_Object *index = data;
+ unsigned int count = 0;
+
+ ret_if(!index);
+
+ count = _scroller_count(scroller);
+ _index_update(index, count);
+
+ _D("Index was updated as %d", count);
+}
+
+
+
+static void __click_back_btn_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ share_panel_s *share_panel = data;
+
+ ret_if(!share_panel);
+
+ _D("back button clicked, destroy the share-panel");
+ _ui_manager_reply_to_cancellation(share_panel);
+ share_panel_destroy(share_panel);
+}
+
+
+
+Evas_Object *__create_back_btn(Evas_Object *ui_manager, share_panel_s *share_panel)
+{
+ Evas_Object *button = NULL;
+
+ retv_if(!share_panel, NULL);
+ retv_if(!ui_manager, NULL);
+
+ button = elm_button_add(ui_manager);
+ retv_if(!button, NULL);
+
+ elm_object_style_set(button, "focus");
+ elm_object_part_content_set(ui_manager, "event", button);
+ evas_object_size_hint_weight_set(button, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_show(button);
+ evas_object_smart_callback_add(button, "clicked", __click_back_btn_cb, share_panel);
+
+ return button;
+}
+
+
+
+void __destroy_back_btn(Evas_Object *button)
+{
+ ret_if(!button);
+
+ evas_object_del(button);
+}
+
+
+
+Evas_Object *_ui_manager_create(share_panel_s *share_panel)
+{
+ Evas_Object *ui_manager = NULL;
+
+ retv_if(!share_panel, NULL);
+
+ ui_manager = elm_layout_add(share_panel->win);
+ retv_if(!ui_manager, NULL);
+
+ elm_layout_file_set(ui_manager, FILE_LAYOUT_EDJ, GROUP_LAYOUT);
+ evas_object_size_hint_weight_set(ui_manager, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(ui_manager, EVAS_HINT_FILL, EVAS_HINT_FILL);
+ evas_object_show(ui_manager);
+
+ evas_object_event_callback_add(ui_manager, EVAS_CALLBACK_RESIZE, __resize_cb, "ui_manager");
+
+ evas_object_data_set(ui_manager, DATA_KEY_SHARE_PANEL_INFO, share_panel);
+
+ goto_if(!__create_back_btn(ui_manager, share_panel), ERROR);
+
+ elm_object_part_text_set(ui_manager, "title", _("IDS_AM_HEADER_SHARE"));
+
+ share_panel->index = _index_create(ui_manager, 0);
+ goto_if(!share_panel->index, ERROR);
+ elm_object_part_content_set(ui_manager, "index", share_panel->index);
+
+ share_panel->scroller = _scroller_create(ui_manager, share_panel);
+ goto_if(!share_panel->scroller, ERROR);
+ elm_object_part_content_set(ui_manager, "scroller", share_panel->scroller);
+
+ if (SHARE_PANEL_ERROR_NONE != _scroller_register_event_cb(share_panel->scroller, SCROLLER_EVENT_TYPE_SCROLL, _scroll_cb, share_panel->index)) {
+ _E("cannot register the scroller event");
+ }
+ if (SHARE_PANEL_ERROR_NONE != _scroller_register_event_cb(share_panel->scroller, SCROLLER_EVENT_TYPE_APPEND_PAGE, _append_page_cb, share_panel->index)) {
+ _E("cannot register the scroller event");
+ }
+ if (SHARE_PANEL_ERROR_NONE != _scroller_register_event_cb(share_panel->scroller, SCROLLER_EVENT_TYPE_REMOVE_PAGE, _remove_page_cb, share_panel->index)) {
+ _E("cannot register the scroller event");
+ }
+
+ share_panel->list = _list_create(share_panel->control, share_panel->b);
+ goto_if(!share_panel->list, ERROR);
+
+ _scroller_append_list(share_panel->scroller
+ , share_panel->list
+ , share_panel->page_width
+ , share_panel->page_height - ELM_SCALE_SIZE(INDEX_HEIGHT));
+
+ return ui_manager;
+
+ERROR:
+ _ui_manager_destroy(ui_manager);
+ return NULL;
+}
+
+
+
+void _ui_manager_destroy(Evas_Object *ui_manager)
+{
+ Evas_Object *button = NULL;
+ share_panel_s *share_panel = NULL;
+ ret_if(!ui_manager);
+
+ share_panel = evas_object_data_del(ui_manager, DATA_KEY_SHARE_PANEL_INFO);
+ ret_if(!share_panel);
+
+ if (share_panel->list) {
+ _scroller_remove_list(share_panel->scroller, share_panel->list);
+ _list_destroy(share_panel->list);
+ }
+
+ if (share_panel->scroller) {
+ _scroller_unregister_event_cb(share_panel->scroller, SCROLLER_EVENT_TYPE_SCROLL, _scroll_cb);
+ _scroller_unregister_event_cb(share_panel->scroller, SCROLLER_EVENT_TYPE_APPEND_PAGE, _append_page_cb);
+ _scroller_unregister_event_cb(share_panel->scroller, SCROLLER_EVENT_TYPE_REMOVE_PAGE, _remove_page_cb);
+ _scroller_destroy(share_panel->scroller);
+ }
+
+ if (share_panel->index) {
+ _index_destroy(share_panel->index);
+ }
+
+ button = elm_object_part_content_unset(ui_manager, "effect");
+ if(button) {
+ __destroy_back_btn(button);
+ }
+ evas_object_del(ui_manager);
+}
+
+
+
+void _ui_manager_resize(Evas_Object *ui_manager, int width, int height)
+{
+ ret_if(!ui_manager);
+
+ evas_object_size_hint_min_set(ui_manager, width, height);
+ evas_object_size_hint_max_set(ui_manager, width, height);
+ evas_object_resize(ui_manager, width, height);
+ evas_object_move(ui_manager, 0, 0);
+}
+
+
+
+int _ui_manager_show(share_panel_h share_panel)
+{
+ retv_if(!share_panel, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(!share_panel->ui_manager, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+
+ evas_object_show(share_panel->ui_manager);
+
+ share_panel->show_state = SHARE_PANEL_SHOW_STATE_HALF;
+
+ return SHARE_PANEL_ERROR_NONE;
+}
+
+
+
+int _ui_manager_hide(share_panel_h share_panel)
+{
+ retv_if(!share_panel, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+ retv_if(!share_panel->ui_manager, SHARE_PANEL_ERROR_INVALID_PARAMETER);
+
+ share_panel->show_state = SHARE_PANEL_SHOW_STATE_HIDE;
+ evas_object_hide(share_panel->ui_manager);
+
+ return SHARE_PANEL_ERROR_NONE;
+}
+
+
+
+void _ui_manager_reply_to_cancellation(share_panel_h share_panel)
+{
+ bundle *kb = NULL;
+ const char *pid = NULL;
+ char callee_pid[20] = {0, };
+ int ret;
+
+ ret_if(!share_panel);
+ ret_if(!share_panel->b);
+ pid = bundle_get_val(share_panel->b, AUL_K_CALLER_PID);
+ ret_if(!pid);
+
+ kb = bundle_create();
+ ret_if(!kb);
+
+ ret = bundle_add(kb, AUL_K_SEND_RESULT, "1");
+ if (ret != BUNDLE_ERROR_NONE) {
+ _E("Fail to bundle add (%d)", ret);
+ goto OUT;
+ }
+
+ ret = bundle_add(kb, AUL_K_CALLER_PID, pid);
+ if (ret != BUNDLE_ERROR_NONE) {
+ _E("Fail to bundle add (%d)", ret);
+ goto OUT;
+ }
+
+ snprintf(callee_pid, sizeof(callee_pid), "%d", getpid());
+ ret = bundle_add(kb, AUL_K_CALLEE_PID, (const char *) callee_pid);
+ if (ret != BUNDLE_ERROR_NONE) {
+ _E("Fail to bundle add (%d)", ret);
+ goto OUT;
+ }
+
+ ret = app_send_cmd_with_noreply(-2, APP_CANCEL, kb);
+ if (ret != AUL_R_OK) {
+ _E("app_send_cmd error(%d)", ret);
+ }
+
+OUT:
+ bundle_free(kb);
+}