From: jk7744.park Date: Sat, 24 Oct 2015 06:44:10 +0000 (+0900) Subject: tizen 2.4 release X-Git-Tag: accepted/tizen/2.4/mobile/20151029.041237^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21b3ab3109724b38039720f6f442cc8f3fbe9321;p=apps%2Fhome%2Fshare-panel.git tizen 2.4 release --- diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..30aa7fe --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,66 @@ +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/grid.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 + capi-ui-efl-util + dlog + elementary + evas + feedback + isf + notification + 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("-DPROJECT=\"${PROJECT_NAME}\"") +ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"") +ADD_DEFINITIONS("-DEDJEDIR=\"${EDJEDIR}\"") +ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") +ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") + +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) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + 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. diff --git a/doc/share_panel_doc.h b/doc/share_panel_doc.h new file mode 100644 index 0000000..fd9dac6 --- /dev/null +++ b/doc/share_panel_doc.h @@ -0,0 +1,34 @@ +/* + * 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 + * @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 diff --git a/include/conf.h b/include/conf.h new file mode 100644 index 0000000..6ef3098 --- /dev/null +++ b/include/conf.h @@ -0,0 +1,43 @@ +/* + * 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_WIDTH 480 +#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 118 +/* 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 +#define SCROLLER_HEIGHT 300 + +#define SHARE_PANEL_LINE_MAX 4 + +/* PANEL_HEIGHT is changed from 368 to 320 about 87% decrease because of resolution issues. */ +#define PANEL_HEIGHT (SCROLLER_HEIGHT+INDEX_HEIGHT+TITLE_HEIGHT) + + + +#endif /* __TIZEN_SHARE_PANEL_CONF_H__ */ diff --git a/include/grid.h b/include/grid.h new file mode 100644 index 0000000..059e592 --- /dev/null +++ b/include/grid.h @@ -0,0 +1,30 @@ +/* + * 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_GRID_H__ +#define __TIZEN_SHARE_PANEL_GRID_H__ + +#include + +extern Evas_Object *_grid_create(Evas_Object *page); +extern void _grid_destroy(Evas_Object *grid); + +extern Elm_Object_Item *_grid_append_item(Evas_Object *grid, item_s *item_info); +extern void _grid_remove_item(Evas_Object *grid, item_s *item_info); + +extern int _grid_count_item(Evas_Object *grid); + +#endif /* __TIZEN_SHARE_PANEL_GRID_H__ */ diff --git a/include/index.h b/include/index.h new file mode 100644 index 0000000..3fca5cb --- /dev/null +++ b/include/index.h @@ -0,0 +1,28 @@ +/* + * 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 + +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__ diff --git a/include/list.h b/include/list.h new file mode 100644 index 0000000..be7b248 --- /dev/null +++ b/include/list.h @@ -0,0 +1,25 @@ +/* + * 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 + +Eina_List *_list_create(share_panel_h share_panel); +void _list_destroy(Eina_List *list); + +#endif /* __TIZEN_SHARE_PANEL_LIST_H__ */ diff --git a/include/log.h b/include/log.h new file mode 100644 index 0000000..7e5279e --- /dev/null +++ b/include/log.h @@ -0,0 +1,89 @@ +/* + * 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 + +#undef LOG_TAG +#define LOG_TAG "SHARE_PANEL" + +#if defined(D_) +#undef D_ +#endif +#define D_(str) dgettext(PACKAGE, str) + +#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__ */ diff --git a/include/page.h b/include/page.h new file mode 100644 index 0000000..560b74e --- /dev/null +++ b/include/page.h @@ -0,0 +1,27 @@ +/* + * 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 + +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__ */ diff --git a/include/scroller.h b/include/scroller.h new file mode 100644 index 0000000..78c0665 --- /dev/null +++ b/include/scroller.h @@ -0,0 +1,49 @@ +/* + * 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 + +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__ */ diff --git a/include/share_panel.h b/include/share_panel.h new file mode 100644 index 0000000..9c8b0d1 --- /dev/null +++ b/include/share_panel.h @@ -0,0 +1,313 @@ +/* + * 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 +#include +#include + +#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 + * + * 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 + * + * 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 + * + * 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 + * + * 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); + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif +#endif // __TIZEN_SHARE_PANEL_H__ + diff --git a/include/share_panel_internal.h b/include/share_panel_internal.h new file mode 100644 index 0000000..2cd4753 --- /dev/null +++ b/include/share_panel_internal.h @@ -0,0 +1,80 @@ +/* + * 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 +#include + +#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; + int list_count; + int after_launch; +}; +typedef struct _share_panel share_panel_s; + + + +struct _item { + bundle *b; + share_panel_s *share_panel; + + char *appid; + char *name; + char *icon; + Elm_Object_Item *grid_item; +}; +typedef struct _item item_s; + + + +#endif // __TIZEN_SHARE_PANEL_INTERNAL_H__ diff --git a/include/ui_manager.h b/include/ui_manager.h new file mode 100644 index 0000000..660f743 --- /dev/null +++ b/include/ui_manager.h @@ -0,0 +1,31 @@ +/* + * 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 + +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__ */ diff --git a/org.tizen.share-panel.efl b/org.tizen.share-panel.efl new file mode 100644 index 0000000..71af3a1 --- /dev/null +++ b/org.tizen.share-panel.efl @@ -0,0 +1,9 @@ +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 rwxat- ------ +org.tizen.share-panel system::share rwxat- ----- +org.tizen.share-panel system::homedir rwxat- ----- +org.tizen.share-panel system::ext_storage rwxat- ----- diff --git a/org.tizen.share-panel.manifest b/org.tizen.share-panel.manifest new file mode 100644 index 0000000..9a292b8 --- /dev/null +++ b/org.tizen.share-panel.manifest @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/org.tizen.share-panel.xml b/org.tizen.share-panel.xml new file mode 100644 index 0000000..560d8c0 --- /dev/null +++ b/org.tizen.share-panel.xml @@ -0,0 +1,11 @@ + + + + Jin Yoon + Moonkyoung Park + SHARE PANEL APPLICATION + + + + + diff --git a/packaging/share-panel.spec b/packaging/share-panel.spec new file mode 100755 index 0000000..2d8f8b1 --- /dev/null +++ b/packaging/share-panel.spec @@ -0,0 +1,85 @@ +%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(capi-ui-efl-util) +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) +BuildRequires: pkgconfig(notification) + +%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/* + + diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100755 index 0000000..8cee79b --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1,93 @@ +# for i18n + +SET(POFILES + ar.po + az.po + bg.po + bn.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 + fa.po + fi.po + fr.po + fr_CA.po + fr_FR.po + ga.po + gl.po + gu.po + he.po + hi.po + hr.po + hu.po + hy.po + is.po + it_IT.po + ja_JP.po + ka.po + kk.po + ko_KR.po + kn.po + lt.po + lv.po + mk.po + ml.po + mn_MN.po + nb.po + nl.po + nl_NL.po + pl.po + pt_BR.po + pt_PT.po + ro.po + ru_RU.po + si.po + sk.po + sl.po + sr.po + sv.po + ta.po + te.po + th.po + tr_TR.po + uk.po + ur.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}) diff --git a/po/ar.po b/po/ar.po new file mode 100755 index 0000000..a0a9cd7 --- /dev/null +++ b/po/ar.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "مشاركة" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "لا توجد تطبيقات متوفرة لفتح الملفات." + diff --git a/po/az.po b/po/az.po new file mode 100755 index 0000000..307245b --- /dev/null +++ b/po/az.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Paylaş" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Faylları açmaq üçün proqram yoxdur." + diff --git a/po/bg.po b/po/bg.po new file mode 100755 index 0000000..eb2f4f6 --- /dev/null +++ b/po/bg.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Споделяне" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Няма достъпни приложения за отваряне на файловете." + diff --git a/po/bn.po b/po/bn.po new file mode 100755 index 0000000..a4fc1ee --- /dev/null +++ b/po/bn.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "শেয়ার করুন" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ফাইলগুলি খোলার জন্য কোনও অ্যাপ্লিকেশন সুলভ নেই।" + diff --git a/po/ca.po b/po/ca.po new file mode 100755 index 0000000..dd41224 --- /dev/null +++ b/po/ca.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Compartir" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "No hi ha aplicacions disponibles per obrir fitxers" + diff --git a/po/cs.po b/po/cs.po new file mode 100755 index 0000000..c5cbdf7 --- /dev/null +++ b/po/cs.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Sdílet" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nejsou k dispozici žádné aplikace pro otevření souborů." + diff --git a/po/da.po b/po/da.po new file mode 100755 index 0000000..257ee55 --- /dev/null +++ b/po/da.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Del" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Der er ingen applikationer til åbning af filer." + diff --git a/po/de.po b/po/de.po new file mode 100755 index 0000000..0272dd9 --- /dev/null +++ b/po/de.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Senden" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Keine Anwendungen zum Öffnen der Datei verfügbar." + diff --git a/po/de_DE.po b/po/de_DE.po new file mode 100755 index 0000000..d403a4a --- /dev/null +++ b/po/de_DE.po @@ -0,0 +1,90 @@ +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" + diff --git a/po/el_GR.po b/po/el_GR.po new file mode 100755 index 0000000..deb4e14 --- /dev/null +++ b/po/el_GR.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Κοινή χρήση" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Δεν υπάρχουν διαθέσιμες εφαρμογές για το άνοιγμα των αρχείων." + diff --git a/po/en.po b/po/en.po new file mode 100755 index 0000000..63307ef --- /dev/null +++ b/po/en.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Share" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "No applications available to open files." + diff --git a/po/en_PH.po b/po/en_PH.po new file mode 100755 index 0000000..63307ef --- /dev/null +++ b/po/en_PH.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Share" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "No applications available to open files." + diff --git a/po/en_US.po b/po/en_US.po new file mode 100755 index 0000000..63307ef --- /dev/null +++ b/po/en_US.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Share" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "No applications available to open files." + diff --git a/po/es_ES.po b/po/es_ES.po new file mode 100755 index 0000000..a36c290 --- /dev/null +++ b/po/es_ES.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Compartir" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "No hay aplicaciones disponibles para abrir archivos" + diff --git a/po/es_MX.po b/po/es_MX.po new file mode 100755 index 0000000..d7c53be --- /dev/null +++ b/po/es_MX.po @@ -0,0 +1,90 @@ +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" + diff --git a/po/es_US.po b/po/es_US.po new file mode 100755 index 0000000..2dda1d8 --- /dev/null +++ b/po/es_US.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Compartir" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "No hay aplicaciones disponibles para abrir los archivos." + diff --git a/po/et.po b/po/et.po new file mode 100755 index 0000000..2706a15 --- /dev/null +++ b/po/et.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Jaga" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Failide avamiseks ei ole saadaval rakendusi." + diff --git a/po/eu.po b/po/eu.po new file mode 100755 index 0000000..829510f --- /dev/null +++ b/po/eu.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Partekatu" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Ez dago aplikaziorik erabilgarri fitxategiak irekitzeko" + diff --git a/po/fa.po b/po/fa.po new file mode 100755 index 0000000..96b0710 --- /dev/null +++ b/po/fa.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "اشتراک" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "برنامه‌ای برای باز کردن فایل‌ها وجود ندارد." + diff --git a/po/fi.po b/po/fi.po new file mode 100755 index 0000000..e682877 --- /dev/null +++ b/po/fi.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Jaa" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Tiedostojen avaamiseen soveltuvia sovelluksia ei ole." + diff --git a/po/fr.po b/po/fr.po new file mode 100755 index 0000000..991afc9 --- /dev/null +++ b/po/fr.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Partager" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Aucune application n'est disponible pour ouvrir des fichiers." + diff --git a/po/fr_CA.po b/po/fr_CA.po new file mode 100755 index 0000000..991afc9 --- /dev/null +++ b/po/fr_CA.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Partager" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Aucune application n'est disponible pour ouvrir des fichiers." + diff --git a/po/fr_FR.po b/po/fr_FR.po new file mode 100755 index 0000000..81d70be --- /dev/null +++ b/po/fr_FR.po @@ -0,0 +1,90 @@ +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" + diff --git a/po/ga.po b/po/ga.po new file mode 100755 index 0000000..bb53a8d --- /dev/null +++ b/po/ga.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Comhroinn" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Níl feidhmchláir ar fáil le comhaid a oscailt." + diff --git a/po/gl.po b/po/gl.po new file mode 100755 index 0000000..2496fff --- /dev/null +++ b/po/gl.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Compartir" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Non hai ningunha aplicación dispoñible para abrir arquivos" + diff --git a/po/gu.po b/po/gu.po new file mode 100755 index 0000000..a31477f --- /dev/null +++ b/po/gu.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "શેર કરો" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ફાઇલ્સ ખોલવા માટે કોઈ એપ્લિકેશન ઉપલબ્ધ નથી." + diff --git a/po/he.po b/po/he.po new file mode 100755 index 0000000..158473f --- /dev/null +++ b/po/he.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "שתף" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "אין יישומים זמינים לפתיחת קבצים." + diff --git a/po/hi.po b/po/hi.po new file mode 100755 index 0000000..5152703 --- /dev/null +++ b/po/hi.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "साझा करें" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "फाइलें खोलने के लिए एप्लीकेशंस उपलब्ध नहीं।" + diff --git a/po/hr.po b/po/hr.po new file mode 100755 index 0000000..a270efa --- /dev/null +++ b/po/hr.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Dijeli" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nema aplikacije za otvaranje datoteka." + diff --git a/po/hu.po b/po/hu.po new file mode 100755 index 0000000..29fcfc5 --- /dev/null +++ b/po/hu.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Megosztás" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nincs elérhető alkalmazás a fájlok megnyitásához." + diff --git a/po/hy.po b/po/hy.po new file mode 100755 index 0000000..a59dcab --- /dev/null +++ b/po/hy.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Համօգտագործել" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Ֆայլերը բացելու համար մատչելի ծրագրեր չկան:" + diff --git a/po/is.po b/po/is.po new file mode 100755 index 0000000..f393dec --- /dev/null +++ b/po/is.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Deila" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Engin forrit tiltæk til að opna skrár." + diff --git a/po/it_IT.po b/po/it_IT.po new file mode 100755 index 0000000..a716937 --- /dev/null +++ b/po/it_IT.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Condividi" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nessuna applicazione disponibile per aprire i file." + diff --git a/po/ja_JP.po b/po/ja_JP.po new file mode 100755 index 0000000..ed4b1d5 --- /dev/null +++ b/po/ja_JP.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "共有" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ファイルを開けるアプリケーションがありません。" + diff --git a/po/ka.po b/po/ka.po new file mode 100755 index 0000000..c38b013 --- /dev/null +++ b/po/ka.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "გაზიარება" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ამ ფაილების გასახსნელი პროგრამა არ არის." + diff --git a/po/kk.po b/po/kk.po new file mode 100755 index 0000000..16a0600 --- /dev/null +++ b/po/kk.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Бөлісу" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Файлдарды ашатын бағдарламалар жоқ." + diff --git a/po/kn.po b/po/kn.po new file mode 100755 index 0000000..e6e0ac8 --- /dev/null +++ b/po/kn.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "ಹಂಚಿಕೊಳ್ಳಿ" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ಫೈಲ್‌ಗಳನ್ನು ತೆರೆಯಲು ಅನ್ವಯಿಸುವಿಕೆಗಳು ಲಭ್ಯವಿಲ್ಲ." + diff --git a/po/ko_KR.po b/po/ko_KR.po new file mode 100755 index 0000000..c943547 --- /dev/null +++ b/po/ko_KR.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "공유" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "파일을 열 수 있는 앱이 없습니다." + diff --git a/po/lt.po b/po/lt.po new file mode 100755 index 0000000..83a4a95 --- /dev/null +++ b/po/lt.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Dalytis" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nėra programų, kuriomis būtų galima atidaryti failus." + diff --git a/po/lv.po b/po/lv.po new file mode 100755 index 0000000..1a4d8ca --- /dev/null +++ b/po/lv.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Kopīgot" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nav programmas, ar ko atvērt failus." + diff --git a/po/mk.po b/po/mk.po new file mode 100755 index 0000000..77058d3 --- /dev/null +++ b/po/mk.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Сподели" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Не се достапни апликации за отворање на фајловите." + diff --git a/po/ml.po b/po/ml.po new file mode 100755 index 0000000..bb15bb0 --- /dev/null +++ b/po/ml.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "പങ്കിടുക" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ഫയലുകള്‍ തുറക്കുന്നതിന് ആപ്ലിക്കേഷനുകള്‍ ഒന്നും ലഭ്യമല്ല." + diff --git a/po/mn_MN.po b/po/mn_MN.po new file mode 100755 index 0000000..78afc9b --- /dev/null +++ b/po/mn_MN.po @@ -0,0 +1,132 @@ +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 "Шоо" + diff --git a/po/nb.po b/po/nb.po new file mode 100755 index 0000000..f05e6ad --- /dev/null +++ b/po/nb.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Del" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Ingen tilgjengelige apper for å åpne filene." + diff --git a/po/nl.po b/po/nl.po new file mode 100755 index 0000000..0dc27c0 --- /dev/null +++ b/po/nl.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Delen" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Geen applicaties beschikbaar om bestanden te openen." + diff --git a/po/nl_NL.po b/po/nl_NL.po new file mode 100755 index 0000000..6139c46 --- /dev/null +++ b/po/nl_NL.po @@ -0,0 +1,90 @@ +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" + diff --git a/po/pl.po b/po/pl.po new file mode 100755 index 0000000..f45d2d0 --- /dev/null +++ b/po/pl.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Udostępniaj" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Brak dostępnych aplikacji do otwarcia plików." + diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100755 index 0000000..f8c6585 --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Compartilhar" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nenhum aplicativo disponível para abrir arquivos." + diff --git a/po/pt_PT.po b/po/pt_PT.po new file mode 100755 index 0000000..039d54f --- /dev/null +++ b/po/pt_PT.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Enviar" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Sem aplicações disponíveis para abrir ficheiros." + diff --git a/po/ro.po b/po/ro.po new file mode 100755 index 0000000..3948d65 --- /dev/null +++ b/po/ro.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Partajare" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nu există aplicaţii disponibile pentru a deschide fişiere." + diff --git a/po/ru_RU.po b/po/ru_RU.po new file mode 100755 index 0000000..71cb885 --- /dev/null +++ b/po/ru_RU.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Доступ" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Нет приложений, позволяющих открыть файлы." + diff --git a/po/si.po b/po/si.po new file mode 100755 index 0000000..3fde16e --- /dev/null +++ b/po/si.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "බෙදාගන්න" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ගොනු විවෘත කිරීමට යෙදුම් නොමැත." + diff --git a/po/sk.po b/po/sk.po new file mode 100755 index 0000000..e1ecd6c --- /dev/null +++ b/po/sk.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Zdieľať" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Žiadne dostupné aplikácie na otvorenie súborov." + diff --git a/po/sl.po b/po/sl.po new file mode 100755 index 0000000..b252a87 --- /dev/null +++ b/po/sl.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Skupna raba" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Noben program ni na voljo za odpiranje datotek." + diff --git a/po/sr.po b/po/sr.po new file mode 100755 index 0000000..ac3d980 --- /dev/null +++ b/po/sr.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Podeli" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Nijedna aplikacija ne može da otvori fajlove." + diff --git a/po/sv.po b/po/sv.po new file mode 100755 index 0000000..30f52ae --- /dev/null +++ b/po/sv.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Dela" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Inga program tillgängliga för att öppna filer." + diff --git a/po/ta.po b/po/ta.po new file mode 100755 index 0000000..6daf0ae --- /dev/null +++ b/po/ta.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "பகிர்க" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "கோப்புகளை திறக்க எந்த பயன்பாடுகளும் இல்லை." + diff --git a/po/te.po b/po/te.po new file mode 100755 index 0000000..5c0a55f --- /dev/null +++ b/po/te.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "భాగస్వామ్యం చేయి" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ఫైళ్లను తరవడానికి అప్లికేషన్లు లభ్యంలో లేవు." + diff --git a/po/th.po b/po/th.po new file mode 100755 index 0000000..737d5d4 --- /dev/null +++ b/po/th.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "แชร์" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "ไม่​มี​แอ​พพลิ​เค​ชั่น​ที่​ใช้​ได้​ใน​การ​เปิด​ไฟล์" + diff --git a/po/tr_TR.po b/po/tr_TR.po new file mode 100755 index 0000000..5d2e78a --- /dev/null +++ b/po/tr_TR.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Paylaş" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Dosyaları açacak uygulama bulunamadı." + diff --git a/po/uk.po b/po/uk.po new file mode 100755 index 0000000..0025396 --- /dev/null +++ b/po/uk.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Поділитися" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Немає доступних програм для відкриття файлів." + diff --git a/po/ur.po b/po/ur.po new file mode 100755 index 0000000..0991fbc --- /dev/null +++ b/po/ur.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "شراکت" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "فائلز اوپن کرنے کے لیے کوئی ایپلیکشن دستیاب نہیں۔" + diff --git a/po/uz.po b/po/uz.po new file mode 100755 index 0000000..c00a538 --- /dev/null +++ b/po/uz.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "Ulashish" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "Fayllarni ochish uchun ilovalar mavjud emas." + diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100755 index 0000000..be2728b --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "共享" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "无应用程序可用以打开文件。" + diff --git a/po/zh_HK.po b/po/zh_HK.po new file mode 100755 index 0000000..8c2fb1f --- /dev/null +++ b/po/zh_HK.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "共享" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "無應用程式可用以開啟檔案。" + diff --git a/po/zh_SG.po b/po/zh_SG.po new file mode 100755 index 0000000..e8e6b36 --- /dev/null +++ b/po/zh_SG.po @@ -0,0 +1,72 @@ +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 "选择墙纸来源" + diff --git a/po/zh_TW.po b/po/zh_TW.po new file mode 100755 index 0000000..0c3165f --- /dev/null +++ b/po/zh_TW.po @@ -0,0 +1,6 @@ +msgid "IDS_AM_HEADER_SHARE" +msgstr "共享" + +msgid "IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES" +msgstr "沒有可用以開啟檔案的應用程式。" + diff --git a/res/A01-1_icon_Menu.png b/res/A01-1_icon_Menu.png new file mode 100644 index 0000000..962f4cb Binary files /dev/null and b/res/A01-1_icon_Menu.png differ diff --git a/res/CMakeLists.txt b/res/CMakeLists.txt new file mode 100644 index 0000000..2ab7c7b --- /dev/null +++ b/res/CMakeLists.txt @@ -0,0 +1 @@ +ADD_SUBDIRECTORY(edje) diff --git a/res/edje/CMakeLists.txt b/res/edje/CMakeLists.txt new file mode 100755 index 0000000..692667f --- /dev/null +++ b/res/edje/CMakeLists.txt @@ -0,0 +1,15 @@ +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") diff --git a/res/edje/conf.edc b/res/edje/conf.edc new file mode 120000 index 0000000..de97229 --- /dev/null +++ b/res/edje/conf.edc @@ -0,0 +1 @@ +../../include/conf.h \ No newline at end of file diff --git a/res/edje/item.edc b/res/edje/item.edc new file mode 100644 index 0000000..91e316e --- /dev/null +++ b/res/edje/item.edc @@ -0,0 +1,51 @@ +/* + * 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. + */ + +collections { + base_scale: 1.7; + group { + name: "grid,icon"; + parts { + part { + name: "bg"; + type: RECT; + scale: 1; + mouse_events: 0; + description { + state: "default" 0.0; + rel1 { relative: 0.0 0.0; } + rel2 { relative: 1.0 1.0; } + color: 255 255 255 0; + visible: 1; + } + } + part { + name: "icon"; + type: SWALLOW; + scale: 1; + mouse_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.5 0.55; to: "bg"; } + rel2 { relative: 0.5 0.55; to: "bg"; } + fixed: 1 1; + align: 0.5 0.5; + visible: 1; + } + } + } + } +} //collections diff --git a/res/edje/layout.edc b/res/edje/layout.edc new file mode 100644 index 0000000..878a9a5 --- /dev/null +++ b/res/edje/layout.edc @@ -0,0 +1,201 @@ +/* + * 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=50 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: 2.6; + 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: "fixed_bg"; + type: SWALLOW; + repeat_events: 1; + description { + state: "default" 0.0; + rel1 { relative: 0.5 1.0; } + rel2 { relative: 0.5 1.0; } + align: 0.5 1.0; + fixed: 1 1; + visible: 1; + } + description { + state: "1line" 0.0; + inherit: "default" 0.0; + rel1 { relative: 0.5 1.15; } + rel2 { relative: 0.5 1.15; } + } + description { + state: "1line,land" 0.0; + inherit: "default" 0.0; + rel1 { relative: 0.5 1.25; } + rel2 { relative: 0.5 1.25; } + } + } + part { + name: "title,bg"; + type: RECT; + description { + state: "default" 0.0; + rel1 { relative: 0.0 (BASE_HEIGHT-PANEL_HEIGHT)/BASE_HEIGHT; to: "fixed_bg"; } + rel2 { relative: 1.0 (BASE_HEIGHT-(SCROLLER_HEIGHT+INDEX_HEIGHT))/BASE_HEIGHT; to: "fixed_bg"; } + 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-(SCROLLER_HEIGHT+INDEX_HEIGHT))/BASE_HEIGHT; to: "fixed_bg"; } + rel2 { relative: 1.0 (BASE_HEIGHT-INDEX_HEIGHT)/BASE_HEIGHT; to: "fixed_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; + fixed: 1 1; + } + } + part { + name: "index,bg"; + type: RECT; + description { + state: "default" 0.0; + rel1 { relative: 0.0 (BASE_HEIGHT-INDEX_HEIGHT)/BASE_HEIGHT; to: "fixed_bg"; } + rel2 { relative: 1.0 1.0; to: "fixed_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; + fixed: 1 1; + } + } + part { + name: "blocker"; + type: RECT; + description { + state: "default" 0.0; + rel1.to: "bg"; + rel2.to: "bg"; + visible: 0; + color: 255 255 255 0; + } + description { + state: "show" 0.0; + inherit: "default" 0.0; + visible: 1; + } + } + } + programs { + program { + name: "1line"; + signal: "1line"; + source: "fixed_bg"; + action: STATE_SET "1line" 0.0; + target: "fixed_bg"; + } + program { + name: "1line,land"; + signal: "1line,land"; + source: "fixed_bg"; + action: STATE_SET "1line,land" 0.0; + target: "fixed_bg"; + } + program { + name: "block,hide"; + signal: "hide"; + source: "blocker"; + action: STATE_SET "default" 0.0; + target: "blocker"; + } + program { + name: "block,show"; + signal: "show"; + source: "blocker"; + action: STATE_SET "show" 0.0; + target: "blocker"; + } + } + } //group +} //collections diff --git a/res/edje/page.edc b/res/edje/page.edc new file mode 100644 index 0000000..d5264dc --- /dev/null +++ b/res/edje/page.edc @@ -0,0 +1,52 @@ +/* + * 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. + */ + +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: "grid"; + type: SWALLOW; + scale: 1; + description { + state: "default" 0.0; + rel1.to: "bg"; + rel2.to: "bg"; + visible: 1; + fixed: 1 1; + } + } + } + } // group +} // collections + + + +// End of file diff --git a/share-panel.pc.in b/share-panel.pc.in new file mode 100644 index 0000000..f2de3d6 --- /dev/null +++ b/share-panel.pc.in @@ -0,0 +1,9 @@ +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} diff --git a/src/grid.c b/src/grid.c new file mode 100644 index 0000000..5c8c80e --- /dev/null +++ b/src/grid.c @@ -0,0 +1,302 @@ +/* + * 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 +#include +#include +#include + +#include "share_panel_internal.h" +#include "conf.h" +#include "grid.h" +#include "log.h" + +#define PRIVATE_DATA_KEY_ITEM_INFO "pdkii" + + + +static const char *const FILE_LAYOUT_EDJ = EDJEDIR"/layout.edj"; +static struct { + Elm_Gengrid_Item_Class *gic; + char *default_icon; + + int index; +} grid_info = { + .gic = NULL, + .default_icon = "/usr/share/icons/A01-1_icon_Menu.png", + + .index = 0, +}; + + + +static char *__text_get(void *data, Evas_Object *obj, const char *part) +{ + item_s *info = data; + retv_if(!info, NULL); + + retv_if(!info->name, NULL); + if (!strcmp(part, "elm.text")) { + return strdup(D_(info->name)); + } + + return NULL; +} + + + +#define FILE_ITEM_EDJ EDJEDIR"/item.edj" +static Evas_Object *__add_icon(Evas_Object *parent, const char *file) +{ + const char *real_icon_file = NULL; + Evas_Object *icon = NULL; + Evas_Object *icon_layout = 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); + + icon_layout = elm_layout_add(parent); + retv_if(!icon_layout, NULL); + + elm_layout_file_set(icon_layout, FILE_ITEM_EDJ, "grid,icon"); + evas_object_size_hint_weight_set(icon_layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(icon_layout, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_show(icon_layout); + + elm_object_part_content_set(icon_layout, "icon", icon); + + return icon_layout; +} + + + +static Evas_Object *__content_get(void *data, Evas_Object *obj, const char *part) +{ + item_s *info = data; + + retv_if(!info, NULL); + + if (!strcmp(part, "elm.swallow.end")) { + Evas_Object *bg = evas_object_rectangle_add(evas_object_evas_get(obj)); + retv_if(!bg, NULL); + + evas_object_size_hint_min_set(bg, ELM_SCALE_SIZE(ITEM_WIDTH), ELM_SCALE_SIZE(ITEM_HEIGHT)); + evas_object_color_set(bg, 0, 0, 0, 0); + evas_object_show(bg); + return bg; + } else if (!strcmp(part, "elm.swallow.icon")) { + retv_if(!info->icon, NULL); + return __add_icon(obj, info->icon); + } else if (!strcmp(part, "selected")) { + + } + return NULL; +} + + + +static void __del(void *data, Evas_Object *obj) +{ + ret_if(NULL == data); + evas_object_data_del(obj, PRIVATE_DATA_KEY_ITEM_INFO); +} + + + +static void __item_selected(void *data, Evas_Object *obj, void *event_info) +{ + item_s *item_info = data; + Elm_Object_Item *selected_item = NULL; + + int ret = 0; + + ret_if(!item_info); + ret_if(!item_info->appid); + ret_if(!item_info->b); + ret_if(!item_info->share_panel); + _D("item clicked, launch app : %s", item_info->appid); + + selected_item = elm_gengrid_selected_item_get(obj); + ret_if(!selected_item); + elm_gengrid_item_selected_set(selected_item, EINA_FALSE); + + + ret = aul_forward_app(item_info->appid, item_info->b); + if (ret < 0) { + _E("Fail to launch app(%d)", ret); + } + + item_info->share_panel->after_launch = 1; + elm_object_signal_emit(item_info->share_panel->ui_manager, "show", "blocker"); +} + + + +static void __lang_changed_cb(void *data, Evas_Object *grid, void *event_info) +{ + Elm_Object_Item *it = NULL; + int ret = 0; + ret_if(!grid); + + it = elm_gengrid_first_item_get(grid); + while (it) { + app_info_h app_info = NULL; + item_s *item_info = NULL; + char *name = NULL; + + item_info = evas_object_data_get(it, PRIVATE_DATA_KEY_ITEM_INFO); + goto_if(!item_info, next); + + ret = app_info_create(item_info->appid, &app_info); + goto_if(ret != APP_MANAGER_ERROR_NONE && !app_info, next); + + ret = app_info_get_label(app_info, &name); + if (ret == APP_MANAGER_ERROR_NONE && name) { + free(item_info->name); + item_info->name = name; + elm_object_item_part_text_set(it, "elm.text", item_info->name); + elm_gengrid_item_update(it); + } else { + _E("fail to create the app_name from app_info"); + } + + app_info_destroy(app_info); + +next: + it = elm_gengrid_item_next_get(it); + } +} + + + +Evas_Object *_grid_create(Evas_Object *page) +{ + Evas_Object *grid = NULL; + + retv_if(!page, NULL); + + grid = elm_gengrid_add(page); + goto_if(!grid, ERROR); + + evas_object_size_hint_weight_set(grid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(grid, EVAS_HINT_FILL, EVAS_HINT_FILL); + + elm_gengrid_item_size_set(grid, ELM_SCALE_SIZE(ITEM_WIDTH), ELM_SCALE_SIZE(ITEM_HEIGHT)); + elm_gengrid_align_set(grid, 0.0, 0.0); + elm_gengrid_horizontal_set(grid, EINA_FALSE); + elm_gengrid_multi_select_set(grid, EINA_FALSE); + + grid_info.gic = elm_gengrid_item_class_new(); + goto_if(!grid_info.gic, ERROR); + grid_info.gic->func.text_get = __text_get; + grid_info.gic->func.content_get = __content_get; + grid_info.gic->func.state_get = NULL; + grid_info.gic->func.del = __del; + grid_info.gic->item_style = "type2"; + + evas_object_smart_callback_add(grid, "language,changed", __lang_changed_cb, NULL); + + elm_scroller_movement_block_set(grid, ELM_SCROLLER_MOVEMENT_BLOCK_VERTICAL); + evas_object_show(grid); + + return grid; + +ERROR: + _grid_destroy(grid); + return NULL; +} + + + +void _grid_destroy(Evas_Object *grid) +{ + ret_if(!grid); + + evas_object_del(grid); +} + + + +Elm_Object_Item *_grid_append_item(Evas_Object *grid, item_s *item_info) +{ + Elm_Object_Item *item = NULL; + + retv_if(!grid, NULL); + retv_if(!item_info, NULL); + + retv_if(!grid_info.gic, NULL); + + item = elm_gengrid_item_append(grid, grid_info.gic, item_info, __item_selected, item_info); + retv_if(!item, NULL); + evas_object_data_set(item, PRIVATE_DATA_KEY_ITEM_INFO, item_info); + if (item_info->name) { + _D("grid append item : %s", item_info->name); + } + item_info->grid_item = item; + elm_gengrid_item_show(item, ELM_GENGRID_ITEM_SCROLLTO_NONE); + elm_gengrid_item_update(item); + + return item; +} + + + +void _grid_remove_item(Evas_Object *grid, item_s *item_info) +{ + Elm_Object_Item *item = NULL; + + ret_if(!grid); + ret_if(!item_info); + + item = item_info->grid_item; + + ret_if(!item); + evas_object_data_del(item, PRIVATE_DATA_KEY_ITEM_INFO); + elm_object_item_del(item); + item_info->grid_item = NULL; +} + + + +int _grid_count_item(Evas_Object *grid) +{ + int count = 0; + + retv_if(!grid, 0); + + count = elm_gengrid_items_count(grid); + + return count; +} diff --git a/src/index.c b/src/index.c new file mode 100644 index 0000000..a731e6f --- /dev/null +++ b/src/index.c @@ -0,0 +1,91 @@ +/* + * 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 + +#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); +} diff --git a/src/list.c b/src/list.c new file mode 100644 index 0000000..4378ee6 --- /dev/null +++ b/src/list.c @@ -0,0 +1,395 @@ +/* + * 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 +#include +#include +#include +#include + +#include "share_panel.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, const char *uri) +{ + 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_set_uri(control, uri); + 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; + } + + _D("set uri is [[[%s]]]", tmp); + + app_control_set_uri(control, tmp); + free(uri); +} + + + +#define CONTACT_MIME "application/vnd.tizen.contact" +static void __create_multi_share_list(app_control_h control, Eina_List **matchlist) +{ + char **data_array = NULL; + char *mime = NULL; + char *contact_mime = NULL; + char *uri = NULL; + Eina_List *mime_list = NULL; + + int i; + int length = 0; + int res; + + app_control_get_mime(control, &contact_mime); + + if (contact_mime && !strcmp(contact_mime, CONTACT_MIME)) { + _D("caller is contact"); + __intersect_match_list_with_mime(matchlist, contact_mime, uri); + return; + } else { + 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); + + app_control_get_uri(control, &uri); + + EINA_LIST_FREE(mime_list, mime) { + __intersect_match_list_with_mime(matchlist, mime, uri); + 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(share_panel_h share_panel, Eina_List *matchlist, Eina_List **applist) +{ + Eina_List *l; + char *data = NULL; + int ret = 0; + + ret_if(!share_panel); + ret_if(!share_panel->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)); + continue_if(!app_s); + + app_s->appid = strdup(data); + if (!app_s->appid) { + _E("strdup error"); + free(app_s); + continue; + } + app_s->b = share_panel->b; + app_s->share_panel = share_panel; + + ret = app_info_create(data, &app_info); + if (ret != APP_MANAGER_ERROR_NONE || !app_info) { + _E("fail to create the app_info"); + free(app_s->appid); + free(app_s); + continue; + } + + ret = app_info_get_label(app_info, &app_s->name); + if (ret != APP_MANAGER_ERROR_NONE || !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); + continue; + } + _SD("icon_name : [%s]", app_s->name); + + ret = app_info_get_icon(app_info, &app_s->icon); + if (ret != APP_MANAGER_ERROR_NONE) { + free(app_s->appid); + free(app_s->name); + free(app_s); + app_info_destroy(app_info); + continue; + } + + app_info_destroy(app_info); + + if (!app_s->icon) { + app_s->icon = strdup(DEFAULT_ICON); + } + _SD("icon_path : [%s]", app_s->icon); + + *applist = eina_list_sorted_insert(*applist, __applist_compare, app_s); + } +} + + + +Eina_List *_list_create(share_panel_h share_panel) +{ + Eina_List *matchlist = NULL; + Eina_List *applist = NULL; + char *operation_type = NULL; + char *data = NULL; + + retv_if(!share_panel, NULL); + retv_if(!share_panel->control, NULL); + retv_if(!share_panel->b, NULL); + + app_control_get_operation(share_panel->control, &operation_type); + retv_if(!operation_type, NULL); + + __trim_uri(share_panel->control); + + if (!strcmp(operation_type, TIZEN_SHARE) + || !strcmp(operation_type, TIZEN_SHARE_TEXT)) { + _D("single share operation"); + __create_single_share_list(share_panel->control, &matchlist); + } else if (!strcmp(operation_type, TIZEN_MULTI_SHARE)) { + _D("multi share operation"); + __create_multi_share_list(share_panel->control, &matchlist); + } else { + _D("Wrong operation"); + return NULL; + } + + __make_applist(share_panel, matchlist, &applist); + + EINA_LIST_FREE(matchlist, data) { + free(data); + } + + return applist; +} + + + +void _list_destroy(Eina_List *list) +{ + ret_if(!list); + eina_list_free(list); +} + diff --git a/src/page.c b/src/page.c new file mode 100644 index 0000000..029b58c --- /dev/null +++ b/src/page.c @@ -0,0 +1,87 @@ +/* + * 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 + +#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); +} diff --git a/src/scroller.c b/src/scroller.c new file mode 100644 index 0000000..4e7a28f --- /dev/null +++ b/src/scroller.c @@ -0,0 +1,459 @@ +/* + * 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 + +#include "share_panel.h" +#include "share_panel_internal.h" +#include "conf.h" +#include "grid.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.5); + 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; + Eina_List *list = NULL; + ret_if(!scroller); + + box = elm_object_content_unset(scroller); + if (box) { + list = elm_box_children_get(box); + if (list) { + _scroller_remove_list(scroller, list); + eina_list_free(list); + } + 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; + Evas_Object *grid = 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; + if (i % 8 == 0) { + page = _page_create(scroller, page_width, page_height); + ret_if(!page); + _scroller_append_page(scroller, page); + grid = _grid_create(page); + ret_if(!grid); + elm_object_part_content_set(page, "grid", grid); + } + item = _grid_append_item(grid, eina_list_nth(list, i)); + ret_if(!item); + } +} + + + +void _scroller_remove_list(Evas_Object *scroller, Eina_List *list) +{ + Evas_Object *page = NULL; + Evas_Object *grid = NULL; + const Eina_List *l, *ln; + + ret_if(!scroller); + ret_if(!list); + + EINA_LIST_FOREACH_SAFE(list, l, ln, page) { + grid = elm_object_part_content_unset(page, "grid"); + continue_if(!grid); + _grid_destroy(grid); + _page_destroy(page); + } +} + + + +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; +} diff --git a/src/share_panel.c b/src/share_panel.c new file mode 100644 index 0000000..5007744 --- /dev/null +++ b/src/share_panel.c @@ -0,0 +1,340 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#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; + + + +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); + ret_if(!share_panel->list_count); + ret_if(!share_panel->ui_manager); + + angle = elm_win_rotation_get(obj); + _D("Angle is %d degree", angle); + + if (share_panel->list_count > SHARE_PANEL_LINE_MAX) { + return; + } + + switch(angle) { + case 0: + case 180: + elm_object_signal_emit(share_panel->ui_manager, "1line", "fixed_bg"); + break; + case 90: + case 270: + elm_object_signal_emit(share_panel->ui_manager, "1line,land", "fixed_bg"); + break; + default: + _E("cannot reach here"); + } +} + + + +static Evas_Object *__create_win(share_panel_h share_panel) +{ + Evas_Object *win = NULL; + Evas *e = NULL; + Ecore_Evas *ee = NULL; + + win = elm_win_add(NULL, "Share Panel", ELM_WIN_BASIC); + retv_if(!win, NULL); + elm_win_alpha_set(win, EINA_TRUE); + + e = evas_object_evas_get(win); + goto_if(!e, error); + + ee = ecore_evas_ecore_evas_get(e); + goto_if(!ee, error); + + ecore_evas_name_class_set(ee, "SYSTEM_POPUP", "SYSTEM_POPUP"); + + if (elm_win_wm_rotation_supported_get(win)) { + int rots[4] = {0, 90, 180, 270}; + elm_win_wm_rotation_available_rotations_set(win, rots, (sizeof(rots) / sizeof(int))); + } + elm_win_screen_size_get(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(win, _back_key_pressed, share_panel); + evas_object_smart_callback_add(win, "wm,rotation,changed", _rotate_cb, share_panel); + + efl_util_set_window_opaque_state(win, 1); + + elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_HIDE); + elm_win_borderless_set(win, EINA_TRUE); + evas_object_show(win); + + share_panel->win = win; + + return win; + +error: + if (win) + evas_object_del(win); + + return NULL; +} + + + +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 = ELM_SCALE_SIZE(SCROLLER_HEIGHT); + + panel->control = control; + panel->after_launch = 0; + + 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); + + if (share_panel->b) { + bundle_free(share_panel->b); + } + _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) +{ + share_panel_h *share_panel = data; + _D("share_panel is paused"); + + if ((*share_panel)->after_launch) + ui_app_exit(); +} + + + +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; +} diff --git a/src/ui_manager.c b/src/ui_manager.c new file mode 100644 index 0000000..5c135e9 --- /dev/null +++ b/src/ui_manager.c @@ -0,0 +1,387 @@ +/* + * 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 +#include +#include +#include +#include +#include +#include +#include + +#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 *__create_bg_rect(Evas_Object *ui_manager, int width, int height) +{ + Evas_Object *ui_bg = NULL; + + ui_bg = evas_object_rectangle_add(evas_object_evas_get(ui_manager)); + retv_if(!ui_bg, NULL); + + evas_object_size_hint_weight_set(ui_bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_min_set(ui_bg, ELM_SCALE_SIZE(BASE_WIDTH), ELM_SCALE_SIZE(BASE_HEIGHT)); + evas_object_size_hint_max_set(ui_bg, ELM_SCALE_SIZE(BASE_WIDTH), ELM_SCALE_SIZE(BASE_HEIGHT)); + evas_object_color_set(ui_bg, 0, 0, 0, 0); + evas_object_show(ui_bg); + elm_object_part_content_set(ui_manager, "fixed_bg", ui_bg); + + return ui_bg; +} + + + +void __destroy_bg_rect(Evas_Object *bg) +{ + ret_if(!bg); + + evas_object_del(bg); +} + + + +Evas_Object *_ui_manager_create(share_panel_s *share_panel) +{ + Evas_Object *ui_manager = NULL; + Evas_Object *edje = 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_bg_rect(ui_manager, share_panel->root_width, share_panel->root_height), ERROR); + + goto_if(!__create_back_btn(ui_manager, share_panel), ERROR); + + elm_object_part_text_set(ui_manager, "title", _("IDS_AM_HEADER_SHARE")); + elm_object_domain_translatable_part_text_set(ui_manager, "title", PROJECT, "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); + if (!share_panel->list) { + notification_status_message_post(_("IDS_BT_POP_NO_APPLICATIONS_AVAILABLE_TO_OPEN_FILES")); + ui_app_exit(); + } + + share_panel->list_count = eina_list_count(share_panel->list); + + if (1 == share_panel->list_count) { + item_s *item_info = NULL; + int ret = 0; + + _D("item list is 1, launch app right"); + + item_info = eina_list_nth(share_panel->list, 0); + goto_if(!item_info, ERROR); + + ret = aul_forward_app(item_info->appid, item_info->b); + if (ret < 0) { + _E("Fail to launch app(%d)", ret); + } + ui_app_exit(); + } + + _scroller_append_list(share_panel->scroller + , share_panel->list + , share_panel->page_width + , share_panel->page_height); + + edje = elm_layout_edje_get(ui_manager); + goto_if(!edje, ERROR); + + if (share_panel->list_count <= SHARE_PANEL_LINE_MAX) { + if (share_panel->root_width < share_panel->root_height) { + edje_object_signal_emit(edje, "1line", "fixed_bg"); + } else { + edje_object_signal_emit(edje, "1line,land", "fixed_bg"); + } + } + + edje_object_message_signal_process(edje); + + return ui_manager; + +ERROR: + _ui_manager_destroy(ui_manager); + return NULL; +} + + + +void _ui_manager_destroy(Evas_Object *ui_manager) +{ + Evas_Object *button = NULL; + Evas_Object *bg = 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) { + _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); + } + + bg = elm_object_part_content_unset(ui_manager, "fixed_bg"); + if(bg) { + __destroy_bg_rect(bg); + } + + 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); + edje_object_message_signal_process(elm_layout_edje_get(ui_manager)); +} + + + +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); +}