svi
glib-2.0
ui-gadget-1
+ notification
)
FOREACH(flag ${pkgs_CFLAGS})
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+
+#define RESOURCE_IMAGE( FILE_NAME ) \
+ group { \
+ name : FILE_NAME; \
+ images.image: FILE_NAME COMP; \
+ parts { \
+ part { name: "image"; \
+ description { \
+ state : "default" 0.0; \
+ image.normal : FILE_NAME; \
+ aspect : 1 1; \
+ aspect_preference : BOTH; \
+ } \
+ } \
+ } \
+ }
+
+
collections {
+RESOURCE_IMAGE("00_volume_icon.png");
+RESOURCE_IMAGE("00_volume_icon_Call.png");
+RESOURCE_IMAGE("00_volume_icon_Mute.png");
+RESOURCE_IMAGE("00_volume_icon_Vibrat.png");
+RESOURCE_IMAGE("00_volume_icon_headphone.png");
+RESOURCE_IMAGE("00_volume_icon_media.png");
+
#define SLIDER_INDICATOR_TEXT_COLOR_INC 42 109 140 255
#define SLIDER_UNITS_TEXT_COLOR_INC 100 100 100 255
#define SLIDER_UNITS_TEXT_SIZE_INC 30
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(svi)
BuildRequires: pkgconfig(ui-gadget-1)
+BuildRequires: pkgconfig(notification)
BuildRequires: cmake
BuildRequires: edje-bin
/*
* 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://www.tizenopensource.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.
struct appdata *ad = (struct appdata *)priv;
retm_if(ug == NULL, "Invalid argument: ug is NULL\n");
- ug_destroy(ug);
+ /* ug_destroy 0 : success, -1 : fail */
+ _D("%d\n", ug_destroy(ug));
ad->ug = NULL;
ecore_x_netwm_window_type_set(elm_win_xwindow_get(ad->win), ECORE_X_WINDOW_TYPE_NOTIFICATION);
utilx_set_window_opaque_state(ecore_x_display_get(), elm_win_xwindow_get(ad->win), UTILX_OPAQUE_STATE_OFF);
+
_close_volume(ad);
+ elm_exit();
}
ui_gadget_h create_button_ug(void *data)
retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
retvm_if(ad->win == NULL, -1, "Invalid argument: window is NULL\n");
- UG_INIT_EFL(ad->win, UG_OPT_INDICATOR_ENABLE);
- elm_win_indicator_mode_set(ad->win, ELM_WIN_INDICATOR_SHOW);
+ UG_INIT_EFL(ad->win, UG_OPT_INDICATOR_PORTRAIT_ONLY);
ug = create_button_ug(ad);
+ _ungrab_key(ad);
retvm_if(ug == NULL, -1, "Failed to Create ug!\n");
return 0;
}
-
/*
* 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://www.tizenopensource.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.
-/*
+/* test
* Copyright 2012 Samsung Electronics Co., Ltd
*
* Licensed under the Flora License, Version 1.0 (the License);
#include <X11/Xatom.h>
#include <X11/Xutil.h>
+#include"_logic.h"
#include "volume.h"
#include "_util_log.h"
#include "_util_efl.h"
IDLELOCK_MAX,
};
-void _ungrab_key(struct appdata *ad);
-
int _close_volume(void *data)
{
struct appdata *ad = (struct appdata *)data;
static Eina_Bool _key_press_cb(void *data, int type, void *event)
{
_D("%s\n", __func__);
- int val=0, snd=0;
+ int val=0, snd=0, vib=0;
Ecore_Event_Key *ev = event;
struct appdata *ad = (struct appdata *)data;
return ECORE_CALLBACK_CANCEL;
}
- vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &snd);
-
ad->flag_pressing = EINA_TRUE;
DEL_TIMER(ad->ptimer)
+ vconf_get_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &snd);
+ vconf_get_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, &vib);
+
+ /* If sound is set off, only RINGTONE, MEDIA types are able to change. */
+ if(!snd && ad->type != VOLUME_TYPE_MEDIA && ad->type != VOLUME_TYPE_RINGTONE){
+ if(vib)_play_vib(ad->sh);
+ return ECORE_CALLBACK_CANCEL;
+ }
if (!strcmp(ev->keyname, KEY_VOLUMEUP)) {
_get_sound_level(ad->type, &val);
if (val == ad->step) {
_set_sound_level(ad->type, ad->step);
- _play_sound(ad->type, ad->sh);
+ if(snd)_play_sound(ad->type, ad->sh);
return ECORE_CALLBACK_CANCEL;
}
- if(!snd){
- _D("mute and volume up key pressed\n");
- vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, EINA_TRUE);
- }
_set_sound_level(ad->type, val + 1);
- _play_sound(ad->type, ad->sh);
+ if(snd)_play_sound(ad->type, ad->sh);
DEL_TIMER(ad->sutimer)
ADD_TIMER(ad->sutimer, 0.5, _su_timer_cb, ad)
_D("set volume %d -> [%d]\n", val, val+1);
} else if (!strcmp(ev->keyname, KEY_VOLUMEDOWN)) {
- if(!snd){
- /* Do nothing */
- return ECORE_CALLBACK_CANCEL;
- }
_get_sound_level(ad->type, &val);
if (val == 0) {
- _play_vib(ad->sh);
+ if(vib)_play_vib(ad->sh);
return ECORE_CALLBACK_CANCEL;
}
_set_sound_level(ad->type, val - 1);
- _play_sound(ad->type, ad->sh);
+ if(snd)_play_sound(ad->type, ad->sh);
DEL_TIMER(ad->sdtimer)
ADD_TIMER(ad->sdtimer, 0.5, _sd_timer_cb, ad)
break;
case MM_ERROR_SOUND_VOLUME_NO_INSTANCE:
case MM_ERROR_SOUND_VOLUME_CAPTURE_ONLY:
- type = VOLUME_TYPE_SYSTEM;
+ type = VOLUME_TYPE_RINGTONE;
break;
default:
- fprintf(stderr, "Failed to get sound type(errno:%x)\n", ret);
+ _D("Failed to get sound type(errno:%x)\n", ret);
return -1;
}
return type;
static void _block_clicked_cb(void *data, Evas_Object *o, const char *emission, const char *source)
{
- _D("%s\n", __func__);
_close_volume(data);
}
void _init_press_timers(void *data)
{
struct appdata *ad = (struct appdata *)data;
- retvm_if(ad == NULL, ECORE_CALLBACK_CANCEL, "Invalid argument: appdata is NULL\n");
+ retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
DEL_TIMER(ad->sdtimer)
DEL_TIMER(ad->ldtimer)
DEL_TIMER(ad->ldwarmtimer)
bval = bundle_get_val(b, "LONG_PRESS");
if (bval) {
_D("val(%s)\n", bval);
- Ecore_X_Display* disp = ecore_x_display_get();
if (!strncmp(bval, "VOLUME_UP", strlen("LONG_PRESS"))) {
_D("volume up long press\n");
return 0;
}
-static void _button_mouse_down_cb(void *data, Evas_Object *obj, void *event_info)
+static void _button_mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
{
_D("%s\n", __func__);
struct appdata *ad = (struct appdata *)data;
retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
char buf[PATHBUF_SIZE] = {0, };
- snprintf(buf, sizeof(buf), "%s%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS_PRESSED);
- elm_icon_file_set(ad->ic_settings, buf, NULL);
+ snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS_PRESSED);
+ elm_icon_file_set(obj, buf, NULL);
}
static void _button_cb(void *data, Evas_Object *obj, void *event_info)
struct appdata *ad = (struct appdata *)data;
retm_if(ad == NULL, "Invalid argument: appdata is NULL\n");
char buf[PATHBUF_SIZE] = {0, };
- snprintf(buf, sizeof(buf), "%s%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS);
- elm_icon_file_set(ad->ic_settings, buf, NULL);
+ snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS);
+ elm_icon_file_set(obj, buf, NULL);
if(evas_object_visible_get(ad->win)){
DEL_TIMER(ad->ptimer)
_open_ug(ad);
}
}
-/*
-Eina_Bool _unset_layout(void *data)
-{
- struct appdata *ad = (struct appdata *)data;
- retvm_if(ad == NULL, EINA_FALSE,"Invalid argument: appdata is NULL\n");
-
- DEL_TIMER(ad->warntimer);
- if(elm_object_content_get(ad->pu)==ad->warn_ly){
- elm_object_content_unset(ad->pu);
- elm_object_content_set(ad->pu, ad->sl);
- evas_object_hide(ad->warn_ly);
- }
- return ECORE_CALLBACK_CANCEL;
-}
-*/
-int _lang_changed(void *data){
- _D("%s\n", __func__);
- struct appdata *ad = (struct appdata *)data;
- char buf[STRBUF_SIZE] = {0, };
-
- retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
- retvm_if(ad->win == NULL, -1, "Invalid argument: window is NULL\n");
-
- snprintf(buf, sizeof(buf), "<font_size=32><b>%s</b></font_size>",
- T_("IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME"));
- elm_object_text_set(ad->warn_lb, buf);
- return 0;
-}
int _app_reset(bundle *b, void *data)
{
/* volume-app layout */
Elm_Theme *th;
Evas_Object *outer, *inner, *block;
- /* warn message layout */
- //Evas_Object *label, *warn_ly;
char buf[PATHBUF_SIZE] = {0, };
struct appdata *ad = (struct appdata *)data;
retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
ad->win = win;
_grab_key(ad);
+ mm_sound_route_get_playing_device(&(ad->device));
th = elm_theme_new();
elm_theme_ref_set(th, NULL);
ic_settings = elm_icon_add(win);
evas_object_size_hint_aspect_set(ic_settings, EVAS_ASPECT_CONTROL_VERTICAL, 1, 1);
elm_icon_resizable_set(ic_settings, EINA_FALSE, EINA_FALSE);
- snprintf(buf, sizeof(buf), "%s%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS);
+ snprintf(buf, sizeof(buf), "%s/%s", IMAGEDIR, IMG_VOLUME_ICON_SETTINGS);
+ _D("%s\n", buf);
elm_icon_file_set(ic_settings, buf, NULL);
elm_object_part_content_set(sl, "end", ic_settings);
evas_object_event_callback_add(ic_settings, EVAS_CALLBACK_MOUSE_DOWN, _button_mouse_down_cb, ad);
ad->ic = ic;
_set_icon(ad, val);
- /* Make a Layout for volume slider with warning text. */
- /*
- snprintf(buf, sizeof(buf), "<font_size=32><b>%s</b></font_size>",
- T_("IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME"));
- label = _add_label(inner, "popup/default", buf);
- //elm_object_part_content_set(inner, "elm.swallow.warn_label", label);
- elm_object_part_content_set(outer, "elm.swallow.warn_label", label);
- evas_object_show(label);
- ad->warn_lb = label;
- _D("%s\n", buf);*/
-
- /*warn_ly = _add_layout(ad->pu, EDJ_THEME, GRP_VOLUME_SLIDER_WITH_WARNING);
- elm_object_part_content_set(warn_ly, "elm.swallow.warn_label", ad->warn_lb);
- ad->warn_ly = warn_ly;
- evas_object_hide(ad->warn_ly);*/
-
ret = syspopup_create(b, &handler, ad->win, ad);
retvm_if(ret < 0, -1, "Failed to create syspopup\n");
_rotate_func(ad);
evas_object_show(ad->win);
-
- if(evas_object_visible_get(ad->win))
- _D("window is visible\n");
- else{
- _D("window is invisible, close volume\n");
- _close_volume(ad);
- }
}
ad->flag_launching = EINA_FALSE;
return 0;
/*
* 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://www.tizenopensource.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.
int _rotate_func(void *data);
int _app_reset(bundle *b, void *data);
Eina_Bool popup_timer_cb(void *data);
-Eina_Bool _unset_layout(void *data);
-int _lang_changed(void *data);
void _init_press_timers(void *data);
+void _ungrab_key(struct appdata *ad);
#endif
-
/* __VOLUME_LOGIC_H__ */
/*
* 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://www.tizenopensource.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.
#define STRBUF_SIZE 64
#define PATHBUF_SIZE 256
+int _set_sound_level(volume_type_t type, int val);
+
void _play_vib(int handle)
{
svi_play_vib(handle, SVI_VIB_OPERATION_VIBRATION);
int _set_icon(void *data, int val)
{
int snd=0, vib=0;
- char buf[PATHBUF_SIZE] = {0, };
char *img = NULL;
struct appdata *ad = (struct appdata *)data;
retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
}
break;
}
- snprintf(buf, sizeof(buf), "%s%s", IMAGEDIR, img);
if (ad->ic ) {
- elm_icon_file_set(ad->ic, buf, NULL);
+ elm_icon_file_set(ad->ic, EDJ_APP, img);
}
return 1;
}
-/*
+
+Eina_Bool _delete_message_ticker_notification(void *data)
+{
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+ struct appdata *ad = (struct appdata *)data;
+ retvm_if(ad == NULL, -1, "Invalid argument: appdata is NULL\n");
+
+ if(ad->noti){
+ noti_err = notification_delete(ad->noti);
+ retvm_if(noti_err != NOTIFICATION_ERROR_NONE, ECORE_CALLBACK_RENEW, "Fail to notification_delete : %d\n", noti_err);
+ }
+ ad->noti = NULL;
+ return ECORE_CALLBACK_CANCEL;
+}
+
+notification_h _insert_message_ticker_notification(const char* pTickerMsg, const char* pLocaleTickerMsg)
+{
+ notification_h noti = NULL;
+ notification_error_e noti_err = NOTIFICATION_ERROR_NONE;
+
+ noti = notification_new(NOTIFICATION_TYPE_NOTI, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE);
+ retvm_if(noti == NULL, NULL, "notification_new is failed\n");
+
+ noti_err = notification_set_application(noti, PKGNAME);
+ retvm_if(noti_err != NOTIFICATION_ERROR_NONE, NULL, "Fail to notification_set_application : %d\n", noti_err);
+
+ noti_err = notification_set_image(noti, NOTIFICATION_IMAGE_TYPE_ICON, IMG_VOLUME_PACKAGE_ICON);
+ retvm_if(noti_err != NOTIFICATION_ERROR_NONE, NULL, "Fail to notification_set_image : %d\n", noti_err);
+
+ noti_err = notification_set_text_domain(noti, "volume-app", LOCALEDIR);
+ retvm_if(noti_err != NOTIFICATION_ERROR_NONE, NULL, "Fail to notification_set_text_domain : %d\n", noti_err);
+
+ noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_TITLE, pTickerMsg, T_(pLocaleTickerMsg), NOTIFICATION_VARIABLE_TYPE_NONE);
+ retvm_if(noti_err != NOTIFICATION_ERROR_NONE, NULL, "Fail to notification_set_text : %d\n", noti_err);
+
+ noti_err = notification_set_text(noti, NOTIFICATION_TEXT_TYPE_CONTENT_FOR_DISPLAY_OPTION_IS_OFF, pTickerMsg, T_(pLocaleTickerMsg), NOTIFICATION_VARIABLE_TYPE_NONE);
+ retvm_if(noti_err != NOTIFICATION_ERROR_NONE, NULL, "Fail to notification_set_text : %d\n", noti_err);
+
+ noti_err = notification_set_display_applist(noti, NOTIFICATION_DISPLAY_APP_TICKER);
+ retvm_if(noti_err != NOTIFICATION_ERROR_NONE, NULL, "Fail to notification_set_display_applist : %d\n", noti_err);
+
+ noti_err = notification_insert(noti, NULL);
+ retvm_if(noti_err != NOTIFICATION_ERROR_NONE, NULL, "Fail to notification_set_text_domain : %d\n", noti_err);
+
+ return noti;
+}
+
void _set_device_warning(void *data, int val, int device)
{
struct appdata *ad = (struct appdata *)data;
switch (device) {
case SYSTEM_AUDIO_ROUTE_PLAYBACK_DEVICE_EARPHONE:
- if (val >= 13) {
- if(ad->flag_warning) return;
- ad->flag_warning = true;
- elm_object_content_unset(ad->pu);
- elm_object_part_content_set(ad->warn_ly, "elm.swallow.slider1", ad->sl);
- elm_object_content_set(ad->pu, ad->warn_ly);
- evas_object_show(ad->warn_ly);
+ if (val >= 10) {
+ if(ad->noti == NULL){
+ ad->noti = _insert_message_ticker_notification(IDS_WARNING_MSG, STR_WARNING_MSG);
+ }
DEL_TIMER(ad->warntimer);
- ADD_TIMER(ad->warntimer, 3.0, _unset_layout, data);
+ ADD_TIMER(ad->warntimer, 2.0, _delete_message_ticker_notification, data);
}
else {
- ad->flag_warning = false;
- _unset_layout(data);
+ _delete_message_ticker_notification(data);
}
break;
default:
- ad->flag_warning = false;
- _unset_layout(data);
+ _delete_message_ticker_notification(data);
break;
}
}
-*/
+
int _get_title(volume_type_t type, char *label, int size)
{
char *text = NULL;
/* function could be activated when window exists */
ad->step = _get_step(ad->type);
- mm_sound_volume_get_value(ad->type, (unsigned int*)(&val));
mm_sound_route_get_playing_device(&device);
+ mm_sound_volume_get_value(ad->type, (unsigned int*)(&val));
+
+ /* apply earphone safety concept */
+ if(ad->device != device){
+ if(device == SYSTEM_AUDIO_ROUTE_PLAYBACK_DEVICE_EARPHONE && val > 9)
+ val = 9;
+ _set_sound_level(ad->type, val);
+ ad->device = device;
+ }
+ if(ad->type == VOLUME_TYPE_RINGTONE){
+ if(val == 0)
+ vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, EINA_FALSE);
+ else
+ vconf_set_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, EINA_TRUE);
+ }
_set_slider_value(ad, val);
_set_icon(ad, val);
+ _set_device_warning(ad, val, device);
_D("type(%d) val(%d)\n", ad->type, val);
}
mm_sound_volume_set_value(type, val);
return 0;
}
-
/*
* 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://www.tizenopensource.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.
void _mm_func(void *data);
int _set_icon(void * data, int val);
int _set_sound_level(volume_type_t type, int val);
+int _delete_message_ticker_notification(void *data);
#endif
/* __VOLUME_SOUND_H__ */
/*
* 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://www.tizenopensource.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.
/*
* 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://www.tizenopensource.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.
/*
* 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://www.tizenopensource.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.
/*
* 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://www.tizenopensource.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.
char *msgid;
};
-static int lang_changed(void *data)
-{
- return _lang_changed(data);
-}
-
static Eina_Bool rotate_cb(void *data, int type, void *event)
{
struct appdata *ad = data;
_app_create(ad);
- lang_changed(ad);
-
- /* add system event callback */
- appcore_set_event_callback(APPCORE_EVENT_LANG_CHANGE,
- lang_changed, ad);
-
/* add rotation event callback */
ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
rotate_cb, (void *)data);
.reset = app_reset,
};
- /*elm_init(argc, argv);
- elm_config_preferred_engine_set("opengl_x11");*/
+
+ /* appcore measure time example */
+ printf("from AUL to %s(): %d msec\n", __func__,
+ appcore_measure_time_from("APP_START_TIME"));
memset(&ad, 0x0, sizeof(struct appdata));
ops.data = &ad;
return appcore_efl_main(PACKAGE, &argc, &argv, &ops);
}
-
/*
* 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://www.tizenopensource.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.
#include <syspopup.h>
#include <appcore-efl.h>
#include <Ecore_X.h>
+#include <notification.h>
#if !defined(PACKAGE)
# define PACKAGE "volume"
# define EDJDIR RESDIR"/edje"
#endif
-#define EDJ_THEME EDJDIR"/volume_popup.edj"
-#define GRP_VOLUME_SLIDER "popup_slider_style"
-#define GRP_VOLUME_SLIDER_WITH_WARNING "popup_slider_text_style_with_warn_label"
+#if !defined(PKGNAME)
+# define PKGNAME "com.samsung.volume"
+#endif
+
#define EDJ_APP EDJDIR"/volume_app.edj"
#define GRP_VOLUME_BLOCKEVENTS "block_events"
#define GRP_VOLUME_LAYOUT "volumeLayout"
#define GRP_VOLUME_CONTENT "volumeLayoutContent"
#define GRP_VOLUME_SLIDER_HORIZONTAL "volumeHorizontalSlider"
-#define IMG_VOLUME_ICON "/00_volume_icon.png"
-#define IMG_VOLUME_ICON_CALL "/00_volume_icon_Call.png"
-#define IMG_VOLUME_ICON_MUTE "/00_volume_icon_Mute.png"
-#define IMG_VOLUME_ICON_VIB "/00_volume_icon_Vibrat.png"
-#define IMG_VOLUME_ICON_HEADPHONE "/00_volume_icon_headphone.png"
-#define IMG_VOLUME_ICON_MEDIA "/00_volume_icon_media.png"
-#define IMG_VOLUME_ICON_SETTINGS "/00_volume_icon_settings.png"
-#define IMG_VOLUME_ICON_SETTINGS_PRESSED "/00_volume_icon_settings_pressed.png"
-#define IMG_VOLUME_WINSET_DIVIDER_LINE "/00_winset_divider_line.png"
+#define IMG_VOLUME_PACKAGE_ICON "/usr/share/icons/default/small/com.samsung.volume.png"
+#define IMG_VOLUME_ICON "00_volume_icon.png"
+#define IMG_VOLUME_ICON_CALL "00_volume_icon_Call.png"
+#define IMG_VOLUME_ICON_MUTE "00_volume_icon_Mute.png"
+#define IMG_VOLUME_ICON_VIB "00_volume_icon_Vibrat.png"
+#define IMG_VOLUME_ICON_HEADPHONE "00_volume_icon_headphone.png"
+#define IMG_VOLUME_ICON_MEDIA "00_volume_icon_media.png"
+#define IMG_VOLUME_ICON_SETTINGS "00_volume_icon_settings.png"
+#define IMG_VOLUME_ICON_SETTINGS_PRESSED "00_volume_icon_settings_pressed.png"
+
+#define IDS_WARNING_MSG "IDS_COM_BODY_HIGH_VOLUMES_MAY_HARM_YOUR_HEARING_IF_YOU_LISTEN_FOR_A_LONG_TIME"
+#define STR_WARNING_MSG "High volumes may harm your hearing if you listen for a long time"
#define S_(str) dgettext("sys_string", str)
#define T_(str) dgettext(PACKAGE, str)
Ecore_Timer *warntimer; /* warning message timer */
Ecore_Timer *luwarmtimer, *ldwarmtimer;
volume_type_t type;
+ system_audio_route_device_t device;
int step;
int angle;
+ /* ticker notification handler */
+ notification_h noti;
+
/* ug handler */
ui_gadget_h ug;
int flag_touching;
int flag_launching;
int flag_deleting;
- int flag_warning; /* set device warning flag */
};
#endif /* __VOLUME_H__ */