From: junkyu Han Date: Thu, 27 Aug 2015 02:10:45 +0000 (+0900) Subject: Add Tizen-ws-shell X-Git-Tag: submit/tizen_mobile/20150903.050126~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b05286af49e858d85776dbdba8cd88ded674dbba;p=apps%2Fnative%2Fvolume-app.git Add Tizen-ws-shell Change-Id: Ifa150c18abd8c85538f7dafc7391c1e3164d704f --- diff --git a/CMakeLists.txt b/CMakeLists.txt index ac99d3e..23bbc4a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -46,6 +46,7 @@ pkg_check_modules(pkgs REQUIRED bundle feedback notification + tzsh-volume-service ) FOREACH(flag ${pkgs_CFLAGS}) diff --git a/LICENSE b/LICENSE index 3d4a47d..54b213e 100755 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved +Copyright (c) 2000 - 2015 Samsung Electronics Co., Ltd. All rights reserved. Apache License Version 2.0, January 2004 diff --git a/NOTICE b/NOTICE index 717d8cf..887a3bd 100644 --- a/NOTICE +++ b/NOTICE @@ -1,2 +1,2 @@ -Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved +Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved diff --git a/data/volume_app.edc b/data/volume_app.edc index 1923963..7ff90c7 100755 --- a/data/volume_app.edc +++ b/data/volume_app.edc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/_util_efl.h b/include/_util_efl.h index c64148f..47b5ca9 100755 --- a/include/_util_efl.h +++ b/include/_util_efl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,12 +20,12 @@ #include -Ecore_X_Window _add_input_window(void); -Evas_Object *add_volume_window(const char *name); -Evas_Object *add_slider(Evas_Object *parent, int min, int max, int val); -Evas_Object *add_layout(Evas_Object *parent, const char *file, const char *group); -Evas_Object *add_button(Evas_Object *parent, const char *style, const char *text); -Evas_Object *add_popup(Evas_Object *parent, const char *style); -Evas_Object *add_label(Evas_Object *parent, const char *text); +extern Ecore_X_Window _add_input_window(void); +extern Evas_Object *add_volume_window(const char *name); +extern Evas_Object *add_slider(Evas_Object *parent, int min, int max, int val); +extern Evas_Object *add_layout(Evas_Object *parent, const char *file, const char *group); +extern Evas_Object *add_button(Evas_Object *parent, const char *style, const char *text); +extern Evas_Object *add_popup(Evas_Object *parent, const char *style); +extern Evas_Object *add_label(Evas_Object *parent, const char *text); #endif /* __VOLUME_UTIL_EFL_H__ */ diff --git a/include/_util_log.h b/include/_util_log.h index 43703a9..00876bd 100755 --- a/include/_util_log.h +++ b/include/_util_log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/bt.h b/include/bt.h index ee04efc..c873d14 100644 --- a/include/bt.h +++ b/include/bt.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/control.h b/include/control.h index def1e63..3c7fee8 100755 --- a/include/control.h +++ b/include/control.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,9 +31,6 @@ enum{ LOCK_AND_MEDIA, }; -extern void volume_control_check_syspopup(); -extern int volume_register_shape_timer(); -extern void volume_control_check_once(void); extern int volume_control_get_viewport_height(); extern int volume_control_get_viewport_width(); extern void volume_control_show_hide_worning(); @@ -48,7 +45,6 @@ extern sound_type_e volume_control_get_sound_type_at_show(void); extern volume_error_e volume_control_cache_flush(void); extern volume_error_e volume_control_app_launch_with_bundle(const char *op_type, const char *operation, const char *pkgname); -extern volume_error_e volume_control_mode_syspopup_launch(void); extern int volume_control_get_vconf_idlelock(void); extern int volume_control_check_status(int *lock, sound_type_e *sound_type); diff --git a/include/key_event.h b/include/key_event.h index 2666833..b43e6d6 100755 --- a/include/key_event.h +++ b/include/key_event.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,21 +24,21 @@ #define KEY_BACK "XF86Back" #define KEY_CANCEL "Cancel" -Ecore_X_Window volume_key_event_input_window_get(void); -Ecore_Event_Handler *volume_key_event_handler_volume_up_get(void); -Ecore_Event_Handler *volume_key_event_handler_volume_down_get(void); -Ecore_Event_Handler *volume_key_event_handler_qp_state_check(void); -Eina_Bool volume_key_event_is_pressing_get(void); -int volume_key_event_count_grabed_get(void); -void volume_key_event_count_grabed_set(int val); +extern Ecore_X_Window volume_key_event_input_window_get(void); +extern Ecore_Event_Handler *volume_key_event_handler_volume_up_get(void); +extern Ecore_Event_Handler *volume_key_event_handler_volume_down_get(void); +extern Ecore_Event_Handler *volume_key_event_handler_qp_state_check(void); +extern Eina_Bool volume_key_event_is_pressing_get(void); +extern int volume_key_event_count_grabed_get(void); +extern void volume_key_event_count_grabed_set(int val); -sound_type_e volume_key_event_sound_type_at_key_pressed_get(void); +extern sound_type_e volume_key_event_sound_type_at_key_pressed_get(void); -int volume_key_event_key_grab(Ecore_X_Window _xwin, int grab_mode); -volume_error_e volume_key_event_key_ungrab(void); +extern int volume_key_event_key_grab(Ecore_X_Window _xwin, int grab_mode); +extern volume_error_e volume_key_event_key_ungrab(void); -void volume_key_event_handler_add(void); -void volume_key_event_handler_del(void); -volume_error_e volume_key_event_input_window_create(void); +extern void volume_key_event_handler_add(void); +extern void volume_key_event_handler_del(void); +extern volume_error_e volume_key_event_input_window_create(void); #endif /* __VOLUME_KEY_EVENT_H__ */ diff --git a/include/main.h b/include/main.h index 3d94db9..cb8dc7d 100755 --- a/include/main.h +++ b/include/main.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,7 +22,6 @@ #include //#include #include -//#include #include #include diff --git a/include/sound.h b/include/sound.h index 6e8c54b..a511818 100755 --- a/include/sound.h +++ b/include/sound.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,32 +18,30 @@ #ifndef __VOLUME_SOUND_H__ #define __VOLUME_SOUND_H__ -int volume_sound_sound_status_get(void); -int volume_sound_vibration_status_get(void); -int volume_sound_step_get(void); -Eina_Bool volume_sound_is_vibration_get(void); -void volume_sound_is_vibration_set(Eina_Bool val); +extern int volume_sound_sound_status_get(void); +extern int volume_sound_vibration_status_get(void); +extern int volume_sound_step_get(void); +extern Eina_Bool volume_sound_is_vibration_get(void); +extern void volume_sound_is_vibration_set(Eina_Bool val); -void volume_sound_mm_sound_init(void); -//int _get_volume_type_max(void); -int volume_sound_slider_value_set(void *data, int val); -volume_error_e volume_sound_level_get(sound_type_e type); -//sound_route_e volume_sound_sound_manager_device_get(void); -int volume_sound_sound_manager_step_get(sound_type_e type); -int volume_sound_sound_manager_volume_get(sound_type_e type); -sound_type_e volume_sound_sound_manager_type_get(void); -void volume_sound_feedback_play(int feedback_type, int pattern); -void volume_sound_vib_play(void); -void volume_sound_play(void); -int volume_sound_icon_set(void *data, int val); -int volume_sound_level_set(sound_type_e type, int val); -void volume_sound_setting_sound_play(void); -void volume_sound_change_set(int val); +extern void volume_sound_mm_sound_init(void); +extern int volume_sound_slider_value_set(void *data, int val); +extern volume_error_e volume_sound_level_get(sound_type_e type); +extern int volume_sound_sound_manager_step_get(sound_type_e type); +extern int volume_sound_sound_manager_volume_get(sound_type_e type); +extern sound_type_e volume_sound_sound_manager_type_get(void); +extern void volume_sound_feedback_play(int feedback_type, int pattern); +extern void volume_sound_vib_play(void); +extern void volume_sound_play(void); +extern int volume_sound_icon_set(void *data, int val); +extern int volume_sound_level_set(sound_type_e type, int val); +extern void volume_sound_setting_sound_play(void); +extern void volume_sound_change_set(int val); -void volume_sound_vconf_status_set(volume_vconf_type_e type, int val); -int volume_sound_vconf_status_get(volume_vconf_type_e type); -void volume_sound_vconfkey_register(void); -void volume_sound_vconfkey_unregister(void); +extern void volume_sound_vconf_status_set(volume_vconf_type_e type, int val); +extern int volume_sound_vconf_status_get(volume_vconf_type_e type); +extern void volume_sound_vconfkey_register(void); +extern void volume_sound_vconfkey_unregister(void); #endif /* __VOLUME_SOUND_H__ */ diff --git a/include/timer.h b/include/timer.h index cb5780b..8e62ca7 100755 --- a/include/timer.h +++ b/include/timer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/include/view.h b/include/view.h index 5444849..07b2f82 100755 --- a/include/view.h +++ b/include/view.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -14,33 +14,36 @@ * limitations under the License. */ +#include "tzsh_volume_service.h" #ifndef __VOLUME_VIEW_H__ #define __VOLUME_VIEW_H__ -Evas_Object *volume_view_win_get(void); -Evas_Object *volume_view_evas_get(void); -Evas_Object *volume_view_outer_layout_get(void); -Evas_Object *volume_view_icon_volume_get(void); -Evas_Object *volume_view_icon_setting_get(void); -Evas_Object *volume_view_slider_get(void); -Eina_Bool volume_view_is_registered_callback_get(void); -Eina_Bool volume_view_is_slider_touching_get(void); -void volume_view_is_registered_callback_set(Eina_Bool val); -int volume_mute_toggle_set(void); - -volume_error_e volume_view_slider_value_set(int val); -void volume_view_volume_icon_set(sound_type_e sound_type, int sound, int vibration, bool bt_opened); -void volume_view_setting_icon_set(const char *file); -void volume_view_setting_icon_callback_del(void); - -volume_error_e volume_view_window_show(void); -volume_error_e volume_view_window_hide(void); - -volume_error_e volume_view_layout_create(Evas_Object *win); -Evas_Object *volume_view_window_create(void); - -Evas_Object* show_lockscreen_splash(const char *bg_path); -volume_error_e hide_lockscreen_splash(void); +extern Evas_Object *volume_view_win_get(void); +extern tzsh_h volume_view_tzsh_get(void); +extern tzsh_volume_service_h volume_view_service_get(void); +extern Evas_Object *volume_view_evas_get(void); +extern Evas_Object *volume_view_outer_layout_get(void); +extern Evas_Object *volume_view_icon_volume_get(void); +extern Evas_Object *volume_view_icon_setting_get(void); +extern Evas_Object *volume_view_slider_get(void); +extern Eina_Bool volume_view_is_registered_callback_get(void); +extern Eina_Bool volume_view_is_slider_touching_get(void); +extern void volume_view_is_registered_callback_set(Eina_Bool val); +extern int volume_mute_toggle_set(void); + +extern volume_error_e volume_view_slider_value_set(int val); +extern void volume_view_volume_icon_set(sound_type_e sound_type, int sound, int vibration, bool bt_opened); +extern void volume_view_setting_icon_set(const char *file); +extern void volume_view_setting_icon_callback_del(void); + +extern volume_error_e volume_view_window_show(void); +extern volume_error_e volume_view_window_hide(void); + +extern volume_error_e volume_view_layout_create(Evas_Object *win); +extern Evas_Object *volume_view_window_create(void); + +extern Evas_Object* show_lockscreen_splash(const char *bg_path); +extern volume_error_e hide_lockscreen_splash(void); #endif /* __VOLUME_VIEW_H__ */ diff --git a/org.tizen.volume.xml b/org.tizen.volume.xml index 8634727..dc83005 100755 --- a/org.tizen.volume.xml +++ b/org.tizen.volume.xml @@ -1,7 +1,7 @@ - Hong Kwon + junkyu Han Volume Application org.tizen.volume.png diff --git a/packaging/org.tizen.volume.spec b/packaging/org.tizen.volume.spec index 7e6ca30..fe058e7 100755 --- a/packaging/org.tizen.volume.spec +++ b/packaging/org.tizen.volume.spec @@ -8,29 +8,24 @@ ExcludeArch: %{arm} %ix86 x86_64 ExcludeArch: %{arm} %ix86 x86_64 %endif -Name: org.tizen.volume +Name: org.tizen.volume Summary: Volume application (EFL) Version: 0.1.148 Release: 1 -Group: TO_BE/FILLED_IN -License: Apache +Group: Applications/Core Applications +License: Apache-2.0 Source0: %{name}-%{version}.tar.gz BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: pkgconfig(capi-appfw-app-manager) BuildRequires: pkgconfig(appcore-efl) BuildRequires: pkgconfig(elementary) -#BuildRequires: pkgconfig(utilX) BuildRequires: pkgconfig(capi-media-sound-manager) BuildRequires: pkgconfig(syspopup) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(notification) BuildRequires: pkgconfig(feedback) -BuildRequires: pkgconfig(syspopup-caller) -#BuildRequires: pkgconfig(x11) -#BuildRequires: pkgconfig(xcomposite) -#BuildRequires: pkgconfig(xext) -#BuildRequires: pkgconfig(xi) BuildRequires: pkgconfig(capi-network-bluetooth) +BuildRequires: pkgconfig(tzsh-volume-service) BuildRequires: cmake BuildRequires: edje-bin diff --git a/src/bt.c b/src/bt.c index 56bf225..4bf22b9 100644 --- a/src/bt.c +++ b/src/bt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "main.h" #include "_util_log.h" diff --git a/src/control.c b/src/control.c index acbdb10..b7c94d0 100755 --- a/src/control.c +++ b/src/control.c @@ -19,8 +19,7 @@ #include #include #include -#include -#include +#include #include "main.h" #include "_util_efl.h" @@ -31,6 +30,7 @@ #include "timer.h" #include "key_event.h" #include "bt.h" +#include "tzsh_volume_service.h" #define VCONF_KEY_FMRADIO_RECORDING "memory/private/Sound/FMRadioRecording" @@ -571,6 +571,70 @@ void volume_control_deinitialize(void) bt_deinit_sco(); } +void volume_service_region_set(Evas_Object *win, Eina_Bool is_warning_visible) +{ + _D("X input event shape"); + Evas_Object *ly = NULL; + tzsh_h tzsh = NULL; + tzsh_volume_service_h volume_service = NULL; + tzsh_region_h rect = NULL; + int ret = 0; + + int x, y, w ,h; + int tmp_x; + int tmp_y; + int tmp_w; + int tmp_h; + + tzsh = volume_view_tzsh_get(); + ret_if(!tzsh); + volume_service = volume_view_service_get(); + ret_if(!volume_service); + + int current_angle = volume_control_get_current_angle(); + _D("Current angle : %d", current_angle); + + ly = volume_view_outer_layout_get(); + if (!ly) { + _E("Failed to load edje"); + return; + } + + edje_object_part_geometry_get(_EDJ(ly), "bg", &x, &y, &w, &h); + _D("The position of bg x: %d, y: %d, w: %d, h: %d", x, y, w, h); + + if (current_angle == 90) { + tmp_x = x; + tmp_y = y; + tmp_w = w; + tmp_h = h; + + x = tmp_y; + y = tmp_x; + w = tmp_h; + h = tmp_w; + } + else if (current_angle == 270) { + tmp_x = x; + tmp_y = y; + tmp_w = w; + tmp_h = h; + + x = volume_control_get_viewport_width()-tmp_y-tmp_h; + y = tmp_x; + w = tmp_h; + h = tmp_w; + } + + rect = tzsh_region_create(tzsh); + ret_if(!rect); + tzsh_region_add(rect, x, y, h, w); + _D("shape x: %d, y: %d, w: %d, h: %d", x, y, w, h); + ret = tzsh_volume_service_content_region_set(volume_service, current_angle, rect); + _D("The result of volume region set is : %d", ret); + tzsh_region_destroy(rect); +} + static void _rotate_changed_cb(void *data, Evas_Object *obj, void *event_info) { static int current_angle = -1; @@ -603,6 +667,8 @@ static void _rotate_changed_cb(void *data, Evas_Object *obj, void *event_info) } break; } + + volume_service_region_set(obj, control_info.is_warning_visible); } } diff --git a/src/key_event.c b/src/key_event.c index c57dd26..4d0b8b9 100755 --- a/src/key_event.c +++ b/src/key_event.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,8 +20,7 @@ #include #include #include -#include -#include +#include #include "main.h" #include "_util_log.h" @@ -88,11 +87,6 @@ Eina_Bool volume_key_event_is_pressing_get(void) return key_event_info.is_pressing; } -int volume_key_event_count_grabed_get(void) -{ - return key_event_info.count_grabed; -} - void volume_key_event_handler_add(void) { if(!key_event_info.handler_volume_up) @@ -253,7 +247,7 @@ static volume_error_e _volume_up_key_press(sound_type_e sound_type, int sound, b } } else { - if (sound_level != sound_step ) { + if (sound_level != sound_step) { volume_sound_level_set(sound_type, sound_level+1); volume_view_slider_value_set(sound_level+1); _D("new sound value: %d", sound_level+1); diff --git a/src/main.c b/src/main.c index 588e3cf..fdd3dcb 100755 --- a/src/main.c +++ b/src/main.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,10 +17,6 @@ #include #include #include -#include -#include -#include -#include #include "main.h" #include "_util_log.h" @@ -33,7 +29,6 @@ static void _terminate_app(void *user_data); static void _pause_app(void *user_data); static void _resume_app(void *user_data); static void _control_app(app_control_h service, void *user_data); -static void _control_app(app_control_h service, void *user_data); static void _changed_language(app_event_info_h event_info, void *user_data); int main(int argc, char *argv[]) diff --git a/src/sound.c b/src/sound.c index 2dd4860..47e3a33 100755 --- a/src/sound.c +++ b/src/sound.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/timer.c b/src/timer.c index 466f3c7..c8bd61c 100755 --- a/src/timer.c +++ b/src/timer.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/view.c b/src/view.c index df279d3..b307899 100755 --- a/src/view.c +++ b/src/view.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved + * Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -18,7 +18,6 @@ #include #include #include -#include #include "main.h" #include "_util_efl.h" @@ -28,9 +27,12 @@ #include "timer.h" #include "key_event.h" #include "sound.h" +#include "tzsh_volume_service.h" struct _view_s_info { Evas_Object *win; + tzsh_h tzsh; + tzsh_volume_service_h volume_service; Evas_Object *evas; Evas_Object *ly_outer; Evas_Object *icon_volume; @@ -47,6 +49,8 @@ struct _view_s_info { }; static struct _view_s_info view_info = { .win = NULL, + .tzsh = NULL, + .volume_service = NULL, .evas = NULL, .ly_outer = NULL, .icon_volume = NULL, @@ -78,6 +82,16 @@ Evas_Object* volume_view_win_get(void) return view_info.win; } +tzsh_h volume_view_tzsh_get(void) +{ + return view_info.tzsh; +} + +tzsh_volume_service_h volume_view_service_get(void) +{ + return view_info.volume_service; +} + Evas_Object* volume_view_evas_get(void) { return view_info.evas; @@ -333,6 +347,28 @@ Evas_Object *add_layout(Evas_Object *parent, const char *file, const char *group return eo; } +void _connect_to_wm(Evas_Object *win) +{ + _D("Mack connection with window manager"); + + tzsh_window tz_win; + + view_info.tzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL); + if (!view_info.tzsh) { + _E("Failed to get connection to Tizen window manager"); + } + + tz_win = elm_win_window_id_get(win); + if (!tz_win) { + _E("Failed to get Tizen window manager"); + } + + view_info.volume_service = tzsh_volume_service_create(view_info.tzsh, tz_win); + if (!view_info.volume_service) { + _E("Failed to get volume service"); + } +} + volume_error_e volume_view_layout_create(Evas_Object *win) { LOGD("Layout create"); @@ -382,6 +418,7 @@ Evas_Object *add_volume_window(const char *name) elm_win_title_set(eo, name); elm_win_borderless_set(eo, EINA_TRUE); ecore_evas_name_class_set(ecore_evas_ecore_evas_get(evas), "SYSTEM_POPUP", "SYSTEM_POPUP"); + elm_win_prop_focus_skip_set(eo, EINA_TRUE); elm_win_role_set(eo, "no-dim"); elm_win_screen_size_get(eo, &x, &y, &w, &h); @@ -417,6 +454,8 @@ Evas_Object *volume_view_window_create(void) ecore_timer_add(1.0f, _key_grab_cb, win); evas_object_show(win); + _connect_to_wm(win); + return win; }