bundle
feedback
notification
+ tzsh-volume-service
)
FOREACH(flag ${pkgs_CFLAGS})
-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
-Copyright (c) 2009-2014 Samsung Electronics Co., Ltd All Rights Reserved
+Copyright (c) 2009-2015 Samsung Electronics Co., Ltd All Rights Reserved
/*
- * 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.
/*
- * 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.
#include <Elementary.h>
-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__ */
/*
- * 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.
/*
- * 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.
/*
- * 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.
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();
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);
/*
- * 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.
#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__ */
/*
- * 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.
#include <sound_manager.h>
//#include <syspopup.h>
#include <appcore-efl.h>
-//#include <Ecore_X.h>
#include <notification.h>
#include <syspopup_caller.h>
/*
- * 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.
#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__ */
/*
- * 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.
/*
- * 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.
* 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__ */
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.volume" version="0.1.148" install-location="internal-only" api-version="2.3.1">
<label>Volume</label>
- <author email="hhh.kwon@samsung.com" href="www.samsung.com">Hong Kwon</author>
+ <author email="junkyu.han@samsung.com" href="www.samsung.com">junkyu Han</author>
<description>Volume Application</description>
<ui-application appid="org.tizen.volume" exec="/usr/apps/org.tizen.volume/bin/volume" nodisplay="true" multiple="false" type="capp" taskmanage="false">
<icon>org.tizen.volume.png</icon>
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
/*
- * 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.
#include <feedback.h>
#include <bluetooth.h>
#include <bluetooth_internal.h>
-#include <bluetooth_extention.h>
+#include <bluetooth_extension.h>
#include "main.h"
#include "_util_log.h"
#include <app_manager.h>
#include <bluetooth.h>
#include <bluetooth_internal.h>
-#include <app.h>
-#include <bluetooth_extention.h>
+#include <bluetooth_extension.h>
#include "main.h"
#include "_util_efl.h"
#include "timer.h"
#include "key_event.h"
#include "bt.h"
+#include "tzsh_volume_service.h"
#define VCONF_KEY_FMRADIO_RECORDING "memory/private/Sound/FMRadioRecording"
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;
}
break;
}
+
+ volume_service_region_set(obj, control_info.is_warning_visible);
}
}
/*
- * 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.
#include <feedback.h>
#include <bluetooth.h>
#include <bluetooth_internal.h>
-#include <bluetooth_extention.h>
-#include <app.h>
+#include <bluetooth_extension.h>
#include "main.h"
#include "_util_log.h"
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)
}
}
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);
/*
- * 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.
#include <feedback.h>
#include <vconf.h>
#include <app_control_internal.h>
-#include <app_preference.h>
-#include <Elementary.h>
-#include <appcore-efl.h>
-#include <app.h>
#include "main.h"
#include "_util_log.h"
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[])
/*
- * 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.
/*
- * 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.
/*
- * 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.
#include <feedback.h>
#include <vconf.h>
#include <vconf-keys.h>
-#include <app.h>
#include "main.h"
#include "_util_efl.h"
#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;
};
static struct _view_s_info view_info = {
.win = NULL,
+ .tzsh = NULL,
+ .volume_service = NULL,
.evas = NULL,
.ly_outer = NULL,
.icon_volume = NULL,
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;
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");
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);
ecore_timer_add(1.0f, _key_grab_cb, win);
evas_object_show(win);
+ _connect_to_wm(win);
+
return win;
}