--- /dev/null
+sung park <sung1103.park at samsung dot com>\r
+seung taek jung <seungtaek.chung at samsung dot com>
\ No newline at end of file
--- /dev/null
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+PROJECT(indicator C)
+
+IF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+ SET(CMAKE_BUILD_TYPE "Release")
+ENDIF("${CMAKE_BUILD_TYPE}" STREQUAL "")
+
+SET(VENDOR "tizen")
+SET(PACKAGE ${PROJECT_NAME})
+SET(PKGNAME "org.${VENDOR}.${PACKAGE}")
+SET(PREFIX ${CMAKE_INSTALL_PREFIX})
+SET(PREFIXRW ${CMAKE_INSTALL_PREFIXRW})
+SET(BINDIR "${PREFIX}/bin")
+SET(RESDIR "${PREFIX}/res")
+SET(DATADIR "${PREFIXRW}/data")
+SET(LOCALEDIR "${RESDIR}/locale")
+SET(ICONDIR "${RESDIR}/icons")
+SET(EDJDIR "${RESDIR}/edje")
+SET(DESKTOPDIR "/usr/share/applications")
+SET(MANIFESTXMLDIR "/usr/share/packages")
+
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/daemon DAEMON_SRCS)
+AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/test TEST_SRCS)
+FILE(GLOB_RECURSE MODULE_SRCS modules/*.c)
+
+SET(SRCS ${DAEMON_SRCS} ${MODULE_SRCS} ${TEST_SRCS})
+
+INCLUDE_DIRECTORIES(
+ ${CMAKE_CURRENT_SOURCE_DIR}/daemon
+ ${CMAKE_CURRENT_SOURCE_DIR}/modules
+ ${CMAKE_CURRENT_SOURCE_DIR}/data/resource
+ ${CMAKE_CURRENT_SOURCE_DIR}/test
+ )
+
+SET(CMAKE_SKIP_BUILD_RPATH TRUE)
+
+INCLUDE(FindPkgConfig)
+pkg_check_modules(pkgs REQUIRED
+ capi-appfw-application
+ capi-appfw-app-manager
+ capi-system-runtime-info
+ dlog
+ ecore
+ ecore-x
+ ecore-evas
+ ecore-file
+ edbus
+ edje
+ elementary
+ evas
+ eina
+ fontconfig
+ heynoti
+ libprivilege-control
+ notification
+ vconf
+ utilX
+ minicontrol-monitor
+ feedback
+)
+
+FOREACH(flag ${pkgs_CFLAGS})
+ SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
+ENDFOREACH(flag)
+#SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -finstrument-functions -g")
+
+#SET(CMAKE_C_COMPILER "/scratchbox/devkits/sbwrap")
+#SET(CMAKE_C_COMPILER_ARG1 "/home/serena/working/indicator.trace /scratchbox/compilers/bin/gcc gcc")
+
+
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -Wall -g -O2")
+
+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("-DEDJDIR=\"${EDJDIR}\"")
+ADD_DEFINITIONS("-DHOME_KEY_EMULATION")
+ADD_DEFINITIONS("-DINDICATOR_SUPPORT_OPACITY_MODE")
+#ADD_DEFINITIONS("-DFILE_DEBUG")
+ADD_DEFINITIONS("-D_DLOG_USED")
+
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed")
+
+ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} -licui18n -licuuc)
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_LDFLAGS})
+
+INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
+INSTALL(DIRECTORY DESTINATION ${DATADIR})
+
+ADD_SUBDIRECTORY(po)
+ADD_SUBDIRECTORY(data)
+
--- /dev/null
+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.
+
--- /dev/null
+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.flora file for Flora License terms and conditions.
+
--- /dev/null
+/*
+ * 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 __DEF_common_H_
+#define __DEF_common_H_
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <errno.h>
+
+#define OK (0)
+#define FAIL (-1)
+
+#ifdef _DLOG_USED
+#define LOG_TAG "indicator"
+#include <dlog.h>
+
+#define ERR(str, args...) LOGE("%s[%d]\t " #str "\n", \
+ __func__, __LINE__, ##args)
+#define DBG(str, args...) LOGD("%s[%d]\t " #str "\n", \
+ __func__, __LINE__, ##args)
+#define INFO(str, args...) LOGI(#str"\n", ##args)
+#elif FILE_DEBUG /*_DLOG_USED*/
+#include "indicator_debug_util.h"
+#define ERR(str, args...) debug_printf("%s[%d]\t " #str "\n", \
+ __func__, __LINE__, ##args)
+#define DBG(str, args...) debug_printf("%s[%d]\t " #str "\n", \
+ __func__, __LINE__, ##args)
+#define INFO(str, args...) debug_printf(#str"\n", ##args)
+#else /*_DLOG_USED*/
+#define ERR(str, args...) fprintf(stderr, "%s[%d]\t " #str "\n",\
+ __func__, __LINE__, ##args)
+#define DBG(str, args...) fprintf(stderr, "%s[%d]\t " #str "\n",\
+ __func__, __LINE__, ##args)
+#define INFO(str, args...) fprintf(stderr, #str"\n", ##args)
+#endif /*_DLOG_USED*/
+
+#define retif(cond, ret, str, args...) do {\
+ if (cond) { \
+ ERR(str, ##args);\
+ return ret;\
+ } \
+} while (0);
+
+#define gotoif(cond, target, str, args...) do {\
+ if (cond) { \
+ DBG(str, ##args);\
+ goto target;\
+ } \
+} while (0);
+
+#endif
--- /dev/null
+/*
+ * 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.
+ */
--- /dev/null
+/*
+ * 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 __INDICATOR_H__
+#define __INDICATOR_H__
+
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include <Eina.h>
+
+#define VCONF_INDICATOR_HOME_PRESSED "memory/private/"PACKAGE_NAME"/home_pressed"
+
+#ifndef VCONFKEY_INDICATOR_STARTED
+#define VCONFKEY_INDICATOR_STARTED "memory/private/"PACKAGE_NAME"/started"
+#endif
+
+#define _FIXED_COUNT 5
+
+
+enum indicator_win_mode{
+ INDICATOR_WIN_PORT = 0,
+ INDICATOR_WIN_LAND,
+ INDICATOR_WIN_MAX
+};
+
+
+enum {
+ INDICATOR_PRIORITY_FIXED_MIN = 0,
+ INDICATOR_PRIORITY_FIXED1 = INDICATOR_PRIORITY_FIXED_MIN,
+ INDICATOR_PRIORITY_FIXED2,
+ INDICATOR_PRIORITY_FIXED3,
+ INDICATOR_PRIORITY_FIXED4,
+ INDICATOR_PRIORITY_FIXED5,
+ INDICATOR_PRIORITY_FIXED6,
+ INDICATOR_PRIORITY_FIXED_MAX = INDICATOR_PRIORITY_FIXED6,
+ INDICATOR_PRIORITY_SYSTEM_MIN,
+
+ INDICATOR_PRIORITY_SYSTEM_6 = INDICATOR_PRIORITY_SYSTEM_MIN,
+ INDICATOR_PRIORITY_SYSTEM_5,
+ INDICATOR_PRIORITY_SYSTEM_4,
+ INDICATOR_PRIORITY_SYSTEM_3,
+ INDICATOR_PRIORITY_SYSTEM_2,
+ INDICATOR_PRIORITY_SYSTEM_1,
+ INDICATOR_PRIORITY_SYSTEM_MAX = INDICATOR_PRIORITY_SYSTEM_1,
+ INDICATOR_PRIORITY_NOTI_MIN,
+ INDICATOR_PRIORITY_NOTI_2 = INDICATOR_PRIORITY_NOTI_MIN,
+ INDICATOR_PRIORITY_NOTI_1,
+ INDICATOR_PRIORITY_NOTI_MAX = INDICATOR_PRIORITY_NOTI_2
+};
+
+enum indicator_icon_type {
+ INDICATOR_IMG_ICON = 0,
+ INDICATOR_TXT_ICON,
+ INDICATOR_TXT_WITH_IMG_ICON
+};
+
+enum indicator_icon_area_type {
+ INDICATOR_ICON_AREA_FIXED = 0,
+ INDICATOR_ICON_AREA_SYSTEM,
+ INDICATOR_ICON_AREA_NOTI
+};
+
+enum indicator_icon_ani {
+ ICON_ANI_NONE = 0,
+ ICON_ANI_BLINK,
+ ICON_ANI_ROTATE,
+ ICON_ANI_METRONOME,
+ ICON_ANI_MAX
+};
+
+typedef struct _Text_Icon_Info {
+ char *data;
+ Evas_Object *obj;
+ int width;
+} Text_Icon_Info;
+
+typedef struct _Img_Icon_Info {
+ const char *data;
+ Evas_Object *obj;
+ int width;
+ int height;
+} Img_Icon_Info;
+
+typedef struct _ind_win_info
+{
+ Evas *evas;
+ Evas_Object* win_main;
+ Evas_Object* layout_main;
+ int w;
+ int h;
+ int angle;
+ int type;
+ Evas_Object *_fixed_box[_FIXED_COUNT];
+ Evas_Object *_non_fixed_box;
+ Evas_Object *_noti_box;
+
+ struct {
+ Eina_Bool trigger;
+ int x;
+ int y;
+ } mouse_event;
+
+#ifdef HOME_KEY_EMULATION
+ Ecore_X_Atom atom_hwkey;
+ Ecore_X_Window win_hwkey;
+#endif /* HOME_KEY_EMULATION */
+ void* data;
+}win_info;
+
+
+typedef struct Indicator_Icon {
+ char *name;
+ enum indicator_icon_type type;
+ enum indicator_icon_area_type area;
+ int priority;
+ Eina_Bool always_top;
+
+
+ int (*init) (void *);
+ int (*fini) (void);
+ int (*hib_enter) (void);
+ int (*hib_leave) (void *);
+ int (*lang_changed) (void *);
+ int (*region_changed) (void *);
+ int (*minictrl_control) (int, const char *, void *);
+
+ char data[1024];
+ void *ad;
+ Eina_Bool obj_exist;
+ Text_Icon_Info txt_obj;
+ Img_Icon_Info img_obj;
+ Eina_Bool wish_to_show;
+ Eina_Bool exist_in_view;
+
+ int win_type;
+ enum indicator_icon_ani ani;
+} Indicator_Icon_Object;
+
+#endif /*__INDICATOR_H__*/
--- /dev/null
+/*
+ * 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 <Ecore_X.h>
+#include <Eina.h>
+#include "common.h"
+#include "indicator_box_util.h"
+#include "indicator_icon_util.h"
+#include "indicator_icon_list.h"
+#include "indicator_ui.h"
+#include "indicator_gui.h"
+#include <vconf.h>
+
+#define DEFAULT_SIZE (CLOCK_WIDTH + (PADDING_WIDTH * 2))
+#define _FIXED_BOX_PART_NAME "elm.swallow.fixed"
+#define _NON_FIXED_BOX_PART_NAME "elm.swallow.nonfixed"
+#define _NOTI_BOX_PART_NAME "elm.swallow.noti"
+
+#define _FIXED_COUNT 5
+#define CORRECTION 10
+
+Eina_List *_view_fixed_list[INDICATOR_WIN_MAX];
+Eina_List *_view_system_list[INDICATOR_WIN_MAX];
+Eina_List *_view_noti_list[INDICATOR_WIN_MAX];
+
+extern int indicator_icon_show_state;
+
+static Evas_Object *indicator_box_add(Evas_Object * parent)
+{
+ Evas_Object *obj;
+
+ retif(parent == NULL, NULL, "Invalid parameter!");
+
+ obj = elm_box_add(parent);
+ evas_object_size_hint_weight_set(obj, EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_fill_set(obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ elm_box_horizontal_set(obj, EINA_TRUE);
+ evas_object_show(obj);
+
+ return obj;
+}
+
+static void _update_window(win_info *win)
+{
+
+ int root_w, root_h;
+ Ecore_X_Window xwin, root;
+
+ retif(win == NULL, NULL, "Invalid parameter!");
+
+ INFO("_update_window");
+
+ xwin = elm_win_xwindow_get(win->win_main);
+ if (!xwin)
+ return;
+ root = ecore_x_window_root_get(xwin);
+ if (!root)
+ return;
+ ecore_x_window_size_get(root, &root_w, &root_h);
+
+ if (win->angle == 0 || win->angle == 180)
+ win->w = root_w;
+ else
+ win->w = root_h;
+
+ switch (win->angle) {
+ case 0:
+ ecore_x_window_shape_input_rectangle_set(xwin, root_w - win->w,
+ 0, win->w, win->h);
+ break;
+ case 90:
+ ecore_x_window_shape_input_rectangle_set(xwin, 0, 0, win->h,
+ win->w);
+ break;
+ case 180:
+ ecore_x_window_shape_input_rectangle_set(xwin, 0, 0, win->w,
+ win->h);
+ break;
+ case 270:
+ ecore_x_window_shape_input_rectangle_set(xwin,
+ 0, root_h - win->w,
+ win->h, win->w);
+ break;
+ default:
+ break;
+ }
+
+}
+
+static void _update_display(win_info *win)
+{
+ Indicator_Icon_Object *icon;
+ Eina_List *l;
+ int i = 0;
+
+ retif(win == NULL, NULL, "Invalid parameter!");
+
+ for (i = 0; i < _FIXED_COUNT; ++i)
+ elm_box_unpack_all(win->_fixed_box[i]);
+
+ elm_box_unpack_all(win->_non_fixed_box);
+ elm_box_unpack_all(win->_noti_box);
+
+ DBG("win->type:%d",win->type);
+
+ EINA_LIST_FOREACH(_view_fixed_list[win->type], l, icon) {
+ if (icon->obj_exist == EINA_FALSE) {
+ if (indicator_util_icon_add(win,icon) == EINA_TRUE)
+ icon->obj_exist = EINA_TRUE;
+ }
+
+ if (icon->obj_exist == EINA_TRUE) {
+ if (icon->area == INDICATOR_ICON_AREA_FIXED
+ && icon->priority < INDICATOR_PRIORITY_FIXED_MAX) {
+
+ Evas_Coord x, y, h, w;
+
+ Evas_Object *img_eo =
+ evas_object_data_get(icon->img_obj.obj,
+ "imgicon");
+ evas_object_size_hint_min_set(img_eo,
+ icon->img_obj.width * elm_config_scale_get(),
+ icon->img_obj.height * elm_config_scale_get());
+
+ indicator_util_handle_animated_gif(icon);
+
+ switch (icon->type) {
+ case INDICATOR_IMG_ICON:
+ evas_object_show(icon->img_obj.obj);
+ elm_box_pack_start(win->_fixed_box
+ [icon->priority],
+ icon->img_obj.obj);
+ break;
+ case INDICATOR_TXT_ICON:
+ evas_object_show(icon->txt_obj.obj);
+ elm_box_pack_start(win->_fixed_box
+ [icon->priority],
+ icon->txt_obj.obj);
+ break;
+ case INDICATOR_TXT_WITH_IMG_ICON:
+ evas_object_show(icon->txt_obj.obj);
+ evas_object_show(icon->img_obj.obj);
+ elm_box_pack_start(win->_fixed_box
+ [icon->priority],
+ icon->img_obj.obj);
+ elm_box_pack_start(win->_fixed_box
+ [icon->priority],
+ icon->txt_obj.obj);
+ break;
+ }
+
+ evas_object_geometry_get(
+ win->_fixed_box[icon->priority],
+ &x, &y, &h, &w);
+
+ INFO("Fixed Icon : %s %d %d %d %d",
+ icon->name, x, y, h, w);
+ }
+ }
+ }
+
+ EINA_LIST_FOREACH(_view_system_list[win->type], l, icon) {
+ if (icon->obj_exist == EINA_FALSE) {
+ if (indicator_util_icon_add(win,icon) == EINA_TRUE)
+ icon->obj_exist = EINA_TRUE;
+ }
+ if (icon->obj_exist == EINA_TRUE) {
+ if (icon->area == INDICATOR_ICON_AREA_SYSTEM
+ && icon->priority >= INDICATOR_PRIORITY_SYSTEM_MIN
+ && icon->priority <= INDICATOR_PRIORITY_SYSTEM_MAX) {
+
+ Evas_Coord x, y, h, w;
+
+ Evas_Object *img_eo =
+ evas_object_data_get(icon->img_obj.obj,
+ "imgicon");
+ evas_object_size_hint_min_set(img_eo,
+ icon->img_obj.width * elm_config_scale_get(),
+ icon->img_obj.height * elm_config_scale_get());
+
+ indicator_util_handle_animated_gif(icon);
+
+ switch (icon->type) {
+ case INDICATOR_IMG_ICON:
+ evas_object_show(icon->img_obj.obj);
+ elm_box_pack_end(win->_non_fixed_box,
+ icon->img_obj.obj);
+ break;
+ case INDICATOR_TXT_ICON:
+ evas_object_show(icon->txt_obj.obj);
+ elm_box_pack_end(win->_non_fixed_box,
+ icon->txt_obj.obj);
+ break;
+ case INDICATOR_TXT_WITH_IMG_ICON:
+ evas_object_show(icon->txt_obj.obj);
+ evas_object_show(icon->img_obj.obj);
+ elm_box_pack_end(win->_non_fixed_box,
+ icon->txt_obj.obj);
+ elm_box_pack_end(win->_non_fixed_box,
+ icon->img_obj.obj);
+ break;
+ }
+ evas_object_geometry_get(win->_non_fixed_box,
+ &x, &y, &h, &w);
+ INFO("Non-Fixed Icon : %s %d %d %d %d",
+ icon->name, x, y, h, w);
+ }
+
+
+ }
+ }
+
+ EINA_LIST_FOREACH(_view_noti_list[win->type], l, icon) {
+ if (icon->obj_exist == EINA_FALSE) {
+ if (indicator_util_icon_add(win,icon) == EINA_TRUE)
+ icon->obj_exist = EINA_TRUE;
+ }
+ if (icon->obj_exist == EINA_TRUE) {
+ if (icon->area == INDICATOR_ICON_AREA_NOTI) {
+ Evas_Coord x, y, h, w;
+
+ Evas_Object *img_eo =
+ evas_object_data_get(icon->img_obj.obj,
+ "imgicon");
+ evas_object_size_hint_min_set(img_eo,
+ icon->img_obj.width * elm_config_scale_get(),
+ icon->img_obj.height * elm_config_scale_get());
+
+ indicator_util_handle_animated_gif(icon);
+
+ switch (icon->type) {
+ case INDICATOR_IMG_ICON:
+ evas_object_show(icon->img_obj.obj);
+ elm_box_pack_end(win->_noti_box,
+ icon->img_obj.obj);
+ break;
+ case INDICATOR_TXT_ICON:
+ evas_object_show(icon->txt_obj.obj);
+ elm_box_pack_end(win->_noti_box,
+ icon->txt_obj.obj);
+ break;
+ case INDICATOR_TXT_WITH_IMG_ICON:
+ evas_object_show(icon->txt_obj.obj);
+ evas_object_show(icon->img_obj.obj);
+ elm_box_pack_end(win->_noti_box,
+ icon->txt_obj.obj);
+ elm_box_pack_end(win->_noti_box,
+ icon->img_obj.obj);
+ break;
+ }
+ evas_object_geometry_get(win->_noti_box,
+ &x, &y, &h, &w);
+ INFO("Non-Fixed Notification Icon : %s %d %d %d %d",
+ icon->name, x, y, h, w);
+ }
+
+
+ }
+ }
+
+ if (win)
+ _update_window(win);
+}
+
+void indicator_util_update_display(win_info *win)
+{
+ retif(win == NULL, FAIL, "Invalid parameter!");
+
+ _update_window(win);
+
+ _update_display(win);
+}
+
+int icon_box_pack(Indicator_Icon_Object *icon)
+{
+ retif(icon == NULL, FAIL, "Invalid parameter!");
+
+ if (indicator_util_is_show_icon(icon))
+ return OK;
+
+ INFO("[icon_box_pack] %s %d!",icon->name, icon->win_type);
+
+ if (INDICATOR_ICON_AREA_FIXED == icon->area)
+ {
+ icon->exist_in_view = EINA_TRUE;
+ _view_fixed_list[icon->win_type] = eina_list_append(_view_fixed_list[icon->win_type], icon);
+ }
+ else if(INDICATOR_ICON_AREA_SYSTEM == icon->area)
+ {
+ Indicator_Icon_Object *data;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(_view_system_list[icon->win_type], l, data) {
+ if (data->priority <= icon->priority) {
+ icon->exist_in_view = EINA_TRUE;
+ _view_system_list[icon->win_type] =
+ eina_list_prepend_relative_list(
+ _view_system_list[icon->win_type], icon, l);
+ DBG("System prepend %s",icon->name);
+ return OK;
+ }
+ }
+
+ icon->exist_in_view = EINA_TRUE;
+ _view_system_list[icon->win_type] =
+ eina_list_append(_view_system_list[icon->win_type], icon);
+ DBG("System append %s",icon->name);
+ }
+ else
+ {
+ Indicator_Icon_Object *data;
+ Eina_List *l;
+
+ EINA_LIST_FOREACH(_view_noti_list[icon->win_type], l, data) {
+ if (data->priority <= icon->priority)
+ {
+ icon->exist_in_view = EINA_TRUE;
+ _view_noti_list[icon->win_type] =
+ eina_list_prepend_relative_list(
+ _view_noti_list[icon->win_type], icon, l);
+ DBG("Noti prepend %s",icon->name);
+ return OK;
+ }
+ }
+
+ icon->exist_in_view = EINA_TRUE;
+ _view_noti_list[icon->win_type] =
+ eina_list_append(_view_noti_list[icon->win_type], icon);
+ DBG("Noti append %s",icon->name);
+ }
+
+ return OK;
+}
+
+int icon_box_pack_append(Indicator_Icon_Object *icon)
+{
+ retif(icon == NULL, FAIL, "Invalid parameter!");
+
+ if (indicator_util_is_show_icon(icon))
+ return OK;
+
+ INFO("[icon_box_pack_append] %s!",icon->name);
+
+ if (INDICATOR_ICON_AREA_FIXED == icon->area)
+ {
+ icon->exist_in_view = EINA_TRUE;
+ _view_fixed_list[icon->win_type] = eina_list_append(_view_fixed_list[icon->win_type], icon);
+ }
+ else if(INDICATOR_ICON_AREA_SYSTEM == icon->area)
+ {
+ icon->exist_in_view = EINA_TRUE;
+ _view_system_list[icon->win_type] =
+ eina_list_append(_view_system_list[icon->win_type], icon);
+ }
+ else
+ {
+ icon->exist_in_view = EINA_TRUE;
+ _view_noti_list[icon->win_type] =
+ eina_list_append(_view_noti_list[icon->win_type], icon);
+ DBG("Noti append %s",icon->name);
+ }
+
+ return OK;
+}
+
+
+int icon_box_unpack(Indicator_Icon_Object *icon)
+{
+ retif(icon == NULL, FAIL, "Invalid parameter!");
+
+ INFO("[icon_box_unpack] %s!",icon->name);
+
+ if (INDICATOR_ICON_AREA_FIXED == icon->area)
+ {
+ icon->exist_in_view = EINA_FALSE;
+ _view_fixed_list[icon->win_type] = eina_list_remove(_view_fixed_list[icon->win_type], icon);
+ }
+ else if(INDICATOR_ICON_AREA_SYSTEM == icon->area)
+ {
+ icon->exist_in_view = EINA_FALSE;
+ _view_system_list[icon->win_type] =
+ eina_list_remove(_view_system_list[icon->win_type], icon);
+ }
+ else
+ {
+ icon->exist_in_view = EINA_FALSE;
+ _view_noti_list[icon->win_type] =
+ eina_list_remove(_view_noti_list[icon->win_type], icon);
+ }
+
+ if (icon->obj_exist == EINA_TRUE) {
+ if (indicator_util_icon_del(icon) == EINA_TRUE) {
+ icon->obj_exist = EINA_FALSE;
+ INFO("%s icon object is freed!", icon->name);
+ }
+ }
+
+ return OK;
+}
+
+int icon_box_init(win_info *win)
+{
+ char *str_text = NULL;
+ int i = 0;
+ retif(win == NULL, FAIL, "Invalid parameter!");
+
+ for (i = 0; i < _FIXED_COUNT; ++i) {
+ if (win->_fixed_box[i] == NULL) {
+ Eina_Bool ret;
+
+ win->_fixed_box[i] = indicator_box_add(win->layout_main);
+ retif(win->_fixed_box[i] == NULL, FAIL,
+ "Failed to add _fixed_box object!");
+
+ Eina_Strbuf *temp_str = eina_strbuf_new();
+ eina_strbuf_append_printf(temp_str, "%s%d",
+ _FIXED_BOX_PART_NAME, i);
+ str_text = eina_strbuf_string_steal(temp_str);
+
+ ret = edje_object_part_swallow(elm_layout_edje_get
+ (win->layout_main), str_text,
+ win->_fixed_box[i]);
+ INFO("[ICON INIT] : %d %s %d " , i, str_text, ret);
+ eina_strbuf_free(temp_str);
+ free(str_text);
+ }
+ }
+
+ win->_non_fixed_box = indicator_box_add(win->layout_main);
+ retif(win->_non_fixed_box == NULL, FAIL,
+ "Failed to create _non_fixed_box object!");
+ evas_object_size_hint_align_set(win->_non_fixed_box,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ edje_object_part_swallow(elm_layout_edje_get
+ (win->layout_main), _NON_FIXED_BOX_PART_NAME,
+ win->_non_fixed_box);
+
+ win->_noti_box = indicator_box_add(win->layout_main);
+ retif(win->_noti_box == NULL, FAIL,
+ "Failed to create _non_fixed_box object!");
+ evas_object_size_hint_align_set(win->_noti_box,
+ EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+ edje_object_part_swallow(elm_layout_edje_get
+ (win->layout_main), _NOTI_BOX_PART_NAME,
+ win->_noti_box);
+
+ indicator_util_update_display(win);
+
+ return 0;
+}
+
+int icon_box_fini(win_info *win)
+{
+ int i = 0;
+
+ retif(win == NULL || win->layout_main == NULL,
+ FAIL, "Invalid parameter!");
+
+ if (win->_non_fixed_box != NULL) {
+ edje_object_part_unswallow(elm_layout_edje_get(win->layout_main),
+ win->_non_fixed_box);
+ elm_box_unpack_all(win->_non_fixed_box);
+ evas_object_del(win->_non_fixed_box);
+ win->_non_fixed_box = NULL;
+ }
+
+ if (win->_noti_box != NULL) {
+ edje_object_part_unswallow(elm_layout_edje_get(win->layout_main),
+ win->_noti_box);
+ elm_box_unpack_all(win->_noti_box);
+ evas_object_del(win->_noti_box);
+ win->_noti_box = NULL;
+ }
+
+ for (i = 0; i < _FIXED_COUNT; ++i) {
+ if (win->_fixed_box[i] != NULL) {
+ edje_object_part_unswallow(elm_layout_edje_get
+ (win->layout_main),
+ win->_fixed_box[i]);
+ elm_box_unpack_all(win->_fixed_box[i]);
+ evas_object_del(win->_fixed_box[i]);
+ win->_fixed_box[i] = NULL;
+ }
+ }
+ return 0;
+}
+
+unsigned int indicator_get_count_in_fixed_list(int type)
+{
+ int r = eina_list_count(_view_fixed_list[type]);
+ DBG("Fixed Count : %d",r);
+ return r;
+}
+unsigned int indicator_get_count_in_system_list(int type)
+{
+ int r = eina_list_count(_view_system_list[type]);
+ DBG("System Count : %d",r);
+ return r;
+}
+unsigned int indicator_get_count_in_noti_list(int type)
+{
+ int r = eina_list_count(_view_noti_list[type]);
+ DBG("Notification Count : %d",r);
+ return r;
+}
+
+void indicator_set_count_in_non_fixed_list(int angle, int status)
+{
+
+}
+
+int indicator_get_noti_list_index_count(int type)
+{
+ int added_count = 0;
+ int ret = 0;
+ int status = 0;
+
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &status);
+
+ if (ret != OK)
+ {
+ ERR("Fail to get vconfkey : %s",
+ VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL);
+ }
+
+ if (status == EINA_TRUE)
+ added_count = BATTERY_TEXT_ON_COUNT;
+ else
+ added_count = BATTERY_TEXT_OFF_COUNT;
+
+ if(type == INDICATOR_WIN_PORT)
+ {
+ ret = PORT_NOTI_ICON_COUNT + added_count;
+ }
+ else
+ {
+ ret = LAND_NOTI_ICON_COUNT + added_count;
+ }
+
+ return ret;
+}
+
+int indicator_get_system_list_index_count(int type)
+{
+ int ret = 0;
+
+ if(type == INDICATOR_WIN_PORT)
+ {
+ ret = PORT_SYSTEM_ICON_COUNT;
+ }
+ else
+ {
+ ret = LAND_SYSTEM_ICON_COUNT;
+ }
+
+ return ret;
+}
+
+int indicator_get_max_count_in_non_fixed_list(int type)
+{
+ int added_count = 0;
+ int ret = 0;
+ int status = 0;
+
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &status);
+
+ if (ret != OK)
+ {
+ ERR("Fail to get vconfkey : %s",
+ VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL);
+ }
+
+ if (status == EINA_TRUE)
+ added_count = BATTERY_TEXT_ON_COUNT;
+ else
+ added_count = BATTERY_TEXT_OFF_COUNT;
+
+ if(type == INDICATOR_WIN_PORT)
+ {
+ ret = PORT_NONFIXED_ICON_COUNT + added_count;
+ }
+ else
+ {
+ ret = LAND_NONFIXED_ICON_COUNT + added_count;
+ }
+
+ return ret;
+}
+
+Icon_AddType indicator_is_enable_to_insert_in_non_fixed_list(Indicator_Icon_Object *obj)
+{
+ Indicator_Icon_Object *icon;
+ Eina_List *l;
+
+ int higher_cnt = 0;
+ int same_cnt = 0;
+ int same_top_cnt = 0;
+ int lower_cnt = 0;
+ int system_cnt = indicator_get_count_in_system_list(obj->win_type);
+ int noti_cnt = indicator_get_count_in_noti_list(obj->win_type);
+ int total_cnt = system_cnt + noti_cnt;
+ Eina_List * tmpList = NULL;
+
+ if(obj->area == INDICATOR_ICON_AREA_SYSTEM )
+ {
+ tmpList = _view_system_list[obj->win_type];
+ }
+ else if(obj->area == INDICATOR_ICON_AREA_NOTI)
+ {
+ tmpList = _view_noti_list[obj->win_type];
+ }
+
+ EINA_LIST_FOREACH(tmpList, l, icon) {
+ if (!strcmp(icon->name, obj->name))
+ return CANNOT_ADD;
+
+ if (icon->priority > obj->priority)
+ ++higher_cnt;
+
+ else if (icon->priority == obj->priority) {
+ ++same_cnt;
+ if (icon->always_top == EINA_TRUE)
+ ++same_top_cnt;
+ } else
+ lower_cnt++;
+ }
+
+ INFO("[INSERT ENABLE] : %d %d %d %d %d %d",
+ higher_cnt, lower_cnt, same_cnt, same_top_cnt,
+ indicator_get_max_count_in_non_fixed_list(obj->win_type), system_cnt);
+ INFO("[INSERT ENABLE2] : %d %d %d",
+ obj->area, system_cnt, noti_cnt);
+
+ if(obj->area == INDICATOR_ICON_AREA_SYSTEM )
+ {
+ if (higher_cnt + same_cnt + lower_cnt >= indicator_get_system_list_index_count(obj->win_type))
+ {
+ if (obj->always_top == EINA_TRUE)
+ {
+ if(same_top_cnt>=indicator_get_system_list_index_count(obj->win_type))
+ {
+ DBG("[CANNOT_ADD] %d",same_top_cnt);
+ return CANNOT_ADD;
+ }
+ else
+ {
+ DBG("[CAN_ADD_WITH_DEL_SYSTEM]");
+ return CAN_ADD_WITH_DEL_SYSTEM;
+ }
+ }
+ else
+ {
+ if(higher_cnt >= indicator_get_system_list_index_count(obj->win_type))
+ {
+ DBG("[CANNOT_ADD]");
+ return CANNOT_ADD;
+ }
+ else if(higher_cnt+same_cnt >= indicator_get_system_list_index_count(obj->win_type))
+ {
+ DBG("[CAN_ADD_WITH_DEL_SYSTEM]");
+ return CAN_ADD_WITH_DEL_SYSTEM;
+ }
+ else
+ {
+ DBG("[CAN_ADD_WITH_DEL_SYSTEM]");
+ return CAN_ADD_WITH_DEL_SYSTEM;
+ }
+ }
+ }
+ else
+ {
+ return CAN_ADD_WITHOUT_DEL;
+ }
+ }
+ else
+ {
+ if(noti_cnt>=indicator_get_noti_list_index_count(obj->win_type))
+ {
+
+ DBG("[CAN_ADD_WITH_DEL_NOTI]");
+ return CAN_ADD_WITH_DEL_NOTI;
+ }
+ else
+ {
+ INFO("[CAN_ADD_WITHOUT_DEL]");
+ return CAN_ADD_WITHOUT_DEL;
+ }
+ }
+
+ return CANNOT_ADD;
+}
+
+int indicator_util_get_priority_in_move_area(win_info *win, Evas_Coord curr_x,
+ Evas_Coord curr_y)
+{
+ Evas_Coord x, y, h, w;
+
+ evas_object_geometry_get(win->_fixed_box[INDICATOR_PRIORITY_FIXED1],
+ &x, &y, &h, &w);
+ INFO("[Current Location] %d %d %d %d %d %d",
+ x, y, h, w, curr_x, curr_y);
+
+ if (curr_x >= x - CORRECTION && curr_x <= x+h + CORRECTION) {
+ if (curr_y == -1)
+ return INDICATOR_PRIORITY_FIXED1;
+ else if (curr_y >= y - CORRECTION && curr_y <= y+h + CORRECTION)
+ return INDICATOR_PRIORITY_FIXED1;
+ }
+
+
+ return -1;
+}
+
+int indicator_util_check_indicator_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
+{
+ Evas_Coord x, y, w, h;
+
+ evas_object_geometry_get(win->layout_main,
+ &x, &y, &w, &h);
+
+ INFO("[indicator area] [%d, %d] [wxh][%dx%d], cur[%d, %d]",
+ x, y, w, h, curr_x, curr_y);
+
+ if (curr_x >= x && curr_x < x + w && curr_y >= y && curr_y < y + h)
+ return 1;
+
+ return 0;
+}
+
+int indicator_util_check_home_icon_area(win_info *win, Evas_Coord curr_x, Evas_Coord curr_y)
+{
+ Evas_Coord x, y, w, h;
+
+ evas_object_geometry_get(win->_fixed_box[INDICATOR_PRIORITY_FIXED5],
+ &x, &y, &w, &h);
+
+ INFO("[Home icon area] [%d, %d] [wxh][%dx%d], cur[%d, %d]",
+ x, y, w, h, curr_x, curr_y);
+
+ if (curr_x >= x && curr_x < x + w && curr_y >= y && curr_y < y + h)
+ return 1;
+
+ return 0;
+}
+
+void indicator_util_show_hide_icons(void* data,int bShow)
+{
+ struct appdata *ad = (struct appdata *)data;
+ Indicator_Icon_Object *icon;
+ Eina_List *l;
+ retif(data == NULL, , "Invalid parameter!");
+
+ int i = 0;
+
+ DBG("Show = %d",bShow);
+
+ if(bShow)
+ {
+ indicator_clock_display_battery_percentage(data);
+ }
+
+ if(bShow)
+ {
+ indicator_signal_emit(data,"indicator.noti.show", "indicator.prog");
+ }
+ else
+ {
+ indicator_signal_emit(data,"indicator.noti.hide", "indicator.prog");
+ }
+}
+
+
+Eina_Bool indicator_util_is_show_icon(Indicator_Icon_Object *obj)
+{
+ retif(obj == NULL, FAIL, "Invalid parameter!");
+
+ if (obj->area == INDICATOR_ICON_AREA_FIXED)
+ {
+ if (eina_list_data_find(_view_fixed_list[obj->win_type], obj))
+ return 1;
+ else
+ return 0;
+ }
+ else if(obj->area == INDICATOR_ICON_AREA_SYSTEM)
+ {
+ if (eina_list_data_find(_view_system_list[obj->win_type], obj))
+ return 1;
+ else
+ return 0;
+ }
+
+ else {
+ if (eina_list_data_find(_view_noti_list[obj->win_type], obj))
+ return 1;
+ else
+ return 0;
+ }
+}
+int indicator_util_handle_animated_gif(Indicator_Icon_Object *icon)
+{
+ int bPlay = TRUE;
+ int val = 0;
+
+ retif(icon == NULL, FAIL, "Invalid parameter!");
+ Evas_Object *icon_eo = evas_object_data_get(icon->img_obj.obj, "imgicon");
+
+ if(elm_image_animated_available_get(icon_eo)== EINA_FALSE)
+ {
+ return FALSE;
+ }
+
+ if (vconf_get_int(VCONFKEY_PM_STATE, &val) < 0) {
+ ERR("Cannot get VCONFKEY_PM_STATE");
+ return FALSE;
+ }
+
+ switch(val)
+ {
+ case VCONFKEY_PM_STATE_LCDOFF :
+ bPlay = FALSE;
+ break;
+ case VCONFKEY_PM_STATE_NORMAL :
+ bPlay = TRUE;
+ break;
+ default:
+ bPlay = TRUE;
+ break;
+ }
+
+ if(bPlay == TRUE)
+ {
+ if(elm_image_animated_get(icon_eo)==EINA_FALSE)
+ {
+ elm_image_animated_set(icon_eo,EINA_TRUE);
+ }
+
+ if(elm_image_animated_play_get(icon_eo) == EINA_FALSE)
+ {
+ elm_image_animated_play_set(icon_eo, EINA_TRUE);
+ INFO("PLAY ANIMATED GIF ICON(%s)",icon->name);
+ }
+ }
+ else
+ {
+ if(elm_image_animated_play_get(icon_eo) == EINA_TRUE)
+ {
+ elm_image_animated_play_set(icon_eo, EINA_FALSE);
+ INFO("STOP ANIMATED GIF ICON(%s)",icon->name);
+ }
+ }
+
+ return TRUE;
+}
+
--- /dev/null
+/*
+ * 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 __INDICATOR_BOX_UTIL_H__
+#define __INDICATOR_BOX_UTIL_H__
+
+#include <Elementary.h>
+#include "indicator.h"
+
+typedef enum _Icon_AddType {
+ CANNOT_ADD = -1,
+ CAN_ADD_WITH_DEL_SYSTEM,
+ CAN_ADD_WITH_DEL_NOTI,
+ CAN_ADD_WITHOUT_DEL,
+} Icon_AddType;
+
+typedef enum _Icon_Display_Count {
+ BATTERY_TEXT_ON_COUNT = 0,
+ BATTERY_TEXT_OFF_COUNT = 0,
+ PORT_NONFIXED_ICON_COUNT = 6,
+ LAND_NONFIXED_ICON_COUNT = 14,
+ PORT_NOTI_ICON_COUNT = 4,
+ LAND_NOTI_ICON_COUNT = 9,
+ PORT_SYSTEM_ICON_COUNT = 2,
+ LAND_SYSTEM_ICON_COUNT = 5,
+} Icon_Display_Count;
+
+extern int icon_box_pack(Indicator_Icon_Object *icon);
+extern int icon_box_pack_append(Indicator_Icon_Object *icon);
+extern int icon_box_unpack(Indicator_Icon_Object *icon);
+extern int icon_box_init(win_info *win);
+extern int icon_box_fini(win_info *win);
+extern void indicator_util_update_display(win_info *win);
+extern unsigned int indicator_get_count_in_fixed_list(int type);
+extern unsigned int indicator_get_count_in_system_list(int type);
+extern unsigned int indicator_get_count_in_noti_list(int type);
+extern void indicator_set_count_in_non_fixed_list(int angle, int status);
+extern int indicator_get_max_count_in_non_fixed_list(int type);
+extern Icon_AddType indicator_is_enable_to_insert_in_non_fixed_list(Indicator_Icon_Object *obj);
+extern int indicator_util_get_priority_in_move_area(win_info *win, Evas_Coord, Evas_Coord);
+int indicator_util_check_indicator_area(win_info *win,Evas_Coord curr_x, Evas_Coord curr_y);
+int indicator_util_check_home_icon_area(win_info *win,Evas_Coord curr_x, Evas_Coord curr_y);
+void indicator_util_show_hide_icons(void* data, int bShow);
+extern Eina_Bool indicator_util_is_show_icon(Indicator_Icon_Object *obj);
+int indicator_util_handle_animated_gif(Indicator_Icon_Object *icon);
+
+#endif /*__INDICATOR_BOX_UTIL_H__*/
--- /dev/null
+/*
+ * 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 "common.h"
+#include "indicator.h"
+#include "indicator_icon_list.h"
+#include "indicator_icon_util.h"
+
+static Eina_List *fixed_icon_list[INDICATOR_WIN_MAX] = {NULL,};
+static Eina_List *system_icon_list[INDICATOR_WIN_MAX] = {NULL,};
+static Eina_List *noti_icon_list[INDICATOR_WIN_MAX] = {NULL,};
+
+
+void indicator_icon_object_free(Indicator_Icon_Object *icon)
+{
+ if (icon) {
+ DBG("%s!",icon->name);
+ if (icon->obj_exist == EINA_TRUE) {
+ if (indicator_util_icon_del(icon) == EINA_TRUE) {
+ icon->obj_exist = EINA_FALSE;
+ icon->txt_obj.obj = NULL;
+ icon->img_obj.obj = NULL;
+ }
+ }
+ }
+}
+
+static int indicator_icon_list_free(Eina_List *list)
+{
+ Eina_List *l;
+ Eina_List *l_next;
+ Indicator_Icon_Object *data;
+
+ retif(list == NULL, OK, "Empty List!");
+
+ EINA_LIST_FOREACH_SAFE(list, l, l_next, data) {
+ indicator_icon_object_free(data);
+ list = eina_list_remove_list(list, l);
+ if (eina_error_get())
+ return FAIL;
+ }
+ eina_list_free(list);
+ list = NULL;
+ return eina_error_get();
+}
+
+int indicator_icon_all_list_free(void)
+{
+ int i = 0;
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ indicator_icon_list_free(fixed_icon_list[i]);
+ indicator_icon_list_free(system_icon_list[i]);
+ indicator_icon_list_free(noti_icon_list[i]);
+ }
+
+ return TRUE;
+}
+
+int indicator_icon_list_update(Indicator_Icon_Object *obj)
+{
+ Eina_List *l;
+
+ Indicator_Icon_Object *data;
+
+ retif(obj == NULL, FAIL, "Invalid parameter!");
+
+ DBG("%s",obj->name);
+
+ if (obj->area == INDICATOR_ICON_AREA_FIXED)
+ {
+ fixed_icon_list[obj->win_type] = eina_list_remove(fixed_icon_list[obj->win_type], obj);
+
+ EINA_LIST_REVERSE_FOREACH(fixed_icon_list[obj->win_type], l, data) {
+ if (data->priority == obj->priority
+ &&data->always_top == EINA_TRUE)
+ continue;
+
+ if (data->priority <= obj->priority) {
+ fixed_icon_list[obj->win_type] = eina_list_append_relative_list(
+ fixed_icon_list[obj->win_type], obj, l);
+ return eina_error_get();
+ }
+ }
+
+ fixed_icon_list[obj->win_type] = eina_list_prepend(fixed_icon_list[obj->win_type], obj);
+ }
+ else if(obj->area == INDICATOR_ICON_AREA_SYSTEM)
+ {
+ system_icon_list[obj->win_type] = eina_list_remove(system_icon_list[obj->win_type], obj);
+
+ EINA_LIST_REVERSE_FOREACH(system_icon_list[obj->win_type], l, data) {
+ if (data->priority == obj->priority
+ &&data->always_top == EINA_TRUE) {
+ continue;
+ }
+ if (data->priority <= obj->priority) {
+ system_icon_list[obj->win_type] =
+ eina_list_append_relative_list(
+ system_icon_list[obj->win_type], obj, l);
+ return eina_error_get();
+ }
+ }
+
+ system_icon_list[obj->win_type] = eina_list_prepend(system_icon_list[obj->win_type], obj);
+ }
+ else
+ {
+ noti_icon_list[obj->win_type] = eina_list_remove(noti_icon_list[obj->win_type], obj);
+
+ EINA_LIST_REVERSE_FOREACH(noti_icon_list[obj->win_type], l, data) {
+ if (data->priority == obj->priority
+ &&data->always_top == EINA_TRUE) {
+ continue;
+ }
+ if (data->priority >= obj->priority) {
+ noti_icon_list[obj->win_type] =
+ eina_list_append_relative_list(
+ noti_icon_list[obj->win_type], obj, l);
+ return eina_error_get();
+ }
+ }
+
+ noti_icon_list[obj->win_type] = eina_list_prepend(noti_icon_list[obj->win_type], obj);
+ }
+
+ return eina_error_get();
+}
+
+int indicator_icon_list_insert(Indicator_Icon_Object *obj)
+{
+ Eina_List *l;
+ Indicator_Icon_Object *data;
+
+ retif(obj == NULL || obj->name == NULL, FAIL, "Invalid parameter!");
+
+ DBG("%s!",obj->name);
+
+ if (obj->area == INDICATOR_ICON_AREA_FIXED)
+ {
+ EINA_LIST_REVERSE_FOREACH(fixed_icon_list[obj->win_type], l, data) {
+ retif(data->name == obj->name, FAIL,
+ "%s is already exist in the list!", obj->name);
+ }
+
+ obj->wish_to_show = EINA_FALSE;
+
+ EINA_LIST_REVERSE_FOREACH(fixed_icon_list[obj->win_type], l, data) {
+ if (data->priority == obj->priority
+ && data->always_top == EINA_TRUE)
+ continue;
+
+ if (data->priority <= obj->priority) {
+ fixed_icon_list[obj->win_type] = eina_list_append_relative_list(
+ fixed_icon_list[obj->win_type], obj, l);
+ return eina_error_get();
+ }
+ }
+ fixed_icon_list[obj->win_type] = eina_list_prepend(fixed_icon_list[obj->win_type], obj);
+ }
+ else if(obj->area == INDICATOR_ICON_AREA_SYSTEM)
+ {
+ EINA_LIST_REVERSE_FOREACH(system_icon_list[obj->win_type], l, data) {
+ retif(data->name == obj->name, FAIL,
+ "%s is already exist in the list!", obj->name);
+ }
+
+ obj->wish_to_show = EINA_FALSE;
+
+ EINA_LIST_REVERSE_FOREACH(system_icon_list[obj->win_type], l, data) {
+ if (data->priority == obj->priority &&
+ data->always_top == EINA_TRUE)
+ continue;
+
+ if (data->priority <= obj->priority) {
+ system_icon_list[obj->win_type] =
+ eina_list_append_relative_list(
+ system_icon_list[obj->win_type], obj, l);
+ return eina_error_get();
+ }
+ }
+
+ system_icon_list[obj->win_type] = eina_list_prepend(system_icon_list[obj->win_type], obj);
+ }
+ else
+ {
+ EINA_LIST_REVERSE_FOREACH(noti_icon_list[obj->win_type], l, data) {
+ retif(data->name == obj->name, FAIL,
+ "%s is already exist in the list!", obj->name);
+ }
+
+ obj->wish_to_show = EINA_FALSE;
+
+ EINA_LIST_REVERSE_FOREACH(noti_icon_list[obj->win_type], l, data) {
+ if (data->priority == obj->priority &&
+ data->always_top == EINA_TRUE)
+ continue;
+
+ if (data->priority >= obj->priority) {
+ noti_icon_list[obj->win_type] =
+ eina_list_append_relative_list(
+ noti_icon_list[obj->win_type], obj, l);
+ DBG("Append");
+ return eina_error_get();
+ }
+ }
+ noti_icon_list[obj->win_type] = eina_list_prepend(noti_icon_list[obj->win_type], obj);
+ DBG("Prepend");
+ }
+
+ return eina_error_get();
+}
+
+int indicator_icon_list_remove(Indicator_Icon_Object *obj)
+{
+ DBG("%s!",obj->name);
+
+ if (obj->area == INDICATOR_ICON_AREA_FIXED)
+ {
+ retif(fixed_icon_list[obj->win_type] == NULL
+ || obj == NULL, FAIL, "Invalid parameter!");
+ fixed_icon_list[obj->win_type] = eina_list_remove(fixed_icon_list[obj->win_type], obj);
+ }
+ else if(obj->area == INDICATOR_ICON_AREA_SYSTEM)
+ {
+ retif(system_icon_list[obj->win_type] == NULL
+ || obj == NULL, FAIL, "Invalid parameter!");
+ system_icon_list[obj->win_type] = eina_list_remove(system_icon_list[obj->win_type], obj);
+ }
+ else
+ {
+ retif(noti_icon_list[obj->win_type] == NULL
+ || obj == NULL, FAIL, "Invalid parameter!");
+ noti_icon_list[obj->win_type] = eina_list_remove(noti_icon_list[obj->win_type], obj);
+ }
+
+ return eina_error_get();
+}
+
+Indicator_Icon_Object
+*indicator_get_wish_to_show_icon(int win_type, int area, int priority)
+{
+ Eina_List *l;
+ Indicator_Icon_Object *data = NULL;
+ Indicator_Icon_Object *ret = NULL;
+
+ if (area == INDICATOR_ICON_AREA_FIXED)
+ {
+ EINA_LIST_REVERSE_FOREACH(fixed_icon_list[win_type], l, data) {
+ if (data->priority == priority
+ && data->wish_to_show == EINA_TRUE
+ && data->exist_in_view == EINA_FALSE)
+ {
+ ret = data;
+ break;
+ }
+ }
+
+ }
+ else if(area == INDICATOR_ICON_AREA_SYSTEM)
+ {
+ EINA_LIST_REVERSE_FOREACH(system_icon_list[win_type], l, data) {
+ if (data->wish_to_show == EINA_TRUE
+ && data->exist_in_view == EINA_FALSE)
+ {
+ ret = data;
+ break;
+ }
+ }
+
+ }
+ else
+ {
+ EINA_LIST_REVERSE_FOREACH(noti_icon_list[win_type], l, data) {
+ if (data->wish_to_show == EINA_TRUE
+ && data->exist_in_view == EINA_FALSE)
+ {
+ ret = data;
+ break;
+ }
+ }
+
+ }
+
+ if(ret != NULL)
+ DBG("%d,%s",area, ret->name);
+ else
+ ret = NULL;
+
+ return ret;
+}
+
+Indicator_Icon_Object
+*indicator_get_wish_to_remove_icon(int win_type, int area, int priority)
+{
+ Eina_List *l;
+ Indicator_Icon_Object *data = NULL;
+ Indicator_Icon_Object *ret = NULL;
+
+ if (area == INDICATOR_ICON_AREA_FIXED)
+ {
+ EINA_LIST_REVERSE_FOREACH(fixed_icon_list[win_type], l, data) {
+ if (data->priority == priority
+ && data->wish_to_show == EINA_TRUE)
+ {
+ ret = data;
+ break;
+ }
+ }
+ }
+ else if (area == INDICATOR_ICON_AREA_SYSTEM)
+ {
+ EINA_LIST_FOREACH(system_icon_list[win_type], l, data) {
+ if (data->wish_to_show == EINA_TRUE
+ && data->always_top == EINA_FALSE
+ && data->exist_in_view == EINA_TRUE)
+ {
+ ret = data;
+ break;
+ }
+ }
+ }
+ else
+ {
+ EINA_LIST_FOREACH(noti_icon_list[win_type], l, data) {
+ if (data->wish_to_show == EINA_TRUE
+ && data->always_top == EINA_FALSE
+ && data->exist_in_view == EINA_TRUE)
+ {
+ ret = data;
+ break;
+ }
+ }
+ }
+
+
+ return ret;
+}
+
--- /dev/null
+/*
+ * 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 __INDICATOR_ICON_LIST_H__
+#define __INDICATOR_ICON_LIST_H__
+
+#include "indicator.h"
+extern void indicator_icon_object_free(Indicator_Icon_Object *icon);
+extern int indicator_icon_all_list_free(void);
+extern int indicator_icon_list_insert(Indicator_Icon_Object *obj);
+extern int indicator_icon_list_remove(Indicator_Icon_Object *obj);
+extern int indicator_icon_list_update(Indicator_Icon_Object *obj);
+extern Indicator_Icon_Object
+*indicator_get_wish_to_show_icon(int win_type, int area, int priority);
+extern Indicator_Icon_Object
+*indicator_get_wish_to_remove_icon(int win_type, int area, int priority);
+extern Indicator_Icon_Object
+*indicator_get_lowest_priority_icon_in_non_fixed_list(int area);
+#endif /*__INDICATOR_ICON_LIST_H__*/
--- /dev/null
+/*
+ * 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 <Eina.h>
+#include "common.h"
+#include "indicator_box_util.h"
+#include "indicator_icon_util.h"
+#include "indicator_icon_list.h"
+#include "indicator_ui.h"
+#include "indicator_gui.h"
+#include "indicator_util.h"
+
+static void _animation_set(Indicator_Icon_Object *icon, int type)
+{
+ Evas_Object *img_edje, *txt_edje;
+
+ retif(icon == NULL, , "Invalid parameter!");
+
+ const char *BLINK_SIGNAL = "icon,state,blink";
+ const char *ROATATE_SIGNAL = "icon,state,roate";
+ const char *METRONOME_SIGNAL = "icon,state,metronome";
+ const char *DEFAULT = "icon,state,default";
+
+ const char *send_signal = DEFAULT;
+
+ switch (type) {
+ case ICON_ANI_BLINK:
+ send_signal = BLINK_SIGNAL;
+ break;
+ case ICON_ANI_ROTATE:
+ send_signal = ROATATE_SIGNAL;
+ break;
+ case ICON_ANI_METRONOME:
+ send_signal = METRONOME_SIGNAL;
+ break;
+ default:
+ break;
+ }
+
+ switch (icon->type) {
+ case INDICATOR_IMG_ICON:
+ img_edje = elm_layout_edje_get(icon->img_obj.obj);
+ edje_object_signal_emit(img_edje, send_signal,
+ "elm.swallow.icon");
+ break;
+ case INDICATOR_TXT_ICON:
+ txt_edje = elm_layout_edje_get(icon->txt_obj.obj);
+ edje_object_signal_emit(txt_edje, send_signal,
+ "elm.swallow.icon");
+ break;
+ case INDICATOR_TXT_WITH_IMG_ICON:
+ txt_edje = elm_layout_edje_get(icon->txt_obj.obj);
+ img_edje = elm_layout_edje_get(icon->img_obj.obj);
+ edje_object_signal_emit(txt_edje, send_signal,
+ "elm.swallow.lefticon");
+ edje_object_signal_emit(img_edje, send_signal,
+ "elm.swallow.righticon");
+ break;
+ default:
+ break;
+ }
+}
+
+void indicator_util_icon_animation_set(Indicator_Icon_Object *icon,
+ enum indicator_icon_ani type)
+{
+ retif(icon == NULL, , "Invalid parameter!");
+
+ icon->ani = type;
+ if (icon->obj_exist)
+ {
+ _animation_set(icon, type);
+ }
+}
+
+static Evas_Object *_img_icon_add(win_info *win, Indicator_Icon_Object *icon)
+{
+ struct appdata *ad = NULL;
+ char path[PATH_MAX];
+ Evas_Object *evas_icon;
+ Evas_Object *ly;
+ int area = 0;
+ char *imgpath = NULL;
+ int width = 0;
+ int height = 0;
+
+ retif(icon == NULL , NULL, "Invalid parameter!");
+ retif(icon->ad == NULL || icon->img_obj.data == NULL, NULL, "Invalid parameter!");
+ retif(win == NULL || win->layout_main == NULL, NULL, "Invalid parameter!");
+
+ ad = icon->ad;
+ area = icon->area;
+ imgpath = icon->img_obj.data;
+
+ if (icon->img_obj.width <= 0)
+ width = icon->img_obj.width = DEFAULT_ICON_WIDTH;
+ if (icon->img_obj.height<= 0)
+ height = icon->img_obj.height = DEFAULT_ICON_HEIGHT;
+
+ memset(path, 0x00, sizeof(path));
+
+ ly = elm_layout_add(win->layout_main);
+ retif(ly == NULL, NULL, "Cannot create layout object!");
+
+ if (area == INDICATOR_ICON_AREA_FIXED)
+ elm_layout_file_set(ly, ICON_THEME_FILE,
+ "elm/indicator/icon/base");
+ else
+ elm_layout_file_set(ly, ICON_NONFIXED_THEME_FILE,
+ "elm/indicator/icon/base");
+
+ evas_icon = elm_image_add(ly);
+ retif(evas_icon == NULL, NULL, "Cannot create elm icon object!");
+
+ if (strncmp(imgpath, "/", 1) != 0) {
+ snprintf(path, sizeof(path), "%s/%s", get_icon_dir(), imgpath);
+ } else {
+ strncpy(path,imgpath,sizeof(path)-1);
+ }
+
+ if (!ecore_file_exists(path))
+ {
+ ERR("icon file does not exist!!: %s",path);
+ }
+
+ elm_image_file_set(evas_icon, path, NULL);
+
+ evas_object_size_hint_min_set(evas_icon, width * elm_config_scale_get(),
+ height * elm_config_scale_get());
+
+ elm_object_part_content_set(ly, "elm.swallow.icon", evas_icon);
+
+ evas_object_data_set(ly, "imgicon", evas_icon);
+ evas_object_size_hint_min_set(ly, width * elm_config_scale_get(),
+ height * elm_config_scale_get());
+ evas_object_hide(ly);
+ return ly;
+}
+
+static Evas_Object *_txt_icon_add(win_info *win, Indicator_Icon_Object *icon)
+{
+ struct appdata *ad = NULL;
+ char *color_added_str = NULL;
+ Evas_Object *evas_icon;
+ Evas_Object *ly;
+ char *txt = NULL;
+
+ retif(icon == NULL , NULL, "Invalid parameter!");
+ retif(icon->ad == NULL || icon->txt_obj.data == NULL, NULL, "Invalid parameter!");
+ retif(win == NULL || win->layout_main == NULL, NULL, "Invalid parameter!");
+
+ ad = icon->ad;
+ txt = icon->txt_obj.data;
+
+ ly = elm_layout_add(win->layout_main);
+ elm_layout_file_set(ly, ICON_THEME_FILE, "elm/indicator/icon/base");
+
+ evas_icon = elm_label_add(ly);
+ color_added_str = (char *)set_label_text_color(txt);
+
+ elm_object_text_set(evas_icon, color_added_str);
+ evas_object_size_hint_align_set(evas_icon, 0.5, 0.5);
+
+ elm_object_part_content_set(ly, "elm.swallow.icon", evas_icon);
+
+ evas_object_data_set(ly, "txticon", evas_icon);
+ evas_object_hide(ly);
+
+ return ly;
+}
+
+char *indicator_util_icon_label_set(const char *buf, char *font_name,
+ char *font_style, int font_size, void *data)
+{
+ Eina_Strbuf *temp_buf = NULL;
+ char *ret_str = NULL;
+ char *label_font = ICON_FONT_NAME;
+ char *label_font_style = ICON_FONT_STYLE;
+ int label_font_size = ICON_FONT_SIZE;
+ Eina_Bool buf_result = EINA_FALSE;
+
+ retif(data == NULL || buf == NULL, NULL, "Invalid parameter!");
+
+ temp_buf = eina_strbuf_new();
+ if (font_name != NULL)
+ label_font = font_name;
+ if (font_style != NULL)
+ label_font_style = font_style;
+ if (font_size > 0)
+ label_font_size = font_size;
+
+ buf_result = eina_strbuf_append_printf(temp_buf, CUSTOM_LABEL_STRING,
+ label_font, label_font_style,
+ label_font_size, buf);
+
+ if (buf_result != EINA_FALSE)
+ ret_str = eina_strbuf_string_steal(temp_buf);
+
+ eina_strbuf_free(temp_buf);
+
+ return ret_str;
+}
+
+Eina_Bool indicator_util_icon_add(win_info *win, Indicator_Icon_Object *icon)
+{
+ retif(icon == NULL, EINA_FALSE, "Invalid parameter!");
+
+ switch (icon->type) {
+ case INDICATOR_TXT_ICON:
+ icon->txt_obj.obj = _txt_icon_add(win, icon);
+ break;
+ case INDICATOR_IMG_ICON:
+ icon->img_obj.obj = _img_icon_add(win, icon);
+ break;
+ case INDICATOR_TXT_WITH_IMG_ICON:
+ icon->txt_obj.obj = _txt_icon_add(win, icon);
+ icon->img_obj.obj = _img_icon_add(win, icon);
+ break;
+
+ default:
+ ERR("Icon type check error!");
+ return EINA_FALSE;
+ }
+ _animation_set(icon, icon->ani);
+ return EINA_TRUE;
+}
+
+Eina_Bool indicator_util_icon_del(Indicator_Icon_Object *icon)
+{
+ Evas_Object *icon_obj;
+ retif(icon == NULL, EINA_FALSE, "Invalid parameter!");
+
+ if (icon->obj_exist != EINA_FALSE) {
+ if (icon->txt_obj.obj) {
+ icon_obj =
+ evas_object_data_get(icon->txt_obj.obj, "txticon");
+ evas_object_del(icon_obj);
+ evas_object_del(icon->txt_obj.obj);
+ icon->txt_obj.obj = NULL;
+ }
+ if (icon->img_obj.obj) {
+ icon_obj =
+ evas_object_data_get(icon->img_obj.obj, "imgicon");
+ evas_object_del(icon_obj);
+ evas_object_del(icon->img_obj.obj);
+ icon->img_obj.obj = NULL;
+ }
+ }
+ return EINA_TRUE;
+}
+
+
+static int show_other_icon_in_same_priority(Indicator_Icon_Object *icon)
+{
+ Indicator_Icon_Object *wish_add_icon;
+ int area = icon->area;
+ retif(icon == NULL, FAIL, "Invalid parameter!");
+
+ wish_add_icon = indicator_get_wish_to_show_icon(icon->win_type, icon->area,icon->priority);
+ if (wish_add_icon == NULL)
+ {
+ DBG("wish_add_icon NULL!");
+ return OK;
+ }
+
+ if (indicator_util_is_show_icon(wish_add_icon))
+ {
+ DBG("Wish Icon is alreay shown!");
+ return OK;
+ }
+
+ if(wish_add_icon!=NULL)
+ {
+ DBG("%s icon is shown!", wish_add_icon->name);
+ }
+
+ if(area ==INDICATOR_ICON_AREA_NOTI)
+ {
+ icon_box_pack_append(wish_add_icon);
+ }
+ else
+ {
+ icon_box_pack(wish_add_icon);
+ }
+
+ return OK;
+}
+
+static int hide_other_icons_in_view_list(Indicator_Icon_Object *icon)
+{
+ Indicator_Icon_Object *wish_remove_icon = NULL;
+ retif(icon == NULL, FAIL, "Invalid parameter!");
+
+ if (INDICATOR_ICON_AREA_SYSTEM == icon->area || INDICATOR_ICON_AREA_NOTI == icon->area)
+ {
+ Icon_AddType ret;
+ Eina_Error err;
+
+ ret = indicator_is_enable_to_insert_in_non_fixed_list(icon);
+ icon->wish_to_show = EINA_TRUE;
+ err = indicator_icon_list_update(icon);
+
+ switch (ret) {
+ case CAN_ADD_WITH_DEL_NOTI:
+ wish_remove_icon = indicator_get_wish_to_remove_icon(icon->win_type, INDICATOR_ICON_AREA_NOTI,0);
+
+ icon_box_unpack(wish_remove_icon);
+
+ retif(wish_remove_icon == NULL, FAIL, "Unexpected Error : CAN_ADD_WITH_DEL_NOTI");
+ break;
+ case CAN_ADD_WITH_DEL_SYSTEM:
+ wish_remove_icon = indicator_get_wish_to_remove_icon(icon->win_type, INDICATOR_ICON_AREA_SYSTEM,0);
+
+ icon_box_unpack(wish_remove_icon);
+ retif(wish_remove_icon == NULL, FAIL, "Unexpected Error : CAN_ADD_WITH_DEL_SYSTEM");
+ break;
+ case CAN_ADD_WITHOUT_DEL:
+ break;
+ case CANNOT_ADD:
+ DBG("[ICON UTIL SYSTEM] %s icon CANNOT_ADD!",icon->name);
+ return FAIL;
+ break;
+ }
+
+ return OK;
+ }
+ else if (INDICATOR_ICON_AREA_FIXED == icon->area)
+ {
+ wish_remove_icon = indicator_get_wish_to_remove_icon(icon->win_type, INDICATOR_ICON_AREA_FIXED,icon->priority);
+
+ if (wish_remove_icon == NULL)
+ {
+ DBG("[ICON UTIL FIXED] NULL!");
+ return OK;
+ }
+
+ if (wish_remove_icon == icon)
+ {
+ return FAIL;
+ }
+
+ icon->wish_to_show = EINA_TRUE;
+ indicator_icon_list_update(icon);
+
+ if (wish_remove_icon->always_top)
+ {
+ DBG("[ICON UTIL FIXED] %s!", wish_remove_icon->name);
+ return FAIL;
+ }
+
+ DBG("[ICON UTIL FIXED] %s icon is hidden!",
+ wish_remove_icon->name);
+ icon_box_unpack(wish_remove_icon);
+ }
+ return OK;
+}
+
+int indicator_util_layout_del(win_info *win)
+{
+ return icon_box_fini(win);
+}
+
+int indicator_util_layout_add(win_info *win)
+{
+ retif(win == NULL
+ || win->layout_main == NULL, FAIL, "Invalid parameter!");
+ indicator_util_layout_del(win);
+ return icon_box_init(win);
+}
+
+
+int indicator_util_icon_width_set(Indicator_Icon_Object *icon)
+{
+ return 0;
+}
+
+static int _icon_update(Indicator_Icon_Object *icon)
+{
+ struct appdata *ad = NULL;
+ Evas_Object *txt_eo, *img_eo;
+ char buf[PATH_MAX];
+
+ retif(icon == NULL || icon->ad == NULL, FAIL, "Invalid parameter!");
+ ad = icon->ad;
+
+ memset(buf, 0x00, sizeof(buf));
+
+ if (icon->type == INDICATOR_IMG_ICON
+ || icon->type == INDICATOR_TXT_WITH_IMG_ICON) {
+ img_eo = evas_object_data_get(icon->img_obj.obj, "imgicon");
+
+ if (strncmp(icon->img_obj.data, "/", 1) != 0) {
+ snprintf(buf, sizeof(buf), "%s/%s", get_icon_dir(),
+ icon->img_obj.data);
+ elm_image_file_set(img_eo, buf, NULL);
+ } else {
+ retif(icon->img_obj.data[0] == '\0', FAIL,
+ "Invalid parameter!");
+ elm_image_file_set(img_eo, icon->img_obj.data, NULL);
+ }
+
+ if (icon->img_obj.width >= 0 && icon->img_obj.height>=0) {
+ evas_object_size_hint_min_set(img_eo,
+ icon->img_obj.width * elm_config_scale_get(),
+ icon->img_obj.height * elm_config_scale_get());
+ } else {
+ evas_object_size_hint_min_set(img_eo,
+ DEFAULT_ICON_WIDTH * elm_config_scale_get(),
+ DEFAULT_ICON_HEIGHT * elm_config_scale_get());
+ }
+ }
+
+ if (icon->type == INDICATOR_TXT_ICON
+ || icon->type == INDICATOR_TXT_WITH_IMG_ICON) {
+ char *color_added_str = NULL;
+ txt_eo = evas_object_data_get(icon->txt_obj.obj, "txticon");
+ color_added_str =
+ (char *)set_label_text_color(icon->txt_obj.data);
+ elm_object_text_set(txt_eo, color_added_str);
+ free(color_added_str);
+ }
+ return OK;
+}
+
+void indicator_util_icon_show(Indicator_Icon_Object *icon)
+{
+ struct appdata *ad = (struct appdata *)icon->ad;
+
+ retif(icon == NULL, , "Invalid parameter!");
+
+ if (icon->obj_exist != EINA_FALSE)
+ {
+ _icon_update(icon);
+ }
+
+ if (hide_other_icons_in_view_list(icon) == FAIL)
+ {
+ return;
+ }
+
+ icon->wish_to_show = EINA_TRUE;
+ DBG("[ICON UTIL] %s %d icon is shown!", icon->name, icon->win_type);
+
+ icon_box_pack(icon);
+
+ indicator_util_update_display(&(ad->win[icon->win_type]));
+}
+
+void indicator_util_icon_hide(Indicator_Icon_Object *icon)
+{
+ int ret;
+
+ retif(icon == NULL, , "Invalid parameter!");
+
+ memset(icon->data, 0x00, sizeof(icon->data));
+ icon->wish_to_show = EINA_FALSE;
+
+ DBG("%s icon is hidden!", icon->name);
+
+ if (icon->exist_in_view == EINA_TRUE) {
+ ret = icon_box_unpack(icon);
+
+ if (ret == FAIL)
+ ERR("Failed to unpack %s!", icon->name);
+
+ show_other_icon_in_same_priority(icon);
+ }
+
+ struct appdata *ad = (struct appdata *)icon->ad;
+
+ indicator_util_update_display(&(ad->win[icon->win_type]));
+}
+
+void indicator_util_event_count_set(int count, void *data)
+{
+ struct appdata *ad = data;
+ static int _cnt = -1;
+ char buf[1024];
+
+ retif(data == NULL, , "Cannot get layout!");
+
+ if (_cnt != count) {
+ memset(buf, 0x00, sizeof(buf));
+ if (count) {
+ snprintf(buf, sizeof(buf), "%d", count);
+ indicator_signal_emit(data,"badge,show,1","elm.image.badge");
+ } else {
+ indicator_signal_emit(data,"badge,hide,1","elm.image.badge");
+ }
+
+ indicator_part_text_emit(data,"elm.text.badge", buf);
+ _cnt = count;
+ }
+}
+
+unsigned int indicator_util_max_visible_event_count(int type)
+{
+ return indicator_get_max_count_in_non_fixed_list(type);
+}
--- /dev/null
+/*
+ * 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 __INDICATOR_ICON_UTIL_H__
+#define __INDICATOR_ICON_UTIL_H__
+
+#include <Elementary.h>
+#include "indicator.h"
+#include "indicator_ui.h"
+
+enum {
+ ICON_STATE_HIDDEN = 0,
+ ICON_STATE_SHOWN
+};
+
+enum indicator_view_mode {
+ INDICATOR_KEEP_VIEW = -1,
+ INDICATOR_FULL_VIEW,
+ INDICATOR_CLOCK_VIEW
+};
+
+extern int indicator_util_layout_add(win_info *win);
+extern int indicator_util_layout_del(win_info *win);
+
+extern void indicator_util_icon_show(Indicator_Icon_Object *obj);
+extern void indicator_util_icon_hide(Indicator_Icon_Object *obj);
+extern void indicator_util_icon_animation_set(Indicator_Icon_Object *icon,
+ enum indicator_icon_ani type);
+extern int indicator_util_icon_width_set(Indicator_Icon_Object *icon);
+extern char *indicator_util_icon_label_set(const char *buf, char *font_name,
+ char *font_style, int font_size,
+ void *data);
+extern Eina_Bool indicator_util_icon_add(win_info *win,Indicator_Icon_Object *icon);
+extern Eina_Bool indicator_util_icon_del(Indicator_Icon_Object *icon);
+
+extern void indicator_util_event_count_set(int count, void *data);
+extern unsigned int indicator_util_max_visible_event_count(int type);
+#endif /*__INDICATOR_ICON_UTIL_H__*/
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <app.h>
+#include <Ecore_X.h>
+#include <vconf.h>
+#include <heynoti.h>
+#include <unistd.h>
+#include <privilege-control.h>
+#include <app_manager.h>
+#include <signal.h>
+#include <minicontrol-monitor.h>
+#include <feedback.h>
+
+#include "common.h"
+#include "indicator_box_util.h"
+#include "indicator_icon_util.h"
+#include "indicator_ui.h"
+#include "indicator_gui.h"
+#include "modules.h"
+#include "indicator_util.h"
+
+#define GRP_MAIN "indicator"
+
+#define WIN_TITLE "Illume Indicator"
+
+#define VCONF_PHONE_STATUS "memory/startapps/sequence"
+
+#define HIBERNATION_ENTER_NOTI "HIBERNATION_ENTER"
+#define HIBERNATION_LEAVE_NOTI "HIBERNATION_LEAVE"
+
+#define UNLOCK_ENABLED 0
+#define TIMEOUT 5
+
+#ifdef HOME_KEY_EMULATION
+
+#define PROP_HWKEY_EMULATION "_HWKEY_EMULATION"
+#define KEY_MSG_PREFIX_PRESS "P:"
+#define KEY_MSG_PREFIX_RELEASE "R:"
+#define KEY_MSG_PREFIX_PRESS_C "PC"
+#define KEY_MSG_PREFIX_RELEASE_C "RC"
+
+#ifndef KEY_HOME
+#define KEY_HOME "XF86Phone"
+#endif
+#endif
+
+#define APP_TRAY_PKG_NAME "com.samsung.app-tray"
+
+static Eina_Bool home_button_pressed = EINA_FALSE;
+static Eina_Bool show_hide_pressed = EINA_FALSE;
+
+
+int indicator_icon_show_state = 0;
+
+static void _change_home_padding(void *data, int angle);
+static void _change_nonfixed_icon_padding(void *data, Eina_Bool status);
+static void _change_max_nonfixed_icon_count(void *data,
+ Eina_Bool status, int angle);
+static Eina_Bool _change_view(Ecore_X_Window win, void *data);
+static int check_system_status(void);
+
+static int indicator_window_new(void *data);
+static int indicator_window_del(void *data);
+
+static void _indicator_check_battery_percent_on_cb(keynode_t *node, void *data);
+static void _indicator_low_bat_cb(void *data);
+static void _indicator_lang_changed_cb(void *data);
+static void _indicator_region_changed_cb(void *data);
+static void _indicator_hibernation_enter_cb(void *data);
+static void _indicator_hibernation_leave_cb(void *data);
+static void _indicator_window_delete_cb(void *data, Evas_Object * obj,
+ void *event);
+static Eina_Bool _indicator_client_message_cb(void *data, int type,
+ void *event);
+static void _indicator_mouse_down_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event);
+static void _indicator_mouse_move_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event);
+static void _indicator_mouse_up_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event);
+
+
+static void _change_home_padding(void *data, int angle)
+{
+ struct appdata *ad = (struct appdata *)data;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ switch (angle) {
+ case 0:
+ indicator_signal_emit(data,
+ "change,home,pad,2", "elm.rect.*");
+ break;
+ case 90:
+ indicator_signal_emit(data,
+ "change,home,pad,1", "elm.rect.*");
+ break;
+ case 180:
+ indicator_signal_emit(data,
+ "change,home,pad,2", "elm.rect.*");
+ break;
+ case 270:
+ indicator_signal_emit(data,
+ "change,home,pad,1", "elm.rect.*");
+ break;
+ default:
+ indicator_signal_emit(data,
+ "change,home,pad,2", "elm.rect.*");
+ break;
+ }
+}
+
+static void _change_nonfixed_icon_padding(void *data, Eina_Bool status)
+{
+ struct appdata *ad = (struct appdata *)data;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ if (status == EINA_TRUE)
+ indicator_signal_emit(data, "change,padding,1", "elm.rect.*");
+ else
+ indicator_signal_emit(data, "change,padding,2", "elm.rect.*");
+}
+
+
+static void _change_max_nonfixed_icon_count(void *data,
+ Eina_Bool status, int angle)
+{
+ struct appdata *ad = (struct appdata *)data;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ DBG("Current angle : %d", ad->angle);
+
+ indicator_set_count_in_non_fixed_list(ad->angle, status);
+}
+
+static int check_system_status(void)
+{
+ int ret, value = -1;
+
+ ret = vconf_get_int(VCONFKEY_PWLOCK_STATE, &value);
+ if (ret == OK &&
+ (value == VCONFKEY_PWLOCK_BOOTING_LOCK ||
+ value == VCONFKEY_PWLOCK_RUNNING_LOCK))
+ return FAIL;
+
+ return OK;
+}
+
+static void _change_top_win(enum _win_type type, void *data)
+{
+ struct appdata *ad = data;
+ int i = 0;
+ retif(data == NULL, , "Invalid parameter!");
+
+ DBG("Current Top Window : %d", type);
+ ad->top_win = type;
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ indicator_util_update_display(&(ad->win[i]));
+ }
+}
+
+static char *_get_top_window_name(void *data)
+{
+ Ecore_X_Window topwin = ecore_x_window_root_first_get();
+ Ecore_X_Window active;
+ static Eina_Strbuf *temp_buf = NULL;
+
+ char *pkgname = NULL;
+ char *win_name = NULL;
+ char *ret_name = NULL;
+
+ int pid;
+
+ retif(data == NULL, NULL, "Invalid parameter!");
+
+ if (ecore_x_window_prop_xid_get(topwin, ECORE_X_ATOM_NET_ACTIVE_WINDOW,
+ ECORE_X_ATOM_WINDOW, &active,
+ 1) == FAIL)
+ return NULL;
+
+ if (ecore_x_netwm_pid_get(active, &pid) == EINA_FALSE) {
+ Ecore_X_Atom atom;
+ unsigned char *in_pid;
+ int num;
+
+ atom = ecore_x_atom_get("X_CLIENT_PID");
+ if (ecore_x_window_prop_property_get(topwin,
+ atom, ECORE_X_ATOM_CARDINAL,
+ sizeof(int), &in_pid, &num) == EINA_FALSE) {
+ DBG("Failed to get PID from a window 0x%X", topwin);
+
+ if(in_pid != NULL)
+ free(in_pid);
+
+ return NULL;
+ }
+ pid = *(int *)in_pid;
+ free(in_pid);
+ }
+
+ DBG("Window (0x%X) PID is %d", topwin, pid);
+
+ if (app_manager_get_package(pid,&pkgname) != APP_MANAGER_ERROR_NONE)
+ {
+ if (ecore_x_netwm_name_get(active, &win_name) == EINA_FALSE)
+ return NULL;
+ else
+ return win_name;
+ }
+
+ DBG("Pkgname : %s", pkgname);
+
+ temp_buf = eina_strbuf_new();
+ eina_strbuf_append_printf(temp_buf, "%s", pkgname);
+ ret_name = eina_strbuf_string_steal(temp_buf);
+ eina_strbuf_free(temp_buf);
+
+ if(pkgname != NULL)
+ free(pkgname);
+
+ return ret_name;
+}
+
+static Eina_Bool _change_view(Ecore_X_Window win, void *data)
+{
+ char *top_win_name = NULL;
+ enum _win_type type;
+
+ if (data == NULL)
+ return EINA_FALSE;
+
+ top_win_name = _get_top_window_name(data);
+
+ if (top_win_name != NULL) {
+ Eina_Bool ret = EINA_TRUE;
+
+ INFO("TOP WINDOW NAME = %s", top_win_name);
+
+ if (!strncmp(top_win_name, QUICKPANEL_NAME,
+ strlen(top_win_name))) {
+ type = TOP_WIN_QUICKPANEL;
+ ret = EINA_FALSE;
+ } else if (!strncmp(top_win_name, HOME_SCREEN_NAME,
+ strlen(top_win_name)))
+ type = TOP_WIN_HOME_SCREEN;
+ else if (!strncmp(top_win_name, LOCK_SCREEN_NAME,
+ strlen(top_win_name)))
+ type = TOP_WIN_LOCK_SCREEN;
+ else if (!strncmp(top_win_name, MENU_SCREEN_NAME,
+ strlen(top_win_name)))
+ type = TOP_WIN_MENU_SCREEN;
+ else if (!strncmp(top_win_name, CALL_NAME,
+ strlen(top_win_name)))
+ type = TOP_WIN_CALL;
+ else if (!strncmp(top_win_name, VTCALL_NAME,
+ strlen(top_win_name)))
+ type = TOP_WIN_CALL;
+ else
+ type = TOP_WIN_NORMAL;
+
+ free(top_win_name);
+ _change_top_win(type, data);
+
+ return ret;
+ } else {
+ type = TOP_WIN_NORMAL;
+ }
+ _change_top_win(type, data);
+ return EINA_TRUE;
+}
+
+static void _indicator_check_battery_percent_on_cb(keynode_t *node, void *data)
+{
+ struct appdata *ad = (struct appdata *)data;
+ int ret = FAIL;
+ int status = 0;
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &status);
+
+ if (ret == OK) {
+ _change_nonfixed_icon_padding(data, status);
+ _change_max_nonfixed_icon_count(data, status, ad->angle);
+ } else
+ ERR("Fail to get vconfkey : %s",
+ VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL);
+}
+
+static void _indicator_low_bat_cb(void *data)
+{
+ INFO("LOW_BATTERY!");
+}
+
+static void _indicator_lang_changed_cb(void *data)
+{
+ INFO("CHANGE LANGUAGE!");
+ indicator_lang_changed_modules(data);
+}
+
+static void _indicator_region_changed_cb(void *data)
+{
+ INFO("CHANGE REGION!");
+ indicator_region_changed_modules(data);
+}
+
+static void _indicator_hibernation_enter_cb(void *data)
+{
+ indicator_hib_enter_modules(data);
+}
+
+static void _indicator_hibernation_leave_cb(void *data)
+{
+ indicator_hib_leave_modules(data);
+}
+
+static void _indicator_window_delete_cb(void *data, Evas_Object * obj,
+ void *event)
+{
+ struct appdata *ad = (struct appdata *)data;
+ retif(data == NULL, , "Invalid parameter!");
+
+ indicator_window_del(ad);
+}
+
+static void _indicator_notify_pm_state_cb(keynode_t * node, void *data)
+{
+
+ struct appdata *ad = (struct appdata *)data;
+ int val = -1;
+
+ if (data == NULL) {
+ ERR("lockd is NULL");
+ return;
+ }
+
+ if (vconf_get_int(VCONFKEY_PM_STATE, &val) < 0) {
+ ERR("Cannot get VCONFKEY_PM_STATE");
+ return;
+ }
+
+ DBG("PM state Notification!!(%d)",val);
+
+ indicator_util_update_display(data);
+
+}
+
+static void _rotate_window(void *data, int new_angle)
+{
+
+}
+
+#ifdef INDICATOR_SUPPORT_OPACITY_MODE
+static void _change_opacity(void *data, enum indicator_opacity_mode mode)
+{
+ struct appdata *ad = NULL;
+ const char *signal = NULL;
+ retif(data == NULL, , "Invalid parameter!");
+
+ ad = data;
+
+ switch (mode) {
+ case INDICATOR_OPACITY_OPAQUE:
+ signal = "bg.opaque";
+ ad->opacity_mode = mode;
+ break;
+ case INDICATOR_OPACITY_TRANSLUCENT:
+ signal = "bg.translucent";
+ ad->opacity_mode = mode;
+ break;
+ case INDICATOR_OPACITY_TRANSPARENT:
+ signal = "bg.transparent";
+ ad->opacity_mode = mode;
+ break;
+ default:
+ ERR("unknown mode : %d", mode);
+ signal = "bg.opaque";
+ ad->opacity_mode = INDICATOR_OPACITY_OPAQUE;
+ break;
+
+ }
+ ad->opacity_mode = mode;
+
+ indicator_signal_emit(data,signal, "indicator.prog");
+
+ DBG("send signal [%s] to indicator layout", signal);
+}
+
+static void _notification_panel_changed(void *data, int is_open)
+{
+ struct appdata *ad = NULL;
+ retif(data == NULL, , "Invalid parameter!");
+
+ ad = data;
+
+ if (is_open) {
+ indicator_signal_emit(data,"bg.notification", "indicator.prog");
+
+ DBG("send signal [%s] to indicator layout", "bg.notification");
+ }
+ else
+ _change_opacity(data, ad->opacity_mode);
+}
+
+#endif
+
+static Eina_Bool _indicator_client_message_cb(void *data, int type, void *event)
+{
+ Ecore_X_Event_Client_Message *ev =
+ (Ecore_X_Event_Client_Message *) event;
+ int new_angle;
+
+ retif(data == NULL
+ || event == NULL, ECORE_CALLBACK_RENEW, "Invalid parameter!");
+
+#ifdef INDICATOR_SUPPORT_OPACITY_MODE
+ if (ev->message_type == ECORE_X_ATOM_E_ILLUME_INDICATOR_OPACITY_MODE) {
+ int trans_mode;
+
+ if (ev->data.l[0]
+ == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSLUCENT)
+ trans_mode = INDICATOR_OPACITY_TRANSLUCENT;
+ else if (ev->data.l[0]
+ == ECORE_X_ATOM_E_ILLUME_INDICATOR_TRANSPARENT)
+ trans_mode = INDICATOR_OPACITY_TRANSPARENT;
+ else
+ trans_mode = INDICATOR_OPACITY_OPAQUE;
+
+ _change_opacity(data, trans_mode);
+ }
+#endif
+
+ if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) {
+#ifdef INDICATOR_SUPPORT_OPACITY_MODE
+ if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_ON)
+ _notification_panel_changed(data, 1);
+ else if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
+ _notification_panel_changed(data, 0);
+
+#else
+ if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF)
+ _change_view(ecore_x_window_root_first_get(), data);
+#endif
+ }
+
+ if (ev->message_type == ECORE_X_ATOM_E_ILLUME_ROTATE_WINDOW_ANGLE) {
+ }
+ return ECORE_CALLBACK_RENEW;
+}
+
+
+static Eina_Bool _property_changed_cb(void *data, int type, void *event)
+{
+ Ecore_X_Event_Window_Property *ev = event;
+
+ if (ev == NULL || ev->atom != ECORE_X_ATOM_NET_ACTIVE_WINDOW)
+ return EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
+static void _mctrl_monitor_cb(minicontrol_action_e action,
+ const char *name, unsigned int width,
+ unsigned int height,
+ minicontrol_priority_e priority,
+ void *data)
+{
+ retif(!data, , "data is NULL");
+ retif(!name, , "name is NULL");
+
+ indicator_minictrl_control_modules(action,name,data);
+}
+
+static void _register_event_handler_both(win_info *win, void *data)
+{
+ retif(win == NULL, , "Invalid parameter!");
+
+ evas_object_smart_callback_add(win->win_main,
+ "delete,request",
+ _indicator_window_delete_cb, data);
+ evas_object_event_callback_add(win->layout_main,
+ EVAS_CALLBACK_MOUSE_DOWN,
+ _indicator_mouse_down_cb, win);
+
+ evas_object_event_callback_add(win->layout_main,
+ EVAS_CALLBACK_MOUSE_MOVE,
+ _indicator_mouse_move_cb, win);
+
+ evas_object_event_callback_add(win->layout_main,
+ EVAS_CALLBACK_MOUSE_UP,
+ _indicator_mouse_up_cb, win);
+
+}
+
+static void register_event_handler(void *data)
+{
+ int ret;
+ int i = 0;
+ struct appdata *ad = data;
+ Ecore_Event_Handler *hdl = NULL;
+ retif(data == NULL, , "Invalid parameter!");
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ _register_event_handler_both(&(ad->win[i]),data);
+ }
+ hdl = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
+ _indicator_client_message_cb, (void *)ad);
+ retif(hdl == NULL, , "Failed to register ecore_event_handler!");
+ ad->evt_handlers = eina_list_append(ad->evt_handlers, hdl);
+
+ hdl = ecore_event_handler_add(ECORE_X_EVENT_WINDOW_PROPERTY,
+ _property_changed_cb, data);
+ retif(hdl == NULL, , "Failed to register ecore_event_handler!");
+ ad->evt_handlers = eina_list_append(ad->evt_handlers, hdl);
+
+ ad->notifd = heynoti_init();
+ if (ad->notifd == -1) {
+ ERR("noti init is failed");
+ return;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL,
+ _indicator_check_battery_percent_on_cb, (void *)ad);
+
+ if (ret == -1) {
+ ERR("noti start is failed\n");
+ return;
+ }
+
+ if (vconf_notify_key_changed
+ (VCONFKEY_PM_STATE, _indicator_notify_pm_state_cb, (void *)ad) != 0) {
+ ERR("Fail vconf_notify_key_changed : VCONFKEY_PM_STATE");
+ }
+
+ heynoti_subscribe(ad->notifd, HIBERNATION_ENTER_NOTI,
+ _indicator_hibernation_enter_cb, (void *)ad);
+ heynoti_subscribe(ad->notifd, HIBERNATION_LEAVE_NOTI,
+ _indicator_hibernation_leave_cb, (void *)ad);
+
+ ret = heynoti_attach_handler(ad->notifd);
+ if (ret == -1) {
+ ERR("noti start is failed\n");
+ return;
+ }
+ ret = minicontrol_monitor_start(_mctrl_monitor_cb, data);
+ if (ret != MINICONTROL_ERROR_NONE) {
+ ERR("fail to minicontrol_monitor_start()- %d", ret);
+ return;
+ }
+
+}
+
+static void _unregister_event_handler_both(win_info *win)
+{
+ retif(win == NULL, , "Invalid parameter!");
+
+ evas_object_smart_callback_del(win->win_main,
+ "delete-request",
+ _indicator_window_delete_cb);
+
+ evas_object_event_callback_del(win->layout_main,
+ EVAS_CALLBACK_MOUSE_DOWN,
+ _indicator_mouse_down_cb);
+
+ evas_object_event_callback_del(win->layout_main,
+ EVAS_CALLBACK_MOUSE_MOVE,
+ _indicator_mouse_move_cb);
+
+ evas_object_event_callback_del(win->layout_main,
+ EVAS_CALLBACK_MOUSE_UP,
+ _indicator_mouse_up_cb);
+
+}
+
+static int unregister_event_handler(void *data)
+{
+ struct appdata *ad = (struct appdata *)data;
+ int i = 0;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ _unregister_event_handler_both(&(ad->win[i]));
+ }
+
+ vconf_ignore_key_changed(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL,
+ _indicator_check_battery_percent_on_cb);
+
+ heynoti_unsubscribe(ad->notifd, HIBERNATION_ENTER_NOTI,
+ _indicator_hibernation_enter_cb);
+ heynoti_unsubscribe(ad->notifd, HIBERNATION_LEAVE_NOTI,
+ _indicator_hibernation_leave_cb);
+
+ heynoti_close(ad->notifd);
+ ad->notifd = 0;
+
+ Ecore_Event_Handler *hdl = NULL;
+ EINA_LIST_FREE(ad->evt_handlers, hdl) {
+ if (hdl)
+ ecore_event_handler_del(hdl);
+ }
+
+ minicontrol_monitor_stop();
+
+ return OK;
+}
+
+static Evas_Object *load_edj(Evas_Object * parent, const char *file,
+ const char *group)
+{
+ Evas_Object *eo;
+ int r;
+
+ eo = elm_layout_add(parent);
+ if (eo) {
+ r = elm_layout_file_set(eo, file, group);
+ if (!r) {
+ evas_object_del(eo);
+ return NULL;
+ }
+
+ evas_object_size_hint_weight_set(eo,
+ EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ elm_win_resize_object_add(parent, eo);
+ }
+
+ return eo;
+}
+
+static void create_win(void* data,int type)
+{
+ Evas_Object *win_port;
+ char *indi_name = NULL;
+
+ struct appdata *ad = data;
+ Ecore_X_Window xwin;
+ Ecore_X_Window zone;
+ Ecore_X_Window_State states[2];
+ int root_w;
+ int root_h;
+ Ecore_X_Window root;
+
+ if(type == INDICATOR_WIN_PORT)
+ {
+ ad->win[type].win_main = elm_win_add(NULL, "portrait_indicator", ELM_WIN_SOCKET_IMAGE);
+ indi_name = "elm_indicator_portrait";
+ }
+ else
+ {
+ ad->win[type].win_main = elm_win_add(NULL, "win_socket_test:land", ELM_WIN_SOCKET_IMAGE);
+ indi_name = "elm_indicator_landscape";
+ }
+
+ retif(ad->win[type].win_main == NULL, FAIL, "elm_win_add failed!");
+
+ if (!elm_win_socket_listen(ad->win[type].win_main , indi_name, 0, EINA_FALSE))
+ {
+ printf("fail to elm_win_socket_listen():port \n");
+ evas_object_del(ad->win[type].win_main);
+ return;
+ }
+ elm_win_alpha_set(ad->win[type].win_main , EINA_TRUE);
+
+ if(type == INDICATOR_WIN_PORT)
+ {
+ elm_win_title_set(ad->win[type].win_main, "win sock test:port");
+ }
+ else
+ {
+ elm_win_title_set(ad->win[type].win_main, "win sock test:land");
+ }
+
+ elm_win_borderless_set(ad->win[type].win_main , EINA_TRUE);
+
+ evas_object_size_hint_fill_set(ad->win[type].win_main , EVAS_HINT_EXPAND,
+ EVAS_HINT_EXPAND);
+ evas_object_size_hint_align_set(ad->win[type].win_main , 1.0, 0.5);
+
+ xwin = elm_win_xwindow_get(ad->win[type].win_main );
+ ecore_x_icccm_hints_set(xwin, 0, 0, 0, 0, 0, 0, 0);
+ states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
+ states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
+ ecore_x_netwm_window_state_set(xwin, states, 2);
+
+ ecore_x_icccm_name_class_set(xwin, "INDICATOR", "INDICATOR");
+
+ zone = ecore_x_e_illume_zone_get(xwin);
+ ecore_x_event_mask_set(zone, ECORE_X_EVENT_MASK_WINDOW_CONFIGURE);
+
+ ad->win[type].evas = evas_object_evas_get(ad->win[type].win_main );
+
+ ad->win[type].layout_main = load_edj(ad->win[type].win_main , EDJ_FILE, GRP_MAIN);
+ retif(ad->win[type].layout_main == NULL, FAIL, "Failed to get layout main!");
+ root = ecore_x_window_root_first_get();
+ ecore_x_window_size_get(root, &root_w, &root_h);
+ INFO("xwin_size = %d %d", root_w, root_h);
+
+ ad->scale = elm_config_scale_get();
+ INFO("scale = %f", ad->scale);
+
+ if(type == INDICATOR_WIN_PORT)
+ {
+ ad->win[type].w = root_w;
+ }
+ else
+ {
+ ad->win[type].w = root_h;
+ }
+
+ ad->win[type].h = (int)(INDICATOR_HEIGHT * ad->scale);
+ evas_object_resize(ad->win[type].win_main , ad->win[type].w, ad->win[type].h);
+ evas_object_move(ad->win[type].win_main , 0, 0);
+ INFO("win_size = %d, %d", ad->win[type].w, ad->win[type].h);
+
+ ad->win[type].type = type;
+
+#ifdef HOME_KEY_EMULATION
+ int ret = 0;
+ ad->win[type].atom_hwkey = ecore_x_atom_get(PROP_HWKEY_EMULATION);
+ ret = ecore_x_window_prop_window_get(root, ad->win[type].atom_hwkey,
+ &ad->win[type].win_hwkey, 1);
+ if (ret <= 0)
+ ERR("Failed to get window property ! (ret=%d)", ret);
+#endif
+
+ indicator_util_layout_add(&(ad->win[type]));
+
+ if(type == INDICATOR_WIN_LAND)
+ {
+ Evas_Object *edje;
+ edje = elm_layout_edje_get(ad->win[type].layout_main);
+ edje_object_signal_emit(edje, "change,home,pad,1", "elm.rect.*");
+ }
+
+ ad->win[type].data = data;
+
+ evas_object_show(ad->win[type].layout_main);
+ evas_object_show(ad->win[type].win_main);
+ return ;
+}
+
+static void _indicator_init_wininfo(void * data)
+{
+ int i = 0;
+ struct appdata *ad = data;
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ memset(&(ad->win[i]),0x00,sizeof(win_info));
+ }
+}
+
+static int indicator_window_new(void *data)
+{
+ int i = 0;
+ struct appdata *ad = data;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ _indicator_init_wininfo(data);
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ create_win(data,i);
+ }
+ indicator_util_show_hide_icons(data,0);
+
+ register_event_handler(ad);
+
+ return OK;
+}
+
+static int indicator_window_del(void *data)
+{
+ int i = 0;
+ struct appdata *ad = (struct appdata *)data;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ indicator_fini_modules(data);
+ unregister_event_handler(ad);
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ indicator_util_layout_del(&(ad->win[i]));
+ evas_image_cache_flush(ad->win[i].evas);
+ evas_object_del(ad->win[i].layout_main);
+ ad->win[i].layout_main = NULL;
+ evas_object_del(ad->win[i].win_main);
+ ad->win[i].win_main = NULL;
+ }
+
+ if (ad)
+ free(ad);
+
+ elm_exit();
+ return OK;
+}
+
+static inline int _indicator_home_icon_action(void *data, int press)
+{
+ win_info *win = NULL;
+ int ret = -1;
+ const char *signal = NULL;
+
+ retif(!data, ret, "data is NULL");
+ win = (win_info*)data;
+ retif(!win->layout_main, ret, "ad->layout_main is NULL");
+
+ if (press)
+ signal = "home.pressed";
+ else
+ signal = "home.released";
+
+ ret = vconf_set_int(VCONF_INDICATOR_HOME_PRESSED, !(!press));
+ if (!ret)
+ elm_object_signal_emit(win->layout_main,
+ signal, "indicator.prog");
+
+ return ret;
+}
+
+#ifdef HOME_KEY_EMULATION
+static Eina_Bool _indicator_hw_home_key_press(void *data)
+{
+ win_info *win = NULL;
+ char message[20] = {'\0', };
+
+ retif(!data, EINA_FALSE, "data is NULL");
+
+ win = (win_info *)data;
+
+ retif(!win->win_hwkey, EINA_FALSE, "window for hw emulation is NULL");
+
+ snprintf(message, sizeof(message), "%s%s",
+ KEY_MSG_PREFIX_PRESS, KEY_HOME);
+
+ return ecore_x_client_message8_send(win->win_hwkey, win->atom_hwkey,
+ message, strlen(message));
+}
+
+static Eina_Bool _indicator_hw_home_key_release(void *data)
+{
+ char message[20] = {'\0', };
+ win_info *win = (win_info*)data;
+
+ retif(!data, EINA_FALSE, "data is NULL");
+
+ retif(!win->win_hwkey, EINA_FALSE, "window for hw emulation is NULL");
+
+
+ snprintf(message, sizeof(message), "%s%s",
+ KEY_MSG_PREFIX_RELEASE, KEY_HOME);
+
+ return ecore_x_client_message8_send(win->win_hwkey, win->atom_hwkey,
+ message, strlen(message));
+}
+static Eina_Bool _indicator_hw_home_key_press_cancel(void *data)
+{
+ win_info *win = (win_info*)data;
+ char message[20] = {'\0', };
+
+ retif(!data, EINA_FALSE, "data is NULL");
+
+ retif(!win->win_hwkey, EINA_FALSE, "window for hw emulation is NULL");
+
+ snprintf(message, sizeof(message), "%s%s",
+ KEY_MSG_PREFIX_PRESS_C, KEY_HOME);
+
+ return ecore_x_client_message8_send(win->win_hwkey, win->atom_hwkey,
+ message, strlen(message));
+}
+
+static Eina_Bool _indicator_hw_home_key_release_cancel(void *data)
+{
+ win_info *win = (win_info*)data;
+ char message[20] = {'\0', };
+
+ retif(!data, EINA_FALSE, "data is NULL");
+
+ retif(!win->win_hwkey, EINA_FALSE, "window for hw emulation is NULL");
+
+
+ snprintf(message, sizeof(message), "%s%s",
+ KEY_MSG_PREFIX_RELEASE_C, KEY_HOME);
+
+ return ecore_x_client_message8_send(win->win_hwkey, win->atom_hwkey,
+ message, strlen(message));
+}
+
+#endif
+
+static void _indicator_mouse_down_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event)
+{
+ win_info *win = (win_info*)data;
+ Evas_Event_Mouse_Down *ev = NULL;
+
+ retif(data == NULL || event == NULL, , "Invalid parameter!");
+ ev = event;
+
+ win->mouse_event.x = ev->canvas.x;
+ win->mouse_event.y = ev->canvas.y;
+
+ DBG("_indicator_mouse_down_cb : %d %d", ev->canvas.x, ev->canvas.y);
+
+#ifdef HOME_KEY_EMULATION
+ if(indicator_util_check_indicator_area(win, ev->canvas.x, ev->canvas.y))
+ {
+ show_hide_pressed = EINA_TRUE;
+ }
+__CATCH :
+ return;
+#else
+ int mouse_down_prio = -1;
+ mouse_down_prio =
+ indicator_util_get_priority_in_move_area(win, win->mouse_event.x,
+ win->mouse_event.y);
+
+ if (mouse_down_prio > -1) {
+ switch (mouse_down_prio) {
+ case INDICATOR_PRIORITY_FIXED1:
+ {
+ int lock_state = VCONFKEY_IDLE_UNLOCK;
+ int lock_ret = -1;
+
+ lock_ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE,
+ &lock_state);
+ DBG("Check Lock State : %d %d", lock_ret, lock_state);
+
+ if (lock_ret == 0
+ && lock_state == VCONFKEY_IDLE_UNLOCK) {
+ if (!_indicator_home_icon_action(win, 1))
+ home_button_pressed = EINA_TRUE;
+ }
+ }
+ break;
+ }
+ }
+#endif
+}
+
+static void _indicator_mouse_move_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event)
+{
+ Evas_Event_Mouse_Move *ev = NULL;
+ win_info* win = (win_info*)data;
+
+ retif(data == NULL || event == NULL, , "Invalid parameter!");
+
+ ev = event;
+
+ if (show_hide_pressed) {
+ if (!indicator_util_check_indicator_area(win,ev->cur.canvas.x,ev->cur.canvas.y))
+ {
+ show_hide_pressed = FALSE;
+ DBG("cancel show/hide key");
+ }
+ }
+}
+
+static void _indicator_mouse_up_cb(void *data, Evas * e, Evas_Object * obj,
+ void *event)
+{
+
+ Evas_Event_Mouse_Up *ev = NULL;
+ win_info *win = (win_info *)data;
+
+ retif(data == NULL || event == NULL, , "Invalid parameter!");
+
+ ev = event;
+
+ DBG("_indicator_mouse_up_cb : %d %d", ev->canvas.x, ev->canvas.y);
+
+#ifdef HOME_KEY_EMULATION
+ if(indicator_util_check_indicator_area(win, ev->canvas.x, ev->canvas.y))
+ {
+
+ {
+ if(show_hide_pressed == EINA_TRUE)
+ {
+ if(indicator_icon_show_state == 0)
+ {
+ indicator_util_show_hide_icons(win->data,1);
+ indicator_icon_show_state = 1;
+ }
+ else
+ {
+ indicator_util_show_hide_icons(win->data,0);
+ indicator_icon_show_state = 0;
+ }
+
+ feedback_play_type(FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP);
+ }
+ }
+ }
+__CATCH:
+ _indicator_home_icon_action(data, 0);
+ home_button_pressed = EINA_FALSE;
+ show_hide_pressed = EINA_FALSE;
+#else
+ int mouse_up_prio = -1;
+ int mouse_down_prio = -1;
+
+ if (home_button_pressed == EINA_TRUE) {
+ _indicator_home_icon_action(data, 0);
+ home_button_pressed = EINA_FALSE;
+ }
+
+ mouse_down_prio =
+ indicator_util_get_priority_in_move_area(win,win->mouse_event.x,
+ win->mouse_event.y);
+ mouse_up_prio = indicator_util_get_priority_in_move_area(win,ev->canvas.x,
+ ev->canvas.y);
+
+ if (mouse_down_prio > -1 && mouse_up_prio > -1
+ && mouse_down_prio == mouse_up_prio) {
+ switch (mouse_down_prio) {
+ case INDICATOR_PRIORITY_FIXED1:
+ {
+ int lock_state = VCONFKEY_IDLE_UNLOCK;
+ int lock_ret = -1;
+
+ lock_ret = vconf_get_int(VCONFKEY_IDLE_LOCK_STATE,
+ &lock_state);
+ DBG("Check Lock State : %d %d", lock_ret, lock_state);
+
+ if (lock_ret == 0 && lock_state == VCONFKEY_IDLE_LOCK)
+ break;
+
+ char *package = NULL;
+ char *top_win_name = NULL;
+
+ INFO("[Home Button Released]");
+
+ if (check_system_status() == FAIL)
+ break;
+
+ package = vconf_get_str("db/menuscreen/pkgname");
+ if (package) {
+ service_h service;
+ int ret = SERVICE_ERROR_NONE;
+
+ service_create(&service);
+
+ service_set_operation(service, SERVICE_OPERATION_DEFAULT);
+
+ service_set_package(service, package);
+
+ top_win_name = _get_top_window_name(data);
+
+ if (top_win_name != NULL
+ && !strncmp(top_win_name, package,
+ strlen(package)))
+ {
+
+ DBG("service_send_launch_request : %s",
+ top_win_name);
+
+ ret = service_send_launch_request(service, NULL, NULL);
+
+ if(ret != SERVICE_ERROR_NONE)
+ {
+ ERR("Cannot launch app");
+ }
+
+ }
+ else
+ {
+ DBG("app_manager_resume_app : %s",
+ top_win_name);
+
+ ret = app_manager_resume_app(service);
+ if(ret != APP_MANAGER_ERROR_NONE)
+ {
+ ERR("Cannot resume app");
+ }
+ }
+
+ if (top_win_name)
+ free(top_win_name);
+
+ free(package);
+
+ service_destroy(service);
+
+ } else
+ ERR("Cannot get vconf");
+ }
+ break;
+ }
+ }
+#endif
+ win->mouse_event.x = 0;
+ win->mouse_event.y = 0;
+}
+
+static int register_indicator_modules(void *data)
+{
+ indicator_init_modules(data);
+ return OK;
+}
+
+static void _signal_handler(int signum, siginfo_t *info, void *unused)
+{
+ DBG("_signal_handler : Terminated...");
+ app_efl_exit();
+}
+static void _heynoti_event_power_off(void *data)
+{
+ DBG("_heynoti_event_power_off : Terminated...");
+ app_efl_exit();
+}
+
+static bool app_create(void *data)
+{
+ pid_t pid;
+ int ret;
+
+ struct sigaction act;
+ memset(&act,0x00,sizeof(struct sigaction));
+ act.sa_sigaction = _signal_handler;
+ act.sa_flags = SA_SIGINFO;
+
+ ret = sigemptyset(&act.sa_mask);
+ if (ret < 0) {
+ ERR("Failed to sigemptyset[%s]", strerror(errno));
+ }
+ ret = sigaddset(&act.sa_mask, SIGTERM);
+ if (ret < 0) {
+ ERR("Failed to sigaddset[%s]", strerror(errno));
+ }
+ ret = sigaction(SIGTERM, &act, NULL);
+ if (ret < 0) {
+ ERR("Failed to sigaction[%s]", strerror(errno));
+ }
+
+ pid = setsid();
+ if (pid < 0)
+ fprintf(stderr, "[INDICATOR] Failed to set session id!");
+
+ ret = nice(2);
+ if (ret == -1)
+ ERR("Failed to set nice value!");
+ return true;
+}
+
+static void app_terminate(void *data)
+{
+ int i = 0;
+ struct appdata *ad = data;
+ indicator_fini_modules(data);
+ unregister_event_handler(ad);
+
+ feedback_deinitialize();
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ indicator_util_layout_del(&(ad->win[i]));
+ evas_image_cache_flush(ad->win[i].evas);
+ evas_object_del(ad->win[i].layout_main);
+ evas_object_del(ad->win[i].win_main);
+ }
+
+ INFO(" >>>>>>>>>>>>> INDICATOR IS TERMINATED!! <<<<<<<<<<<<<< ");
+
+}
+
+static void app_pause(void *data)
+{
+
+}
+
+static void app_resume(void *data)
+{
+
+}
+
+static void app_service(service_h service, void *data)
+{
+ struct appdata *ad = data;
+ int ret;
+ int i = 0;
+
+ INFO("[INDICATOR IS STARTED]");
+ ret = indicator_window_new(data);
+ retif(ret != OK, FAIL, "Failed to create a new window!");
+
+ _change_view(ecore_x_window_root_first_get(), data);
+
+ _indicator_check_battery_percent_on_cb(NULL, data);
+ register_indicator_modules(data);
+
+ feedback_initialize();
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ if (ad->win[i].win_main)
+ elm_win_activate(ad->win[i].win_main);
+ }
+
+}
+
+int main(int argc, char *argv[])
+{
+
+ struct appdata ad;
+
+ app_event_callback_s event_callback;
+
+ int heyfd = heynoti_init();
+ if (heyfd < 0) {
+ ERR("Failed to heynoti_init[%d]", heyfd);
+ }
+
+ int ret = heynoti_subscribe(heyfd, "power_off_start", _heynoti_event_power_off, NULL);
+ if (ret < 0) {
+ ERR("Failed to heynoti_subscribe[%d]", ret);
+ }
+
+ if(heyfd >= 0)
+ {
+ ret = heynoti_attach_handler(heyfd);
+ if (ret < 0) {
+ ERR("Failed to heynoti_attach_handler[%d]", ret);
+ }
+ }
+
+ ret = control_privilege();
+ if (ret != 0) {
+ fprintf(stderr, "[INDICATOR] Failed to control privilege!");
+ return false;
+ }
+
+ event_callback.create = app_create;
+ event_callback.terminate = app_terminate;
+ event_callback.pause = app_pause;
+ event_callback.resume = app_resume;
+ event_callback.service = app_service;
+ event_callback.low_memory = NULL;
+ event_callback.low_battery = _indicator_low_bat_cb;
+ event_callback.device_orientation = NULL;
+ event_callback.language_changed = _indicator_lang_changed_cb;
+ event_callback.region_format_changed = _indicator_region_changed_cb;
+
+ memset(&ad, 0x0, sizeof(struct appdata));
+
+ return app_efl_main(&argc, &argv, &event_callback, &ad);
+
+}
--- /dev/null
+/*
+ * 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 __DEF_indicator_H_
+#define __DEF_indicator_H_
+
+#include <Elementary.h>
+#include <Ecore_X.h>
+#include "indicator.h"
+
+#if !defined(PACKAGE)
+# define PACKAGE "indicator"
+#endif
+
+#if !defined(LOCALEDIR)
+# define LOCALEDIR "/usr/apps/com.samsung.indicator/res/locale"
+#endif
+
+#if !defined(EDJDIR)
+# define EDJDIR "/usr/apps/com.samsung.indicator/res/edje"
+#endif
+
+#if !defined(ICONDIR)
+# define ICONDIR "/usr/apps/com.samsung.indicator/res/icons"
+#endif
+
+#define EDJ_FILE EDJDIR"/"PACKAGE".edj"
+#define ICON_THEME_FILE EDJDIR"/"PACKAGE"_icon_theme.edj"
+#define ICON_NONFIXED_THEME_FILE EDJDIR"/"PACKAGE"_icon_nonfixed_theme.edj"
+
+#define _S(str) dgettext("sys_string", str)
+#define _(str) gettext(str)
+
+#define HOME_SCREEN_NAME "com.samsung.live-magazine"
+#define MENU_SCREEN_NAME "com.samsung.menu-screen"
+#define LOCK_SCREEN_NAME "com.samsung.idle-lock"
+#define QUICKPANEL_NAME "E Popup"
+#define CALL_NAME "com.samsung.call"
+#define VTCALL_NAME "com.samsung.vtmain"
+
+enum _win_type {
+ TOP_WIN_NORMAL = 0,
+ TOP_WIN_LOCK_SCREEN,
+ TOP_WIN_CALL,
+ TOP_WIN_MENU_SCREEN,
+ TOP_WIN_HOME_SCREEN,
+ TOP_WIN_QUICKPANEL
+};
+
+enum indicator_opacity_mode{
+ INDICATOR_OPACITY_OPAQUE = 0,
+ INDICATOR_OPACITY_TRANSLUCENT,
+ INDICATOR_OPACITY_TRANSPARENT,
+};
+
+struct appdata {
+
+ win_info win[INDICATOR_WIN_MAX];
+
+ double xscale;
+ double yscale;
+ double scale;
+ int angle;
+
+ Eina_Bool lock;
+ Eina_Bool menu;
+ Eina_Bool quickpanel;
+
+ int notifd;
+ Eina_List *evt_handlers;
+
+ enum indicator_opacity_mode opacity_mode;
+
+ enum _win_type top_win;
+
+ void (*update_display) (int);
+};
+
+#endif
--- /dev/null
+/*
+ * 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 <Ecore.h>
+#include <Ecore_X.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "indicator_gui.h"
+#include "indicator_util.h"
+#include "indicator_icon_util.h"
+#include "indicator_box_util.h"
+#include <vconf.h>
+
+#define DEFAULT_DIR ICONDIR
+#define DIR_PREFIX "Theme_%02d_"
+#define LABEL_STRING "<color=#%02x%02x%02x%02x>%s</color>"
+
+static char *_icondir;
+
+char *set_label_text_color(const char *txt)
+{
+ Eina_Strbuf *temp_buf = NULL;
+ Eina_Bool buf_result = EINA_FALSE;
+ char *ret_str = NULL;
+
+ retif(txt == NULL, NULL, "Invalid parameter!");
+
+ temp_buf = eina_strbuf_new();
+ buf_result = eina_strbuf_append_printf(temp_buf,
+ LABEL_STRING, FONT_COLOR, txt);
+
+ if (buf_result == EINA_FALSE)
+ INFO("Failed to make label string!");
+ else
+ ret_str = eina_strbuf_string_steal(temp_buf);
+
+ eina_strbuf_free(temp_buf);
+ return ret_str;
+}
+
+const char *get_icon_dir(void)
+{
+ if (_icondir == NULL)
+ _icondir = DEFAULT_DIR;
+
+ return (const char *)_icondir;
+}
+
+static int _set_icon_dir(char *newdir)
+{
+ char *new_icon_dir = NULL;
+
+ char dirname[PATH_MAX];
+ int r;
+
+ retif(!newdir, FAIL, "Invalid parameter!");
+ memset(dirname, 0x00, sizeof(dirname));
+ r = snprintf(dirname, sizeof(dirname), ICONDIR "/%s", newdir);
+ if (r < 0) {
+ ERR("Failed to set new dir name!");
+ return FAIL;
+ }
+
+ new_icon_dir = strdup(dirname);
+ _icondir = new_icon_dir;
+
+ return 0;
+}
+
+void indicator_signal_emit(void* data, const char *emission, const char *source)
+{
+ struct appdata *ad = (struct appdata *)data;
+ retif(data == NULL, , "Invalid parameter!");
+ Evas_Object *edje;
+ int i = 0;
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ retif(ad->win[i].layout_main == NULL, FAIL, "Invalid parameter!");
+ edje = elm_layout_edje_get(ad->win[i].layout_main);
+ edje_object_signal_emit(edje, emission, source);
+ }
+}
+
+void indicator_part_text_emit(void* data, const char *part, const char *text)
+{
+ struct appdata *ad = (struct appdata *)data;
+ retif(data == NULL, , "Invalid parameter!");
+ Evas_Object *edje;
+ int i = 0;
+
+ for(i=0;i<INDICATOR_WIN_MAX;i++)
+ {
+ retif(ad->win[i].layout_main == NULL, FAIL, "Invalid parameter!");
+ edje = elm_layout_edje_get(ad->win[i].layout_main);
+ edje_object_part_text_set(edje, part, text);
+ }
+}
+
--- /dev/null
+/*
+ * 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 __INDICATOR_UTIL_H__
+#define __INDICATOR_UTIL_H__
+
+extern char *set_label_text_color(const char *txt);
+extern const char *get_icon_dir(void);
+void indicator_signal_emit(void* data, const char *emission, const char *source);
+void indicator_part_text_emit(void* data, const char *part, const char *text);
+
+#endif
--- /dev/null
+CONFIGURE_FILE(${PROJECT_NAME}.xml.in ${CMAKE_CURRENT_BINARY_DIR}/org.tizen.${PROJECT_NAME}.xml)
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/org.tizen.${PROJECT_NAME}.xml DESTINATION ${MANIFESTXMLDIR})
+
+CONFIGURE_FILE(${PROJECT_NAME}.sh.in ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME} DESTINATION /etc/init.d/)
+
+ADD_SUBDIRECTORY(resource)
--- /dev/null
+height = 48
+
--- /dev/null
+[Desktop Entry]
+Encoding=UTF-8
+Name=@PROJECT_NAME@
+Comment=@PROJECT_NAME@ Application
+Exec=@BINDIR@/@PROJECT_NAME@
+Icon=elementary
+Terminal=false
+Type=Application
+Categories=Application;Utility;
+Nodisplay=True
+X-TIZEN-TaskManage=False
+X-TIZEN-Multiple=False
+X-TIZEN-Removable=False
--- /dev/null
+@BINDIR@/@PROJECT_NAME@ &\r
+sleep 7\r
--- /dev/null
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns="http://tizen.org/ns/packages" package="@PKGNAME@" version="0.1.46-1" install-location="internal-only">
+ <label>@PROJECT_NAME@</label>
+ <author email="yjoo93.park@samsung.com" href="www.samsung.com">Youngjoo Park</author>
+ <author email="seungtaek.chung@samsung.com" href="www.samsung.com">seungtaek chung</author>
+ <author email="sung1103.park@samsung.com" href="www.samsung.com">Sung Park</author>
+ <description>@PROJECT_NAME@</description>
+ <ui-application appid="@PKGNAME@" exec="@BINDIR@/@PROJECT_NAME@" nodisplay="true" multiple="false" type="capp" taskmanage="false">
+ <icon>@PKGNAME@.png</icon>
+ <label>@PROJECT_NAME@</label>
+ </ui-application>
+</manifest>
\ No newline at end of file
--- /dev/null
+ADD_CUSTOM_TARGET(indicator.edj
+ COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/icons_edc
+ ${CMAKE_CURRENT_SOURCE_DIR}/indicator.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/indicator.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/indicator.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} indicator.edj)
+
+ADD_CUSTOM_TARGET(indicator_icon_theme.edj
+ COMMAND edje_cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/indicator_icon_theme.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/indicator_icon_theme.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/indicator_icon_theme.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} indicator_icon_theme.edj)
+
+ADD_CUSTOM_TARGET(indicator_icon_nonfixed_theme.edj
+ COMMAND edje_cc
+ ${CMAKE_CURRENT_SOURCE_DIR}/indicator_icon_nonfixed_theme.edc
+ ${CMAKE_CURRENT_BINARY_DIR}/indicator_icon_nonfixed_theme.edj
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/indicator_icon_nonfixed_theme.edc
+)
+ADD_DEPENDENCIES(${PROJECT_NAME} indicator_icon_nonfixed_theme.edj)
+
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/indicator.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/indicator_icon_theme.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/indicator_icon_nonfixed_theme.edj DESTINATION ${EDJDIR})
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.png")
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.PNG")
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/icons DESTINATION ${RESDIR} FILES_MATCHING PATTERN "*.gif")
+
--- /dev/null
+/*
+ * 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 "indicator_gui.h"
+#include "indicator_common.edc"
+
+collections {
+ group {
+ name: "indicator";
+ script {
+ public bg_set, badge_set, theme, changepad, changebg, changeHomePad;
+ }
+ styles
+ {
+ style {
+ name: "textblock_style";
+ base: "font=Tizen:style=Medium text_class=tizen color=#FFFFFFFF ";
+ }
+ style {
+ name: "textblock_outline_style";
+ base: "font=Tizen:style=Medium text_class=tizen color=#FFFFFFFF";
+ }
+ style {
+ name: "message_style";
+ base: "font=Tizen:style=Medium text_class=tizen font_size=23 color=#FFFFFFCC valign=middle wrap=none ellipsis=1";
+ }
+ }
+
+ images {
+ image: "B03_Status_bar_line.PNG" COMP;
+ }
+
+ parts {
+ part {
+ name: "background";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_HEIGHT;
+ color: 0 0 0 0;
+ }
+ }
+ part {
+ name: "padding.top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_PADDING_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "background"; }
+ rel2 { relative: 1.0 0.0; to: "background"; }
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "padding.bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_PADDING_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 1.0; to: "background"; }
+ rel2 { relative: 1.0 1.0; to: "background"; }
+ align: 0.0 1.0;
+ visible: 0;
+ }
+
+ }
+
+ part {
+ name: "padding.left";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: LEFT_PADDING_WIDTH 0;
+ fixed: 1 0;
+ rel1.relative: 0.0 0.0;
+ rel2.relative: 0.0 1.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ }
+
+
+ part {
+ name: "padding.right";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: RIGHT_PADDING_WIDTH 0;
+ fixed: 1 0;
+ rel1.relative: 1.0 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.rect.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ rel1 {
+ relative: 0.0 0.0;
+ to: "background";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "background";
+ }
+ color: INDI_DEFAULT_BG_COLOR;
+ }
+ description {
+ state: "opaque" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "translucent" 0.0;
+ inherit: "default" 0.0;
+ color: INDI_DEFAULT_BG_TRANSLUCENT;
+
+ }
+ description {
+ state: "notification" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 0;
+ visible: 0;
+
+ }
+ description {
+ state: "transparent" 0.0;
+ inherit: "notification" 0.0;
+ color: INDI_DEFAULT_BG_TRANSPARENT;
+ }
+ }
+
+ part {
+ name: "elm.rect.left_con";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: HOME_PADDING_PORTRAIT 0;
+ visible: 0;
+ fixed: 1 0;
+ rel1 { relative: 0.0 0.0; to: "elm.rect.bg"; }
+ rel2 { relative: 0.0 1.0; to: "elm.rect.bg"; }
+ align: 0.0 0.0;
+ }
+ description {
+ state: "landscape" 0.0;
+ inherit: "default" 0.0;
+ min: HOME_PADDING_LANDSCAPE 0;
+ }
+ }
+
+ part {
+ name: "icon_bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 1.0 0.0; to_x: padding.separator; to_y: elm.rect.bg; }
+ rel2 { relative: 0.0 1.0; to_x: padding.separator2; to_y: elm.rect.bg; }
+ align: 0.0 0.0;
+ }
+ }
+
+ part {
+ name: "elm.rect.middle_con";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ rel1 { relative: 0.0 0.0; to: "icon_bg"; }
+ rel2 { relative: 1.0 1.0; to: "icon_bg"; }
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "hide" 0.0;
+ inherit: "default" 0.0;
+ min: 0 INDICATOR_HEIGHT;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "icon_bg"; }
+ rel2 { relative: 1.0 0.0; to: "icon_bg"; }
+ align: 0.0 1.0;
+ }
+
+ }
+
+ part {
+ name: "message.bg";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 0 INDICATOR_HEIGHT;
+ fixed: 0 1;
+ rel1 { relative: 0.0 1.0; to: "elm.rect.middle_con"; }
+ rel2 { relative: 1.0 1.0; to: "elm.rect.middle_con"; }
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "message.padding.left";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: MESSAGE_PADDING 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 0.0 0.0;
+ to: "message.bg";
+ }
+ rel2 {
+ relative: 0.0 1.0;
+ to: "message.bg";
+ }
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "message.padding.right";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: MESSAGE_PADDING 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 0.0;
+ to: "message.bg";
+ }
+ rel2 {
+ relative: 1.0 1.0;
+ to: "message.bg";
+ }
+ align: 1.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "message.padding.top";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_PADDING_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 0.0; to: "message.bg"; }
+ rel2 { relative: 1.0 0.0; to: "message.bg"; }
+ align: 0.0 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "message.padding.bottom";
+ type: RECT;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ min: 0 INDICATOR_PADDING_H;
+ fixed: 0 1;
+ rel1 { relative: 0.0 1.0; to: "message.bg"; }
+ rel2 { relative: 1.0 1.0; to: "message.bg"; }
+ align: 0.0 1.0;
+ visible: 0;
+ }
+
+ }
+ part {
+ name: "message.text";
+ type: TEXTBLOCK;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ fixed: 1 1;
+ visible: 1;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "message.padding.left";
+ to_y: "message.bg";
+ }
+
+ rel2 {
+ relative: 0.0 0.0;
+ to_x: "message.padding.right";
+ to_y: "message.bg";
+ }
+ text {
+ style: "message_style";
+ min: 0 1;
+ }
+ }
+ }
+
+ part {
+ name: elm.swallow.fixed0;
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: HOME_PADDING_PORTRAIT APPTRAY_ICON_HEIGHT;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to_x: padding.left; to_y: elm.rect.left_con; }
+ rel2 { relative: 1.0 1.0; to_x: padding.left; to_y: elm.rect.left_con; }
+ align: 0.0 0.5;
+ visible: 1;
+ }
+ description {
+ state: "landscape" 0.0;
+ min: HOME_PADDING_LANDSCAPE APPTRAY_ICON_HEIGHT;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to_x: padding.left; to_y: elm.rect.left_con; }
+ rel2 { relative: 1.0 1.0; to_x: padding.left; to_y: elm.rect.left_con; }
+ align: 0.0 0.5;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "seperator.image";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 4 36;
+ fixed: 1 1;
+ image.normal: "B03_Status_bar_line.PNG";
+ rel1 {
+ relative: 1.0 0.5;
+ to_x: "elm.swallow.fixed0";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 1.0 0.5;
+ to_x: "elm.swallow.fixed0";
+ to_y: "elm.rect.bg";
+ }
+ align: 0.0 0.5;
+ visible : 0;
+ }
+ }
+
+ part {
+ name: "padding.separator";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: PADDING_WIDTH 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "seperator.image";
+ to_y: "padding.top";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "seperator.image";
+ to_y: "padding.bottom";
+ }
+ align: 0.0 0.5;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+
+
+ DYNAMIC_RECT_FROM_LEFT( "elm.rect.fixed2", "elm.swallow.fixed3", "elm.rect.middle_con", DEFAULT_ICON_PADDING, FIXED4_DYNAMIC_PADDING, INDI_DEFAULT_BG_COLOR, 0)
+ SWALLOW_PART_FROM_LEFT_WITH_EFFECT( "elm.swallow.fixed2", "elm.rect.fixed2", "elm.rect.middle_con", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
+
+ FIXED_RECT_FROM_LEFT( "elm.rect.fixed3", "elm.swallow.fixed2", "elm.rect.middle_con", DEFAULT_ICON_PADDING, INDI_DEFAULT_BG_COLOR, 0)
+ SWALLOW_PART_FROM_LEFT_WITH_EFFECT( "elm.swallow.fixed1", "elm.rect.fixed3", "elm.rect.middle_con", DEFAULT_ICON_WIDTH, DEFAULT_ICON_HEIGHT )
+
+ FIXED_RECT_FROM_LEFT( "elm.rect.nonfixed", "elm.swallow.fixed1", "elm.rect.middle_con", DEFAULT_ICON_PADDING, INDI_DEFAULT_BG_COLOR, 0)
+ SWALLOW_PART_FROM_LEFT_WITH_EFFECT( "elm.swallow.nonfixed", "elm.rect.nonfixed", "elm.rect.middle_con", 0, 0)
+
+ SWALLOW_PART_FROM_RIGHT_WITH_EFFECT( "elm.swallow.noti", "clock.padding.left", "elm.rect.middle_con", 0, 0)
+
+ part {
+ name: elm.swallow.fixed4;
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: HOME_PADDING_PORTRAIT APPTRAY_ICON_HEIGHT;
+ fixed: 1 0;
+ rel1 { relative: 0.0 0.0; to_x: padding.right; to_y: elm.rect.left_con; }
+ rel2 { relative: 0.0 1.0; to_x: padding.right; to_y: elm.rect.left_con; }
+ align: 1.0 0.5;
+ visible: 1;
+ }
+ description {
+ state: "landscape" 0.0;
+ min: HOME_PADDING_LANDSCAPE APPTRAY_ICON_HEIGHT;
+ fixed: 1 0;
+ rel1 { relative: 0.0 0.0; to_x: padding.right; to_y: elm.rect.left_con; }
+ rel2 { relative: 0.0 1.0; to_x: padding.right; to_y: elm.rect.left_con; }
+ align: 1.0 0.5;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "seperator.image2";
+ type: IMAGE;
+ scale: 1;
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ min: 4 36;
+ fixed: 1 1;
+ image.normal: "B03_Status_bar_line.PNG";
+ rel1 {
+ relative: 0.0 0.5;
+ to_x: "elm.swallow.fixed4";
+ to_y: "elm.rect.bg";
+ }
+ rel2 {
+ relative: 0.0 0.5;
+ to_x: "elm.swallow.fixed4";
+ to_y: "elm.rect.bg";
+ }
+ align: 1.0 0.5;
+ visible : 0;
+ }
+ }
+
+ part {
+ name: "padding.separator2";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: PADDING_WIDTH 0;
+ fixed: 1 0;
+ rel1 {
+ relative: 1.0 1.0;
+ to_x: "seperator.image2";
+ to_y: "padding.top";
+ }
+ rel2 {
+ relative: 1.0 0.0;
+ to_x: "seperator.image2";
+ to_y: "padding.bottom";
+ }
+ align: 0.0 0.5;
+ visible: 1;
+ color: 0 0 0 0;
+ }
+ }
+
+ part {
+ name: "clock.padding.left";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 12 0;
+ fixed: 1 0;
+ rel1.to_x: "elm.rect.clock";
+ rel2 { relative: 0.0 1.0; to_x: "elm.rect.clock"; }
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "clock.padding.top";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 116 5;
+ fixed: 1 1;
+ rel1 { relative: 0.5 0.0; to_x: elm.rect.bg; to_y: elm.rect.middle_con; }
+ rel2 { relative: 0.5 0.0; to_x: elm.rect.bg; to_y: elm.rect.middle_con; }
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.rect.clock";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: CLOCK_WIDTH CLOCK_HEIGHT;
+ fixed: 1 1;
+ rel1 { relative: 0.5 1.0; to: "clock.padding.top"; }
+ rel2 { relative: 0.5 1.0; to: "clock.padding.top"; }
+ align: 0.5 0.0;
+ visible: 0;
+ }
+ description {
+ state: "ampm" 0.0;
+ min: CLOCK_WIDTH CLOCK_HEIGHT;
+ fixed: 1 1;
+ rel1 { relative: 0.5 1.0; to: "clock.padding.top"; }
+ rel2 { relative: 0.5 1.0; to: "clock.padding.top"; }
+ align: 0.5 0.0;
+ visible: 0;
+ }
+ }
+ part {
+ name: "elm.rect.innerclock";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { relative: 0.5 0.5; to: "elm.rect.clock";}
+ rel2 { relative: 0.5 0.5; to: "elm.rect.clock";}
+ }
+ }
+ part {
+ name: "elm.text.clock";
+ type: TEXTBLOCK;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1.to: "elm.rect.innerclock";
+ rel2.to: "elm.rect.innerclock";
+ fixed: 1 1;
+ text {
+ style: "textblock_style";
+ min: 1 1;
+ align: 0.5 0.5;
+ }
+ }
+ description {
+ state: "set_color" 0.0;
+ inherit: "default" 0.0;
+ text {
+ style: "textblock_outline_style";
+ }
+ }
+ }
+
+ part {
+ name: "elm.swallow.fixed3";
+ type: SWALLOW;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: BATTERY_ICON_WIDTH BATTERY_ICON_HEIGHT;
+ fixed: 1 1;
+ rel1 { relative: 0.5 0.0; to: "clock.padding.bottom"; }
+ rel2 { relative: 0.5 0.0; to: "clock.padding.bottom"; }
+ align: 0.5 1.0;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "clock.padding.bottom";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 116 5;
+ fixed: 1 1;
+ rel1 { relative: 0.5 1.0; to: "elm.rect.bg";}
+ rel2 { relative: 0.5 1.0; to: "elm.rect.bg";}
+ align: 0.5 1.0;
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "clock.padding.right";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 12 0;
+ fixed: 1 0;
+ rel1 { relative: 1.0 0.0; to_x: "elm.rect.clock"; }
+ rel2 { relative: 0.0 1.0; to_x: "elm.rect.clock"; }
+ visible: 0;
+ }
+ }
+
+ part {
+ name: "elm.padding.badge.left";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 3 0;
+ fixed: 1 0;
+ rel1.to: "elm.text.badge";
+ rel2 { to: "elm.text.badge"; relative: 0.0 1.0; }
+ align: 1.0 0.5;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "elm.padding.badge.right";
+ type: RECT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 3 0;
+ fixed: 1 0;
+ rel1 { to: "elm.text.badge"; relative: 1.0 0.0; }
+ rel2.to: "elm.text.badge";
+ align: 0.0 0.5;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "elm.image.badge";
+ type: IMAGE;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ min: 18 18;
+ fixed: 1 1;
+ rel1.to: "elm.padding.badge.left";
+ rel2.to: "elm.padding.badge.right";
+ image {
+ border: 8 8 8 8;
+ border_scale: 1;
+ }
+ visible: 0;
+ }
+ description {
+ state: "show" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ description {
+ state: "show2" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ }
+ }
+
+ part {
+ name: "elm.text.badge";
+ type: TEXT;
+ mouse_events: 0;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ rel1 { to: "elm.rect.clock"; relative: 0.95 0.2; }
+ rel2 { to: "elm.rect.clock"; relative: 0.95 0.2; }
+ color: 255 255 255 255;
+ align: 1.0 0.0;
+ text {
+ font: "Tizen";
+ size: 15;
+ min: 1 0;
+ align: 0.5 0.5;
+ }
+ }
+ description {
+ state: "default2" 0.0;
+ inherit: "default" 0.0;
+ color: 0 0 0 255;
+ }
+ }
+
+ programs {
+ program {
+ name: "change_padding_1";
+ action: STATE_SET "changePad" 0.0;
+ signal: "change,padding,1";
+ source: "elm.rect.*";
+ script {
+ if (get_int(changepad) == 0) {
+ set_int(changepad,1);
+ }
+ }
+ }
+
+ program {
+ name: "change_padding_2";
+ action: STATE_SET "changePad" 0.0;
+ signal: "change,padding,2";
+ source: "elm.rect.*";
+ script {
+ if (get_int(changepad) == 1) {
+ set_int(changepad,0);
+ }
+ }
+ }
+
+ program {
+ name: "home_pressed";
+ signal: "home.pressed";
+ source: "indicator.prog";
+ script {
+ }
+ }
+
+ program {
+ name: "change_home_pad_1";
+ action: STATE_SET "changeHomePad" 0.0;
+ signal: "change,home,pad,1";
+ source: "elm.rect.*";
+ script {
+ if (get_int(changeHomePad) == 0) {
+ set_state(PART:"elm.rect.left_con", "landscape", 0.0);
+ set_state(PART:"elm.swallow.fixed0", "landscape", 0.0);
+ set_int(changeHomePad,1);
+ }
+ }
+ }
+
+ program {
+ name: "change_home_pad_2";
+ action: STATE_SET "changeHomePad" 0.0;
+ signal: "change,home,pad,2";
+ source: "elm.rect.*";
+ script {
+ if (get_int(changeHomePad) == 1) {
+ set_state(PART:"elm.rect.left_con", "default", 0.0);
+ set_state(PART:"elm.swallow.fixed0", "default", 0.0);
+ set_int(changeHomePad, 0);
+ }
+ }
+ }
+
+ program {
+ name: "bg_opaque";
+ action: STATE_SET "default" 0.0;
+ signal: "bg.opaque";
+ source: "indicator.prog";
+ script {
+ set_int(bg_set, 0);
+ set_state(PART:"elm.rect.bg", "opaque", 0.0);
+ }
+
+ }
+ program {
+ name: "bg_translucent";
+ action: STATE_SET "default" 0.0;
+ signal: "bg.translucent";
+ source: "indicator.prog";
+ script {
+ set_int(bg_set, 1);
+ set_state(PART:"elm.rect.bg", "translucent", 0.0);
+ }
+
+ }
+ program {
+ name: "bg_transparent";
+ signal: "bg.transparent";
+ source: "indicator.prog";
+ script {
+ set_int(bg_set, 2);
+ set_state(PART:"elm.rect.bg", "transparent", 0.0);
+ }
+
+ }
+ program {
+ name: "bg_notification";
+ signal: "bg.notification";
+ source: "indicator.prog";
+ script {
+ set_int(bg_set, 3);
+ set_state(PART:"elm.rect.bg", "notification", 0.0);
+ }
+
+ }
+
+ program {
+ name: "clock_size_default";
+ signal: "indicator.clock.default";
+ source: "indicator.prog";
+ script {
+ set_state(PART:"elm.rect.clock", "default", 0.0);
+ }
+
+ }
+ program {
+ name: "clock_size_ampm";
+ signal: "indicator.clock.ampm";
+ source: "indicator.prog";
+ script {
+ set_state(PART:"elm.rect.clock", "ampm", 0.0);
+ }
+
+ }
+
+ program {
+ name: "show.noti";
+ action: STATE_SET "show" 0.0;
+ signal: "indicator.noti.show";
+ source: "indicator.prog";
+ target: "elm.swallow.noti";
+ target: "elm.swallow.nonfixed";
+ target: "elm.swallow.fixed1";
+ target: "elm.swallow.fixed2";
+ target: "seperator.image";
+ target: "seperator.image2";
+ }
+ program {
+ name: "hide.noti";
+ action: STATE_SET "default" 0.0;
+ signal: "indicator.noti.hide";
+ source: "indicator.prog";
+ target: "elm.swallow.noti";
+ target: "elm.swallow.nonfixed";
+ target: "elm.swallow.fixed1";
+ target: "elm.swallow.fixed2";
+ target: "seperator.image";
+ target: "seperator.image2";
+ }
+
+ program {
+ name: "badge_show";
+ signal: "badge,show,1";
+ source: "elm.image.badge";
+ script {
+ if (get_int(badge_set) == 0) {
+ set_int(badge_set, 1);
+ if (get_int(theme) == 2) {
+ set_state(PART:"elm.image.badge", "show2", 0.0);
+ set_state(PART:"elm.text.badge", "default2", 0.0);
+ } else {
+ set_state(PART:"elm.image.badge", "show", 0.0);
+ set_state(PART:"elm.text.badge", "default", 0.0);
+ }
+ }
+ }
+ }
+
+ program {
+ name: "badge_hide";
+ signal: "badge,hide,1";
+ source: "elm.image.badge";
+ script {
+ if (get_int(badge_set) == 1) {
+ set_int(badge_set, 0);
+ set_state(PART:"elm.image.badge", "default", 0.0);
+ }
+ }
+ }
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 TEMP_SWALLOW_PART_FROM_LEFT( partName, rel_x, rel_y, MinWidth, MinHeight) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 0.5 0.5; \
+ visible: 1; \
+ } \
+ } \
+
+#define SWALLOW_PART_FROM_LEFT( partName, rel_x, rel_y, MinWidth, MinHeight) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 0.0 0.5; \
+ visible: 1; \
+ } \
+ } \
+
+#define SWALLOW_PART_FROM_LEFT_WITH_EFFECT( partName, rel_x, rel_y, MinWidth, MinHeight) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 0.0 0.5; \
+ visible: 0; \
+ } \
+ description { \
+ state: "show" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 0.0 0.5; \
+ visible: 1; \
+ } \
+ } \
+
+#define SWALLOW_PART_FROM_CENTER( partName, rel_x_left, rel_x_right, rel_y, MinWidth, MinHeight) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x_left; to_y: rel_y; } \
+ rel2 { relative: 0.0 1.0; to_x: rel_x_right; to_y: rel_y; } \
+ align: 0.5 0.5; \
+ visible: 1; \
+ } \
+ } \
+
+#define SWALLOW_PART_FROM_RIGHT( partName, rel_x, rel_y, MinWidth, MinHeight) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 0.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 0.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 1.0 0.5; \
+ visible: 1; \
+ } \
+ } \
+
+#define SWALLOW_PART_FROM_RIGHT_WITH_EFFECT( partName, rel_x, rel_y, MinWidth, MinHeight) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 0.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 0.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 1.0 0.5; \
+ visible: 0; \
+ } \
+ description { \
+ state: "show" 0.0; \
+ min: MinWidth MinHeight; \
+ fixed: 1 0; \
+ rel1 { relative: 0.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 0.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 1.0 0.5; \
+ visible: 1; \
+ } \
+ } \
+
+#define FIXED_RECT_FROM_LEFT( rectName, rel_x, rel_y, MinWidth, colorValue, visibleValue) \
+ part { \
+ name: rectName; \
+ type: RECT; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth 0; \
+ fixed: 1 1; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 0.0 0.5; \
+ color : colorValue; \
+ visible: visibleValue; \
+ } \
+ } \
+
+#define FIXED_RECT_FROM_RIGHT( rectName, rel_x, rel_y, MinWidth, colorValue, visibleValue) \
+ part { \
+ name: rectName; \
+ type: RECT; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth 0; \
+ fixed: 1 1; \
+ rel1 { relative: 0.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 0.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 1.0 0.5; \
+ color : colorValue; \
+ visible: visibleValue; \
+ } \
+ } \
+
+#define DYNAMIC_RECT_FROM_RIGHT( rectName, rel_x, rel_y, MinWidth, changeWidth, colorValue, visibleValue) \
+ part { \
+ name: rectName; \
+ type: RECT; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth 0; \
+ fixed: 1 1; \
+ rel1 { relative: 0.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 0.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 1.0 0.5; \
+ color : colorValue; \
+ visible: visibleValue; \
+ } \
+ description { \
+ state: "changePad" 0.0; \
+ min: changeWidth 0; \
+ fixed: 1 1; \
+ rel1 { relative: 0.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 0.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ color : colorValue; \
+ visible: visibleValue; \
+ align: 1.0 0.5; \
+ } \
+ } \
+
+#define DYNAMIC_RECT_FROM_LEFT( rectName, rel_x, rel_y, MinWidth, changeWidth, colorValue, visibleValue) \
+ part { \
+ name: rectName; \
+ type: RECT; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ min: MinWidth 0; \
+ fixed: 1 1; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ align: 0.0 0.5; \
+ color : colorValue; \
+ visible: visibleValue; \
+ } \
+ description { \
+ state: "changePad" 0.0; \
+ min: changeWidth 0; \
+ fixed: 1 1; \
+ rel1 { relative: 1.0 0.0; to_x: rel_x; to_y: rel_y; } \
+ rel2 { relative: 1.0 1.0; to_x: rel_x; to_y: rel_y; } \
+ color : colorValue; \
+ visible: visibleValue; \
+ align: 0.0 0.5; \
+ } \
+ } \
+
+
+#define PART_SWALLOW_SET( partName, lPadding, rPadding) \
+ part { \
+ name: partName; \
+ type: SWALLOW; \
+ mouse_events: 0; \
+ scale: 1; \
+ description { \
+ state: "default" 0.0; \
+ rel1 { relative: 1.0 0.0; to: lPadding; } \
+ rel2 { relative: 0.0 1.0; to: rPadding; } \
+ align: 0.5 0.5; \
+ map { \
+ on: 1; \
+ perspective_on: 1; \
+ rotation.z: 0.0; \
+ } \
+ } \
+ description { \
+ state: "rotate_tick" 0.0; \
+ inherit: "default" 0.0; \
+ map.rotation.z: 20.0; \
+ } \
+ description { \
+ state: "rotate_tock" 0.0; \
+ inherit: "default" 0.0; \
+ map.rotation.z: -20.0; \
+ } \
+ description { \
+ state: "rotate_180" 0.0; \
+ inherit: "default" 0.0; \
+ map.rotation.z: 180.0; \
+ } \
+ description { \
+ state: "rotate_360" 0.0; \
+ inherit: "default" 0.0; \
+ map.rotation.z: 360.0; \
+ } \
+ description { \
+ state: "invisible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 0; \
+ } \
+ } \
+
+#define PROGRAM_SET( sourceName, targetName) \
+ program { name: "icon_default_pre"; \
+ action: ACTION_STOP; \
+ target: "icon_blink_show"; \
+ target: "icon_blink_hide"; \
+ target: "icon_tick"; \
+ target: "icon_tock"; \
+ target: "icon_rotate_180"; \
+ target: "icon_rotate_360"; \
+ target: "icon_rotate_0"; \
+ } \
+ program { name: "icon_default"; \
+ signal: "icon,state,default"; \
+ source: sourceName; \
+ action: STATE_SET "default" 0.0; \
+ target: targetName; \
+ after: "icon_default_pre"; \
+ } \
+ program { name: "icon_tick"; \
+ action: STATE_SET "rotate_tick" 0.0; \
+ target: targetName; \
+ transition: LINEAR 0.5; \
+ after: "icon_tock"; \
+ } \
+ program { name: "icon_tock"; \
+ action: STATE_SET "rotate_tock" 0.0; \
+ target: targetName; \
+ transition: LINEAR 0.5; \
+ after: "icon_tick"; \
+ } \
+ program { name: "icon_metronome"; \
+ signal: "icon,state,metronome"; \
+ source: sourceName; \
+ action: STATE_SET "rotate_tick" 0.0; \
+ target: targetName; \
+ after: "icon_tock"; \
+ } \
+ program { name: "icon_blink_show"; \
+ action: STATE_SET "default" 0.0; \
+ target: targetName; \
+ in: 0.4 0.0; \
+ after: "icon_blink_hide"; \
+ } \
+ program { name: "icon_blink_hide"; \
+ action: STATE_SET "invisible" 0.0; \
+ target: targetName; \
+ in: 0.4 0.0; \
+ after: "icon_blink_show"; \
+ } \
+ program { name: "icon_blink"; \
+ signal: "icon,state,blink"; \
+ source: sourceName; \
+ action: STATE_SET "invisible" 0.0; \
+ target: targetName; \
+ after: "icon_blink_show"; \
+ } \
+ program { name: "icon_rotate_0"; \
+ action: STATE_SET "default" 0.0; \
+ target: targetName; \
+ after: "icon_rotate_180"; \
+ } \
+ program { name: "icon_rotate_180"; \
+ action: STATE_SET "rotate_180" 0.0; \
+ target: targetName; \
+ transition: LINEAR 0.8; \
+ after: "icon_rotate_360"; \
+ } \
+ program { name: "icon_rotate_360"; \
+ action: STATE_SET "rotate_360" 0.0; \
+ target: targetName; \
+ transition: LINEAR 0.8; \
+ after: "icon_rotate_0"; \
+ } \
+ program { name: "icon_rotate"; \
+ signal: "icon,state,rotate"; \
+ source: sourceName; \
+ action: STATE_SET "rotate_180" 0.0; \
+ target: targetName; \
+ after: "icon_rotate_360"; \
+ } \
--- /dev/null
+/*
+ * 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 __INDICATOR_GUI_H__
+#define __INDICATOR_GUI_H__
+
+#define INDICATOR_HEIGHT 60
+#define INDICATOR_SIMPLE_HEIGHT 20
+#define ICON_PADDING 3
+
+#define PADDING_WIDTH 8
+#define LEFT_PADDING_WIDTH 0
+#define RIGHT_PADDING_WIDTH 0
+#define INDICATOR_PADDING_H 10
+
+
+#define CLOCK_WIDTH 116
+#define CLOCK_HEIGHT 34
+#define CLOCK_PADDING 10
+
+#define DEFAULT_ICON_PADDING 10
+
+#define DEFAULT_ICON_HEIGHT 40
+#define DEFAULT_ICON_WIDTH 40
+#define BATTERY_ICON_WIDTH 116
+#define BATTERY_ICON_HEIGHT 17
+#define APPTRAY_ICON_HEIGHT 50
+#define APPTRAY_ICON_WIDTH 50
+
+#define MESSAGE_PADDING 10
+
+#define NONFIXED_DEFAULT_PADDING 25
+#define NONFIXED_DYNAMIC_PADDING 11
+#define FIXED4_DYNAMIC_PADDING 0
+#define FIXED2_PADDING 2
+#define FIXED1_PADDING 72
+#define FIXED0_PADDING 72
+#define LANDSCAPE_FIXED1_PADDING 122
+#define LANDSCAPE_FIXED0_PADDING 122
+
+#define HOME_PADDING_PORTRAIT 78
+#define HOME_PADDING_LANDSCAPE 78
+#define DEFAULT_NON_FIXED_PADDING 0
+
+#define INDI_DEFAULT_BG_COLOR 0 0 0 0
+#define INDI_DEFAULT_BG_TRANSLUCENT 0 0 0 50
+#define INDI_DEFAULT_BG_TRANSPARENT 0 0 0 0
+
+#define ICON_FONT_NAME "Tizen"
+#define ICON_FONT_STYLE "Medium"
+#define ICON_FONT_SIZE 20
+#define FONT_COLOR 255, 255, 255, 255
+
+#define DEFAULT_LABEL_STRING "<font_size=%d><color=#%02x%02x%02x%02x>%s</color></font_size>"
+#define CUSTOM_LABEL_STRING "<font=%s><style=%s><font_size=%d>%s</font_size></style></font>"
+
+#endif
--- /dev/null
+/*\r
+ * Copyright 2012 Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://floralicense.org/license/\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+ \r
+#include "indicator_gui.h"\r
+#include "indicator_common.edc"\r
+\r
+collections {\r
+ group {\r
+ name: "elm/indicator/icon/base";\r
+ parts {\r
+ part {\r
+ name: "background";\r
+ mouse_events: 0;\r
+ description {\r
+ state: "default" 0.0;\r
+ color : 255 255 255 204;\r
+ visible : 1;\r
+ }\r
+ }\r
+ part {\r
+ name: "padding.left";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 0 0;\r
+ fixed: 1 0;\r
+ rel1.to: "background";\r
+ rel2 { relative: 0.0 1.0; to: "background"; }\r
+ align: 0.0 0.5;\r
+ visible: 0;\r
+ }\r
+ }\r
+\r
+ PART_SWALLOW_SET( "elm.swallow.icon", "padding.left", "padding.right" )\r
+\r
+ part {\r
+ name: "padding.right";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: PADDING_WIDTH 0;\r
+ fixed: 1 0;\r
+ rel1 { relative: 1.0 0.0; to: "background"; }\r
+ align: 1.0 0.5;\r
+ visible: 0;\r
+ }\r
+ }\r
+\r
+ }\r
+ programs {\r
+ PROGRAM_SET( "elm.swallow.icon", "elm.swallow.icon")\r
+ }\r
+ }\r
+}\r
+\r
+\r
--- /dev/null
+/*\r
+ * Copyright 2012 Samsung Electronics Co., Ltd\r
+ *\r
+ * Licensed under the Flora License, Version 1.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://floralicense.org/license/\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+ \r
+#include "indicator_gui.h"\r
+#include "indicator_common.edc"\r
+\r
+collections {\r
+ group {\r
+ name: "elm/indicator/icon/base";\r
+ parts {\r
+ part {\r
+ name: "background";\r
+ mouse_events: 0;\r
+ description {\r
+ state: "default" 0.0;\r
+ color : 255 255 255 204;\r
+ visible : 1;\r
+ }\r
+ }\r
+ part {\r
+ name: "padding.left";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 0 0;\r
+ fixed: 1 0;\r
+ rel1.to: "background";\r
+ rel2 { relative: 0.0 1.0; to: "background"; }\r
+ align: 0.0 0.5;\r
+ visible: 0;\r
+ }\r
+ }\r
+\r
+ PART_SWALLOW_SET( "elm.swallow.icon", "padding.left", "padding.right" )\r
+\r
+ part {\r
+ name: "padding.right";\r
+ type: RECT;\r
+ mouse_events: 0;\r
+ scale: 1;\r
+ description {\r
+ state: "default" 0.0;\r
+ min: 0 0;\r
+ fixed: 1 0;\r
+ rel1 { relative: 1.0 0.0; to: "background"; }\r
+ align: 1.0 0.5;\r
+ visible: 0;\r
+ }\r
+ }\r
+\r
+ }\r
+ programs {\r
+ PROGRAM_SET( "elm.swallow.icon", "elm.swallow.icon")\r
+ }\r
+ }\r
+}\r
+\r
+\r
--- /dev/null
+indicator (0.1.0-198) unstable; urgency=low
+
+ * bug fix on battery icon
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-198
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Tue, 05 Jun 2012 16:37:39 +0900
+
+indicator (0.1.0-197) unstable; urgency=low
+
+ * check battery capacity changes before updating UI
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-197
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Fri, 01 Jun 2012 11:52:30 +0900
+
+indicator (0.1.0-196) unstable; urgency=low
+
+ * apply sos event icon
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-196
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Wed, 30 May 2012 14:13:02 +0900
+
+indicator (0.1.0-195) unstable; urgency=low
+
+ * apply vconf policy changes
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-195
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Thu, 17 May 2012 10:13:22 +0900
+
+indicator (0.1.0-194) unstable; urgency=low
+
+ * update desktop file
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-194
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Mon, 14 May 2012 11:19:55 +0900
+
+indicator (0.1.0-193) unstable; urgency=low
+
+ * apply vconf key changes for the telephony packet service type
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-193
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Thu, 10 May 2012 11:25:06 +0900
+
+indicator (0.1.0-192) unstable; urgency=low
+
+ * apply cancel key
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-192
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Tue, 08 May 2012 11:45:42 +0900
+
+indicator (0.1.0-191) unstable; urgency=low
+
+ * bug fix on displaying battery percentage
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-191
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Mon, 30 Apr 2012 18:24:53 +0900
+
+indicator (0.1.0-190) unstable; urgency=low
+
+ * remove scale for 1 pixel line
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-190
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Thu, 19 Apr 2012 10:26:47 +0900
+
+indicator (0.1.0-189) unstable; urgency=low
+
+ * change vconfkey for timeformat
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-189
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Thu, 12 Apr 2012 11:59:22 +0900
+
+indicator (0.1.0-188) unstable; urgency=low
+
+ * apply notification display app
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-188
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Fri, 06 Apr 2012 10:13:03 +0900
+
+indicator (0.1.0-187) unstable; urgency=low
+
+ * bug fix on battery animation
+ * Git: slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-187
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Tue, 03 Apr 2012 19:18:36 +0900
+
+indicator (0.1.0-186) unstable; urgency=low
+
+ * enable opacity mode
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-186
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Wed, 21 Mar 2012 09:11:43 +0900
+
+indicator (0.1.0-185) unstable; urgency=low
+
+ * apply desktop file changes
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-185
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Thu, 15 Mar 2012 20:12:33 +0900
+
+indicator (0.1.0-184) unstable; urgency=low
+
+ * ready for indicator transparent mode
+ * apply efl 1.0 migration changes
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-184
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Tue, 13 Mar 2012 18:30:06 +0900
+
+indicator (0.1.0-183) unstable; urgency=low
+
+ * bug fix on transfer icon
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-183
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Thu, 23 Feb 2012 19:37:08 +0900
+
+indicator (0.1.0-182) unstable; urgency=low
+
+ * change deprecated elm APIs
+ * apply hw home key emulation
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-182
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Mon, 20 Feb 2012 16:53:34 +0900
+
+indicator (0.1.0-181) unstable; urgency=low
+
+ * checking system status when the home icon is clicked
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-181
+
+ -- Jeonghoon Park <jh1979.park@samsung.com> Wed, 15 Feb 2012 14:29:56 +0900
+
+indicator (0.1.0-180) unstable; urgency=low
+
+ * Fix cannot home launching issue
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-180
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 03 Feb 2012 19:49:41 +0900
+
+indicator (0.1.0-179) unstable; urgency=low
+
+ * Applied wifi vconf key enum changes
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-179
+
+ -- UkJung Kim <ujkim@samsung.com> Fri, 03 Feb 2012 09:47:45 +0900
+
+indicator (0.1.0-178) unstable; urgency=low
+
+ * Change Scale set code by EFL devloper's request
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-178
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 27 Jan 2012 17:19:16 +0900
+
+indicator (0.1.0-177) unstable; urgency=low
+
+ * Change Interval value for display processing icon animation
+ * Fix Icon Show/hide code
+ * Change function for get 3rd event information by request of notification library developer
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-177
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 20 Jan 2012 17:16:05 +0900
+
+indicator (0.1.0-176) unstable; urgency=low
+
+ * Update version(Fix crash and change image)
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-176
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Thu, 19 Jan 2012 20:33:09 +0900
+
+indicator (0.1.0-175) unstable; urgency=low
+
+ * update version(apply wifi-direct,20 level battery,display 18 icon in landscape,ICON update)
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-175
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Tue, 17 Jan 2012 13:53:58 +0900
+
+indicator (0.1.0-174) unstable; urgency=low
+
+ * Fix RSSI level bug
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-174
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 11 Jan 2012 16:42:32 +0900
+
+indicator (0.1.0-173) unstable; urgency=low
+
+ * Add NFC,Wifi-Direct Modules and update latest resource
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-173
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Thu, 05 Jan 2012 13:57:30 +0900
+
+indicator (0.1.0-172) unstable; urgency=low
+
+ * Fix boilerplate text
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-172
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Tue, 06 Dec 2011 21:06:28 +0900
+
+indicator (0.1.0-171) unstable; urgency=low
+
+ * Update boilerplate and remove unused code,function,macro
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-171
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Tue, 06 Dec 2011 13:57:04 +0900
+
+indicator (0.1.0-170) unstable; urgency=low
+
+ * Add a Lock Screen Check code for Fix H0100137119
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-170
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 23 Nov 2011 11:06:13 +0900
+
+indicator (0.1.0-169) unstable; urgency=low
+
+ * Fix code for unit test
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-169
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 16 Nov 2011 20:00:15 +0900
+
+indicator (0.1.0-168) unstable; urgency=low
+
+ * Fix H0100136752 and Change Code for Home Launching
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-168
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 14 Nov 2011 16:05:43 +0900
+
+indicator (0.1.0-167) unstable; urgency=low
+
+ * Change Home Button Width and layout in Landscape Mode
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-167
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 09 Nov 2011 14:18:47 +0900
+
+indicator (0.1.0-166) unstable; urgency=low
+
+ * Add debug code
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-166
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 07 Nov 2011 20:24:17 +0900
+
+indicator (0.1.0-165) unstable; urgency=low
+
+ * Remove Unused test code
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-165
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 31 Oct 2011 13:42:22 +0900
+
+indicator (0.1.0-164) unstable; urgency=low
+
+ * Apply Status_bar GUI
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-164
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Thu, 27 Oct 2011 16:01:43 +0900
+
+indicator (0.1.0-163) unstable; urgency=low
+
+ * Fix Build Error
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-163
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 19 Oct 2011 10:57:36 +0900
+
+indicator (0.1.0-162) unstable; urgency=low
+
+ * Change code about touch area for display quickpanel
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-162
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Tue, 18 Oct 2011 15:16:45 +0900
+
+indicator (0.1.0-161) unstable; urgency=low
+
+ * remove unused vconf key in battery test file
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-161
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Tue, 18 Oct 2011 14:06:41 +0900
+
+indicator (0.1.0-160) unstable; urgency=low
+
+ * Fix Bug for display Bluetooth Icon
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-160
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 17 Oct 2011 21:30:12 +0900
+
+indicator (0.1.0-159) unstable; urgency=low
+
+ * Change Indicator Icon and modify code(about resolution and launch app)
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-159
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 17 Oct 2011 14:21:33 +0900
+
+indicator (0.1.0-158) unstable; urgency=low
+
+ * Change Indicator Color Value for Black Theme
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-158
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Tue, 11 Oct 2011 13:18:00 +0900
+
+indicator (0.1.0-157) unstable; urgency=low
+
+ * Change Indicator Height for HD resolution
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-157
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 10 Oct 2011 21:04:45 +0900
+
+indicator (0.1.0-156) unstable; urgency=low
+
+ * Fix H0100134001 and change code to enable quickpanel on lock-screen
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-156
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 05 Oct 2011 14:32:23 +0900
+
+indicator (0.1.0-155) unstable; urgency=low
+
+ * Fix Event Icon bug and Remove quickpanel lib dependency
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-155
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 16 Sep 2011 20:43:51 +0900
+
+indicator (0.1.0-154) unstable; urgency=low
+
+ * Change Battery Icon and Clock Color
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-154
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 16 Sep 2011 13:34:10 +0900
+
+indicator (0.1.0-153) unstable; urgency=low
+
+ * Change Low Battery Icon and modify code for icon animation
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-153
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 09 Sep 2011 17:04:01 +0900
+
+indicator (0.1.0-152) unstable; urgency=low
+
+ * Repackage for fix some bug
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-152
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 09 Sep 2011 16:04:40 +0900
+
+indicator (0.1.0-151) unstable; urgency=low
+
+ * Fix H0100132876, code clean up
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-151
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 26 Aug 2011 11:57:04 +0900
+
+indicator (0.1.0-150) unstable; urgency=low
+
+ * update for prevent report and add mobile hotspot module
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-150
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 22 Aug 2011 17:31:03 +0900
+
+indicator (0.1.0-149) unstable; urgency=low
+
+ * Fix H0100132611, Add voice recorder module, Code clean up
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-149
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 19 Aug 2011 11:22:47 +0900
+
+indicator (0.1.0-148) unstable; urgency=low
+
+ * Update for fix code of prevent reports and change checking code for battery status
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-148
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Tue, 16 Aug 2011 13:45:12 +0900
+
+indicator (0.1.0-147) unstable; urgency=low
+
+ * Update for UX GUIDE and apply percentage battery status icon
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-147
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 12 Aug 2011 14:16:09 +0900
+
+indicator (0.1.0-146) unstable; urgency=low
+
+ * Fix H0100129307
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-146
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 03 Aug 2011 11:46:02 +0900
+
+indicator (0.1.0-145) unstable; urgency=low
+
+ * change code by result of code review and fix rssi string bug in black theme
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-145
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Thu, 28 Jul 2011 13:36:24 +0900
+
+indicator (0.1.0-144) unstable; urgency=low
+
+ * Code clean up
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-144
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 27 Jul 2011 15:31:38 +0900
+
+indicator (0.1.0-143) unstable; urgency=low
+
+ * Change API for Elementary Migration
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-143
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Thu, 21 Jul 2011 12:48:12 +0900
+
+indicator (0.1.0-142) unstable; urgency=low
+
+ * Change bool type to Eina_Bool for Ecore IMF header file
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-142
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Tue, 19 Jul 2011 16:32:51 +0900
+
+indicator (0.1.0-141) unstable; urgency=low
+
+ * Repackage for apply changed boilerplate of each source file
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-141
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 13 Jul 2011 14:36:48 +0900
+
+indicator (0.1.0-140) lucid; urgency=low
+
+ * Add code for display time when change time zone and fix code for display mute icon
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-140
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 11 Jul 2011 18:38:59 +0900
+
+indicator (0.1.0-139) unstable; urgency=low
+
+ * Fix H0100129591 and display mmc issue
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-139
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Wed, 06 Jul 2011 14:57:19 +0900
+
+indicator (0.1.0-138) unstable; urgency=low
+
+ * Fix Code for time change issue
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-138
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Mon, 04 Jul 2011 10:16:50 +0900
+
+indicator (0.1.0-137) unstable; urgency=low
+
+ * Add call back function and modify code for apply Region Change event
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-137
+
+ -- jh1114.kim <jh1114.kim@samsung.com> Tue, 28 Jun 2011 16:57:05 +0900
+
+indicator (0.1.0-136) unstable; urgency=low
+
+ * Change EDC code for black skin code and change clock string
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-136
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Thu, 23 Jun 2011 15:54:53 +0900
+
+indicator (0.1.0-135) unstable; urgency=low
+
+ * Change EDC code for New Edje_cc Compiler
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-135
+
+ -- Junghyun Kim <jh1114.kim@samsung.com> Fri, 10 Jun 2011 09:59:48 +0900
+
+indicator (0.1.0-134) unstable; urgency=low
+
+ * update po file
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-134
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 19 May 2011 12:30:26 +0900
+
+indicator (0.1.0-133) unstable; urgency=low
+
+ * Enable to open quickpanel on rotated window
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-133
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 12 May 2011 18:34:02 +0900
+
+indicator (0.1.0-132) unstable; urgency=low
+
+ * Apply Indicator GUI guide v0.3
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-132
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 25 Apr 2011 16:44:10 +0900
+
+indicator (0.1.0-131) unstable; urgency=low
+
+ * Change vconfkey for MMC icon
+ (VCONFKEY_FILEMANAGER_MMC_STATUS -> VCONFKEY_FILEMANAGER_DB_STATUS)
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-131
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 19 Apr 2011 14:44:25 +0900
+
+indicator (0.1.0-130) unstable; urgency=low
+
+ * Crash fix - add NULL check routine when failed to get window name
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-130
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 18 Apr 2011 18:32:10 +0900
+
+indicator (0.1.0-129) unstable; urgency=low
+
+ * Unset bg color on home screen
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-129
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 18 Apr 2011 12:27:44 +0900
+
+indicator (0.1.0-128) unstable; urgency=low
+
+ * Apply Shape Input Mask
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-128
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 15 Apr 2011 15:14:48 +0900
+
+indicator (0.1.0-127) unstable; urgency=low
+
+ * Skip bg color change effect
+ * when launching an application from menu_screen
+ * Fix package naming (deb.com.samsung.indicator -> com.samsung.indicator)
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: indicator_0.1.0-127
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 11 Apr 2011 21:35:22 +0900
+
+deb.com.samsung.indicator (0.1.0-126) unstable; urgency=low
+
+ * Bugfix for H0100123915 : indicator window position problem
+ * when rotating target device
+ * Remove BEAT UX related codes and image files
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-126
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 07 Apr 2011 11:47:08 +0900
+
+deb.com.samsung.indicator (0.1.0-125) unstable; urgency=low
+
+ * Display full indicator on quickpanel window
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-125
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 04 Apr 2011 19:47:10 +0900
+
+deb.com.samsung.indicator (0.1.0-124) unstable; urgency=low
+
+ * Bugfix : resizing window at first boot up
+ * Delete arrow image
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-124
+
+ -- SaeNa Kim <saina.kim@samsung.com> Sat, 02 Apr 2011 15:44:57 +0900
+
+deb.com.samsung.indicator (0.1.0-123) unstable; urgency=low
+
+ * Bugfix for crash when a new msg is arrived
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-123
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 01 Apr 2011 11:00:02 +0900
+
+deb.com.samsung.indicator (0.1.0-122) unstable; urgency=low
+
+ * Delete animation when menu_screen is paused
+ * Add arrow image
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-122
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 31 Mar 2011 17:34:36 +0900
+
+deb.com.samsung.indicator (0.1.0-121) unstable; urgency=low
+
+ * Hide bg color at clock view
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-121
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 29 Mar 2011 23:30:25 +0900
+
+deb.com.samsung.indicator (0.1.0-120) unstable; urgency=low
+
+ * Update Event BG image
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-120
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 28 Mar 2011 10:56:31 +0900
+
+deb.com.samsung.indicator (0.1.0-119) unstable; urgency=low
+
+ * Bugfix for indicator view on starter
+ * Apply NBEAT icons
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-119
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 25 Mar 2011 15:56:18 +0900
+
+deb.com.samsung.indicator (0.1.0-118) unstable; urgency=low
+
+ * [NBEAT] Update resizing window related codes
+ * Delete message, im, missed_call and add noti module
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-118
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 23 Mar 2011 20:10:25 +0900
+
+deb.com.samsung.indicator (0.1.0-117) unstable; urgency=low
+
+ * Updates for change of libquickpanel (0.1.0-31)
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-117
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 15 Mar 2011 21:50:24 +0900
+
+deb.com.samsung.indicator (0.1.0-116) unstable; urgency=low
+
+ * Add application home directory
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-116
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 10 Mar 2011 21:30:29 +0900
+
+deb.com.samsung.indicator (0.1.0-115) unstable; urgency=low
+
+ * Rollback NBEAT UX
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-115
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 09 Mar 2011 17:47:31 +0900
+
+deb.com.samsung.indicator (0.1.0-114) unstable; urgency=low
+
+ * Bugfix for touch event
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-114
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 03 Mar 2011 21:01:36 +0900
+
+deb.com.samsung.indicator (0.1.0-113) unstable; urgency=low
+
+ * update codes for registering modules
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-113
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 03 Mar 2011 19:20:11 +0900
+
+deb.com.samsung.indicator (0.1.0-112) unstable; urgency=low
+
+ * Updates for change of battery operation
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-112
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 03 Mar 2011 15:37:17 +0900
+
+deb.com.samsung.indicator (0.1.0-111) unstable; urgency=low
+
+ * Updates for NBEAT UX
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-111
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 02 Mar 2011 23:35:18 +0900
+
+deb.com.samsung.indicator (0.1.0-110) unstable; urgency=low
+
+ * PNG optimization
+ * Add control-privilege
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-110
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 21 Feb 2011 13:57:01 +0900
+
+deb.com.samsung.indicator (0.1.0-109) unstable; urgency=low
+
+ * Fix for uninspected bug reported by prevent tool
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-109
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 16 Feb 2011 13:59:03 +0900
+
+deb.com.samsung.indicator (0.1.0-108) unstable; urgency=low
+
+ * Bugfix for quickpanel DB open error
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-108
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 11 Feb 2011 17:59:37 +0900
+
+deb.com.samsung.indicator (0.1.0-107) unstable; urgency=low
+
+ * Change bettery level indicator
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-107
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 10 Feb 2011 19:51:09 +0900
+
+deb.com.samsung.indicator (0.1.0-106) unstable; urgency=low
+
+ * Set background color as solid black
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-106
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 09 Feb 2011 14:38:54 +0900
+
+deb.com.samsung.indicator (0.1.0-105) unstable; urgency=low
+
+ * Set nice value as 2
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-105
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 07 Feb 2011 14:57:32 +0900
+
+deb.com.samsung.indicator (0.1.0-104) unstable; urgency=low
+
+ * Remove transition effect for blinking animation
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-104
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 24 Jan 2011 19:56:13 +0900
+
+deb.com.samsung.indicator (0.1.0-103) unstable; urgency=low
+
+ * Add system_wakeup heynoti handler for clock update
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-103
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 19 Jan 2011 15:32:01 +0900
+
+deb.com.samsung.indicator (0.1.0-102) unstable; urgency=low
+
+ * Add hibernation booting script (S01indicator)
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-102
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 19 Jan 2011 13:18:23 +0900
+
+deb.com.samsung.indicator (0.1.0-101) unstable; urgency=low
+
+ * Modifications for change of application directory structure
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-101
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 17 Jan 2011 19:01:01 +0900
+
+deb.com.samsung.indicator (0.1.0-100) unstable; urgency=low
+
+ * elm_layout_theme_set -> elm_layout_file_set
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-100
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 12 Jan 2011 20:38:36 +0900
+
+deb.com.samsung.indicator (0.1.0-99) unstable; urgency=low
+
+ * Change rotation method (resize callback -> ecore_x_client message callback)
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-99
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 07 Jan 2011 17:36:32 +0900
+
+deb.com.samsung.indicator (0.1.0-98) unstable; urgency=low
+
+ * Bugfix for icon_hide func
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-98
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 05 Jan 2011 21:16:12 +0900
+
+deb.com.samsung.indicator (0.1.0-97) unstable; urgency=low
+
+ * Add RCSIM module
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-97
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 05 Jan 2011 19:13:45 +0900
+
+deb.com.samsung.indicator (0.1.0-96) unstable; urgency=low
+
+ * Rollback connections.c file
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-96
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 23 Dec 2010 10:29:44 +0900
+
+deb.com.samsung.indicator (0.1.0-95) unstable; urgency=low
+
+ * Modifications for method change for showing notification icons
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-95
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 22 Dec 2010 19:47:24 +0900
+
+deb.com.samsung.indicator (0.1.0-94) unstable; urgency=low
+
+ * Add install option for vconftool
+ * Bugfix for DNET state
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-94
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 17 Dec 2010 19:45:57 +0900
+
+deb.com.samsung.indicator (0.1.0-93) unstable; urgency=low
+
+ * Add postinst for vconf groupid
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-93
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 17 Dec 2010 18:43:42 +0900
+
+deb.com.samsung.indicator (0.1.0-91) unstable; urgency=low
+
+ * Modifications for wifi, call_divert
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-91
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 15 Dec 2010 20:48:47 +0900
+
+deb.com.samsung.indicator (0.1.0-90) unstable; urgency=low
+
+ * Bugfix for clock display
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-90
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 03 Dec 2010 13:48:03 +0900
+
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 17 Dec 2010 18:43:46 +0900
+
+deb.com.samsung.indicator (0.1.0-92) unstable; urgency=low
+
+ * Bug fix for bluetooth
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-92
+ * -
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 17 Dec 2010 18:43:42 +0900
+
+deb.com.samsung.indicator (0.1.0-91) unstable; urgency=low
+
+ * Modifications for wifi, call_divert
+ * Git: slp-source.sec.samsung.net:slp/pkgs/i/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-91
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 15 Dec 2010 20:48:47 +0900
+
+deb.com.samsung.indicator (0.1.0-90) unstable; urgency=low
+
+ * Bugfix for clock display
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-90
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 03 Dec 2010 13:48:03 +0900
+
+deb.com.samsung.indicator (0.1.0-89) unstable; urgency=low
+
+ * Bugfix for scalable UI
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-89
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 26 Nov 2010 23:26:56 +0900
+
+deb.com.samsung.indicator (0.1.0-88) unstable; urgency=low
+
+ * Bugfix for scalable UI
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-88
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 26 Nov 2010 21:01:17 +0900
+
+deb.com.samsung.indicator (0.1.0-87) unstable; urgency=low
+
+ * Change indicator background color
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-87
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 24 Nov 2010 12:01:54 +0900
+
+deb.com.samsung.indicator (0.1.0-86) unstable; urgency=low
+
+ * Restore indicator desktop name
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-86
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 23 Nov 2010 11:53:09 +0900
+
+deb.com.samsung.indicator (0.1.0-85) unstable; urgency=low
+
+ * unstripped package error is fixed
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-85
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 22 Nov 2010 14:32:59 +0900
+
+deb.com.samsung.indicator (0.1.0-84) unstable; urgency=low
+
+ * Package name is changed
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: deb.com.samsung.indicator_0.1.0-84
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 22 Nov 2010 11:58:45 +0900
+
+indicator-win (0.1.0-83) unstable; urgency=low
+
+ * tk.po -> tr.po
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-83
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 18 Nov 2010 10:56:20 +0900
+
+indicator-win (0.1.0-82) unstable; urgency=low
+
+ * Block opening livepanel when idle_lock status
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-82
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 16 Nov 2010 15:53:12 +0900
+
+indicator-win (0.1.0-81) unstable; urgency=low
+
+ * Bugfix for snprintf
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-81
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 10 Nov 2010 11:11:30 +0900
+
+indicator-win (0.1.0-80) unstable; urgency=low
+
+ * Remove beat-font dependency
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-80
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 09 Nov 2010 14:45:55 +0900
+
+indicator-win (0.1.0-79) unstable; urgency=low
+
+ * Bug fix for charging animation
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-79
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 02 Nov 2010 13:39:05 +0900
+
+indicator-win (0.1.0-78) unstable; urgency=low
+
+ * Apply multi-language
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-78
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 27 Oct 2010 19:44:21 +0900
+
+indicator-win (0.1.0-77) unstable; urgency=low
+
+ * Bugfix: label alignment (H0100111252)
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-77
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 26 Oct 2010 14:19:23 +0900
+
+indicator-win (0.1.0-76) unstable; urgency=low
+
+ * Bugfix: label alignment and theme change
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-76
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 25 Oct 2010 21:11:29 +0900
+
+indicator-win (0.1.0-75) unstable; urgency=low
+
+ * Fix bug: bluetooth headset icon
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-75
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 20 Oct 2010 15:15:41 +0900
+
+indicator-win (0.1.0-74) unstable; urgency=low
+
+ * Bluetooth Module is modified
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-74
+
+ -- SaeNa Kim <saina.kim@samsung.com> Sat, 16 Oct 2010 18:31:50 +0900
+
+indicator-win (0.1.0-73) unstable; urgency=low
+
+ * Apply icon theme
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-73
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 11 Oct 2010 20:02:07 +0900
+
+indicator-win (0.1.0-72) unstable; urgency=low
+
+ * Bug fix for vconfkey notify register, after hibernation
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-72
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 06 Oct 2010 14:25:30 +0900
+
+indicator-win (0.1.0-71) unstable; urgency=low
+
+ * Bug fix for label hint min/max set
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-71
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 05 Oct 2010 11:08:34 +0900
+
+indicator-win (0.1.0-70) unstable; urgency=low
+
+ * Bug fix for label hint min/max set
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-70
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 04 Oct 2010 23:39:23 +0900
+
+indicator-win (0.1.0-69) unstable; urgency=low
+
+ * Add charging animation
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-69
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 04 Oct 2010 15:54:32 +0900
+
+indicator-win (0.1.0-68) unstable; urgency=low
+
+ * Apply system string
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-68
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 01 Oct 2010 13:53:07 +0900
+
+indicator-win (0.1.0-67) unstable; urgency=low
+
+ * Bug fix for window rotation
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-67
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 28 Sep 2010 22:07:50 +0900
+
+indicator-win (0.1.0-66) unstable; urgency=low
+
+ * add rotate-lock module
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-66
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 28 Sep 2010 17:26:31 +0900
+
+indicator-win (0.1.0-65) unstable; urgency=low
+
+ * Block livepanel handle while idle lock state
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-65
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 27 Sep 2010 23:12:28 +0900
+
+indicator-win (0.1.0-64) unstable; urgency=low
+
+ * Rotate livepanel handle icon when livepanel state is changed
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-64
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 24 Sep 2010 17:57:43 +0900
+
+indicator-win (0.1.0-63) unstable; urgency=low
+
+ * Fix scale problem
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-63
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 20 Sep 2010 17:43:33 +0900
+
+indicator-win (0.1.0-62) unstable; urgency=low
+
+ * Add hibernation callbacks for idle lock checking
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-62
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 20 Sep 2010 12:55:54 +0900
+
+indicator-win (0.1.0-61) unstable; urgency=low
+
+ * Block livepanel handle while idle lock state
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-61
+
+ -- SaeNa Kim <saina.kim@samsung.com> Sun, 19 Sep 2010 18:23:37 +0900
+
+indicator-win (0.1.0-60) unstable; urgency=low
+
+ * Modify clock width
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-60
+
+ -- SaeNa Kim <saina.kim@samsung.com> Sun, 19 Sep 2010 16:34:33 +0900
+
+indicator-win (0.1.0-59) unstable; urgency=low
+
+ * Hide livepanel handle when landscape mode
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-59
+
+ -- SaeNa Kim <saina.kim@samsung.com> Sat, 18 Sep 2010 23:05:35 +0900
+
+indicator-win (0.1.0-58) unstable; urgency=low
+
+ * Add livepanel handle image
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-58
+
+ -- SaeNa Kim <saina.kim@samsung.com> Sat, 18 Sep 2010 14:19:03 +0900
+
+indicator-win (0.1.0-57) unstable; urgency=low
+
+ * Add lock-ui scenario
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-57
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 17 Sep 2010 22:07:22 +0900
+
+indicator-win (0.1.0-56) unstable; urgency=low
+
+ * Bug fix for dual layout
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-56
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 15 Sep 2010 16:07:32 +0900
+
+indicator-win (0.1.0-55) unstable; urgency=low
+
+ * Add MMC icon & enable touch event
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-55
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 15 Sep 2010 15:27:29 +0900
+
+indicator-win (0.1.0-54) unstable; urgency=low
+
+ * For EFL Upgrade
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-54
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 10 Sep 2010 23:41:12 +0900
+
+indicator-win (0.1.0-53) unstable; urgency=low
+
+ * Add browsing icon
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-53
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 09 Sep 2010 14:09:10 +0900
+
+indicator-win (0.1.0-52) unstable; urgency=low
+
+ * Fix indicator height problem when rotation
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-52
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 08 Sep 2010 21:43:39 +0900
+
+indicator-win (0.1.0-51) unstable; urgency=low
+
+ * Delete livepanel handle image
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-51
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 08 Sep 2010 21:26:50 +0900
+
+indicator-win (0.1.0-50) unstable; urgency=low
+
+ * Add hibernation feature
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-50
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 08 Sep 2010 15:13:17 +0900
+
+indicator-win (0.1.0-49) unstable; urgency=low
+
+ * Add 3G connected icon
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-49
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 01 Sep 2010 22:43:30 +0900
+
+indicator-win (0.1.0-48) unstable; urgency=low
+
+ * Add APPCORE_EVENT_LOW_BATTERY event handler
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-48
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 27 Aug 2010 16:42:08 +0900
+
+indicator-win (0.1.0-47) unstable; urgency=low
+
+ * Delete dlog-0 dependency
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-47
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 26 Aug 2010 16:14:42 +0900
+
+indicator-win (0.1.0-46) unstable; urgency=low
+
+ * Modifications for Secure coding
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-46
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 26 Aug 2010 11:03:42 +0900
+
+indicator-win (0.1.0-45) unstable; urgency=low
+
+ * Fix startup problem (install directory of desktop file)
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-45
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 16 Aug 2010 10:19:49 +0900
+
+indicator-win (0.1.0-44) unstable; urgency=low
+
+ * Add FILE_DEBUG option
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-44
+
+ -- SaeNa Kim <saina.kim@samsung.com> Fri, 13 Aug 2010 15:46:41 +0900
+
+indicator-win (0.1.0-43) unstable; urgency=low
+
+ * Add window rotation callback for indicator icon
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-43
+
+ -- SaeNa Kim <saina.kim@samsung.com> Wed, 11 Aug 2010 19:48:12 +0900
+
+indicator-win (0.1.0-42) unstable; urgency=low
+
+ * Add MAX value for indicator size
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-42
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 10 Aug 2010 21:55:22 +0900
+
+indicator-win (0.1.0-41) unstable; urgency=low
+
+ * Add Call / Sync / Call diverting icons
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-41
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 10 Aug 2010 16:52:50 +0900
+
+indicator-win (0.1.0-40) unstable; urgency=low
+
+ * Remove Mousedown callback handler for Quickpanel
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-40
+
+ -- SaeNa Kim <saina.kim@samsung.com> Tue, 10 Aug 2010 10:29:11 +0900
+
+indicator-win (0.1.0-39) unstable; urgency=low
+
+ * Update for package upload
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-39
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 09 Aug 2010 17:00:34 +0900
+
+indicator-win (0.1.0-38) unstable; urgency=low
+
+ * Modification for change of appcore API
+ * Git: 165.213.180.234:/git/slp/pkgs/indicator-win
+ * Tag: indicator-win_0.1.0-38
+
+ -- SaeNa Kim <saina.kim@samsung.com> Mon, 09 Aug 2010 14:25:52 +0900
+
+indicator-win (0.1.0-37) unstable; urgency=low
+
+ * Maintainer information is changed (SaeNa Kim)
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-37
+
+ -- SaeNa Kim <saina.kim@samsung.com> Thu, 08 Jul 2010 15:20:40 +0900
+
+indicator-win (0.1.0-36) unstable; urgency=low
+
+ * dlog api changes
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-36
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Wed, 16 Jun 2010 11:55:02 +0900
+
+indicator-win (0.1.0-35) unstable; urgency=low
+
+ * EFL upgrade
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-35
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Fri, 11 Jun 2010 13:49:43 +0900
+
+indicator-win (0.1.0-34) unstable; urgency=low
+
+ * remove chown/chmod for indicator bin
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-34
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Thu, 03 Jun 2010 14:01:30 +0900
+
+indicator-win (0.1.0-33) unstable; urgency=low
+
+ * apply changed api(vconft, heynoti)
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-33
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Sun, 30 May 2010 15:36:52 +0900
+
+indicator-win (0.1.0-32) unstable; urgency=low
+
+ * block quickpanel launching when startup applicaation is running
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-32
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 25 May 2010 16:37:52 +0900
+
+indicator-win (0.1.0-31) unstable; urgency=low
+
+ * add privilege_control
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-31
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Wed, 19 May 2010 17:30:23 +0900
+
+indicator-win (0.1.0-30) unstable; urgency=low
+
+ * elementary update
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-30
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Mon, 17 May 2010 21:16:56 +0900
+
+indicator-win (0.1.0-29) unstable; urgency=low
+
+ * add filemanager mmc noti, add postinst file for security
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-29
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 20 Apr 2010 20:09:53 +0900
+
+indicator-win (0.1.0-28) unstable; urgency=low
+
+ * remove dlog_init, dlog_deinit functions
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-28
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Mon, 19 Apr 2010 11:00:38 +0900
+
+indicator-win (0.1.0-27) unstable; urgency=low
+
+ * add seven_email noti
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Wed, 14 Apr 2010 19:53:15 +0900
+
+indicator-win (0.1.0-26) unstable; urgency=low
+
+ * add hibernation_leave, hibernation_enter noti
+ * Git: 165.213.180.234:/git/slp2.0/slp2.0-pkgs/indicator-0
+ * Tag: indicator-win_0.1.0-26
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Fri, 02 Apr 2010 19:42:48 +0900
+
+indicator-win (0.1.0-25) unstable; urgency=low
+
+ * add landscape indicator
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Thu, 01 Apr 2010 20:46:16 +0900
+
+indicator-win (0.1.0-24) unstable; urgency=low
+
+ * add landscape indicator
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Thu, 01 Apr 2010 18:54:56 +0900
+
+indicator-win (0.1.0-23) unstable; urgency=low
+
+ * bug fix regarding flight mode and no sim
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Thu, 25 Mar 2010 12:19:20 +0900
+
+indicator-win (0.1.0-22) unstable; urgency=low
+
+ * bug fix regarding flight mode and cs no service
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Mon, 22 Mar 2010 17:59:38 +0900
+
+indicator-win (0.1.0-21) unstable; urgency=low
+
+ * bug fix about no sim mode
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Mon, 22 Mar 2010 17:02:17 +0900
+
+indicator-win (0.1.0-20) unstable; urgency=low
+
+ * add image_cache_flush
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Fri, 19 Mar 2010 19:02:15 +0900
+
+indicator-win (0.1.0-19) unstable; urgency=low
+
+ * GUI update
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Wed, 17 Mar 2010 11:22:14 +0900
+
+indicator-win (0.1.0-18) unstable; urgency=low
+
+ * manage BT and USB icon seperately
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Mon, 15 Mar 2010 19:31:12 +0900
+
+indicator-win (0.1.0-17) unstable; urgency=low
+
+ * upload pkg again
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Mon, 15 Mar 2010 14:41:40 +0900
+
+indicator-win (0.1.0-16) unstable; urgency=low
+
+ * add call diverting noti
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 09 Mar 2010 14:48:41 +0900
+
+indicator-win (0.1.0-15) unstable; urgency=low
+
+ * bug fix regarding zone
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Mon, 08 Mar 2010 13:18:41 +0900
+
+indicator-win (0.1.0-14) unstable; urgency=low
+
+ * add client event for quickpanel hiding
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Fri, 05 Mar 2010 19:50:24 +0900
+
+indicator-win (0.1.0-13) unstable; urgency=low
+
+ * remove browser noti. it will be changed to dnet noti
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Fri, 05 Mar 2010 14:54:41 +0900
+
+indicator-win (0.1.0-12) unstable; urgency=low
+
+ * bug fix about message blinking (manage count)
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Thu, 04 Mar 2010 18:14:24 +0900
+
+indicator-win (0.1.0-11) unstable; urgency=low
+
+ * calculate ELM_SCALE value
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Thu, 04 Mar 2010 16:48:48 +0900
+
+indicator-win (0.1.0-10) unstable; urgency=low
+
+ * icon duplicated problem
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Thu, 04 Mar 2010 15:08:00 +0900
+
+indicator-win (0.1.0-9) unstable; urgency=low
+
+ * merge indicator daemon
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Wed, 03 Mar 2010 15:28:58 +0900
+
+indicator-win (0.1.0-8) unstable; urgency=low
+
+ * add missed call icon
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 02 Mar 2010 19:20:35 +0900
+
+indicator-win (0.1.0-7) unstable; urgency=low
+
+ * add missed call
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 02 Mar 2010 19:11:25 +0900
+
+indicator-win (0.1.0-6) unstable; urgency=low
+
+ * add sns, video call, wifi transfer
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 02 Mar 2010 16:06:47 +0900
+
+indicator-win (0.1.0-5) unstable; urgency=low
+
+ * add im, low battery noti
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 23 Feb 2010 22:14:07 +0900
+
+indicator-win (0.1.0-4) unstable; urgency=low
+
+ * change indicator height
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 23 Feb 2010 20:16:20 +0900
+
+indicator-win (0.1.0-3) unstable; urgency=low
+
+ * add desktop file installation
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 23 Feb 2010 16:12:48 +0900
+
+indicator-win (0.1.0-2) unstable; urgency=low
+
+ * remove installation
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 23 Feb 2010 15:18:26 +0900
+
+indicator-win (0.1.0-1) unstable; urgency=low
+
+ * add indicator.desktop
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Tue, 23 Feb 2010 14:11:14 +0900
+
+indicator-win (0.1.0) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Sohyun Kim <anna1014.kim@samsung.com> Sat, 14 Nov 2009 17:25:47 +0900
--- /dev/null
+Source: indicator
+Section: devel
+Priority: extra
+Maintainer: Jeonghoon Park <jh1979.park@samsung.com>, Youngjoo Park <yjoo93.park@samsung.com>
+Uploaders: Jeonghoon Park <jh1979.park@samsung.com>
+Build-Depends: debhelper (>= 5), libappcore-efl-dev, libelm-dev, libdbus-1-dev, libheynoti-dev, libslp-setting-dev, dlog-dev, libprivilege-control-dev, libnotification-dev, libslp-utilx-dev, libstatus-dev
+Standards-Version: 0.1.0
+
+Package: org.tizen.indicator
+Section: utils
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, libslp-setting-0
+Description: indicator window
+
+Package: org.tizen.indicator-dbg
+Section: debug
+Architecture: any
+Depends: org.tizen.indicator (= ${Source-Version})
+Description: indicator window (unstripped)
+
--- /dev/null
+usr/bin
+usr/sbin
--- /dev/null
+@PREFIX@/bin/*
+@PREFIX@/res/locale/*
+@PREFIX@/res/icons/*
+@PREFIX@/res/edje/*
+@PREFIX@/data
+/usr/share/applications/*
+/etc/init.d/*
--- /dev/null
+#!/bin/sh
+
+if [ ${USER} = "root" ]
+then
+ vconftool set -t int memory/radio/state 0 -i -g 6518
+ vconftool set -t int memory/music/state 0 -i -g 6518
+ vconftool set -t int memory/private/@VENDOR@.@PROJECT_NAME@/home_pressed 0 -i -g 6518
+ chown -R 5000:5000 @PREFIX@/data
+fi
+
+chmod 755 /etc/init.d/indicator
+mkdir -p /etc/rc.d/rc5.d/
+mkdir -p /etc/rc.d/rc3.d/
+ln -sf /etc/init.d/indicator /etc/rc.d/rc5.d/S01indicator
+ln -sf /etc/init.d/indicator /etc/rc.d/rc3.d/S44indicator
+
--- /dev/null
+#!/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
+CXXFLAGS ?= -Wall -g
+LDFLAGS ?=
+VENDOR ?= tizen
+PROJECT_NAME ?= indicator
+PREFIX ?= /usr/apps/org.$(VENDOR).$(PROJECT_NAME)
+PREFIXRW ?= /opt/apps/org.$(VENDOR).$(PROJECT_NAME)
+RESDIR ?= $(PREFIX)/res
+DATADIR ?= $(PREFIXRW)/data
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+ CXXFLAGS += -O0
+else
+ CFLAGS += -O2
+ CXXFLAGS += -O2
+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)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" cmake .. -DCMAKE_INSTALL_PREFIX=$(PREFIX) -DCMAKE_INSTALL_PREFIXRW=$(PREFIXRW)
+
+ touch configure-stamp
+
+build: build-stamp
+
+build-stamp: configure-stamp
+ dh_testdir
+
+ # Add here commans to compile the package.
+ cd $(CMAKE_BUILD_DIR) && $(MAKE)
+ #docbook-to-man debian/wavplayer.sgml > wavplayer.1
+
+ for f in `find $(CURDIR)/debian/ -name "*.in"`; do \
+ cat $$f > $${f%.in}; \
+ sed -i -e "s#@VENDOR@#$(VENDOR)#g" $${f%.in}; \
+ sed -i -e "s#@PROJECT_NAME@#$(PROJECT_NAME)#g" $${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
+ dh_strip --dbg-package=org.tizen.indicator-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
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include <heynoti.h>
+#include <runtime_info.h>
+#include <Ecore_X.h>
+#include <unicode/udat.h>
+#include <unicode/udatpg.h>
+
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "indicator_gui.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+
+#define SYSTEM_RESUME "system_wakeup"
+
+#define TIME_FONT_SIZE_24 34
+#define TIME_FONT_SIZE_12 30
+#define TIME_FONT_SIZE_BATTERY 32
+#define TIME_FONT_COLOR 243, 243, 243, 255
+
+#define AMPM_FONT_SIZE 24
+#define AMPM_FONT_COLOR 243, 243, 243, 255
+#define LABEL_STRING "<font_size=%d>%s" \
+ "</font_size></font>"
+
+#define CLOCK_STR_LEN 256
+
+enum {
+ INDICATOR_CLOCK_MODE_12H = 0,
+ INDICATOR_CLOCK_MODE_24H,
+ INDICATOR_CLOCK_MODE_MAX
+};
+
+static int notifd;
+static int clock_mode = INDICATOR_CLOCK_MODE_12H;
+static int apm_length = 0;
+static int apm_position = 0;
+static Ecore_Timer *timer = NULL;
+static Ecore_Timer *battery_timer = NULL;
+
+static int register_clock_module(void *data);
+static int unregister_clock_module(void);
+static int hib_enter_clock_module(void);
+static int hib_leave_clock_module(void *data);
+static int language_changed_cb(void *data);
+static int region_changed_cb(void *data);
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED6
+#define MODULE_NAME "clock"
+
+static void indicator_get_time_by_region(char* output, void* data);
+static void ICU_set_timezone(const char *timezone);
+
+Indicator_Icon_Object sysclock[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_TXT_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .init = register_clock_module,
+ .fini = unregister_clock_module,
+ .hib_enter = hib_enter_clock_module,
+ .hib_leave = hib_leave_clock_module,
+ .lang_changed = NULL,
+ .region_changed = region_changed_cb,
+ .lang_changed = language_changed_cb
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_TXT_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .init = register_clock_module,
+ .fini = unregister_clock_module,
+ .hib_enter = hib_enter_clock_module,
+ .hib_leave = hib_leave_clock_module,
+ .lang_changed = NULL,
+ .region_changed = region_changed_cb,
+ .lang_changed = language_changed_cb
+}
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ sysclock[i].ad = data;
+ }
+}
+
+static void indicator_clock_changed_cb(void *data)
+{
+ struct appdata *ad = (struct appdata *)data;
+ char time_str[32];
+ char time_buf[128], ampm_buf[128];
+ char buf[CLOCK_STR_LEN];
+ char icu_apm[CLOCK_STR_LEN] = {0,};
+ char apm_result[CLOCK_STR_LEN] ={0,};
+ struct tm *ts = NULL;
+ time_t ctime;
+ int len;
+ int font_size;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ if (battery_timer != NULL)
+ {
+ DBG("battery is displaying. ignore clock callback");
+ return;
+ }
+
+ ctime = time(NULL);
+ ts = localtime(&ctime);
+ if (ts == NULL)
+ return;
+
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+
+ memset(time_str, 0x00, sizeof(time_str));
+ memset(time_buf, 0x00, sizeof(time_buf));
+ memset(ampm_buf, 0x00, sizeof(ampm_buf));
+ memset(buf, 0x00, sizeof(buf));
+
+ timer =
+ ecore_timer_add(60 - ts->tm_sec, (void *)indicator_clock_changed_cb,
+ data);
+
+ indicator_get_time_by_region(icu_apm,data);
+
+ if (clock_mode == INDICATOR_CLOCK_MODE_12H) {
+ char bf1[32] = { 0, };
+ int hour;
+
+ if(apm_length>0 && apm_length<=4)
+ {
+ snprintf(ampm_buf, sizeof(ampm_buf),LABEL_STRING, AMPM_FONT_SIZE,icu_apm);
+ }
+ else
+ {
+ if (ts->tm_hour >= 0 && ts->tm_hour < 12)
+ snprintf(ampm_buf, sizeof(ampm_buf),
+ LABEL_STRING, AMPM_FONT_SIZE,
+ "AM");
+ else
+ snprintf(ampm_buf, sizeof(ampm_buf),
+ LABEL_STRING, AMPM_FONT_SIZE,
+ "PM");
+ }
+
+ strftime(bf1, sizeof(bf1), "%l", ts);
+ hour = atoi(bf1);
+ strftime(bf1, sizeof(bf1), ":%M", ts);
+
+ snprintf(time_str, sizeof(time_str), "%d%s", hour, bf1);
+ font_size = TIME_FONT_SIZE_12;
+ indicator_signal_emit(data,"indicator.clock.ampm","indicator.prog");
+ }
+ else{
+ font_size = TIME_FONT_SIZE_24;
+ strftime(time_str, sizeof(time_str), "%H:%M", ts);
+ indicator_signal_emit(data,"indicator.clock.default","indicator.prog");
+ }
+
+ snprintf(time_buf, sizeof(time_buf), LABEL_STRING, font_size, time_str);
+
+ if(apm_position == 0)
+ len = snprintf(buf, sizeof(buf), "%s%s", ampm_buf, time_buf);
+ else
+ len = snprintf(buf, sizeof(buf), "%s%s", time_buf, ampm_buf);
+
+ if (len < 0) {
+ ERR("Unexpected ERROR!");
+ return;
+ }
+
+ INFO("[CLOCK MODULE] Timer Status : %d Time: %s", timer, buf);
+
+ indicator_part_text_emit(data,"elm.text.clock", buf);
+
+ return;
+}
+
+static void indicator_clock_format_changed_cb(keynode_t *node, void *data)
+{
+ retif(data == NULL, , "Invalid parameter!");
+
+ int r = -1;
+
+ bool is_24hour_enabled = false;
+
+ INFO("[Enter] indicator_clock_format_changed_cb");
+
+ r = runtime_info_get_value_bool(
+ RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED, &is_24hour_enabled);
+
+ if( r==RUNTIME_INFO_ERROR_NONE&&is_24hour_enabled==true)
+ {
+ clock_mode = INDICATOR_CLOCK_MODE_24H;
+ }
+ else
+ {
+ clock_mode = INDICATOR_CLOCK_MODE_12H;
+ }
+
+ char *timezone = vconf_get_str(VCONFKEY_SETAPPL_TIMEZONE_ID);
+ ICU_set_timezone(timezone);
+ indicator_clock_changed_cb(data);
+ free(timezone);
+}
+
+static void indicator_clock_battery_changed_cb(keynode_t *node, void *data)
+{
+ indicator_clock_display_battery_percentage(data);
+}
+
+static void indicator_clock_battery_display_cb(void *data)
+{
+ int ret = 0;
+
+ if (battery_timer != NULL) {
+ ecore_timer_del(battery_timer);
+ battery_timer = NULL;
+ }
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
+ indicator_clock_battery_changed_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_REGIONFORMAT_TIME1224");
+
+ indicator_clock_changed_cb(data);
+}
+
+void indicator_clock_display_battery_percentage(void *data)
+{
+ int ret = FAIL;
+ int status = 0;
+ int battery_capa = 0;
+ char buf[256] = {0,};
+ char temp[256] = {0,};
+
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &status);
+ if (ret != OK)
+ ERR("Fail to get [%s: %d]",
+ VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, ret);
+
+ if(status)
+ {
+ ret = vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CAPACITY, &battery_capa);
+ if (ret != OK)
+ {
+ ERR("Fail to get [VCONFKEY_SYSMAN_BATTERY_CAPACITY:%d]", ret);
+ return;
+ }
+ if (battery_capa < 0)
+ {
+ INFO("Invalid Battery Capacity: %d", battery_capa);
+ return;
+ }
+
+ INFO("Battery Capacity: %d", battery_capa);
+
+ if (battery_capa > 100)
+ battery_capa = 100;
+
+ snprintf(temp, sizeof(temp), "%d%%",battery_capa);
+
+ snprintf(buf, sizeof(buf), LABEL_STRING, TIME_FONT_SIZE_BATTERY, temp);
+
+ INFO("indicator_clock_display_battery_percentage %s", buf);
+
+ indicator_part_text_emit(data,"elm.text.clock", buf);
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
+ indicator_clock_battery_changed_cb, data);
+ if (ret != OK) {
+ ERR("Fail: register VCONFKEY_REGIONFORMAT_TIME1224");
+ return;
+ }
+
+ battery_timer = ecore_timer_add(3, (void *)indicator_clock_battery_display_cb,data);
+ }
+
+}
+
+
+static int language_changed_cb(void *data)
+{
+ DBG("language_changed_cb");
+ indicator_clock_changed_cb(data);
+ return OK;
+}
+
+static int region_changed_cb(void *data)
+{
+ DBG("region_changed_cb");
+ indicator_clock_format_changed_cb(NULL, data);
+ return OK;
+}
+
+static int register_clock_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ notifd = heynoti_init();
+
+ if (notifd < 0) {
+ ERR("heynoti_init is failed");
+ return r;
+ }
+
+ ret =
+ heynoti_subscribe(notifd, SYSTEM_RESUME, indicator_clock_changed_cb,
+ data);
+ if (ret != OK) {
+ ERR("Fail: register SYSTEM_RESUME");
+ r = r | ret;
+ }
+
+ ret = heynoti_attach_handler(notifd);
+ if (ret != OK) {
+ ERR("Failed to attach heynoti handler!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED,
+ indicator_clock_format_changed_cb, data);
+ if (ret != OK) {
+ ERR("Fail: register VCONFKEY_SYSTEM_TIME_CHANGED");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_REGIONFORMAT_TIME1224,
+ indicator_clock_format_changed_cb, data);
+ if (ret != OK) {
+ ERR("Fail: register VCONFKEY_REGIONFORMAT_TIME1224");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_TIMEZONE_INT,
+ indicator_clock_format_changed_cb, data);
+ if (ret != OK) {
+ ERR("Fail: register VCONFKEY_SETAPPL_TIMEZONE_INT");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_PM_STATE, indicator_clock_format_changed_cb, (void *)data);
+
+ if (ret != OK) {
+ ERR("Fail: register VCONFKEY_PM_STATE");
+ r = r | ret;
+ }
+
+ indicator_clock_format_changed_cb(NULL, data);
+
+ return r;
+}
+
+static int unregister_clock_module(void)
+{
+ int ret;
+
+ heynoti_unsubscribe(notifd, SYSTEM_RESUME, indicator_clock_changed_cb);
+
+ heynoti_close(notifd);
+ notifd = 0;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSTEM_TIME_CHANGED,
+ indicator_clock_format_changed_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_SYSTEM_TIME_CHANGED");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_REGIONFORMAT_TIME1224,
+ indicator_clock_format_changed_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_REGIONFORMAT_TIME1224");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_TIMEZONE_INT,
+ indicator_clock_format_changed_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_SETAPPL_TIMEZONE_INT");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_PM_STATE,
+ indicator_clock_format_changed_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_PM_STATE");
+
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+ return OK;
+}
+
+static int hib_enter_clock_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_REGIONFORMAT_TIME1224,
+ indicator_clock_format_changed_cb);
+ if (ret != OK)
+ ERR("Fail: unregister VCONFKEY_REGIONFORMAT_TIME1224");
+
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+
+ return OK;
+}
+
+static int hib_leave_clock_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_REGIONFORMAT_TIME1224,
+ indicator_clock_format_changed_cb, data);
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_clock_format_changed_cb(NULL, data);
+ return OK;
+}
+
+void indicator_get_time_by_region(char* output,void *data)
+{
+ retif(data == NULL, NULL, "Data parameter is NULL");
+ retif(output == NULL, NULL, "output parameter is NULL");
+
+
+ UChar customSkeleton[CLOCK_STR_LEN] = { 0, };
+ UErrorCode status = U_ZERO_ERROR;
+ UDateFormat *formatter = NULL;
+
+ UChar bestPattern[CLOCK_STR_LEN] = { 0, };
+ UChar formatted[CLOCK_STR_LEN] = { 0, };
+
+ char bestPatternString[CLOCK_STR_LEN] = { 0, };
+ char formattedString[CLOCK_STR_LEN] = { 0, };
+
+ UDateTimePatternGenerator *pattern_generator = NULL;
+
+ char *time_skeleton = "hhmm";
+
+ char *locale = vconf_get_str(VCONFKEY_REGIONFORMAT);
+ if (locale == NULL) {
+ DBG("[Error] get value of VCONFKEY_REGIONFORMAT fail.");
+ }
+
+ u_uastrncpy(customSkeleton, time_skeleton, strlen(time_skeleton));
+
+ pattern_generator = udatpg_open(locale, &status);
+
+ int32_t bestPatternCapacity = (int32_t) (sizeof(bestPattern) / sizeof((bestPattern)[0]));
+ (void)udatpg_getBestPattern(pattern_generator, customSkeleton,
+ u_strlen(customSkeleton), bestPattern,
+ bestPatternCapacity, &status);
+
+ u_austrcpy(bestPatternString, bestPattern);
+ u_uastrcpy(bestPattern,"a");
+
+ if(bestPatternString[0] == 'a')
+ {
+ apm_position = 0;
+ }
+ else
+ {
+ apm_position = 1;
+ }
+
+ UDate date = ucal_getNow();
+ formatter = udat_open(UDAT_IGNORE, UDAT_IGNORE, locale, NULL, -1, bestPattern, -1, &status);
+ int32_t formattedCapacity = (int32_t) (sizeof(formatted) / sizeof((formatted)[0]));
+ (void)udat_format(formatter, date, formatted, formattedCapacity, NULL, &status);
+ u_austrcpy(formattedString, formatted);
+
+ DBG("DATE & TIME is %s %s %d %s", locale, formattedString, u_strlen(formatted), bestPatternString);
+
+ apm_length = u_strlen(formatted);
+
+ udatpg_close(pattern_generator);
+
+ udat_close(formatter);
+
+ if(strlen(formattedString)<CLOCK_STR_LEN)
+ {
+ strncpy(output,formattedString,strlen(formattedString));
+ }
+ else
+ {
+ strncpy(output,formattedString,CLOCK_STR_LEN-1);
+ }
+
+ return;
+}
+
+static UChar *uastrcpy(const char *chars)
+{
+ int len = 0;
+ UChar *str = NULL;
+ len = strlen(chars);
+ str = (UChar *) malloc(sizeof(UChar) *(len + 1));
+ if (!str)
+ return NULL;
+ u_uastrcpy(str, chars);
+ return str;
+}
+
+static void ICU_set_timezone(const char *timezone)
+{
+ DBG("ICU_set_timezone = %s ", timezone);
+ UErrorCode ec = U_ZERO_ERROR;
+ UChar *str = uastrcpy(timezone);
+
+ ucal_setDefaultTimeZone(str, &ec);
+ if (U_SUCCESS(ec)) {
+ DBG("ucal_setDefaultTimeZone() SUCCESS ");
+ } else {
+ DBG("ucal_setDefaultTimeZone() FAILED : %s ",
+ u_errorName(ec));
+ }
+ free(str);
+}
+
+
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED2
+#define MODULE_NAME "connection"
+#define TIMER_INTERVAL 0.3
+
+static int register_conn_module(void *data);
+static int unregister_conn_module(void);
+extern void show_trnsfr_icon(void *data);
+extern void hide_trnsfr_icon(void);
+
+Indicator_Icon_Object conn[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .init = register_conn_module,
+ .fini = unregister_conn_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .init = register_conn_module,
+ .fini = unregister_conn_module
+}
+};
+
+enum {
+ LEVEL_MIN = 0,
+ LEVEL_2G = LEVEL_MIN,
+ LEVEL_EDGE,
+ LEVEL_3G,
+ LEVEL_HS,
+ LEVEL_3G_PLUS,
+ LEVEL_CDMA,
+ LEVEL_GPRS,
+ LEVEL_EVDO,
+ LEVEL_CONN,
+ LEVEL_CONN03,
+ LEVEL_CONN_1X,
+ LEVEL_LTE,
+ LEVEL_MAX
+};
+
+static const char *icon_path[LEVEL_MAX] = {
+ [LEVEL_2G] = "Connection/B03_connection_GSM.png",
+ [LEVEL_EDGE] = "Connection/B03_connection02.png",
+ [LEVEL_3G] = "Connection/B03_connection_3G.png",
+ [LEVEL_HS] = "Connection/B03_connection_Highspeed.png",
+ [LEVEL_3G_PLUS] = "Connection/B03_connection_3G+.png",
+ [LEVEL_CDMA] = "Connection/B03_connection_CDMA.png",
+ [LEVEL_GPRS] = "Connection/B03_connection_GPRS.png",
+ [LEVEL_EVDO] = "Connection/B03_connection_EVDO.png",
+ [LEVEL_CONN] = "Connection/B03_connection.png",
+ [LEVEL_CONN03] = "Connection/B03_connection03.png",
+ [LEVEL_CONN_1X] = "Connection/B03_connection_1x.png",
+ [LEVEL_LTE] = "Connection/B03_connection_LTE.png",
+};
+
+static Eina_Bool dnet_transferring = EINA_FALSE;
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ conn[i].ad = data;
+ }
+}
+
+static void show_image_icon(int type)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ conn[i].img_obj.data = icon_path[type];
+ indicator_util_icon_show(&conn[i]);
+ }
+}
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&conn[i]);
+ }
+}
+
+
+static void indicator_conn_change_cb(keynode_t *node, void *data)
+{
+ int svc_type = VCONFKEY_TELEPHONY_SVCTYPE_NONE;
+ int status = 0;
+ int ret = 0;
+ int ps_type = VCONFKEY_TELEPHONY_PSTYPE_NONE;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_WIFI_STATE, &status);
+ if (ret == OK) {
+ INFO("CONNECTION WiFi Status: %d", status);
+ if ((status == VCONFKEY_WIFI_CONNECTED)) {
+ indicator_util_icon_hide(&conn);
+ if (dnet_transferring == EINA_TRUE) {
+ hide_trnsfr_icon();
+ dnet_transferring = EINA_FALSE;
+ }
+ return;
+ }
+ }
+
+ ret = vconf_get_int(VCONFKEY_DNET_STATE, &status);
+ if (ret == OK) {
+ INFO("CONNECTION DNET Status: %d", status);
+ if (status == VCONFKEY_DNET_TRANSFER) {
+ if (dnet_transferring == EINA_FALSE) {
+ show_trnsfr_icon(data);
+ dnet_transferring = EINA_TRUE;
+ }
+ } else {
+ if (dnet_transferring == EINA_TRUE) {
+ hide_trnsfr_icon();
+ dnet_transferring = EINA_FALSE;
+ }
+ }
+ }
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_PSTYPE, &ps_type);
+ if (ret == OK) {
+ INFO("Telephony packet service type: %d", ps_type);
+
+ switch (ps_type) {
+ case VCONFKEY_TELEPHONY_PSTYPE_HSDPA:
+ case VCONFKEY_TELEPHONY_PSTYPE_HSUPA:
+ case VCONFKEY_TELEPHONY_PSTYPE_HSPA:
+ show_image_icon(LEVEL_HS);
+ return;
+ case VCONFKEY_TELEPHONY_PSTYPE_NONE:
+ default:
+ break;
+ }
+ }
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &svc_type);
+ if (ret == OK) {
+ INFO("Telephony service type: %d", svc_type);
+
+ switch (svc_type) {
+ case VCONFKEY_TELEPHONY_SVCTYPE_2G:
+ case VCONFKEY_TELEPHONY_SVCTYPE_2_5G:
+ show_image_icon(LEVEL_2G);
+ break;
+ case VCONFKEY_TELEPHONY_SVCTYPE_2_5G_EDGE:
+ show_image_icon(LEVEL_EDGE);
+ break;
+ case VCONFKEY_TELEPHONY_SVCTYPE_3G:
+ show_image_icon(LEVEL_3G);
+ break;
+ case VCONFKEY_TELEPHONY_SVCTYPE_HSDPA:
+ show_image_icon(LEVEL_HS);
+ break;
+ case VCONFKEY_TELEPHONY_SVCTYPE_LTE:
+ show_image_icon(LEVEL_LTE);
+ break;
+
+ default:
+ hide_image_icon();
+ break;
+ }
+
+ return;
+ }
+
+ hide_image_icon();
+
+ return;
+}
+
+static int register_conn_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVCTYPE,
+ indicator_conn_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_DNET_STATE,
+ indicator_conn_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_PSTYPE,
+ indicator_conn_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ indicator_conn_change_cb(NULL, data);
+
+ return r;
+}
+
+static int unregister_conn_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVCTYPE,
+ indicator_conn_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_DNET_STATE,
+ indicator_conn_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ if (dnet_transferring == EINA_TRUE) {
+ hide_trnsfr_icon();
+ dnet_transferring = EINA_FALSE;
+ }
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "mobile_hotspot"
+
+static int register_mobile_hotspot_module(void *data);
+static int unregister_mobile_hotspot_module(void);
+
+Indicator_Icon_Object mobile_hotspot[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_mobile_hotspot_module,
+ .fini = unregister_mobile_hotspot_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_mobile_hotspot_module,
+ .fini = unregister_mobile_hotspot_module
+}
+
+};
+
+enum {
+ MOBILEAP_ON_NOT_CONNECTED = 0,
+ MOBILEAP_CONNECTED_MIN = MOBILEAP_ON_NOT_CONNECTED,
+ MOBILEAP_CONNECTED1,
+ MOBILEAP_CONNECTED2,
+ MOBILEAP_CONNECTED3,
+ MOBILEAP_CONNECTED4,
+ MOBILEAP_CONNECTED5,
+ MOBILEAP_CONNECTED6,
+ MOBILEAP_CONNECTED7,
+ MOBILEAP_CONNECTED8,
+ MOBILEAP_CONNECTED9,
+ MOBILEAP_MAX,
+};
+
+static const char *icon_path[MOBILEAP_MAX] = {
+ [MOBILEAP_ON_NOT_CONNECTED] =
+ "Connection/B03_MobileAP_on¬ connected.png",
+ [MOBILEAP_CONNECTED1] = "Connection/B03_MobileAP_connected_01.png",
+ [MOBILEAP_CONNECTED2] = "Connection/B03_MobileAP_connected_02.png",
+ [MOBILEAP_CONNECTED3] = "Connection/B03_MobileAP_connected_03.png",
+ [MOBILEAP_CONNECTED4] = "Connection/B03_MobileAP_connected_04.png",
+ [MOBILEAP_CONNECTED5] = "Connection/B03_MobileAP_connected_05.png",
+ [MOBILEAP_CONNECTED6] = "Connection/B03_MobileAP_connected_06.png",
+ [MOBILEAP_CONNECTED7] = "Connection/B03_MobileAP_connected_07.png",
+ [MOBILEAP_CONNECTED8] = "Connection/B03_MobileAP_connected_08.png",
+ [MOBILEAP_CONNECTED9] = "Connection/B03_MobileAP_connected_09.png",
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ mobile_hotspot[i].ad = data;
+ }
+}
+
+static void show_image_icon(int type)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ mobile_hotspot[i].img_obj.data = icon_path[type];
+ indicator_util_icon_show(&mobile_hotspot[i]);
+ }
+}
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&mobile_hotspot[i]);
+ }
+}
+
+static void indicator_mobile_hotspot_change_cb(keynode_t *node, void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+ ret = vconf_get_int(VCONFKEY_MOBILE_HOTSPOT_MODE, &status);
+ if (ret == OK) {
+ INFO("mobile_hotspot status: %d", status);
+ if (status != VCONFKEY_MOBILE_HOTSPOT_MODE_NONE) {
+ int icon_index = 0;
+ int connected_device = 0;
+
+ ret = vconf_get_int(
+ VCONFKEY_MOBILE_HOTSPOT_CONNECTED_DEVICE,
+ &connected_device);
+
+ if (ret == OK)
+ {
+ icon_index = MOBILEAP_CONNECTED_MIN + connected_device;
+ if (icon_index < MOBILEAP_ON_NOT_CONNECTED) {
+ ERR("unable to handle %d connected devices ",
+ connected_device);
+ icon_index = MOBILEAP_ON_NOT_CONNECTED;
+ } else if (icon_index >= MOBILEAP_MAX) {
+ ERR("unable to handle %d connected devices ",
+ connected_device);
+ icon_index = MOBILEAP_CONNECTED9;
+ }
+ show_image_icon(icon_index);
+ }
+ else
+ {
+ show_image_icon(MOBILEAP_ON_NOT_CONNECTED);
+ }
+ return;
+ } else {
+ hide_image_icon();
+ return;
+ }
+ }
+
+ hide_image_icon();
+ return;
+}
+
+static int register_mobile_hotspot_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE,
+ indicator_mobile_hotspot_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_MOBILE_HOTSPOT_CONNECTED_DEVICE,
+ indicator_mobile_hotspot_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ indicator_mobile_hotspot_change_cb(NULL, data);
+
+ return r;
+}
+
+static int unregister_mobile_hotspot_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_MODE,
+ indicator_mobile_hotspot_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_MOBILE_HOTSPOT_CONNECTED_DEVICE,
+ indicator_mobile_hotspot_change_cb);
+ if (ret != OK)
+ ERR("Failed to register callback!");
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "usb"
+#define TIMER_INTERVAL 0.3
+
+static int register_usb_module(void *data);
+static int unregister_usb_module(void);
+extern void show_trnsfr_icon(void *data);
+extern void hide_trnsfr_icon(void);
+
+Indicator_Icon_Object usb[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .init = register_usb_module,
+ .fini = unregister_usb_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .init = register_usb_module,
+ .fini = unregister_usb_module
+}
+};
+
+static const char *icon_path[] = {
+ "USB tethering/B03_USB.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ usb[i].ad = data;
+ }
+}
+
+static void show_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ usb[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&usb[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&usb[i]);
+ }
+}
+
+static void indicator_usb_change_cb(keynode_t *node, void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_SYSMAN_USB_STATUS, &status);
+ if (ret == OK) {
+ if (status >= VCONFKEY_SYSMAN_USB_CONNECTED) {
+ INFO("indicator_usb_change_cb : CONNECTION USB Status: %d", status);
+ show_image_icon();
+ return;
+ }
+ else
+ {
+ ret = vconf_get_int(VCONFKEY_SYSMAN_USB_HOST_STATUS, &status);
+ if (ret == OK) {
+ if (status >= VCONFKEY_SYSMAN_USB_HOST_CONNECTED) {
+ INFO("indicator_usb_change_cb : Host USB Status: %d", status);
+ show_image_icon();
+ return;
+ } else
+ hide_image_icon();
+ }
+ }
+ }
+
+ return;
+}
+
+static int register_usb_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_STATUS,
+ indicator_usb_change_cb, data);
+ if (ret != OK)
+ {
+ ERR("Failed to register callback(VCONFKEY_SYSMAN_USB_STATUS)!");
+ r = ret;
+ }
+
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_USB_HOST_STATUS,
+ indicator_usb_change_cb, data);
+ if (ret != OK)
+ {
+ ERR("Failed to register callback(VCONFKEY_SYSMAN_USB_HOST_STATUS)!");
+ r = r|ret;
+ }
+
+
+ indicator_usb_change_cb(NULL, data);
+
+ return r;
+}
+
+static int unregister_usb_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_USB_STATUS,
+ indicator_usb_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback(VCONFKEY_SYSMAN_USB_STATUS)!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_USB_HOST_STATUS,
+ indicator_usb_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback(VCONFKEY_SYSMAN_USB_HOST_STATUS)!");
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED2
+#define MODULE_NAME "wifi"
+#define TIMER_INTERVAL 0.3
+
+static int register_wifi_module(void *data);
+static int unregister_wifi_module(void);
+extern void show_trnsfr_icon(void *data);
+extern void hide_trnsfr_icon(void);
+
+Indicator_Icon_Object wifi[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .init = register_wifi_module,
+ .fini = unregister_wifi_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .init = register_wifi_module,
+ .fini = unregister_wifi_module
+}
+};
+
+enum {
+ LEVEL_WIFI_01 = 0,
+ LEVEL_WIFI = LEVEL_WIFI_01,
+ LEVEL_WIFI_02,
+ LEVEL_WIFI_03,
+ LEVEL_WIFI_04,
+ LEVEL_WIFI_MAX
+};
+
+static const char *icon_path[LEVEL_WIFI_MAX] = {
+ [LEVEL_WIFI_01] = "Connection/B03_connection_Wifi_01.png",
+ [LEVEL_WIFI_02] = "Connection/B03_connection_Wifi_02.png",
+ [LEVEL_WIFI_03] = "Connection/B03_connection_Wifi_03.png",
+ [LEVEL_WIFI_04] = "Connection/B03_connection_Wifi_04.png",
+};
+
+static Eina_Bool wifi_transferring = EINA_FALSE;
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ wifi[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data, int index)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ wifi[i].img_obj.data = icon_path[index];
+ indicator_util_icon_show(&wifi[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&wifi[i]);
+ }
+}
+
+
+static void indicator_wifi_change_cb(keynode_t *node, void *data)
+{
+ int status, strength;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+ ret = vconf_get_int(VCONFKEY_WIFI_STRENGTH, &strength);
+ if (ret == OK) {
+ INFO("CONNECTION WiFi Strength: %d", strength);
+ if (strength < VCONFKEY_WIFI_STRENGTH_MIN) {
+ strength = VCONFKEY_WIFI_STRENGTH_MIN;
+ } else if (strength > VCONFKEY_WIFI_STRENGTH_MAX) {
+ strength = VCONFKEY_WIFI_STRENGTH_MAX;
+ }
+ } else
+ strength = VCONFKEY_WIFI_STRENGTH_MAX;
+
+ ret = vconf_get_int(VCONFKEY_WIFI_STATE, &status);
+ if (ret == OK) {
+ INFO("CONNECTION WiFi Status: %d", status);
+ if (status != VCONFKEY_WIFI_TRANSFER) {
+ if ( wifi_transferring == EINA_TRUE ) {
+ hide_trnsfr_icon();
+ wifi_transferring = EINA_FALSE;
+ }
+ }
+ if (status == VCONFKEY_WIFI_UNCONNECTED) {
+ hide_image_icon();
+ return;
+ } else if (status == VCONFKEY_WIFI_CONNECTED) {
+ if (strength <= 0)
+ strength = 1;
+
+ show_image_icon(data,LEVEL_WIFI + strength-1);
+ return;
+ } else if (status == VCONFKEY_WIFI_TRANSFER) {
+ if (wifi_transferring != EINA_TRUE) {
+ show_trnsfr_icon(data);
+ wifi_transferring = EINA_TRUE;
+ }
+ return;
+ }
+ }
+ hide_image_icon();
+ return;
+}
+
+static int register_wifi_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_WIFI_STATE,
+ indicator_wifi_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_WIFI_STRENGTH,
+ indicator_wifi_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+ indicator_wifi_change_cb(NULL, data);
+
+ return r;
+}
+
+static int unregister_wifi_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_WIFI_STATE,
+ indicator_wifi_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_WIFI_STRENGTH,
+ indicator_wifi_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ if (wifi_transferring == EINA_TRUE) {
+ wifi_transferring = EINA_FALSE;
+ }
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+#include "indicator_gui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED5
+#define MODULE_NAME "home"
+
+static int register_home_module(void *data);
+static int unregister_home_module(void);
+
+Indicator_Icon_Object home[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,0,APPTRAY_ICON_WIDTH,APPTRAY_ICON_HEIGHT},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .exist_in_view = EINA_FALSE,
+ .init = register_home_module,
+ .fini = unregister_home_module,
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,0,APPTRAY_ICON_WIDTH,APPTRAY_ICON_HEIGHT},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .exist_in_view = EINA_FALSE,
+ .init = register_home_module,
+ .fini = unregister_home_module,
+}
+
+};
+
+static const char *icon_path[] = {
+ "App tray/B03_app_tray.PNG",
+ "App tray/B03_app_tray_press.PNG",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ home[i].ad = data;
+ }
+
+}
+static void show_image_icon(int index)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ home[i].img_obj.data = icon_path[index];
+ indicator_util_icon_show(&home[i]);
+ }
+}
+static void change_home_icon_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret = -1;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONF_INDICATOR_HOME_PRESSED, &status);
+
+ if (ret == 0) {
+ if (status == 1) {
+ INFO("change_home_icon_cb : Home Button Pressed!");
+ show_image_icon(1);
+ } else {
+ INFO("change_home_icon_cb : Home Button Released!");
+ show_image_icon(0);
+ }
+ }
+}
+static int register_home_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONF_INDICATOR_HOME_PRESSED,
+ change_home_icon_cb, data);
+ if (ret != 0) {
+ ERR("Failed to register callback!");
+ r = ret;
+ }
+
+ show_image_icon(0);
+ return 0;
+}
+
+static int unregister_home_module(void)
+{
+ int ret = -1;
+
+ ret = vconf_ignore_key_changed(VCONF_INDICATOR_HOME_PRESSED,
+ change_home_icon_cb);
+ if (ret != 0)
+ ERR("Failed to unregister callback!");
+
+ return 0;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_2
+#define MODULE_NAME "alarm"
+
+static int register_alarm_module(void *data);
+static int unregister_alarm_module(void);
+static int hib_enter_alarm_module(void);
+static int hib_leave_alarm_module(void *data);
+
+Indicator_Icon_Object useralarm[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_alarm_module,
+ .fini = unregister_alarm_module,
+ .hib_enter = hib_enter_alarm_module,
+ .hib_leave = hib_leave_alarm_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_alarm_module,
+ .fini = unregister_alarm_module,
+ .hib_enter = hib_enter_alarm_module,
+ .hib_leave = hib_leave_alarm_module
+}
+
+};
+
+static char *icon_path[] = {
+ "Alarm/B03_Alarm.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ useralarm[i].ad = data;
+ }
+
+}
+
+static void show_image_icon(void *data)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ useralarm[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&useralarm[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&useralarm[i]);
+ }
+}
+
+static void indicator_alarm_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_ALARM_STATE, &status);
+ if (ret == OK) {
+ if (status > 0) {
+ INFO("ALARM COUNT: %d", status);
+ show_image_icon(data);
+ return;
+ }
+ INFO("ALARM COUNT: %d", status);
+ hide_image_icon();
+ return;
+ }
+ ERR("Failed to get alarm count!");
+ return;
+}
+
+static int register_alarm_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_ALARM_STATE,
+ indicator_alarm_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback!");
+
+ indicator_alarm_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_alarm_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_ALARM_STATE,
+ indicator_alarm_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_enter_alarm_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_ALARM_STATE,
+ indicator_alarm_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_leave_alarm_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_ALARM_STATE,
+ indicator_alarm_change_cb, data);
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_alarm_change_cb(NULL, data);
+ return OK;
+}
--- /dev/null
+/*
+ * indicator
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: Junghyun Kim <jh1114.kim@samsung.com> Kangwon Lee <newton.lee@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "earphone"
+#define TIMER_INTERVAL 0.3
+
+static int register_earphone_module(void *data);
+static int unregister_earphone_module(void);
+
+Indicator_Icon_Object earphone[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_earphone_module,
+ .fini = unregister_earphone_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_earphone_module,
+ .fini = unregister_earphone_module
+}
+
+};
+
+static const char *icon_path[] = {
+ "Earphone/B03_Earphone.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ earphone[i].ad = data;
+ }
+}
+
+static void show_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ earphone[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&earphone[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&earphone[i]);
+ }
+}
+
+static void indicator_earphone_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_SYSMAN_EARJACK, &status);
+ if (ret == FAIL) {
+ ERR("Failed to get VCONFKEY_MMC_STATE!");
+ return;
+ }
+
+ switch (status) {
+ case VCONFKEY_SYSMAN_EARJACK_3WIRE:
+ case VCONFKEY_SYSMAN_EARJACK_4WIRE:
+ case VCONFKEY_SYSMAN_EARJACK_TVOUT:
+ INFO("Earphone connected");
+ show_image_icon();
+ break;
+
+ default:
+ hide_image_icon();
+ break;
+ }
+}
+
+static int register_earphone_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_EARJACK,
+ indicator_earphone_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register earphoneback!");
+
+ indicator_earphone_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_earphone_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_EARJACK,
+ indicator_earphone_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister earphoneback!");
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_1
+#define MODULE_NAME "FM_Radio"
+
+static int register_fm_radio_module(void *data);
+static int unregister_fm_radio_module(void);
+
+Indicator_Icon_Object fm_radio[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_fm_radio_module,
+ .fini = unregister_fm_radio_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_fm_radio_module,
+ .fini = unregister_fm_radio_module
+}
+};
+
+static char *icon_path[] = {
+ "Background playing/B03_Backgroundplaying_FMradio.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ fm_radio[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ fm_radio[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&fm_radio[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&fm_radio[i]);
+ }
+}
+
+static void indicator_fm_radio_change_cb(keynode_t *node, void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_RADIO_STATE, &status);
+ if (ret == OK) {
+ INFO("FM_RADIO state: %d", status);
+ if (status == VCONFKEY_RADIO_PLAY)
+ show_image_icon(data);
+ else
+ hide_image_icon();
+ }
+ return;
+}
+
+static int register_fm_radio_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_RADIO_STATE,
+ indicator_fm_radio_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback!");
+ indicator_fm_radio_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_fm_radio_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_RADIO_STATE,
+ indicator_fm_radio_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+// hide_image_icon();
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "mmc"
+#define TIMER_INTERVAL 0.3
+
+static int register_mmc_module(void *data);
+static int unregister_mmc_module(void);
+
+Indicator_Icon_Object mmc[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_mmc_module,
+ .fini = unregister_mmc_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_mmc_module,
+ .fini = unregister_mmc_module
+}
+
+};
+
+static const char *icon_path[] = {
+ "Background playing/B03_Memorycard.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ mmc[i].ad = data;
+ }
+}
+
+static void show_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ mmc[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&mmc[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&mmc[i]);
+ }
+}
+
+static void icon_animation_set(enum indicator_icon_ani type)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_animation_set(&mmc[i], type);
+ }
+}
+
+
+static void indicator_mmc_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_FILEMANAGER_DB_STATUS, &status);
+ if (ret == FAIL) {
+ ERR("Failed to get VCONFKEY_MMC_STATE!");
+ return;
+ }
+
+ switch (status) {
+ case VCONFKEY_FILEMANAGER_DB_UPDATING:
+ INFO("MMC loading");
+ show_image_icon();
+ icon_animation_set(ICON_ANI_BLINK);
+ break;
+
+ case VCONFKEY_FILEMANAGER_DB_UPDATED:
+ default:
+ hide_image_icon();
+ break;
+ }
+}
+
+static int register_mmc_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_FILEMANAGER_DB_STATUS,
+ indicator_mmc_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register mmcback!");
+
+ indicator_mmc_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_mmc_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_FILEMANAGER_DB_STATUS,
+ indicator_mmc_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister mmcback!");
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include <minicontrol-monitor.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_1
+#define MODULE_NAME "MP3_PLAY"
+#define MINICONTROL_NAME "[musicplayer-mini]"
+
+static int register_mp3_play_module(void *data);
+static int unregister_mp3_play_module(void);
+static void mctrl_monitor_cb(int action, const char *name, void *data);
+
+Indicator_Icon_Object mp3_play[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_mp3_play_module,
+ .fini = unregister_mp3_play_module,
+ .minictrl_control = mctrl_monitor_cb
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_mp3_play_module,
+ .fini = unregister_mp3_play_module,
+ .minictrl_control = mctrl_monitor_cb
+}
+};
+
+enum {
+ MUSIC_PLAY,
+ MUSIC_PAUSED,
+};
+
+static char *icon_path[] = {
+ "Background playing/B03_Backgroundplaying_MP3playing.png",
+ "Background playing/B03_Backgroundplaying_Music_paused.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ mp3_play[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data, int status)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ mp3_play[i].img_obj.data = icon_path[status];
+ indicator_util_icon_show(&mp3_play[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&mp3_play[i]);
+ }
+}
+
+static void show_mp_icon(void* data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_MUSIC_STATE, &status);
+ if (ret == OK) {
+ INFO("MUSIC state: %d", status);
+ switch (status) {
+ case VCONFKEY_MUSIC_PLAY:
+ show_image_icon(data, MUSIC_PLAY);
+ break;
+ case VCONFKEY_MUSIC_PAUSE:
+ show_image_icon(data, MUSIC_PAUSED);
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+
+static void indicator_mp3_play_change_cb(keynode_t *node, void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ DBG("indicator_mp3_play_change_cb");
+
+ show_mp_icon(data);
+
+ return;
+}
+
+static void mctrl_monitor_cb(int action, const char *name, void *data)
+{
+ retif(!data, , "data is NULL");
+ retif(!name, , "name is NULL");
+
+ if(strncmp(name,MINICONTROL_NAME,strlen(MINICONTROL_NAME))!=0)
+ {
+ ERR("_mctrl_monitor_cb:no mp %s",name);
+ return;
+ }
+
+ DBG("_mctrl_monitor_cb:%s %d",name,action);
+
+ switch (action) {
+ case MINICONTROL_ACTION_START:
+ vconf_notify_key_changed(VCONFKEY_MUSIC_STATE, indicator_mp3_play_change_cb, data);
+ show_mp_icon(data);
+ break;
+ case MINICONTROL_ACTION_STOP:
+ hide_image_icon();
+ vconf_ignore_key_changed(VCONFKEY_MUSIC_STATE, indicator_mp3_play_change_cb);
+ break;
+ default:
+ break;
+ }
+}
+
+static int register_mp3_play_module(void *data)
+{
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ return OK;
+}
+
+static int unregister_mp3_play_module(void)
+{
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <notification.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "indicator_ui.h"
+#include "indicator_icon_list.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "notification"
+
+static int register_noti_module(void *data);
+static int unregister_noti_module(void);
+static int hib_enter_noti_module(void);
+static int hib_leave_noti_module(void *data);
+
+Indicator_Icon_Object noti[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .exist_in_view = EINA_FALSE,
+ .init = register_noti_module,
+ .fini = unregister_noti_module,
+ .hib_enter = hib_enter_noti_module,
+ .hib_leave = hib_leave_noti_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .exist_in_view = EINA_FALSE,
+ .init = register_noti_module,
+ .fini = unregister_noti_module,
+ .hib_enter = hib_enter_noti_module,
+ .hib_leave = hib_leave_noti_module
+}
+};
+
+struct noti_status {
+ notification_h noti;
+ int type;
+ int cnt;
+ Indicator_Icon_Object *icon[INDICATOR_WIN_MAX];
+};
+
+
+static Eina_List *status_list;
+static int noti_cnt;
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ noti[i].ad = data;
+ }
+}
+
+static void show_icon_with_path(struct noti_status *data, char* icon_path)
+{
+ int i = 0;
+ retif(data == NULL, , "Invalid parameter!");
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ data->icon[i]->img_obj.data = strdup(icon_path);
+ indicator_util_icon_show(data->icon[i]);
+ }
+}
+
+static void hide_image_icon(struct noti_status *data)
+{
+ int i = 0;
+ retif(data == NULL, , "Invalid parameter!");
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(data->icon[i]);
+ }
+}
+
+static void free_image_icon(struct noti_status *data)
+{
+ int i = 0;
+ retif(data == NULL, , "Invalid parameter!");
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_icon_list_remove(data->icon[i]);
+
+ if (data->icon[i])
+ {
+ if (data->icon[i]->img_obj.data)
+ free((char *)data->icon[i]->img_obj.data);
+
+ free(data->icon[i]);
+ }
+ }
+}
+
+static void insert_icon_list(struct noti_status *data)
+{
+ int i = 0;
+ retif(data == NULL, , "Invalid parameter!");
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_icon_list_insert(data->icon[i]);
+ }
+}
+
+static void show_image_icon(struct noti_status *data)
+{
+ retif(data == NULL, , "Invalid parameter!");
+
+ char *icon_path;
+ notification_h noti = NULL;
+
+ if (data->noti) {
+ noti = data->noti;
+ if (noti) {
+ notification_get_image(noti, NOTIFICATION_IMAGE_TYPE_ICON_FOR_INDICATOR, &icon_path);
+ if(icon_path == NULL)
+ {
+ DBG("no indicator icon");
+ notification_get_icon(noti, &icon_path);
+ }
+ DBG("Get Path of Notication %s : %s",data->icon[0]->name, icon_path);
+ if (icon_path == NULL
+ || !ecore_file_exists(icon_path)) {
+ int i = 0;
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ data->icon[i]->img_obj.data = NULL;
+ }
+ } else {
+ show_icon_with_path(data, icon_path);
+ }
+ }
+ }
+}
+
+static void show_image_icon_all( void )
+{
+ Eina_List *l;
+ struct noti_status *data;
+ int total = 0, noti_count = 0;
+
+ EINA_LIST_REVERSE_FOREACH(status_list, l, data) {
+ if (data) {
+ show_image_icon(data);
+ }
+ }
+}
+
+
+static void _icon_add(struct noti_status *noti_data, const char *name, void *data)
+{
+ int i = 0;
+ DBG("noti_data %x",noti_data);
+ retif(noti_data == NULL || data == NULL, NULL, "Invalid parameter!");
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ Indicator_Icon_Object *obj = NULL;
+ obj = calloc(1, sizeof(Indicator_Icon_Object));
+
+ if (obj) {
+ memset(obj, 0, sizeof(Indicator_Icon_Object));
+ obj->win_type = i;
+ obj->type = INDICATOR_IMG_ICON;
+ obj->name = strdup(name);
+ obj->priority = ICON_PRIORITY;
+ obj->always_top = EINA_FALSE;
+ obj->ad = data;
+ obj->area = INDICATOR_ICON_AREA_NOTI;
+ obj->exist_in_view = EINA_FALSE;
+
+ noti_data->icon[i] = obj;
+ }
+ }
+
+ return;
+}
+
+static void _set_noti_cnt(int cnt)
+{
+ if (cnt >= 0) {
+ noti_cnt = cnt;
+ indicator_util_event_count_set(noti_cnt, noti[0].ad);
+ }
+}
+
+static int _get_noti_cnt(void)
+{
+ return noti_cnt;
+}
+
+static void _update_all_status(void)
+{
+ Eina_List *l;
+ struct noti_status *data;
+ int total = 0, noti_count = 0;
+
+ EINA_LIST_FOREACH(status_list, l, data) {
+ if (data) {
+ DBG("%s is updated! Cnt : %d",
+ data->icon[0]->name, data->cnt);
+ notification_get_count(NOTIFICATION_TYPE_NONE, NULL,
+ NOTIFICATION_GROUP_ID_NONE,
+ NOTIFICATION_PRIV_ID_NONE,
+ ¬i_count);
+ data->cnt = noti_count;
+
+ if (data->cnt == 0)
+ hide_image_icon(data);
+ else
+ total += data->cnt;
+ }
+ }
+}
+
+static void _change_icon_status(void *data, notification_list_h noti_list)
+{
+ int cnt = 0, new_cnt = 0;
+ Eina_List *l = NULL;
+ notification_h noti = NULL;
+ struct noti_status *n_data = NULL;
+ int noti_count = 0, ongoing_count = 0;
+
+ notification_get_count(NOTIFICATION_TYPE_NOTI, NULL,
+ NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE,
+ ¬i_count);
+ notification_get_count(NOTIFICATION_TYPE_ONGOING, NULL,
+ NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE,
+ &ongoing_count);
+
+ new_cnt = noti_count + ongoing_count;
+
+ retif(noti_list == NULL, , "Invalid parameter!");
+
+ EINA_LIST_FOREACH(status_list, l, n_data) {
+ DBG("Clear Status List : %s", n_data->icon[0]->name);
+ hide_image_icon(n_data);
+ free_image_icon(n_data);
+ status_list = eina_list_remove_list(status_list, l);
+ }
+ eina_list_free(status_list);
+
+ while (noti_list != NULL) {
+ char *pkgname = NULL;
+ Eina_List *l = NULL;
+ struct noti_status *n_data = NULL;
+ struct noti_status *status = NULL;
+ Eina_Bool status_exist = EINA_FALSE;
+ notification_error_e noti_ret = NOTIFICATION_ERROR_NONE;
+ int applist;
+
+ noti = notification_list_get_data(noti_list);
+ noti_list = notification_list_get_next(noti_list);
+
+ noti_ret = notification_get_display_applist(noti, &applist);
+ if (noti_ret != NOTIFICATION_ERROR_NONE) {
+ INFO("Cannot Get display app of notication! : %p ",
+ noti);
+ continue;
+ }
+ if (!(applist & NOTIFICATION_DISPLAY_APP_INDICATOR))
+ continue;
+
+ noti_ret = notification_get_pkgname(noti, &pkgname);
+
+ if (noti_ret != NOTIFICATION_ERROR_NONE)
+ DBG("Cannot Get pkgname of notication! : %p %p",
+ noti, pkgname);
+ else {
+ EINA_LIST_FOREACH(status_list, l, n_data) {
+ if (!strcmp(n_data->icon[0]->name, pkgname)) {
+ DBG("%s is already existed", pkgname);
+ status_exist = EINA_TRUE;
+ break;
+ }
+ }
+
+ if (status_exist != EINA_TRUE) {
+ DBG("Make New Event Icon : %s", pkgname);
+ status = calloc(1, sizeof(struct noti_status));
+ status->type = 0;
+ status->cnt = new_cnt;
+ _icon_add(status,pkgname, data);
+ status->noti = noti;
+ insert_icon_list(status);
+ status_list = eina_list_append(status_list, status);
+ cnt = _get_noti_cnt() + status->cnt;
+ }
+ }
+ }
+
+ show_image_icon_all();
+}
+
+void update_noti_module_new(void *data, notification_type_e type)
+{
+ notification_list_h list = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ int get_event_count = indicator_util_max_visible_event_count(INDICATOR_WIN_LAND);
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ noti_err = notification_get_grouping_list(NOTIFICATION_TYPE_NONE,
+ get_event_count, &list);
+
+ if (noti_err != NOTIFICATION_ERROR_NONE || list == NULL) {
+ _update_all_status();
+ return;
+ }
+
+ _change_icon_status(data, list);
+}
+
+
+static int _indicator_check_first_start(void)
+{
+ int status = 0;
+ int ret = 0;
+
+ ret = vconf_get_bool(VCONFKEY_INDICATOR_STARTED, &status);
+ if (ret) {
+ INFO("fail to get %s", VCONFKEY_INDICATOR_STARTED);
+ ret = vconf_set_bool(VCONFKEY_INDICATOR_STARTED, 1);
+ INFO("set : %s, result : %d", VCONFKEY_INDICATOR_STARTED, ret);
+ }
+
+ if (status)
+ return 0;
+
+ return 1;
+}
+
+static void _indicator_noti_delete_volatile_data(void)
+{
+ notification_list_h noti_list = NULL;
+ notification_list_h noti_list_head = NULL;
+ notification_h noti = NULL;
+ int property = 0;
+
+ notification_get_grouping_list(NOTIFICATION_TYPE_NONE, -1, ¬i_list);
+
+ noti_list_head = noti_list;
+
+ while (noti_list != NULL) {
+ noti = notification_list_get_data(noti_list);
+ notification_get_property(noti, &property);
+
+ if (property & NOTIFICATION_PROP_VOLATILE_DISPLAY) {
+ notification_set_property(noti,
+ property |
+ NOTIFICATION_PROP_DISABLE_UPDATE_ON_DELETE);
+ notification_delete(noti);
+ }
+
+ noti_list = notification_list_get_next(noti_list);
+ }
+
+ notification_free_list(noti_list_head);
+
+ notification_update(NULL);
+}
+
+
+static int register_noti_module(void *data)
+{
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+ notification_error_e ret = NOTIFICATION_ERROR_NONE;
+ int is_first = 0;
+
+ set_app_state(data);
+
+ is_first = _indicator_check_first_start();
+ {
+ notifiation_clear(NOTIFICATION_TYPE_ONGOING);
+ _indicator_noti_delete_volatile_data();
+ }
+
+ ret = notification_resister_changed_cb(update_noti_module_new, data);
+
+ if (ret != NOTIFICATION_ERROR_NONE)
+ DBG("Fail to Register notification_resister_changed_cb!");
+
+ update_noti_module_new(data, NOTIFICATION_TYPE_NOTI);
+
+ return OK;
+}
+
+static int unregister_noti_module(void)
+{
+ Eina_List *l;
+ struct noti_status *data = NULL;
+ notification_error_e ret = NOTIFICATION_ERROR_NONE;
+
+ ret = notification_unresister_changed_cb(update_noti_module_new);
+
+ if (ret != NOTIFICATION_ERROR_NONE)
+ DBG("Fail to unregister notification_resister_changed_cb!");
+
+ EINA_LIST_FOREACH(status_list, l, data) {
+ free_image_icon(data);
+ status_list = eina_list_remove_list(status_list, l);
+ }
+
+ eina_list_free(status_list);
+ return OK;
+}
+
+static int hib_enter_noti_module(void)
+{
+ return OK;
+}
+
+static int hib_leave_noti_module(void *data)
+{
+ retif(data == NULL, FAIL, "Invalid parameter!");
+ update_noti_module_new(data, NOTIFICATION_TYPE_NOTI);
+ return OK;
+}
+
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include <minicontrol-monitor.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_1
+#define MODULE_NAME "VOICE_RECORDER"
+#define MINICONTROL_NAME "[voicerecorder_mini_controller]"
+
+
+static int register_voice_recorder_module(void *data);
+static int unregister_voice_recorder_module(void);
+static void mctrl_monitor_cb(int action, const char *name, void *data);
+
+Indicator_Icon_Object voice_recorder[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_voice_recorder_module,
+ .fini = unregister_voice_recorder_module,
+ .minictrl_control = mctrl_monitor_cb
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_voice_recorder_module,
+ .fini = unregister_voice_recorder_module,
+ .minictrl_control = mctrl_monitor_cb
+}
+
+};
+
+enum {
+ VOICE_RECORDER_RECORDING,
+ VOICE_RECORDER_PAUSED,
+ VOICE_RECORDER_READY
+};
+
+static char *icon_path[] = {
+ "Background playing/B03_Backgroundplaying_voicerecorder_Recording.png",
+ "Background playing/B03_Backgroundplaying_voicerecorder_paused.png",
+ "Background playing/B03_Backgroundplaying_Voicerecording.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ voice_recorder[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data, int status)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ voice_recorder[i].img_obj.data = icon_path[status];
+ indicator_util_icon_show(&voice_recorder[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&voice_recorder[i]);
+ }
+}
+
+static void show_voicerecoder_icon(void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_VOICERECORDER_STATE, &status);
+ if (ret == OK) {
+ INFO("VOICE RECORDER state: %d", status);
+ switch (status) {
+ case VCONFKEY_VOICERECORDER_RECORDING:
+ show_image_icon(data, VOICE_RECORDER_RECORDING);
+ break;
+ case VCONFKEY_VOICERECORDER_PAUSED:
+ show_image_icon(data, VOICE_RECORDER_PAUSED);
+ break;
+ case VCONFKEY_VOICERECORDER_READY:
+ show_image_icon(data, VOICE_RECORDER_READY);
+ break;
+ default:
+ break;
+ }
+ }
+ return;
+}
+
+
+static void indicator_voice_recorder_change_cb(keynode_t *node, void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ show_voicerecoder_icon(data);
+ return;
+}
+
+static void mctrl_monitor_cb(int action, const char *name, void *data)
+{
+ retif(!data, , "data is NULL");
+ retif(!name, , "name is NULL");
+
+ if(strncmp(name,MINICONTROL_NAME,strlen(MINICONTROL_NAME))!=0)
+ {
+ ERR("_mctrl_monitor_cb: no VR %s",name);
+ return;
+ }
+
+ DBG("_mctrl_monitor_cb:%s %d",name,action);
+
+ switch (action) {
+ case MINICONTROL_ACTION_START:
+ vconf_notify_key_changed(VCONFKEY_VOICERECORDER_STATE, indicator_voice_recorder_change_cb, data);
+ show_voicerecoder_icon(data);
+ break;
+ case MINICONTROL_ACTION_STOP:
+ hide_image_icon();
+ vconf_ignore_key_changed(VCONFKEY_VOICERECORDER_STATE, indicator_voice_recorder_change_cb);
+ break;
+ default:
+ break;
+ }
+}
+
+static int register_voice_recorder_module(void *data)
+{
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ return OK;
+}
+
+static int unregister_voice_recorder_module(void)
+{
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 "modules.h"
+
+#define INDICATOR_MODULE_NUMBERS 24
+
+extern Indicator_Icon_Object home[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object rssi[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object roaming[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object usb[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object wifi[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object mobile_hotspot[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object conn[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object trnsfr[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object sos[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object call[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object call_divert[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object active_sync[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object mmc[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object noti[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object useralarm[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object fm_radio[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object mp3_play[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object voice_recorder[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object silent[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object bluetooth[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object rotate[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object gps[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object nfc[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object wifi_direct[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object sysclock[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object battery[INDICATOR_WIN_MAX];
+extern Indicator_Icon_Object earphone[INDICATOR_WIN_MAX];
+
+
+static Indicator_Icon_Object *modules[INDICATOR_WIN_MAX][INDICATOR_MODULE_NUMBERS] = {
+{
+ &rssi[0],
+ &roaming[0],
+ &sos[0],
+ &usb[0],
+ &wifi[0],
+ &mobile_hotspot[0],
+ &conn[0],
+ &call[0],
+ &call_divert[0],
+ &mmc[0],
+ ¬i[0],
+ &useralarm[0],
+ &fm_radio[0],
+ &mp3_play[0],
+ &voice_recorder[0],
+ &silent[0],
+ &bluetooth[0],
+ &gps[0],
+ &nfc[0],
+ &wifi_direct[0],
+ &sysclock[0],
+ &battery[0],
+ &earphone[0],
+ NULL
+},
+{
+ &rssi[1],
+ &roaming[1],
+ &sos[1],
+ &usb[1],
+ &wifi[1],
+ &mobile_hotspot[1],
+ &conn[1],
+ &call[1],
+ &call_divert[1],
+ &mmc[1],
+ ¬i[1],
+ &useralarm[1],
+ &fm_radio[1],
+ &mp3_play[1],
+ &voice_recorder[1],
+ &silent[1],
+ &bluetooth[1],
+ &gps[1],
+ &nfc[1],
+ &wifi_direct[1],
+ &sysclock[1],
+ &battery[1],
+ &earphone[1],
+ NULL
+}
+
+};
+
+void indicator_init_modules(void *data)
+{
+ int i;
+ int j = 0;
+
+ for(j=0;j<INDICATOR_WIN_MAX;j++)
+ {
+ for (i = 0; modules[j][i]; i++) {
+ indicator_icon_list_insert(modules[j][i]);
+ modules[j][i]->ad = data;
+ if (modules[j][i]->init)
+ modules[j][i]->init(data);
+ }
+ }
+}
+
+void indicator_fini_modules(void *data)
+{
+ int i;
+ int j = 0;
+
+ for(j=0;j<INDICATOR_WIN_MAX;j++)
+ {
+ for (i = 0; modules[j][i]; i++) {
+ if (modules[j][i]->fini)
+ modules[j][i]->fini();
+ }
+ }
+
+ indicator_icon_all_list_free();
+}
+
+void indicator_hib_enter_modules(void *data)
+{
+ int i;
+ int j = 0;
+
+ for(j=0;j<INDICATOR_WIN_MAX;j++)
+ {
+ for (i = 0; modules[j][i]; i++) {
+ if (modules[j][i]->hib_enter)
+ modules[j][i]->hib_enter();
+ }
+ }
+}
+
+void indicator_hib_leave_modules(void *data)
+{
+ int i;
+ int j = 0;
+
+ for(j=0;j<INDICATOR_WIN_MAX;j++)
+ {
+ for (i = 0; modules[j][i]; i++) {
+ if (modules[j][i]->hib_leave)
+ modules[j][i]->hib_leave(data);
+ }
+ }
+}
+
+void indicator_lang_changed_modules(void *data)
+{
+ int i;
+ int j = 0;
+
+ for(j=0;j<INDICATOR_WIN_MAX;j++)
+ {
+ for (i = 0; modules[j][i]; i++) {
+ if (modules[j][i]->lang_changed)
+ modules[j][i]->lang_changed(data);
+ }
+ }
+}
+
+void indicator_region_changed_modules(void *data)
+{
+ int i;
+ int j = 0;
+
+ for(j=0;j<INDICATOR_WIN_MAX;j++)
+ {
+ for (i = 0; modules[j][i]; i++) {
+ if (modules[j][i]->region_changed)
+ modules[j][i]->region_changed(data);
+ }
+ }
+}
+
+void indicator_minictrl_control_modules(int action, const char* name, void *data)
+{
+ int i;
+ int j = 0;
+
+ for(j=0;j<INDICATOR_WIN_MAX;j++)
+ {
+ for (i = 0; modules[j][i]; i++) {
+ if (modules[j][i]->minictrl_control)
+ modules[j][i]->minictrl_control(action, name, data);
+ }
+ }
+}
--- /dev/null
+/*
+ * 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 __INDICATOR_MODULES_H__
+#define __INDICATOR_MODULES_H__
+
+#include <Ecore.h>
+#include "indicator_ui.h"
+#include "indicator_icon_list.h"
+
+#define TIMER_STOP ECORE_CALLBACK_CANCEL
+#define TIMER_CONTINUE ECORE_CALLBACK_RENEW
+
+void indicator_init_modules(void *data);
+void indicator_fini_modules(void *data);
+void indicator_hib_enter_modules(void *data);
+void indicator_hib_leave_modules(void *data);
+void indicator_lang_changed_modules(void *data);
+void indicator_region_changed_modules(void *data);
+
+#endif
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED3
+#define MODULE_NAME "ROAMING"
+
+static int register_roaming_module(void *data);
+static int unregister_roaming_module(void);
+
+Indicator_Icon_Object roaming[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .init = register_roaming_module,
+ .fini = unregister_roaming_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .init = register_roaming_module,
+ .fini = unregister_roaming_module
+}
+};
+
+static const char *icon_path[] = {
+ "RSSI/B03_Roaming.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ roaming[i].ad = data;
+ }
+}
+
+static void show_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ roaming[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&roaming[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&roaming[i]);
+ }
+}
+
+static void indicator_roaming_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT, &status);
+ if (ret == OK && status != VCONFKEY_TELEPHONY_SIM_INSERTED) {
+ INFO("ROAMING Status: No SIM Mode");
+ hide_image_icon();
+ return;
+ }
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_SVC_ROAM, &status);
+ INFO("ROAMING Status: %d", status);
+ if (ret == OK) {
+ if (status == VCONFKEY_TELEPHONY_SVC_ROAM_ON) {
+ show_image_icon();
+ return;
+ } else {
+ hide_image_icon();
+
+ return;
+ }
+ }
+
+ ERR("Failed to get roaming status!");
+ return;
+}
+
+static int register_roaming_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVC_ROAM,
+ indicator_roaming_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SIM_SLOT,
+ indicator_roaming_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ indicator_roaming_change_cb(NULL, data);
+
+ return r;
+}
+
+static int unregister_roaming_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVC_ROAM,
+ indicator_roaming_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SIM_SLOT,
+ indicator_roaming_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+#include "indicator_gui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED3
+#define MODULE_NAME "RSSI"
+
+#define ICON_NOSIM _("IDS_COM_BODY_NO_SIM")
+#define ICON_SEARCH _("IDS_COM_BODY_SEARCHING")
+#define ICON_NOSVC _("IDS_CALL_POP_NOSERVICE")
+
+static int register_rssi_module(void *data);
+static int unregister_rssi_module(void);
+static int hib_enter_rssi_module(void);
+static int hib_leave_rssi_module(void *data);
+static int language_changed_cb(void *data);
+
+Indicator_Icon_Object rssi[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .init = register_rssi_module,
+ .fini = unregister_rssi_module,
+ .hib_enter = hib_enter_rssi_module,
+ .hib_leave = hib_leave_rssi_module,
+ .lang_changed = language_changed_cb
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .init = register_rssi_module,
+ .fini = unregister_rssi_module,
+ .hib_enter = hib_enter_rssi_module,
+ .hib_leave = hib_leave_rssi_module,
+ .lang_changed = language_changed_cb
+}
+};
+
+enum {
+ LEVEL_RSSI_MIN = 0,
+ LEVEL_RSSI_0 = LEVEL_RSSI_MIN,
+ LEVEL_RSSI_1,
+ LEVEL_RSSI_2,
+ LEVEL_RSSI_3,
+ LEVEL_RSSI_4,
+ LEVEL_RSSI_MAX = LEVEL_RSSI_4,
+ LEVEL_FLIGHT,
+ LEVEL_NOSIM,
+ LEVEL_SEARCH,
+ LEVEL_NOSVC,
+ LEVEL_MAX,
+};
+
+static int bRoaming = 0;
+
+static const char *icon_path[LEVEL_MAX] = {
+ [LEVEL_RSSI_0] = "RSSI/B03_RSSI_Sim_00.png",
+ [LEVEL_RSSI_1] = "RSSI/B03_RSSI_Sim_01.png",
+ [LEVEL_RSSI_2] = "RSSI/B03_RSSI_Sim_02.png",
+ [LEVEL_RSSI_3] = "RSSI/B03_RSSI_Sim_03.png",
+ [LEVEL_RSSI_4] = "RSSI/B03_RSSI_Sim_04.png",
+ [LEVEL_FLIGHT] = "RSSI/B03_RSSI_Flightmode.png",
+ [LEVEL_NOSIM] = "RSSI/B03_RSSI_NoSim.png",
+ [LEVEL_SEARCH] = "RSSI/B03_RSSI_Searching.png",
+ [LEVEL_NOSVC] = "RSSI/B03_RSSI_NoService.png",
+};
+
+static const char *roaming_icon_path[LEVEL_MAX] = {
+ [LEVEL_RSSI_0] = "RSSI/B03_RSSI_roaming_00.png",
+ [LEVEL_RSSI_1] = "RSSI/B03_RSSI_roaming_01.png",
+ [LEVEL_RSSI_2] = "RSSI/B03_RSSI_roaming_02.png",
+ [LEVEL_RSSI_3] = "RSSI/B03_RSSI_roaming_03.png",
+ [LEVEL_RSSI_4] = "RSSI/B03_RSSI_roaming_04.png",
+ [LEVEL_FLIGHT] = "RSSI/B03_RSSI_Flightmode.png",
+ [LEVEL_NOSIM] = "RSSI/B03_RSSI_NoSim.png",
+ [LEVEL_SEARCH] = "RSSI/B03_RSSI_Searching.png",
+ [LEVEL_NOSVC] = "RSSI/B03_RSSI_NoService.png",
+};
+
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ rssi[i].ad = data;
+ }
+}
+
+static int level_check(int *level)
+{
+ if (*level < LEVEL_RSSI_MIN) {
+ *level = LEVEL_RSSI_MIN;
+ return -1;
+ } else if (*level > LEVEL_RSSI_MAX) {
+ *level = LEVEL_RSSI_MAX;
+ return 1;
+ }
+ return 0;
+}
+
+static void show_image_icon(void *data, int index)
+{
+ int i = 0;
+
+ if (index < LEVEL_RSSI_MIN)
+ index = LEVEL_RSSI_MIN;
+ else if (index >= LEVEL_MAX)
+ index = LEVEL_NOSVC;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ rssi[i].img_obj.width = DEFAULT_ICON_WIDTH;
+
+ if(bRoaming == 1)
+ {
+ rssi[i].img_obj.data = roaming_icon_path[index];
+ }
+ else
+ {
+ rssi[i].img_obj.data = icon_path[index];
+ }
+
+ indicator_util_icon_show(&rssi[i]);
+ }
+}
+
+static void hide_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&rssi[i]);
+ }
+}
+
+static void indicator_rssi_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &status);
+ if (ret == OK && status == TRUE) {
+ INFO("RSSI Status: Flight Mode");
+ show_image_icon(data, LEVEL_FLIGHT);
+ return;
+ }
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT, &status);
+ if (ret == OK && status != VCONFKEY_TELEPHONY_SIM_INSERTED) {
+ INFO("RSSI Status: No SIM Mode");
+ show_image_icon(data, LEVEL_NOSIM);
+ return;
+ }
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_SVCTYPE, &status);
+ if (ret == OK) {
+ if (status == VCONFKEY_TELEPHONY_SVCTYPE_NOSVC) {
+ INFO("RSSI Status: No Service");
+ show_image_icon(data, LEVEL_NOSVC);
+ return;
+ }
+ if (status == VCONFKEY_TELEPHONY_SVCTYPE_SEARCH) {
+ INFO("RSSI Status: Searching Service");
+ show_image_icon(data, LEVEL_SEARCH);
+ return;
+ }
+ }
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_SVC_ROAM, &status);
+ if (ret == OK) {
+ if (status == VCONFKEY_TELEPHONY_SVC_ROAM_ON) {
+ INFO("ROAMING Status: %d", status);
+ bRoaming = 1;
+ } else {
+ bRoaming = 0;
+ }
+ }
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_RSSI, &status);
+ if (ret == OK) {
+ INFO("RSSI Level: %d", status);
+ level_check(&status);
+ show_image_icon(data, status);
+ return;
+ }
+
+
+ ERR("Failed to get rssi status! Set as No Service.");
+ show_image_icon(data, LEVEL_NOSVC);
+ return;
+}
+
+static int language_changed_cb(void *data)
+{
+ indicator_rssi_change_cb(NULL, data);
+ return OK;
+}
+
+static int register_rssi_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_RSSI,
+ indicator_rssi_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SIM_SLOT,
+ indicator_rssi_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVCTYPE,
+ indicator_rssi_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
+ indicator_rssi_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SVC_ROAM,
+ indicator_rssi_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = ret;
+ }
+
+ indicator_rssi_change_cb(NULL, data);
+
+ return r;
+}
+
+static int unregister_rssi_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_RSSI,
+ indicator_rssi_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SIM_SLOT,
+ indicator_rssi_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVCTYPE,
+ indicator_rssi_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
+ indicator_rssi_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SVC_ROAM,
+ indicator_rssi_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_enter_rssi_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
+ indicator_rssi_change_cb);
+ if (ret != OK) {
+ ERR("Failed to unregister callback!");
+ }
+
+ return OK;
+}
+
+static int hib_leave_rssi_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_FLIGHT_MODE,
+ indicator_rssi_change_cb, data);
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_rssi_change_cb(NULL, data);
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include <runtime_info.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+#include "indicator_gui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_FIXED4
+#define MODULE_NAME "battery"
+#define TIMER_INTERVAL 0.7
+#define BATTERY_TEXTWIDTH 62
+#define BATTERY_VALUE_FONT_SIZE 20
+#define BATTERY_PERCENT_FONT_SIZE 20
+#define BATTERY_PERCENT_FONT_STYLE "Bold"
+
+static int register_battery_module(void *data);
+static int unregister_battery_module(void);
+
+Indicator_Icon_Object battery[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,0,BATTERY_ICON_WIDTH,BATTERY_ICON_HEIGHT},
+ .obj_exist = EINA_FALSE,
+ .init = register_battery_module,
+ .fini = unregister_battery_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .area = INDICATOR_ICON_AREA_FIXED,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,0,BATTERY_ICON_WIDTH,BATTERY_ICON_HEIGHT},
+ .obj_exist = EINA_FALSE,
+ .init = register_battery_module,
+ .fini = unregister_battery_module
+}
+};
+
+enum {
+ INDICATOR_CLOCK_MODE_12H = 0,
+ INDICATOR_CLOCK_MODE_24H,
+ INDICATOR_CLOCK_MODE_MAX
+};
+
+static int clock_mode = INDICATOR_CLOCK_MODE_12H;
+
+
+enum {
+ BATTERY_ICON_WIDTH_12H,
+ BATTERY_ICON_WIDTH_24H,
+ BATTERY_ICON_WIDTH_NUM
+};
+
+enum {
+ BATTERY_LEVEL_6,
+ BATTERY_LEVEL_20,
+};
+
+enum {
+ LEVEL_MIN = 0,
+ LEVEL_0 = LEVEL_MIN,
+ LEVEL_1,
+ LEVEL_2,
+ LEVEL_3,
+ LEVEL_4,
+ LEVEL_5,
+ LEVEL_6,
+ LEVEL_MAX = LEVEL_6,
+ LEVEL_NUM,
+};
+
+static const char *icon_path[LEVEL_NUM] = {
+ [LEVEL_0] = "Power/battery_6/B03_Power_battery_00.png",
+ [LEVEL_1] = "Power/battery_6/B03_Power_battery_01.png",
+ [LEVEL_2] = "Power/battery_6/B03_Power_battery_02.png",
+ [LEVEL_3] = "Power/battery_6/B03_Power_battery_03.png",
+ [LEVEL_4] = "Power/battery_6/B03_Power_battery_04.png",
+ [LEVEL_5] = "Power/battery_6/B03_Power_battery_05.png",
+ [LEVEL_6] = "Power/battery_6/B03_Power_battery_06.png",
+};
+
+static const char *charging_icon_path[LEVEL_NUM] = {
+ [LEVEL_0] = "Power/battery_6/B03_Power_connected_00.png",
+ [LEVEL_1] = "Power/battery_6/B03_Power_connected_01.png",
+ [LEVEL_2] = "Power/battery_6/B03_Power_connected_02.png",
+ [LEVEL_3] = "Power/battery_6/B03_Power_connected_03.png",
+ [LEVEL_4] = "Power/battery_6/B03_Power_connected_04.png",
+ [LEVEL_5] = "Power/battery_6/B03_Power_connected_05.png",
+ [LEVEL_6] = "Power/battery_6/B03_Power_connected_06.png",
+};
+
+enum {
+ FUEL_GAUGE_LV_MIN = 0,
+ FUEL_GAUGE_LV_0 = FUEL_GAUGE_LV_MIN,
+ FUEL_GAUGE_LV_1,
+ FUEL_GAUGE_LV_2,
+ FUEL_GAUGE_LV_3,
+ FUEL_GAUGE_LV_4,
+ FUEL_GAUGE_LV_5,
+ FUEL_GAUGE_LV_6,
+ FUEL_GAUGE_LV_7,
+ FUEL_GAUGE_LV_8,
+ FUEL_GAUGE_LV_9,
+ FUEL_GAUGE_LV_10,
+ FUEL_GAUGE_LV_11,
+ FUEL_GAUGE_LV_12,
+ FUEL_GAUGE_LV_13,
+ FUEL_GAUGE_LV_14,
+ FUEL_GAUGE_LV_15,
+ FUEL_GAUGE_LV_16,
+ FUEL_GAUGE_LV_17,
+ FUEL_GAUGE_LV_18,
+ FUEL_GAUGE_LV_19,
+ FUEL_GAUGE_LV_20,
+ FUEL_GAUGE_LV_MAX = FUEL_GAUGE_LV_20,
+ FUEL_GAUGE_LV_NUM,
+};
+
+static const char *fuel_guage_icon_path[BATTERY_ICON_WIDTH_NUM][FUEL_GAUGE_LV_NUM] = {
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_0] = "Power/12H/B03_battery_animation_12h_00.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_1] = "Power/12H/B03_battery_animation_12h_01.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_2] = "Power/12H/B03_battery_animation_12h_02.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_3] = "Power/12H/B03_battery_animation_12h_03.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_4] = "Power/12H/B03_battery_animation_12h_04.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_5] = "Power/12H/B03_battery_animation_12h_05.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_6] = "Power/12H/B03_battery_animation_12h_06.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_7] = "Power/12H/B03_battery_animation_12h_07.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_8] = "Power/12H/B03_battery_animation_12h_08.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_9] = "Power/12H/B03_battery_animation_12h_09.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_10] = "Power/12H/B03_battery_animation_12h_10.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_11] = "Power/12H/B03_battery_animation_12h_11.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_12] = "Power/12H/B03_battery_animation_12h_12.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_13] = "Power/12H/B03_battery_animation_12h_13.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_14] = "Power/12H/B03_battery_animation_12h_14.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_15] = "Power/12H/B03_battery_animation_12h_15.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_16] = "Power/12H/B03_battery_animation_12h_16.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_17] = "Power/12H/B03_battery_animation_12h_17.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_18] = "Power/12H/B03_battery_animation_12h_18.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_19] = "Power/12H/B03_battery_animation_12h_19.png",
+ [BATTERY_ICON_WIDTH_12H][FUEL_GAUGE_LV_20] = "Power/12H/B03_battery_animation_12h_20.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_0] = "Power/24H/B03_battery_animation_24h_00.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_1] = "Power/24H/B03_battery_animation_24h_01.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_2] = "Power/24H/B03_battery_animation_24h_02.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_3] = "Power/24H/B03_battery_animation_24h_03.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_4] = "Power/24H/B03_battery_animation_24h_04.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_5] = "Power/24H/B03_battery_animation_24h_05.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_6] = "Power/24H/B03_battery_animation_24h_06.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_7] = "Power/24H/B03_battery_animation_24h_07.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_8] = "Power/24H/B03_battery_animation_24h_08.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_9] = "Power/24H/B03_battery_animation_24h_09.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_10] = "Power/24H/B03_battery_animation_24h_10.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_11] = "Power/24H/B03_battery_animation_24h_11.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_12] = "Power/24H/B03_battery_animation_24h_12.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_13] = "Power/24H/B03_battery_animation_24h_13.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_14] = "Power/24H/B03_battery_animation_24h_14.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_15] = "Power/24H/B03_battery_animation_24h_15.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_16] = "Power/24H/B03_battery_animation_24h_16.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_17] = "Power/24H/B03_battery_animation_24h_17.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_18] = "Power/24H/B03_battery_animation_24h_18.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_19] = "Power/24H/B03_battery_animation_24h_19.png",
+ [BATTERY_ICON_WIDTH_24H][FUEL_GAUGE_LV_20] = "Power/24H/B03_battery_animation_24h_20.png",
+};
+
+static const char *fuel_guage_charging_icon_path[FUEL_GAUGE_LV_NUM] = {
+ [FUEL_GAUGE_LV_0] = "Power/battery_20/B03_Power_charging_00.png",
+ [FUEL_GAUGE_LV_1] = "Power/battery_20/B03_Power_charging_01.png",
+ [FUEL_GAUGE_LV_2] = "Power/battery_20/B03_Power_charging_02.png",
+ [FUEL_GAUGE_LV_3] = "Power/battery_20/B03_Power_charging_03.png",
+ [FUEL_GAUGE_LV_4] = "Power/battery_20/B03_Power_charging_04.png",
+ [FUEL_GAUGE_LV_5] = "Power/battery_20/B03_Power_charging_05.png",
+ [FUEL_GAUGE_LV_6] = "Power/battery_20/B03_Power_charging_06.png",
+ [FUEL_GAUGE_LV_7] = "Power/battery_20/B03_Power_charging_07.png",
+ [FUEL_GAUGE_LV_8] = "Power/battery_20/B03_Power_charging_08.png",
+ [FUEL_GAUGE_LV_9] = "Power/battery_20/B03_Power_charging_09.png",
+ [FUEL_GAUGE_LV_10] = "Power/battery_20/B03_Power_charging_10.png",
+ [FUEL_GAUGE_LV_11] = "Power/battery_20/B03_Power_charging_11.png",
+ [FUEL_GAUGE_LV_12] = "Power/battery_20/B03_Power_charging_12.png",
+ [FUEL_GAUGE_LV_13] = "Power/battery_20/B03_Power_charging_13.png",
+ [FUEL_GAUGE_LV_14] = "Power/battery_20/B03_Power_charging_14.png",
+ [FUEL_GAUGE_LV_15] = "Power/battery_20/B03_Power_charging_15.png",
+ [FUEL_GAUGE_LV_16] = "Power/battery_20/B03_Power_charging_16.png",
+ [FUEL_GAUGE_LV_17] = "Power/battery_20/B03_Power_charging_17.png",
+ [FUEL_GAUGE_LV_18] = "Power/battery_20/B03_Power_charging_18.png",
+ [FUEL_GAUGE_LV_19] = "Power/battery_20/B03_Power_charging_19.png",
+ [FUEL_GAUGE_LV_20] = "Power/battery_20/B03_Power_charging_20.png",
+};
+
+struct battery_level_info {
+ int current_level;
+ int current_capa;
+ int min_level;
+ int max_level;
+ const char **icon_path;
+ const char **charing_icon_path;
+};
+
+static struct battery_level_info _level;
+static Ecore_Timer *timer;
+static int battery_level_type = BATTERY_LEVEL_20;
+static Eina_Bool battery_percentage_on = EINA_FALSE;
+static Eina_Bool battery_charging = EINA_FALSE;
+static int aniIndex = -1;
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ battery[i].ad = data;
+ }
+}
+
+static void delete_timer(void)
+{
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+}
+
+static int __battery_capa_to_level(int capacity)
+{
+ int level = 0;
+
+ if (battery_level_type == BATTERY_LEVEL_20) {
+ if (capacity >= 100)
+ level = FUEL_GAUGE_LV_MAX;
+ else if (capacity < 3)
+ level = FUEL_GAUGE_LV_0;
+ else
+ level = (int)((capacity + 2) / 5);
+ } else {
+ if (capacity > 100)
+ level = LEVEL_MAX;
+ else if (capacity >= 80)
+ level = LEVEL_6;
+ else if (capacity >= 60)
+ level = LEVEL_5;
+ else if (capacity >= 40)
+ level = LEVEL_4;
+ else if (capacity >= 25)
+ level = LEVEL_3;
+ else if (capacity >= 15)
+ level = LEVEL_2;
+ else if (capacity >= 5)
+ level = LEVEL_1;
+ else
+ level = LEVEL_0;
+ }
+
+ return level;
+}
+
+static void show_battery_icon(void)
+{
+ int i = 0;
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_show(&battery[i]);
+ }
+}
+
+static void hide_battery_icon(void)
+{
+ int i = 0;
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&battery[i]);
+ }
+}
+
+static void icon_animation_set(enum indicator_icon_ani type)
+{
+ int i = 0;
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_animation_set(&battery[i],type);
+ }
+}
+
+static void indicator_battery_get_time_format( void)
+{
+ int r = -1;
+
+ bool is_24hour_enabled = false;
+
+ r = runtime_info_get_value_bool(
+ RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED, &is_24hour_enabled);
+
+ if( r==RUNTIME_INFO_ERROR_NONE&&is_24hour_enabled==true)
+ {
+ clock_mode = INDICATOR_CLOCK_MODE_24H;
+ }
+ else
+ {
+ clock_mode = INDICATOR_CLOCK_MODE_12H;
+ }
+
+}
+
+static void indicator_battery_level_init(void)
+{
+ battery_level_type = BATTERY_LEVEL_20;
+ _level.min_level = FUEL_GAUGE_LV_MIN;
+ _level.current_level = -1;
+ _level.current_capa = -1;
+ _level.max_level = FUEL_GAUGE_LV_MAX;
+ _level.icon_path = fuel_guage_icon_path;
+ _level.charing_icon_path = fuel_guage_icon_path;
+ indicator_battery_get_time_format();
+}
+
+static void indicator_battery_text_set(void *data, int value, Indicator_Icon_Object *icon)
+{
+ Eina_Strbuf *temp_buf = NULL;
+ Eina_Strbuf *percent_buf = NULL;
+ char *temp_str = NULL;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ icon->type = INDICATOR_TXT_WITH_IMG_ICON;
+ temp_buf = eina_strbuf_new();
+ percent_buf = eina_strbuf_new();
+
+ eina_strbuf_append_printf(temp_buf, "%d", value);
+ temp_str = eina_strbuf_string_steal(temp_buf);
+ eina_strbuf_append_printf(percent_buf, "%s",
+ indicator_util_icon_label_set
+ (temp_str, NULL, NULL,
+ BATTERY_VALUE_FONT_SIZE,
+ data));
+ free(temp_str);
+
+ eina_strbuf_append_printf(temp_buf, "%%");
+ temp_str = eina_strbuf_string_steal(temp_buf);
+ eina_strbuf_append_printf(percent_buf, "%s",
+ indicator_util_icon_label_set
+ (temp_str, NULL,
+ BATTERY_PERCENT_FONT_STYLE,
+ BATTERY_PERCENT_FONT_SIZE,
+ data));
+ free(temp_str);
+
+ if (icon->txt_obj.data != NULL)
+ free(icon->txt_obj.data);
+
+ icon->txt_obj.data = eina_strbuf_string_steal(percent_buf);
+
+ if (temp_buf != NULL)
+ eina_strbuf_free(temp_buf);
+
+ if (percent_buf != NULL)
+ eina_strbuf_free(percent_buf);
+
+}
+
+static Eina_Bool indicator_battery_charging_ani_cb(void *data)
+{
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ if (_level.current_level == _level.max_level) {
+ aniIndex = _level.max_level;
+ battery[0].img_obj.data = fuel_guage_icon_path[clock_mode][aniIndex];
+ battery[1].img_obj.data = fuel_guage_icon_path[clock_mode][aniIndex];
+ show_battery_icon();
+ timer = NULL;
+ return TIMER_STOP;
+ }
+
+ if (aniIndex >= _level.max_level || aniIndex < 0)
+ aniIndex = _level.current_level;
+ else
+ aniIndex++;
+
+ battery[0].img_obj.data = fuel_guage_icon_path[clock_mode][aniIndex];
+ battery[1].img_obj.data = fuel_guage_icon_path[clock_mode][aniIndex];
+ show_battery_icon();
+
+ return TIMER_CONTINUE;
+}
+
+static int indicator_change_battery_image_level(void *data, int level)
+{
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ if (battery_level_type == BATTERY_LEVEL_20) {
+ if (level < FUEL_GAUGE_LV_MIN)
+ level = FUEL_GAUGE_LV_MIN;
+ else if (level > FUEL_GAUGE_LV_MAX)
+ level = FUEL_GAUGE_LV_MAX;
+ } else {
+ if (level < LEVEL_MIN)
+ level = LEVEL_MIN;
+ else if (level > LEVEL_MAX)
+ level = LEVEL_MAX;
+ }
+
+ DBG("level = %d",level);
+ battery[0].img_obj.data = fuel_guage_icon_path[clock_mode][level];
+ battery[1].img_obj.data = fuel_guage_icon_path[clock_mode][level];
+ show_battery_icon();
+ return OK;
+}
+
+static void indicator_battery_check_percentage_option(void *data)
+{
+ int ret = FAIL;
+ int status = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, &status);
+ if (ret != OK)
+ ERR("Fail to get [%s: %d]",
+ VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL, ret);
+
+
+ int i = 0;
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ battery_percentage_on = EINA_FALSE;
+ battery[i].img_obj.width = BATTERY_ICON_WIDTH;
+ battery[i].type = INDICATOR_IMG_ICON;
+ }
+}
+
+static void indicator_bttery_update_by_charging_state(void *data)
+{
+ if (battery_charging == EINA_TRUE) {
+ if (!timer) {
+ icon_animation_set(ICON_ANI_NONE);
+ timer = ecore_timer_add(TIMER_INTERVAL,
+ indicator_battery_charging_ani_cb,
+ data);
+ }
+ } else {
+ aniIndex = -1;
+ delete_timer();
+ icon_animation_set(ICON_ANI_NONE);
+ indicator_change_battery_image_level(data,
+ _level.current_level);
+ }
+}
+
+static void indicator_battery_update_display(void *data)
+{
+ int battery_capa = 0;
+ int ret;
+ int level = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CAPACITY, &battery_capa);
+ if (ret != OK)
+ {
+ ERR("Fail to get [VCONFKEY_SYSMAN_BATTERY_CAPACITY:%d]", ret);
+ return;
+ }
+
+ if (battery_capa < 0)
+ {
+ INFO("Invalid Battery Capacity: %d", battery_capa);
+ return;
+ }
+
+ INFO("Battery Capacity: %d", battery_capa);
+
+ if (battery_capa > 100)
+ battery_capa = 100;
+
+ _level.current_capa = battery_capa;
+
+ indicator_battery_check_percentage_option(data);
+
+ level = __battery_capa_to_level(battery_capa);
+ if (level == _level.current_level)
+ DBG("battery level is not changed");
+ else {
+ _level.current_level = level;
+ }
+ indicator_bttery_update_by_charging_state(data);
+
+}
+
+
+static void indicator_battery_check_charging(void *data)
+{
+ int ret = -1;
+ int status = 0;
+
+ ret = vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &status);
+ if (ret != OK)
+ ERR("Fail to get [VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW:%d]", ret);
+
+ INFO("Battery charge Status: %d", status);
+
+ battery_charging = status;
+
+ indicator_battery_update_display(data);
+}
+
+static void indicator_battery_charging_cb(keynode_t *node, void *data)
+{
+ indicator_battery_check_charging(data);
+}
+
+static void indicator_battery_percentage_option_cb(keynode_t *node, void *data)
+{
+ hide_battery_icon();
+ indicator_battery_check_percentage_option(data);
+ show_battery_icon();
+}
+
+static void indicator_battery_change_cb(keynode_t *node, void *data)
+{
+ indicator_battery_update_display(data);
+}
+
+static void indicator_battery_clock_format_changed_cb(keynode_t *node, void *data)
+{
+ retif(data == NULL, , "Invalid parameter!");
+
+ INFO("[Enter] indicator_battery_clock_format_changed_cb");
+
+ indicator_battery_get_time_format();
+
+ indicator_battery_update_display(data);
+}
+
+static int register_battery_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+ indicator_battery_level_init();
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
+ indicator_battery_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
+ indicator_battery_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
+ indicator_battery_charging_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL,
+ indicator_battery_percentage_option_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_REGIONFORMAT_TIME1224,
+ indicator_battery_clock_format_changed_cb, data);
+ if (ret != OK) {
+ ERR("Fail: register VCONFKEY_REGIONFORMAT_TIME1224");
+ r = r | ret;
+ }
+
+ indicator_battery_update_display(data);
+
+ return r;
+}
+
+static int unregister_battery_module(void)
+{
+ int ret;
+ int i = 0;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CAPACITY,
+ indicator_battery_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_STATUS_LOW,
+ indicator_battery_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW,
+ indicator_battery_charging_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_BATTERY_PERCENTAGE_BOOL,
+ indicator_battery_percentage_option_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ delete_timer();
+
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ if (battery[i].txt_obj.data != NULL)
+ free(battery[i].txt_obj.data);
+ }
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "active_sync"
+
+static int register_active_sync_module(void *data);
+static int unregister_active_sync_module(void);
+static int hib_enter_active_sync_module(void);
+static int hib_leave_active_sync_module(void *data);
+
+Indicator_Icon_Object active_sync[INDICATOR_WIN_MAX] = {
+{
+ .type = INDICATOR_IMG_ICON,
+ .win_type = INDICATOR_WIN_PORT,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_active_sync_module,
+ .fini = unregister_active_sync_module,
+ .hib_enter = hib_enter_active_sync_module,
+ .hib_leave = hib_leave_active_sync_module
+},
+{
+ .type = INDICATOR_IMG_ICON,
+ .win_type = INDICATOR_WIN_LAND,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_active_sync_module,
+ .fini = unregister_active_sync_module,
+ .hib_enter = hib_enter_active_sync_module,
+ .hib_leave = hib_leave_active_sync_module
+}
+};
+
+static const char *icon_path[] = {
+ "Processing/B03_Processing_Syncing.png",
+ "Processing/B03_Processing_Syncerror.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ active_sync[i].ad = data;
+ }
+
+}
+
+static void show_image_icon(void* data)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ active_sync[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&active_sync[i]);
+ indicator_util_icon_animation_set(&active_sync[i],
+ ICON_ANI_ROTATE);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&active_sync[i]);
+ }
+}
+
+static void indicator_active_sync_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ if (ret == FAIL) {
+ ERR("Failed to get VCONFKEY_SYNC_STATE!");
+ return;
+ }
+
+ if (status == TRUE) {
+ INFO("Active sync is set");
+ show_image_icon(data);
+
+ } else {
+ INFO("Active sync is unset");
+ hide_image_icon();
+ }
+}
+
+static int register_active_sync_module(void *data)
+{
+ int ret = 0;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ if (ret != OK)
+ ERR("Failed to register callback!");
+
+ indicator_active_sync_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_active_sync_module(void)
+{
+ int ret = 0;
+
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_enter_active_sync_module(void)
+{
+ int ret = 0;
+
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_leave_active_sync_module(void *data)
+{
+ int ret = 0;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_active_sync_change_cb(NULL, data);
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include <Ecore_X.h>
+#include <minicontrol-monitor.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_1
+#define MODULE_NAME "call"
+#define MINICONTROL_VOICE_NAME "[voicecall-quickpanel]"
+#define MINICONTROL_VIDEO_NAME "[videocall-quickpanel]"
+
+static int register_call_module(void *data);
+static int unregister_call_module(void);
+static void mctrl_monitor_cb(int action, const char *name, void *data);
+
+Indicator_Icon_Object call[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_call_module,
+ .fini = unregister_call_module,
+ .minictrl_control = mctrl_monitor_cb
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_call_module,
+ .fini = unregister_call_module,
+ .minictrl_control = mctrl_monitor_cb
+}
+};
+
+static const char *icon_path[] = {
+ "Call/B03_Call_Duringcall.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ call[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ call[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&call[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&call[i]);
+ }
+}
+
+static void icon_animation_set(enum indicator_icon_ani type)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_animation_set(&call[i], type);
+ }
+}
+
+static void show_call_icon( void *data)
+{
+ int status = 0;
+ int ret = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_CALL_STATE, &status);
+ if (ret == FAIL) {
+ ERR("Failed to get VCONFKEY_CALL_STATE!");
+ return;
+ }
+
+ INFO("Call state = %d", status);
+ switch (status) {
+ case VCONFKEY_CALL_VOICE_CONNECTING:
+ case VCONFKEY_CALL_VIDEO_CONNECTING:
+ show_image_icon(data);
+ icon_animation_set(ICON_ANI_BLINK);
+ break;
+ case VCONFKEY_CALL_VOICE_ACTIVE:
+ case VCONFKEY_CALL_VIDEO_ACTIVE:
+ show_image_icon(data);
+ icon_animation_set(ICON_ANI_NONE);
+ break;
+ case VCONFKEY_CALL_OFF:
+ INFO("Call off");
+ hide_image_icon();
+ break;
+ default:
+ ERR("Invalid value %d", status);
+ break;
+ }
+}
+
+static void indicator_call_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret = 0;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_CALL_STATE, &status);
+ if (ret == FAIL) {
+ ERR("Failed to get VCONFKEY_CALL_STATE!");
+ return;
+ }
+ switch (status) {
+ case VCONFKEY_CALL_VOICE_CONNECTING:
+ case VCONFKEY_CALL_VIDEO_CONNECTING:
+ show_image_icon(data);
+ icon_animation_set(ICON_ANI_BLINK);
+ break;
+ case VCONFKEY_CALL_VOICE_ACTIVE:
+ case VCONFKEY_CALL_VIDEO_ACTIVE:
+ hide_image_icon();
+ break;
+ case VCONFKEY_CALL_OFF:
+ INFO("Call off");
+ hide_image_icon();
+ break;
+ default:
+ ERR("Invalid value %d", status);
+ break;
+ }
+
+}
+
+static void mctrl_monitor_cb(int action, const char *name, void *data)
+{
+ int ret = 0;
+ int status = 0;
+
+ retif(!data, , "data is NULL");
+ retif(!name, , "name is NULL");
+
+ if(strncmp(name,MINICONTROL_VOICE_NAME,strlen(MINICONTROL_VOICE_NAME))!=0
+ &&strncmp(name,MINICONTROL_VIDEO_NAME,strlen(MINICONTROL_VIDEO_NAME))!=0)
+ {
+ ERR("_mctrl_monitor_cb: no call%s",name);
+ return;
+ }
+
+ DBG("_mctrl_monitor_cb:%s %d",name,action);
+
+ switch (action) {
+ case MINICONTROL_ACTION_START:
+ show_call_icon(data);
+ break;
+ case MINICONTROL_ACTION_STOP:
+ ret = vconf_get_int(VCONFKEY_CALL_STATE, &status);
+ if (ret == FAIL) {
+ ERR("Failed to get VCONFKEY_CALL_STATE!");
+ return;
+ }
+ INFO("Call state = %d", status);
+ switch (status) {
+ case VCONFKEY_CALL_VOICE_CONNECTING:
+ case VCONFKEY_CALL_VIDEO_CONNECTING:
+ break;
+ case VCONFKEY_CALL_VOICE_ACTIVE:
+ case VCONFKEY_CALL_VIDEO_ACTIVE:
+ case VCONFKEY_CALL_OFF:
+ INFO("Call off");
+ icon_animation_set(ICON_ANI_NONE);
+ hide_image_icon();
+ break;
+ default:
+ ERR("Invalid value %d", status);
+ break;
+ }
+ break;
+ default:
+ break;
+ }
+}
+
+static int register_call_module(void *data)
+{
+ int ret = 0;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_CALL_STATE, indicator_call_change_cb, data);
+
+ if (ret != OK)
+ ERR("Failed to register callback!");
+
+ return OK;
+}
+
+static int unregister_call_module(void)
+{
+ int ret = 0;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_CALL_STATE, indicator_call_change_cb);
+
+ if (ret != OK)
+ ERR("Failed to register callback!");
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_4
+#define MODULE_NAME "call_divert"
+
+static int register_call_divert_module(void *data);
+static int unregister_call_divert_module(void);
+static int hib_enter_call_divert_module(void);
+static int hib_leave_call_divert_module(void *data);
+
+Indicator_Icon_Object call_divert[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .init = register_call_divert_module,
+ .fini = unregister_call_divert_module,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .hib_enter = hib_enter_call_divert_module,
+ .hib_leave = hib_leave_call_divert_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .init = register_call_divert_module,
+ .fini = unregister_call_divert_module,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .hib_enter = hib_enter_call_divert_module,
+ .hib_leave = hib_leave_call_divert_module
+}
+
+};
+
+static const char *icon_path[] = {
+ "Processing/B03_Processing_calldivert.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ call_divert[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ call_divert[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&call_divert[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&call_divert[i]);
+ }
+}
+
+static void indicator_call_divert_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_TELEPHONY_CALL_FORWARD_STATE, &status);
+ if (ret == FAIL) {
+ ERR("Failed to get VCONFKEY_TELEPHONY_CALL_FORWARD_STATE!");
+ return;
+ }
+
+ if (status == VCONFKEY_TELEPHONY_CALL_FORWARD_ON) {
+ INFO("Call diverting is set!");
+ show_image_icon(data);
+ } else {
+ INFO("Call diverting is unset!");
+ hide_image_icon();
+ }
+}
+
+static int register_call_divert_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_CALL_FORWARD_STATE,
+ indicator_call_divert_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback!");
+
+ indicator_call_divert_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_call_divert_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_CALL_FORWARD_STATE,
+ indicator_call_divert_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_enter_call_divert_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_CALL_FORWARD_STATE,
+ indicator_call_divert_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_leave_call_divert_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_CALL_FORWARD_STATE,
+ indicator_call_divert_change_cb, data);
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_call_divert_change_cb(NULL, data);
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include <Ecore_X.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "sos"
+
+static int register_sos_module(void *data);
+static int unregister_sos_module(void);
+
+Indicator_Icon_Object sos[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_sos_module,
+ .fini = unregister_sos_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_TRUE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_sos_module,
+ .fini = unregister_sos_module
+}
+};
+
+static const char *icon_path[] = {
+ "Call/B03_Call_SOSmessge_active.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ sos[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ sos[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&sos[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&sos[i]);
+ }
+}
+
+static void icon_animation_set(enum indicator_icon_ani type)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_animation_set(&sos[i],type);
+ }
+}
+
+
+static void indicator_sos_change_cb(keynode_t *node, void *data)
+{
+ int send_option = 0;
+ int sos_state = VCONFKEY_MESSAGE_SOS_IDLE;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_bool(VCONFKEY_MESSAGE_SOS_SEND_OPTION, &send_option);
+ if (ret == FAIL)
+ ERR("Failed to get VCONFKEY_MESSAGE_SOS_SEND_OPTION!");
+
+ INFO("sos send option = %d", send_option);
+
+ if (!send_option) {
+ hide_image_icon();
+ return;
+ }
+
+ show_image_icon(data);
+
+ ret = vconf_get_int(VCONFKEY_MESSAGE_SOS_STATE, &sos_state);
+ if (ret == FAIL)
+ ERR("Failed to get VCONFKEY_MESSAGE_SOS_SEND_OPTION!");
+
+ if (sos_state == VCONFKEY_MESSAGE_SOS_STANDBY)
+ icon_animation_set(ICON_ANI_BLINK);
+ else
+ icon_animation_set(ICON_ANI_NONE);
+}
+
+static int register_sos_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_MESSAGE_SOS_SEND_OPTION,
+ indicator_sos_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback! [%s]",
+ VCONFKEY_MESSAGE_SOS_SEND_OPTION);
+
+ ret = vconf_notify_key_changed(VCONFKEY_MESSAGE_SOS_STATE,
+ indicator_sos_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback! [%s]",
+ VCONFKEY_MESSAGE_SOS_STATE);
+
+ indicator_sos_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_sos_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_MESSAGE_SOS_SEND_OPTION,
+ indicator_sos_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback! [%s]",
+ VCONFKEY_MESSAGE_SOS_SEND_OPTION);
+
+ ret = vconf_ignore_key_changed(VCONFKEY_MESSAGE_SOS_STATE,
+ indicator_sos_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback! [%s]",
+ VCONFKEY_MESSAGE_SOS_STATE);
+ return OK;
+}
+
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include <Ecore_X.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "transfer"
+#define TIMER_INTERVAL 0.03
+
+static int register_trnsfr_module(void *data);
+static int unregister_trnsfr_module(void);
+
+Indicator_Icon_Object trnsfr[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_trnsfr_module,
+ .fini = unregister_trnsfr_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_trnsfr_module,
+ .fini = unregister_trnsfr_module
+}
+};
+
+static const char *icon_path[] = {
+ "Processing/B03_Processing_01.png",
+ "Processing/B03_Processing_02.png",
+ "Processing/B03_Processing_03.png",
+ "Processing/B03_Processing_04.png",
+ "Processing/B03_Processing_05.png",
+ "Processing/B03_Processing_06.png",
+ "Processing/B03_Processing_07.png",
+ "Processing/B03_Processing_08.png",
+ "Processing/B03_Processing_09.png",
+ "Processing/B03_Processing_10.png",
+ "Processing/B03_Processing_11.png",
+ "Processing/B03_Processing_12.png",
+ "Processing/B03_Processing_13.png",
+ "Processing/B03_Processing_14.png",
+ "Processing/B03_Processing_15.png",
+ "Processing/B03_Processing_16.png",
+ "Processing/B03_Processing_17.png",
+ "Processing/B03_Processing_18.png",
+ "Processing/B03_Processing_19.png",
+ "Processing/B03_Processing_20.png",
+ "Processing/B03_Processing_21.png",
+ "Processing/B03_Processing_22.png",
+ "Processing/B03_Processing_23.png",
+ "Processing/B03_Processing_24.png",
+ "Processing/B03_Processing_25.png",
+ "Processing/B03_Processing_26.png",
+ "Processing/B03_Processing_27.png",
+ "Processing/B03_Processing_28.png",
+ "Processing/B03_Processing_29.png",
+ "Processing/B03_Processing_30.png",
+ NULL
+};
+
+static Ecore_Timer *timer = NULL;
+static unsigned int process_req_cnt = 0;
+
+static void delete_timer(void)
+{
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+}
+
+static void show_image_icon(void *data, int index)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ trnsfr[i].img_obj.data = icon_path[index];
+ indicator_util_icon_show(&trnsfr[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&trnsfr[i]);
+ }
+}
+
+static Eina_Bool indicator_trnsfr_transfer_cb(void *data)
+{
+ static int i = 0;
+
+ retif(data == NULL, ECORE_CALLBACK_CANCEL, "Invalid parameter!");
+
+ show_image_icon(data, i);
+ i = (++i % 30) ? i : 0;
+
+ return ECORE_CALLBACK_RENEW;
+}
+
+void show_trnsfr_icon(void *data)
+{
+
+ process_req_cnt++;
+}
+
+void hide_trnsfr_icon(void)
+{
+ process_req_cnt--;
+
+ if (process_req_cnt <= 0) {
+ process_req_cnt = 0;
+ delete_timer();
+ }
+}
+
+static int register_trnsfr_module(void *data)
+{
+ return OK;
+}
+
+static int unregister_trnsfr_module(void)
+{
+ delete_timer();
+ process_req_cnt = 0;
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_3
+#define MODULE_NAME "bluetooth"
+#define TIMER_INTERVAL 0.3
+
+extern void show_trnsfr_icon(void *data);
+extern void hide_trnsfr_icon(void);
+
+static int register_bluetooth_module(void *data);
+static int unregister_bluetooth_module(void);
+static int hib_enter_bluetooth_module(void);
+static int hib_leave_bluetooth_module(void *data);
+
+Indicator_Icon_Object bluetooth[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_bluetooth_module,
+ .fini = unregister_bluetooth_module,
+ .hib_enter = hib_enter_bluetooth_module,
+ .hib_leave = hib_leave_bluetooth_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_bluetooth_module,
+ .fini = unregister_bluetooth_module,
+ .hib_enter = hib_enter_bluetooth_module,
+ .hib_leave = hib_leave_bluetooth_module
+}
+
+};
+
+enum {
+ LEVEL_MIN = 0,
+ LEVEL_BT_NOT_CONNECTED = LEVEL_MIN,
+ LEVEL_BT_CONNECTED,
+ LEVEL_BT_HEADSET,
+ LEVEL_MAX
+};
+
+static const char *icon_path[LEVEL_MAX] = {
+ [LEVEL_BT_NOT_CONNECTED] =
+ "Bluetooth, NFC, GPS/B03_BT_On&Notconnected.png",
+ [LEVEL_BT_CONNECTED] = "Bluetooth, NFC, GPS/B03_BT_On&Connected.png",
+ [LEVEL_BT_HEADSET] =
+ "Bluetooth, NFC, GPS/B03_BT_On&Connected&headset.png",
+};
+
+static Ecore_Timer *timer;
+static Eina_Bool bt_transferring = EINA_FALSE;
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ bluetooth[i].ad = data;
+ }
+}
+
+static void delete_timer(void)
+{
+ if (timer != NULL) {
+ ecore_timer_del(timer);
+ timer = NULL;
+ }
+}
+
+static void show_image_icon(void *data, int index)
+{
+ int i = 0;
+
+ if (index < LEVEL_MIN || index >= LEVEL_MAX)
+ index = LEVEL_MIN;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ bluetooth[i].img_obj.data = icon_path[index];
+ indicator_util_icon_show(&bluetooth[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&bluetooth[i]);
+ }
+}
+
+static Eina_Bool indicator_bluetooth_multidev_cb(void *data)
+{
+ static int i = 0;
+
+ retif(data == NULL, ECORE_CALLBACK_CANCEL, "Invalid parameter!");
+
+ show_image_icon(data, LEVEL_BT_CONNECTED + i);
+ i = (++i % 2) ? i : 0;
+
+ return ECORE_CALLBACK_RENEW;
+}
+
+#define NO_DEVICE (0x00)
+#define HEADSET_CONNECTED (0x01)
+#define DEVICE_CONNECTED (0x02)
+#define DATA_TRANSFER (0x04)
+
+static void show_bluetooth_icon(void *data, int status)
+{
+ INFO("Bluetooth status = %d", status);
+
+ if (status == NO_DEVICE) {
+ show_image_icon(data, LEVEL_BT_NOT_CONNECTED);
+ return;
+ }
+ if (status & DATA_TRANSFER) {
+ if(bt_transferring != EINA_TRUE) {
+ show_trnsfr_icon(data);
+ bt_transferring = EINA_TRUE;
+ }
+ return;
+ }
+
+ if ((status & HEADSET_CONNECTED) && (status & DEVICE_CONNECTED)) {
+ INFO("BT_MULTI_DEVICE_CONNECTED");
+ timer = ecore_timer_add(TIMER_INTERVAL,
+ indicator_bluetooth_multidev_cb, data);
+ return;
+ }
+
+ if (status & HEADSET_CONNECTED) {
+ INFO("BT_HEADSET_CONNECTED");
+ show_image_icon(data, LEVEL_BT_HEADSET);
+ } else if (status & DEVICE_CONNECTED) {
+ INFO("BT_DEVICE_CONNECTED");
+ show_image_icon(data, LEVEL_BT_CONNECTED);
+ }
+ return;
+}
+
+static void indicator_bluetooth_change_cb(keynode_t *node, void *data)
+{
+ int status, dev;
+ int ret;
+ int result = NO_DEVICE;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_BT_STATUS, &status);
+ if (ret == OK) {
+ INFO("BT STATUS: %d", status);
+ /* Check transferring Icon animation */
+ if (!(status & VCONFKEY_BT_STATUS_TRANSFER)) {
+ if (bt_transferring == EINA_TRUE) {
+ hide_trnsfr_icon();
+ bt_transferring = EINA_FALSE;
+ }
+ }
+
+ if (status == VCONFKEY_BT_STATUS_OFF) {
+ hide_image_icon();
+ return;
+ } else if (status & VCONFKEY_BT_STATUS_TRANSFER) {
+ INFO("BT TRASFER!");
+ result = (result | DATA_TRANSFER);
+ show_bluetooth_icon(data, result);
+ return;
+ }
+ }
+
+ ret = vconf_get_int(VCONFKEY_BT_DEVICE, &dev);
+ if (ret == OK) {
+ INFO("BT DEVICE: %d", dev);
+
+ if (dev == VCONFKEY_BT_DEVICE_NONE) {
+ show_bluetooth_icon(data, NO_DEVICE);
+ return;
+ }
+ if ((dev & VCONFKEY_BT_DEVICE_HEADSET_CONNECTED) ||
+ (dev & VCONFKEY_BT_DEVICE_A2DP_HEADSET_CONNECTED)) {
+ result = (result | HEADSET_CONNECTED);
+ INFO("BT_HEADSET_CONNECTED(%x)", result);
+ }
+ if (((dev & VCONFKEY_BT_DEVICE_SAP_CONNECTED)) ||
+ (dev & VCONFKEY_BT_DEVICE_PBAP_CONNECTED)) {
+ result = (result | DEVICE_CONNECTED);
+ INFO("BT_DEVICE_CONNECTED(%x)", result);
+ }
+ show_bluetooth_icon(data, result);
+ }
+ return;
+}
+
+static int register_bluetooth_module(void *data)
+{
+ int r = 0, ret = -1;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_BT_STATUS,
+ indicator_bluetooth_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = ret;
+ }
+
+ ret = vconf_notify_key_changed(VCONFKEY_BT_DEVICE,
+ indicator_bluetooth_change_cb, data);
+ if (ret != OK) {
+ ERR("Failed to register callback!");
+ r = r | ret;
+ }
+
+ indicator_bluetooth_change_cb(NULL, data);
+
+ return r;
+}
+
+static int unregister_bluetooth_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_BT_STATUS,
+ indicator_bluetooth_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_BT_DEVICE,
+ indicator_bluetooth_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ delete_timer();
+
+ if (bt_transferring == EINA_TRUE) {
+ hide_trnsfr_icon();
+ bt_transferring = EINA_FALSE;
+ }
+
+ return OK;
+}
+
+static int hib_enter_bluetooth_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_BT_STATUS,
+ indicator_bluetooth_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_leave_bluetooth_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_BT_STATUS,
+ indicator_bluetooth_change_cb, data);
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_bluetooth_change_cb(NULL, data);
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "gps"
+#define TIMER_INTERVAL 0.3
+
+static int register_gps_module(void *data);
+static int unregister_gps_module(void);
+static int hib_enter_gps_module(void);
+static int hib_leave_gps_module(void *data);
+
+Indicator_Icon_Object gps[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_gps_module,
+ .fini = unregister_gps_module,
+ .hib_enter = hib_enter_gps_module,
+ .hib_leave = hib_leave_gps_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_gps_module,
+ .fini = unregister_gps_module,
+ .hib_enter = hib_enter_gps_module,
+ .hib_leave = hib_leave_gps_module
+}
+};
+
+enum {
+ LEVEL_MIN = 0,
+ LEVEL_GPS_ON = LEVEL_MIN,
+ LEVEL_GPS_SEARCHING,
+ LEVEL_MAX
+};
+
+enum {
+ IND_POSITION_STATE_OFF = 0,
+ IND_POSITION_STATE_SEARCHING,
+ IND_POSITION_STATE_CONNECTED
+};
+
+static const char *icon_path[LEVEL_MAX] = {
+ [LEVEL_GPS_ON] = "Bluetooth, NFC, GPS/B03_GPS_On.png",
+ [LEVEL_GPS_SEARCHING] = "Bluetooth, NFC, GPS/B03_GPS_Searching.png",
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ gps[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data, int index)
+{
+ int i = 0;
+
+ if (index < LEVEL_MIN)
+ index = LEVEL_MIN;
+ else if (index >= LEVEL_MAX)
+ index = LEVEL_GPS_SEARCHING;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ gps[i].img_obj.data = icon_path[index];
+ indicator_util_icon_show(&gps[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&gps[i]);
+ }
+}
+
+static void icon_animation_set(enum indicator_icon_ani type)
+{
+ int i = 0;
+ for(i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_animation_set(&gps[i],type);
+ }
+}
+
+static int indicator_gps_state_get(void)
+{
+ int ret = 0;
+ int gps_status = 0;
+ int status = 0;
+
+ ret = vconf_get_int(VCONFKEY_LOCATION_GPS_STATE, &gps_status);
+ if (ret < 0)
+ ERR("fail to get [%s]", VCONFKEY_LOCATION_GPS_STATE);
+
+ INFO("GPS STATUS: %d", gps_status);
+
+ if(gps_status == VCONFKEY_LOCATION_GPS_CONNECTED)
+ {
+ status = IND_POSITION_STATE_CONNECTED;
+ }
+ else if(gps_status == VCONFKEY_LOCATION_GPS_SEARCHING)
+ {
+ status = IND_POSITION_STATE_SEARCHING;
+ }
+ else
+ {
+ status = IND_POSITION_STATE_OFF;
+ }
+
+ return status;
+}
+
+static void indicator_gps_state_icon_set(int status, void *data)
+{
+ INFO("GPS STATUS: %d", status);
+
+ switch (status) {
+ case IND_POSITION_STATE_OFF:
+ hide_image_icon();
+ break;
+ case IND_POSITION_STATE_CONNECTED:
+ show_image_icon(data, LEVEL_GPS_ON);
+ icon_animation_set(ICON_ANI_NONE);
+ break;
+ case IND_POSITION_STATE_SEARCHING:
+ show_image_icon(data, LEVEL_GPS_SEARCHING);
+ icon_animation_set(ICON_ANI_BLINK);
+ break;
+ default:
+ hide_image_icon();
+ ERR("Invalid value!");
+ break;
+ }
+
+ return;
+}
+
+static void indicator_gps_change_cb(keynode_t *node, void *data)
+{
+
+ retif(data == NULL, , "Invalid parameter!");
+ retif(node == NULL, , "node is NULL");
+
+ indicator_gps_state_icon_set(indicator_gps_state_get(), data);
+
+ return;
+}
+
+static int register_gps_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_LOCATION_GPS_STATE,
+ indicator_gps_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback! : VCONFKEY_LOCATION_GPS_STATE");
+
+ indicator_gps_state_icon_set(indicator_gps_state_get(), data);
+
+ return ret;
+}
+
+static int unregister_gps_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_LOCATION_GPS_STATE,
+ indicator_gps_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_enter_gps_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_LOCATION_GPS_STATE,
+ indicator_gps_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_leave_gps_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_LOCATION_GPS_STATE,
+ indicator_gps_change_cb, data);
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_gps_state_icon_set(indicator_gps_state_get(), data);
+
+ return OK;
+}
+
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_3
+#define MODULE_NAME "nfc"
+
+static int register_nfc_module(void *data);
+static int unregister_nfc_module(void);
+static int hib_enter_nfc_module(void);
+static int hib_leave_nfc_module(void *data);
+
+Indicator_Icon_Object nfc[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_nfc_module,
+ .fini = unregister_nfc_module,
+ .hib_enter = hib_enter_nfc_module,
+ .hib_leave = hib_leave_nfc_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_nfc_module,
+ .fini = unregister_nfc_module,
+ .hib_enter = hib_enter_nfc_module,
+ .hib_leave = hib_leave_nfc_module
+}
+};
+
+enum {
+ NFC_ON = 0,
+ NFC_NUM,
+};
+
+
+static const char *icon_path[NFC_NUM] = {
+ [NFC_ON] = "Bluetooth, NFC, GPS/B03_NFC_On.png",
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ nfc[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data, int index)
+{
+ int i = 0;
+
+ if (index < NFC_ON || index >= NFC_NUM)
+ index = NFC_ON;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ nfc[i].img_obj.data = icon_path[index];
+ indicator_util_icon_show(&nfc[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&nfc[i]);
+ }
+}
+
+static void indicator_nfc_change_cb(keynode_t *node, void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_bool(VCONFKEY_NFC_STATE, &status);
+ if (ret == OK) {
+ INFO("NFC STATUS: %d", status);
+
+ if (status == 1) {
+ show_image_icon(data, NFC_ON);
+ return;
+ }
+ }
+
+ hide_image_icon();
+ return;
+}
+
+static int register_nfc_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_NFC_STATE,
+ indicator_nfc_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback!");
+
+ indicator_nfc_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_nfc_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_NFC_STATE,
+ indicator_nfc_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_enter_nfc_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_NFC_STATE,
+ indicator_nfc_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_leave_nfc_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_NFC_STATE,
+ indicator_nfc_change_cb, data);
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_nfc_change_cb(NULL, data);
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_NOTI_2
+#define MODULE_NAME "rotate-lock"
+
+static int register_rotate_module(void *data);
+static int unregister_rotate_module(void);
+static int hib_enter_rotate_module(void);
+static int hib_leave_rotate_module(void *data);
+
+Indicator_Icon_Object rotate[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_rotate_module,
+ .fini = unregister_rotate_module,
+ .hib_enter = hib_enter_rotate_module,
+ .hib_leave = hib_leave_rotate_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_NOTI,
+ .init = register_rotate_module,
+ .fini = unregister_rotate_module,
+ .hib_enter = hib_enter_rotate_module,
+ .hib_leave = hib_leave_rotate_module
+}
+
+};
+
+static char *icon_path[] = {
+ "Rotation locked/B03_Rotationlocked.png",
+ NULL
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ rotate[i].ad = data;
+ }
+}
+
+static void show_image_icon(void *data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ rotate[i].img_obj.data = icon_path[0];
+ indicator_util_icon_show(&rotate[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&rotate[i]);
+ }
+}
+
+static void indicator_rotate_change_cb(keynode_t *node, void *data)
+{
+ int status = 0;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL, &status);
+ if (ret == OK) {
+ INFO("VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL: %d", status);
+ if (status) {
+ show_image_icon(data);
+ return;
+ }
+ hide_image_icon();
+ return;
+ }
+ ERR("Failed to get rotate-lock status!");
+ return;
+}
+
+static int register_rotate_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL,
+ indicator_rotate_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback!");
+
+ indicator_rotate_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_rotate_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL,
+ indicator_rotate_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_enter_rotate_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL,
+ indicator_rotate_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ return OK;
+}
+
+static int hib_leave_rotate_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_ROTATE_LOCK_BOOL,
+ indicator_rotate_change_cb, data);
+ retif(ret != OK, FAIL, "Failed to register callback!");
+
+ indicator_rotate_change_cb(NULL, data);
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_ui.h"
+#include "modules.h"
+#include "indicator_icon_util.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_1
+#define MODULE_NAME "silent"
+
+static int register_silent_module(void *data);
+static int unregister_silent_module(void);
+static int hib_enter_silent_module(void);
+static int hib_leave_silent_module(void *data);
+
+Indicator_Icon_Object silent[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_silent_module,
+ .fini = unregister_silent_module,
+ .hib_enter = hib_enter_silent_module,
+ .hib_leave = hib_leave_silent_module
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_silent_module,
+ .fini = unregister_silent_module,
+ .hib_enter = hib_enter_silent_module,
+ .hib_leave = hib_leave_silent_module
+}
+};
+
+enum {
+ PROFILE_SOUND_VIBRATION,
+ PROFILE_MUTE,
+ PROFILE_VIBRATION,
+ PROFILE_NUM,
+};
+
+static const char *icon_path[PROFILE_NUM] = {
+ [PROFILE_SOUND_VIBRATION] = "Profile/B03_Profile_Sound&Vibration.png",
+ [PROFILE_MUTE] = "Profile/B03_Profile_Mute.png",
+ [PROFILE_VIBRATION] = "Profile/B03_Profile_Vibration.png",
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ silent[i].ad = data;
+ }
+}
+
+static void show_image_icon(int index)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ silent[i].img_obj.data = icon_path[index];
+ indicator_util_icon_show(&silent[i]);
+ }
+}
+
+static void hide_image_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&silent[i]);
+ }
+}
+
+static void indicator_silent_change_cb(keynode_t *node, void *data)
+{
+ int sound_status = 0;
+ int vib_status = 0;
+ int ret;
+ const char *selected_image = NULL;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sound_status);
+ ret =
+ vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vib_status);
+
+ if (ret == OK)
+ {
+ INFO("CURRENT Sound Status: %d vib_status: %d", sound_status,
+ vib_status);
+
+ if (sound_status == TRUE && vib_status == TRUE)
+ {
+ show_image_icon(PROFILE_SOUND_VIBRATION);
+ }
+ else if(sound_status == FALSE && vib_status==FALSE)
+ {
+ /* Mute Mode */
+ show_image_icon(PROFILE_MUTE);
+ }
+ else if(sound_status == FALSE && vib_status==TRUE)
+ {
+ /* Vibration Only Mode */
+ show_image_icon(PROFILE_VIBRATION);
+ }
+ else
+ {
+ hide_image_icon();
+ }
+ }
+ else
+ {
+ ERR("Failed to get current profile!");
+ }
+
+ return;
+}
+
+static int register_silent_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
+ indicator_silent_change_cb, data);
+ if (ret != OK)
+ ERR("Fail: register VCONFKEY_SETAPPL_SOUND_STATUS_BOOL");
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
+ indicator_silent_change_cb, data);
+ if (ret != OK)
+ ERR("Fail: register VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL");
+
+ indicator_silent_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_silent_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
+ indicator_silent_change_cb);
+ if (ret != OK)
+ ERR("Fail: ignore VCONFKEY_SETAPPL_SOUND_STATUS_BOOL");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
+ indicator_silent_change_cb);
+ if (ret != OK)
+ ERR("Fail: ignore VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL");
+ return OK;
+}
+
+static int hib_enter_silent_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
+ indicator_silent_change_cb);
+ if (ret != OK)
+ ERR("H_Fail: ignore VCONFKEY_SETAPPL_SOUND_STATUS_BOOL");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
+ indicator_silent_change_cb);
+ if (ret != OK)
+ ERR("H_Fail: ignore VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL");
+
+ return OK;
+}
+
+static int hib_leave_silent_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL,
+ indicator_silent_change_cb, data);
+ if (ret != OK)
+ ERR("H_Fail: register VCONFKEY_SETAPPL_SOUND_STATUS_BOOL");
+
+ ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL,
+ indicator_silent_change_cb, data);
+ if (ret != OK)
+ ERR("H_Fail: register VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL");
+
+ indicator_silent_change_cb(NULL, data);
+
+ return OK;
+}
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+#include <vconf.h>
+#include "common.h"
+#include "indicator.h"
+#include "indicator_icon_util.h"
+#include "modules.h"
+#include "indicator_ui.h"
+
+#define ICON_PRIORITY INDICATOR_PRIORITY_SYSTEM_3
+#define MODULE_NAME "wifi_direct"
+
+extern void show_trnsfr_icon(void *data);
+extern void hide_trnsfr_icon(void);
+
+static int register_wifi_direct_module(void *data);
+static int unregister_wifi_direct_module(void);
+
+Indicator_Icon_Object wifi_direct[INDICATOR_WIN_MAX] = {
+{
+ .win_type = INDICATOR_WIN_PORT,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_wifi_direct_module,
+ .fini = unregister_wifi_direct_module,
+},
+{
+ .win_type = INDICATOR_WIN_LAND,
+ .type = INDICATOR_IMG_ICON,
+ .name = MODULE_NAME,
+ .priority = ICON_PRIORITY,
+ .always_top = EINA_FALSE,
+ .exist_in_view = EINA_FALSE,
+ .txt_obj = {0,},
+ .img_obj = {0,},
+ .obj_exist = EINA_FALSE,
+ .area = INDICATOR_ICON_AREA_SYSTEM,
+ .init = register_wifi_direct_module,
+ .fini = unregister_wifi_direct_module,
+}
+
+};
+
+static Eina_Bool wifi_direct_transferring = EINA_FALSE;
+
+enum {
+ WIFI_DIRECT_ACTIVATE = 0,
+ WIFI_DIRECT_CONNECTED,
+ WIFI_DIRECT_DISCOVERING,
+ WIFI_DIRECT_GROUP_OWNER,
+ WIFI_DIRECT_MAX,
+};
+
+#define WIFI_D_ICON_NOT_CONNECTED \
+ "Bluetooth, NFC, GPS/B03_Wi-fi_direct On_not connected.png"
+
+#define WIFI_D_ICON_CONNECTED \
+ "Bluetooth, NFC, GPS/B03_Wi-fi_direct On_connected.png"
+
+static const char *icon_path[WIFI_DIRECT_MAX] = {
+ [WIFI_DIRECT_ACTIVATE] = WIFI_D_ICON_NOT_CONNECTED,
+ [WIFI_DIRECT_CONNECTED] = WIFI_D_ICON_CONNECTED,
+ [WIFI_DIRECT_DISCOVERING] = NULL,
+ [WIFI_DIRECT_GROUP_OWNER] = WIFI_D_ICON_CONNECTED,
+};
+
+static void set_app_state(void* data)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ wifi_direct[i].ad = data;
+ }
+}
+
+static void show_icon(void *data, int index)
+{
+ int i = 0;
+
+ if (index < WIFI_DIRECT_ACTIVATE || index >= WIFI_DIRECT_MAX)
+ index = WIFI_DIRECT_ACTIVATE;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ wifi_direct[i].img_obj.data = icon_path[index];
+ indicator_util_icon_show(&wifi_direct[i]);
+ }
+}
+
+static void hide_icon(void)
+{
+ int i = 0;
+
+ for (i=0 ; i<INDICATOR_WIN_MAX ; i++)
+ {
+ indicator_util_icon_hide(&wifi_direct[i]);
+ }
+}
+
+static void indicator_wifi_direct_change_cb(keynode_t *node, void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_WIFI_DIRECT_STATE, &status);
+
+ if (ret == OK) {
+ INFO("wifi_direct STATUS: %d", status);
+
+ switch (status) {
+ case VCONFKEY_WIFI_DIRECT_ACTIVATED:
+ show_icon(data, WIFI_DIRECT_ACTIVATE);
+ break;
+ case VCONFKEY_WIFI_DIRECT_CONNECTED:
+ show_icon(data, WIFI_DIRECT_CONNECTED);
+ break;
+ case VCONFKEY_WIFI_DIRECT_DISCOVERING:
+ break;
+ case VCONFKEY_WIFI_DIRECT_GROUP_OWNER:
+ show_icon(data, WIFI_DIRECT_GROUP_OWNER);
+ break;
+ default:
+ hide_icon();
+ break;
+ }
+ return;
+ }
+
+ hide_icon();
+ return;
+}
+
+
+static void
+indicator_wifi_direct_transfer_change_cb(keynode_t *node, void *data)
+{
+ int status;
+ int ret;
+
+ retif(data == NULL, , "Invalid parameter!");
+
+ ret = vconf_get_int(VCONFKEY_WIFI_DIRECT_TRANSFER_STATE, &status);
+
+ if (ret == OK) {
+ INFO("wifi_direct transferring STATUS: %d", status);
+ switch (status) {
+ case VCONFKEY_WIFI_DIRECT_TRANSFER_START:
+ if (wifi_direct_transferring != EINA_TRUE) {
+ show_trnsfr_icon(data);
+ wifi_direct_transferring = EINA_TRUE;
+ }
+ break;
+ case VCONFKEY_WIFI_DIRECT_TRANSFER_FAIL:
+ if (wifi_direct_transferring == EINA_TRUE) {
+ hide_trnsfr_icon();
+ wifi_direct_transferring = EINA_FALSE;
+ }
+ break;
+ case VCONFKEY_WIFI_DIRECT_TRANSFER_FINISH:
+ if (wifi_direct_transferring == EINA_TRUE) {
+ hide_trnsfr_icon();
+ wifi_direct_transferring = EINA_FALSE;
+ }
+ break;
+ }
+ }
+}
+
+static int register_wifi_direct_module(void *data)
+{
+ int ret;
+
+ retif(data == NULL, FAIL, "Invalid parameter!");
+
+ set_app_state(data);
+
+ ret = vconf_notify_key_changed(VCONFKEY_WIFI_DIRECT_STATE,
+ indicator_wifi_direct_change_cb, data);
+ if (ret != OK)
+ ERR("Failed to register callback! : %s",
+ VCONFKEY_WIFI_DIRECT_STATE);
+
+ ret = vconf_notify_key_changed(VCONFKEY_WIFI_DIRECT_TRANSFER_STATE,
+ indicator_wifi_direct_transfer_change_cb, data);
+
+ indicator_wifi_direct_change_cb(NULL, data);
+ indicator_wifi_direct_transfer_change_cb(NULL, data);
+
+ return ret;
+}
+
+static int unregister_wifi_direct_module(void)
+{
+ int ret;
+
+ ret = vconf_ignore_key_changed(VCONFKEY_WIFI_DIRECT_STATE,
+ indicator_wifi_direct_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ ret = vconf_ignore_key_changed(VCONFKEY_WIFI_DIRECT_TRANSFER_STATE,
+ indicator_wifi_direct_transfer_change_cb);
+ if (ret != OK)
+ ERR("Failed to unregister callback!");
+
+ if (wifi_direct_transferring == EINA_TRUE) {
+ hide_trnsfr_icon();
+ wifi_direct_transferring = EINA_FALSE;
+ }
+
+ return OK;
+}
--- /dev/null
+<manifest>
+ <define>
+ <domain name="org.tizen.indicator"/>
+ <request>
+ <smack request="system::vconf" type="arwxt"/>
+ <smack request="system::homedir" type="arwxt"/>
+ <smack request="ail::db" type="rw"/>
+ <smack request="notification::db" type="rw"/>
+ <smack request="dbus" type="w"/>
+ </request>
+ </define>
+ <assign>
+ <filesystem path="/usr/share/applications/org.tizen.indicator.desktop" label="_"/>
+ <filesystem path="/etc/init.d/indicator" label="_" exec_label="none"/>
+ <filesystem path="/etc/rc.d/rc5.d/S01indicator" label="_" exec_label="none"/>
+ <filesystem path="/etc/rc.d/rc3.d/S44indicator" label="_" exec_label="none"/>
+ </assign>
+ <request>
+ <domain name="org.tizen.indicator"/>
+ </request>
+</manifest>
\ No newline at end of file
--- /dev/null
+[Unit]
+Description=Start the indicator
+Before=core-efl.target
+After=xorg.target starter.service e17.service
+Requires=starter.service
+
+[Service]
+ExecStart=/usr/apps/org.tizen.indicator/bin/indicator
+
+[Install]
+WantedBy=core-efl.target
+
--- /dev/null
+%define PREFIX /usr/apps/%{name}
+%define RESDIR %{PREFIX}/res
+%define PREFIXRW /opt/apps/%{name}
+
+Name: org.tizen.indicator
+Summary: indicator window
+Version: 0.1.46
+Release: 1
+Group: utils
+License: Flora Software License
+Source0: %{name}-%{version}.tar.gz
+Source101: indicator.service
+
+BuildRequires: pkgconfig(capi-appfw-application)
+BuildRequires: pkgconfig(capi-appfw-app-manager)
+BuildRequires: pkgconfig(capi-system-runtime-info)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(ecore)
+BuildRequires: pkgconfig(ecore-x)
+BuildRequires: pkgconfig(ecore-evas)
+BuildRequires: pkgconfig(edje)
+BuildRequires: pkgconfig(evas)
+BuildRequires: pkgconfig(eina)
+BuildRequires: pkgconfig(heynoti)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(libprivilege-control)
+BuildRequires: pkgconfig(notification)
+BuildRequires: pkgconfig(utilX)
+BuildRequires: pkgconfig(minicontrol-monitor)
+BuildRequires: pkgconfig(icu-io)
+BuildRequires: pkgconfig(feedback)
+
+BuildRequires: cmake
+BuildRequires: edje-tools
+BuildRequires: gettext-tools
+
+Requires(post): /usr/bin/vconftool
+%description
+indicator window.
+
+%prep
+%setup -q
+
+%build
+LDFLAGS+="-Wl,--rpath=%{PREFIX}/lib -Wl,--as-needed";export LDFLAGS
+cmake . -DCMAKE_INSTALL_PREFIX=%{PREFIX} -DCMAKE_INSTALL_PREFIXRW=%{PREFIXRW}
+make %{?jobs:-j%jobs}
+
+%install
+rm -rf %{buildroot}
+%make_install
+
+mkdir -p %{buildroot}/usr/share/license
+cp -f LICENSE.Flora %{buildroot}/usr/share/license/%{name}
+
+mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/rc5.d/
+mkdir -p %{buildroot}/%{_sysconfdir}/rc.d/rc3.d/
+ln -s ../../init.d/indicator %{buildroot}/%{_sysconfdir}/rc.d/rc5.d/S01indicator
+ln -s ../../init.d/indicator %{buildroot}/%{_sysconfdir}/rc.d/rc3.d/S44indicator
+
+install -d %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants
+install -m0644 %{SOURCE101} %{buildroot}%{_libdir}/systemd/user/
+ln -sf ../indicator.service %{buildroot}%{_libdir}/systemd/user/core-efl.target.wants/indicator.service
+
+%clean
+rm -rf %{buildroot}
+
+%post
+vconftool set -t int memory/radio/state 0 -i -g 6518
+vconftool set -t int memory/music/state 0 -i -g 6518
+vconftool set -t int memory/private/%{name}/home_pressed 0 -i -g 6518
+vconftool set -t bool memory/private/%{name}/started 0 -i -u 5000
+
+%postun -p /sbin/ldconfig
+
+%files
+%manifest org.tizen.indicator.manifest
+%defattr(-,root,root,-)
+%{PREFIX}/bin/*
+%{RESDIR}/locale/*
+%{RESDIR}/icons/*
+%{RESDIR}/edje/*
+/usr/share/packages/%{name}.xml
+%attr(775,app,app) %{PREFIXRW}/data
+%attr(755,-,-) %{_sysconfdir}/init.d/indicator
+%{_sysconfdir}/rc.d/rc5.d/S01indicator
+%{_sysconfdir}/rc.d/rc3.d/S44indicator
+%{_libdir}/systemd/user/core-efl.target.wants/indicator.service
+%{_libdir}/systemd/user/indicator.service
+/usr/share/license/%{name}
+
--- /dev/null
+# for i18n
+
+SET(POFILES et.po is.po hy.po hu.po hr.po hi.po nb.po ga.po fr_FR.po fr_CA.po fi.po
+eu.po it_IT.po es_MX.po es_ES.po en_US.po en_PH.po en.po el_GR.po de_DE.po da.po
+ca.po bg.po az.po ar.po ja_JP.po zh_TW.po zh_SG.po zh_HK.po zh_CN.po uz.po cs.po
+uk.po tr_TR.po sv.po sr.po sl.po sk.po ru_RU.po ka.po pt_PT.po pt_BR.po pl.po
+nl_NL.po gl.po mk.po lv.po lt.po ko_KR.po kk.po ro.po)
+
+SET(MSGFMT "/usr/bin/msgfmt")
+
+FOREACH(pofile ${POFILES})
+ SET(pofile ${CMAKE_CURRENT_SOURCE_DIR}/${pofile})
+ MESSAGE("PO: ${pofile}")
+ GET_FILENAME_COMPONENT(absPofile ${pofile} ABSOLUTE)
+ GET_FILENAME_COMPONENT(lang ${absPofile} NAME_WE)
+ SET(moFile ${CMAKE_CURRENT_BINARY_DIR}/${lang}.mo)
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${moFile}
+ COMMAND ${MSGFMT} -o ${moFile} ${absPofile}
+ DEPENDS ${absPofile}
+ )
+ INSTALL(FILES ${moFile}
+ DESTINATION ${LOCALEDIR}/${lang}/LC_MESSAGES RENAME ${PROJECT_NAME}.mo)
+ SET(moFiles ${moFiles} ${moFile})
+ENDFOREACH(pofile)
+
+MESSAGE(".mo files: ${moFiles}")
+ADD_CUSTOM_TARGET(po ALL DEPENDS ${moFiles})
--- /dev/null
+# List of source files containing translatable strings.
+modules/clock/clock.c
+modules/network/rssi.c
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "ص"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "م"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "do"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "od"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "ΠΜ"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "ΜΜ"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "EL"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PL"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AP"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "IP"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "RN"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "IN"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "de"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "du"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "fh"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "eh"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "ТД"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "TK"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "오전"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "오후"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "am"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "pm"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "dp"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "pp"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "do"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "po"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "FM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "EM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+#!/bin/sh
+
+PACKAGE=indicator
+SRCROOT=..
+POTFILES=POTFILES.in
+
+#ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW
+ALL_LINGUAS="en_US en_GB ja ko zh_CN"
+
+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 \
+&& test ! -f ${PACKAGE}.po \
+ || (rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot)
+
+if [ $? -ne 0 ]; then
+ echo "error"
+ exit 1
+else
+ echo "done"
+fi
+
+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
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "AM"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "PM"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "上午"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "下午"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "上午"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "下午"
+
--- /dev/null
+msgid "IDS_IDLE_OPT_AM_ABB"
+msgstr "上午"
+
+msgid "IDS_IDLE_OPT_PM_ABB"
+msgstr "下午"
+
--- /dev/null
+/*
+ * 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 <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <time.h>
+
+#ifndef LOGFILE
+#define LOGFILE DATADIR"/indicator.log"
+#endif
+
+#define MAXSIZE (1 << 17)
+
+static char buf[512];
+
+void debug_printf(const char *msg, ...)
+{
+ int fd;
+ va_list arg_list;
+ int len;
+ struct tm timeDate = { 0, };
+ time_t ctime;
+ int status;
+ struct stat buffer;
+
+ ctime = time(NULL);
+
+ if (localtime_r(&ctime, &timeDate)) {
+ snprintf(buf, 63, "[%04d/%02d/%02d %02d:%02d:%02d] ",
+ timeDate.tm_year + 1900, timeDate.tm_mon + 1,
+ timeDate.tm_mday, timeDate.tm_hour, timeDate.tm_min,
+ timeDate.tm_sec);
+ }
+
+ len = strlen(buf);
+
+ va_start(arg_list, msg);
+
+ fd = open(LOGFILE, O_WRONLY | O_CREAT | O_APPEND,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+ if (fd == -1) {
+ fprintf(stderr, msg, arg_list);
+ goto __CATCH;
+ }
+ status = fstat(fd, &buffer);
+
+ if (!status && (buffer.st_size > MAXSIZE)) {
+ ftruncate(fd, 0);
+ }
+
+ if (len < 0) {
+ goto __CATCH;
+ }
+
+ len += vsnprintf(&buf[len], sizeof(buf), msg, arg_list);
+
+ write(fd, buf, strlen(buf));
+
+__CATCH:
+ if(fd != -1)
+ {
+ close(fd);
+ }
+ va_end(arg_list);
+}
--- /dev/null
+/*
+ * 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 __INDICATOR_DEBUG_UTIL_H_
+#define __INDICATOR_DEBUG_UTIL_H_
+
+extern void debug_printf(const char *msg, ...);
+
+#endif
--- /dev/null
+/*
+ * 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 <stdio.h>
+#include <stdlib.h>
+
+#include "common.h"
+#include "indicator_icon_util.h"
+#include "indicator_icon_list.h"
+#include "indicator_ui.h"
+#include "indicator_test_util.h"
+
+int print_indicator_icon_object(Indicator_Icon_Object *obj)
+{
+#ifdef DEBUG_MODE
+ retif(cond, ret, str, args...)(obj == NULL, FAIL, "Invalid parameter!");
+
+ INFO(str, args...)(%s : priority(%d) obj(%x), obj->name, obj->priority,
+ (unsigned int)obj->obj);
+#endif
+ return OK;
+}
+
+int print_indicator_icon_list(Eina_List *list)
+{
+#ifdef DEBUG_MODE
+ Eina_List *l;
+ void *data;
+
+ retif(list == NULL, FAIL, "Invalid parameter!");
+
+ INFO("*******Indicator_Icon List(%x) *******", (unsigned int)list);
+ EINA_LIST_FOREACH(list, l, data) {
+ if (data) {
+ print_indicator_icon_object(data);
+ }
+ }
+#endif
+ return OK;
+}
--- /dev/null
+/*
+ * 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 __INDICATOR_TEST_UTIL_H__
+#define __INDICATOR_TEST_UTIL_H__
+
+extern int print_indicator_icon_object(Indicator_Icon_Object *obj);
+extern int print_indicator_icon_list(Eina_List *list);
+
+#endif