From: Jinkun Jang Date: Tue, 12 Mar 2013 16:38:39 +0000 (+0900) Subject: Tizen 2.1 base X-Git-Tag: 2.1b_release~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e32a026d114c15ac43e1fe3b83b201adef1430b;p=apps%2Fhome%2Fvolume-app.git Tizen 2.1 base --- diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..566bee7 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,2 @@ +Hong Kwon +Minho Kim diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..cc64eac --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,95 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) +PROJECT(volume C) + +SET(SRCS + src/volume.c + src/_util_efl.c + src/_logic.c + src/_sound.c +) + +SET(VENDOR "tizen") +SET(PACKAGE ${PROJECT_NAME}) +SET(PKGNAME "org.${VENDOR}.${PACKAGE}") +SET(PREFIX ${CMAKE_INSTALL_PREFIX}) +SET(BINDIR "${PREFIX}/bin") +SET(RESDIR "${PREFIX}/res") +SET(DATADIR "/opt/usr/apps/com.${VENDOR}.${PACKAGE}/data") +SET(LOCALEDIR "${RESDIR}/locale") +SET(ICONDIR "/opt/share/icons/default/small") +SET(IMAGEDIR "${RESDIR}/images/${PACKAGE}") +SET(EDJDIR "${RESDIR}/edje") + +IF("${CMAKE_BUILD_TYPE}" STREQUAL "") + SET(CMAKE_BUILD_TYPE "Release") +ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "") +MESSAGE("Build type: ${CMAKE_BUILD_TYPE}") + +INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src) + +INCLUDE(FindPkgConfig) +pkg_check_modules(pkgs REQUIRED + appcore-efl + ecore-input + ecore-x + ecore + evas + edje + mm-sound + vconf + utilX + syspopup + bundle + svi + feedback + glib-2.0 + ui-gadget-1 + notification + capi-system-info +) + +FOREACH(flag ${pkgs_CFLAGS}) + SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}") +ENDFOREACH(flag) + +SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}") +SET(CMAKE_C_FLAGS_DEBUG "-O0 -g") +SET(CMAKE_C_FLAGS_RELEASE "-O2") + +FIND_PROGRAM(UNAME NAMES uname) +EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH") +IF("${ARCH}" STREQUAL "arm") + ADD_DEFINITIONS("-DTARGET") + MESSAGE("add -DTARGET") +ENDIF("${ARCH}" STREQUAL "arm") + +ADD_DEFINITIONS("-DVENDOR=\"${VENDOR}\"") +ADD_DEFINITIONS("-DPACKAGE=\"${PACKAGE}\"") +ADD_DEFINITIONS("-DPACKAGE_NAME=\"${PKGNAME}\"") +ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"") +ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"") +ADD_DEFINITIONS("-DDATADIR=\"${DATADIR}\"") +ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"") +ADD_DEFINITIONS("-DICONDIR=\"${ICONDIR}\"") +ADD_DEFINITIONS("-DIMAGEDIR=\"${IMAGEDIR}\"") +ADD_DEFINITIONS("-DEDJDIR=\"${EDJDIR}\"") + +#SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed") +SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--as-needed") + +ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS}) +TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS} -lm) + +INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR}) + +# install desktop file & icon +#CONFIGURE_FILE(${PKGNAME}.desktop.in ${CMAKE_BINARY_DIR}/${PKGNAME}.desktop) +INSTALL(FILES ${CMAKE_BINARY_DIR}/${PKGNAME}.xml DESTINATION /usr/share/packages) +INSTALL(FILES ${CMAKE_SOURCE_DIR}/${PKGNAME}.png DESTINATION ${ICONDIR}) + +# data +ADD_SUBDIRECTORY(data) + +# i18n +ADD_SUBDIRECTORY(po) + diff --git a/LICENSE.Flora b/LICENSE.Flora new file mode 100755 index 0000000..9c95663 --- /dev/null +++ b/LICENSE.Flora @@ -0,0 +1,206 @@ +Flora License + +Version 1.0, May, 2012 + +http://floralicense.org/license/ + +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. + +"Tizen Certified Platform" shall mean a software platform that complies +with the standards set forth in the Compatibility Definition Document +and passes the Compatibility Test Suite as defined from time to time +by the Tizen Technical Steering Group and certified by the Tizen +Association or its designated agent. + +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 +solely as incorporated into a Tizen Certified Platform, 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 solely +as incorporated into a Tizen Certified Platform 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 pursuant to the copyright license +above, in any medium, with or without modifications, and in Source or +Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works + a copy of this License; and + 2. You must cause any modified files to carry prominent notices stating + that You changed the files; and + 3. 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 + 4. 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 Flora License to your work + +To apply the Flora 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 Flora License, Version 1.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://floralicense.org/license/ + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + diff --git a/NOTICE b/NOTICE new file mode 100755 index 0000000..3997999 --- /dev/null +++ b/NOTICE @@ -0,0 +1,4 @@ +Copyright (c) Samsung Electronics Co., Ltd. All rights reserved. +Except as noted, this software is licensed under Flora License, Version 1. +Please, see the LICENSE file for Flora License terms and conditions. + diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt new file mode 100755 index 0000000..33e0974 --- /dev/null +++ b/data/CMakeLists.txt @@ -0,0 +1,16 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 2.6) + +# install edj +ADD_CUSTOM_COMMAND(OUTPUT volume_app.edj + COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/images/private + ${CMAKE_CURRENT_SOURCE_DIR}/volume_app.edc ${CMAKE_BINARY_DIR}/volume_app.edj + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/volume_app.edc +) + +ADD_CUSTOM_TARGET(edj_build DEPENDS volume_app.edj) +ADD_DEPENDENCIES(${PROJECT_NAME} edj_build) +INSTALL(FILES ${CMAKE_BINARY_DIR}/volume_app.edj DESTINATION ${EDJDIR}) + +# install images +INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/images/public/ DESTINATION ${IMAGEDIR} FILES_MATCHING PATTERN "*.png") + diff --git a/data/images/private/00_divider_line.png b/data/images/private/00_divider_line.png new file mode 100755 index 0000000..fa2f19e Binary files /dev/null and b/data/images/private/00_divider_line.png differ diff --git a/data/images/private/00_popup_bg.png b/data/images/private/00_popup_bg.png new file mode 100755 index 0000000..3a5ede1 Binary files /dev/null and b/data/images/private/00_popup_bg.png differ diff --git a/data/images/private/00_progress_bar.png b/data/images/private/00_progress_bar.png new file mode 100755 index 0000000..5ca3aa2 Binary files /dev/null and b/data/images/private/00_progress_bar.png differ diff --git a/data/images/private/00_progress_bg.png b/data/images/private/00_progress_bg.png new file mode 100755 index 0000000..1f4a0f4 Binary files /dev/null and b/data/images/private/00_progress_bg.png differ diff --git a/data/images/private/00_slider_handle.png b/data/images/private/00_slider_handle.png new file mode 100755 index 0000000..6611247 Binary files /dev/null and b/data/images/private/00_slider_handle.png differ diff --git a/data/images/private/00_slider_handle_dim.png b/data/images/private/00_slider_handle_dim.png new file mode 100755 index 0000000..4d8ebb6 Binary files /dev/null and b/data/images/private/00_slider_handle_dim.png differ diff --git a/data/images/private/00_slider_handle_press.png b/data/images/private/00_slider_handle_press.png new file mode 100755 index 0000000..5b466a0 Binary files /dev/null and b/data/images/private/00_slider_handle_press.png differ diff --git a/data/images/private/00_volume_icon.png b/data/images/private/00_volume_icon.png new file mode 100755 index 0000000..ee6b133 Binary files /dev/null and b/data/images/private/00_volume_icon.png differ diff --git a/data/images/private/00_volume_icon_Call.png b/data/images/private/00_volume_icon_Call.png new file mode 100755 index 0000000..26246b4 Binary files /dev/null and b/data/images/private/00_volume_icon_Call.png differ diff --git a/data/images/private/00_volume_icon_Mute.png b/data/images/private/00_volume_icon_Mute.png new file mode 100755 index 0000000..e044860 Binary files /dev/null and b/data/images/private/00_volume_icon_Mute.png differ diff --git a/data/images/private/00_volume_icon_Vibrat.png b/data/images/private/00_volume_icon_Vibrat.png new file mode 100755 index 0000000..4c8fb04 Binary files /dev/null and b/data/images/private/00_volume_icon_Vibrat.png differ diff --git a/data/images/private/00_volume_icon_headphone.png b/data/images/private/00_volume_icon_headphone.png new file mode 100755 index 0000000..76e8098 Binary files /dev/null and b/data/images/private/00_volume_icon_headphone.png differ diff --git a/data/images/private/00_volume_icon_media.png b/data/images/private/00_volume_icon_media.png new file mode 100755 index 0000000..758e3c1 Binary files /dev/null and b/data/images/private/00_volume_icon_media.png differ diff --git a/data/images/public/00_volume_icon_settings.png b/data/images/public/00_volume_icon_settings.png new file mode 100755 index 0000000..a3ec381 Binary files /dev/null and b/data/images/public/00_volume_icon_settings.png differ diff --git a/data/images/public/00_volume_icon_settings_pressed.png b/data/images/public/00_volume_icon_settings_pressed.png new file mode 100755 index 0000000..1808e65 Binary files /dev/null and b/data/images/public/00_volume_icon_settings_pressed.png differ diff --git a/data/volume_app.edc b/data/volume_app.edc new file mode 100755 index 0000000..7ebacd1 --- /dev/null +++ b/data/volume_app.edc @@ -0,0 +1,333 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#define RESOURCE_IMAGE( FILE_NAME ) \ + group { \ + name : FILE_NAME; \ + images.image: FILE_NAME COMP; \ + parts { \ + part { name: "image"; \ + description { \ + state : "default" 0.0; \ + image.normal : FILE_NAME; \ + aspect : 1 1; \ + aspect_preference : BOTH; \ + } \ + } \ + } \ + } + + +collections { + +RESOURCE_IMAGE("00_volume_icon.png"); +RESOURCE_IMAGE("00_volume_icon_Call.png"); +RESOURCE_IMAGE("00_volume_icon_Mute.png"); +RESOURCE_IMAGE("00_volume_icon_Vibrat.png"); +RESOURCE_IMAGE("00_volume_icon_headphone.png"); +RESOURCE_IMAGE("00_volume_icon_media.png"); + + +group { name: "popup_volumebar"; + images { + image: "00_divider_line.png" COMP; + } + parts { + part { name:"bg"; + type: RECT; + scale : 1; + description { state: "default" 0.0; + min: 668 134; + align: 0.5 0.5; + fixed: 1 1; + visible: 0; + rel1 { relative: 0.5 0.5; offset: 0 -10; } + rel2 { relative: 0.5 0.5; offset: 0 -10; } + } + } + part { name: "pad_l"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min : 0 20; + max : 0 20; + fixed: 1 1; + rel1.to: "bg"; + rel2.to: "bg"; + visible: 0; + align: 0.0 0.0; + } + } + part { name: "pad_r"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min : 0 20; + max : 0 20; + fixed: 1 1; + rel1.to: "bg"; + rel2.to: "bg"; + visible: 0; + align: 1.0 1.0; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min : 568 134; + fixed: 1 1; + rel1 { + relative: 1.0 0.5; + to_x: "pad_l"; + to_y: "bg"; + } + rel2 { + relative: 0.0 0.5; + to_x: "pad_after_content"; + to_y: "bg"; + } + align: 0.5 0.5; + } + } + part { name: "pad_after_content"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 16 0; + fixed: 1 0; + rel1 { + relative: 0.0 0.5; + to_x: "divider"; + to_y: "bg"; + } + rel2 { + relative: 0.0 0.5; + to_x: "divider"; + to_y: "bg"; + } + align: 1.0 0.5; + visible: 0; + } + } + part { name: "divider"; + scale: 1; + description { state: "default" 0.0; + min: 4 18; + max: 4 99999; + fixed: 1 1; + rel1 { + relative: 0.0 1.0; + to_x: "pad_after_divider"; + to_y: "pad_l"; + } + rel2 { + relative: 0.0 0.0; + to_x: "pad_after_divider"; + to_y: "pad_r"; + } + image.normal: "00_divider_line.png"; + align: 1.0 0.5; + } + } + part { name: "pad_after_divider"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min: 16 0; + max: 16 0; + fixed: 1 1; + visible: 0; + rel1 { + relative: 0.0 0.5; + to_x: "elm.swallow.icon"; + to_y: "bg"; + } + rel2 { + relative: 0.0 0.5; + to_x: "elm.swallow.icon"; + to_y: "bg"; + } + align: 1.0 0.5; + } + } + part { name: "elm.swallow.icon"; + type: SWALLOW; + scale: 1; + description { state: "default" 0.0; + min: 64 64; + max: 64 64; + fixed: 1 1; + rel1 { + relative: 0.0 0.5; + to_x: "pad_r"; + to_y: "bg"; + } + rel2 { + relative: 0.0 0.5; + to_x: "pad_r"; + to_y: "bg"; + } + align: 1.0 0.5; + } + } + } +} + + group { name : "block_events"; + parts{ + part { name : "blockevent"; + type : RECT; + description { + color : 0 0 0 0; + } + } + } + programs{ + program{ + name : "clicked"; + source : "blockevent"; + signal : "mouse,clicked,1"; + action : SIGNAL_EMIT "clicked" "*"; + } + } + } + /* END group "block_events" */ + + group { name : "volumeLayout"; + images { + image: "00_popup_bg.png" COMP; + } + parts{ + part { name : "base"; + type : IMAGE; + scale : 1; + description { state: "default" 0.0; + image { + normal: "00_popup_bg.png"; + border: 18 18 32 52; + border_scale: 1; + } + min: 720 182; + max: 720 1120; + align: 0.5 0.5; + } + } + part { name: "elm.swallow.content"; + type: SWALLOW; + scale : 1; + description { state: "default" 0.0; + min: 720 0; + fixed: 1 0; + rel1 { + relative: 0.5 0.0; + to: "base"; + } + rel2 { + relative: 0.5 1.0; + to: "base"; + } + } + } + } + } + /* END group "volumeLayout" */ + + group { name : "volumeLayoutContent"; + parts{ + part { name : "pad_t"; + type : RECT; + scale : 1; + mouse_events : 0; + description { state: "default" 0.0; + align: 0.5 0.0; + min: 0 49; + fixed: 0 1; + visible: 0; + rel1 { + relative: 1.0 0.0; + to_x: "pad_l"; + } + rel2 { + relative: 0.0 0.0; + to_x: "pad_r"; + } + } + } /* "pad_t" end */ + + part { name : "pad_l"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min : 26 0; + fixed: 1 0; + rel2.relative: 0.0 1.0; + visible: 0; + align: 0.0 0.0; + } + } /* "pad_l" end */ + + part { name: "pad_r"; + type: RECT; + scale: 1; + description { state: "default" 0.0; + min : 26 0; + fixed: 1 0; + rel1.relative: 1.0 0.0; + visible: 0; + align: 1.0 0.0; + } + } /* "pad_r" end */ + + part{ name:"elm.swallow.content"; + type: SWALLOW; + scale : 1; + description { state: "default" 0.0; + min: 668 0; + fixed: 1 0; + rel1 { + relative: 0.5 1.0; + to: "pad_t"; + } + rel2 { + relative: 0.5 0.0; + to: "pad_b"; + } + } + } /* "elm.swallow.content" end */ + + part { name: "pad_b"; + type: RECT; + scale : 1; + mouse_events: 0; + description { state: "default" 0.0; + align: 0.5 1.0; + min: 0 69; + fixed: 0 1; + visible: 0; + rel1 { + relative: 0.0 1.0; + to_x: "pad_l"; + } + rel2.to_x: "pad_r"; + } + } + } + } + /* END group "volumeLayoutContent" */ + +} diff --git a/debian/changelog b/debian/changelog new file mode 100755 index 0000000..e49db5e --- /dev/null +++ b/debian/changelog @@ -0,0 +1,37 @@ +volume (0.2.6-1) unstable; urgency=low + + * update version to 0.2.6-1 + + -- minho07.kim Mon, 21 Jan 2013 13:35:38 +0900 + +volume (0.2.5-1) unstable; urgency=low + + * Fix some issues + * Git : apps/home/volume-app + + -- minho07.kim Mon, 07 Jan 2013 15:42:55 +0900 + +volume (0.2.4-1) unstable; urgency=low + + * Remove unused files + * Git: magnolia/apps/home/volume-app + * Tag: volume_0.2.4-1 + + -- Junghyun Kim Fri, 17 Aug 2012 16:51:10 +0900 + +volume (0.2.3-1) unstable; urgency=low + + * Fix an error not to read PO files + * Git: magnolia/apps/home/volume-app + * Tag: volume_0.2.3-1 + + -- Hong Kwon Thu, 16 Aug 2012 19:02:09 +0900 + +volume (0.2.2-1) unstable; urgency=low + + * Apply open source code + * Git: apps/home/volume-app + * Tag: volume_0.2.2-1 + + -- Hong Kwon Mon, 13 Aug 2012 19:36:09 +0900 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..7ed6ff8 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..c692e15 --- /dev/null +++ b/debian/control @@ -0,0 +1,17 @@ +Source: volume +Section: devel +Priority: extra +Maintainer: Junghyun Kim , hhh.kwon +Build-Depends: debhelper (>= 5), libappcore-efl-dev, libelm-dev, libmm-sound-dev, dlog-dev, libsvi-dev, libvconf-dev, libslp-utilx-dev, syspopup-dev, libbundle-dev, libglib2.0-dev, libui-gadget-dev +Standards-Version: 3.7.2 + +Package: org.tizen.volume +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: volume + +Package: org-tizen.volume-dbg +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Volume Debug Symbols + Debug symbols for volume diff --git a/debian/org.tizen.volume.install.in b/debian/org.tizen.volume.install.in new file mode 100644 index 0000000..776cc6a --- /dev/null +++ b/debian/org.tizen.volume.install.in @@ -0,0 +1,3 @@ +@PREFIX@/* +/opt/share/applications/org.tizen.desktop +/opt/share/icons/default/small/org.tizen.volume.png diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..079eb49 --- /dev/null +++ b/debian/rules @@ -0,0 +1,119 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +CFLAGS ?= -Wall -g +LDFLAGS ?= +PREFIX ?= /opt/apps/org.tizen.volume +RESDIR ?= /opt/apps/org.tizen.volume/res +DATADIR ?= /opt/apps/org.tizen.volume/data + +#ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +# CFLAGS += -O0 +#else +# CFLAGS += -O2 +#endif +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + BUILD_TYPE=Debug +else + BUILD_TYPE=Release +endif + +LDFLAGS += -Wl,--rpath=$(PREFIX)/lib -Wl,--as-needed + +CMAKE_BUILD_DIR ?= $(CURDIR)/cmake_build_tmp + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + mkdir -p $(CMAKE_BUILD_DIR) && cd $(CMAKE_BUILD_DIR) && \ + CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX="$(PREFIX)" -DCMAKE_BUILD_TYPE="$(BUILD_TYPE)" + + touch configure-stamp + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + cd $(CMAKE_BUILD_DIR) && $(MAKE) + + for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ + cat $$f > $${f%.in}; \ + sed -i -e "s#@PREFIX@#$(PREFIX)#g" $${f%.in}; \ + sed -i -e "s#@RESDIR@#$(RESDIR)#g" $${f%.in}; \ + sed -i -e "s#@DATADIR@#$(DATADIR)#g" $${f%.in}; \ + done + + touch $@ + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + rm -rf $(CMAKE_BUILD_DIR) + + for f in `find $(CURDIR)/debian/ -name "*.in"`; do \ + rm -f $${f%.in}; \ + done + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k +# dh_installdirs + + # Add here commands to install the package into debian/wavplayer. + cd $(CMAKE_BUILD_DIR) && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installchangelogs +# dh_installdocs +# dh_installexamples + dh_install --sourcedir=debian/tmp +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_python +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman + dh_link + dh_strip --dbg-package=org.tizen.volume-dbg + dh_compress + dh_fixperms +# dh_perl + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/org.tizen.volume.desktop.in b/org.tizen.volume.desktop.in new file mode 100644 index 0000000..f6062b4 --- /dev/null +++ b/org.tizen.volume.desktop.in @@ -0,0 +1,8 @@ +Name=@PROJECT_NAME@ +Exec=@BINDIR@/@PROJECT_NAME@ +Icon=@PKGNAME@.png +Type=Application +Version=0.1.0-0 +NoDisplay=true +X-TIZEN-TaskManage=false +X-TIZEN-Removable=false diff --git a/org.tizen.volume.manifest b/org.tizen.volume.manifest new file mode 100755 index 0000000..2b8e373 --- /dev/null +++ b/org.tizen.volume.manifest @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/org.tizen.volume.png b/org.tizen.volume.png new file mode 100755 index 0000000..8f488b4 Binary files /dev/null and b/org.tizen.volume.png differ diff --git a/org.tizen.volume.xml b/org.tizen.volume.xml new file mode 100755 index 0000000..a297a8c --- /dev/null +++ b/org.tizen.volume.xml @@ -0,0 +1,10 @@ + + + + Hong Kwon + Volume Application + + org.tizen.volume.png + + + diff --git a/packaging/org.tizen.volume.spec b/packaging/org.tizen.volume.spec new file mode 100755 index 0000000..5a30e97 --- /dev/null +++ b/packaging/org.tizen.volume.spec @@ -0,0 +1,50 @@ +#sbs-git:slp/pkgs/v/volume-app volume-app 0.1.2 226202351de9fefb43756c36d215ca74f52431d0 +Name: org.tizen.volume +Summary: Volume application (EFL) +Version: 0.2.6 +Release: 1 +Group: TO_BE/FILLED_IN +License: Flora Software License +Source0: %{name}-%{version}.tar.gz +BuildRequires: pkgconfig(appcore-efl) +BuildRequires: pkgconfig(elementary) +BuildRequires: pkgconfig(utilX) +BuildRequires: pkgconfig(mm-sound) +BuildRequires: pkgconfig(syspopup) +BuildRequires: pkgconfig(dlog) +BuildRequires: pkgconfig(svi) +BuildRequires: pkgconfig(ui-gadget-1) +BuildRequires: pkgconfig(notification) +BuildRequires: pkgconfig(capi-system-info) +BuildRequires: pkgconfig(feedback) + +BuildRequires: cmake +BuildRequires: edje-bin +BuildRequires: embryo-bin +BuildRequires: gettext-devel + +%description +volume. + +%prep +%setup -q + +%define PREFIX /usr/apps/org.tizen.volume + +%build +RPM_OPT=`echo $CFLAGS|sed 's/-Wp,-D_FORTIFY_SOURCE=2//'` +export CFLAGS=$RPM_OPT +cmake -DCMAKE_INSTALL_PREFIX="%{PREFIX}" +make %{?jobs:-j%jobs} + +%install +rm -rf %{buildroot} +%make_install + +%files +%manifest org.tizen.volume.manifest +%defattr(-,root,root,-) +%{PREFIX}/bin/* +%{PREFIX}/res/* +/opt/share/icons/default/small/org.tizen.volume.png +/usr/share/packages/org.tizen.volume.xml diff --git a/po/CMakeLists.txt b/po/CMakeLists.txt new file mode 100644 index 0000000..17eb8ff --- /dev/null +++ b/po/CMakeLists.txt @@ -0,0 +1,24 @@ +# for i18n + +SET(POFILES hy.po az.po eu.po bg.po ca.po zh_CN.po zh_HK.po zh_TW.po hr.po cs.po da.po nl_NL.po en.po en_US.po et.po fi.po fr_FR.po gl.po ka.po de_DE.po el_GR.po hu.po is.po ga.po it_IT.po ja_JP.po kk.po ko_KR.po lv.po lt.po mk.po nb.po pl.po pt_PT.po pt_BR.po ro.po ru_RU.po sr.po sk.po sl.po es_ES.po es_US.po sv.po tr_TR.po uk.po uz.po ar.po zh_SG.po hi.po en_PH.po fr_CA.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/POTFILES.in b/po/POTFILES.in new file mode 100644 index 0000000..a77ceca --- /dev/null +++ b/po/POTFILES.in @@ -0,0 +1,2 @@ +# List of source files containing translatable strings. +volume.c diff --git a/po/ar.po b/po/ar.po new file mode 100644 index 0000000..0b2bb3a --- /dev/null +++ b/po/ar.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "قد تضر مستويات الصوت العالية بسمعك إذا استمعت إليها لفترة طويلة" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "جافا" + +msgid "IDS_COM_BODY_WARNING" +msgstr "تحذير" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "وسائط" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "سماعات رأس" + diff --git a/po/az.po b/po/az.po new file mode 100644 index 0000000..9ef5746 --- /dev/null +++ b/po/az.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Uzun müddət ucadan qulaq assanız, bu sizin eşitmənizə mənfi təsir edə bilər" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Mediya" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Xəbərdarlıq" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Qulaqlıqlar" + diff --git a/po/bg.po b/po/bg.po new file mode 100644 index 0000000..f3f42e3 --- /dev/null +++ b/po/bg.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Голямата сила на звука може да увреди слуха ви, ако слушате дълго" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Предупреждение" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Медии" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Слушалки" + diff --git a/po/ca.po b/po/ca.po new file mode 100644 index 0000000..49cc43c --- /dev/null +++ b/po/ca.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Volums elevats poden malmetre la seva oïda si els escolta durant molt temps" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Advertiment" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Multimèdia" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Auriculars" + diff --git a/po/cs.po b/po/cs.po new file mode 100644 index 0000000..791cffd --- /dev/null +++ b/po/cs.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Dlouhodobý poslech velmi hlasité reprodukce může poškodit sluch" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Upozornění" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Média" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Sluchátka" + diff --git a/po/da.po b/po/da.po new file mode 100644 index 0000000..492564b --- /dev/null +++ b/po/da.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Høj musik kan skade din hørelse, hvis du lytter i for lang tid" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Advarsel" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Medie" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Høretelefoner" + diff --git a/po/de_DE.po b/po/de_DE.po new file mode 100644 index 0000000..609d635 --- /dev/null +++ b/po/de_DE.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Das Hören lauter Musik über einen längeren Zeitraum kann sich schädlich auf Ihr Gehör auswirken." + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Warnung" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Medien" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Kopfhörer" + diff --git a/po/el_GR.po b/po/el_GR.po new file mode 100644 index 0000000..5b8e401 --- /dev/null +++ b/po/el_GR.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Η ακρόαση μουσικής σε υψηλή ένταση για μεγάλο χρονικό διάστημα μπορεί να βλάψει την ακοή σας" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Προειδοποίηση" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Μέσα" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Ακουστικά" + diff --git a/po/en.po b/po/en.po new file mode 100644 index 0000000..7aaa29e --- /dev/null +++ b/po/en.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "High volumes may harm your hearing if you listen for a long time" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Warning" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Headphones" + diff --git a/po/en_GB.po b/po/en_GB.po new file mode 100644 index 0000000..7aaa29e --- /dev/null +++ b/po/en_GB.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "High volumes may harm your hearing if you listen for a long time" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Warning" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Headphones" + diff --git a/po/en_PH.po b/po/en_PH.po new file mode 100644 index 0000000..0d1afd8 --- /dev/null +++ b/po/en_PH.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "High volume may harm your hearing if you listen to it for a long time" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Warning" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Headphones" + diff --git a/po/en_US.po b/po/en_US.po new file mode 100644 index 0000000..7aaa29e --- /dev/null +++ b/po/en_US.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "High volumes may harm your hearing if you listen for a long time" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Warning" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Headphones" + diff --git a/po/es_ES.po b/po/es_ES.po new file mode 100644 index 0000000..8293735 --- /dev/null +++ b/po/es_ES.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "El volumen alto durante un tiempo prolongado puede dañar sus oídos" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Aviso" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Multimedia" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Auriculares" + diff --git a/po/es_US.po b/po/es_US.po new file mode 100644 index 0000000..138201b --- /dev/null +++ b/po/es_US.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Volúmenes elevados pueden dañar su oído si los escucha durante un tiempo prolongado" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Multimedia" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Aviso" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Auriculares" + diff --git a/po/et.po b/po/et.po new file mode 100644 index 0000000..464a6fe --- /dev/null +++ b/po/et.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Valju heli kuulamine pika aja vältel võib põhjustada kuulmiskahjustusi" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Meedia (Telefon)" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Hoiatus" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Kõrvaklapid" + diff --git a/po/eu.po b/po/eu.po new file mode 100644 index 0000000..ed35339 --- /dev/null +++ b/po/eu.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Baliteke bolumen handien zure entzumena kaltetzea denbora luzean entzuten baduzu" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Oharra" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Aurikularrak" + diff --git a/po/fi.po b/po/fi.po new file mode 100644 index 0000000..c7178a2 --- /dev/null +++ b/po/fi.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Suuri äänenvoimakkuus vaurioittaa kuuloasi pitkäaikaisen kuuntelun aikana" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Varoitus" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Kuulokkeet" + diff --git a/po/fr_CA.po b/po/fr_CA.po new file mode 100644 index 0000000..4437185 --- /dev/null +++ b/po/fr_CA.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "L'écoute prolongée de musique à un volume élevé risque d'endommager votre audition" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Média" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Avertissement" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Écouteurs" + diff --git a/po/fr_FR.po b/po/fr_FR.po new file mode 100644 index 0000000..ece5be6 --- /dev/null +++ b/po/fr_FR.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr " L'écoute prolongée de musique à un volume élevé risque d'endommager votre audition" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Avertissement" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Média" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Ecouteurs" + diff --git a/po/ga.po b/po/ga.po new file mode 100644 index 0000000..3382374 --- /dev/null +++ b/po/ga.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Is féidir le hairdí arda dochar a dhéanamh don éisteacht má éisteann tú ar feadh tamall fada" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Meáin" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Rabhadh" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Cluasáin" + diff --git a/po/gl.po b/po/gl.po new file mode 100644 index 0000000..0c9d7de --- /dev/null +++ b/po/gl.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "A música a un volume elevado pode danar a túa capacidade auditiva se a escoitas durante un período de tempo prolongado" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Multimedia" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Androide" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Aviso" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Auriculares" + diff --git a/po/he.po b/po/he.po new file mode 100644 index 0000000..d13bad1 --- /dev/null +++ b/po/he.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "עוצמות קול גבוהות עלולות לפגוע בשמיעה אם מאזינים להן למשך זמן רב" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "אזהרה" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "מדיה" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "אוזניות" + diff --git a/po/hi.po b/po/hi.po new file mode 100644 index 0000000..cce70e5 --- /dev/null +++ b/po/hi.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "उच्च वॉल्यूम से आपके सुनने में नुकसान हो सकता है यदि आप लंबे समय तक उसे सुनते हैं" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "एंड्रोइड" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "चेतावनी" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "मीडिया" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "हेडफ़ोन्‍स" + diff --git a/po/hr.po b/po/hr.po new file mode 100644 index 0000000..d78e735 --- /dev/null +++ b/po/hr.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Velika glasnoća može oštetiti sluh pri dugom slušanju" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Upozorenje" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Mediji" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Slušalice" + diff --git a/po/hu.po b/po/hu.po new file mode 100644 index 0000000..696f86d --- /dev/null +++ b/po/hu.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Ha sokáig hallgat nagy hangerőn zenét vagy egyebet, akkor károsodhat a hallása" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Figyelmeztetés" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Média" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Fejhallgató" + diff --git a/po/hy.po b/po/hy.po new file mode 100644 index 0000000..299d0a3 --- /dev/null +++ b/po/hy.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Բարձր ձայնը կարող է վնասել Ձեր լսողությունը, եթե այն լսեք երկար ժամանակ" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Մեդիա" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Զգուշացում" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Գլխ. հեռախոսներ" + diff --git a/po/id.po b/po/id.po new file mode 100644 index 0000000..fb7537c --- /dev/null +++ b/po/id.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Volume tinggi dapat membahayakan pendengaran Anda jika Anda mendengarkannya dalam waktu yang lama" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Peringatan" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Headphone" + diff --git a/po/is.po b/po/is.po new file mode 100644 index 0000000..174b96b --- /dev/null +++ b/po/is.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Hátt spiluð tónlist getur skaðað heyrn þína ef hlustað er í langan tíma í einu" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Miðill" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Viðvörun" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Höfuðtól" + diff --git a/po/it_IT.po b/po/it_IT.po new file mode 100644 index 0000000..26f69ca --- /dev/null +++ b/po/it_IT.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Volumi troppo alti possono danneggiare l'udito in caso di ascolto prolungato" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Avviso" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Multimedia" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Cuffie" + diff --git a/po/ja_JP.po b/po/ja_JP.po new file mode 100644 index 0000000..a35215f --- /dev/null +++ b/po/ja_JP.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr " ​長時間​​大音量​​で​​聴き​​続ける​​と、​​聴力​​を​​損傷​​する​​可能性​​が​​あります" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "警告" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "メディア" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "ヘッドホン" + diff --git a/po/ka.po b/po/ka.po new file mode 100644 index 0000000..57ddae2 --- /dev/null +++ b/po/ka.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "ხანგრძლივი დროით მუსიკის მაღალ ხმაზე მოსმენა შეიძლება გახდეს სმენის დაქვეითების მიზეზი" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "მედია" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "ჯავა" + +msgid "IDS_COM_BODY_WARNING" +msgstr "გაფრთხილება" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "გარნიტურები" + diff --git a/po/kk.po b/po/kk.po new file mode 100644 index 0000000..4b21e9d --- /dev/null +++ b/po/kk.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Ұзақ уақыт тыңдайтын болсаңыз, қатты дауыс деңгейі есту мүшеңізді зақымдауы мүмкін" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Ақпарат" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Ескерту" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Құлаққаптар" + diff --git a/po/ko_KR.po b/po/ko_KR.po new file mode 100644 index 0000000..6f4d30e --- /dev/null +++ b/po/ko_KR.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "오랫동안 큰 소리로 음악을 들으면 청각이 손상될 수 있습니다" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "안드로이드" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "경고" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "미디어" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "헤드폰" + diff --git a/po/lt.po b/po/lt.po new file mode 100644 index 0000000..a8b3357 --- /dev/null +++ b/po/lt.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Jei klausysitės garsiai ilgą laiką, gali būti pažeista klausa" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "„Android“" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Perspėjimas" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Daugialypė terpė" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Ausinės" + diff --git a/po/lv.po b/po/lv.po new file mode 100644 index 0000000..7949db5 --- /dev/null +++ b/po/lv.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Ilgstoša skaļas mūzikas klausīšanās var izraisīt dzirdes traucējumus" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Brīdinājums" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Multivide" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Austiņas" + diff --git a/po/mk.po b/po/mk.po new file mode 100644 index 0000000..a348a15 --- /dev/null +++ b/po/mk.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Големи јачини може да ви го оштетат слухот ако слушате долго време" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Медиум" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Андроид" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Предупредување" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Слушалки" + diff --git a/po/ms.po b/po/ms.po new file mode 100644 index 0000000..6955d87 --- /dev/null +++ b/po/ms.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Kelantangan tinggi mungkin merosakkan pendengaran anda jika anda mendengar untuk masa yang lama" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Amaran" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Fon kepala" + diff --git a/po/nb.po b/po/nb.po new file mode 100644 index 0000000..177cec0 --- /dev/null +++ b/po/nb.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Høy lydstyrke kan skade hørselen din hvis du lytter til det over lengre perioder" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Medier" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Advarsel" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Hodetelefoner" + diff --git a/po/nl_NL.po b/po/nl_NL.po new file mode 100644 index 0000000..038c6bf --- /dev/null +++ b/po/nl_NL.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Hoog volume kan uw gehoor beschadigen wanneer u er lang naar luistert" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Waarschuwing" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Koptelefoons" + diff --git a/po/no.po b/po/no.po new file mode 100644 index 0000000..b14a452 --- /dev/null +++ b/po/no.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Høy lydstyrke kan skade hørselen din hvis du lytter til det over lengre perioder" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Advarsel" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Medier" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Hodetelefoner" + diff --git a/po/pl.po b/po/pl.po new file mode 100644 index 0000000..700a5d4 --- /dev/null +++ b/po/pl.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Słuchanie muzyki przy wysokim ustawieniu głośności przez długi czas może spowodować uszkodzenie słuchu" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Ostrzeżenie" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Słuchawki" + diff --git a/po/pt_BR.po b/po/pt_BR.po new file mode 100644 index 0000000..a04d26a --- /dev/null +++ b/po/pt_BR.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "O volume alto do som pode prejudicar a sua audição se a expor durante muito tempo" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Mídia" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Aviso" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Fones de ouvido" + diff --git a/po/pt_PT.po b/po/pt_PT.po new file mode 100644 index 0000000..deeeae3 --- /dev/null +++ b/po/pt_PT.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "O volume de som elevado pode prejudicar a sua audição se a expuser a este durante muito tempo" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Aviso" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Multimédia" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Auscultadores" + diff --git a/po/ro.po b/po/ro.po new file mode 100644 index 0000000..57c032f --- /dev/null +++ b/po/ro.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Sunetele la volum ridicat pot afecta auzul, dacă le ascultaţi timp îndelungat" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Avertisment" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Căşti" + diff --git a/po/ru_RU.po b/po/ru_RU.po new file mode 100644 index 0000000..9c14ef4 --- /dev/null +++ b/po/ru_RU.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Прослушивание громкой музыки в течение продолжительного времени может привести к ухудшению слуха" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Предупреждение" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Медиа" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Наушники" + diff --git a/po/sk.po b/po/sk.po new file mode 100644 index 0000000..e09ad1e --- /dev/null +++ b/po/sk.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Vysoká hlasitosť môže pri dlhodobom počúvaní poškodiť sluch" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Varovanie" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Médium" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Slúchadlá" + diff --git a/po/sl.po b/po/sl.po new file mode 100644 index 0000000..8d2d911 --- /dev/null +++ b/po/sl.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Če glasno glasbo poslušate daljši čas, lahko to škoduje vašem sluhu" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Opozorilo" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Medij" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Slušalke" + diff --git a/po/sr.po b/po/sr.po new file mode 100644 index 0000000..29dd718 --- /dev/null +++ b/po/sr.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Velika jačina zvuka može da ošteti sluh ukoliko tako slušate duže vreme" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Upozorenje" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Mediji" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Slušalice" + diff --git a/po/sv.po b/po/sv.po new file mode 100644 index 0000000..e837074 --- /dev/null +++ b/po/sv.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Hög volym kan skada din hörsel om du lyssnar för länge" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Varning" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Hörlurar" + diff --git a/po/th.po b/po/th.po new file mode 100644 index 0000000..c69ee38 --- /dev/null +++ b/po/th.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "ระดับ​เสียง​ที่​สูง​อาจ​เป็น​อันตราย​ต่อ​การ​ฟัง​ของ​คุณ​ได้ หาก​คุณ​ฟัง​เป็น​เวลา​นาน" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "เตือน" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "มี​เดีย" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "หู​ฟัง" + diff --git a/po/tr_TR.po b/po/tr_TR.po new file mode 100644 index 0000000..271e339 --- /dev/null +++ b/po/tr_TR.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Yüksek ses düzeyi, uzun süre dinlemeniz durumunda işitme duyunuza zarar verebilir" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Uyarı" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Medya" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Kulaklıklar" + diff --git a/po/uk.po b/po/uk.po new file mode 100644 index 0000000..08d2684 --- /dev/null +++ b/po/uk.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Тривале прослуховування за високого рівня гучності може призвести до погіршення слуху" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Попередження" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Медіадані" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Навушники" + diff --git a/po/update-po.sh b/po/update-po.sh new file mode 100755 index 0000000..c84f1a7 --- /dev/null +++ b/po/update-po.sh @@ -0,0 +1,60 @@ +#!/bin/sh + +PACKAGE=volume +SRCROOT=../src +POTFILES=POTFILES.in + +#ALL_LINGUAS= ar bg ca cs da de_DE el_GR en en_GB en_US es_ES fi fr_FR he hi hr hu id it_IT ja_JP ko_KR lt lv ms nl_NL no pl pt_PT ro ru_RU sk sl sr sv th tr_TR uk vi zh_CN zh_HK zh_TW +ALL_LINGUAS="ar bg ca cs da de_DE el_GR en en_GB en_US es_ES fi fr_FR he hi hr hu id it_IT ja_JP ko_KR lt lv ms nl_NL no pl pt_PT ro ru_RU sk sl sr sv th tr_TR uk vi zh_CN zh_HK zh_TW" + +XGETTEXT=/usr/bin/xgettext +MSGMERGE=/usr/bin/msgmerge + +echo -n "Make ${PACKAGE}.pot " +if [ ! -e $POTFILES ] ; then + echo "$POTFILES not found" + exit 1 +fi + +$XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \ + --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES +if [ $? -ne 0 ]; then + echo "xgettext error" + exit 1 +fi + +if [ ! -f ${PACKAGE}.po ]; then + echo "No such file: ${PACKAGE}.po" + exit 1 +fi + +rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot +echo "done" + +for LANG in $ALL_LINGUAS; do + echo "$LANG : " + + if [ ! -e $LANG.po ] ; then + sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po + echo "${LANG}.po created" + else + if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then + if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then + rm -f ${LANG}.new.po + else + if mv -f ${LANG}.new.po ${LANG}.po; then + echo "" + else + echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2 + rm -f ${LANG}.new.po + exit 1 + fi + fi + else + echo "msgmerge for $LANG failed!" + rm -f ${LANG}.new.po + fi + fi + echo "" +done + diff --git a/po/uz.po b/po/uz.po new file mode 100644 index 0000000..85fccdc --- /dev/null +++ b/po/uz.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Musiqani baland ovozda uzoq vaqt davomida tinglash eshitish a’zolaringizga zarar yetkazishi mumkin" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Ogohlantirish" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Quloqliklar" + diff --git a/po/vi.po b/po/vi.po new file mode 100644 index 0000000..aa6c018 --- /dev/null +++ b/po/vi.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "Nghe âm lượng to trong thời gian dài có thể làm hại thính giác của bạn" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "Cảnh báo" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "Media" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "Tai nghe" + diff --git a/po/volume.pot b/po/volume.pot new file mode 100644 index 0000000..e4901a6 --- /dev/null +++ b/po/volume.pot @@ -0,0 +1,26 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2011-10-21 17:49+0900\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: volume.c:38 +msgid "Application template" +msgstr "" + +#: volume.c:39 +msgid "Click to exit" +msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po new file mode 100644 index 0000000..f1084c3 --- /dev/null +++ b/po/zh_CN.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "如果长时间用高音量收听,可能会损坏听力" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java程序" + +msgid "IDS_COM_BODY_WARNING" +msgstr "警告" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "媒体" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "耳机" + diff --git a/po/zh_HK.po b/po/zh_HK.po new file mode 100644 index 0000000..3e1988c --- /dev/null +++ b/po/zh_HK.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "長期聆聽高音量會損害您的聽力" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "警告" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "媒體" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "耳機" + diff --git a/po/zh_SG.po b/po/zh_SG.po new file mode 100644 index 0000000..6292605 --- /dev/null +++ b/po/zh_SG.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "如果长时间用高音量收听,可能会损坏听力" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "媒体" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "警告" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "耳机" + diff --git a/po/zh_TW.po b/po/zh_TW.po new file mode 100644 index 0000000..7b90ac5 --- /dev/null +++ b/po/zh_TW.po @@ -0,0 +1,18 @@ +msgid "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" +msgstr "長期聆聽過大音量會損害您的聽力" + +msgid "IDS_COM_BODY_ANDROID" +msgstr "Android" + +msgid "IDS_COM_BODY_JAVA" +msgstr "Java" + +msgid "IDS_COM_BODY_WARNING" +msgstr "警告" + +msgid "IDS_COM_BODY_MEDIA" +msgstr "媒體" + +msgid "IDS_COM_OPT_HEADPHONES_ABB" +msgstr "耳機" + diff --git a/src/_logic.c b/src/_logic.c new file mode 100755 index 0000000..50fe063 --- /dev/null +++ b/src/_logic.c @@ -0,0 +1,994 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include"_logic.h" +#include "volume.h" +#include "_util_log.h" +#include "_util_efl.h" +#include "_sound.h" + +#define STRBUF_SIZE 128 +#define PATHBUF_SIZE 256 +#define EMUL_STR "Emulator" + +enum { + IDLELOCK_OFF = 0x0, + IDLELOCK_ON, + IDLELOCK_MAX, +}; + +/* _check_status() return value */ +enum{ + LOCK_AND_NOT_MEDIA = -0x1, + UNLOCK_STATUS, + LOCK_AND_MEIDA, +}; + +#ifndef VCONFKEY_SETAPPL_ACCESSIBILITY_TURN_OFF_ALL_SOUNDS +#define VCONFKEY_SETAPPL_ACCESSIBILITY_TURN_OFF_ALL_SOUNDS VCONFKEY_SETAPPL_PREFIX"/accessibility/turn_off_all_sounds" +#endif + +int _close_volume(void *data) +{ + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + retvm_if(ad->flag_deleting == EINA_TRUE, -1, "Closing volume\n"); + + _D("start closing volume\n"); + ad->flag_deleting = EINA_TRUE; + + _ungrab_key_new(ad); + _grab_key_new(ad, ad->input_win, SHARED_GRAB); + + DEL_TIMER(ad->sutimer) + DEL_TIMER(ad->lutimer) + DEL_TIMER(ad->sdtimer) + DEL_TIMER(ad->ldtimer) + DEL_TIMER(ad->ptimer) + + if (evas_object_visible_get(ad->win) == EINA_TRUE){ + _D("hide window\n"); + evas_object_hide(ad->win); + } + appcore_flush_memory(); + + ad->flag_deleting = EINA_FALSE; + ad->flag_launching = EINA_FALSE; + _D("end closing volume\n"); + return 0; +} + +Eina_Bool popup_timer_cb(void *data) +{ + _D("%s\n", __func__); + _close_volume(data); + return ECORE_CALLBACK_CANCEL; +} + +Eina_Bool _lu_timer_cb(void *data) +{ + int val = -1; + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n"); + if (ad->win == NULL || evas_object_visible_get(ad->win) == EINA_FALSE){ + _D("win is NULL or hide state, so long press pass\n"); + return ECORE_CALLBACK_CANCEL; + } + DEL_TIMER(ad->stimer) + + _get_sound_level(ad->type, &val); + _set_sound_level(ad->type, val +1 > ad->step ? ad->step : val + 1); + _D("down, type(%d), step(%d) val[%d]\n", ad->type, ad->step, val+1); + return ECORE_CALLBACK_RENEW; +} + +Eina_Bool _su_timer_cb(void *data) +{ + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n"); + ADD_TIMER(ad->lutimer, 0.0, _lu_timer_cb, ad) + return ECORE_CALLBACK_CANCEL; +} + +Eina_Bool _ld_timer_cb(void *data) +{ + int val = 0; + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n"); + if (ad->win == NULL || evas_object_visible_get(ad->win) == EINA_FALSE){ + _D("win is NULL or hide state, so long press pass\n"); + return ECORE_CALLBACK_CANCEL; + } + DEL_TIMER(ad->stimer) + + _get_sound_level(ad->type, &val); + _set_sound_level(ad->type, val -1 <= 0 ? 0 : val - 1); + _D("down, type(%d), step(%d) val[%d]\n", ad->type, ad->step, val+1); + return ECORE_CALLBACK_RENEW; +} + +Eina_Bool _sd_timer_cb(void *data) +{ + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n"); + _D("add long down timer\n"); + ADD_TIMER(ad->ldtimer, 0.0, _ld_timer_cb, ad) + return ECORE_CALLBACK_CANCEL; +} + +Eina_Bool _volume_show(void *data) +{ + _D("%s\n", __func__); + int status = -1; + int type = MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY; + int lock = IDLELOCK_ON; + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, EINA_FALSE, "Invalid argument: appdata is NULL\n"); + + status = _check_status(&lock, &type); + if(status != LOCK_AND_NOT_MEDIA && ad->win) + { + _init_mm_sound(ad); + /* ungrab SHARED_GRAB */ + _ungrab_key_new(ad); + + if(status == UNLOCK_STATUS) + { + _grab_key_new(ad, -1, TOP_POSITION_GRAB); + + _rotate_func(ad); + elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_HIDE); + evas_object_show(ad->win); + if(syspopup_has_popup(ad->volume_bundle)) + syspopup_reset(ad->volume_bundle); + } + else if(status == LOCK_AND_MEIDA) + { + _grab_key_new(ad, ad->input_win, EXCLUSIVE_GRAB); + } + ad->flag_launching = EINA_TRUE; + _mm_func(ad); + return EINA_TRUE; + } + else if(!ad->win) + { + /* recreate window */ + } + + _D("status == LOCK_AND_NOT_MEDIA\n"); + return EINA_FALSE; +} + +static Eina_Bool _key_press_cb(void *data, int type, void *event) +{ + _D("%s\n", __func__); + int val=0, snd=0, vib=0; + Ecore_Event_Key *ev = event; + int status = -1; + int mtype = MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY; + int lock = IDLELOCK_ON; + int is_turn_off_all_sounds = 0; + int ret = -1; + struct appdata *ad = (struct appdata *)data; + + status = _check_status(&lock, &mtype); + + retvm_if(ev == NULL, ECORE_CALLBACK_CANCEL, "Invalid arguemnt: event is NULL\n"); + retvm_if(ad == NULL, ECORE_CALLBACK_CANCEL, "Invalid argument: appdata is NULL\n"); + retvm_if(ad->win == NULL, ECORE_CALLBACK_CANCEL, "Invalid argument: window is NULL\n"); + + ret = vconf_get_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TURN_OFF_ALL_SOUNDS, &is_turn_off_all_sounds); + if(ret == 0) + { + retvm_if(is_turn_off_all_sounds == EINA_TRUE, ECORE_CALLBACK_CANCEL, + "VCONFKEY_SETAPPL_ACCESSIBILITY_TURN_OFF_ALL_SOUNDS is set, all sound is mute\n"); + } + + if(!ad->flag_launching) + { + if(_volume_show(data) != EINA_TRUE) + { + return ECORE_CALLBACK_CANCEL; + } + } + + if(ad->flag_touching == EINA_TRUE) { + return ECORE_CALLBACK_CANCEL; + } + + ad->flag_pressing = EINA_TRUE; + + DEL_TIMER(ad->ptimer) + vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &snd); + vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vib); + + /* If sound is set off, only RINGTONE, MEDIA types are able to change. */ + if(!snd && ad->type != VOLUME_TYPE_MEDIA && ad->type != VOLUME_TYPE_RINGTONE){ + if(vib)_play_vib(ad->sh); + return ECORE_CALLBACK_CANCEL; + } + + if (!strcmp(ev->keyname, KEY_VOLUMEUP)) { + _get_sound_level(ad->type, &val); + if (val == ad->step) { + _set_sound_level(ad->type, ad->step); + if(snd)_play_sound(ad->type, ad->sh); + return ECORE_CALLBACK_CANCEL; + } + _set_sound_level(ad->type, val + 1); + if(snd)_play_sound(ad->type, ad->sh); + DEL_TIMER(ad->sutimer) + ADD_TIMER(ad->sutimer, 0.5, _su_timer_cb, ad) + + _D("set volume %d -> [%d]\n", val, val+1); + + } else if (!strcmp(ev->keyname, KEY_VOLUMEDOWN)) { + _get_sound_level(ad->type, &val); + if (val == 0) { + if(vib)_play_vib(ad->sh); + return ECORE_CALLBACK_CANCEL; + } + _set_sound_level(ad->type, val - 1); + if(snd)_play_sound(ad->type, ad->sh); + DEL_TIMER(ad->sdtimer) + ADD_TIMER(ad->sdtimer, 0.5, _sd_timer_cb, ad) + + _D("type (%d) set volume %d -> [%d]\n", ad->type, val, val-1); + + } + return ECORE_CALLBACK_CANCEL; +} + +static Eina_Bool _key_release_cb(void *data, int type, void *event) +{ + Ecore_Event_Key *ev = event; + struct appdata *ad = (struct appdata *)data; + + retvm_if(ev == NULL, ECORE_CALLBACK_CANCEL, "Invalid arguemnt: event is NULL\n"); + retvm_if(ad == NULL, ECORE_CALLBACK_CANCEL, "Invalid argument:appdata is NULL\n"); + retvm_if(ad->win == NULL, ECORE_CALLBACK_CANCEL, "Invalid argument: window is NULL\n"); + + if (ad->flag_touching == EINA_TRUE) { + return ECORE_CALLBACK_CANCEL; + } + + if (!strcmp(ev->keyname, KEY_VOLUMEUP)) { + _D("up key released and del timer\n"); + DEL_TIMER(ad->sutimer) + DEL_TIMER(ad->lutimer) + DEL_TIMER(ad->luwarmtimer) + } else if (!strcmp(ev->keyname, KEY_VOLUMEDOWN)) { + _D("down key released and del timer\n"); + DEL_TIMER(ad->sdtimer) + DEL_TIMER(ad->ldtimer) + DEL_TIMER(ad->ldwarmtimer) + } + + ad->flag_pressing = EINA_FALSE; + + DEL_TIMER(ad->ptimer) + + ADD_TIMER(ad->ptimer, 3.0, popup_timer_cb, ad) + + return ECORE_CALLBACK_CANCEL; +} + +int _grab_key_new(struct appdata *ad, Ecore_X_Window _xwin, int grab_mode) +{ + _D("%s\n", __func__); + Ecore_X_Display *disp = NULL; + Ecore_X_Window xwin = 0; + int ret = -1; + + /* ALREADY GRAB check */ + switch(grab_mode) + { + case SHARED_GRAB : if(ad->flag_shared_grabed)return -1; + break; + case EXCLUSIVE_GRAB : if(ad->flag_exclusive_grabed)return -1; + break; + case TOP_POSITION_GRAB : if(ad->flag_top_positioni_grabed)return -1; + break; + } + + disp = ecore_x_display_get(); + retvm_if(disp == NULL, -1, "Failed to get display\n"); + + if(_xwin == -1) + { + /* TOP_POSITION_GRAB */ + xwin = elm_win_xwindow_get(ad->win); + retvm_if(xwin == 0, -1, "elm_win_xwindow_get() failed\n"); + } + else + xwin = _xwin; + + ret = utilx_grab_key(disp, xwin, KEY_VOLUMEDOWN, grab_mode); + retvm_if(ret < 0, -1, "Failed to grab key down\n"); + retvm_if(ret == 1, -1, "Already grab\n"); + + ret = utilx_grab_key(disp, xwin, KEY_VOLUMEUP, grab_mode); + retvm_if(ret < 0, -1, "Failed to grab key up\n"); + retvm_if(ret == 1, -1, "Already grab\n"); + + switch(grab_mode) + { + case SHARED_GRAB : + ad->flag_shared_grabed = EINA_TRUE; + break; + case EXCLUSIVE_GRAB : + ad->flag_exclusive_grabed = EINA_TRUE; + break; + case TOP_POSITION_GRAB : + ad->flag_top_positioni_grabed = EINA_TRUE; + break; + } + + return 0; +} + +int _ungrab_key_new(struct appdata *ad) +{ + Ecore_X_Window xwin = 0; + Ecore_X_Display *disp = NULL; + + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + retvm_if(ad->input_win == 0, -1, "Invalid argument: ad->win is NULL\n"); + + xwin = elm_win_xwindow_get(ad->win); + retvm_if(xwin == 0, -1, "Failed to get xwindow\n"); + + disp = ecore_x_display_get(); + retvm_if(disp == NULL, -1, "Failed to get display\n"); + + utilx_ungrab_key(disp, ad->input_win, KEY_VOLUMEUP); + utilx_ungrab_key(disp, ad->input_win, KEY_VOLUMEDOWN); + _D("key ungrabed\n"); + + if(ad->flag_exclusive_grabed) + ad->flag_exclusive_grabed = EINA_FALSE; + else if(ad->flag_top_positioni_grabed) + ad->flag_top_positioni_grabed = EINA_FALSE; + else if(ad->flag_shared_grabed) + ad->flag_shared_grabed = EINA_FALSE; + + return 0; +} + +int _get_vconf_idlelock(void) +{ + int ret = -1; + int lock = IDLELOCK_OFF; + + ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &lock); + retvm_if(ret < 0, -1, "Failed to get vconf %s\n", + VCONFKEY_IDLE_LOCK_STATE); + _D("idlelock vconf:%d\n", lock); + + return lock == VCONFKEY_IDLE_LOCK ? IDLELOCK_ON : IDLELOCK_OFF; +} + +volume_type_t _get_volume_type(void) +{ + int ret = MM_ERROR_NONE; + volume_type_t type = -1; + + ret = mm_sound_volume_get_current_playing_type(&type); + switch (ret) { + case MM_ERROR_NONE: + break; + case MM_ERROR_SOUND_VOLUME_NO_INSTANCE: + case MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY: + type = VOLUME_TYPE_RINGTONE; + break; + default: + _D("Failed to get sound type(errno:%x)\n", ret); + return -1; + } + if(type == VOLUME_TYPE_NOTIFICATION || type == VOLUME_TYPE_SYSTEM) + type = VOLUME_TYPE_RINGTONE; + return type; +} + +int _check_status(int *lock, int *type) +{ + *lock = _get_vconf_idlelock(); + *type = _get_volume_type(); + _D("lock(%d) type(%d)\n", *lock, *type); + + if (*type == MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY + || *type == MM_ERROR_SOUND_INTERNAL) { + _D("Do not show by type\n"); + return -1; + } + + if (*lock == IDLELOCK_ON && *type != VOLUME_TYPE_MEDIA) { + _D("lock is set, not in media\n"); + return -1; + } + + if (*lock == IDLELOCK_ON && *type == VOLUME_TYPE_MEDIA) { + _D("lock is set, in media\n"); + return 1; + } + _D("unlock status, normal case\n"); + return 0; +} + +void _starter_user_volume_key_vconf_changed_cb(keynode_t *key, void *data){ + _D("%s\n", __func__); + int ret = EINA_FALSE; + vconf_get_int(VCONFKEY_STARTER_USE_VOLUME_KEY, &ret); + if(ret != 0) + { + _D("any other App grab volume hard key\n", __func__); + _close_volume(data); + vconf_set_int(VCONFKEY_STARTER_USE_VOLUME_KEY, 0); + } +} + +void _idle_lock_state_vconf_chnaged_cb(keynode_t *key, void *data){ + _close_volume(data); +} + +int _app_create(struct appdata *ad) +{ + _D("%s\n", __func__); + int ret = 0; + _init_svi(ad); + + /* create input_window */ + ad->input_win = _add_input_window(); + retvm_if(ad->input_win == 0, -1, "Failed to create input window\n"); + + /* vconf changed callback */ + vconf_notify_key_changed(VCONFKEY_STARTER_USE_VOLUME_KEY, + _starter_user_volume_key_vconf_changed_cb, ad); + + /* Lock screen status vconf changed callback */ + vconf_notify_key_changed(VCONFKEY_IDLE_LOCK_STATE, + _idle_lock_state_vconf_chnaged_cb, ad); + + /* grab volume shared grab */ + ret = _grab_key_new(ad, ad->input_win, SHARED_GRAB); + + /* ecore event handler add once */ + if(ad->event_volume_down == NULL) + ad->event_volume_down = ecore_event_handler_add(ECORE_EVENT_KEY_DOWN, _key_press_cb, ad); + if(ad->event_volume_up == NULL) + ad->event_volume_up = ecore_event_handler_add(ECORE_EVENT_KEY_UP, _key_release_cb, ad); + + _init_mm_sound(ad); + + return ret; +} + +int __utilx_ss_get_window_property(Display *dpy, Window win, Atom atom, + Atom type, unsigned int *val, + unsigned int len) +{ + unsigned char *prop_ret = NULL; + Atom type_ret = -1; + unsigned long bytes_after = 0; + unsigned long num_ret = -1; + int format_ret = -1; + unsigned int i = 0; + int num = 0; + + prop_ret = NULL; + if (XGetWindowProperty(dpy, win, atom, 0, 0x7fffffff, False, + type, &type_ret, &format_ret, &num_ret, + &bytes_after, &prop_ret) != Success) + return -1; + + if (type_ret != type || format_ret != 32) + num = -1; + else if (num_ret == 0 || !prop_ret) + num = 0; + else { + if (num_ret < len) + len = num_ret; + for (i = 0; i < len; i++) { + val[i] = ((unsigned long *)prop_ret)[i]; + } + num = len; + } + + if (prop_ret) + XFree(prop_ret); + + return num; +} + +int _x_rotation_get(Display *dpy, void *data) +{ + Window active_win = 0; + Window root_win = 0; + int rotation = -1; + int ret = -1; + + Atom atom_active_win; + Atom atom_win_rotate_angle; + + retvm_if(dpy == NULL, -1, "dpy is NULL\n"); + root_win = XDefaultRootWindow(dpy); + + atom_active_win = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); + ret = __utilx_ss_get_window_property(dpy, root_win, atom_active_win, + XA_WINDOW, + (unsigned int *)&active_win, 1); + + if(ret < 0) + return ret; + + atom_win_rotate_angle = XInternAtom(dpy, "_E_ILLUME_ROTATE_ROOT_ANGLE", False); + ret = __utilx_ss_get_window_property(dpy, root_win, + atom_win_rotate_angle, XA_CARDINAL, + (unsigned int *)&rotation, 1); + + if(ret != -1) + return rotation; + + return -1; +} + +int _volume_popup_resize(void *data, int angle) +{ + int rotation = 0; + int offx=0, offy=0; + Evas_Coord minw = -1, minh = -1; + Evas_Coord w = 0, h = 0; + struct appdata *ad = (struct appdata *)data; + retvm_if(ad->win == NULL, -1, "Invalid argument: window is NULL\n"); + retvm_if(ad->block_events == NULL, -1, "Invalid argument: notify is NULL\n"); + + if(angle == -1) + rotation = ad->angle; + else + rotation = angle; + + system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_WIDTH, &w); + system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_HEIGHT, &h); + + switch(rotation){ + case 90 : + case 270 : + evas_object_resize(ad->block_events, h, w); + edje_object_size_min_get(ad->block_events, &minw, &minh); + edje_object_size_min_restricted_calc(ad->block_events, &minw, &minh, minw, minh); + offx = (h - minw) / 2; + offy = (w - minh) / 5; + break; + case 0 : + case 180 : + default : + evas_object_resize(ad->block_events, w, h); + edje_object_size_min_get(ad->block_events, &minw, &minh); + edje_object_size_min_restricted_calc(ad->block_events, &minw, &minh, minw, minh); + offx = (w - minw) / 2; + offy = (h - minh) / 5; + break; + } + _D("w(%d) h(%d) offx(%d) offy(%d)\n", w, h, offx, offy); + evas_object_move(ad->ly, offx, offy); + return 1; +} + +int _efl_rotate(Display *dpy, void *data) +{ + int rotation = -1; + struct appdata *ad = (struct appdata *)data; + + rotation = _x_rotation_get(dpy, ad); + + if(rotation == -1) + rotation = 0; + + if(rotation >= 0){ + elm_win_rotation_set(ad->win, rotation); + ad->angle = rotation; + return _volume_popup_resize(data, rotation); + } + + return 0; +} + +int _rotate_func(void *data) +{ + _D("%s\n", __func__); + struct appdata *ad = (struct appdata *)data; + Display *d = NULL; + int ret = 0; + + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + + d = XOpenDisplay(NULL); + ret = _efl_rotate(d, ad); + XCloseDisplay(d); + + return ret; +} + +int myterm(bundle *b, void *data) +{ + return 0; +} + +int mytimeout(bundle *b, void *data) +{ + return 0; +} + +syspopup_handler handler = { + .def_term_fn = myterm, + .def_timeout_fn = mytimeout +}; + +void _set_level(int type) +{ + int val = 0; + _get_sound_level(type, &val); + _set_sound_level(type, val); + _D("type(%d) val(%d)\n", type, val); +} + +static void _block_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source) +{ + _close_volume(data); +} + +Eina_Bool _slider_timer_cb(void *data) +{ + double val = 0; + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, 0, "Invalid argument: appdata is NULL\n"); + if (ad->sl) { + val = elm_slider_value_get(ad->sl); + val += 0.5; + if ((int)val != 0) { + _set_sound_level(ad->type, (int)val); + } + if (val <= 0.5) { + elm_slider_value_set(ad->sl, 0); + _set_sound_level(ad->type, 0); + } + return ECORE_CALLBACK_RENEW; + } + return ECORE_CALLBACK_CANCEL; +} + +static void _slider_start_cb(void *data, Evas_Object *obj, void *event_info) +{ + _D("%s\n", __func__); + int snd= 0 ; + struct appdata *ad = (struct appdata *)data; + retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + + if (ad->flag_pressing == EINA_TRUE) { + return; + } + ad->flag_touching = EINA_TRUE; + + DEL_TIMER(ad->ptimer) + + vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &snd); + if(!snd){ + vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, EINA_TRUE); + _set_icon(data, -1); + } + + if (ad->lutimer || ad->ldtimer) { + _D("return when long press is working\n"); + return; + } + + ADD_TIMER(ad->stimer, 0.2, _slider_timer_cb, data) +} + +static void _slider_changed_cb(void *data, Evas_Object *obj, void *event_info) +{ + struct appdata *ad = (struct appdata *)data; + retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + + if (ad->flag_pressing == EINA_TRUE) { + return; + } + if (ad->lutimer || ad->ldtimer) { + _D("return when long press is working\n"); + return; + } +} +static void _slider_stop_cb(void *data, Evas_Object *obj, void *event_info) +{ + _D("func\n"); + double val = 0; + struct appdata *ad = (struct appdata *)data; + retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + + if (ad->flag_pressing == EINA_TRUE) { + return; + } + if (ad->lutimer || ad->ldtimer) { + _D("return when long press is working\n"); + return; + } + DEL_TIMER(ad->stimer) + if (ad->sl) { + val = elm_slider_value_get(ad->sl); + val += 0.5; + _set_sound_level(ad->type, (int)val); + } + _play_sound(ad->type, ad->sh); + ad->flag_touching = EINA_FALSE; + ADD_TIMER(ad->ptimer, 3.0, popup_timer_cb, ad) +} + +Eina_Bool _lu_warmup_timer_cb(void *data) +{ + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, ECORE_CALLBACK_CANCEL, "Invalid argument: appdata is NULL\n"); + ADD_TIMER(ad->lutimer, 0.0, _lu_timer_cb, ad) + return ECORE_CALLBACK_CANCEL; +} + +Eina_Bool _ld_warmup_timer_cb(void *data) +{ + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, ECORE_CALLBACK_CANCEL, "Invalid argument: appdata is NULL\n"); + ADD_TIMER(ad->ldtimer, 0.0, _ld_timer_cb, ad) + return ECORE_CALLBACK_CANCEL; +} + +void _init_press_timers(void *data) +{ + struct appdata *ad = (struct appdata *)data; + retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + DEL_TIMER(ad->sdtimer) + DEL_TIMER(ad->ldtimer) + DEL_TIMER(ad->ldwarmtimer) + DEL_TIMER(ad->sutimer) + DEL_TIMER(ad->lutimer) + DEL_TIMER(ad->luwarmtimer) +} + +int _handle_bundle(bundle *b, struct appdata *ad) +{ + const char *bval = NULL; + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + + bval = bundle_get_val(b, "LONG_PRESS"); + if (bval) { + _D("val(%s)\n", bval); + + if (!strncmp(bval, "VOLUME_UP", strlen("LONG_PRESS"))) { + _D("volume up long press\n"); + DEL_TIMER(ad->ptimer) + ADD_TIMER(ad->luwarmtimer, 0.5, _lu_warmup_timer_cb, ad); + } else if (!strncmp(bval, "VOLUME_DOWN", strlen("LONG_PRESS"))) { + _D("volume down long press\n"); + DEL_TIMER(ad->ptimer) + ADD_TIMER(ad->ldwarmtimer, 0.5, _ld_warmup_timer_cb, ad); + } else { + ADD_TIMER(ad->ptimer, 3.0, popup_timer_cb, ad) + } + } else { + ADD_TIMER(ad->ptimer, 3.0, popup_timer_cb, ad) + _init_press_timers(ad); + } + return 0; +} + +static void _button_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info) +{ + _D("%s\n", __func__); + struct appdata *ad = (struct appdata *)data; + retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + char buf[PATHBUF_SIZE] = {0, }; + snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS_PRESSED); + elm_image_file_set(obj, buf, NULL); +} + +static void _button_cb(void *data, Evas_Object *obj, void *event_info) +{ + _D("%s\n", __func__); + struct appdata *ad = (struct appdata *)data; + retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + char buf[PATHBUF_SIZE] = {0, }; + snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS); + elm_image_file_set(obj, buf, NULL); + if(evas_object_visible_get(ad->win)){ + DEL_TIMER(ad->ptimer) + if(ecore_x_e_illume_quickpanel_state_get( + ecore_x_e_illume_zone_get(elm_win_xwindow_get(ad->win))) != ECORE_X_ILLUME_QUICKPANEL_STATE_OFF) + { + _D("Quickpanel is hide\n"); + ecore_x_e_illume_quickpanel_state_send( + ecore_x_e_illume_zone_get(elm_win_xwindow_get(ad->win)), ECORE_X_ILLUME_QUICKPANEL_STATE_OFF); + } + service_h svc; + service_create(&svc); + service_set_package(svc, "setting-profile-efl"); + service_send_launch_request(svc, NULL, NULL); + _app_pause(ad); + + service_destroy(svc); + } +} + +static int _check_emul(void) +{ + int is_emul = 0; + char *info = NULL; + + if (system_info_get_value_string(SYSTEM_INFO_KEY_MODEL, &info) == 0) { + if (info == NULL) return 0; + if (!strncmp(EMUL_STR, info, strlen(info))) { + is_emul = 1; + } + } + + if (info != NULL) free(info); + + return is_emul; +} + +int _app_reset(bundle *b, void *data) +{ + _D("%s\n", __func__); + int ret = -1, status = -1, val = 0; + int type = MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY; + int lock = IDLELOCK_ON; + Evas_Object *win, *sl, *ic, *ic_settings; + /* volume-app layout */ + Elm_Theme *th; + Evas_Object *outer, *inner, *block; + char buf[PATHBUF_SIZE] = {0, }; + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + + ad->noti_seen = EINA_FALSE; + ad->flag_launching = EINA_FALSE; + ad->flag_pressing = EINA_FALSE; + ad->flag_touching = EINA_FALSE; + + status = _check_status(&lock, &type); + ad->type = type; + mm_sound_volume_get_value(type, (unsigned int*)(&val)); + + if(ad->win == NULL) { + win = _add_window(PACKAGE); + retvm_if(win == NULL, -1, "Failed add window\n"); + _D("create window\n"); + ad->win = win; + } + else { + _E("window already exist\n"); + return -1; + } + + th = elm_theme_new(); + elm_theme_ref_set(th, NULL); + elm_theme_extension_add(th, EDJ_APP); + + ad->flag_emul = _check_emul(); + + if(!ad->flag_emul) + { + block = _add_layout(win, EDJ_APP, GRP_VOLUME_BLOCKEVENTS); + retvm_if(block == NULL, -1, "Failed to add block layout\n"); + + edje_object_signal_callback_add(elm_layout_edje_get(block), "clicked", "*", _block_clicked_cb, ad); + + outer = _add_layout(win, EDJ_APP, GRP_VOLUME_LAYOUT); + retvm_if(outer== NULL, -1, "Failed to add outer layout\n"); + + inner = _add_layout(win, EDJ_APP, "popup_volumebar"); + retvm_if(inner == NULL, -1, "Failed to add inner layout\n"); + + ad->block_events = block; + ad->ly = outer; + + elm_object_part_content_set(outer, "elm.swallow.content", inner); + + sl = _add_slider(win, 0, ad->step, val); + elm_object_theme_set(sl, th); + evas_object_smart_callback_add(sl, "slider,drag,start", _slider_start_cb, ad); + evas_object_smart_callback_add(sl, "changed", _slider_changed_cb, ad); + evas_object_smart_callback_add(sl, "slider,drag,stop", _slider_stop_cb, ad); + + ic_settings = elm_icon_add(win); + evas_object_size_hint_aspect_set(ic_settings, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); + elm_image_resizable_set(ic_settings, EINA_FALSE, EINA_FALSE); + snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS); + _D("%s\n", buf); + elm_image_file_set(ic_settings, buf, NULL); + elm_object_part_content_set(inner, "elm.swallow.icon", ic_settings); + evas_object_event_callback_add(ic_settings, EVAS_CALLBACK_MOUSE_DOWN, _button_mouse_down_cb, ad); + evas_object_smart_callback_add(ic_settings, "clicked", _button_cb, ad); + evas_object_show(ic_settings); + ad->ic_settings = ic_settings; + + ad->sl = sl; + elm_object_part_content_set(inner, "elm.swallow.content", sl); + + ic = elm_icon_add(win); + evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); + elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE); + elm_object_part_content_set(ad->sl, "icon", ic); + ad->ic = ic; + _set_icon(ad, val); + } + else + { + block = _add_layout(win, EDJ_APP, GRP_VOLUME_BLOCKEVENTS); + retvm_if(block == NULL, -1, "Failed to add block layout\n"); + + edje_object_signal_callback_add(elm_layout_edje_get(block), "clicked", "*", _block_clicked_cb, ad); + outer = _add_layout(win, EDJ_APP, GRP_VOLUME_LAYOUT); + retvm_if(outer == NULL, -1, "Failed to add outer layout\n"); + + inner = _add_layout(win, EDJ_APP, GRP_VOLUME_CONTENT); + retvm_if(inner == NULL, -1, "Failed to add inner layout\n"); + + ad->block_events = block; + ad->ly = outer; + + elm_object_part_content_set(outer, "elm.swallow.content", inner); + + sl = _add_slider(win, 0, ad->step, val); + evas_object_smart_callback_add(sl, "slider,drag,start", _slider_start_cb, ad); + evas_object_smart_callback_add(sl, "changed", _slider_changed_cb, ad); + evas_object_smart_callback_add(sl, "slider,drag,stop", _slider_stop_cb, ad); + + ad->sl = sl; + elm_object_part_content_set(inner, "elm.swallow.content", sl); + evas_object_show(sl); + + ic = elm_icon_add(win); + evas_object_size_hint_aspect_set(ic, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1); + elm_image_resizable_set(ic, EINA_FALSE, EINA_FALSE); + elm_object_part_content_set(ad->sl, "icon", ic); + ad->ic = ic; + _set_icon(ad, val); + } + + + ret = syspopup_create(b, &handler, ad->win, ad); + retvm_if(ret < 0, -1, "Failed to create syspopup\n"); + ad->volume_bundle = bundle_dup(b); + + return 0; +} + +int _app_pause(struct appdata *ad) +{ + _D("%s\n", __func__); + _close_volume(ad); + return 0; +} diff --git a/src/_logic.h b/src/_logic.h new file mode 100755 index 0000000..b55a64e --- /dev/null +++ b/src/_logic.h @@ -0,0 +1,39 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __VOLUME_LOGIC_H__ +#define __VOLUME_LOGIC_H__ + +#include "volume.h" +#include + +int _get_vconf_idlelock(void); +volume_type_t _get_volume_type(void); +int _close_volume(void *data); +int _app_create(struct appdata *ad); +int _app_pause(struct appdata *ad); +int _rotate_func(void *data); +int _app_reset(bundle *b, void *data); +Eina_Bool popup_timer_cb(void *data); +void _init_press_timers(void *data); +int _check_status(int *lock, int *type); +int _ungrab_key_new(struct appdata *ad); +int _grab_key_new(struct appdata *ad, Ecore_X_Window _xwin, int grab_mode); + +#endif +/* __VOLUME_LOGIC_H__ */ diff --git a/src/_sound.c b/src/_sound.c new file mode 100755 index 0000000..4bb43bc --- /dev/null +++ b/src/_sound.c @@ -0,0 +1,299 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include +#include +#include +#include +#include + +#include "volume.h" +#include "_util_log.h" +#include "_logic.h" + +#define STRBUF_SIZE 64 +#define PATHBUF_SIZE 256 + +int _set_sound_level(volume_type_t type, int val); +int _get_sound_level(volume_type_t type, int * val); + +void _play_vib(int handle) +{ + svi_play_vib(handle, SVI_VIB_OPERATION_VIBRATION); +} + +void _play_sound(int type, int handle) +{ + feedback_initialize(); + + if (type == VOLUME_TYPE_MEDIA) { + + } else { + feedback_play(FEEDBACK_PATTERN_VOLUME_KEY); + } + feedback_deinitialize(); +} + +int _init_svi(void *data) +{ + int ret = -1, handle = -1; + + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, -1, "Invaild argument: appdata is NULL\n"); + + ret = svi_init(&handle); + if (ret != SVI_SUCCESS) { + _E("Failed to init svi\n"); + svi_fini(handle); + return -1; + } + ad->sh = handle; + return 0; +} + +int _set_slider_value(void *data, int val) +{ + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + + if (ad->flag_touching == EINA_TRUE) { + return 0; + } + if (ad->sl) { + elm_slider_min_max_set(ad->sl, 0, ad->step); + elm_slider_value_set(ad->sl, val); + } + + return 0; +} + +int _set_icon(void *data, int val) +{ + int snd=0, vib=0; + char *img = NULL; + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + + system_audio_route_device_t device = 0; + mm_sound_route_get_playing_device(&device); + + vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &snd); + vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vib); + + switch(ad->type){ + case VOLUME_TYPE_RINGTONE: + img = IMG_VOLUME_ICON_CALL; + break; + case VOLUME_TYPE_MEDIA: + if(device == SYSTEM_AUDIO_ROUTE_PLAYBACK_DEVICE_EARPHONE) + img = IMG_VOLUME_ICON_HEADPHONE; + else + img = IMG_VOLUME_ICON_MEDIA; + break; + default: + img = IMG_VOLUME_ICON; + break; + } + if (ad->ic ) { + elm_image_file_set(ad->ic, EDJ_APP, img); + } + return 1; +} + +void _set_device_warning(void *data, int val, int device) +{ + struct appdata *ad = (struct appdata *)data; + retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + + switch (device) { + case SYSTEM_AUDIO_ROUTE_PLAYBACK_DEVICE_EARPHONE: + if (val >= 10 && ad->type == VOLUME_TYPE_MEDIA) { + if(ad->noti_seen == EINA_FALSE){ + ad->noti_seen = EINA_TRUE; + notification_status_message_post(T_(IDS_WARNING_MSG)); + } + } + else { + ad->noti_seen = EINA_FALSE; + } + break; + default: + ad->noti_seen = EINA_FALSE; + break; + } +} + +int _get_title(volume_type_t type, char *label, int size) +{ + char *text = NULL; + + switch (type) { + case VOLUME_TYPE_SYSTEM: + text = S_("IDS_COM_BODY_SYSTEM"); + break; + case VOLUME_TYPE_NOTIFICATION: + text = S_("IDS_COM_HEADER_NOTIFICATION"); + break; + case VOLUME_TYPE_ALARM: + text = S_("IDS_COM_BODY_ALARM"); + break; + case VOLUME_TYPE_RINGTONE: + text = S_("IDS_COM_BODY_RINGTONE"); + break; + case VOLUME_TYPE_MEDIA: + text = T_("IDS_COM_BODY_MEDIA"); + break; + case VOLUME_TYPE_CALL: + text = S_("IDS_COM_BODY_CALL"); + break; + case VOLUME_TYPE_EXT_ANDROID: + /* this enum is different from mm_sound.h and avsys-audio.h */ + text = T_("IDS_COM_BODY_ANDROID"); + break; + case VOLUME_TYPE_EXT_JAVA: + text = T_("IDS_COM_BODY_JAVA"); + break; + default: + text = S_("IDS_COM_BODY_SYSTEM"); + break; + } + snprintf(label, size, "%s", text); + _D("get title(%s)\n", label); + + return 0; +} + +int _get_step(int type) +{ + int ret = -1, step = 0; + ret = mm_sound_volume_get_step(type, &step); + retvm_if(ret < 0, -1, "Failed to get step\n"); + step -= 1; + return step; +} + +void _mm_func(void *data) +{ + _D("%s\n", __func__); + int val = 0; + system_audio_route_device_t device = 0; + struct appdata *ad = (struct appdata *)data; + retm_if(ad == NULL, "Invalid argument: appdata is NULL\n"); + + retm_if(ad->win == NULL, "Failed to get window\n"); + + /* function could be activated when window exists */ + ad->type = _get_volume_type(); + ad->step = _get_step(ad->type); + mm_sound_route_get_playing_device(&device); + mm_sound_volume_get_value(ad->type, (unsigned int*)(&val)); + + /* apply earphone safety concept */ + if(ad->device != device){ + if(device == SYSTEM_AUDIO_ROUTE_PLAYBACK_DEVICE_EARPHONE && val > 9) + val = 9; + _set_sound_level(ad->type, val); + ad->device = device; + } + _set_device_warning(ad, val, device); + _set_slider_value(ad, val); + _set_icon(ad, val); + _D("type(%d) val(%d)\n", ad->type, val); +} + +void _mm_system_cb(void *data) +{ + _mm_func(data); +} + +void _mm_notification_cb(void *data) +{ + _mm_func(data); +} + +void _mm_alarm_cb(void *data) +{ + _mm_func(data); +} + +void _mm_ringtone_cb(void *data) +{ + _mm_func(data); +} + +void _mm_media_cb(void *data) +{ + _mm_func(data); +} + +void _mm_call_cb(void *data) +{ + _mm_func(data); +} + +void _mm_ext_android_cb(void *data) +{ + _mm_func(data); +} + +void _mm_ext_java_cb(void *data) +{ + _mm_func(data); +} + +int _get_volume_type_max(void) +{ + return VOLUME_TYPE_MAX; +} + +int _init_mm_sound(void *data) +{ + struct appdata *ad = (struct appdata *)data; + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + + mm_sound_volume_add_callback(VOLUME_TYPE_SYSTEM, + _mm_system_cb, (void *)ad); + mm_sound_volume_add_callback(VOLUME_TYPE_NOTIFICATION, + _mm_notification_cb, (void *)ad); + mm_sound_volume_add_callback(VOLUME_TYPE_ALARM, + _mm_alarm_cb, (void *)ad); + mm_sound_volume_add_callback(VOLUME_TYPE_RINGTONE, + _mm_ringtone_cb, (void *)ad); + mm_sound_volume_add_callback(VOLUME_TYPE_MEDIA, + _mm_media_cb, (void *)ad); + mm_sound_volume_add_callback(VOLUME_TYPE_CALL, + _mm_call_cb, (void *)ad); + mm_sound_volume_add_callback(VOLUME_TYPE_EXT_ANDROID, + _mm_ext_android_cb, (void *)ad); + mm_sound_volume_add_callback(VOLUME_TYPE_EXT_JAVA, + _mm_ext_java_cb, (void *)ad); + + return 0; +} + +int _get_sound_level(volume_type_t type, int *val) +{ + mm_sound_volume_get_value(type, (unsigned int*)val); + return 0; +} + +int _set_sound_level(volume_type_t type, int val) +{ + mm_sound_volume_set_value(type, val); + return 0; +} diff --git a/src/_sound.h b/src/_sound.h new file mode 100755 index 0000000..9b79b2a --- /dev/null +++ b/src/_sound.h @@ -0,0 +1,37 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __VOLUME_SOUND_H__ +#define __VOLUME_SOUND_H__ + +#include + +int _init_svi(); +int _init_mm_sound(void *data); +int _get_volume_type_max(void); +int _get_title(volume_type_t type, char *label, int size); +int _get_sound_level(volume_type_t type, int *val); +int _get_step(int type); +void _play_vib(int handle); +void _play_sound(int type, int handle); +void _mm_func(void *data); +int _set_icon(void * data, int val); +int _set_sound_level(volume_type_t type, int val); + +#endif +/* __VOLUME_SOUND_H__ */ diff --git a/src/_util_efl.c b/src/_util_efl.c new file mode 100755 index 0000000..42e06aa --- /dev/null +++ b/src/_util_efl.c @@ -0,0 +1,138 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include +#include +#include + +#include "volume.h" +#include "_util_log.h" + +Ecore_X_Window _add_input_window(void) +{ + Ecore_X_Window win = 0; + win = ecore_x_window_input_new(0, 0, 0, 1, 1); + if(win){ + ecore_x_event_mask_unset(win, ECORE_X_EVENT_MASK_NONE); + ecore_x_icccm_title_set(win, "volumekey-input-window"); + ecore_x_netwm_name_set(win, "volumekey-input-window"); + ecore_x_netwm_pid_set(win, getpid()); + return win; + } + else{ + _E("%s() is failed\n", __func__); + return 0; + } +} + +Evas_Object *_add_window(const char *name) +{ + Evas_Object *eo = NULL; + int w = -1, h = -1; + eo = elm_win_add(NULL, name, ELM_WIN_NOTIFICATION); + if (eo) { + elm_win_title_set(eo, name); + elm_win_borderless_set(eo, EINA_TRUE); + elm_win_alpha_set(eo, EINA_TRUE); + system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_WIDTH, &w); + system_info_get_value_int(SYSTEM_INFO_KEY_SCREEN_HEIGHT, &h); + if(w == -1 || h == -1){ + _E("ecore_x_window_seiz_get() is failed\n"); + return NULL; + } + evas_object_resize(eo, w, h); + } + return eo; +} + +Evas_Object *_add_slider(Evas_Object *parent, int min, int max, int val) +{ + Evas_Object *sl = NULL; + sl = elm_slider_add(parent); + retvm_if(sl == NULL, NULL, "Failed to add slider\n"); + elm_slider_horizontal_set(sl, EINA_TRUE); + elm_slider_indicator_show_set(sl, EINA_TRUE); + elm_slider_indicator_format_set(sl, "%.0f"); + evas_object_size_hint_weight_set(sl, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(sl, EVAS_HINT_FILL, 0.5); + elm_slider_min_max_set(sl, min, max); + elm_slider_value_set(sl, val); + return sl; +} + +Evas_Object *_add_layout(Evas_Object *parent, const char *file, + const char *group) +{ + Evas_Object *eo = NULL; + int r = -1; + + retvm_if(parent == NULL, NULL, "Invalid argument: parent is NULL\n"); + retvm_if(file == NULL, NULL, "Invalid argument: file is NULL\n"); + retvm_if(group == NULL, NULL, "Invalid argument: group is NULL\n"); + + eo = elm_layout_add(parent); + retvm_if(eo == NULL, NULL, "Failed to add layout\n"); + + r = elm_layout_file_set(eo, file, group); + if (!r) { + _E("Failed to set file[%s]\n", file); + evas_object_del(eo); + return NULL; + } + + evas_object_size_hint_weight_set(eo, + EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_show(eo); + return eo; +} + +Evas_Object *_add_button(Evas_Object *parent, const char *style, const char *text) +{ + Evas_Object *bt = NULL; + bt = elm_button_add(parent); + retvm_if(bt == NULL, NULL, "Failed to add button\n"); + if (style) elm_object_style_set(bt, style); + elm_object_focus_set(bt, EINA_FALSE); + elm_object_text_set(bt, text); + evas_object_show(bt); + return bt; +} + +Evas_Object *_add_popup(Evas_Object *parent, const char *style) +{ + Evas_Object *pu = NULL; + pu = elm_popup_add(parent); + retvm_if(pu == NULL, NULL, "[Error] Failed to add popup\n"); + evas_object_size_hint_weight_set(pu, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + if (style) elm_object_style_set(pu, style); + evas_object_show(pu); + return pu; +} +Evas_Object *_add_label(Evas_Object *parent, const char *style, const char *text) +{ + Evas_Object *lb = NULL; + lb = elm_label_add(parent); + retvm_if(lb == NULL, NULL, "Failed to add label\n"); + elm_object_style_set(lb, style); + evas_object_size_hint_weight_set(lb, EVAS_HINT_EXPAND, 0.0); + evas_object_size_hint_align_set(lb, EVAS_HINT_FILL, EVAS_HINT_FILL); + elm_label_line_wrap_set(lb, ELM_WRAP_MIXED); + elm_object_text_set(lb, text); + return lb; +} + diff --git a/src/_util_efl.h b/src/_util_efl.h new file mode 100755 index 0000000..c58c2d6 --- /dev/null +++ b/src/_util_efl.h @@ -0,0 +1,32 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __VOLUME_UTIL_EFL_H__ +#define __VOLUME_UTIL_EFL_H__ + +#include + +Ecore_X_Window _add_input_window(void); +Evas_Object *_add_window(const char *name); +Evas_Object *_add_slider(Evas_Object *parent, int min, int max, int val); +Evas_Object *_add_layout(Evas_Object *parent, const char *file, const char *group); +Evas_Object *_add_button(Evas_Object *parent, const char *style, const char *text); +Evas_Object *_add_popup(Evas_Object *parent, const char *style); +Evas_Object *_add_label(Evas_Object *parent, const char *style, const char *text); +#endif +/* __VOLUME_UTIL_EFL_H__ */ diff --git a/src/_util_log.h b/src/_util_log.h new file mode 100755 index 0000000..7e43dd3 --- /dev/null +++ b/src/_util_log.h @@ -0,0 +1,60 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __VOLUME_UTIL_LOG_H__ +#define __VOLUME_UTIL_LOG_H__ + +#include +#include + +#undef LOG_TAG +#define LOG_TAG "VOLUME" +#define _E(fmt, arg...) LOGE("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg) +#define _D(fmt, arg...) LOGD("[%s,%d] "fmt,__FUNCTION__,__LINE__,##arg) + +#define retvm_if(expr, val, fmt, arg...) do { \ + if(expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return (val); \ + } \ +} while (0) + +#define retv_if(expr, val) do { \ + if(expr) { \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return (val); \ + } \ +} while (0) + +#define retm_if(expr, fmt, arg...) do { \ + if(expr) { \ + _E(fmt, ##arg); \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return; \ + } \ +} while (0) + +#define ret_if(expr) do { \ + if(expr) { \ + _E("(%s) -> %s() return", #expr, __FUNCTION__); \ + return; \ + } \ +} while (0) + +#endif /* __VOLUME_UTIL_LOG_H__ */ diff --git a/src/format b/src/format new file mode 100755 index 0000000..6fa025a --- /dev/null +++ b/src/format @@ -0,0 +1,18 @@ + +/* + * Copyright (c) 2011 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. + */ + + diff --git a/src/volume.c b/src/volume.c new file mode 100755 index 0000000..121089a --- /dev/null +++ b/src/volume.c @@ -0,0 +1,122 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include + +#include "volume.h" +#include "_util_log.h" +#include "_util_efl.h" +#include "_logic.h" + +struct text_part { + char *part; + char *msgid; +}; + +static Eina_Bool rotate_cb(void *data, int type, void *event) +{ + struct appdata *ad = data; + Ecore_X_Event_Client_Message *ev = event; + + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + if (!event){ + return ECORE_CALLBACK_RENEW; + } + + if (ev->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_ROOT_ANGLE){ + _rotate_func(data); + } + return ECORE_CALLBACK_RENEW; +} + +static int app_create(void *data) +{ + struct appdata *ad = data; + + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + + if(_app_create(ad)!=0){ + _E("_app_create() if failed\n"); + return -1; + } + + /* add rotation event callback */ + ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE, + rotate_cb, (void *)data); + + return 0; +} + +static int app_terminate(void *data) +{ + struct appdata *ad = data; + + if (ad->win) + evas_object_del(ad->win); + + return 0; +} + +static int app_pause(void *data) +{ + _app_pause(data); + return 0; +} + +static int app_resume(void *data) +{ + return 0; +} + +static int app_reset(bundle *b, void *data) +{ + _D("%s\n", __func__); + struct appdata *ad = data; + retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n"); + + if(_app_reset(b, data) == -1){ + _D("_app_reset() if failed\n"); + return -1; + } + if (ad->win) + elm_win_activate(ad->win); + + return 0; +} + +int main(int argc, char *argv[]) +{ + struct appdata ad; + struct appcore_ops ops = { + .create = app_create, + .terminate = app_terminate, + .pause = app_pause, + .resume = app_resume, + .reset = app_reset, + }; + + /* appcore measure time example */ + printf("from AUL to %s(): %d msec\n", __func__, + appcore_measure_time_from("APP_START_TIME")); + + memset(&ad, 0x0, sizeof(struct appdata)); + ops.data = &ad; + + return appcore_efl_main(PACKAGE, &argc, &argv, &ops); +} + diff --git a/src/volume.h b/src/volume.h new file mode 100755 index 0000000..38d7a4c --- /dev/null +++ b/src/volume.h @@ -0,0 +1,120 @@ +/* + * org.tizen.volume + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.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://floralicense.org/license/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#ifndef __VOLUME_H__ +#define __VOLUME_H__ + +#include +#include +#include +#include +#include +#include +#include + +#if !defined(PACKAGE) +# define PACKAGE "volume" +#endif + +#if !defined(RESDIR) +# define RESDIR "/usr/apps/org.tizen.volume/res" +#endif + +#if !defined(LOCALEDIR) +# define LOCALEDIR RESDIR"/locale" +#endif + +#if !defined(EDJDIR) +# define EDJDIR RESDIR"/edje" +#endif + +#if !defined(PKGNAME) +# define PKGNAME "org.tizen.volume" +#endif + +#define EDJ_APP EDJDIR"/volume_app.edj" +#define GRP_VOLUME_BLOCKEVENTS "block_events" +#define GRP_VOLUME_LAYOUT "volumeLayout" +#define GRP_VOLUME_CONTENT "volumeLayoutContent" +#define GRP_VOLUME_SLIDER_HORIZONTAL "volumeHorizontalSlider" + +#define IMG_VOLUME_PACKAGE_ICON "/usr/share/icons/default/small/org.tizen.volume.png" +#define IMG_VOLUME_ICON "00_volume_icon.png" +#define IMG_VOLUME_ICON_CALL "00_volume_icon_Call.png" +#define IMG_VOLUME_ICON_MUTE "00_volume_icon_Mute.png" +#define IMG_VOLUME_ICON_VIB "00_volume_icon_Vibrat.png" +#define IMG_VOLUME_ICON_HEADPHONE "00_volume_icon_headphone.png" +#define IMG_VOLUME_ICON_MEDIA "00_volume_icon_media.png" +#define IMG_VOLUME_ICON_SETTINGS "00_volume_icon_settings.png" +#define IMG_VOLUME_ICON_SETTINGS_PRESSED "00_volume_icon_settings_pressed.png" + +#define IDS_WARNING_MSG "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME" + +#define S_(str) dgettext("sys_string", str) +#define T_(str) dgettext(PACKAGE, str) + +#define ADD_TIMER(x, time, _timer_cb, data) \ + x = ecore_timer_add(time, _timer_cb, data);\ + +#define DEL_TIMER(x) \ + if (x) {\ + ecore_timer_del(x);\ + x = NULL;\ + } + +struct appdata +{ + Ecore_X_Window input_win; + Evas_Object *win, *block_events, *ly, *sl, *ic, *ic_settings, *warn_lb; + + Ecore_Timer *ptimer; + Ecore_Timer *stimer; /* slider timer */ + Ecore_Timer *sutimer, *sdtimer, *lutimer, *ldtimer; /* long press */ + Ecore_Timer *warntimer; /* warning message timer */ + Ecore_Timer *luwarmtimer, *ldwarmtimer; + volume_type_t type; + system_audio_route_device_t device; + int step; + int angle; + + /* bundle */ + bundle *volume_bundle; + + /* ticker notification handler */ + int noti_id; + bool noti_seen; + + /* add more variables here */ + int sh; /* svi handle */ + int flag_pressing; /* EINA_TRUE : hw key pressing, block slider cb */ + int flag_touching; /* EINA_TRUE : slider indicator pressing, block hw key cb */ + int flag_launching; /* EINA_TRUE : volume is launcing block double lauch*/ + int flag_deleting; /* EINA_TRUE : closing volume, block double close_volume() */ + int flag_media; + int flag_shared_grabed; + int flag_top_positioni_grabed; + int flag_exclusive_grabed; + int flag_emul; /* EINA_TRUE : emulator, EINA_FALSE : target */ + + /* Ecore event handler */ + Ecore_Event_Handler *event_volume_up; + Ecore_Event_Handler *event_volume_down; +}; + +#endif /* __VOLUME_H__ */ +