SET(SRCS
daemon/modules.c
- daemon/dbus_utility.c
daemon/accessibility.c
daemon/voice_control.c
daemon/media.c
daemon/notifications/animated_image.c
daemon/notifications/activenoti.c
daemon/notifications/noti_view_listype.c
- daemon/notifications/noti_box.c
+ daemon/notifications/noti_view_ongoing.c
daemon/notifications/noti_node.c
daemon/notifications/noti_section.c
- daemon/notifications/noti_view_ongoing.c
- daemon/notifications/noti_gridbox.c
daemon/notifications/noti_win.c
- daemon/notifications/noti_view_boxtype.c
daemon/notifications/noti_listbox.c
daemon/notifications/noti_util.c
daemon/notifications/noti_view.c
daemon/notifications/noti.c
daemon/device/brightness.c
daemon/settings/modules/rotate-lock.c
- daemon/settings/modules/ultra_power_saving.c
- daemon/settings/modules/assistive_light.c
daemon/settings/modules/bluetooth.c
daemon/settings/modules/gps.c
daemon/settings/modules/wifi.c
- daemon/settings/modules/tethering.c
- daemon/settings/modules/mobile_data.c
daemon/settings/modules/sound-profile.c
- daemon/settings/modules/flightmode.c
daemon/settings/settings_view_all.c
daemon/settings/settings_icon_common.c
daemon/settings/settings_gridbox.c
daemon/service/reminder.c
daemon/service/keyboard.c
daemon/service/noti_led.c
- daemon/service/smart_alert.c
daemon/page/pager.c
daemon/page/page_base.c
daemon/page/pager_common.c
daemon/page/page_setting_all.c
- daemon/page/page_edit.c
daemon/quickpanel-ui.c
daemon/common.c
daemon/list_util.c
iniparser
alarm-service
voice-control-setting
- tzsh-quickpanel-service
+ tzsh-quickpanel-service
)
FOREACH(flag ${pkgs_CFLAGS} ${x11_pkgs_CFLAGS})
ADD_DEFINITIONS("-DQP_BRIGHTNESS_ENABLE")
ADD_DEFINITIONS("-DQP_MINICTRL_ENABLE")
ADD_DEFINITIONS("-DQP_SCREENREADER_ENABLE")
-ADD_DEFINITIONS("-DQP_SMART_ALERT_ENABLE")
ADD_DEFINITIONS("-DQP_SERVICE_NOTI_LED_ENABLE")
ADD_DEFINITIONS("-DQP_ANIMATED_IMAGE_ENABLE")
ADD_DEFINITIONS("-DQP_REMINDER_ENABLE")
INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${BINDIR})
INSTALL(DIRECTORY DESTINATION ${DATADIR})
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/quickpanel_icon_default.png DESTINATION ${RESDIR})
-
-# icon for setting
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/settings_noti_panel.png DESTINATION ${SHARED_DIR}/icons)
+#INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/quickpanel_icon_default.png DESTINATION ${RESDIR})
# icons for notification
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/data/images_noti_icons/ DESTINATION ${SHARED_DIR}/noti_icons FILES_MATCHING PATTERN "*.png")
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/data/images/quickpanel_icon_default.png DESTINATION ${RESDIR})
# License
INSTALL(FILES ${CMAKE_SOURCE_DIR}/LICENSE DESTINATION /usr/share/license RENAME ${PKGNAME})
# i18n
ADD_SUBDIRECTORY(data)
ADD_SUBDIRECTORY(po)
-
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-#include <glib.h>
-
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <E_DBus.h>
-
-#include "common.h"
-#include "quickpanel-ui.h"
-
-#define QP_DBUS_ACTIVENOTI_NAME QP_DBUS_NAME".activenoti"
-#define QP_DBUS_ACTIVENOTI_PATH QP_DBUS_PATH"/activenoti"
-#define QP_DBUS_ACTIVENOTI_MEMBER_SHOW "show"
-#define QP_DBUS_ACTIVENOTI_MEMBER_HIDE "hide"
-
-HAPI void quickpanel_dbus_activenoti_visibility_send(int is_visible)
-{
- DBusMessage *signal = NULL;
- const char *member = NULL;
- struct appdata *ad = quickpanel_get_app_data();
-
- retif(ad == NULL, , "invalid parameter");
- retif(ad->dbus_connection == NULL, , "failed to get dbus system bus");
-
- if (is_visible == 1) {
- member = QP_DBUS_ACTIVENOTI_MEMBER_SHOW;
- } else {
- member = QP_DBUS_ACTIVENOTI_MEMBER_HIDE;
- }
- signal =
- dbus_message_new_signal(QP_DBUS_ACTIVENOTI_PATH
- , QP_DBUS_ACTIVENOTI_NAME
- , member);
- if (signal == NULL) {
- ERR("Fail to dbus_message_new_signal");
- return;
- }
-
- DBG("status:%s", member);
-
- e_dbus_message_send(ad->dbus_connection,
- signal,
- NULL,
- 0,
- NULL);
- dbus_message_unref(signal);
-}
+++ /dev/null
-/*
- * 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.
- * 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.
- *
- */
-
-#ifndef __QP_DBUS_UTILITY_H__
-#define __QP_DBUS_UTILITY_H__
-
-extern void quickpanel_dbus_activenoti_visibility_send(int is_visible);
-
-#endif
#include "common.h"
#include "list_util.h"
#include "noti_node.h"
-#include "noti_gridbox.h"
#include "vi_manager.h"
-#include "noti_box.h"
#include "noti_listbox.h"
#include "noti_list_item.h"
#include "noti_section.h"
#include "noti.h"
#include "list_util.h"
-#ifdef QP_SMART_ALERT_ENABLE
-#include "smart_alert.h"
-#endif
-
#ifdef QP_SERVICE_NOTI_LED_ENABLE
#include "noti_led.h"
#endif
notification_h noti = item->noti;
retif(noti == NULL, , "Invalid parameter!");
- if (_do_noti_delete(noti) != NOTIFICATION_ERROR_NONE) {
- quickpanel_noti_box_item_dragging_cancel(obj);
- }
+ _do_noti_delete(noti);
}
static void _notibox_button_1_cb(noti_node_item *item, Evas_Object *obj)
static void _update_notilist(struct appdata *ad)
{
+ DBG("");
Evas_Object *list = NULL;
notification_h noti = NULL;
notification_h noti_save = NULL;
}
}
#endif
-#ifdef QP_SMART_ALERT_ENABLE
- quickpanel_smart_alert_update_info(noti_new);
-#endif
#ifdef QP_SERVICE_NOTI_LED_ENABLE
quickpanel_noti_led_proc(noti_new, op_type);
#endif
notification_h noti = node->noti;
notification_get_type(noti, ¬i_type);
-#ifdef QP_SMART_ALERT_ENABLE
- quickpanel_smart_alert_update_info(noti);
-#endif
#ifdef QP_SERVICE_NOTI_LED_ENABLE
quickpanel_noti_led_proc(noti, op_type);
#endif
}
}
#endif
-#ifdef QP_SMART_ALERT_ENABLE
- quickpanel_smart_alert_update_info(noti_new);
-#endif
#ifdef QP_SERVICE_NOTI_LED_ENABLE
quickpanel_noti_led_proc(noti_new, op_type);
#endif
if (quickpanel_noti_view_is_view_handler_changed(node->view, noti_new) == 1) {
quickpanel_noti_listbox_remove_item(ad->list, node->view, 1);
quickpanel_noti_node_remove(s_info.noti_node, priv_id);
- _noti_add(ad->list, noti_new, GRIDBOX_PREPEND);
} else {
old_noti = node->noti;
node->noti = noti_new;
case NOTIFICATION_OP_SERVICE_READY:
_update_notilist(ad);
-#ifdef QP_SMART_ALERT_ENABLE
- quickpanel_smart_alert_update_info(NULL);
-#endif
#ifdef QP_SERVICE_NOTI_LED_ENABLE
quickpanel_noti_led_init(ad, s_info.noti_node);
#endif
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-#include <string.h>
-#include <glib.h>
-
-#include <vconf.h>
-#include <notification.h>
-#include <notification_text_domain.h>
-#include <notification_internal.h>
-#include <system_settings.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <E_DBus.h>
-
-#include "quickpanel-ui.h"
-#include "common.h"
-#include "list_util.h"
-#include "quickpanel_def.h"
-#include "vi_manager.h"
-#include "noti_box.h"
-#include "noti_node.h"
-#include "noti.h"
-#include "noti_util.h"
-#include "animated_icon.h"
-
-#ifdef QP_SCREENREADER_ENABLE
-#include "accessibility.h"
-#endif
-
-#ifdef QP_ANIMATED_IMAGE_ENABLE
-#include "animated_image.h"
-#endif
-
-#define IMAGE_NO_RESIZE 0
-#define IMAGE_RESIZE 1
-
-#define IMAGE_BY_FILE 0
-#define IMAGE_BY_BUFFER 1
-
-#define TEXT_NO_CR 0
-#define TEXT_CR 1
-
-#define THRESHOLD_DRAGGING_TIME_LIMIT 1.0
-#define LIMIT_ZOOM_RATIO 0.55
-#define LIMIT_FADEOUT_RATIO 0.1
-#define THRESHOLD_DELETE_START 80
-#define THRESHOLD_DELETE_START_Y_LIMIT 60
-#define THRESHOLD_DISTANCE ((BOX_WIDTH_P >> 1))
-
-static struct _info {
- int box_debug_step;
-} s_info = {
- .box_debug_step = 0,
-};
-
-static Evas_Object *_check_duplicated_image_loading(Evas_Object *obj, const char *part, const char *file_path)
-{
- Evas_Object *old_ic = NULL;
- const char *old_ic_path = NULL;
-
- retif(obj == NULL, NULL, "Invalid parameter!");
- retif(part == NULL, NULL, "Invalid parameter!");
- retif(file_path == NULL, NULL, "Invalid parameter!");
-
- old_ic = elm_object_part_content_get(obj, part);
-
- if (quickpanel_animated_icon_is_same_icon(old_ic, file_path) == 1) {
- return old_ic;
- }
-
- if (old_ic != NULL) {
- elm_image_file_get(old_ic, &old_ic_path, NULL);
- if (old_ic_path != NULL) {
- if (strcmp(old_ic_path, file_path) == 0)
- return old_ic;
- }
-
- elm_object_part_content_unset(obj, part);
- evas_object_del(old_ic);
- old_ic = NULL;
- }
-
- return NULL;
-}
-
-static void _noti_box_call_item_cb(Evas_Object *noti_box, const char *emission)
-{
- retif(noti_box == NULL, , "invalid parameter");
- retif(emission == NULL, , "invalid parameter");
-
- double time_current = 0.0;
- static double time_called = 0.0;
-
- if (time_called == 0) {
- time_called = ecore_loop_time_get();
- } else {
- time_current = ecore_loop_time_get();
- if ((time_current - time_called) < 0.4) {
- DBG("click rejected");
- return;
- }
- }
-
- void (*cb)(void *data, Evas_Object *obj) = NULL;
- noti_box_h *data = NULL;
- data = evas_object_data_get(noti_box, E_DATA_NOTI_BOX_H);
- retif(data == NULL, , "invalid parameter");
-
- if (strncmp(emission,"selected", strlen("selected")) == 0) {
- if (data->need_to_cancel_press > 0) {
- data->need_to_cancel_press = 0;
- return;
- }
-
- cb = evas_object_data_get(noti_box, E_DATA_CB_SELECTED_ITEM);
-
- if (cb != NULL) {
- cb(data->noti_node, noti_box);
- }
- time_called = time_current;
- } else if (strncmp(emission,"button_1", strlen("button_1")) == 0) {
- if (data->need_to_cancel_press > 0) {
- data->need_to_cancel_press = 0;
- return;
- }
-
- cb = evas_object_data_get(noti_box, E_DATA_CB_BUTTON_1);
-
- if (cb != NULL) {
- cb(data->noti_node, noti_box);
- }
- time_called = time_current;
- } else if (strncmp(emission,"deleted", strlen("deleted")) == 0) {
- data->need_to_cancel_press = 0;
- cb = evas_object_data_get(noti_box, E_DATA_CB_DELETED_ITEM);
-
- if (cb != NULL && data != NULL) {
- cb(data->noti_node, noti_box);
- }
- }
-}
-
-noti_box_h *_box_handler_get(Evas_Object *obj)
-{
-
- return evas_object_data_get(obj, E_DATA_NOTI_BOX_H);
-}
-
-static void _attach_memfile(Evas_Object *noti_box, notification_image_type_e image_type, void *memfile)
-{
- char buf[32] = {0,};
-
- snprintf(buf, sizeof(buf), "%s_%d", E_DATA_NOTI_BOX_MB_BG, image_type);
-
- void *memfile_attached = evas_object_data_get(noti_box, buf);
- if (memfile_attached != NULL) {
- free(memfile_attached);
- }
- evas_object_data_set(noti_box, buf, memfile);
-}
-
-static void _deattach_memfile_all(Evas_Object *noti_box)
-{
- char buf[32] = {0,};
- void *memfile = NULL;
- int i = NOTIFICATION_TEXT_TYPE_NONE + 1;
-
- for ( ; i < NOTIFICATION_TEXT_TYPE_MAX; i++) {
- snprintf(buf, sizeof(buf), "%s_%d", E_DATA_NOTI_BOX_MB_BG, i);
-
- memfile = evas_object_data_get(noti_box, buf);
- if (memfile != NULL) {
- free(memfile);
- }
- evas_object_data_set(noti_box, buf, NULL);
- evas_object_data_del(noti_box, buf);
- }
-}
-
-static void _text_clean_all(Evas_Object *noti_box)
-{
- int i = 0;
- const char *text_parts[] = {
- "object.text.title",
- "object.text.contents",
- "object.text.contents.multiline.short",
- "object.text.contents.multiline",
- "object.text.count",
- "object.text.info.1",
- "object.text.info.1.short",
- "object.text.info.1.multiline",
- "object.text.info.sub.1",
- "object.text.info.2",
- "object.text.info.2.short",
- "object.text.info.sub.2",
- NULL
- };
-
- for (i = 0; text_parts[i] != NULL; i++) {
- elm_object_part_text_set(noti_box, text_parts[i], "");
- elm_object_part_text_set(noti_box, text_parts[i], NULL);
- }
-}
-
-static void _signal_cb(void *data, Evas_Object *o, const char *emission, const char *source)
-{
- retif(data == NULL, , "invalid parameter");
- retif(o == NULL, , "invalid parameter");
- retif(emission == NULL, , "invalid parameter");
-
- _noti_box_call_item_cb(o, emission);
-}
-
-#ifdef QP_SCREENREADER_ENABLE
-static inline void _check_and_add_to_buffer(notification_h noti, notification_text_type_e text_type, Eina_Strbuf *str_buf)
-{
- char buf[256] = { 0, };
- char buf_number[QP_UTIL_PHONE_NUMBER_MAX_LEN * 2] = { 0, };
-
- char *text = NULL;
- time_t time = 0;
-
- if (notification_get_time_from_text(noti, text_type, &time) == NOTIFICATION_ERROR_NONE) {
- if ((int)time > 0) {
- quickpanel_noti_util_get_time(time, buf, sizeof(buf));
- text = buf;
- }
- } else {
- notification_get_text(noti, text_type, &text);
- }
-
- if (text != NULL) {
- if (strlen(text) > 0) {
- if (quickpanel_common_util_is_phone_number(text)) {
- quickpanel_common_util_phone_number_tts_make(buf_number, text,
- (QP_UTIL_PHONE_NUMBER_MAX_LEN * 2) - 1);
- DBG("[%s]", buf_number);
- eina_strbuf_append(str_buf, buf_number);
- } else {
- eina_strbuf_append(str_buf, text);
- }
- eina_strbuf_append_char(str_buf, '\n');
- }
- }
-}
-
-static void _noti_box_set_rs_layout_single(Evas_Object *noti_box, notification_h noti)
-{
- Evas_Object *ao = NULL;
- Eina_Strbuf *str_buf = NULL;
- char *dir = NULL;
- char *domain = NULL;
-
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- str_buf = eina_strbuf_new();
- retif(str_buf == NULL, , "invalid parameter");
-
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_TITLE, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_CONTENT, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_1, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_2, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2, str_buf);
-
- if (str_buf != NULL) {
- ao = quickpanel_accessibility_screen_reader_object_get(noti_box,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", noti_box);
- if (ao != NULL) {
- elm_access_info_set(ao, ELM_ACCESS_TYPE, _("IDS_QP_BUTTON_NOTIFICATION"));
- elm_access_info_set(ao, ELM_ACCESS_INFO, eina_strbuf_string_get(str_buf));
- }
-
- eina_strbuf_free(str_buf);
- }
-}
-
-static void _noti_box_set_rs_layout_multi(Evas_Object *noti_box, notification_h noti)
-{
- DBG("");
-
- Evas_Object *ao = NULL;
- Eina_Strbuf *str_buf = NULL;
- char *dir = NULL;
- char *domain = NULL;
-
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- str_buf = eina_strbuf_new();
- retif(str_buf == NULL, , "invalid parameter");
-
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_TITLE, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_CONTENT, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_1, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_2, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2, str_buf);
-
- if (str_buf != NULL) {
- ao = quickpanel_accessibility_screen_reader_object_get(noti_box,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", noti_box);
- if (ao != NULL) {
- elm_access_info_set(ao, ELM_ACCESS_TYPE, _("IDS_QP_BUTTON_NOTIFICATION"));
- elm_access_info_set(ao, ELM_ACCESS_INFO, eina_strbuf_string_get(str_buf));
- }
-
- eina_strbuf_free(str_buf);
- }
-}
-
-static void _noti_box_set_rs_layout_thumbnail(Evas_Object *noti_box, notification_h noti)
-{
- DBG("");
-
- Evas_Object *ao = NULL;
- Eina_Strbuf *str_buf = NULL;
- char *dir = NULL;
- char *domain = NULL;
-
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- str_buf = eina_strbuf_new();
- retif(str_buf == NULL, , "invalid parameter");
-
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_TITLE, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_CONTENT, str_buf);
-
- if (str_buf != NULL) {
- DBG("access:%s", eina_strbuf_string_get(str_buf));
-
- ao = quickpanel_accessibility_screen_reader_object_get(noti_box,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", noti_box);
- if (ao != NULL) {
- elm_access_info_set(ao, ELM_ACCESS_TYPE, _("IDS_QP_BUTTON_NOTIFICATION"));
- elm_access_info_set(ao, ELM_ACCESS_INFO, eina_strbuf_string_get(str_buf));
- }
-
- eina_strbuf_free(str_buf);
- }
-}
-#endif
-
-static Eina_Bool _drag_cancel_cb(void *data)
-{
- QP_VI *vi = data;
- noti_box_h *box_h = NULL;
- retif(vi == NULL, EINA_FALSE, "invalid parameter");
-
- if (vi->target != NULL) {
- DBG("Canceling dragging");
-
- box_h = _box_handler_get(vi->target);
- retif(box_h == NULL, EINA_FALSE, "box_h is NULL");
-
- box_h->state = NOTIBOX_STATE_GETSTURE_CANCELED;
- evas_object_map_enable_set(vi->target, EINA_FALSE);
-
- box_h->vi = NULL;
- }
-
- return EINA_TRUE;
-}
-
-static void _mouse_down_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- int w = 0, h = 0;
- noti_box_h *box_h = NULL;
- Evas_Event_Mouse_Down *ev = (Evas_Event_Mouse_Down *)event_info;
- retif(ev == NULL, , "event_info is NULL");
-
- box_h = _box_handler_get(obj);
- retif(box_h == NULL, , "box_h is NULL");
-
- evas_object_geometry_get(obj, NULL, NULL, &w, &h);
-
- box_h->press_x = ev->canvas.x;
- box_h->press_y = ev->canvas.y;
- box_h->obj_w = w;
- box_h->obj_h = h;
- box_h->state = NOTIBOX_STATE_NORMAL;
-
- s_info.box_debug_step = 1;
- SDBG("mouse down:%d %d %d", box_h->obj_w, box_h->obj_h, box_h->state);
-
- if (box_h->vi != NULL) {
- quickpanel_vi_user_event_del(box_h->vi);
- box_h->vi = NULL;
- }
-
- box_h->need_to_cancel_press = 0;
-}
-
-static void _mouse_move_cb(void* data, Evas* e, Evas_Object* obj, void* event_info)
-{
- int delta_x = 0;
- int delta_y = 0;
- static int delta_prev = -1;
- int x = 0, y = 0;
- int w = 0, h = 0;
- noti_box_h *box_h = NULL;
- double zoom_ratio = 0.0;
- double color_ratio = 0.0;
- Evas_Map *map = NULL;
- Evas_Event_Mouse_Move* ev = event_info;
- QP_VI *vi = NULL;
- retif(ev == NULL, , "event_info is NULL");
-
- box_h = _box_handler_get(obj);
- retif(box_h == NULL, , "box_h is NULL");
-
- if (box_h->state == NOTIBOX_STATE_GETSTURE_CANCELED) {
- DBG("deletion has been canceled");
- return;
- }
-
- evas_object_geometry_get(obj, &x, &y, &w, &h);
- delta_x = abs(box_h->press_x - ev->cur.output.x);
- delta_y = abs(box_h->press_y - ev->cur.output.y);
-
- if (s_info.box_debug_step == 1) {
- SDBG("mouse move:%d %d %d", delta_x, delta_y, box_h->state);
- s_info.box_debug_step = 2;
- }
-
- if (box_h->state == NOTIBOX_STATE_NORMAL) {
- if (delta_x >= THRESHOLD_DELETE_START
- && delta_y <= THRESHOLD_DELETE_START_Y_LIMIT) {
- DBG("start a deletion");
- box_h->state = NOTIBOX_STATE_GETSTURE_WAIT;
-
- vi = quickpanel_vi_new_with_data(
- VI_OP_DELETE,
- QP_ITEM_TYPE_NOTI,
- NULL,
- obj,
- NULL,
- NULL,
- NULL,
- _drag_cancel_cb,
- vi,
- NULL,
- 0,
- 0);
- box_h->vi = vi;
- box_h->need_to_cancel_press = 1;
- quickpanel_vi_user_event_add(vi);
- }
- } else if (box_h->state == NOTIBOX_STATE_GETSTURE_WAIT) {
- if (delta_prev != delta_x) {
- delta_x = (delta_x > THRESHOLD_DISTANCE) ? THRESHOLD_DISTANCE : delta_x;
- delta_x = (delta_x <= 0) ? 1 : delta_x;
- zoom_ratio = (1.0 - LIMIT_ZOOM_RATIO) * (1.0 - (double)delta_x / (double)THRESHOLD_DISTANCE);
- color_ratio = LIMIT_FADEOUT_RATIO +
- ((1.0 - LIMIT_FADEOUT_RATIO) * (1.0 - ((double)delta_x / (double)(THRESHOLD_DISTANCE))));
-
- map = evas_map_new(4);
- if (map != NULL) {
- evas_map_util_points_populate_from_object(map, obj);
- evas_map_util_zoom(map
- , LIMIT_ZOOM_RATIO + zoom_ratio
- , LIMIT_ZOOM_RATIO + zoom_ratio
- , x + (w >> 1)
- , y + (h >> 1));
- evas_map_util_points_color_set(map
- , 255 * color_ratio
- , 255 * color_ratio
- , 255 * color_ratio
- , 255 * color_ratio);
- evas_object_map_enable_set(obj, EINA_TRUE);
- evas_object_map_set(obj, map);
- evas_map_free(map);
- quickpanel_list_util_scroll_freeze_set(EINA_TRUE);
- }
- delta_prev = delta_x;
- }
- }
-
- box_h->distance = delta_x;
-}
-
-static void _mouse_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- noti_box_h *box_h = NULL;
- box_h = _box_handler_get(obj);
- retif(box_h == NULL, , "box_h is NULL");
-
- quickpanel_list_util_scroll_freeze_set(EINA_FALSE);
-
- if (s_info.box_debug_step == 2) {
- SDBG("mouse up:%d", box_h->state);
- s_info.box_debug_step = 3;
- }
-
- if (box_h->state == NOTIBOX_STATE_GETSTURE_WAIT) {
- if (box_h->distance >= (THRESHOLD_DISTANCE - 10)) {
- _noti_box_call_item_cb(obj, "deleted");
- } else {
- evas_object_map_enable_set(obj, EINA_FALSE);
- }
-
- if (box_h->vi != NULL) {
- quickpanel_vi_user_event_del(box_h->vi);
- box_h->vi = NULL;
- }
- }
-
- box_h->state = NOTIBOX_STATE_NORMAL;
-}
-
-HAPI Evas_Object *quickpanel_noti_box_create(Evas_Object *parent, notification_ly_type_e layout)
-{
- Evas_Object *box = NULL;
-
- box = elm_layout_add(parent);
-
- if (layout == NOTIFICATION_LY_NOTI_EVENT_SINGLE
- || layout == NOTIFICATION_LY_NOTI_EVENT_MULTIPLE) {
- elm_layout_file_set(box, DEFAULT_EDJ,
- "quickpanel/notibox/single_multi");
- } else if (layout == NOTIFICATION_LY_NOTI_THUMBNAIL) {
- elm_layout_file_set(box, DEFAULT_EDJ, "quickpanel/notibox/thumbnail");
- } else {
- elm_layout_file_set(box, DEFAULT_EDJ,
- "quickpanel/notibox/single_multi");
- }
-
- evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
- evas_object_show(box);
-
- noti_box_h *box_h = (noti_box_h *) malloc(sizeof(noti_box_h));
- retif(box_h == NULL, NULL, "failed to allocate a memory");
-
- box_h->state = NOTIBOX_STATE_NORMAL;
- box_h->layout = layout;
- box_h->noti_node = NULL;
- evas_object_data_set(box, E_DATA_NOTI_BOX_H, box_h);
-
- Evas_Object *focus = quickpanel_accessibility_ui_get_focus_object(box);
- elm_object_part_content_set(box, "focus", focus);
-
- //add event
- elm_object_signal_callback_add(box,
- "selected",
- "edje",
- _signal_cb,
- parent
- );
-
- //add event
- elm_object_signal_callback_add(box,
- "button_1",
- "edje",
- _signal_cb,
- parent
- );
-
- //add event
- elm_object_signal_callback_add(box,
- "deleted",
- "edje",
- _signal_cb,
- parent
- );
-
- evas_object_event_callback_add(box, EVAS_CALLBACK_MOUSE_DOWN, _mouse_down_cb, NULL);
- evas_object_event_callback_add(box, EVAS_CALLBACK_MOUSE_MOVE, _mouse_move_cb, NULL);
- evas_object_event_callback_add(box, EVAS_CALLBACK_MOUSE_UP, _mouse_up_cb, NULL);
-
- return box;
-}
-
-static Evas_Object *_set_image(Evas_Object *noti_box, notification_h noti, char *image_path, notification_image_type_e image_type, const char *part, int is_stretch, int is_use_buffer)
-{
- Evas_Object *content = NULL;
- char *image = NULL;
- char ext[32] = {0,};
- void *memfile = NULL;
- size_t memfile_size = 0;
- retif(part == NULL, NULL,"invalid parameter");
-
- notification_get_image(noti, image_type, &image);
- if (image == NULL && image_path != NULL) {
- image = image_path;
- }
-
- if (image != NULL) {
- if (is_use_buffer == IMAGE_BY_BUFFER) {
- content = quickpanel_animated_icon_get(noti_box, image);
- if (content == NULL) {
- content = elm_image_add(noti_box);
-
- memfile = quickpanel_common_ui_get_buffer_from_image(image, &memfile_size, ext, sizeof(ext));
- if (memfile != NULL && memfile_size > 0) {
- _attach_memfile(noti_box, image_type, memfile);
- if (elm_image_memfile_set(content, memfile, memfile_size, ext,
- quickpanel_animated_image_get_groupname(image)) == EINA_FALSE) {
- ERR("failed to set memfile set");
- elm_image_file_set(content, image,
- quickpanel_animated_image_get_groupname(image));
- }
- } else {
- if (memfile) {
- free(memfile); // due to prevent
- }
- elm_image_file_set(content, image,
- quickpanel_animated_image_get_groupname(image));
- }
- }
- } else {
- content = _check_duplicated_image_loading(noti_box, part, image);
- if (content == NULL) {
- content = quickpanel_animated_icon_get(noti_box, image);
- if (content == NULL) {
- content = elm_image_add(noti_box);
-
- elm_image_file_set(content, image,
- quickpanel_animated_image_get_groupname(image));
- }
- } else {
- return content;
- }
- }
- if (is_stretch == IMAGE_RESIZE) {
- elm_image_aspect_fixed_set(content, EINA_FALSE);
- elm_image_resizable_set(content, EINA_TRUE, EINA_TRUE);
- } else {
- if (strcmp(part, BOX_PART_ICON) == 0 || strcmp(part, BOX_PART_ICON_SUB) == 0) {
- elm_image_resizable_set(content, EINA_FALSE, EINA_TRUE);
- } else {
- elm_image_aspect_fixed_set(content, EINA_TRUE);
- elm_image_fill_outside_set(content, EINA_TRUE);
- }
- }
-
- elm_object_part_content_set(noti_box, part, content);
- elm_object_signal_emit(noti_box, "object.show", part);
- }
-
- return content;
-}
-
-static int _set_text(Evas_Object *noti_box, notification_h noti, notification_text_type_e text_type, const char *part, char *str, int is_need_effect, int is_support_cr)
-{
- char buf[128] = { 0, };
-
- char *text = NULL;
- char *text_utf8 = NULL;
- time_t time = 0;
-
- if (str != NULL) {
- text = str;
- } else if (notification_get_time_from_text(noti, text_type, &time) == NOTIFICATION_ERROR_NONE) {
- if ((int)time > 0) {
- quickpanel_noti_util_get_time(time, buf, sizeof(buf));
- text = buf;
- }
- } else {
- notification_get_text(noti, text_type, &text);
- }
-
- if (text != NULL) {
- if (strlen(text) > 0) {
-
- if (is_support_cr == TEXT_CR) {
- text_utf8 = elm_entry_utf8_to_markup(text);
- if (text_utf8 != NULL) {
- elm_object_part_text_set(noti_box, part, text_utf8);
- free(text_utf8);
- } else {
- elm_object_part_text_set(noti_box, part, text);
- }
- } else {
- quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
- elm_object_part_text_set(noti_box, part, text);
- }
-
- if (is_need_effect == 1) {
- elm_object_signal_emit(noti_box, "object.show.effect", part);
- } else {
- elm_object_signal_emit(noti_box, "object.show", part);
- }
- }
-
- return strlen(text);
- }
-
- return 0;
-}
-
-static int _check_text_null(notification_h noti, notification_text_type_e text_type)
-{
- char *text = NULL;
-
- notification_get_text(noti, text_type, &text);
-
- if (text == NULL) {
- return 1;
- }
-
- return 0;
-}
-
-static int _check_image_null(notification_h noti, notification_image_type_e image_type)
-{
- char *image = NULL;
-
- notification_get_image(noti, image_type, &image);
-
- if (image == NULL) {
- return 1;
- }
-
- if (strncasecmp(image, "(null)", strlen(image)) == 0) {
- return 1;
- }
-
- return 0;
-}
-
-static void _noti_box_set_layout_single(Evas_Object *noti_box, notification_h noti)
-{
- char *dir = NULL;
- char *domain = NULL;
- char *pkgname = NULL;
- char *icon_path = NULL;
- int is_need_effect = 0;
- int is_contents_only = 0;
- int is_sub_info_1_only = 0;
- int is_contents_and_sub_info_2 = 0;
- Evas_Object *icon = NULL;
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- is_need_effect = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- is_contents_only = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) != 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- is_sub_info_1_only = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) != 1
- || _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) != 1)) {
- is_contents_and_sub_info_2 = 1;
- }
-
- DBG("is_contents_only:%d is_sub_info_1_only:%d", is_contents_only, is_sub_info_1_only);
-
- notification_get_pkgname(noti, &pkgname);
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_TITLE,
- "object.text.title", NULL, is_need_effect, TEXT_CR);
-
- if (is_contents_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents.multiline", NULL, is_need_effect, TEXT_CR);
- } else {
- if (is_contents_and_sub_info_2 == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents.multiline.short", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_NO_CR);
- }
-
- if (is_sub_info_1_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.multiline", NULL, is_need_effect, TEXT_CR);
- } else {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 0) {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.short", NULL, is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
- "object.text.info.sub.1", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_2,
- "object.text.info.2", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0) {
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- } else {
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON_SUB,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- }
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_BACKGROUND,
- "object.icon.background", IMAGE_NO_RESIZE, IMAGE_BY_BUFFER);
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
-
- icon_path = quickpanel_common_ui_get_pkginfo_icon(pkgname);
- if (icon_path != NULL) {
- _set_image(noti_box, NULL,
- icon_path, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- free(icon_path);
- }
- } else {
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- elm_object_signal_emit(noti_box, "box.show.dim", "box.prog");
- }
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
- elm_object_signal_emit(noti_box, "box.hide.icon.bg", "box.prog");
- elm_object_signal_emit(noti_box, "box.title.without.icon", "box.prog");
- }
- if (((_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 0
- || _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0)
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 0)) {
- elm_object_signal_emit(noti_box, "box.show.sub.bg", "box.prog");
- }
- }
-
-#ifdef QP_SCREENREADER_ENABLE
- _noti_box_set_rs_layout_single(noti_box, noti);
-#endif
-}
-
-static void _noti_box_set_layout_multi(Evas_Object *noti_box, notification_h noti)
-{
- char *pkgname = NULL;
- char *icon_path = NULL;
- char *dir = NULL;
- char *domain = NULL;
- int is_need_effect = 0;
- int is_contents_only = 0;
- int is_sub_info_1_only = 0;
- int is_contents_and_sub_info_2 = 0;
- Evas_Object *icon = NULL;
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- is_need_effect = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- is_contents_only = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) != 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- is_sub_info_1_only = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) != 1
- || _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) != 1)) {
- is_contents_and_sub_info_2 = 1;
- }
-
- DBG("is_sub_info_1_only:%d", is_sub_info_1_only);
-
- notification_get_pkgname(noti, &pkgname);
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_TITLE,
- "object.text.title", NULL, is_need_effect, TEXT_CR);
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT) == 0) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, "object.text.count", NULL,
- is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT, "object.text.contents", NULL,
- is_need_effect, TEXT_NO_CR);
- } else {
- if (is_contents_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents.multiline", NULL, is_need_effect, TEXT_CR);
- } else if (is_contents_and_sub_info_2 == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents.multiline.short", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
-
- if (is_sub_info_1_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.multiline", NULL, is_need_effect, TEXT_CR);
- } else {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 0) {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.short", NULL, is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
- "object.text.info.sub.1", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 0) {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_2,
- "object.text.info.2", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_2,
- "object.text.info.2.short", NULL, is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
- "object.text.info.sub.2", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
- }
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0) {
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- } else {
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON_SUB,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- }
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_BACKGROUND,
- "object.icon.background", IMAGE_NO_RESIZE, IMAGE_BY_BUFFER);
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
-
- icon_path = quickpanel_common_ui_get_pkginfo_icon(pkgname);
- if (icon_path != NULL) {
- _set_image(noti_box, NULL,
- icon_path, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- free(icon_path);
- }
- } else {
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- elm_object_signal_emit(noti_box, "box.show.dim", "box.prog");
- }
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
- elm_object_signal_emit(noti_box, "box.hide.icon.bg", "box.prog");
- elm_object_signal_emit(noti_box, "box.title.without.icon", "box.prog");
- }
- if (((_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 0
- || _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0)
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 0)) {
- elm_object_signal_emit(noti_box, "box.show.sub.bg", "box.prog");
- }
- }
-
-#ifdef QP_SCREENREADER_ENABLE
- _noti_box_set_rs_layout_multi(noti_box, noti);
-#endif
-}
-
-static void _noti_box_set_layout_thumbnail(Evas_Object *noti_box, notification_h noti)
-{
- char *pkgname = NULL;
- char *icon_path = NULL;
- char *dir = NULL;
- char *domain = NULL;
- int is_need_effect = 0;
- int is_sub_info_1_only = 0;
- int is_show_info = 0;
- Evas_Object *icon = NULL;
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- is_need_effect = 1;
- } else {
- is_need_effect = 0;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) != 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1) {
- is_sub_info_1_only = 1;
- }
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_1)!= 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_2) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_3) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_4) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_5) == 1) {
- is_show_info = 1;
- }
-
- notification_get_pkgname(noti, &pkgname);
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_TITLE,
- "object.text.title", NULL, is_need_effect, TEXT_CR);
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT) == 0) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, "object.text.count", NULL,
- is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT, "object.text.contents", NULL,
- is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_NO_CR);
- }
-
- if (is_show_info == 1) {
- if (is_sub_info_1_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.multiline", NULL, is_need_effect, TEXT_CR);
- } else {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 0) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1", NULL, is_need_effect, TEXT_NO_CR);
- }
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 0) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_2,
- "object.text.info.2", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
- }
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0) {
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0) {
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- }
- } else {
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 0) {
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON_SUB,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- }
- }
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_BACKGROUND,
- "object.icon.background", IMAGE_NO_RESIZE, IMAGE_BY_BUFFER);
-
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_1,
- "object.thumbnail.list.1", IMAGE_RESIZE, IMAGE_BY_BUFFER);
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_2,
- "object.thumbnail.list.2", IMAGE_RESIZE, IMAGE_BY_BUFFER);
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_3,
- "object.thumbnail.list.3", IMAGE_RESIZE, IMAGE_BY_BUFFER);
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_4,
- "object.thumbnail.list.4", IMAGE_RESIZE, IMAGE_BY_BUFFER);
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_5,
- "object.thumbnail.list.5", IMAGE_RESIZE, IMAGE_BY_BUFFER);
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
-
- icon_path = quickpanel_common_ui_get_pkginfo_icon(pkgname);
- if (icon_path != NULL) {
- _set_image(noti_box, NULL,
- icon_path, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- free(icon_path);
- }
- } else {
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- elm_object_signal_emit(noti_box, "box.show.dim", "box.prog");
- }
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
- elm_object_signal_emit(noti_box, "box.hide.icon.bg", "box.prog");
- elm_object_signal_emit(noti_box, "box.title.without.icon", "box.prog");
- }
- if (((_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 0
- || _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0)
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 0)) {
- elm_object_signal_emit(noti_box, "box.show.sub.bg", "box.prog");
- }
- }
-
-#ifdef QP_SCREENREADER_ENABLE
- _noti_box_set_rs_layout_thumbnail(noti_box, noti);
-#endif
-}
-
-static void _noti_box_set_layout(Evas_Object *noti_box, notification_h noti, notification_ly_type_e layout)
-{
-
- DBG("notification box layout:%d", layout);
-
- switch (layout) {
- case NOTIFICATION_LY_NOTI_EVENT_SINGLE:
- _noti_box_set_layout_single(noti_box, noti);
- break;
- case NOTIFICATION_LY_NOTI_EVENT_MULTIPLE:
- _noti_box_set_layout_multi(noti_box, noti);
- break;
- case NOTIFICATION_LY_NOTI_THUMBNAIL:
- _noti_box_set_layout_thumbnail(noti_box, noti);
- break;
- case NOTIFICATION_LY_NONE:
- case NOTIFICATION_LY_ONGOING_EVENT:
- case NOTIFICATION_LY_ONGOING_PROGRESS:
- case NOTIFICATION_LY_MAX:
- ERR("not supported layout type:%d", layout);
- break;
- }
-}
-
-HAPI void quickpanel_noti_box_remove(Evas_Object *noti_box)
-{
-
- retif(noti_box == NULL, , "invalid parameter");
-
- noti_box_h *noti_box_h = evas_object_data_get(noti_box, E_DATA_NOTI_BOX_H);
-
- evas_object_data_del(noti_box, E_DATA_NOTI_BOX_H);
- if (noti_box_h != NULL) {
- free(noti_box_h);
- }
-
- evas_object_data_del(noti_box, E_DATA_CB_SELECTED_ITEM);
- evas_object_data_del(noti_box, E_DATA_CB_DELETED_ITEM);
-
- _deattach_memfile_all(noti_box);
-
- evas_object_del(noti_box);
- noti_box = NULL;
-}
-
-HAPI void quickpanel_noti_box_node_set(Evas_Object *noti_box, void *noti_node)
-{
- int priv_id = -1;
- noti_node_item *item = noti_node;
- retif(noti_box == NULL, , "invalid parameter");
- retif(item == NULL, , "invalid parameter");
- retif(item->noti == NULL, , "invalid parameter");
-
- noti_box_h *noti_box_data = evas_object_data_get(noti_box, E_DATA_NOTI_BOX_H);
-
- notification_get_id(item->noti, NULL, &priv_id);
-
- if (noti_box_data != NULL) {
- noti_box_data->noti_node = item;
- noti_box_data->priv_id = priv_id;
-
- _noti_box_set_layout(noti_box, item->noti, noti_box_data->layout);
- }
-}
-
-HAPI void *quickpanel_noti_box_node_get(Evas_Object *noti_box)
-{
- retif(noti_box == NULL, NULL, "invalid parameter");
-
- noti_box_h *noti_box_data = evas_object_data_get(noti_box, E_DATA_NOTI_BOX_H);
-
- if (noti_box_data != NULL) {
- return noti_box_data->noti_node;
- }
-
- return NULL;
-}
-
-#ifdef QP_SCREENREADER_ENABLE
-static void _noti_box_focus_selected_cb(void *data, Evas_Object *obj, void *event_info)
-{
- Evas_Object *noti_box = data;
- retif(noti_box == NULL, , "invalid parameter");
-
- _noti_box_call_item_cb(noti_box, "selected");
-
-}
-#endif
-
-HAPI void quickpanel_noti_box_set_item_selected_cb(Evas_Object *noti_box, void(*selected_cb)(void *data, Evas_Object *obj))
-{
- retif(noti_box == NULL, , "invalid parameter");
- retif(selected_cb == NULL, , "invalid parameter");
-
- evas_object_data_set(noti_box, E_DATA_CB_SELECTED_ITEM, selected_cb);
-
-#ifdef QP_SCREENREADER_ENABLE
- Evas_Object *ao = NULL;
- ao = quickpanel_accessibility_screen_reader_object_get(noti_box,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", noti_box);
- if (ao != NULL) {
- evas_object_smart_callback_add(ao, "clicked", _noti_box_focus_selected_cb, noti_box);
- }
-#endif
-}
-
-HAPI void quickpanel_noti_box_set_item_button_1_cb(Evas_Object *noti_box, void(*button_1_cb)(void *data, Evas_Object *obj))
-{
- retif(noti_box == NULL, , "invalid parameter");
- retif(button_1_cb == NULL, , "invalid parameter");
-
- evas_object_data_set(noti_box, E_DATA_CB_BUTTON_1, button_1_cb);
-}
-
-HAPI void quickpanel_noti_box_set_item_deleted_cb(Evas_Object *noti_box, void(*deleted_cb)(void *data, Evas_Object *obj))
-{
- retif(noti_box == NULL, , "invalid parameter");
- retif(deleted_cb == NULL, , "invalid parameter");
-
- evas_object_data_set(noti_box, E_DATA_CB_DELETED_ITEM, deleted_cb);
-}
-
-HAPI void quickpanel_noti_box_item_dragging_cancel(Evas_Object *noti_box)
-{
- retif(noti_box == NULL, , "invalid parameter");
-
- evas_object_map_enable_set(noti_box, EINA_FALSE);
-}
-
-HAPI void quickpanel_noti_box_item_update(Evas_Object *noti_box)
-{
- retif(noti_box == NULL, , "invalid parameter");
-
- noti_node_item *item = NULL;
- noti_box_h *noti_box_data = evas_object_data_get(noti_box, E_DATA_NOTI_BOX_H);
-
- if (noti_box_data != NULL) {
- if (noti_box_data->noti_node != NULL) {
-
- item = quickpanel_noti_node_get_by_priv_id(noti_box_data->priv_id);
-
- if (item != NULL) {
- _deattach_memfile_all(noti_box);
- _text_clean_all(noti_box);
-
- _noti_box_set_layout(noti_box, item->noti, noti_box_data->layout);
- }
- }
- }
-}
+++ /dev/null
-/*
- * 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.
- * 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.
- *
- */
-
-
-#ifndef __QUICKPANEL_NOTI_BOX_H__
-#define __QUICKPANEL_NOTI_BOX_H__
-
-#define E_DATA_NOTI_BOX_H "noti_box"
-#define E_DATA_CB_SELECTED_ITEM "noti_box_cb_selected"
-#define E_DATA_CB_BUTTON_1 "noti_box_cb_button_1"
-#define E_DATA_CB_DELETED_ITEM "noti_box_cb_deleted"
-#define E_DATA_NOTI_BOX_MB_BG "noti_box_mb"
-
-typedef enum _qp_notibox_state_type {
- NOTIBOX_STATE_NORMAL = 0,
- NOTIBOX_STATE_GETSTURE_WAIT,
- NOTIBOX_STATE_GETSTURE_CANCELED,
- NOTIBOX_STATE_DELETED,
-} qp_notibox_state_type;
-
-typedef struct _noti_box_h {
- int status;
- int priv_id;
- void *noti_node;
- notification_ly_type_e layout;
-
- QP_VI *vi;
- Ecore_Animator *animator;
-
- int obj_w;
- int obj_h;
- int press_x;
- int press_y;
- int distance;
- int need_to_cancel_press;
- qp_notibox_state_type state;
-} noti_box_h;
-
-extern Evas_Object *quickpanel_noti_box_create(Evas_Object *parent, notification_ly_type_e layout);
-extern void quickpanel_noti_box_node_set(Evas_Object *noti_box, void *noti_node);
-extern void *quickpanel_noti_box_node_get(Evas_Object *noti_box);
-extern void quickpanel_noti_box_remove(Evas_Object *noti_box);
-extern void quickpanel_noti_box_set_item_selected_cb(Evas_Object *noti_box, void(*selected_cb)(void *data, Evas_Object *obj));
-extern void quickpanel_noti_box_set_item_button_1_cb(Evas_Object *noti_box, void(*button_1_cb)(void *data, Evas_Object *obj));
-extern void quickpanel_noti_box_set_item_deleted_cb(Evas_Object *noti_box, void(*deleted_cb)(void *data, Evas_Object *obj));
-extern void quickpanel_noti_box_item_dragging_cancel(Evas_Object *noti_box);
-extern void quickpanel_noti_box_item_update(Evas_Object *noti_box);
-#endif
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <notification.h>
-#include <E_DBus.h>
-
-#include "quickpanel-ui.h"
-#include "common_uic.h"
-#include "common.h"
-#include "list_util.h"
-#include "quickpanel_def.h"
-#include "noti_gridbox.h"
-#include "vi_manager.h"
-#include "noti_box.h"
-
-#define E_DATA_LAYOUT_PORTRAIT "layout_portrait"
-#define E_DATA_LAYOUT_LANDSCAPE "layout_landscape"
-#define E_DATA_CB_DELETE_ITEM "cb_delete_item"
-#define E_DATA_CB_REMOVED "cb_removed"
-#define E_DATA_APP_DATA "app_data"
-
-typedef struct _gridbox_info_layout {
- int n_per_rows;
- int padding_top;
- int padding_left;
- int padding_right;
- int padding_bottom;
- int padding_between;
- int child_w;
- int child_h;
- double scale;
- int limit_w;
-} gridbox_info_layout;
-
-static Eina_Bool _anim_init_cb(void *data);
-static Eina_Bool _anim_job_cb(void *data);
-static Eina_Bool _anim_done_cb(void *data);
-
-static gridbox_info_layout *_gridbox_get_layout(Evas_Object *gridbox)
-{
- struct appdata *ad = quickpanel_get_app_data();
- gridbox_info_layout *info_layout = NULL;
-
- retif(gridbox == NULL, NULL, "invalid parameter");
- retif(ad == NULL, NULL, "invalid data.");
-
- if (ad->angle == 270 || ad->angle == 90) {
- info_layout = evas_object_data_get(gridbox, E_DATA_LAYOUT_LANDSCAPE);
- } else {
- info_layout = evas_object_data_get(gridbox, E_DATA_LAYOUT_PORTRAIT);
- }
-
- return info_layout;
-}
-
-static void _gridbox_layout_get_pos(int order, int *x, int *y, void *data)
-{
- gridbox_info_layout *info_layout = data;
- retif(info_layout == NULL, , "invalid parameter");
-
- int n_per_row = info_layout->n_per_rows;
-
- int row = (order - 1) / n_per_row;
- int column = (order - 1) - (row * n_per_row);
-
- int row_x = info_layout->padding_left
- + ((info_layout->child_w + info_layout->padding_between) * column);
-
- int row_y = info_layout->padding_top
- + ((info_layout->child_h + info_layout->padding_between) * row);
-
- if (x != NULL) {
- *x = row_x;
- }
-
- if (y != NULL) {
- *y = row_y;
- }
-}
-
-static void _gridbox_layout_get_coord(Evas_Object *gridbox, int num_child, int index, void *layout_data, int *coord_x, int *coord_y)
-{
- int x, y, w, h;
- int off_x = 0, off_y = 0;
- int child_w;
- int space_w = 0;
- int num_padding_between = 0;
- struct appdata *ad = quickpanel_get_app_data();
- gridbox_info_layout *info_layout = NULL;
-
- retif(gridbox == NULL, , "invalid parameter");
- retif(ad == NULL, , "invalid data.");
-
- if (layout_data != NULL) {
- info_layout = (gridbox_info_layout *) layout_data;
- } else {
- info_layout = _gridbox_get_layout(gridbox);
- }
- retif(info_layout == NULL, , "invalid data.");
-
- //box geometry
- evas_object_geometry_get(gridbox, &x, &y, &w, &h);
-
- num_padding_between = info_layout->n_per_rows / 2;
- num_padding_between += (info_layout->n_per_rows > 1 && (info_layout->n_per_rows % 2) > 0) ? 1 : 0;
-
- space_w = (info_layout->padding_left * 2) + (info_layout->padding_between * num_padding_between);
- child_w = (info_layout->limit_w - space_w) / info_layout->n_per_rows;
-
- info_layout->child_w = child_w;
- _gridbox_layout_get_pos(index, &off_x, &off_y, info_layout);
-
- if (coord_x != NULL) {
- *coord_x = x + off_x;
- }
- if (coord_y != NULL) {
- *coord_y = y + off_y;
- }
-}
-
-static void _gridbox_layout(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
-{
- int n_children;
- int x, y;
- int off_x = 0, off_y = 0;
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object_Box_Option *opt;
- int child_w;
- int space_w = 0;
- int num_padding_between = 0;
-
- retif(o == NULL, , "invalid parameter");
- retif(priv == NULL, , "invalid parameter");
- retif(data == NULL, , "invalid parameter");
-
- gridbox_info_layout *info_layout = _gridbox_get_layout(data);
- retif(info_layout == NULL, , "failed to get layout data");
-
- n_children = eina_list_count(priv->children);
- if (!n_children) {
- evas_object_size_hint_min_set(o, ELM_SCALE_SIZE(-1), ELM_SCALE_SIZE(0));
- return;
- }
-
- //box geometry
- evas_object_geometry_get(o, &x, &y, NULL, NULL);
-
- num_padding_between = info_layout->n_per_rows / 2;
- num_padding_between += (info_layout->n_per_rows > 1 && (info_layout->n_per_rows % 2) > 0) ? 1 : 0;
-
- space_w = (info_layout->padding_left * 2) + (info_layout->padding_between * num_padding_between);
- child_w = (info_layout->limit_w - space_w) / info_layout->n_per_rows;
-
- info_layout->child_w = child_w;
-
- int order_children = 1;
- EINA_LIST_FOREACH_SAFE(priv->children, l, l_next, opt) {
- _gridbox_layout_get_pos(order_children, &off_x, &off_y, info_layout);
- evas_object_move(opt->obj, x + off_x, y + off_y);
- evas_object_size_hint_min_set(opt->obj, info_layout->child_w,
- info_layout->child_h);
- evas_object_resize(opt->obj, info_layout->child_w,
- info_layout->child_h);
- order_children++;
- }
-
- evas_object_size_hint_min_set(o, ELM_SCALE_SIZE(-1), off_y + info_layout->child_h + info_layout->padding_bottom);
-}
-
-HAPI Evas_Object *quickpanel_noti_gridbox_create(Evas_Object *parent, void *data)
-{
-
- retif(parent == NULL, NULL, "invalid parameter");
- retif(data == NULL, NULL, "invalid parameter");
- struct appdata *ad = data;
- Evas_Object *gridbox = NULL;
-
- gridbox_info_layout *info_layout_portrait = NULL;
- gridbox_info_layout *info_layout_landscape = NULL;
-
- info_layout_portrait = (gridbox_info_layout *) malloc(sizeof(gridbox_info_layout));
- retif(info_layout_portrait == NULL, NULL, "memory allocation failed");
- info_layout_portrait->padding_between = 12 * ad->scale;
- info_layout_portrait->padding_top = 0;
- info_layout_portrait->padding_left = 14 * ad->scale;
- info_layout_portrait->padding_bottom = 12 * ad->scale;
- info_layout_portrait->n_per_rows = 2;
- info_layout_portrait->child_w = 0; //340;
- info_layout_portrait->child_h = BOX_HEIGHT_P * ad->scale; //400;
- info_layout_portrait->limit_w = ad->win_width; //400;
- info_layout_portrait->scale = ad->scale;
-
- info_layout_landscape = (gridbox_info_layout *) malloc(sizeof(gridbox_info_layout));
- if (info_layout_landscape == NULL) {
- free(info_layout_portrait);
- ERR("memory allocation failed");
- return NULL;
- }
- info_layout_landscape->padding_between = 12 * ad->scale;
- info_layout_landscape->padding_top = 0;
- info_layout_landscape->padding_left = 14 * ad->scale;
- info_layout_landscape->padding_bottom = 12 * ad->scale;
- info_layout_landscape->n_per_rows = 3;
- info_layout_landscape->child_w = 0; //409;
- info_layout_landscape->child_h = BOX_HEIGHT_L * ad->scale; //400;
- info_layout_landscape->limit_w = ad->win_height; //400;
- info_layout_landscape->scale = ad->scale;
-
- gridbox = elm_box_add(parent);
- evas_object_size_hint_weight_set(gridbox, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(gridbox, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- elm_box_layout_set(gridbox, _gridbox_layout, gridbox, NULL);
- evas_object_show(gridbox);
-
- evas_object_data_set(gridbox, E_DATA_LAYOUT_PORTRAIT, info_layout_portrait);
- evas_object_data_set(gridbox, E_DATA_LAYOUT_LANDSCAPE,
- info_layout_landscape);
- evas_object_data_set(gridbox, E_DATA_CB_DELETE_ITEM, NULL);
- evas_object_data_set(gridbox, E_DATA_APP_DATA, ad);
-
- qp_item_data *qid
- = quickpanel_list_util_item_new(QP_ITEM_TYPE_NOTI, NULL);
- quickpanel_list_util_item_set_tag(gridbox, qid);
-
- return gridbox;
-}
-
-HAPI void quickpanel_noti_gridbox_remove(Evas_Object *gridbox)
-{
- retif(gridbox == NULL, , "invalid parameter");
-
- gridbox_info_layout *info_layout_portrait = evas_object_data_get(gridbox,
- E_DATA_LAYOUT_PORTRAIT);
- gridbox_info_layout *info_layout_landscape = evas_object_data_get(gridbox,
- E_DATA_LAYOUT_LANDSCAPE);
-
- quickpanel_noti_gridbox_remove_all_item(gridbox, 0);
- evas_object_data_del(gridbox, E_DATA_LAYOUT_PORTRAIT);
- evas_object_data_del(gridbox, E_DATA_LAYOUT_LANDSCAPE);
- evas_object_data_del(gridbox, E_DATA_CB_DELETE_ITEM);
- evas_object_data_del(gridbox, E_DATA_APP_DATA);
- quickpanel_list_util_item_del_tag(gridbox);
- evas_object_del(gridbox);
- gridbox = NULL;
-
- if (info_layout_portrait != NULL) {
- free(info_layout_portrait);
- }
- if (info_layout_landscape != NULL) {
- free(info_layout_landscape);
- }
-}
-
-HAPI void quickpanel_noti_gridbox_set_item_deleted_cb(Evas_Object *gridbox, void(*deleted_cb)(void *data, Evas_Object *obj))
-{
- retif(gridbox == NULL, , "invalid parameter");
- retif(deleted_cb == NULL, , "invalid parameter");
-
- evas_object_data_set(gridbox, E_DATA_CB_DELETE_ITEM, deleted_cb);
-}
-
-static void _gridbox_call_item_deleted_cb(Evas_Object *gridbox, void *data, Evas_Object *obj)
-{
- retif(gridbox == NULL, , "invalid parameter");
-
- void (*deleted_cb)(void *data, Evas_Object *obj) = NULL;
-
- deleted_cb = evas_object_data_get(gridbox, E_DATA_CB_DELETE_ITEM);
-
- if (deleted_cb != NULL) {
- deleted_cb(data, obj);
- }
-}
-
-HAPI void quickpanel_noti_gridbox_add_item(Evas_Object *gridbox, Evas_Object *item, int is_prepend)
-{
- QP_VI *vi = NULL;
- const char *signal = NULL;
- gridbox_info_layout *info_layout = NULL;
-
- retif(gridbox == NULL, , "invalid parameter");
- retif(item == NULL, , "invalid parameter");
-
- struct appdata *ad = evas_object_data_get(gridbox, E_DATA_APP_DATA);
- if (ad != NULL) {
- if (ad->angle == 270 || ad->angle == 90) {
- signal = "box.landscape";
- } else {
- signal = "box.portrait";
- }
- }
-
- DBG("set to %s, %x", signal, item);
- elm_object_signal_emit(item, signal, "box.prog");
- edje_object_message_signal_process(_EDJ(item));
- elm_layout_sizing_eval(item);
-
- info_layout = _gridbox_get_layout(gridbox);
- retif(info_layout == NULL, , "invalid parameter");
-
- _gridbox_layout_get_coord(gridbox, 0, 1, NULL, NULL, NULL);
-
- evas_object_size_hint_min_set(item, info_layout->child_w,
- info_layout->child_h);
- evas_object_resize(item, info_layout->child_w,
- info_layout->child_h);
-
- vi = quickpanel_vi_new_with_data(
- VI_OP_INSERT,
- QP_ITEM_TYPE_NOTI,
- gridbox,
- item,
- _anim_init_cb,
- _anim_job_cb,
- _anim_done_cb,
- _anim_done_cb,
- vi,
- NULL,
- is_prepend,
- 0);
- quickpanel_vi_start(vi);
-}
-
-static void _anim_init_insert(void *data)
-{
- QP_VI *vi = data;
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
-
- Evas_Object *gridbox = vi->container;
- Evas_Object *item = vi->target;
-
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid parameter");
-
- evas_object_clip_set(item, evas_object_clip_get(gridbox));
- evas_object_color_set(item, 0, 0, 0, 0);
-}
-
-static void _anim_job_insert(void *data)
-{
- QP_VI *vi = data;
- int index = 1, index_child = 1;
- int is_prepend = 0;
- int coord_x, coord_y = 0;
- int coord_old_x, coord_old_y = 0;
- int coord_fix_x, coord_fix_y = 0;
- Evas_Object *gridbox = NULL;
- Evas_Object *item = NULL;
- Elm_Transit *transit_layout = NULL;
- Elm_Transit *transit_fadein = NULL;
- gridbox_info_layout *info_layout = NULL;
-
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
-
- gridbox = vi->container;
- item = vi->target;
- is_prepend = vi->extra_flag_1;
-
- info_layout = _gridbox_get_layout(gridbox);
- retif(info_layout == NULL, , "invalid parameter");
-
- if (is_prepend != 1) {
- index_child = quickpanel_noti_gridbox_get_item_count(gridbox);
- }
- _gridbox_layout_get_coord(gridbox, 0, index_child, NULL, &coord_x, &coord_y);
- evas_object_move(item, coord_x, coord_y);
-
- if (is_prepend == 1) {
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *obj;
- Eina_List *item_list = elm_box_children_get(gridbox);
-
- DBG("all count:%d", eina_list_count (item_list));
-
- EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
- if (obj != NULL) {
- transit_layout = elm_transit_add();
- if (transit_layout != NULL) {
- evas_object_geometry_get(obj, &coord_old_x, &coord_old_y, NULL, NULL);
- _gridbox_layout_get_coord(gridbox, 0, index + 1, NULL, &coord_x, &coord_y);
-
- coord_x = coord_x - coord_old_x;
- coord_y = coord_y - coord_old_y;
- coord_fix_x = (coord_x != 0) ? coord_x / coord_x : 0;
- coord_fix_y = (coord_y != 0) ? coord_y / coord_y : 0;
- elm_transit_effect_translation_add(transit_layout, 0, 0, coord_x + coord_fix_x, coord_y + coord_fix_y);
- elm_transit_object_add(transit_layout, obj);
- elm_transit_duration_set(transit_layout,
- quickpanel_vim_get_duration(VI_OP_REORDER));
- elm_transit_tween_mode_set(transit_layout,
- quickpanel_vim_get_tweenmode(VI_OP_REORDER));
- elm_transit_objects_final_state_keep_set(transit_layout, EINA_TRUE);
- elm_transit_go(transit_layout);
- } else {
- ERR("failed to create a transit");
- }
- }
- index++;
- }
-
- if (item_list != NULL) {
- eina_list_free(item_list);
- }
- }
-
- transit_fadein = elm_transit_add();
- if (transit_fadein != NULL) {
- elm_transit_object_add(transit_fadein, item);
- elm_transit_effect_color_add(transit_fadein, 0, 0, 0, 0, 255, 255, 255, 255);
- elm_transit_duration_set(transit_fadein,
- quickpanel_vim_get_duration(VI_OP_INSERT));
- elm_transit_tween_mode_set(transit_fadein,
- quickpanel_vim_get_tweenmode(VI_OP_INSERT));
- elm_transit_del_cb_set(transit_fadein,
- quickpanel_vi_done_cb_for_transit, vi);
- if (transit_layout != NULL) {
- elm_transit_chain_transit_add(transit_layout, transit_fadein);
- } else {
- elm_transit_go(transit_fadein);
- }
- } else {
- ERR("failed to create a transit");
- quickpanel_vi_done(vi);
- }
-}
-
-static void _anim_done_insert(void *data)
-{
- QP_VI *vi = data;
- retif(vi == NULL, , "invalid parameter");
-
- Evas_Object *gridbox = vi->container;
- Evas_Object *item = vi->target;
- int is_prepend = vi->extra_flag_1;
-
- retif(gridbox == NULL, , "invalid parameter");
- retif(item == NULL, , "invalid parameter");
-
- evas_object_color_set(item, 255, 255, 255, 255);
-
- if (is_prepend == GRIDBOX_PREPEND) {
- elm_box_pack_start(gridbox, item);
- } else {
- elm_box_pack_end(gridbox, item);
- }
-}
-
-static void _anim_job_delete(void *data)
-{
- QP_VI *vi = data;
- int coord_x, coord_y = 0;
- int coord_old_x, coord_old_y = 0;
- int coord_fix_x, coord_fix_y = 0;
-
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
-
- Elm_Transit *transit_layout = NULL;
- Elm_Transit *transit_fadein = NULL;
- Evas_Object *gridbox = vi->container;
- Evas_Object *item = vi->target;
-
- transit_fadein = elm_transit_add();
- if (transit_fadein != NULL) {
- elm_transit_object_add(transit_fadein, item);
- elm_transit_effect_color_add(transit_fadein, 255, 255, 255, 255, 0, 0, 0, 0);
- elm_transit_objects_final_state_keep_set(transit_fadein, EINA_TRUE);
- elm_transit_tween_mode_set(transit_fadein,
- quickpanel_vim_get_tweenmode(VI_OP_DELETE));
- elm_transit_duration_set(transit_fadein,
- quickpanel_vim_get_duration(VI_OP_DELETE));
- elm_transit_go(transit_fadein);
- } else {
- ERR("failed to create a transit");
- }
-
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *obj;
- Eina_List *item_list = elm_box_children_get(gridbox);
-
- DBG("all count:%d", eina_list_count (item_list));
-
- int index_child = 1;
- int is_start_relayout = 0;
- EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
- if (obj == item) {
- is_start_relayout = 1;
- } else if (obj != NULL && is_start_relayout == 1) {
- transit_layout = elm_transit_add();
- if (transit_layout != NULL) {
- evas_object_geometry_get(obj, &coord_old_x, &coord_old_y, NULL, NULL);
- _gridbox_layout_get_coord(gridbox, 0, index_child - 1, NULL, &coord_x, &coord_y);
-
- coord_x = coord_x - coord_old_x;
- coord_y = coord_y - coord_old_y;
- coord_fix_x = (coord_x != 0) ? coord_x/coord_x : 0;
- coord_fix_y = (coord_y != 0) ? coord_y/coord_y : 0;
- elm_transit_effect_translation_add(transit_layout, 0, 0, coord_x + coord_fix_x, coord_y + coord_fix_y);
- elm_transit_object_add(transit_layout, obj);
- elm_transit_duration_set(transit_layout,
- quickpanel_vim_get_duration(VI_OP_REORDER));
- elm_transit_tween_mode_set(transit_layout,
- quickpanel_vim_get_tweenmode(VI_OP_REORDER));
- elm_transit_objects_final_state_keep_set(transit_layout, EINA_TRUE);
- if (transit_fadein != NULL) {
- elm_transit_chain_transit_add(transit_fadein, transit_layout);
- }
- } else {
- ERR("failed to create a transit");
- }
- }
- index_child++;
- }
-
- if (item_list != NULL) {
- eina_list_free(item_list);
- }
-
- if (transit_layout != NULL) {
- elm_transit_del_cb_set(transit_layout, quickpanel_vi_done_cb_for_transit, vi);
- } else if (transit_fadein != NULL) {
- elm_transit_del_cb_set(transit_fadein, quickpanel_vi_done_cb_for_transit, vi);
- } else {
- ERR("failed to create a transit");
- quickpanel_vi_done(vi);
- }
-}
-
-static void _anim_done_delete(void *data)
-{
- QP_VI *vi = data;
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
-
- Evas_Object *gridbox = vi->container;
- Evas_Object *item = vi->target;
-
- elm_box_unpack(gridbox, item);
- quickpanel_noti_box_remove(item);
- _gridbox_call_item_deleted_cb(gridbox, quickpanel_noti_box_node_get(item), NULL);
-}
-
-HAPI void quickpanel_noti_gridbox_remove_item(Evas_Object *gridbox, Evas_Object *item, int with_animation)
-{
- QP_VI *vi = NULL;
- retif(gridbox == NULL, , "invalid parameter");
- retif(item == NULL, , "invalid parameter");
-
- if (with_animation == 1) {
- vi = quickpanel_vi_new_with_data(
- VI_OP_DELETE,
- QP_ITEM_TYPE_NOTI,
- gridbox,
- item,
- _anim_init_cb,
- _anim_job_cb,
- _anim_done_cb,
- _anim_done_cb,
- vi,
- NULL,
- 0,
- 0);
- quickpanel_vi_start(vi);
- } else {
- void *node = quickpanel_noti_box_node_get(item);
- elm_box_unpack(gridbox, item);
- quickpanel_noti_box_remove(item);
- _gridbox_call_item_deleted_cb(gridbox,
- node, NULL);
- }
-}
-
-static void _anim_job_delete_all(void *data)
-{
- QP_VI *vi = data;
- retif(vi == NULL, , "invalid parameter");
-
- quickpanel_vi_done(vi);
-}
-
-static void _anim_done_delete_all(void *data)
-{
- QP_VI *vi = data;
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *obj = NULL;
- Eina_List *item_list = NULL;
-
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
-
- Evas_Object *gridbox = vi->container;
-
- item_list = elm_box_children_get(gridbox);
- retif(item_list == NULL, , "invalid parameter");
-
- EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
- if (obj != NULL) {
- DBG("try to remove:%p", obj);
- quickpanel_noti_gridbox_remove_item(gridbox, obj, EINA_TRUE);
- }
- }
-
- if (item_list != NULL) {
- eina_list_free(item_list);
- }
-}
-
-HAPI void quickpanel_noti_gridbox_remove_all_item(Evas_Object *gridbox, int with_animation)
-{
- QP_VI *vi = NULL;
- retif(gridbox == NULL, , "invalid parameter");
-
- vi = quickpanel_vi_new_with_data(
- VI_OP_DELETE_ALL,
- QP_ITEM_TYPE_NOTI,
- gridbox,
- NULL,
- _anim_init_cb,
- _anim_job_cb,
- _anim_done_cb,
- _anim_done_cb,
- vi,
- NULL,
- 0,
- 0);
- quickpanel_vi_start(vi);
-}
-
-static void _anim_job_update(void *data)
-{
- QP_VI *vi = data;
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
-
- quickpanel_vi_done(data);
-}
-
-static void _anim_done_update(void *data)
-{
- QP_VI *vi = data;
- retif(vi == NULL, , "invalid parameter");
- retif(vi->container == NULL, , "invalid parameter");
- retif(vi->target == NULL, , "invalid parameter");
-
- Evas_Object *gridbox = vi->container;
- Evas_Object *item = vi->target;
-
- if (quickpanel_noti_gridbox_get_item_exist(gridbox, item) == 1) {
- quickpanel_noti_box_item_update(item);
- }
-}
-
-HAPI void quickpanel_noti_gridbox_update_item(Evas_Object *gridbox, Evas_Object *item)
-{
- QP_VI *vi = NULL;
- retif(gridbox == NULL, , "invalid parameter");
- retif(item == NULL, , "invalid parameter");
-
- vi = quickpanel_vi_new_with_data(
- VI_OP_UPDATE,
- QP_ITEM_TYPE_NOTI,
- gridbox,
- item,
- _anim_init_cb,
- _anim_job_cb,
- _anim_done_cb,
- _anim_done_cb,
- vi,
- NULL,
- 0,
- 0);
-
- retif(vi == NULL, , "quickpanel_vi_new_with_data returns NULL");
- vi->disable_interrupt_userevent = 1;
- vi->disable_freezing = 1;
- quickpanel_vi_start(vi);
-}
-
-HAPI void quickpanel_noti_gridbox_remove_and_add_item(Evas_Object *gridbox, Evas_Object *item ,void (*update_cb)(Evas_Object *list, void *data, int is_prepend) ,void *container, void *data, int pos)
-{
- QP_VI *vi = NULL;
- retif(gridbox == NULL, , "invalid parameter");
- retif(item == NULL, , "invalid parameter");
- retif(update_cb == NULL, , "invalid parameter");
- retif(container == NULL, , "invalid parameter");
- retif(data == NULL, , "invalid parameter");
-
- vi = quickpanel_vi_new_with_data(
- VI_OP_DELETE,
- QP_ITEM_TYPE_NOTI,
- gridbox,
- item,
- _anim_init_cb,
- _anim_job_cb,
- _anim_done_cb,
- _anim_done_cb,
- vi,
- NULL,
- 0,
- 0);
- quickpanel_vi_start(vi);
-}
-
-HAPI void gridbox_finalize_rotation_cb(void *data)
-{
- retif(data == NULL, , "invalid parameter");
- Evas_Object *gridbox = data;
-
- elm_box_recalculate(gridbox);
-}
-
-HAPI void quickpanel_noti_gridbox_rotation(Evas_Object *gridbox, int angle)
-{
- const char *signal = NULL;
-
- retif(gridbox == NULL, , "invalid parameter");
-
- gridbox_info_layout *info_layout_portrait = evas_object_data_get(gridbox,
- E_DATA_LAYOUT_PORTRAIT);
- gridbox_info_layout *info_layout_landscape = evas_object_data_get(gridbox,
- E_DATA_LAYOUT_LANDSCAPE);
-
- retif(info_layout_portrait == NULL || info_layout_landscape == NULL, ,
- "gridbox is crashed");
-
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *obj;
- Eina_List *item_list = elm_box_children_get(gridbox);
-
- if (angle == 270 || angle == 90) {
- signal = "box.landscape";
- } else {
- signal = "box.portrait";
- }
-
- EINA_LIST_FOREACH_SAFE(item_list, l, l_next, obj) {
- if (obj != NULL) {
- elm_object_signal_emit(obj, signal, "box.prog");
- edje_object_message_signal_process(_EDJ(obj));
- DBG("set to %s, %x", signal, obj);
- }
- }
-
- if (item_list != NULL) {
- eina_list_free(item_list);
- }
-
- elm_box_layout_set(gridbox, _gridbox_layout, gridbox, NULL);
- DBG("rotation angle is %d", angle);
-}
-
-HAPI int quickpanel_noti_gridbox_get_item_count(Evas_Object *gridbox)
-{
- int item_count = 0;
- Eina_List *items = NULL;
- retif(gridbox == NULL, 0, "invalid parameter");
-
- if ((items = elm_box_children_get(gridbox)) != NULL) {
- item_count = eina_list_count(items);
- eina_list_free(items);
- return item_count;
- } else {
- return 0;
- }
-}
-
-HAPI int quickpanel_noti_gridbox_get_item_exist(Evas_Object *gridbox, Evas_Object *box)
-{
- int ret = 0;
- Eina_List *items = NULL;
- retif(gridbox == NULL, 0, "invalid parameter");
-
- if ((items = elm_box_children_get(gridbox)) != NULL) {
- if (eina_list_data_find(items, box) != NULL) {
- ret = 1;
- }
- eina_list_free(items);
- }
-
- return ret;
-}
-
-static Eina_Bool _anim_init_cb(void *data)
-{
- int i = 0;
- QP_VI *vi = data;
- retif(vi == NULL, EINA_FALSE, "invalid parameter");
-
- static qp_vi_op_table anim_init_table[] = {
- {
- .op_type = VI_OP_INSERT,
- .handler = _anim_init_insert,
- },
- {
- .op_type = VI_OP_NONE,
- .handler = NULL,
- },
- };
-
- for (i = 0; anim_init_table[i].op_type != VI_OP_NONE; i++) {
- if (anim_init_table[i].op_type != vi->op_type) {
- continue;
- }
-
- anim_init_table[i].handler(vi);
- break;
- }
-
- return EINA_TRUE;
-}
-
-static Eina_Bool _anim_job_cb(void *data)
-{
- int i = 0;
- QP_VI *vi = data;
- retif(vi == NULL, EINA_FALSE, "invalid parameter");
-
- static qp_vi_op_table anim_job_table[] = {
- {
- .op_type = VI_OP_INSERT,
- .handler = _anim_job_insert,
- },
- {
- .op_type = VI_OP_DELETE,
- .handler = _anim_job_delete,
- },
- {
- .op_type = VI_OP_DELETE_ALL,
- .handler = _anim_job_delete_all,
- },
- {
- .op_type = VI_OP_UPDATE,
- .handler = _anim_job_update,
- },
- {
- .op_type = VI_OP_NONE,
- .handler = NULL,
- },
- };
-
- for (i = 0; anim_job_table[i].op_type != VI_OP_NONE; i++) {
- if (anim_job_table[i].op_type != vi->op_type) {
- continue;
- }
-
- anim_job_table[i].handler(vi);
- break;
- }
-
- return EINA_TRUE;
-}
-
-static Eina_Bool _anim_done_cb(void *data)
-{
- int i = 0;
- QP_VI *vi = data;
- retif(vi == NULL, EINA_FALSE, "invalid parameter");
-
- static qp_vi_op_table anim_done_table[] = {
- {
- .op_type = VI_OP_INSERT,
- .handler = _anim_done_insert,
- },
- {
- .op_type = VI_OP_DELETE,
- .handler = _anim_done_delete,
- },
- {
- .op_type = VI_OP_DELETE_ALL,
- .handler = _anim_done_delete_all,
- },
- {
- .op_type = VI_OP_UPDATE,
- .handler = _anim_done_update,
- },
- {
- .op_type = VI_OP_NONE,
- .handler = NULL,
- },
- };
-
- for (i = 0; anim_done_table[i].op_type != VI_OP_NONE; i++) {
- if (anim_done_table[i].op_type != vi->op_type) {
- continue;
- }
-
- anim_done_table[i].handler(vi);
- break;
- }
-
- return EINA_TRUE;
-}
-
-HAPI int quickpanel_noti_gridbox_get_geometry(Evas_Object *gridbox, int *limit_h, int *limit_partial_h, int *limit_partial_w)
-{
-
- int count = 0;
- int num_last = 0;
- int x = 0, y = 0, w = 0, h = 0;
- Eina_List *list = NULL;
- gridbox_info_layout *info_layout = NULL;
-
- retif(gridbox == NULL, 0, "invalid parameter");
- retif(limit_h == NULL, 0, "invalid parameter");
- retif(limit_partial_h == NULL, 0, "invalid parameter");
- retif(limit_partial_w == NULL, 0, "invalid parameter");
- evas_object_geometry_get(gridbox, &x, &y, &w, &h);
-
- info_layout = _gridbox_get_layout(gridbox);
- retif(info_layout == NULL, 0, "invalid parameter");
-
- list = elm_box_children_get(gridbox);
- if (list != NULL) {
- count = eina_list_count(list);
- num_last = count % info_layout->n_per_rows;
- eina_list_free(list);
- } else {
- num_last = 0;
- }
-
- *limit_h = y + h;
- if (num_last > 0) {
- *limit_partial_h = *limit_h - info_layout->child_h;
- *limit_partial_w = num_last * info_layout->child_w;
- } else {
- *limit_partial_h = *limit_h;
- *limit_partial_w = 0;
- }
-
- return 1;
-}
-
-static void _notibox_deleted_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- quickpanel_uic_close_quickpanel(EINA_FALSE, EINA_FALSE);
-}
-
-HAPI void quickpanel_noti_gridbox_closing_trigger_set(Evas_Object *gridbox)
-{
- Evas_Object *item = NULL;
- Eina_List *items = NULL;
- retif(gridbox == NULL, , "invalid parameter");
-
- if ((items = elm_box_children_get(gridbox)) != NULL) {
- item = eina_list_nth(items, 0);
- if (item != NULL) {
- evas_object_event_callback_add(item,
- EVAS_CALLBACK_DEL, _notibox_deleted_cb, NULL);
- }
- eina_list_free(items);
- }
-}
+++ /dev/null
-/*
- * 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.
- * 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.
- *
- */
-
-
-#ifndef __QUICKPANEL_GRIDBOX_H__
-#define __QUICKPANEL_GRIDBOX_H__
-
-#define GRIDBOX_PREPEND 1
-#define GRIDBOX_APPEND 0
-
-extern Evas_Object *quickpanel_noti_gridbox_create(Evas_Object *parent, void *data);
-extern void quickpanel_noti_gridbox_remove(Evas_Object *gridbox);
-extern void quickpanel_noti_gridbox_add_item(Evas_Object *gridbox, Evas_Object *item, int is_prepend);
-extern void quickpanel_noti_gridbox_remove_item(Evas_Object *gridbox, Evas_Object *item, int with_animation);
-extern void quickpanel_noti_gridbox_rotation(Evas_Object *gridbox, int angle);
-extern void quickpanel_noti_gridbox_remove_and_add_item(Evas_Object *gridbox, Evas_Object *item ,void (*update_cb)(Evas_Object *list, void *data, int is_prepend) ,void *container, void *data, int pos);
-extern void quickpanel_noti_gridbox_remove_all_item(Evas_Object *gridbox, int with_animation);
-extern void quickpanel_noti_gridbox_set_item_deleted_cb(Evas_Object *gridbox, void(*deleted_cb)(void *data, Evas_Object *obj));
-extern int quickpanel_noti_gridbox_get_item_count(Evas_Object *gridbox);
-extern int quickpanel_noti_gridbox_get_geometry(Evas_Object *gridbox, int *limit_h, int *limit_partial_h, int *limit_partial_w);
-extern void quickpanel_noti_gridbox_update_item(Evas_Object *gridbox, Evas_Object *item);
-extern void quickpanel_noti_gridbox_closing_trigger_set(Evas_Object *gridbox);
-extern int quickpanel_noti_gridbox_get_item_exist(Evas_Object *gridbox, Evas_Object *box);
-#endif
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-#include <glib.h>
-
-#include <string.h>
-#include <notification.h>
-#include <notification_text_domain.h>
-#include <notification_internal.h>
-#include <system_settings.h>
-#include <vconf.h>
-
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <E_DBus.h>
-
-#include "quickpanel-ui.h"
-#include "common_uic.h"
-#include "common.h"
-#include "list_util.h"
-#include "quickpanel_def.h"
-#include "vi_manager.h"
-#include "noti_box.h"
-#include "noti_node.h"
-#include "noti.h"
-#include "noti_util.h"
-#include "noti_list_item.h"
-#include "animated_icon.h"
-
-#ifdef QP_SCREENREADER_ENABLE
-#include "accessibility.h"
-#endif
-
-#ifdef QP_ANIMATED_IMAGE_ENABLE
-#include "animated_image.h"
-#endif
-
-#define IMAGE_NO_RESIZE 0
-#define IMAGE_RESIZE 1
-
-#define IMAGE_BY_FILE 0
-#define IMAGE_BY_BUFFER 1
-
-#define TEXT_NO_CR 0
-#define TEXT_CR 1
-
-#define THRESHOLD_DRAGGING_TIME_LIMIT 1.0
-#define LIMIT_ZOOM_RATIO 0.55
-#define LIMIT_FADEOUT_RATIO 0.1
-#define THRESHOLD_DELETE_START 80
-#define THRESHOLD_DELETE_START_Y_LIMIT 60
-#define THRESHOLD_DISTANCE ((BOX_WIDTH_P >> 1))
-
-static Evas_Object *_check_duplicated_image_loading(Evas_Object *obj, const char *part, const char *file_path)
-{
- Evas_Object *old_ic = NULL;
- const char *old_ic_path = NULL;
-
- retif(obj == NULL, NULL, "Invalid parameter!");
- retif(part == NULL, NULL, "Invalid parameter!");
- retif(file_path == NULL, NULL, "Invalid parameter!");
-
- old_ic = elm_object_part_content_get(obj, part);
-
- if (quickpanel_animated_icon_is_same_icon(old_ic, file_path) == 1) {
- return old_ic;
- }
-
- if (old_ic != NULL) {
- elm_image_file_get(old_ic, &old_ic_path, NULL);
- if (old_ic_path != NULL) {
- if (strcmp(old_ic_path, file_path) == 0) {
- return old_ic;
- }
- }
-
- elm_object_part_content_unset(obj, part);
- evas_object_del(old_ic);
- old_ic = NULL;
- }
-
- return NULL;
-}
-
-static void _attach_memfile(Evas_Object *noti_box, notification_image_type_e image_type, void *memfile)
-{
- char buf[32] = {0,};
-
- snprintf(buf, sizeof(buf), "%s_%d", E_DATA_NOTI_BOX_MB_BG, image_type);
-
- void *memfile_attached = evas_object_data_get(noti_box, buf);
- if (memfile_attached != NULL) {
- free(memfile_attached);
- }
- evas_object_data_set(noti_box, buf, memfile);
-}
-
-static void _deattach_memfile_all(Evas_Object *noti_box)
-{
- char buf[32] = {0,};
- void *memfile = NULL;
- int i = NOTIFICATION_TEXT_TYPE_NONE + 1;
-
- for ( ; i < NOTIFICATION_TEXT_TYPE_MAX; i++) {
- snprintf(buf, sizeof(buf), "%s_%d", E_DATA_NOTI_BOX_MB_BG, i);
-
- memfile = evas_object_data_get(noti_box, buf);
- if (memfile != NULL) {
- free(memfile);
- }
- evas_object_data_set(noti_box, buf, NULL);
- evas_object_data_del(noti_box, buf);
- }
-}
-
-static void _text_clean_all(Evas_Object *noti_box)
-{
- int i = 0;
- const char *text_parts[] = {
- "object.text.title",
- "object.text.contents",
- "object.text.contents.multiline.short",
- "object.text.contents.multiline",
- "object.text.count",
- "object.text.time",
- "object.text.info.1",
- "object.text.info.1.short",
- "object.text.info.1.multiline",
- "object.text.info.sub.1",
- "object.text.info.2",
- "object.text.info.2.short",
- "object.text.info.sub.2",
- NULL
- };
-
- for (i = 0; text_parts[i] != NULL; i++) {
- elm_object_part_text_set(noti_box, text_parts[i], "");
- elm_object_part_text_set(noti_box, text_parts[i], NULL);
- }
-}
-
-#ifdef QP_SCREENREADER_ENABLE
-static inline void _check_and_add_to_buffer(notification_h noti, notification_text_type_e text_type, Eina_Strbuf *str_buf)
-{
- char buf[256] = { 0, };
- char buf_number[QP_UTIL_PHONE_NUMBER_MAX_LEN * 2] = { 0, };
-
- char *text = NULL;
- time_t time = 0;
-
- if (notification_get_time_from_text(noti, text_type, &time) == NOTIFICATION_ERROR_NONE) {
- if ((int)time > 0) {
- quickpanel_noti_util_get_time(time, buf, sizeof(buf));
- text = buf;
- }
- } else {
- notification_get_text(noti, text_type, &text);
- }
-
- if (text != NULL) {
- if (strlen(text) > 0) {
- if (quickpanel_common_util_is_phone_number(text)) {
- quickpanel_common_util_phone_number_tts_make(buf_number, text,
- (QP_UTIL_PHONE_NUMBER_MAX_LEN * 2) - 1);
- DBG("[%s]", buf_number);
- eina_strbuf_append(str_buf, buf_number);
- } else {
- eina_strbuf_append(str_buf, text);
- }
- eina_strbuf_append_char(str_buf, '\n');
- }
- }
-}
-
-static void _noti_box_set_rs_layout_single(Evas_Object *noti_box, notification_h noti)
-{
- Evas_Object *ao = NULL;
- Eina_Strbuf *str_buf = NULL;
- char *dir = NULL;
- char *domain = NULL;
-
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- str_buf = eina_strbuf_new();
- retif(str_buf == NULL, , "invalid parameter");
-
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_TITLE, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_CONTENT, str_buf);
-
- time_t noti_time = 0.0;
- char buf[512] = {0,};
- notification_get_time(noti, ¬i_time);
- if (noti_time == 0.0) {
- notification_get_insert_time(noti, ¬i_time);
- }
- quickpanel_noti_util_get_time(noti_time, buf, 512);
- eina_strbuf_append(str_buf, buf);
- eina_strbuf_append_char(str_buf, '\n');
-
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_1, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_2, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2, str_buf);
-
- if (str_buf != NULL) {
- ao = quickpanel_accessibility_screen_reader_object_get(noti_box,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", noti_box);
- if (ao != NULL) {
- elm_access_info_set(ao, ELM_ACCESS_TYPE, _("IDS_QP_BUTTON_NOTIFICATION"));
- elm_access_info_set(ao, ELM_ACCESS_INFO, eina_strbuf_string_get(str_buf));
- }
-
- eina_strbuf_free(str_buf);
- }
-}
-
-static void _noti_box_set_rs_layout_multi(Evas_Object *noti_box, notification_h noti)
-{
- DBG("");
-
- Evas_Object *ao = NULL;
- Eina_Strbuf *str_buf = NULL;
- char *dir = NULL;
- char *domain = NULL;
-
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- str_buf = eina_strbuf_new();
- retif(str_buf == NULL, , "invalid parameter");
-
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_TITLE, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_CONTENT, str_buf);
-
- time_t noti_time = 0.0;
- char buf[512] = {0,};
- notification_get_time(noti, ¬i_time);
- if (noti_time == 0.0) {
- notification_get_insert_time(noti, ¬i_time);
- }
- quickpanel_noti_util_get_time(noti_time, buf, 512);
- eina_strbuf_append(str_buf, buf);
- eina_strbuf_append_char(str_buf, '\n');
-
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_1, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_2, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2, str_buf);
-
- if (str_buf != NULL) {
- ao = quickpanel_accessibility_screen_reader_object_get(noti_box,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", noti_box);
- if (ao != NULL) {
- elm_access_info_set(ao, ELM_ACCESS_TYPE, _("IDS_QP_BUTTON_NOTIFICATION"));
- elm_access_info_set(ao, ELM_ACCESS_INFO, eina_strbuf_string_get(str_buf));
- }
-
- eina_strbuf_free(str_buf);
- }
-}
-
-static void _noti_box_set_rs_layout_thumbnail(Evas_Object *noti_box, notification_h noti)
-{
- DBG("");
-
- Evas_Object *ao = NULL;
- Eina_Strbuf *str_buf = NULL;
- char *dir = NULL;
- char *domain = NULL;
-
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- str_buf = eina_strbuf_new();
- retif(str_buf == NULL, , "invalid parameter");
-
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_TITLE, str_buf);
- _check_and_add_to_buffer(noti, NOTIFICATION_TEXT_TYPE_CONTENT, str_buf);
-
- time_t noti_time = 0.0;
- char buf[512] = {0,};
- notification_get_time(noti, ¬i_time);
- if (noti_time == 0.0) {
- notification_get_insert_time(noti, ¬i_time);
- }
- quickpanel_noti_util_get_time(noti_time, buf, 512);
- eina_strbuf_append(str_buf, buf);
- eina_strbuf_append_char(str_buf, '\n');
-
- if (str_buf != NULL) {
- DBG("access:%s", eina_strbuf_string_get(str_buf));
-
- ao = quickpanel_accessibility_screen_reader_object_get(noti_box,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", noti_box);
- if (ao != NULL) {
- elm_access_info_set(ao, ELM_ACCESS_TYPE, _("IDS_QP_BUTTON_NOTIFICATION"));
- elm_access_info_set(ao, ELM_ACCESS_INFO, eina_strbuf_string_get(str_buf));
- }
-
- eina_strbuf_free(str_buf);
- }
-}
-#endif
-
-static Evas_Object *_set_image(Evas_Object *noti_box, notification_h noti, char *image_path, notification_image_type_e image_type, const char *part, int is_stretch, int is_use_buffer)
-{
- Evas_Object *content = NULL;
- char *image = NULL;
- char ext[32] = {0,};
- void *memfile = NULL;
- size_t memfile_size = 0;
- retif(part == NULL, NULL,"invalid parameter");
-
- notification_get_image(noti, image_type, &image);
- if (image == NULL && image_path != NULL) {
- image = image_path;
- }
-
- if (image != NULL) {
- if (is_use_buffer == IMAGE_BY_BUFFER) {
- content = quickpanel_animated_icon_get(noti_box, image);
- if (content == NULL) {
- content = elm_image_add(noti_box);
-
- memfile = quickpanel_common_ui_get_buffer_from_image(image, &memfile_size, ext, sizeof(ext));
- if (memfile != NULL && memfile_size > 0) {
- _attach_memfile(noti_box, image_type, memfile);
- if (elm_image_memfile_set(content, memfile, memfile_size, ext,
- quickpanel_animated_image_get_groupname(image)) == EINA_FALSE) {
- ERR("failed to set memfile set");
- elm_image_file_set(content, image,
- quickpanel_animated_image_get_groupname(image));
- }
- } else {
- if (memfile) {
- free(memfile); // due to prevent
- }
- elm_image_file_set(content, image,
- quickpanel_animated_image_get_groupname(image));
- }
- }
- } else {
- content = _check_duplicated_image_loading(noti_box, part, image);
- if (content == NULL) {
- content = quickpanel_animated_icon_get(noti_box, image);
- if (content == NULL) {
- content = elm_image_add(noti_box);
-
- elm_image_file_set(content, image,
- quickpanel_animated_image_get_groupname(image));
- }
- } else {
- return content;
- }
- }
- if (is_stretch == IMAGE_RESIZE) {
- elm_image_aspect_fixed_set(content, EINA_FALSE);
- elm_image_resizable_set(content, EINA_TRUE, EINA_TRUE);
- } else {
- if (strcmp(part, BOX_PART_ICON) == 0 || strcmp(part, BOX_PART_ICON_SUB) == 0) {
- elm_image_resizable_set(content, EINA_FALSE, EINA_TRUE);
- } else {
- elm_image_aspect_fixed_set(content, EINA_TRUE);
- elm_image_fill_outside_set(content, EINA_TRUE);
- }
- }
-
- elm_object_part_content_set(noti_box, part, content);
- elm_object_signal_emit(noti_box, "object.show", part);
- }
-
- return content;
-}
-
-static int _set_text(Evas_Object *noti_box, notification_h noti, notification_text_type_e text_type, const char *part, char *str, int is_need_effect, int is_support_cr)
-{
- char buf[128] = { 0, };
-
- char *text = NULL;
- char *text_utf8 = NULL;
- time_t time = 0;
-
- if (str != NULL) {
- text = str;
- } else if (notification_get_time_from_text(noti, text_type, &time) == NOTIFICATION_ERROR_NONE) {
- if ((int)time > 0) {
- quickpanel_noti_util_get_time(time, buf, sizeof(buf));
- text = buf;
- }
- } else {
- notification_get_text(noti, text_type, &text);
- }
-
- if (text != NULL) {
- if (strlen(text) > 0) {
-
- if (is_support_cr == TEXT_CR) {
- text_utf8 = elm_entry_utf8_to_markup(text);
- if (text_utf8 != NULL) {
- elm_object_part_text_set(noti_box, part, text_utf8);
- free(text_utf8);
- } else {
- elm_object_part_text_set(noti_box, part, text);
- }
- } else {
- quickpanel_common_util_char_replace(text, _NEWLINE, _SPACE);
- elm_object_part_text_set(noti_box, part, text);
- }
-
- if (is_need_effect == 1) {
- elm_object_signal_emit(noti_box, "object.show.effect", part);
- } else {
- elm_object_signal_emit(noti_box, "object.show", part);
- }
- }
-
- return strlen(text);
- }
-
- return 0;
-}
-
-static int _check_text_null(notification_h noti, notification_text_type_e text_type)
-{
- char *text = NULL;
-
- notification_get_text(noti, text_type, &text);
-
- if (text == NULL) {
- return 1;
- }
-
- return 0;
-}
-
-static int _check_image_null(notification_h noti, notification_image_type_e image_type)
-{
- char *image = NULL;
-
- notification_get_image(noti, image_type, &image);
-
- if (image == NULL) {
- return 1;
- }
-
- if (strncasecmp(image, "(null)", strlen(image)) == 0) {
- return 1;
- }
-
- return 0;
-}
-
-static void _noti_box_set_layout_single(Evas_Object *noti_box, notification_h noti)
-{
- char *dir = NULL;
- char *domain = NULL;
- char *pkgname = NULL;
- char *icon_path = NULL;
- int is_need_effect = 0;
- int is_contents_only = 0;
- int is_sub_info_1_only = 0;
- int is_contents_and_sub_info_2 = 0;
- Evas_Object *icon = NULL;
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- is_need_effect = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- is_contents_only = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) != 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- is_sub_info_1_only = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) != 1
- || _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) != 1)) {
- is_contents_and_sub_info_2 = 1;
- }
-
- DBG("is_contents_only:%d is_sub_info_1_only:%d", is_contents_only, is_sub_info_1_only);
-
- notification_get_pkgname(noti, &pkgname);
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_TITLE,
- "object.text.title", NULL, is_need_effect, TEXT_CR);
-
- if (is_contents_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_CR);
- } else {
- if (is_contents_and_sub_info_2 == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_NO_CR);
- }
-
- if (is_sub_info_1_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.multiline", NULL, is_need_effect, TEXT_CR);
- } else {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 0) {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.short", NULL, is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
- "object.text.info.sub.1", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_2,
- "object.text.info.2", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
-
- time_t noti_time = 0.0;
- char buf[512] = {0,};
- notification_get_time(noti, ¬i_time);
- if (noti_time == 0.0) {
- notification_get_insert_time(noti, ¬i_time);
- }
- quickpanel_noti_util_get_time(noti_time, buf, 512);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_NONE,
- "object.text.time", buf, is_need_effect, TEXT_NO_CR);
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0) {
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- } else {
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON_SUB,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- }
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_BACKGROUND,
- "object.icon.background", IMAGE_NO_RESIZE, IMAGE_BY_BUFFER);
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
-
- icon_path = quickpanel_common_ui_get_pkginfo_icon(pkgname);
- if (icon_path != NULL) {
- _set_image(noti_box, NULL,
- icon_path, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- free(icon_path);
- }
- } else {
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- elm_object_signal_emit(noti_box, "box.show.dim", "box.prog");
- }
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
- elm_object_signal_emit(noti_box, "box.hide.icon.bg", "box.prog");
- elm_object_signal_emit(noti_box, "box.title.without.icon", "box.prog");
- }
- if (((_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 0
- || _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0)
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 0)) {
- elm_object_signal_emit(noti_box, "box.show.sub.bg", "box.prog");
- }
- }
-
-#ifdef QP_SCREENREADER_ENABLE
- _noti_box_set_rs_layout_single(noti_box, noti);
-#endif
-}
-
-static void _noti_box_set_layout_multi(Evas_Object *noti_box, notification_h noti)
-{
- char *pkgname = NULL;
- char *icon_path = NULL;
- char *dir = NULL;
- char *domain = NULL;
- int is_need_effect = 0;
- int is_contents_only = 0;
- int is_sub_info_1_only = 0;
- int is_contents_and_sub_info_2 = 0;
- Evas_Object *icon = NULL;
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- is_need_effect = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- is_contents_only = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) != 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- is_sub_info_1_only = 1;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1
- && (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) != 1
- || _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) != 1)) {
- is_contents_and_sub_info_2 = 1;
- }
-
- DBG("is_sub_info_1_only:%d", is_sub_info_1_only);
-
- notification_get_pkgname(noti, &pkgname);
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_TITLE,
- "object.text.title", NULL, is_need_effect, TEXT_CR);
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT) == 0) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, "object.text.count", NULL,
- is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT, "object.text.contents", NULL,
- is_need_effect, TEXT_NO_CR);
- } else {
- if (is_contents_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_CR);
- } else if (is_contents_and_sub_info_2 == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
-
- time_t noti_time = 0.0;
- char buf[512] = {0,};
-
- notification_get_time(noti, ¬i_time);
- if (noti_time == 0.0) {
- notification_get_insert_time(noti, ¬i_time);
- }
- quickpanel_noti_util_get_time(noti_time, buf, 512);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_NONE,
- "object.text.time", buf, is_need_effect, TEXT_NO_CR);
-
- if (is_sub_info_1_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.multiline", NULL, is_need_effect, TEXT_CR);
- } else {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 0) {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1) == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.short", NULL, is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_1,
- "object.text.info.sub.1", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 0) {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2) == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_2,
- "object.text.info.2", NULL, is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_2,
- "object.text.info.2.short", NULL, is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_SUB_2,
- "object.text.info.sub.2", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
- }
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0) {
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- } else {
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON_SUB,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- }
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_BACKGROUND,
- "object.icon.background", IMAGE_NO_RESIZE, IMAGE_BY_BUFFER);
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
-
- icon_path = quickpanel_common_ui_get_pkginfo_icon(pkgname);
- if (icon_path != NULL) {
- _set_image(noti_box, NULL,
- icon_path, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- free(icon_path);
- }
- } else {
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- elm_object_signal_emit(noti_box, "box.show.dim", "box.prog");
- }
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
- elm_object_signal_emit(noti_box, "box.hide.icon.bg", "box.prog");
- elm_object_signal_emit(noti_box, "box.title.without.icon", "box.prog");
- }
- if (((_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 0
- || _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0)
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 0)) {
- elm_object_signal_emit(noti_box, "box.show.sub.bg", "box.prog");
- }
- }
-
-#ifdef QP_SCREENREADER_ENABLE
- _noti_box_set_rs_layout_multi(noti_box, noti);
-#endif
-}
-
-static void _noti_box_set_layout_thumbnail(Evas_Object *noti_box, notification_h noti)
-{
- char *pkgname = NULL;
- char *icon_path = NULL;
- char *dir = NULL;
- char *domain = NULL;
- int is_need_effect = 0;
- int is_sub_info_1_only = 0;
- int is_show_info = 0;
- Evas_Object *icon = NULL;
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- is_need_effect = 1;
- } else {
- is_need_effect = 0;
- }
-
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) != 1
- && _check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 1) {
- is_sub_info_1_only = 1;
- }
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_1)!= 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_2) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_3) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_4) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_LIST_5) == 1) {
- is_show_info = 1;
- }
-
- notification_get_pkgname(noti, &pkgname);
- notification_get_text_domain(noti, &domain, &dir);
- if (domain != NULL && dir != NULL) {
- bindtextdomain(domain, dir);
- }
-
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_TITLE,
- "object.text.title", NULL, is_need_effect, TEXT_CR);
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT) == 0) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_EVENT_COUNT, "object.text.count", NULL,
- is_need_effect, TEXT_NO_CR);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT, "object.text.contents", NULL,
- is_need_effect, TEXT_NO_CR);
- } else {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_CONTENT,
- "object.text.contents", NULL, is_need_effect, TEXT_NO_CR);
- }
-
- time_t noti_time = 0.0;
- char buf[512] = {0,};
- notification_get_time(noti, ¬i_time);
- if (noti_time == 0.0) {
- notification_get_insert_time(noti, ¬i_time);
- }
- quickpanel_noti_util_get_time(noti_time, buf, 512);
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_NONE,
- "object.text.time", buf, is_need_effect, TEXT_NO_CR);
-
- if (is_show_info == 1) {
- if (is_sub_info_1_only == 1) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1.multiline", NULL, is_need_effect, TEXT_CR);
- } else {
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_1) == 0) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_1,
- "object.text.info.1", NULL, is_need_effect, TEXT_NO_CR);
- }
- if (_check_text_null(noti, NOTIFICATION_TEXT_TYPE_INFO_2) == 0) {
- _set_text(noti_box, noti, NOTIFICATION_TEXT_TYPE_INFO_2,
- "object.text.info.2", NULL, is_need_effect, TEXT_NO_CR);
- }
- }
- }
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0) {
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_THUMBNAIL,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0) {
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- }
- } else {
- icon = _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
-#ifdef QP_ANIMATED_IMAGE_ENABLE
- quickpanel_animated_image_add(icon);
-#endif
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 0) {
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_ICON_SUB,
- "object.icon.sub", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- }
- }
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_BACKGROUND,
- "object.icon.background", IMAGE_NO_RESIZE, IMAGE_BY_BUFFER);
-
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_1,
- "object.thumbnail.list.1", IMAGE_RESIZE, IMAGE_BY_BUFFER);
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_2,
- "object.thumbnail.list.2", IMAGE_RESIZE, IMAGE_BY_BUFFER);
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_3,
- "object.thumbnail.list.3", IMAGE_RESIZE, IMAGE_BY_BUFFER);
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_4,
- "object.thumbnail.list.4", IMAGE_RESIZE, IMAGE_BY_BUFFER);
- _set_image(noti_box, noti, NULL, NOTIFICATION_IMAGE_TYPE_LIST_5,
- "object.thumbnail.list.5", IMAGE_RESIZE, IMAGE_BY_BUFFER);
-
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
-
- icon_path = quickpanel_common_ui_get_pkginfo_icon(pkgname);
- if (icon_path != NULL) {
- _set_image(noti_box, NULL,
- icon_path, NOTIFICATION_IMAGE_TYPE_ICON,
- "object.icon", IMAGE_NO_RESIZE, IMAGE_BY_FILE);
- free(icon_path);
- }
- } else {
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_BACKGROUND) == 0) {
- elm_object_signal_emit(noti_box, "box.show.dim", "box.prog");
- }
- if (_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 1
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 1) {
- elm_object_signal_emit(noti_box, "box.hide.icon.bg", "box.prog");
- elm_object_signal_emit(noti_box, "box.title.without.icon", "box.prog");
- }
- if (((_check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON) == 0
- || _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_THUMBNAIL) == 0)
- && _check_image_null(noti, NOTIFICATION_IMAGE_TYPE_ICON_SUB) == 0)) {
- elm_object_signal_emit(noti_box, "box.show.sub.bg", "box.prog");
- }
- }
-
-#ifdef QP_SCREENREADER_ENABLE
- _noti_box_set_rs_layout_thumbnail(noti_box, noti);
-#endif
-}
-
-static void _noti_box_set_layout(Evas_Object *noti_box, notification_h noti, notification_ly_type_e layout)
-{
- DBG("notification box layout:%d", layout);
-
- switch (layout) {
- case NOTIFICATION_LY_NOTI_EVENT_SINGLE:
- _noti_box_set_layout_single(noti_box, noti);
- break;
- case NOTIFICATION_LY_NOTI_EVENT_MULTIPLE:
- _noti_box_set_layout_multi(noti_box, noti);
- break;
- case NOTIFICATION_LY_NOTI_THUMBNAIL:
- _noti_box_set_layout_thumbnail(noti_box, noti);
- break;
- case NOTIFICATION_LY_NONE:
- case NOTIFICATION_LY_ONGOING_EVENT:
- case NOTIFICATION_LY_ONGOING_PROGRESS:
- case NOTIFICATION_LY_MAX:
- ERR("not supported layout type:%d", layout);
- break;
- }
-
- if (elm_object_part_text_get(noti_box, "object.text.count") != NULL) {
- elm_object_signal_emit(noti_box, "title.short", "prog");
- } else {
- elm_object_signal_emit(noti_box, "title.long", "prog");
- }
-}
-
-static Evas_Object *_create(notification_h noti, Evas_Object *parent)
-{
- Evas_Object *box = NULL;
- retif(parent == NULL, NULL, "Invalid parameter!");
- retif(noti == NULL, NULL, "Invalid parameter!");
-
- notification_ly_type_e layout = NOTIFICATION_LY_NOTI_EVENT_SINGLE;
- notification_get_layout(noti, &layout);
-
- box = elm_layout_add(parent);
-
- if (layout == NOTIFICATION_LY_NOTI_EVENT_SINGLE
- || layout == NOTIFICATION_LY_NOTI_EVENT_MULTIPLE) {
- elm_layout_file_set(box, DEFAULT_EDJ,
- "quickpanel/listitem_legacy/single_multi");
- } else if (layout == NOTIFICATION_LY_NOTI_THUMBNAIL) {
- elm_layout_file_set(box, DEFAULT_EDJ, "quickpanel/listitem_legacy/thumbnail");
- } else {
- elm_layout_file_set(box, DEFAULT_EDJ,
- "quickpanel/listitem_legacy/single_multi");
- }
-
- evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(box, EVAS_HINT_FILL, EVAS_HINT_FILL);
- quickpanel_uic_initial_resize(box, QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT + QP_THEME_LIST_ITEM_SEPERATOR_HEIGHT);
- evas_object_show(box);
-
- Evas_Object *focus = quickpanel_accessibility_ui_get_focus_object(box);
- elm_object_part_content_set(box, "focus", focus);
-
- return box;
-}
-
-static void _update(noti_node_item *noti_node, notification_ly_type_e layout, Evas_Object *item)
-{
- noti_node_item *noti_node_find = NULL;
- retif(item == NULL, , "Invalid parameter!");
- retif(noti_node == NULL, , "Invalid parameter!");
-
- noti_list_item_h *handler = quickpanel_noti_list_item_handler_get(item);
- if (handler != NULL) {
- noti_node_find = quickpanel_noti_node_get_by_priv_id(handler->priv_id);
-
- if (noti_node_find != NULL) {
- notification_ly_type_e layout = NOTIFICATION_LY_NOTI_EVENT_SINGLE;
- notification_get_layout(noti_node_find->noti, &layout);
-
- _deattach_memfile_all(item);
- _text_clean_all(item);
-
- _noti_box_set_layout(item, noti_node_find->noti, layout);
- }
- }
-}
-
-static void _remove(noti_node_item *node_item, notification_ly_type_e layout, Evas_Object *item)
-{
- retif(item == NULL, , "Invalid parameter!");
- retif(node_item == NULL, , "Invalid parameter!");
-
- _deattach_memfile_all(item);
-}
-
-Noti_View_H noti_view_boxtype_h = {
- .name = "noti_view_boxtype",
-
- .create = _create,
- .update = _update,
- .remove = _remove,
-};
#include "common.h"
#include "noti_win.h"
-#include "dbus_utility.h"
+
struct Internal_Data {
Evas_Object *content;
#include "vi_manager.h"
#include "pager.h"
#include "page_base.h"
-#ifdef QP_ENABLE_PAGE_EDIT
-#include "page_edit.h"
-#else
#include "page_setting_all.h"
-#endif
#include "sim_controller.h"
#include "noti.h"
+++ /dev/null
-/*
- * 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.
- * 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 <system_settings.h>
-#include "common.h"
-#include "configuration.h"
-
-static struct _s_configuration_info {
- int longpress_threshold;
-} s_configuration_info = {
-#ifdef HAVE_X
- .longpress_threshold = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_SHORT,
-#else
- .longpress_threshold = 0,
-#endif
-};
-
-static void _conf_longpress_threshold_cb(system_settings_key_e key, void *user_data)
-{
-#ifdef HAVE_X
- int delay = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_SHORT; /* default 0.5 sec */
-#else
- int delay = 0.5;
-#endif
-
-#ifdef HAVE_X
- if (SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY == key)
-#endif
- {
-#ifdef HAVE_X
- if (system_settings_get_value_int(SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY, &delay) != 0) {
- ERR("Failed to get tap and hold delay");
- return;
- }
-#endif
- if (s_configuration_info.longpress_threshold != delay) {
- s_configuration_info.longpress_threshold = delay;
- }
-
- DBG("Current tap and hold delay : [%d] msec", delay);
- }
-}
-
-HAPI void quickpanel_conf_init(void *data)
-{
-#ifdef HAVE_X
- if (system_settings_get_value_int(SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY,
- &s_configuration_info.longpress_threshold) != 0) {
- ERR("Failed to get tap and hold delay");
- }
-
- if (system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY,
- _conf_longpress_threshold_cb, NULL) != 0) {
- ERR("Failed to set tap and hold delay changed callback");
- }
-#endif
-}
-
-HAPI void quickpanel_conf_fini(void *data)
-{
-#ifdef HAVE_X
- if (system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY) != 0) {
- ERR("Failed to unset tab and hold delay changed callback");
- }
-#endif
-}
-
-HAPI double quickpanel_conf_longpress_time_get(void)
-{
- return (double)(s_configuration_info.longpress_threshold)/(double)1000.0;
-}
+++ /dev/null
-/*
- * 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.
- * 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.
- *
- */
-
-
-#ifndef _QP_SERVICE_CONFIGURATION_DEF_
-#define _QP_SERVICE_CONFIGURATION_DEF_
-
-#include "quickpanel-ui.h"
-
-void quickpanel_conf_init(void *data);
-void quickpanel_conf_fini(void *data);
-double quickpanel_conf_longpress_time_get(void);
-
-#endif
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-
-#include <vconf.h>
-#include <notification_list.h>
-
-#include "common.h"
-#include "noti_util.h"
-#include "smart_alert.h"
-
-static inline int __quickpanel_service_update_event_count(const char *pkgname, const char *vconfkey)
-{
- int ret = 0, count = 0;
- notification_h noti = NULL;
- notification_list_h noti_list = NULL;
-
- retif(pkgname == NULL, 0, "Invalid parameter!");
- retif(vconfkey == NULL, 0, "Invalid parameter!");
-
- notification_get_detail_list(pkgname, NOTIFICATION_GROUP_ID_NONE, NOTIFICATION_PRIV_ID_NONE, -1, ¬i_list);
- if (noti_list != NULL) {
- noti = notification_list_get_data(noti_list);
- if (noti != NULL) {
- count = quickpanel_noti_util_get_event_count_from_noti(noti);
- ret = vconf_set_int(vconfkey, count);
-
- ERR("event set:%s, count:%d", pkgname, count);
-
- if (ret != 0) {
- ERR("failed to set vconf key[%s] : %d", vconfkey, ret);
- }
- } else {
- ERR("no data found:%s", pkgname);
- }
- notification_free_list(noti_list);
- return count;
- } else {
- ret = vconf_set_int(vconfkey, 0);
-
- ERR("event unset:%s", pkgname);
-
- if (ret != 0) {
- ERR("failed to set vconf key[%s] : %d", vconfkey, ret);
- }
- }
-
- return 0;
-}
-
-HAPI void quickpanel_smart_alert_update_info(notification_h noti)
-{
- char *pkgname = NULL;
- int event_count_call = 0;
- int event_count_vtcall = 0;
-
- if (noti == NULL) {
- event_count_call = quickpanel_noti_util_get_event_count_by_pkgname(SMART_ALARM_CALL_PKGNAME);
- event_count_vtcall = quickpanel_noti_util_get_event_count_by_pkgname(SMART_ALARM_VTCALL_PKGNAME);
- ERR("call event set, count:%d, %d", event_count_call, event_count_vtcall);
- } else {
- notification_get_pkgname(noti, &pkgname);
- retif(pkgname == NULL, , "Invalid parameter!");
-
- if (strncmp(pkgname, SMART_ALARM_CALL_PKGNAME, strlen(pkgname)) == 0 || strncmp(pkgname, SMART_ALARM_VTCALL_PKGNAME, strlen(pkgname)) == 0) {
- event_count_call = quickpanel_noti_util_get_event_count_by_pkgname(SMART_ALARM_CALL_PKGNAME);
- event_count_vtcall = quickpanel_noti_util_get_event_count_by_pkgname(SMART_ALARM_VTCALL_PKGNAME);
-
- ERR("call event set, count:%d, %d", event_count_call, event_count_vtcall);
- }
- }
-}
+++ /dev/null
-/*
- * 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.
- * 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.
- *
- */
-
-
-#ifndef _QP_SMART_ALERT_DEF_
-#define _QP_SMART_ALERT_DEF_
-
-
-#if !defined(VENDOR)
-#define SMART_ALARM_CALL_PKGNAME "org.tizen.call-notification"
-#define SMART_ALARM_VTCALL_PKGNAME "org.tizen.vtmain"
-#define SMART_ALARM_MSG_PKGNAME "org.tizen.message"
-#else
-#define SMART_ALARM_CALL_PKGNAME VENDOR".call-notification"
-#define SMART_ALARM_VTCALL_PKGNAME VENDOR".vtmain"
-#define SMART_ALARM_MSG_PKGNAME VENDOR".message"
-#endif
-
-extern void quickpanel_smart_alert_update_info(notification_h noti);
-
-#endif
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-
-#include <app.h>
-#include <device/led.h>
-#include <vconf.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <E_DBus.h>
-
-#include "common.h"
-#include "quickpanel-ui.h"
-#include "settings.h"
-#include "setting_utils.h"
-#include "setting_module_api.h"
-
-#define E_DATA_POPUP_MODULE_ITEM "mobule_item"
-#define BUTTON_LABEL _("IDS_ST_BUTTON2_TORCH_ABB")
-#define BUTTON_ICON_NORMAL "quick_icon_torch.png"
-
-static void _status_update(QP_Module_Setting *module, int light_status, int flag_extra_2);
-
-static const char *_label_get(void)
-{
- return BUTTON_LABEL;
-}
-
-static void _on_vconf_assetive_light_changed(keynode_t *node, void *user_data)
-{
- Eina_Bool mode = EINA_FALSE;
-
- if (!node) {
- ERR("node == NULL");
- return;
- }
-
- mode = node->value.b;
-
- quickpanel_setting_module_icon_state_set(user_data, mode);
- _status_update(user_data, mode, FLAG_VALUE_VOID);
-}
-
-static int _init(void *data)
-{
- vconf_notify_key_changed(VCONFKEY_SETAPPL_ACCESSIBILITY_TORCH_LIGHT, _on_vconf_assetive_light_changed, data);
-
- return QP_OK;
-}
-
-static void _set_assetive_light_mode(Eina_Bool mode)
-{
- int max_brightness;
- int ret = device_flash_get_max_brightness(&max_brightness);
-
- if (ret != 0) {
- ERR("TORCH LIGHT CHANGE: ret != 0 -> %d", ret);
- return;
- } else {
- ERR("TORCH LIGHT OK[%d]", max_brightness);
- }
-
- int ret_set = -1;
-
- if(mode == EINA_TRUE) {
- ret_set = device_flash_set_brightness(max_brightness);
- if (ret_set != 0) {
- ERR("Failed to set brightness(%d)[%d]", max_brightness, ret_set);
- } else {
- if (vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TORCH_LIGHT, 1) < 0) {
- ERR("Failed to set tourch light vconf key");
- }
- }
- } else {
- ret_set = device_flash_set_brightness(0);
- if (ret_set != 0) {
- ERR("Failed to set brightness(0)[%d]", ret_set);
- } else {
- if (vconf_set_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_TORCH_LIGHT, 0) < 0) {
- ERR("Failed to set tourch light vconf key");
- }
- }
- }
-}
-
-static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
-{
- Evas_Object *image = NULL;
- const char *icon_path = NULL;
-
- quickpanel_setting_icon_state_set(view, state);
- icon_path = BUTTON_ICON_NORMAL;
- image = quickpanel_setting_icon_image_new(view, icon_path);
- quickpanel_setting_icon_content_set(view, image);
- quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
-}
-
-static void _status_update(QP_Module_Setting *module, int light_status, int flag_extra_2)
-{
- int ret = -1;
- retif(module == NULL, , "Invalid parameter!");
-
- int brightness = 0;
- ret = device_flash_get_brightness(&brightness);
- if (ret != 0) {
- ERR("Failed to get brightness[%d]", ret);
- }
-
- if (brightness > 0) {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- } else {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
- }
-
- quickpanel_setting_module_icon_view_update(module,
- quickpanel_setting_module_icon_state_get(module), FLAG_VALUE_VOID);
-}
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_ON) {
- _set_assetive_light_mode(FLAG_TURN_OFF);
- } else {
- _set_assetive_light_mode(FLAG_TURN_ON);
- }
-
- _status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static void _lang_changed(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *) data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _refresh(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static int _fini(void *data)
-{
- return QP_OK;
-}
-
-QP_Module_Setting assistive_light =
-{
- .name = "assisitvelight",
- .init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = NULL,
- .label_get = _label_get,
- .supported_get = NULL,
- .view_update = _view_update,
- .status_update = _status_update,
- .handler_longpress = NULL,
- .handler_press = _mouse_clicked_cb,
-};
-
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-
-#include <vconf.h>
-#include <syspopup_caller.h>
-#include <tapi_common.h>
-#include <ITapiSim.h>
-#include <ITapiModem.h>
-#include <TapiUtility.h>
-#include <system_settings.h>
-#include <bundle_internal.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <E_DBus.h>
-
-#include "common.h"
-#include "quickpanel-ui.h"
-#include "settings.h"
-#include "setting_utils.h"
-#include "setting_module_api.h"
-#include "settings_icon_common.h"
-
-#define BUTTON_LABEL _("IDS_ST_BUTTON2_FLIGHT_NMODE")
-#define BUTTON_ICON_NORMAL "quick_icon_flightmode.png"
-#define BUTTON_ICON_HIGHLIGHT NULL
-#define BUTTON_ICON_DIM NULL
-#define PACKAGE_SETTING_MENU "setting-flightmode-efl"
-#define SYSPOPUP_NAME "mode-syspopup"
-
-static Eina_Bool fly_icon_is_locked = EINA_FALSE;
-static Ecore_Timer *timer = NULL;
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
-
-static const char *_label_get(void)
-{
- return BUTTON_LABEL;
-}
-
-static const char *_icon_get(qp_setting_icon_image_type type)
-{
- if (type == QP_SETTING_ICON_NORMAL) {
- return BUTTON_ICON_NORMAL;
- } else if (type == QP_SETTING_ICON_HIGHLIGHT) {
- return BUTTON_ICON_HIGHLIGHT;
- } else if (type == QP_SETTING_ICON_DIM) {
-#ifdef BUTTON_ICON_DIM
- return BUTTON_ICON_DIM;
-#endif
- }
-
- return NULL;
-}
-
-static Eina_Bool _unlock_fly_icon(void *data)
-{
- fly_icon_is_locked = EINA_FALSE;
- ecore_timer_del(timer);
- timer = NULL;
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static void _long_press_cb(void *data)
-{
-#ifdef PACKAGE_SETTING_MENU
- if (fly_icon_is_locked == EINA_TRUE) {
- LOGD("Fly icon is locked");
- return;
- }
- quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL);
-#endif
-}
-
-static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
-{
- Evas_Object *image = NULL;
- const char *icon_path = NULL;
-
- quickpanel_setting_icon_state_set(view, state);
-
- if (state == ICON_VIEW_STATE_ON) {
-#ifdef BUTTON_ICON_HIGHLIGHT
- icon_path = BUTTON_ICON_HIGHLIGHT;
-#endif
- } else if (state == ICON_VIEW_STATE_DIM) {
-#ifdef BUTTON_ICON_DIM
- icon_path = BUTTON_ICON_DIM;
-#endif
- } else {
- icon_path = BUTTON_ICON_NORMAL;
- }
-
- if (icon_path == NULL) {
- icon_path = BUTTON_ICON_NORMAL;
- }
- image = quickpanel_setting_icon_image_new(view, icon_path);
- quickpanel_setting_icon_content_set(view, image);
- quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
-}
-
-static void _status_update(QP_Module_Setting *module, int flag_extra_1, int flag_extra_2)
-{
- LOGD("");
- int ret = 0;
- bool status = false;
- retif(module == NULL, , "Invalid parameter!");
-
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, &status);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "fail to get VCONFKEY_TELEPHONY_FLIGHT_MODE:%d", ret);
-
- if (status == true) {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- } else {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
- }
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
-
- quickpanel_setting_module_icon_view_update(module, quickpanel_setting_module_icon_state_get(module), FLAG_VALUE_VOID);
-}
-
-static void _tapi_flight_mode_cb(TapiHandle *handle, int result, void *data, void *user_data)
-{
- ERR("flight mode result:%d", result);
- _status_update(user_data, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static int _tapi_flight_mode_set(int on, void *data)
-{
- LOGD("");
- int ret = QP_OK;
- int ret_t = TAPI_API_SUCCESS;
- TapiHandle *tapi_handle = NULL;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, QP_FAIL, "Invalid parameter!");
-
- tapi_handle = tel_init(NULL);
- retif(tapi_handle == NULL, QP_FAIL, "failed to initialized tapi handler");
-
- if (on == 1) {
- ret_t = tel_set_flight_mode(tapi_handle,
- TAPI_POWER_FLIGHT_MODE_ENTER, _tapi_flight_mode_cb, data);
- if (ret_t != TAPI_API_SUCCESS) {
- ret = QP_FAIL;
- ERR("tel_set_flight_mode enter error:%d", ret_t);
- }
- } else {
- ret_t = tel_set_flight_mode(tapi_handle,
- TAPI_POWER_FLIGHT_MODE_LEAVE, _tapi_flight_mode_cb, data);
- if (ret_t != TAPI_API_SUCCESS) {
- ret = QP_FAIL;
- ERR("tel_set_flight_mode leave error:%d", ret_t);
- }
- }
-
- if ((ret_t = tel_deinit(tapi_handle)) != TAPI_API_SUCCESS) {
- ERR("failed to deinitialized tapi handler:%d", ret_t);
- }
-
- return ret;
-}
-
-static void _turn_on(int is_on)
-{
- LOGD("");
- bundle *b = NULL;
- b = bundle_create();
- if (b != NULL) {
- if (is_on) {
- bundle_add(b, "_MODE_SYSTEM_POPUP_TYPE_", "MODE_SYSTEM_FLIGHTMODE_ON");
- } else {
- bundle_add(b, "_MODE_SYSTEM_POPUP_TYPE_", "MODE_SYSTEM_FLIGHTMODE_OFF");
- }
- syspopup_launch(SYSPOPUP_NAME, b);
- bundle_free(b);
- } else {
- ERR("failed to create a bundle");
- }
-
- timer = ecore_timer_add(1.0, _unlock_fly_icon, NULL);
-}
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- LOGD("");
- retif(module == NULL, , "Invalid parameter!");
-
- if (fly_icon_is_locked == EINA_TRUE) {
- LOGD("Fly icon is locked");
- return;
- }
-
- if (quickpanel_setting_module_is_icon_clickable(module) == 0) {
- LOGD("Fly icon is not clickable");
- return;
- }
-
- fly_icon_is_locked = EINA_TRUE;
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_OFF) {
- _turn_on(1);
- } else {
- _turn_on(0);
- }
-}
-
-static void _tapi_flight_mode_vconf_cb(system_settings_key_e key, void *data)
-{
- _status_update(data, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static int _register_module_event_handler(void *data)
-{
- int ret = 0;
-
- ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, _tapi_flight_mode_vconf_cb, data);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to notify key(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE) : %d", ret);
-
- return QP_OK;
-}
-
-static int _unregister_module_event_handler(void *data)
-{
- int ret = 0;
-
- ret = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to ignore key(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE) : %d", ret);
-
- return QP_OK;
-}
-
-/****************************************************************************
- *
- * Quickpanel Item functions
- *
- ****************************************************************************/
-
-static int _init(void *data)
-{
- int ret = QP_OK;
-
- ret = _register_module_event_handler(data);
-
- return ret;
-}
-
-static int _fini(void *data)
-{
- int ret = QP_OK;
-
- ret = _unregister_module_event_handler(data);
-
- return ret;
-}
-
-static void _lang_changed(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _refresh(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _reset_icon(QP_Module_Setting *module)
-{
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_VALUE_VOID);
- _status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static void _handler_on(void *data)
-{
- int ret = 0;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_OFF) {
- ret = _tapi_flight_mode_set(1, module);
-
- if (ret == QP_OK) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_ON);
- quickpanel_setting_module_icon_timer_add(module);
- } else {
- ERR("op failed:%d", ret);
- }
- } else {
- ERR("the button is already turned on");
- _reset_icon(module);
- }
-}
-
-static void _handler_off(void *data)
-{
- int ret = 0;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_ON) {
- ret = _tapi_flight_mode_set(0, module);
-
- if (ret == QP_OK) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_add(module);
- } else {
- ERR("op failed:%d", ret);
- }
- } else {
- ERR("the button is already turned off");
- _reset_icon(module);
- }
-}
-
-static void _handler_progress_on(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_VALUE_VOID);
-}
-
-static void _handler_progress_off(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- _reset_icon(module);
-}
-
-static int _handler_ipc(const char *command, void *data)
-{
- int i = 0;
- retif(data == NULL, EINA_FALSE, "item data is NULL");
- retif(command == NULL, EINA_FALSE, "command is NULL");
-
- static Setting_Activity_Handler __table_handler[] = {
- {
- .command = "on",
- .handler = _handler_on,
- },
- {
- .command = "off",
- .handler = _handler_off,
- },
- {
- .command = "progress_on",
- .handler = _handler_progress_on,
- },
- {
- .command = "progress_off",
- .handler = _handler_progress_off,
- },
- {
- .command = NULL,
- .handler = NULL,
- },
- };
-
- for (i = 0; __table_handler[i].command; i++) {
- if (strcmp(__table_handler[i].command, command)) {
- continue;
- }
-
- if (__table_handler[i].handler != NULL) {
- DBG("process:%s", command);
- __table_handler[i].handler(data);
- }
- break;
- }
-
- return EINA_TRUE;
-}
-
-QP_Module_Setting flightmode = {
- .name = "flightmode",
- .init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = _icon_get,
- .label_get = _label_get,
- .view_update = _view_update,
- .status_update = _status_update,
- .handler_longpress = _long_press_cb,
- .handler_ipc = _handler_ipc,
- .handler_press = _mouse_clicked_cb,
-};
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-
-#include <vconf.h>
-#include <syspopup_caller.h>
-#include <system_settings.h>
-#include <bundle_internal.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <E_DBus.h>
-
-#include "common_uic.h"
-#include "common.h"
-#include "quickpanel-ui.h"
-#include "settings.h"
-#include "setting_utils.h"
-#include "setting_module_api.h"
-#include "settings_icon_common.h"
-
-#define BUTTON_LABEL _("IDS_ST_BUTTON2_MOBILE_NDATA")
-#define BUTTON_ICON_NORMAL "quick_icon_mobile_data.png"
-#define BUTTON_ICON_HIGHLIGHT NULL
-#define BUTTON_ICON_DIM NULL
-#define PACKAGE_SETTING_MENU "setting-network-efl"
-#define SYSPOPUP_NAME "mode-syspopup"
-
-#ifndef VCONFKEY_SETAPPL_MOBILE_DATA_ON_REMINDER
-#define VCONFKEY_SETAPPL_MOBILE_DATA_ON_REMINDER "db/setting/network/mobile_data_on_reminder"
-#endif
-#ifndef VCONFKEY_SETAPPL_MOBILE_DATA_OFF_REMINDER
-#define VCONFKEY_SETAPPL_MOBILE_DATA_OFF_REMINDER "db/setting/network/mobile_data_off_reminder"
-#endif
-
-static int _is_simcard_inserted(void);
-static int _is_in_flightmode(void);
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
-
-static const char *_label_get(void)
-{
- return BUTTON_LABEL;
-}
-
-static const char *_icon_get(qp_setting_icon_image_type type)
-{
- if (type == QP_SETTING_ICON_NORMAL) {
- return BUTTON_ICON_NORMAL;
- } else if (type == QP_SETTING_ICON_HIGHLIGHT) {
- return BUTTON_ICON_HIGHLIGHT;
- } else if (type == QP_SETTING_ICON_DIM) {
-#ifdef BUTTON_ICON_DIM
- return BUTTON_ICON_DIM;
-#endif
- }
-
- return NULL;
-}
-
-static void _long_press_cb(void *data)
-{
-#ifdef PACKAGE_SETTING_MENU
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid data.");
-
- if (_is_in_flightmode() == 1) {
- quickpanel_setting_create_timeout_popup(ad->win, _("IDS_SCP_BODY_UNABLE_TO_CONNECT_TO_MOBILE_NETWORKS_WHILE_FLIGHT_MODE_IS_ENABLED_CONNECT_TO_A_WI_FI_NETWORK_INSTEAD_OR_DISABLE_FLIGHT_MODE_AND_TRY_AGAIN"));
- return;
- }
-
- if (_is_simcard_inserted() == 0) {
- quickpanel_setting_create_timeout_popup(ad->win, _("IDS_ST_BODY_INSERT_SIM_CARD_TO_ACCESS_NETWORK_SERVICES"));
- return;
- }
-
- quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL);
-#endif
-}
-
-static int _need_display_popup(int is_on)
-{
- int ret = -1;
- int status = 0;
-
- if (is_on == 1) {
- ret = vconf_get_bool(VCONFKEY_SETAPPL_MOBILE_DATA_ON_REMINDER, &status);
- msgif(ret != 0, "failed to get VCONFKEY_SETAPPL_MOBILE_DATA_ON_REMINDER %d %d", ret, is_on);
- if (ret == 0 && status == true) {
- return 1;
- }
- } else {
- ret = vconf_get_bool(VCONFKEY_SETAPPL_MOBILE_DATA_OFF_REMINDER, &status);
- msgif(ret != 0, "failed to get VCONFKEY_SETAPPL_MOBILE_DATA_OFF_REMINDER %d %d", ret, is_on);
- if (ret == 0 && status == 1) {
- return 1;
- }
- }
-
- return 0;
-}
-
-static void _turn_on(int is_on)
-{
- int ret = 0;
-
- if (is_on) {
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, 1);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to set SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED %d %d", ret, is_on);
- } else {
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, 0);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE,"failed to set SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED: %d %d", ret, is_on);
- }
-}
-
-static void _turn_on_with_popup(int is_on)
-{
- bundle *b = NULL;
- b = bundle_create();
- if (b != NULL) {
- if (is_on) {
- bundle_add(b, "_MODE_SYSTEM_POPUP_TYPE_", "MODE_SYSTEM_MOBILEDATA_ON");
- } else {
- bundle_add(b, "_MODE_SYSTEM_POPUP_TYPE_", "MODE_SYSTEM_MOBILEDATA_OFF");
- }
- syspopup_launch(SYSPOPUP_NAME, b);
- bundle_free(b);
- } else {
- ERR("failed to create a bundle");
- }
-}
-
-static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
-{
- Evas_Object *image = NULL;
- const char *icon_path = NULL;
-
- quickpanel_setting_icon_state_set(view, state);
-
- if (state == ICON_VIEW_STATE_ON) {
-#ifdef BUTTON_ICON_HIGHLIGHT
- icon_path = BUTTON_ICON_HIGHLIGHT;
-#endif
- } else if (state == ICON_VIEW_STATE_DIM) {
-#ifdef BUTTON_ICON_DIM
- icon_path = BUTTON_ICON_DIM;
-#endif
- } else {
- icon_path = BUTTON_ICON_NORMAL;
- }
-
- if (icon_path == NULL) {
- icon_path = BUTTON_ICON_NORMAL;
- }
- image = quickpanel_setting_icon_image_new(view, icon_path);
- quickpanel_setting_icon_content_set(view, image);
- quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
-}
-
-static int _is_simcard_inserted(void)
-{
- int ret_1 = QP_FAIL;
- int ret_2 = QP_FAIL;
- int sim_status_1 = VCONFKEY_TELEPHONY_SIM_UNKNOWN;
- int sim_status_2 = VCONFKEY_TELEPHONY_SIM_UNKNOWN;
-
- ret_1 = vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT, &sim_status_1);
- msgif(ret_1 != QP_OK, "failed to get the VCONFKEY_TELEPHONY_SIM_SLOT : %d", ret_1);
-
- ret_2 = vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT2, &sim_status_2);
- msgif(ret_2 != QP_OK, "failed to get the VCONFKEY_TELEPHONY_SIM_SLOT2 : %d", ret_2);
-
- INFO("MOBILE DATA SIM CARD: %d %d", sim_status_1, sim_status_2);
-
- if ((ret_1 == QP_OK && sim_status_1 == VCONFKEY_TELEPHONY_SIM_INSERTED) ||
- (ret_2 == QP_OK && sim_status_2 == VCONFKEY_TELEPHONY_SIM_INSERTED)) {
- return 1;
- }
-
- return 0;
-}
-
-static int _is_in_flightmode(void)
-{
- int ret = QP_FAIL;
- bool flight_mode = false;
-
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, &flight_mode);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to get the SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE : %d", ret);
- if (ret == QP_OK && flight_mode == true) {
- return 1;
- }
-
- return 0;
-}
-
-static void _status_update(QP_Module_Setting *module, int flag_extra_1, int flag_extra_2)
-{
- int ret = 0;
- bool status = false;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_timer_del(module);
-
- if (quickpanel_uic_is_emul() == 1) {
- status = true;
- } else if (_is_in_flightmode() == 1) {
- status = false;
- } else if (_is_simcard_inserted() == 0) {
- status = false;
- } else {
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, &status);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "fail to get SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED:%d", ret);
- }
-
- if (status == true) {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- } else {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
- }
-
- quickpanel_setting_module_icon_view_update(module,
- quickpanel_setting_module_icon_state_get(module),
- FLAG_VALUE_VOID);
-}
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- if (quickpanel_setting_module_is_icon_clickable(module) == 0) {
- return;
- }
-
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid data.");
-
- if (quickpanel_uic_is_emul() == 1) {
- quickpanel_setting_create_timeout_popup(ad->win, _NOT_LOCALIZED("Unsupported."));
- return;
- }
-
- if (_is_in_flightmode() == 1) {
- quickpanel_setting_create_timeout_popup(ad->win, _("IDS_SCP_BODY_UNABLE_TO_CONNECT_TO_MOBILE_NETWORKS_WHILE_FLIGHT_MODE_IS_ENABLED_CONNECT_TO_A_WI_FI_NETWORK_INSTEAD_OR_DISABLE_FLIGHT_MODE_AND_TRY_AGAIN"));
- return;
- }
-
- if (_is_simcard_inserted() == 0) {
- quickpanel_setting_create_timeout_popup(ad->win, _("IDS_ST_BODY_INSERT_SIM_CARD_TO_ACCESS_NETWORK_SERVICES"));
- return;
- }
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_ON) {
- /* disable */
- if (_need_display_popup(0) == 1) {
- _turn_on_with_popup(0);
- } else {
- _turn_on(0);
- }
- } else {
- /* enable */
- if (_need_display_popup(1) == 1) {
- _turn_on_with_popup(1);
- } else {
- _turn_on(1);
- }
- }
-}
-
-static void _mobiledata_vconf_cb(keynode_t *key, void *data)
-{
- _status_update(data, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static void _mobiledata_setting_cb(system_settings_key_e key, void *data)
-{
- _status_update(data, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static int _register_module_event_handler(void *data)
-{
- int ret = 0;
-
- ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, _mobiledata_setting_cb, data);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to notify key(%s) : %d", SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, ret);
-
- ret = vconf_notify_key_changed(VCONFKEY_TELEPHONY_SIM_SLOT, _mobiledata_vconf_cb, data);
- msgif(ret != 0, "failed to notify key(%s) : %d", VCONFKEY_TELEPHONY_SIM_SLOT, ret);
-
- ret = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, _mobiledata_setting_cb, data);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to notify key(%s) : %d", SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, ret);
-
- return QP_OK;
-}
-
-static int _unregister_module_event_handler(void *data)
-{
- int ret = 0;
-
- ret = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to ignore key(%s) : %d", SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, ret);
-
- ret = vconf_ignore_key_changed(VCONFKEY_TELEPHONY_SIM_SLOT, _mobiledata_vconf_cb);
- msgif(ret != 0, "failed to ignore key(%s) : %d", VCONFKEY_TELEPHONY_SIM_SLOT, ret);
-
- ret = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE);
- msgif(ret != SYSTEM_SETTINGS_ERROR_NONE, "failed to ignore key(%s) : %d", SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, ret);
-
- return QP_OK;
-}
-
-/****************************************************************************
- *
- * Quickpanel Item functions
- *
- ****************************************************************************/
-
-static int _init(void *data)
-{
- int ret = QP_OK;
-
- ret = _register_module_event_handler(data);
-
- return ret;
-}
-
-static int _fini(void *data)
-{
- int ret = QP_OK;
-
- ret = _unregister_module_event_handler(data);
-
- return ret;
-}
-
-static void _lang_changed(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _refresh(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _reset_icon(QP_Module_Setting *module)
-{
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_VALUE_VOID);
- _status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static void _handler_on(void *data)
-{
- int ret = 0;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_OFF) {
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, 1);
-
- if (ret == SYSTEM_SETTINGS_ERROR_NONE) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_ON);
- quickpanel_setting_module_icon_timer_add(module);
- } else {
- ERR("op failed:%d", ret);
- }
- } else {
- ERR("the button is already turned on");
- _reset_icon(module);
- }
-}
-
-static void _handler_off(void *data)
-{
- int ret = 0;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_ON) {
- ret = vconf_set_bool(VCONFKEY_3G_ENABLE, 0);
-
- if (ret == 0) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_add(module);
- } else {
- ERR("op failed:%d", ret);
- }
- } else {
- ERR("the button is already turned off");
- _reset_icon(module);
- }
-}
-
-static void _handler_progress_on(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_VALUE_VOID);
-}
-
-static void _handler_progress_off(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- _reset_icon(module);
-}
-
-static int _handler_ipc(const char *command, void *data)
-{
- int i = 0;
- retif(data == NULL, EINA_FALSE, "item data is NULL");
- retif(command == NULL, EINA_FALSE, "command is NULL");
-
- static Setting_Activity_Handler __table_handler[] = {
- {
- .command = "on",
- .handler = _handler_on,
- },
- {
- .command = "off",
- .handler = _handler_off,
- },
- {
- .command = "progress_on",
- .handler = _handler_progress_on,
- },
- {
- .command = "progress_off",
- .handler = _handler_progress_off,
- },
- {
- .command = NULL,
- .handler = NULL,
- },
- };
-
- for (i = 0; __table_handler[i].command; i++) {
- if (strcasecmp(__table_handler[i].command, command)) {
- continue;
- }
-
- if (__table_handler[i].handler != NULL) {
- DBG("process:%s", command);
- __table_handler[i].handler(data);
- }
- break;
- }
-
- return EINA_TRUE;
-}
-
-QP_Module_Setting mobile_data = {
- .name = "mobile_data",
- .init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = _icon_get,
- .label_get = _label_get,
- .view_update = _view_update,
- .status_update = _status_update,
- .handler_longpress = _long_press_cb,
- .handler_ipc = _handler_ipc,
- .handler_press = _mouse_clicked_cb,
-};
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-
-#include <vconf.h>
-#include <tethering.h>
-#include <glib.h>
-#include <bundle_internal.h>
-#include <net_connection.h>
-#include <syspopup_caller.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <E_DBus.h>
-
-#include "common.h"
-#include "quickpanel-ui.h"
-#include "settings.h"
-#include "setting_utils.h"
-#include "setting_module_api.h"
-#include "settings_icon_common.h"
-
-#define MOBILE_AP_SYSPOPUP_NAME "mobileap-syspopup"
-#define BUTTON_LABEL _("IDS_ST_BUTTON2_WI_FI_NTETHERING")
-#define BUTTON_ICON_NORMAL "quick_icon_wifi_tethering.png"
-#define BUTTON_ICON_HIGHLIGHT NULL
-#define BUTTON_ICON_DIM NULL
-#define PACKAGE_SETTING_MENU "setting-mobileap-efl"
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
-
-static const char *_label_get(void)
-{
- return BUTTON_LABEL;
-}
-
-static const char *_icon_get(qp_setting_icon_image_type type)
-{
- if (type == QP_SETTING_ICON_NORMAL) {
- return BUTTON_ICON_NORMAL;
- } else if (type == QP_SETTING_ICON_HIGHLIGHT) {
- return BUTTON_ICON_HIGHLIGHT;
- } else if (type == QP_SETTING_ICON_DIM) {
-#ifdef BUTTON_ICON_DIM
- return BUTTON_ICON_DIM;
-#endif
- }
-
- return NULL;
-}
-
-static void _long_press_cb(void *data)
-{
-#ifdef PACKAGE_SETTING_MENU
- quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, NULL);
-#endif
-}
-
-static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
-{
- Evas_Object *image = NULL;
- const char *icon_path = NULL;
-
- quickpanel_setting_icon_state_set(view, state);
-
- if (state == ICON_VIEW_STATE_ON) {
-#ifdef BUTTON_ICON_HIGHLIGHT
- icon_path = BUTTON_ICON_HIGHLIGHT;
-#endif
- } else if (state == ICON_VIEW_STATE_DIM) {
-#ifdef BUTTON_ICON_DIM
- icon_path = BUTTON_ICON_DIM;
-#endif
- } else {
- icon_path = BUTTON_ICON_NORMAL;
- }
-
- if (icon_path == NULL) {
- icon_path = BUTTON_ICON_NORMAL;
- }
- image = quickpanel_setting_icon_image_new(view, icon_path);
- quickpanel_setting_icon_content_set(view, image);
- quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
-}
-
-static void _status_update(QP_Module_Setting *module, int flag_extra_1, int flag_extra_2)
-{
- retif(module == NULL, , "Invalid parameter!");
- retif(module->loader->extra_handler_1 == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_timer_del(module);
-
- if (tethering_is_enabled(module->loader->extra_handler_1, TETHERING_TYPE_WIFI)) {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- } else {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
- }
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
-
- quickpanel_setting_module_icon_view_update(module,
- quickpanel_setting_module_icon_state_get(module),
- FLAG_VALUE_VOID);
-}
-
-static void _tethering_enabled_cb(tethering_error_e result, tethering_type_e type, bool is_requested, void *user_data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)user_data;
- retif(module == NULL, , "Invalid parameter!");
-
- retif(type != TETHERING_TYPE_WIFI, , "Another type of tethering is enabled - type:%d", type);
-
- if (result != TETHERING_ERROR_NONE) {
- if (is_requested == TRUE) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
- }
- _status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-
- WARN("Failed to enable tethering - error:%x", result);
- return;
- }
-
- if (is_requested == TRUE) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
- }
- _status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
- WARN("WIFI tethering is enabled - type:%d", type);
-
- return;
-}
-
-static void _tethering_disabled_cb(tethering_error_e result, tethering_type_e type, tethering_disabled_cause_e cause, void *user_data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)user_data;
- retif(module == NULL, , "Invalid parameter!");
- retif(module->loader == NULL, , "Invalid parameter!");
-
- if (result != TETHERING_ERROR_NONE && type == TETHERING_TYPE_WIFI) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
- _status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-
- WARN("Failed to disable tethering - error:%x", result);
- return;
- }
-
- if (type == TETHERING_TYPE_WIFI) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
- _status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
- WARN("WIFI tethering is disabled - cause:%x", cause);
- } else {
- WARN("Ignored tethering event - result:%x type:%d cause:%x", result, type, cause);
- }
-
- return;
-}
-
-static int _tethering_enabled_set(void *data, Eina_Bool state)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
-
- if (module == NULL || module->loader->extra_handler_1 == NULL) {
- ERR("invalid parameter\n");
- return QP_FAIL;
- }
-
- if (state) {
- if (tethering_is_enabled(NULL, TETHERING_TYPE_WIFI) == FALSE) {
- // for checking pre-conditions, popup will be provided by mobileap-syspopup
- bundle *b = bundle_create();
- if (!b) {
- ERR("Failed to create bundle.");
- return QP_FAIL;
- }
- bundle_add(b, "msg", "Confirm WiFi tethering on");
- syspopup_launch(MOBILE_AP_SYSPOPUP_NAME, b);
- bundle_free(b);
- }
- } else {
- if (tethering_is_enabled(NULL, TETHERING_TYPE_WIFI) == TRUE) {
- bundle *b = bundle_create();
- if (!b) {
- ERR("Failed to create bundle.");
- return QP_FAIL;
- }
- bundle_add(b, "msg", "Confirm WiFi tethering off");
- syspopup_launch(MOBILE_AP_SYSPOPUP_NAME, b);
- bundle_free(b);
- }
- }
-
- return QP_OK;
-}
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- int ret = 0;
- int is_on = 0;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- if (quickpanel_setting_module_is_icon_clickable(module) == 0) {
- DBG("Icon is not clickable");
- return;
- }
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_OFF) {
- ret = _tethering_enabled_set(module, EINA_TRUE);
- if (ret != QP_OK) {
- ERR("Failed to enable tethering");
- return;
- }
- is_on = 1;
- } else {
- ret = _tethering_enabled_set(module, EINA_FALSE);
- if (ret != QP_OK) {
- ERR("Failed to disable tethering");
- return;
- }
- is_on = 0;
- }
-
- if (ret == QP_OK) {
- if (is_on == 1) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_ON);
- } else {
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_OFF);
- }
- quickpanel_setting_module_icon_timer_add(module);
- }
- return;
-}
-
-static int _register_module_event_handler(void *data)
-{
- tethering_error_e ret = TETHERING_ERROR_NONE;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, ret, "Invalid parameter!");
-
- ret = tethering_create(&(module->loader->extra_handler_1));
- msgif(ret != TETHERING_ERROR_NONE, "fail to create tethering handler");
-
- ret = tethering_set_enabled_cb(module->loader->extra_handler_1,
- TETHERING_TYPE_WIFI, _tethering_enabled_cb, data);
- msgif(ret != TETHERING_ERROR_NONE, "fail to register enabled callback");
-
- ret = tethering_set_disabled_cb(module->loader->extra_handler_1,
- TETHERING_TYPE_WIFI, _tethering_disabled_cb, data);
- msgif(ret != TETHERING_ERROR_NONE, "fail to register disabled callback");
-
- return QP_OK;
-}
-
-static int _unregister_module_event_handler(void *data)
-{
- tethering_error_e ret =TETHERING_ERROR_NONE;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, ret, "Invalid parameter!");
-
- if (module->loader->extra_handler_1 != NULL) {
-
- tethering_destroy(module->loader->extra_handler_1);
- module->loader->extra_handler_1 = NULL;
- }
-
- return QP_OK;
-}
-
-/****************************************************************************
- *
- * Quickpanel Item functions
- *
- ****************************************************************************/
-static int _init(void *data)
-{
- int ret = QP_OK;
-
- ret = _register_module_event_handler(data);
-
- return ret;
-}
-
-static int _fini(void *data)
-{
- int ret = QP_OK;
-
- ret = _unregister_module_event_handler(data);
-
- return ret;
-}
-
-static void _lang_changed(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _refresh(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _reset_icon(QP_Module_Setting *module)
-{
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_VALUE_VOID);
- _status_update(module, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static void _handler_on(void *data)
-{
- tethering_error_e ret = TETHERING_ERROR_NONE;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_OFF) {
- ret = _tethering_enabled_set(module, EINA_TRUE);
-
- if (ret == QP_OK) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_ON);
- quickpanel_setting_module_icon_timer_add(module);
- } else {
- ERR("op failed:%d", ret);
- }
- } else {
- ERR("the button is already turned on");
- _reset_icon(module);
- }
-}
-
-static void _handler_off(void *data)
-{
- int ret = TETHERING_ERROR_NONE;
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_DISABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_del(module);
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_ON) {
- ret = _tethering_enabled_set(module, EINA_FALSE);
- if (ret == QP_OK) {
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_OFF);
- quickpanel_setting_module_icon_timer_add(module);
- } else {
- ERR("op failed:%d", ret);
- }
- } else {
- ERR("the button is already turned off");
- _reset_icon(module);
- }
-}
-
-static void _handler_progress_on(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_progress_mode_set(module, FLAG_ENABLE, FLAG_TURN_ON);
-}
-
-static void _handler_progress_off(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- _reset_icon(module);
-}
-
-static void _handler_progress_reset(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- _reset_icon(module);
-}
-
-static int _handler_ipc(const char *command, void *data)
-{
- int i = 0;
- retif(data == NULL, EINA_FALSE, "item data is NULL");
- retif(command == NULL, EINA_FALSE, "command is NULL");
-
- static Setting_Activity_Handler __table_handler[] = {
- {
- .command = "on",
- .handler = _handler_on,
- },
- {
- .command = "off",
- .handler = _handler_off,
- },
- {
- .command = "progress_on",
- .handler = _handler_progress_on,
- },
- {
- .command = "progress_off",
- .handler = _handler_progress_off,
- },
- {
- .command = "progress_reset",
- .handler = _handler_progress_reset,
- },
- {
- .command = NULL,
- .handler = NULL,
- },
- };
-
- for (i = 0; __table_handler[i].command; i++) {
- if (strcasecmp(__table_handler[i].command, command)) {
- continue;
- }
-
- if (__table_handler[i].handler != NULL) {
- DBG("process:%s", command);
- __table_handler[i].handler(data);
- }
- break;
- }
-
- return EINA_TRUE;
-}
-
-QP_Module_Setting tethering = {
- .name = "wifi_hotspot",
- .init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = _icon_get,
- .label_get = _label_get,
- .view_update = _view_update,
- .status_update = _status_update,
- .handler_longpress = _long_press_cb,
- .handler_ipc = _handler_ipc,
- .handler_press = _mouse_clicked_cb,
-};
+++ /dev/null
-/*
- * 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.
- * 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 <Elementary.h>
-
-#include <app.h>
-#include <vconf.h>
-//#include <syspopup_caller.h>
-#include <bundle_internal.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <E_DBus.h>
-
-#include "common.h"
-#include "quickpanel-ui.h"
-#include "settings.h"
-#include "setting_utils.h"
-#include "setting_module_api.h"
-#include "settings_icon_common.h"
-
-#define BUTTON_LABEL _("IDS_QP_BUTTON2_U_POWER_NSAVING_ABB")
-#define BUTTON_ICON_NORMAL "quick_icon_ultra_power_saving.png"
-#define BUTTON_ICON_HIGHLIGHT NULL
-#define BUTTON_ICON_DIM NULL
-#define PACKAGE_SETTING_MENU "setting-powersaving-efl"
-#define SYSPOPUP_NAME "mode-syspopup"
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source);
-
-static const char *_label_get(void)
-{
- return BUTTON_LABEL;
-}
-
-static const char *_icon_get(qp_setting_icon_image_type type)
-{
- if (type == QP_SETTING_ICON_NORMAL) {
- return BUTTON_ICON_NORMAL;
- } else if (type == QP_SETTING_ICON_HIGHLIGHT) {
- return BUTTON_ICON_HIGHLIGHT;
- } else if (type == QP_SETTING_ICON_DIM) {
-#ifdef BUTTON_ICON_DIM
- return BUTTON_ICON_DIM;
-#endif
- }
-
- return NULL;
-}
-
-static void _long_press_cb(void *data)
-{
-#ifdef PACKAGE_SETTING_MENU
- bundle *kb = bundle_create();
- if (kb != NULL) {
- bundle_add(kb, "power_saving", "upsm");
- quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, kb);
- bundle_free(kb);
- } else {
- ERR("failed to create the bunlde");
- }
-#endif
-}
-
-#if 0
-static int _is_need_to_show_disclaimer(void) {
- int ret = 0, status = 0;
-
- ret = vconf_get_bool(VCONFKEY_SETAPPL_UPSM_DO_NOT_SHOW_DISCLAIMER, &status);
- if (ret == 0 && status) {
- return 0;
- }
-
- return 1;
-}
-#endif
-
-static void _turn_on(int is_on)
-{
- bundle *b = NULL;
-
- //if(_is_need_to_show_disclaimer() == 1)
- {
- b = bundle_create();
- if (b != NULL) {
- bundle_add(b, "viewtype", "disc");
-
- quickpanel_setting_icon_handler_longpress(PACKAGE_SETTING_MENU, b);
- bundle_free(b);
- }
- }
- /*else
- {
- b = bundle_create();
- if (b != NULL) {
- if (is_on) {
- bundle_add(b, "_MODE_SYSTEM_POPUP_TYPE_", "POPUP_EMERGENCY_PSMODE_SETTING");
- } else {
- bundle_add(b, "_MODE_SYSTEM_POPUP_TYPE_", "POPUP_NORMAL_PSMODE");
- }
- syspopup_launch(SYSPOPUP_NAME, b);
- bundle_free(b);
- } else {
- ERR("failed to create a bundle");
- }
- }*/
-}
-
-static void _view_update(Evas_Object *view, int state, int flag_extra_1, int flag_extra_2)
-{
- Evas_Object *image = NULL;
- const char *icon_path = NULL;
-
- quickpanel_setting_icon_state_set(view, state);
-
- if (state == ICON_VIEW_STATE_ON) {
-#ifdef BUTTON_ICON_HIGHLIGHT
- icon_path = BUTTON_ICON_HIGHLIGHT;
-#endif
- } else if (state == ICON_VIEW_STATE_DIM) {
-#ifdef BUTTON_ICON_DIM
- icon_path = BUTTON_ICON_DIM;
-#endif
- } else {
- icon_path = BUTTON_ICON_NORMAL;
- }
-
- if (icon_path == NULL) {
- icon_path = BUTTON_ICON_NORMAL;
- }
- image = quickpanel_setting_icon_image_new(view, icon_path);
- quickpanel_setting_icon_content_set(view, image);
- quickpanel_setting_icon_text_set(view, BUTTON_LABEL, state);
-}
-
-static void _status_update(QP_Module_Setting *module, int flag_extra_1, int flag_extra_2)
-{
- int ret = 0;
- int status = 0;
- retif(module == NULL, , "Invalid parameter!");
-
- ret = vconf_get_int(VCONFKEY_SETAPPL_PSMODE, &status);
- msgif(ret != 0, "fail to get VCONFKEY_SETAPPL_PSMODE:%d", ret);
-
- if (status == SETTING_PSMODE_EMERGENCY) {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_ON);
- } else {
- quickpanel_setting_module_icon_state_set(module, ICON_VIEW_STATE_OFF);
- }
-
- quickpanel_setting_module_icon_view_update(module,
- quickpanel_setting_module_icon_state_get(module),
- FLAG_VALUE_VOID);
-}
-
-static void _mouse_clicked_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- if (quickpanel_setting_module_icon_state_get(module) == ICON_VIEW_STATE_ON) {
- _turn_on(0);
- } else {
- _turn_on(1);
- }
-}
-
-static void _powersave_vconf_cb(keynode_t *node, void *data)
-{
- _status_update(data, FLAG_VALUE_VOID, FLAG_VALUE_VOID);
-}
-
-static int _register_module_event_handler(void *data)
-{
- int ret = 0;
-
- ret = vconf_notify_key_changed(VCONFKEY_SETAPPL_PSMODE,
- _powersave_vconf_cb, data);
- msgif(ret != 0, "failed to notify key(VCONFKEY_SETAPPL_PSMODE) : %d", ret);
-
- return QP_OK;
-}
-
-static int _unregister_module_event_handler(void *data)
-{
- int ret = 0;
-
- ret = vconf_ignore_key_changed(VCONFKEY_SETAPPL_PSMODE,
- _powersave_vconf_cb);
- msgif(ret != 0, "failed to ignore key(VCONFKEY_SETAPPL_PSMODE) : %d", ret);
-
- return QP_OK;
-}
-
-/****************************************************************************
- *
- * Quickpanel Item functions
- *
- ****************************************************************************/
-static int _init(void *data)
-{
- int ret = QP_OK;
-
- ret = _register_module_event_handler(data);
-
- return ret;
-}
-
-static int _fini(void *data)
-{
- int ret = QP_OK;
-
- ret = _unregister_module_event_handler(data);
-
- return ret;
-}
-
-static void _lang_changed(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-static void _refresh(void *data)
-{
- QP_Module_Setting *module = (QP_Module_Setting *)data;
- retif(module == NULL, , "Invalid parameter!");
-
- quickpanel_setting_module_icon_view_update_text(module);
-}
-
-QP_Module_Setting u_power_saving = {
- .name = "u_power_saving",
- .init = _init,
- .fini = _fini,
- .lang_changed = _lang_changed,
- .refresh = _refresh,
- .icon_get = _icon_get,
- .label_get = _label_get,
- .view_update = _view_update,
- .status_update = _status_update,
- .handler_longpress = _long_press_cb,
- .handler_press = _mouse_clicked_cb,
-};
extern QP_Module_Setting bluetooth;
extern QP_Module_Setting sound;
extern QP_Module_Setting rotate;
-extern QP_Module_Setting mobile_data;
-extern QP_Module_Setting flightmode;
-extern QP_Module_Setting u_power_saving;
-extern QP_Module_Setting tethering;
-extern QP_Module_Setting assistive_light;
QP_Module settings = {
.name = "settings",
}
#include "quickpanel_setting.edc"
-#include "quickpanel_page_edit.edc"
#include "quickpanel_datetime.edc"
#include "quickpanel_brightness.edc"
#include "quickpanel_minictrl.edc"
#include "quickpanel_noti_section.edc"
-#include "quickpanel_notibox.edc"
#include "quickpanel_listitem_noti.edc"
-#include "quickpanel_listitem_noti_legacy.edc"
#include "quickpanel_listitem_ongoing.edc"
#include "quickpanel_animated_icon.edc"
#include "quickpanel_images.edc"
+++ /dev/null
-/*
- * 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.
- * 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.
- *
- */
-
-//#define DEBUG
-//#define DEBUG_TEXT
-
- styles {
- style {
- name: "ongoing_content_text";
- base: "font=Tizen:style=Roman text_class=tizen align=left valign=top font_size=28 linegap=-6 ellipsis=1.0 color=#828384FF wrap=mixed";
- }
- }
-
- group {
- name: "quickpanel/listitem/default";
-
- images {
- image: "quick_icon_bg_02.png" COMP;
- }
-
- script {
- public ctnt_shown;
- public ctnt_multiline_shown;
- }
-
- parts {
- part { name: "base";
- type: RECT;
- repeat_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 QP_THEME_LIST_ITEM_ONGOING_HEIGHT + QP_THEME_LIST_ITEM_ONGOING_SEPERATOR_HEIGHT;
- max: 9999 QP_THEME_LIST_ITEM_ONGOING_HEIGHT + QP_THEME_LIST_ITEM_ONGOING_SEPERATOR_HEIGHT;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
- color: QP_THEME_BG_COLOR;
- visible: QP_THEME_BG_VISIBILITY;
- }
- }
- part { name: "bg_image";
- mouse_events: 0;
- description {
- state: "default" 0.0;
- rel1.to:"base";
- rel2.to:"base";
- color: QP_THEME_NOTI_BG_COLOR;
- }
- description {
- state: "selected" 0.0;
- inherit: "default" 0.0;
- color: QP_THEME_NOTI_BG_COLOR;
- }
- }
- part { name: "elm.padding.top";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 16 + QP_THEME_LIST_ITEM_ONGOING_SEPERATOR_HEIGHT;
- fixed: 0 1;
- visible: 0;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 0.0;
- align: 0.0 0.0;
- }
- }
- part { name: "elm.padding.top.text.contents";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 61 + QP_THEME_LIST_ITEM_ONGOING_SEPERATOR_HEIGHT;
- fixed: 0 1;
- visible: 0;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 0.0;
- align: 0.0 0.0;
- }
- }
- part { name: "elm.padding.bottom.mutiline.content";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 0;
- fixed: 0 1;
- visible: 0;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 1.0;
- align: 0.0 1.0;
- }
- }
- part { name: "elm.padding.bottom.time";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 82;
- fixed: 0 1;
-#ifdef DEBUG
- visible: 1;
- color: 0 255 0 255;
-#else
- visible: 0;
-#endif
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 1.0;
- rel2.relative: 1.0 1.0;
- align: 0.0 1.0;
- }
- }
- part { name: "elm.padding.bottom.progress";
- type: RECT;
- scale: 1;
- description { state: "default" 0.0;
- min: 0 52;
- fixed: 0 1;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 1.0;
- rel2.relative: 1.0 1.0;
- align: 0.0 1.0;
-#ifdef DEBUG
- visible: 1;
- color: 0 0 255 255;
-#else
- visible: 0;
-#endif
- }
- }
- part { name: "elm.padding.bottom.icon";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 31;
- fixed: 0 1;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 1.0;
- rel2.relative: 1.0 1.0;
- align: 0.0 1.0;
- visible: 0;
- }
- }
- part { name: "elm.padding.left.bg";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 14 0;
- fixed: 1 0;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 0.0;
- rel2.relative: 0.0 1.0;
- align: 0.0 0.0;
- color: QP_THEME_BG_COLOR;
- visible: QP_THEME_BG_VISIBILITY;
- }
- }
- part { name: "elm.padding.right.bg";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 14 0;
- fixed: 1 0;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 1.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 1.0 0.0;
- color: QP_THEME_BG_COLOR;
- visible: QP_THEME_BG_VISIBILITY;
- }
- }
- part { name: "elm.padding.top.bg";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 QP_THEME_LIST_ITEM_ONGOING_SEPERATOR_HEIGHT;
- fixed: 0 1;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 0.0;
- rel2.relative: 1.0 0.0;
- align: 0.0 0.0;
- color: QP_THEME_BG_COLOR;
- visible: QP_THEME_BG_VISIBILITY;
- }
- }
- part { name: "elm.content.bg";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to_x:"elm.padding.left.bg";
- to_y:"elm.padding.top.bg";
- relative: 1.0 1.0;
- }
- rel2 {
- to_x:"elm.padding.right.bg";
- to_y:"base";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- visible: 1;
- color: QP_THEME_NOTI_BG_COLOR;
- }
- }
- part { name: "elm.padding.left";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 28 0;
- fixed: 1 0;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 0.0 0.0;
- rel2.relative: 0.0 1.0;
- align: 0.0 0.0;
- visible: 0;
- }
- }
- part { name: "elm.padding.right";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 20 0;
- fixed: 1 0;
- rel1.to:"base";
- rel2.to:"base";
- rel1.relative: 1.0 0.0;
- rel2.relative: 1.0 1.0;
- align: 1.0 0.0;
-#ifdef DEBUG
- visible: 1;
- color: 255 0 0 190;
-#else
- visible: 0;
-#endif
- }
- }
- part { name: "elm.rect.thumbnail";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 124 124;
- fixed: 1 1;
- rel1 {
- relative: 0.0 0.0;
- to_x: "elm.padding.right";
- to_y: "elm.padding.bottom.icon";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "elm.padding.right";
- to_y: "elm.padding.bottom.icon";
- }
- align: 1.0 1.0;
- visible: 0;
- }
- }
- part { name: "elm.thumbnail.bg";
- type: IMAGE;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "elm.rect.thumbnail";}
- rel2 {to: "elm.rect.thumbnail";}
- image {
- normal:"quick_icon_bg_02.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- }
- }
- part { name: "elm.swallow.thumbnail";
- type: SWALLOW;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {
- to: "elm.rect.thumbnail";
- }
- rel2 {
- to: "elm.rect.thumbnail";
- }
- align: 0.5 0.5;
- }
- }
- part { name: "elm.swallow.icon";
- type: SWALLOW;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 40 40;
- fixed: 1 1;
- rel1 {
- relative: 1.0 1.0;
- to: "elm.rect.thumbnail";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "elm.rect.thumbnail";
- }
- align: 1.0 1.0;
- }
- }
- part { name: "elm.padding.right.slider.bounder";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 202 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- to_x: "elm.padding.right";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "elm.padding.right";
- }
- visible: 0;
- align: 1.0 0.0;
- }
- }
- part { name: "elm.padding.right.text.bounder";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 144 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- to_x: "elm.padding.right";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "elm.padding.right";
- }
- visible: 0;
- align: 1.0 0.0;
- }
- }
- part { name: "elm.text.title";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 36;
- align: 0.0 0.0;
- fixed: 0 1;
- rel1 {
- relative: 1.0 1.0;
- to_x: "elm.padding.left";
- to_y: "elm.padding.top";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "elm.padding.right.text.bounder";
- to_y: "elm.padding.top";
- }
- color: 248 246 239 255;
- text {
- font: "Tizen:style=Regular";
- text_class: "tizen";
- size: 32;
- fit: 0 1;
- ellipsis: 0.0;
- align: 0.0 0.5;
- size_range: 34 44;
- }
- }
- description {
- state: "selected" 0.0;
- inherit: "default" 0.0;
- color: 248 246 239 255;
- }
- }
- part { name: "elm.text.time";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 1;
- min: 0 28;
- align: 0.0 1.0;
- rel1 {
- relative: 1.0 0.0;
- to_x: "elm.padding.left";
- to_y: "elm.padding.bottom.time";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "elm.padding.right.slider.bounder";
- to_y: "elm.padding.bottom.time";
- }
- color: 255 255 255 255;
- text {
- font: "Tizen:style=Medium";
- text_class: "tizen";
- size: 28;
- align: 1.0 0.0;
- }
- }
- description {
- state: "selected" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- }
- }
- part {
- name: "elm.rect.content";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- min: 0 28;
- fixed: 0 1;
- rel1 {
- relative: 1.0 1.0;
- to_x: "elm.padding.left";
- to_y: "elm.padding.top.text.contents";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "elm.padding.right.text.bounder";
- to_y: "elm.padding.top.text.contents";
- }
- visible: 0;
- }
- }
- part {
- name: "elm.text.content";
- type: TEXT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 0 1;
- rel1 {
- to: "elm.rect.content";
- }
- rel2 {
- to: "elm.rect.content";
- }
- color: 130 131 132 255;
- text {
- font: "Tizen:style=Roman";
- text_class: "tizen";
- size: 28;
- fit: 0 1;
- ellipsis: 0.0;
- size_range: 26 30;
- align: 0.0 0.5;
- }
- visible: 0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- description {
- state: "selected" 0.0;
- inherit: "default" 0.0;
- color: 130 131 132 255;
- visible: 1;
- }
- }
- part {
- name: "elm.rect.content.multiline";
- type: RECT;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- min: 0 0;
- fixed: 1 1;
- rel1 {
- relative: 1.0 1.0;
- to_x: "elm.padding.left";
- to_y: "elm.text.title";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "elm.padding.right.text.bounder";
- to_y: "elm.padding.bottom.mutiline.content";
- }
- visible: 0;
- }
- }
- part {
- name: "elm.text.content.multiline";
- type: TEXTBLOCK;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 1 1;
- rel1 {
- to: "elm.rect.content.multiline";
- }
- rel2 {
- to: "elm.rect.content.multiline";
- }
- text {
- style: "ongoing_content_text";
- align: 0.0 0.0;
- fit: 0 0;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "selected" 0.0;
- inherit: "default" 0.0;
- color: 130 131 132 255;
- visible: 1;
- }
- }
- part {
- name: "elm.box.progress";
- type: BOX;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 20;
- fixed: 0 1;
- align: 0.0 1.0;
- rel1 {
- relative: 1.0 0.0;
- to_x: "elm.padding.left";
- to_y: "elm.padding.bottom.progress";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "elm.padding.right.slider.bounder";
- to_y: "elm.padding.bottom.progress";
- }
-#ifdef DEBUG
- visible: 1;
- color: 100 100 100 200;
-#else
- visible: 0;
-#endif
- }
- }
- part {
- name: "elm.swallow.progress";
- type: SWALLOW;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to: "elm.box.progress";
- }
- rel2 {
- to: "elm.box.progress";
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "object.layer.touch.background";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- color: 0 0 0 0;
- }
- }
- part {
- name: "accessibility";
- type: RECT;
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to: "elm.content.bg";
- }
- rel2 {
- to: "elm.content.bg";
- }
- color: QP_ACCESSIBILITY_TEST_COLOR;
- visible: 1;
- }
- }
- }
-
- programs {
- program{
- name: "listbox.touch.down";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.background";
- action: SIGNAL_EMIT "selected" "edje";
- }
- program { name: "show_content";
- signal: "elm,state,elm.text.content,active";
- source: "elm";
- script {
- set_state(PART:"elm.text.content", "show", 0.0);
- set_int(ctnt_shown, 1);
- }
- }
- program { name: "show_content_multiline";
- signal: "elm,state,elm.text.content.multiline,active";
- source: "elm";
- script {
- set_state(PART:"elm.text.content.multiline", "show", 0.0);
- set_int(ctnt_multiline_shown, 1);
- }
- }
- }
- }
\ No newline at end of file
+++ /dev/null
-/*
- * 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.
- * 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.
- *
- */
-
-//#define DEBUG
-//#define DEBUG_TEXT
-
-#define MAKE_PART_SHOW_PROGRAM(PARTNAME)\
- program{\
- name: PARTNAME".object.show";\
- signal: "object.show";\
- source: PARTNAME;\
- action: STATE_SET "show" 0.0;\
- target: PARTNAME;\
- }\
-
-#define MAKE_PART_SHOW_TEXT_PROGRAM(PARTNAME)\
- program{\
- name: PARTNAME".text.show";\
- signal: "object.show";\
- source: PARTNAME;\
- action: STATE_SET "show" 0.0;\
- target: PARTNAME;\
- }\
- program{\
- name: PARTNAME".text.show.efect";\
- signal: "object.show.effect";\
- source: PARTNAME;\
- action: STATE_SET "show.effect" 0.0;\
- target: PARTNAME;\
- }\
-
-images {
- image: "quick_image_dimmed_port.png" COMP;
- image: "quick_image_dimmed_land.png" COMP;
- image: "icon_press.png" COMP;
-}
-
-#define BOX_FONT_SHADOW_COLOR 0 0 0 191
-#define BOX_FONT_OUTLINE_COLOR 0 0 0 191
-#define BOX_FONT_NO_SHADOW_COLOR 0 0 0 0
-#define BOX_FONT_NO_OUTLINE_COLOR 0 0 0 0
-
-#define BOX_CONTENTS_FONT "Tizen:style=Bold"
-#define BOX_CONTENTS_FONT_SIZE 30
-
-#define BOX_INFO_FONT "Tizen:style=Bold"
-#define BOX_INFO_FONT_SIZE 28
-
-#define BOX_INFO_SHORT_FONT "Tizen:style=Bold"
-#define BOX_INFO_SHORT_FONT_SIZE 28
-
-#define BOX_INFO_SUB_FONT "Tizen:style=Regular"
-#define BOX_INFO_SUB_FONT_SIZE 24
-
-#define TEXT_CLASS_TIZEN "tizen"
-#define TEXT_EFFECT "OUTLINE_SHADOW"
-
-#define QP_NOTI_LEGACY_TITLE_COLOR "T023"
-#define QP_NOTI_LEGACY_CONTENTS_COLOR "T024"
-#define QP_NOTI_LEGACY_COUNT_COLOR "ATO017"
-#define QP_NOTI_LEGACY_TIME_COLOR "T024L1"
-#define QP_NOTI_LEGACY_INFO_COLOR "ATO019"
-#define QP_NOTI_LEGACY_INFO_SUB_COLOR "T024"
-
-#define QP_NOTI_LEGACY_TITLE_FONT_SIZE 30
-#define QP_NOTI_LEGACY_CONTENTS_FONT_SIZE 24
-#define QP_NOTI_LEGACY_COUNT_FONT_SIZE 30
-#define QP_NOTI_LEGACY_TIME_FONT_SIZE 22
-#define QP_NOTI_LEGACY_INFO_FONT_SIZE 26
-#define QP_NOTI_LEGACY_INFO_SUB_FONT_SIZE 26
-
-styles {
- style {
- name: "noti_list_title";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_TITLE_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_TITLE_COLOR" ellipsis=1.0 wrap=mixed";
- }
- style {
- name: "noti_list_title_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_TITLE_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_TITLE_COLOR" ellipsis=1.0 wrap=mixed";
- }
-
- style {
- name: "noti_list_contents";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_CONTENTS_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_CONTENTS_COLOR" ellipsis=1.0 wrap=mixed";
- }
- style {
- name: "noti_list_contents_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_CONTENTS_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_CONTENTS_COLOR" ellipsis=1.0 wrap=mixed";
- }
-
- style {
- name: "noti_list_count";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_COUNT_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_COUNT_COLOR" ellipsis=1.0 wrap=mixed";
- }
- style {
- name: "noti_list_count_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_COUNT_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_COUNT_COLOR" ellipsis=1.0 wrap=mixed";
- }
-
- style {
- name: "noti_list_time";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_TIME_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_TIME_COLOR" ellipsis=1.0 wrap=mixed";
- }
- style {
- name: "noti_list_time_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_TIME_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_TIME_COLOR" ellipsis=1.0 wrap=mixed";
- }
-
- style {
- name: "noti_list_info";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_INFO_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_INFO_COLOR" ellipsis=1.0 wrap=mixed";
- }
- style {
- name: "noti_list_info_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_INFO_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_INFO_COLOR" ellipsis=1.0 wrap=mixed";
- }
-
- style {
- name: "noti_list_info_sub";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_INFO_SUB_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_INFO_SUB_COLOR" ellipsis=1.0 wrap=mixed";
- }
- style {
- name: "noti_list_info_sub_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size="QP_NOTI_LEGACY_INFO_SUB_FONT_SIZE" color=#FFFFFF color_class="QP_NOTI_LEGACY_INFO_SUB_COLOR" ellipsis=1.0 wrap=mixed";
- }
-}
-
-group {
- name: "quickpanel/listitem_legacy/single_multi";
-
- script {
- public g_is_show_dim_bg;
-
- public init_variables() {
- set_int(g_is_show_dim_bg, 0);
- }
- }
-
- parts {
- part {
- name: "background";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 (QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT + QP_THEME_LIST_ITEM_SEPERATOR_HEIGHT);
- max: -1 (QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT + QP_THEME_LIST_ITEM_SEPERATOR_HEIGHT);
- }
- }
- part {
- name: "seperator.top";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 QP_THEME_LIST_ITEM_SEPERATOR_HEIGHT;
- fixed: 0 1;
- rel1 {
- to: "background";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "background";
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "seperator.left";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 0;
- fixed: 1 0;
- rel1 {
- to: "background";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "background";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "seperator.right";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 0;
- fixed: 1 0;
- rel1 {
- to: "background";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "background";
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part{
- name: "clip.background";
- type:RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- visible:1;
- }
- }
- part {
- name: "base";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 1;
- min: 0 QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT;
- max: -1 QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT;
- rel1 {
- relative: 1.0 1.0;
- to_x: "seperator.left";
- to_y: "seperator.top";
- //offset: -5 -5;
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "seperator.right";
- to_y: "seperator.top";
- //offset: 5 5;
- }
- align: 0.0 0.0;
- color_class: QP_THEME_ITEM_BG_COLOR;
- color: 255 255 255 235;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- }
- }
-
- //section layout for margin
-
- part {
- name: "margin.left";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 9 0;
- fixed: 1 0;
- rel1 {
- to: "base";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.right";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 8 0;
- fixed: 1 0;
- rel1 {
- to: "base";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part {
- name: "margin.left.icon";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 9 0;
- fixed: 1 0;
- rel1 {
- to: "base";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.top.icon";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 21;
- fixed: 0 1;
- rel1 {
- to: "base";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.top.text";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 12;
- fixed: 0 1;
- rel1 {
- to: "base";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.bottom";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 14;
- fixed: 0 1;
- rel1 {
- to: "base";
- relative: 0.0 1.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 1.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "margin.bottom.thin";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 2;
- fixed: 0 1;
- rel1 {
- to: "base";
- relative: 0.0 1.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 1.0;
- }
- align: 0.0 1.0;
- }
- }
-
- //section layout for elements
- //section layout for icon
- part {
- name: "rect.icon.bg";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 46 46;
- max: 46 46;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left.icon";
- to_y:"margin.top.icon";
- relative: 1.0 1.0;
- }
- rel2 {
- to_x:"margin.left.icon";
- to_y:"margin.top.icon";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.icon";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: 46 46;
- max: 46 46;
- rel1 {
- to:"rect.icon.bg";
- relative: 0.5 0.5;
- }
- rel2 {
- to:"rect.icon.bg";
- relative: 0.5 0.5;
- }
- align: 0.5 0.5;
- }
- }
- part {
- name: "rect.icon.sub.padding";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 10;
- fixed: 0 1;
- rel1 {
- to:"rect.icon.bg";
- relative: 0.0 1.0;
- }
- rel2 {
- to:"rect.icon.bg";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.icon.sub";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 29 29;
- max: 29 29;
- fixed: 1 1;
- rel1 {
- to:"rect.icon.sub.padding";
- relative: 1.0 1.0;
- }
- rel2 {
- to:"rect.icon.sub.padding";
- relative: 1.0 1.0;
- }
- align: 1.0 1.0;
- }
- }
-
- //section layout for texts
- part {
- name: "rect.text.title";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 36;
- max: 9999 36;
- fixed: 1 1;
- rel1 {
- to_x:"rect.icon.bg";
- to_y:"margin.top.text";
- relative: 1.0 1.0;
- offset: +17 0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.top.text";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- description {
- state: "short" 0.0;
- inherit: "default" 0.0;
- rel1 {
- to_x:"rect.icon.bg";
- to_y:"margin.top.text";
- relative: 1.0 1.0;
- offset: +17 0;
- }
- rel2 {
- to_x:"object.text.count";
- to_y:"margin.top.text";
- relative: 0.0 1.0;
- offset: -13 0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.text.contents";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- max: 9999 36;
- fixed: 1 1;
- rel1 {
- to:"rect.text.title";
- relative: 0.0 1.0;
- }
- rel2 {
- to_x:"object.text.time";
- to_y:"rect.text.title";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.text.info.2";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- fixed: 0 1;
- rel1 {
- to_x:"margin.left";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.text.info.sub.2";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- max: 0 27;
- fixed: 1 1;
- rel1 {
- to_x:"margin.right";
- to_y:"margin.bottom";
- relative: 0.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom";
- relative: 0.0 0.0;
- }
- align: 1.0 1.0;
- }
- }
- part {
- name: "rect.text.info.2.short";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"object.text.info.sub.2";
- to_y:"rect.text.info.2";
- relative: 0.0 1.0;
- offset: -20 0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.text.info.1";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- fixed: 0 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.text.info.1.multiline";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom.thin";
- relative: 0.0 0.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.text.info.sub.1";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- max: 0 27;
- fixed: 1 1;
- rel1 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- align: 1.0 1.0;
- }
- }
- part {
- name: "rect.text.info.1.short";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"object.text.info.sub.1";
- to_y:"rect.text.info.1";
- relative: 0.0 1.0;
- offset: -13 0;
- }
- align: 0.0 1.0;
- }
- }
-
- //section objects
- part{
- name: "object.icon.background";
- type:SWALLOW;
- scale: 1;
- clip_to: "clip.background";
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- }
- part {
- name: "object.touch.effect";
- type: RECT;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- rel1.to:"base";
- rel2.to:"base";
- color: 0 0 0 0;
- visible: 0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- color_class: BOX_COLOR_BG_HIGHLIGHT;
- visible:0;
- }
- description {
- state: "show.dim" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- color_class: BOX_COLOR_BG_HIGHLIGHT_DIM;
- visible:0;
- }
- }
- part{
- name: "object.icon.bg.dim";
- type:IMAGE;
- scale:1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- image {
- normal:"quick_image_dimmed_port.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- image {
- normal:"quick_image_dimmed_port.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- image {
- normal:"quick_image_dimmed_land.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:1;
- }
- }
- part{
- name: BOX_PART_ICON;
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {to: "rect.icon";}
- rel2 {to: "rect.icon";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.icon.press";
- type:IMAGE;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {to: "rect.icon.bg";}
- rel2 {to: "rect.icon.bg";}
- image {
- normal:"icon_press.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- }
- part{
- name: BOX_PART_ICON_SUB;
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- max: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- rel1 {to: "rect.icon.sub";}
- rel2 {to: "rect.icon.sub";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
-
- part {
- name: "object.text.title";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.title";}
- rel2 {to: "rect.text.title";}
- text {
- style: "noti_list_title";
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_title_effect";
- }
- visible:1;
- }
- }
-
- part {
- name: "object.text.contents";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.contents";}
- rel2 {to: "rect.text.contents";}
- text {
- style: "noti_list_contents";
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_contents_effect";
- }
- visible:1;
- }
- }
- part {
- name: "object.text.count";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- min: 0 36;
- max: 79 36;
- rel1 {
- to_x:"margin.right";
- to_y:"rect.text.title";
- relative: 0.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.title";
- relative: 0.0 0.0;
- }
- text {
- style: "noti_list_count";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:0;
- align: 1.0 0.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_count_effect";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:1;
- }
- }
- part {
- name: "object.text.time";
- type: TEXTBLOCK;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- max: 100 36;
- rel1 {
- to_x:"margin.right";
- to_y:"rect.text.title";
- relative: 0.0 1.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.title";
- relative: 0.0 1.0;
- }
- text {
- style: "noti_list_time";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:0;
- align: 1.0 0.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_time_effect";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:1;
- }
- }
- part {
- name: "object.text.info.1";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.1";}
- rel2 {to: "rect.text.info.1";}
- text {
- style: "noti_list_info";
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_effect";
- align: 0.0 0.5;
- }
- visible:0;
- }
- }
- part {
- name: "object.text.info.1.short";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.1.short";}
- rel2 {to: "rect.text.info.1.short";}
- text {
- style: "noti_list_info";
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_effect";
- align: 0.0 0.5;
- }
- visible:0;
- }
- }
- part {
- name: "object.text.info.1.multiline";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 1 1;
- rel1 {
- to: "rect.text.info.1.multiline";
- }
- rel2 {
- to: "rect.text.info.1.multiline";
- }
- text {
- style: "noti_list_info";
- align: 0.0 0.0;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_effect";
- }
- visible:0;
- }
- }
- part {
- name: "object.text.info.sub.1";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.text.info.sub.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "rect.text.info.sub.1";
- relative: 1.0 1.0;
- }
- text {
- style: "noti_list_info_sub";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:0;
- align:1.0 0.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_sub_effect";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:0;
- }
- }
-
- part {
- name: "object.text.info.2";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.2";}
- rel2 {to: "rect.text.info.2";}
- text {
- style: "noti_list_info";
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_effect";
- align: 0.0 0.5;
- }
- visible:0;
- }
- }
- part {
- name: "object.text.info.2.short";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.2.short";}
- rel2 {to: "rect.text.info.2.short";}
- text {
- style: "noti_list_info";
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_effect";
- align: 0.0 0.5;
- }
- visible:0;
- }
- }
- part {
- name: "object.text.info.sub.2";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.text.info.sub.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "rect.text.info.sub.2";
- relative: 1.0 1.0;
- }
- text {
- style: "noti_list_info_sub";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:0;
- align:1.0 0.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_sub_effect";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:0;
- }
- }
- part {
- name: "object.layer.touch.background";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- color: 0 0 0 0;
- }
- }
- QUICKPANEL_FOCUS_OBJECT("focus", "base", "base")
- part {
- name: "object.layer.touch.button.1";
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.icon";
- }
- rel2 {to: "rect.icon";}
- color: 0 0 0 0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- }
-
- programs {
- program {
- name: "init.layout";
- signal: "load";
- source: "";
- in: 0.0 0.0;
- script{
- init_variables();
- }
- }
- program{
- name: "box.show.dim";
- signal: "box.show.dim";
- source: "box.prog";
- script {
- set_int(g_is_show_dim_bg, 1);
- }
- }
- program{
- name: "box.hide.dim";
- signal: "box.hide.dim";
- source: "box.prog";
- script {
- set_int(g_is_show_dim_bg, 0);
- }
- }
- program{
- name: "box.portrait";
- signal: "box.portrait";
- source: "box.prog";
- action: STATE_SET "portrait" 0.0;
- target: "base";
- after: "box.portrait.custom";
- }
- program{
- name: "box.landscape";
- signal: "box.landscape";
- source: "box.prog";
- action: STATE_SET "landscape" 0.0;
- target: "base";
- after: "box.landscape.custom";
- }
- program{
- name: "box.portrait.custom";
- source: "box.prog";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.icon.bg.dim", "portrait", 0.0);
- }
- }
- }
- program{
- name: "box.landscape.custom";
- source: "box.prog";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.icon.bg.dim", "landscape", 0.0);
- }
- }
- }
-#ifdef TBD
- program{
- name: "box.touch.down";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.background";
- action: SIGNAL_EMIT "selected" "edje";
- }
-#endif
- program{
- name: "effect,mouse,down";
- signal: "mouse,down,1";
- source: "object.layer.touch.background";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.touch.effect", "show.dim", 0.0);
- } else {
- set_state(PART:"object.touch.effect", "show", 0.0);
- }
- }
- }
- program{
- name: "effect,mouse,up";
- signal: "mouse,up,1";
- source: "object.layer.touch.background";
- action: STATE_SET "default" 0.0;
- transition: ACCELERATE 0.20;
- target: "object.touch.effect";
- }
- program{
- name: "box.button.1.touch.clicked";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.button.1";
- action: SIGNAL_EMIT "button_1" "edje";
- }
- program{
- name: "box.button.1.touch.down";
- signal: "mouse,down,1";
- source: "object.layer.touch.button.1";
- action: STATE_SET "show" 0.0;
- target: "object.icon.press";
- }
- program{
- name: "box.button.1.touch.up";
- signal: "mouse,up,1";
- source: "object.layer.touch.button.1";
- action: STATE_SET "hide" 0.0;
- target: "object.icon.press";
- }
- program{
- name: "box.show.icon.bg";
- signal: "box.show.icon.bg";
- source: "box.prog";
- action: STATE_SET "show" 0.0;
- target: "object.layer.touch.button.1";
- }
- program{
- name: "box.hide.icon.bg";
- signal: "box.hide.icon.bg";
- source: "box.prog";
- action: STATE_SET "hide" 0.0;
- target: "object.layer.touch.button.1";
- }
- program{
- name: "box.title.with.icon";
- signal: "box.title.with.icon";
- source: "box.prog";
- action: STATE_SET "default" 0.0;
- target: "rect.text.title";
- }
- program{
- name: "box.title.without.icon";
- signal: "box.title.without.icon";
- source: "box.prog";
- action: STATE_SET "without_icon" 0.0;
- target: "rect.text.title";
- }
- program{
- name: "title.long";
- signal: "title.long";
- source: "prog";
- action: STATE_SET "default" 0.0;
- target: "rect.text.title";
- }
- program{
- name: "title.short";
- signal: "title.short";
- source: "prog";
- action: STATE_SET "short" 0.0;
- target: "rect.text.title";
- }
- MAKE_PART_SHOW_PROGRAM("object.icon.background")
- MAKE_PART_SHOW_PROGRAM("object.icon")
- MAKE_PART_SHOW_PROGRAM("object.icon.sub")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.title")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.contents")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.count")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.time")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1.short")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1.multiline")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.sub.1")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.2")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.2.short")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.sub.2")
- }
-}
-
-
-group {
- name: "quickpanel/listitem_legacy/thumbnail";
-
- script {
- public g_is_show_dim_bg;
-
- public init_variables() {
- set_int(g_is_show_dim_bg, 0);
- }
- }
-
- parts {
- part {
- name: "background";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 (QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT + QP_THEME_LIST_ITEM_SEPERATOR_HEIGHT);
- max: -1 (QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT + QP_THEME_LIST_ITEM_SEPERATOR_HEIGHT);
- }
- }
- part {
- name: "seperator.top";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 QP_THEME_LIST_ITEM_SEPERATOR_HEIGHT;
- fixed: 0 1;
- rel1 {
- to: "background";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "background";
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "seperator.left";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 0;
- fixed: 1 0;
- rel1 {
- to: "background";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "background";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "seperator.right";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 0;
- fixed: 1 0;
- rel1 {
- to: "background";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "background";
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part{
- name: "clip.background";
- type:RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- visible:1;
- }
- }
- part {
- name: "base";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 1;
- min: 0 QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT;
- max: -1 QP_THEME_LIST_ITEM_NOTIFICATION_LEGACY_SINGLE_MULTI_HEIGHT;
- rel1 {
- relative: 1.0 1.0;
- to_x: "seperator.left";
- to_y: "seperator.top";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "seperator.right";
- to_y: "seperator.top";
- }
- align: 0.0 0.0;
- color_class: QP_THEME_ITEM_BG_COLOR;
- color: 255 255 255 235;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- }
- }
-
- //section layout for margin
-
- part {
- name: "margin.left";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 10 0;
- fixed: 1 0;
- rel1 {
- to: "base";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.right";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 8 0;
- fixed: 1 0;
- rel1 {
- to: "base";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
- }
- }
- part {
- name: "margin.left.icon";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 10 0;
- fixed: 1 0;
- rel1 {
- to: "base";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.top.icon";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 21;
- fixed: 0 1;
- rel1 {
- to: "base";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.top.text";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 12;
- fixed: 0 1;
- rel1 {
- to: "base";
- relative: 0.0 0.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.bottom";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 10;
- fixed: 0 1;
- rel1 {
- to: "base";
- relative: 0.0 1.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 1.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "margin.bottom.thin";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 2;
- fixed: 0 1;
- rel1 {
- to: "base";
- relative: 0.0 1.0;
- }
- rel2 {
- to: "base";
- relative: 1.0 1.0;
- }
- align: 0.0 1.0;
- }
- }
-
- //section layout for elements
- //section layout for icon
- part {
- name: "rect.icon.bg";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 46 46;
- max: 46 46;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left.icon";
- to_y:"margin.top.icon";
- relative: 1.0 1.0;
- }
- rel2 {
- to_x:"margin.left.icon";
- to_y:"margin.top.icon";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.icon";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: 46 46;
- max: 46 46;
- rel1 {
- to:"rect.icon.bg";
- relative: 0.5 0.5;
- }
- rel2 {
- to:"rect.icon.bg";
- relative: 0.5 0.5;
- }
- align: 0.5 0.5;
- }
- }
- part {
- name: "rect.icon.sub.padding";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 10;
- fixed: 0 1;
- rel1 {
- to:"rect.icon.bg";
- relative: 0.0 1.0;
- }
- rel2 {
- to:"rect.icon.bg";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.icon.sub";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 29 29;
- max: 29 29;
- fixed: 1 1;
- rel1 {
- to:"rect.icon.sub.padding";
- relative: 1.0 1.0;
- }
- rel2 {
- to:"rect.icon.sub.padding";
- relative: 1.0 1.0;
- }
- align: 1.0 1.0;
- }
- }
-
- //section layout for texts
- part {
- name: "rect.text.title";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 36;
- max: 9999 36;
- fixed: 1 1;
- rel1 {
- to_x:"rect.icon.bg";
- to_y:"margin.top.text";
- relative: 1.0 1.0;
- offset: +17 0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.top.text";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- description {
- state: "short" 0.0;
- inherit: "default" 0.0;
- rel1 {
- to_x:"rect.icon.bg";
- to_y:"margin.top.text";
- relative: 1.0 1.0;
- offset: +17 0;
- }
- rel2 {
- to_x:"object.text.count";
- to_y:"margin.top.text";
- relative: 0.0 1.0;
- offset: -13 0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.text.contents";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- max: 9999 36;
- fixed: 1 1;
- rel1 {
- to_x:"rect.icon.bg";
- to_y:"rect.text.title";
- relative: 1.0 1.0;
- }
- rel2 {
- to_x:"object.text.time";
- to_y:"rect.text.title";
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.text.info.2";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- fixed: 0 1;
- rel1 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.text.info.1";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- fixed: 0 1;
- rel1 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"rect.text.info.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.text.info.1.multiline";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"rect.text.info.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom.thin";
- relative: 0.0 0.0;
- }
- align: 0.0 0.0;
- }
- }
-
- //section layout for thumbnail
- part {
- name: "rect.thumbnail.list.1";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 64 64;
- rel1 {
- to_x:"margin.left.icon";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.left.icon";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.thumbnail.list.1.padding";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 8 0;
- rel1 {
- to:"rect.thumbnail.list.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to:"rect.thumbnail.list.1";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- }
- }
- part {
- name: "rect.thumbnail.list.2";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 64 64;
- rel1 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.thumbnail.list.2.padding";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 8 0;
- rel1 {
- to:"rect.thumbnail.list.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to:"rect.thumbnail.list.2";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- }
- }
- part {
- name: "rect.thumbnail.list.3";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 64 64;
- rel1 {
- to_x:"rect.thumbnail.list.2.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"rect.thumbnail.list.2.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.thumbnail.list.3.padding";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 8 0;
- rel1 {
- to:"rect.thumbnail.list.3";
- relative: 1.0 0.0;
- }
- rel2 {
- to:"rect.thumbnail.list.3";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- }
- }
- part {
- name: "rect.thumbnail.list.4";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 64 64;
- rel1 {
- to_x:"rect.thumbnail.list.3.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"rect.thumbnail.list.3.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "rect.thumbnail.list.4.padding";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 8 0;
- rel1 {
- to:"rect.thumbnail.list.4";
- relative: 1.0 0.0;
- }
- rel2 {
- to:"rect.thumbnail.list.4";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- }
- }
- part {
- name: "rect.thumbnail.list.5";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 64 64;
- rel1 {
- to_x:"rect.thumbnail.list.4.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"rect.thumbnail.list.4.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- }
- }
-
- part{
- name: "object.icon.background";
- type:SWALLOW;
- scale: 1;
- clip_to: "clip.background";
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part { name: "object.touch.effect";
- type: RECT;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- rel1.to:"base";
- rel2.to:"base";
- color: 0 0 0 0;
- visible: 0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- color_class: BOX_COLOR_BG_HIGHLIGHT;
- visible:1;
- }
- description {
- state: "show.dim" 0.0;
- inherit: "default" 0.0;
- color: 255 255 255 255;
- color_class: BOX_COLOR_BG_HIGHLIGHT_DIM;
- visible:1;
- }
- }
- part{
- name: "object.icon.bg.dim";
- type:IMAGE;
- scale:1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- image {
- normal:"quick_image_dimmed_port.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- image {
- normal:"quick_image_dimmed_port.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:1;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- image {
- normal:"quick_image_dimmed_land.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:1;
- }
- }
- part{
- name: BOX_PART_ICON;
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {to: "rect.icon";}
- rel2 {to: "rect.icon";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.icon.press";
- type:IMAGE;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {to: "rect.icon.bg";}
- rel2 {to: "rect.icon.bg";}
- image {
- normal:"icon_press.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- }
- part{
- name: BOX_PART_ICON_SUB;
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- max: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- rel1 {to: "rect.icon.sub";}
- rel2 {to: "rect.icon.sub";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
-
- //section thumbnail
- part{
- name: "object.thumbnail.list.1";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.1";}
- rel2 {to: "rect.thumbnail.list.1";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.thumbnail.list.2";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.2";}
- rel2 {to: "rect.thumbnail.list.2";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.thumbnail.list.3";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.3";}
- rel2 {to: "rect.thumbnail.list.3";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.thumbnail.list.4";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.4";}
- rel2 {to: "rect.thumbnail.list.4";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.thumbnail.list.5";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.5";}
- rel2 {to: "rect.thumbnail.list.5";}
- visible: 1;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
-
- part {
- name: "object.text.title";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.title";}
- rel2 {to: "rect.text.title";}
- text {
- style: "noti_list_title";
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_title_effect";
- }
- visible:1;
- }
- }
-
- part {
- name: "object.text.contents";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.contents";}
- rel2 {to: "rect.text.contents";}
- text {
- style: "noti_list_contents";
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_contents_effect";
- }
- visible:1;
- }
- }
- part {
- name: "object.text.count";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- min: 0 36;
- max: 79 36;
- rel1 {
- to_x:"margin.right";
- to_y:"rect.text.title";
- relative: 0.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.title";
- relative: 0.0 0.0;
- }
- text {
- style: "noti_list_count";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:0;
- align: 1.0 0.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_count_effect";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:1;
- }
- }
- part {
- name: "object.text.time";
- type: TEXTBLOCK;
- mouse_events: 0;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 42;
- max: 100 36;
- rel1 {
- to_x:"margin.right";
- to_y:"rect.text.title";
- relative: 0.0 1.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.title";
- relative: 0.0 1.0;
- }
- text {
- style: "noti_list_time";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:0;
- align: 1.0 0.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_time_effect";
- align: 1.0 0.5;
- min: 1 0;
- }
- visible:1;
- }
- }
- part {
- name: "object.text.info.1";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.1";}
- rel2 {to: "rect.text.info.1";}
- text {
- style: "noti_list_info";
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_effect";
- align: 0.0 0.5;
- }
- visible:0;
- }
- }
-
- part {
- name: "object.text.info.1.multiline";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 1 1;
- rel1 {
- to: "rect.text.info.1.multiline";
- }
- rel2 {
- to: "rect.text.info.1.multiline";
- }
- text {
- style: "noti_list_info";
- align: 0.0 0.0;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_effect";
- }
- visible:0;
- }
- }
-
- part {
- name: "object.text.info.2";
- scale: 1;
- type: TEXTBLOCK;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.2";}
- rel2 {to: "rect.text.info.2";}
- text {
- style: "noti_list_info";
- align: 0.0 0.5;
-
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "noti_list_info_effect";
- align: 0.0 0.5;
- }
- visible:0;
- }
- }
-
- part {
- name: "object.layer.touch.background";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {to: "base";}
- rel2 {to: "base";}
- color: 0 0 0 0;
- }
- }
- QUICKPANEL_FOCUS_OBJECT("focus", "base", "base")
- part {
- name: "object.layer.touch.button.1";
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.icon";
- }
- rel2 {to: "rect.icon";}
- color: 0 0 0 0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- }
-
- programs {
- program {
- name: "init.layout";
- signal: "load";
- source: "";
- in: 0.0 0.0;
- script{
- init_variables();
- }
- }
- program{
- name: "box.show.dim";
- signal: "box.show.dim";
- source: "box.prog";
- script {
- set_int(g_is_show_dim_bg, 1);
- }
- }
- program{
- name: "box.hide.dim";
- signal: "box.hide.dim";
- source: "box.prog";
- script {
- set_int(g_is_show_dim_bg, 0);
- }
- }
- program{
- name: "box.portrait";
- signal: "box.portrait";
- source: "box.prog";
- action: STATE_SET "portrait" 0.0;
- target: "base";
-
- target: "rect.thumbnail.list.1.padding";
- target: "rect.thumbnail.list.2.padding";
- target: "rect.thumbnail.list.3.padding";
- target: "rect.thumbnail.list.4.padding";
- target: "rect.thumbnail.list.5";
-
- target: "object.thumbnail.list.5";
- after: "box.portrait.custom";
- }
- program{
- name: "box.landscape";
- signal: "box.landscape";
- source: "box.prog";
- action: STATE_SET "landscape" 0.0;
- target: "base";
-
- target: "rect.thumbnail.list.1.padding";
- target: "rect.thumbnail.list.2.padding";
- target: "rect.thumbnail.list.3.padding";
- target: "rect.thumbnail.list.4.padding";
- target: "rect.thumbnail.list.5";
- target: "object.thumbnail.list.5";
- after: "box.landscape.custom";
- }
- program{
- name: "box.portrait.custom";
- source: "box.prog";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.icon.bg.dim", "portrait", 0.0);
- }
- }
- }
- program{
- name: "box.landscape.custom";
- source: "box.prog";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.icon.bg.dim", "landscape", 0.0);
- }
- }
- }
-#ifdef TBD
- program{
- name: "box.touch.down";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.background";
- action: SIGNAL_EMIT "selected" "edje";
- }
-#endif
- program{
- name: "effect,mouse,down";
- signal: "mouse,down,1";
- source: "object.layer.touch.background";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.touch.effect", "show.dim", 0.0);
- } else {
- set_state(PART:"object.touch.effect", "show", 0.0);
- }
- }
- }
- program{
- name: "effect,mouse,up";
- signal: "mouse,up,1";
- source: "object.layer.touch.background";
- action: STATE_SET "default" 0.0;
- transition: ACCELERATE 0.20;
- target: "object.touch.effect";
- }
- program{
- name: "box.button.1.touch.clicked";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.button.1";
- action: SIGNAL_EMIT "button_1" "edje";
- }
- program{
- name: "box.button.1.touch.down";
- signal: "mouse,down,1";
- source: "object.layer.touch.button.1";
- action: STATE_SET "show" 0.0;
- target: "object.icon.press";
- }
- program{
- name: "box.button.1.touch.up";
- signal: "mouse,up,1";
- source: "object.layer.touch.button.1";
- action: STATE_SET "hide" 0.0;
- target: "object.icon.press";
- }
- program{
- name: "box.show.icon.bg";
- signal: "box.show.icon.bg";
- source: "box.prog";
- action: STATE_SET "show" 0.0;
-
- target: "object.layer.touch.button.1";
- }
- program{
- name: "box.hide.icon.bg";
- signal: "box.hide.icon.bg";
- source: "box.prog";
- action: STATE_SET "hide" 0.0;
- target: "object.layer.touch.button.1";
- }
- program{
- name: "box.title.with.icon";
- signal: "box.title.with.icon";
- source: "box.prog";
- action: STATE_SET "default" 0.0;
- target: "rect.text.title";
- }
- program{
- name: "box.title.without.icon";
- signal: "box.title.without.icon";
- source: "box.prog";
- action: STATE_SET "without_icon" 0.0;
- target: "rect.text.title";
- }
- program{
- name: "title.long";
- signal: "title.long";
- source: "prog";
- action: STATE_SET "default" 0.0;
- target: "rect.text.title";
- }
- program{
- name: "title.short";
- signal: "title.short";
- source: "prog";
- action: STATE_SET "short" 0.0;
- target: "rect.text.title";
- }
- MAKE_PART_SHOW_PROGRAM("object.icon.background")
- MAKE_PART_SHOW_PROGRAM("object.icon")
- MAKE_PART_SHOW_PROGRAM("object.icon.sub")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.title")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.contents")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.count")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.time")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1.multiline")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.2")
- MAKE_PART_SHOW_PROGRAM("object.thumbnail.list.1")
- MAKE_PART_SHOW_PROGRAM("object.thumbnail.list.2")
- MAKE_PART_SHOW_PROGRAM("object.thumbnail.list.3")
- MAKE_PART_SHOW_PROGRAM("object.thumbnail.list.4")
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * 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.
- * 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.
- *
- */
-
-
-//#define DEBUG
-//#define DEBUG_TEXT
-
-#define MAKE_PART_SHOW_PROGRAM(PARTNAME)\
- program{\
- name: PARTNAME".object.show";\
- signal: "object.show";\
- source: PARTNAME;\
- action: STATE_SET "show" 0.0;\
- target: PARTNAME;\
- }\
-
-#define MAKE_PART_SHOW_TEXT_PROGRAM(PARTNAME)\
- program{\
- name: PARTNAME".text.show";\
- signal: "object.show";\
- source: PARTNAME;\
- action: STATE_SET "show" 0.0;\
- target: PARTNAME;\
- }\
- program{\
- name: PARTNAME".text.show.efect";\
- signal: "object.show.effect";\
- source: PARTNAME;\
- action: STATE_SET "show.effect" 0.0;\
- target: PARTNAME;\
- }\
-
-images {
- image: "quick_image_dimmed_port.png" COMP;
- image: "quick_image_dimmed_land.png" COMP;
- image: "icon_press.png" COMP;
-}
-
-#define NOTIBOX_FONT_SHADOW_COLOR 0 0 0 191
-#define NOTIBOX_FONT_OUTLINE_COLOR 0 0 0 191
-#define NOTIBOX_FONT_NO_SHADOW_COLOR 0 0 0 0
-#define NOTIBOX_FONT_NO_OUTLINE_COLOR 0 0 0 0
-
-#define NOTIBOX_CONTENTS_FONT "Tizen:style=Bold"
-#define NOTIBOX_CONTENTS_FONT_SIZE 20
-#define NOTIBOX_CONTENTS_FONT_COLOR 248 246 239 255
-
-#define NOTIBOX_INFO_FONT "Tizen:style=Bold"
-#define NOTIBOX_INFO_FONT_SIZE 18
-#define NOTIBOX_INFO_FONT_COLOR 180 180 180 255
-
-#define NOTIBOX_INFO_SHORT_FONT "Tizen:style=Bold"
-#define NOTIBOX_INFO_SHORT_FONT_SIZE 18
-#define NOTIBOX_INFO_SHORT_FONT_COLOR 180 180 180 255
-
-#define NOTIBOX_INFO_SUB_FONT "Tizen:style=Regular"
-#define NOTIBOX_INFO_SUB_FONT_SIZE 16
-#define NOTIBOX_INFO_SUB_FONT_COLOR 180 180 180 255
-
-#define TEXT_CLASS_TIZEN "tizen"
-#define TEXT_EFFECT "OUTLINE_SHADOW"
-
-styles {
- style {
- name: "notibox_title";
- base: "font=Tizen:style=Regular text_class=tizen font_size=22 color=#F8F6EF ellipsis=1.0 linegap=-6 wrap=mixed";
- }
-
- style {
- name: "notibox_title_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size=22 color=#F8F6EF ellipsis=1.0 linegap=-6 wrap=mixed style=outline_shadow outline_color=#000000BF shadow_color=#000000BF";
- }
-
- style {
- name: "notibox_contents";
- base: "font=Tizen:style=Bold text_class=tizen font_size=20 color=#F8F6EF ellipsis=1.0 linegap=-6 wrap=mixed";
- }
-
- style {
- name: "notibox_contents_effect";
- base: "font=Tizen:style=Bold text_class=tizen font_size=20 color=#F8F6EF ellipsis=1.0 linegap=-6 wrap=mixed style=outline_shadow outline_color=#000000BF shadow_color=#000000BF";
- }
-
- style {
- name: "notibox_info";
- base: "font=Tizen:style=Bold text_class=tizen font_size=18 color=#BFBFBFFF ellipsis=1.0 linegap=-6 wrap=mixed";
- }
-
- style {
- name: "notibox_info_effect";
- base: "font=Tizen:style=Bold text_class=tizen font_size=18 color=#BFBFBFFF ellipsis=1.0 linegap=-6 wrap=mixed style=outline_shadow outline_color=#000000BF shadow_color=#000000BF";
- }
-
- style {
- name: "notibox_info_short";
- base: "font=Tizen:style=Bold text_class=tizen font_size=18 color=#BFBFBFFF ellipsis=1.0 linegap=-6 wrap=mixed";
- }
-
- style {
- name: "notibox_info_short_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size=18 color=#BFBFBFFF ellipsis=1.0 linegap=-6 wrap=mixed style=outline_shadow outline_color=#000000BF shadow_color=#000000BF";
- }
-
- style {
- name: "notibox_info_sub";
- base: "font=Tizen:style=Regular text_class=tizen font_size=12 color=#BFBFBFFF ellipsis=1.0 linegap=-6 wrap=mixed";
- }
-
- style {
- name: "notibox_info_sub_effect";
- base: "font=Tizen:style=Regular text_class=tizen font_size=12 color=#BFBFBFFF ellipsis=1.0 linegap=-6 wrap=mixed style=outline_shadow outline_color=#000000BF shadow_color=#000000BF";
- }
-}
-
-group {
- name: "quickpanel/notibox/single_multi";
-
- script {
- public g_is_show_dim_bg;
-
- public init_variables() {
- set_int(g_is_show_dim_bg, 0);
- }
- }
-
- parts {
- part{
- name: "clip.background";
- type:RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- visible:1;
- }
- }
- part {
- name: "background";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- align: 0.0 0.0;
- color_class: BOX_COLOR_BG;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- }
- }
-
- //section layout for margin
-
- part {
- name: "margin.left";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: BOX_MARGIN_L_TEXT_H 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.right";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: BOX_MARGIN_R_TEXT_H 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.left.icon";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 10 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 255 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.top.icon";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 10;
- fixed: 0 1;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 255 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.top.text";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 10;
- fixed: 0 1;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.bottom";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 8;
- fixed: 0 1;
- rel1 {
- relative: 0.0 1.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.bottom.thin";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 2;
- fixed: 0 1;
- rel1 {
- relative: 0.0 1.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
-
- //section layout for elements
- //section layout for icon
- part {
- name: "rect.icon.bg";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left.icon";
- to_y:"margin.top.icon";
- relative: 1.0 1.0;
- }
- rel2 {
- to_x:"margin.left.icon";
- to_y:"margin.top.icon";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 255 0 0 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.icon";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {
- to:"rect.icon.bg";
- relative: 0.5 0.5;
- }
- rel2 {
- to:"rect.icon.bg";
- relative: 0.5 0.5;
- }
- align: 0.5 0.5;
-#ifdef DEBUG
- color: 205 205 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.icon.sub.padding";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 10;
- fixed: 0 1;
- rel1 {
- to:"rect.icon.bg";
- relative: 0.0 1.0;
- }
- rel2 {
- to:"rect.icon.bg";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 235 215 235 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.icon.sub";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- max: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- fixed: 1 1;
- rel1 {
- to:"rect.icon.sub.padding";
- relative: 1.0 1.0;
- }
- rel2 {
- to:"rect.icon.sub.padding";
- relative: 1.0 1.0;
- }
- align: 1.0 1.0;
-#ifdef DEBUG
- color: 255 0 100 255;
-#else
- visible:0;
-#endif
- }
- }
-
- //section layout for texts
- part {
- name: "rect.text.title";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 125 81;
- max: 9999 81;
- fixed: 1 1;
- rel1 {
- to_x:"rect.icon.bg";
- to_y:"rect.icon.bg";
- relative: 1.0 0.5;
- offset: +6 0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.icon";
- relative: 0.0 0.5;
- }
- align: 0.0 0.5;
-#ifdef DEBUG
- color: 100 100 100 255;
-#else
- visible:0;
-#endif
- }
- description {
- state: "without_icon" 0.0;
- min: 125 81;
- max: 9999 81;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.icon.bg";
- relative: 1.0 0.5;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.icon.bg";
- relative: 0.0 0.5;
- }
- align: 0.0 0.5;
-#ifdef DEBUG
- color: 100 100 100 255;
-#else
- visible:0;
-#endif
- }
- }
-
- part {
- name: "rect.text.info.2";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_INFO_HEIGHT;
- fixed: 0 1;
- rel1 {
- to_x:"margin.left";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 100 100 100 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.info.sub.2";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_INFO_HEIGHT;
- max: 0 BOX_TEXT_INFO_HEIGHT;
- fixed: 1 1;
- rel1 {
- to_x:"margin.right";
- to_y:"margin.bottom";
- relative: 0.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom";
- relative: 0.0 0.0;
- }
- align: 1.0 1.0;
-#ifdef DEBUG
- color: 76 76 76 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.info.2.short";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"object.text.info.sub.2";
- to_y:"rect.text.info.2";
- relative: 0.0 1.0;
- offset: BOX_TEXT_SUB_PADDING_WIDTH 0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 102 103 104 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.info.1";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_INFO_HEIGHT;
- fixed: 0 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 100 150 100 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.info.1.multiline";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom.thin";
- relative: 0.0 0.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 255 150 100 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.info.sub.1";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_INFO_HEIGHT;
- max: 0 BOX_TEXT_INFO_HEIGHT;
- fixed: 1 1;
- rel1 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- align: 1.0 1.0;
-#ifdef DEBUG
- color: 76 76 76 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.info.1.short";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"object.text.info.sub.1";
- to_y:"rect.text.info.1";
- relative: 0.0 1.0;
- offset: BOX_TEXT_SUB_PADDING_WIDTH 0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 102 103 104 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.contents";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_CONTENTS_HEIGHT;
- fixed: 0 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.info.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"object.text.count";
- to_y:"rect.text.info.1";
- relative: 0.0 0.0;
- offset: -8 0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 100 150 100 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.contents.multiline.short";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.contents";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 100 150 100 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.contents.multiline";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.text.contents";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom.thin";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 100 150 100 255;
-#else
- visible:0;
-#endif
- }
- }
- //section objects
- part{
- name: "object.icon.background";
- type:SWALLOW;
- scale: 1;
- clip_to: "clip.background";
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.touch.effect";
- type:RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- color: 0 0 0 0;
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- color_class: BOX_COLOR_BG_HIGHLIGHT;
- visible:1;
- }
- description {
- state: "show.dim" 0.0;
- inherit: "default" 0.0;
- color_class: BOX_COLOR_BG_HIGHLIGHT_DIM;
- visible:1;
- }
- }
- part{
- name: "object.icon.bg.dim";
- type:IMAGE;
- scale:1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- image {
- normal:"quick_image_dimmed_port.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- image {
- normal:"quick_image_dimmed_port.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:1;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- image {
- normal:"quick_image_dimmed_land.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:1;
- }
- }
- part{
- name: BOX_PART_ICON;
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {to: "rect.icon";}
- rel2 {to: "rect.icon";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.icon.press";
- type:IMAGE;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {to: "rect.icon.bg";}
- rel2 {to: "rect.icon.bg";}
- image {
- normal:"icon_press.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- }
- part{
- name: BOX_PART_ICON_SUB;
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- max: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- rel1 {to: "rect.icon.sub";}
- rel2 {to: "rect.icon.sub";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
-
- part {
- name: "object.text.title";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.title";}
- rel2 {to: "rect.text.title";}
- text {
- style: "notibox_title";
- size: 34;
- align: 0.0 0.5;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "notibox_title_effect";
- }
- visible:1;
- }
- }
-
- part {
- name: "object.text.contents";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.contents";}
- rel2 {to: "rect.text.contents";}
- color: NOTIBOX_CONTENTS_FONT_COLOR;
- text {
- font: NOTIBOX_CONTENTS_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_CONTENTS_FONT_SIZE;
- align: 0.0 0.5;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.text.contents.multiline.short";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 1 1;
- rel1 {
- to: "rect.text.contents.multiline.short";
- }
- rel2 {
- to: "rect.text.contents.multiline.short";
- }
- text {
- style: "notibox_contents";
- align: 0.0 0.0;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "notibox_contents_effect";
- }
- visible:1;
- }
- }
- part {
- name: "object.text.contents.multiline";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 1 1;
- rel1 {
- to: "rect.text.contents.multiline";
- }
- rel2 {
- to: "rect.text.contents.multiline";
- }
- text {
- style: "notibox_contents";
- align: 0.0 0.0;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "notibox_contents_effect";
- }
- visible:1;
- }
- }
- part {
- name: "object.text.count";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_CONTENTS_HEIGHT;
- max: 79 BOX_TEXT_CONTENTS_HEIGHT;
- rel1 {
- to_x:"margin.right";
- to_y:"rect.text.info.1";
- relative: 0.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.info.1";
- relative: 0.0 0.0;
- }
- color: NOTIBOX_CONTENTS_FONT_COLOR;
- text {
- font: NOTIBOX_CONTENTS_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_CONTENTS_FONT_SIZE;
- align: 1.0 0.5;
- min: 1 0;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- align: 1.0 1.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.text.info.1";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.1";}
- rel2 {to: "rect.text.info.1";}
- color: NOTIBOX_INFO_FONT_COLOR;
- text {
- font: NOTIBOX_INFO_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_INFO_FONT_SIZE;
- align: 0.0 0.5;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.text.info.1.short";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.1.short";}
- rel2 {to: "rect.text.info.1.short";}
- color: NOTIBOX_INFO_SHORT_FONT_COLOR;
- text {
- font: NOTIBOX_INFO_SHORT_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_INFO_SHORT_FONT_SIZE;
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.text.info.1.multiline";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 1 1;
- rel1 {
- to: "rect.text.info.1.multiline";
- }
- rel2 {
- to: "rect.text.info.1.multiline";
- }
- text {
- style: "notibox_info";
- align: 0.0 0.0;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "notibox_info_effect";
- }
- visible:1;
- }
- }
- part {
- name: "object.text.info.sub.1";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.text.info.sub.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "rect.text.info.sub.1";
- relative: 1.0 1.0;
- }
- color: NOTIBOX_INFO_SUB_FONT_COLOR;
- text {
- font: NOTIBOX_INFO_SUB_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_INFO_SUB_FONT_SIZE;
- align: 1.0 0.5;
- min: 1 0;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- align:1.0 0.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
-
- part {
- name: "object.text.info.2";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.2";}
- rel2 {to: "rect.text.info.2";}
- color: NOTIBOX_INFO_FONT_COLOR;
- text {
- font: NOTIBOX_INFO_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_INFO_FONT_SIZE;
- align: 0.0 0.5;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.text.info.2.short";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.2.short";}
- rel2 {to: "rect.text.info.2.short";}
- color: NOTIBOX_INFO_SHORT_FONT_COLOR;
- text {
- font: NOTIBOX_INFO_SHORT_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_INFO_SHORT_FONT_SIZE;
- align: 0.0 0.5;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.text.info.sub.2";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.text.info.sub.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to: "rect.text.info.sub.2";
- relative: 1.0 1.0;
- }
- color: NOTIBOX_INFO_SUB_FONT_COLOR;
- text {
- font: NOTIBOX_INFO_SUB_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_INFO_SUB_FONT_SIZE;
- align: 1.0 0.5;
- min: 1 0;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- align:1.0 0.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.layer.touch.background";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- color: 0 0 0 0;
- }
- }
- QUICKPANEL_FOCUS_OBJECT("focus", "background", "background")
- part {
- name: "object.layer.touch.button.1";
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.icon";
- }
- rel2 {to: "rect.icon";}
- color: 0 0 0 0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- }
-
- programs {
- program {
- name: "init.layout";
- signal: "load";
- source: "";
- in: 0.0 0.0;
- script{
- init_variables();
- }
- }
- program{
- name: "box.show.dim";
- signal: "box.show.dim";
- source: "box.prog";
- script {
- set_int(g_is_show_dim_bg, 1);
- }
- }
- program{
- name: "box.hide.dim";
- signal: "box.hide.dim";
- source: "box.prog";
- script {
- set_int(g_is_show_dim_bg, 0);
- }
- }
- program{
- name: "box.portrait";
- signal: "box.portrait";
- source: "box.prog";
- action: STATE_SET "portrait" 0.0;
- target: "background";
- after: "box.portrait.custom";
- }
- program{
- name: "box.landscape";
- signal: "box.landscape";
- source: "box.prog";
- action: STATE_SET "landscape" 0.0;
- target: "background";
- after: "box.landscape.custom";
- }
- program{
- name: "box.portrait.custom";
- source: "box.prog";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.icon.bg.dim", "portrait", 0.0);
- }
- }
- }
- program{
- name: "box.landscape.custom";
- source: "box.prog";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.icon.bg.dim", "landscape", 0.0);
- }
- }
- }
-#ifdef TBD
- program{
- name: "box.touch.down";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.background";
- action: SIGNAL_EMIT "selected" "edje";
- }
-#endif
- program{
- name: "effect,mouse,down";
- signal: "mouse,down,1";
- source: "object.layer.touch.background";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.touch.effect", "show.dim", 0.0);
- } else {
- set_state(PART:"object.touch.effect", "show", 0.0);
- }
- }
- }
- program{
- name: "effect,mouse,up";
- signal: "mouse,up,1";
- source: "object.layer.touch.background";
- action: STATE_SET "default" 0.0;
- transition: ACCELERATE 0.20;
- target: "object.touch.effect";
- }
- program{
- name: "box.button.1.touch.clicked";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.button.1";
- action: SIGNAL_EMIT "button_1" "edje";
- }
- program{
- name: "box.button.1.touch.down";
- signal: "mouse,down,1";
- source: "object.layer.touch.button.1";
- action: STATE_SET "show" 0.0;
- target: "object.icon.press";
- }
- program{
- name: "box.button.1.touch.up";
- signal: "mouse,up,1";
- source: "object.layer.touch.button.1";
- action: STATE_SET "hide" 0.0;
- target: "object.icon.press";
- }
- program{
- name: "box.show.icon.bg";
- signal: "box.show.icon.bg";
- source: "box.prog";
- action: STATE_SET "show" 0.0;
- target: "object.layer.touch.button.1";
- }
- program{
- name: "box.hide.icon.bg";
- signal: "box.hide.icon.bg";
- source: "box.prog";
- action: STATE_SET "hide" 0.0;
- target: "object.layer.touch.button.1";
- }
- program{
- name: "box.title.with.icon";
- signal: "box.title.with.icon";
- source: "box.prog";
- action: STATE_SET "default" 0.0;
- target: "rect.text.title";
- }
- program{
- name: "box.title.without.icon";
- signal: "box.title.without.icon";
- source: "box.prog";
- action: STATE_SET "without_icon" 0.0;
- target: "rect.text.title";
- }
- MAKE_PART_SHOW_PROGRAM("object.icon.background")
- MAKE_PART_SHOW_PROGRAM("object.icon")
- MAKE_PART_SHOW_PROGRAM("object.icon.sub")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.title")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.contents")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.contents.multiline.short")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.contents.multiline")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.count")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1.short")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1.multiline")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.sub.1")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.2")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.2.short")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.sub.2")
- }
-}
-
-
-group {
- name: "quickpanel/notibox/thumbnail";
-
- script {
- public g_is_show_dim_bg;
-
- public init_variables() {
- set_int(g_is_show_dim_bg, 0);
- }
- }
-
- parts {
- part{
- name: "clip.background";
- type:RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- visible:1;
- }
- }
- part {
- name: "background";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- color_class: BOX_COLOR_BG;
- align: 0.0 0.0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- }
- }
-
- //section layout for margin
-
- part {
- name: "margin.left";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: BOX_MARGIN_L_TEXT_H 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.right";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: BOX_MARGIN_R_TEXT_H 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 1.0 0.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.left.icon";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 10 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 0.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 255 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.top.icon";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 10;
- fixed: 0 1;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 255 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.top.text";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 10;
- fixed: 0 1;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 1.0 0.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.bottom";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 8;
- fixed: 0 1;
- rel1 {
- relative: 0.0 1.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "margin.bottom.thin";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 2;
- fixed: 0 1;
- rel1 {
- relative: 0.0 1.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 0 0 255 255;
-#else
- visible:0;
-#endif
- }
- }
-
- //section layout for elements
- //section layout for icon
- part {
- name: "rect.icon.bg";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left.icon";
- to_y:"margin.top.icon";
- relative: 1.0 1.0;
- }
- rel2 {
- to_x:"margin.left.icon";
- to_y:"margin.top.icon";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 255 0 0 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.icon";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {
- to:"rect.icon.bg";
- relative: 0.5 0.5;
- }
- rel2 {
- to:"rect.icon.bg";
- relative: 0.5 0.5;
- }
- align: 0.5 0.5;
-#ifdef DEBUG
- color: 205 205 255 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.icon.sub.padding";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 9;
- fixed: 0 1;
- rel1 {
- to:"rect.icon.bg";
- relative: 0.0 1.0;
- }
- rel2 {
- to:"rect.icon.bg";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 235 215 235 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.icon.sub";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- max: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- fixed: 1 1;
- rel1 {
- to:"rect.icon.sub.padding";
- relative: 1.0 1.0;
- }
- rel2 {
- to:"rect.icon.sub.padding";
- relative: 1.0 1.0;
- }
- align: 1.0 1.0;
-#ifdef DEBUG
- color: 255 0 100 255;
-#else
- visible:0;
-#endif
- }
- }
-
- //section layout for texts
- part {
- name: "rect.text.title";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 125 81;
- max: 9999 81;
- fixed: 1 1;
- rel1 {
- to_x:"rect.icon.bg";
- to_y:"rect.icon.bg";
- relative: 1.0 0.5;
- offset: +10 0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.icon.bg";
- relative: 0.0 0.5;
- }
- align: 0.0 0.5;
-#ifdef DEBUG
- color: 100 100 100 255;
-#else
- visible:0;
-#endif
- }
- description {
- state: "without_icon" 0.0;
- min: 125 81;
- max: 9999 81;
- fixed: 1 1;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.icon.bg";
- relative: 1.0 0.5;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.icon.bg";
- relative: 0.0 0.5;
- }
- align: 0.0 0.5;
-#ifdef DEBUG
- color: 100 100 100 255;
-#else
- visible:0;
-#endif
- }
- }
-
- part {
- name: "rect.text.info.2";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_INFO_HEIGHT;
- fixed: 0 1;
- rel1 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 100 100 100 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.info.1";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_INFO_HEIGHT;
- fixed: 0 1;
- rel1 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"rect.text.info.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.text.info.2";
- relative: 0.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 100 150 100 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.text.info.1.multiline";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"rect.text.info.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"margin.bottom.thin";
- relative: 0.0 0.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 255 150 100 255;
-#else
- visible:0;
-#endif
- }
- }
-
- part {
- name: "rect.text.contents";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_CONTENTS_HEIGHT;
- rel1 {
- to_x:"margin.left";
- to_y:"rect.thumbnail.list.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"object.text.count";
- to_y:"rect.thumbnail.list.1";
- relative: 0.0 0.0;
- offset: -8 0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 100 150 100 255;
-#else
- visible:0;
-#endif
- }
- }
- //section layout for thumbnail
- part {
- name: "rect.thumbnail.list.1";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 50 50;
- rel1 {
- to_x:"margin.left.icon";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"margin.left.icon";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 255 0 0 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.thumbnail.list.1.padding";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 3 0;
- rel1 {
- to:"rect.thumbnail.list.1";
- relative: 1.0 0.0;
- }
- rel2 {
- to:"rect.thumbnail.list.1";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 0 0 255;
-#else
- visible:0;
-#endif
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- }
- }
- part {
- name: "rect.thumbnail.list.2";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 50 50;
- rel1 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"rect.thumbnail.list.1.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 255 0 0 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.thumbnail.list.2.padding";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 2 0;
- rel1 {
- to:"rect.thumbnail.list.2";
- relative: 1.0 0.0;
- }
- rel2 {
- to:"rect.thumbnail.list.2";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 0 0 255;
-#else
- visible:0;
-#endif
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- }
- }
- part {
- name: "rect.thumbnail.list.3";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 50 50;
- rel1 {
- to_x:"rect.thumbnail.list.2.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"rect.thumbnail.list.2.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 255 0 0 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.thumbnail.list.3.padding";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 2 0;
- rel1 {
- to:"rect.thumbnail.list.3";
- relative: 1.0 0.0;
- }
- rel2 {
- to:"rect.thumbnail.list.3";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 0 0 255;
-#else
- visible:0;
-#endif
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- }
- }
- part {
- name: "rect.thumbnail.list.4";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 50 50;
- rel1 {
- to_x:"rect.thumbnail.list.3.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"rect.thumbnail.list.3.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 255 0 0 255;
-#else
- visible:0;
-#endif
- }
- }
- part {
- name: "rect.thumbnail.list.4.padding";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 2 0;
- rel1 {
- to:"rect.thumbnail.list.4";
- relative: 1.0 0.0;
- }
- rel2 {
- to:"rect.thumbnail.list.4";
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
-#ifdef DEBUG
- color: 0 0 0 255;
-#else
- visible:0;
-#endif
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 0;
- }
- }
- part {
- name: "rect.thumbnail.list.5";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 50 50;
- rel1 {
- to_x:"rect.thumbnail.list.4.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- rel2 {
- to_x:"rect.thumbnail.list.4.padding";
- to_y:"margin.bottom";
- relative: 1.0 0.0;
- }
- align: 0.0 1.0;
-#ifdef DEBUG
- color: 255 0 0 255;
-#else
- visible:0;
-#endif
-
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- }
- }
-
- part{
- name: "object.icon.background";
- type:SWALLOW;
- scale: 1;
- clip_to: "clip.background";
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.touch.effect";
- type:RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- color: 0 0 0 0;
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- color_class: BOX_COLOR_BG_HIGHLIGHT;
- visible:1;
- }
- description {
- state: "show.dim" 0.0;
- inherit: "default" 0.0;
- color_class: BOX_COLOR_BG_HIGHLIGHT_DIM;
- visible:1;
- }
- }
- part{
- name: "object.icon.bg.dim";
- type:IMAGE;
- scale:1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- image {
- normal:"quick_image_dimmed_port.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- image {
- normal:"quick_image_dimmed_port.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:1;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- image {
- normal:"quick_image_dimmed_land.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:1;
- }
- }
- part{
- name: BOX_PART_ICON;
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {to: "rect.icon";}
- rel2 {to: "rect.icon";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.icon.press";
- type:IMAGE;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- max: BOX_ICON_BG_SIZE_W BOX_ICON_BG_SIZE_H;
- rel1 {to: "rect.icon.bg";}
- rel2 {to: "rect.icon.bg";}
- image {
- normal:"icon_press.png";
- border: 0 0 0 0;
- border_scale: 1;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible:0;
- }
- }
- part{
- name: BOX_PART_ICON_SUB;
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- min: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- max: BOX_ICON_SUB_SIZE_W BOX_ICON_SUB_SIZE_H;
- rel1 {to: "rect.icon.sub";}
- rel2 {to: "rect.icon.sub";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
-
- //section thumbnail
- part{
- name: "object.thumbnail.list.1";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.1";}
- rel2 {to: "rect.thumbnail.list.1";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.thumbnail.list.2";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.2";}
- rel2 {to: "rect.thumbnail.list.2";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.thumbnail.list.3";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.3";}
- rel2 {to: "rect.thumbnail.list.3";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.thumbnail.list.4";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.4";}
- rel2 {to: "rect.thumbnail.list.4";}
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- }
- part{
- name: "object.thumbnail.list.5";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.thumbnail.list.5";}
- rel2 {to: "rect.thumbnail.list.5";}
- visible: 0;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- }
- }
-
- part {
- name: "object.text.title";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.title";}
- rel2 {to: "rect.text.title";}
- text {
- style: "notibox_title";
- size: 34;
- align: 0.0 0.5;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "notibox_title_effect";
- }
- visible:1;
- }
- }
-
- part {
- name: "object.text.contents";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.contents";}
- rel2 {to: "rect.text.contents";}
- color: NOTIBOX_CONTENTS_FONT_COLOR;
- text {
- font: NOTIBOX_CONTENTS_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_CONTENTS_FONT_SIZE;
- align: 0.0 0.5;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.text.count";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- min: 0 BOX_TEXT_CONTENTS_HEIGHT;
- max: 790 BOX_TEXT_CONTENTS_HEIGHT;
- rel1 {
- to_x:"margin.right";
- to_y:"rect.thumbnail.list.1";
- relative: 0.0 0.0;
- }
- rel2 {
- to_x:"margin.right";
- to_y:"rect.thumbnail.list.1";
- relative: 0.0 0.0;
- }
- color: NOTIBOX_CONTENTS_FONT_COLOR;
- text {
- font: NOTIBOX_CONTENTS_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_CONTENTS_FONT_SIZE;
- align: 1.0 0.5;
- min: 1 0;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- align: 1.0 1.0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
- part {
- name: "object.text.info.1";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.1";}
- rel2 {to: "rect.text.info.1";}
- color: NOTIBOX_INFO_FONT_COLOR;
- text {
- font: NOTIBOX_INFO_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_INFO_FONT_SIZE;
- align: 0.0 0.5;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
-
- part {
- name: "object.text.info.1.multiline";
- scale: 1;
- type: TEXTBLOCK;
- multiline: 1;
- description {
- state: "default" 0.0;
- align: 0.0 0.0;
- fixed: 1 1;
- rel1 {
- to: "rect.text.info.1.multiline";
- }
- rel2 {
- to: "rect.text.info.1.multiline";
- }
- text {
- style: "notibox_info";
- align: 0.0 0.0;
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- text {
- style: "notibox_info_effect";
- }
- visible:1;
- }
- }
-
- part {
- name: "object.text.info.2";
- scale: 1;
- type: TEXT;
- effect: TEXT_EFFECT;
- description {
- state: "default" 0.0;
- rel1 {to: "rect.text.info.2";}
- rel2 {to: "rect.text.info.2";}
- color: NOTIBOX_INFO_FONT_COLOR;
- text {
- font: NOTIBOX_INFO_FONT;
- text_class: TEXT_CLASS_TIZEN;
- size: NOTIBOX_INFO_FONT_SIZE;
- align: 0.0 0.5;
-#ifdef DEBUG_TEXT
- text: "some string of text to display";
-#endif
- }
- visible:0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "show.effect" 0.0;
- inherit: "default" 0.0;
- color2: NOTIBOX_FONT_SHADOW_COLOR;
- color3: NOTIBOX_FONT_OUTLINE_COLOR;
- visible:1;
- }
- }
-
- part {
- name: "object.layer.touch.background";
- mouse_events: 1;
- repeat_events: 1;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- color: 0 0 0 0;
- }
- }
- QUICKPANEL_FOCUS_OBJECT("focus", "background", "background")
- part {
- name: "object.layer.touch.button.1";
- mouse_events: 1;
- repeat_events: 0;
- scale: 1;
- type: RECT;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.icon";
- }
- rel2 {to: "rect.icon";}
- color: 0 0 0 0;
- }
- description {
- state: "show" 0.0;
- inherit: "default" 0.0;
- visible:1;
- }
- description {
- state: "hide" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- }
- }
- }
-
- programs {
- program {
- name: "init.layout";
- signal: "load";
- source: "";
- in: 0.0 0.0;
- script{
- init_variables();
- }
- }
- program{
- name: "box.show.dim";
- signal: "box.show.dim";
- source: "box.prog";
- script {
- set_int(g_is_show_dim_bg, 1);
- }
- }
- program{
- name: "box.hide.dim";
- signal: "box.hide.dim";
- source: "box.prog";
- script {
- set_int(g_is_show_dim_bg, 0);
- }
- }
- program{
- name: "box.portrait";
- signal: "box.portrait";
- source: "box.prog";
- action: STATE_SET "portrait" 0.0;
- target: "background";
-
- target: "rect.thumbnail.list.1.padding";
- target: "rect.thumbnail.list.2.padding";
- target: "rect.thumbnail.list.3.padding";
- target: "rect.thumbnail.list.4.padding";
- target: "rect.thumbnail.list.5";
-
- target: "object.thumbnail.list.5";
- after: "box.portrait.custom";
- }
- program{
- name: "box.landscape";
- signal: "box.landscape";
- source: "box.prog";
- action: STATE_SET "landscape" 0.0;
- target: "background";
-
- target: "rect.thumbnail.list.1.padding";
- target: "rect.thumbnail.list.2.padding";
- target: "rect.thumbnail.list.3.padding";
- target: "rect.thumbnail.list.4.padding";
- target: "rect.thumbnail.list.5";
- target: "object.thumbnail.list.5";
- after: "box.landscape.custom";
- }
- program{
- name: "box.portrait.custom";
- source: "box.prog";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.icon.bg.dim", "portrait", 0.0);
- }
- }
- }
- program{
- name: "box.landscape.custom";
- source: "box.prog";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.icon.bg.dim", "landscape", 0.0);
- }
- }
- }
-#ifdef TBD
- program{
- name: "box.touch.down";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.background";
- action: SIGNAL_EMIT "selected" "edje";
- }
-#endif
- program{
- name: "effect,mouse,down";
- signal: "mouse,down,1";
- source: "object.layer.touch.background";
- script {
- if (get_int(g_is_show_dim_bg) == 1) {
- set_state(PART:"object.touch.effect", "show.dim", 0.0);
- } else {
- set_state(PART:"object.touch.effect", "show", 0.0);
- }
- }
- }
- program{
- name: "effect,mouse,up";
- signal: "mouse,up,1";
- source: "object.layer.touch.background";
- action: STATE_SET "default" 0.0;
- transition: ACCELERATE 0.20;
- target: "object.touch.effect";
- }
- program{
- name: "box.button.1.touch.clicked";
- signal: "mouse,clicked,1";
- source: "object.layer.touch.button.1";
- action: SIGNAL_EMIT "button_1" "edje";
- }
- program{
- name: "box.button.1.touch.down";
- signal: "mouse,down,1";
- source: "object.layer.touch.button.1";
- action: STATE_SET "show" 0.0;
- target: "object.icon.press";
- }
- program{
- name: "box.button.1.touch.up";
- signal: "mouse,up,1";
- source: "object.layer.touch.button.1";
- action: STATE_SET "hide" 0.0;
- target: "object.icon.press";
- }
- program{
- name: "box.show.icon.bg";
- signal: "box.show.icon.bg";
- source: "box.prog";
- action: STATE_SET "show" 0.0;
-
- target: "object.layer.touch.button.1";
- }
- program{
- name: "box.hide.icon.bg";
- signal: "box.hide.icon.bg";
- source: "box.prog";
- action: STATE_SET "hide" 0.0;
-
- target: "object.layer.touch.button.1";
- }
- program{
- name: "box.title.with.icon";
- signal: "box.title.with.icon";
- source: "box.prog";
- action: STATE_SET "default" 0.0;
- target: "rect.text.title";
- }
- program{
- name: "box.title.without.icon";
- signal: "box.title.without.icon";
- source: "box.prog";
- action: STATE_SET "without_icon" 0.0;
- target: "rect.text.title";
- }
- MAKE_PART_SHOW_PROGRAM("object.icon.background")
- MAKE_PART_SHOW_PROGRAM("object.icon")
- MAKE_PART_SHOW_PROGRAM("object.icon.sub")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.title")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.contents")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.count")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.1.multiline")
- MAKE_PART_SHOW_TEXT_PROGRAM("object.text.info.2")
- MAKE_PART_SHOW_PROGRAM("object.thumbnail.list.1")
- MAKE_PART_SHOW_PROGRAM("object.thumbnail.list.2")
- MAKE_PART_SHOW_PROGRAM("object.thumbnail.list.3")
- MAKE_PART_SHOW_PROGRAM("object.thumbnail.list.4")
- }
-}
\ No newline at end of file
+++ /dev/null
-/*
- * 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.
- * 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 "quickpanel_def.h"
-
- styles {
- style {
- name: "help";
- base: "font=Tizen:style=Bold text_class=tizen font_size=30 color=#6e6f76FF ellipsis=1.0 wrap=mixed";
- }
-}
-
- group {
- name: "quickpanel/page_edit_base";
- parts {
- part {
- name: "background";
- type: RECT;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- min: QP_WIN_W (QP_WIN_H - QP_DATE_H - QP_HANDLE_H);
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: QP_WIN_H (QP_WIN_W - QP_DATE_H - QP_HANDLE_H);
- }
- }
- part{
- name: "object.layout";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "background";}
- rel2 {to: "background";}
- align: 0.0 0.0;
- visible:1;
- }
- }
- }
- programs {
- program{
- name: "portrait";
- signal: "portrait";
- source: "prog";
- action: STATE_SET "portrait" 0.0;
- target: "background";
- }
- program{
- name: "landscape";
- signal: "landscape";
- source: "prog";
- action: STATE_SET "landscape" 0.0;
- target: "background";
- }
- }
- }
- group {
- name: "quickpanel/page_edit";
- parts {
- part {
- name: "background";
- type: SPACER;
- scale: 1;
- mouse_events: 1;
- description {
- state: "default" 0.0;
- min: QP_WIN_W (QP_WIN_H - QP_DATE_H - QP_HANDLE_H);
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: QP_WIN_H (QP_WIN_W - QP_DATE_H - QP_HANDLE_H);
- }
- }
- part {
- name: "rect.section.title.1";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 55;
- max: 9999 55;
- rel1 {
- relative: 0.0 0.0;
- to: "background";
- }
- rel2 {
- relative: 1.0 0.0;
- to: "background";
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.active.buttons";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 180;
- rel1 {
- relative: 0.0 1.0;
- to_x: "background";
- to_y: "rect.section.title.1";
- }
- rel2 {
- relative: 1.0 1.0;
- to_x: "background";
- to_y: "rect.section.title.1";
- }
- align: 0.0 0.0;
- color: QP_COLOR_BLACK;
- visible: 1;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 89;
- }
- }
- part {
- name: "rect.section.title.2";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 55;
- max: 9999 55;
- rel1 {
- relative: 0.0 1.0;
- to_x: "background";
- to_y: "rect.active.buttons";
- }
- rel2 {
- relative: 1.0 1.0;
- to_x: "background";
- to_y: "rect.active.buttons";
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.reserved.buttons";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 271;
- rel1 {
- relative: 0.0 1.0;
- to_x: "background";
- to_y: "rect.section.title.2";
- }
- rel2 {
- relative: 1.0 1.0;
- to_x: "background";
- to_y: "rect.section.title.2";
- }
- align: 0.0 0.0;
- color: QP_COLOR_BLACK;
- visible: 1;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 180;
- }
- }
- part {
- name: "margin.help.left";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 16 0;
- max: 16 9999;
- rel1 {
- relative: 0.0 1.0;
- to_x: "background";
- to_y: "rect.reserved.buttons";
- }
- rel2 {
- relative: 0.0 1.0;
- to: "background";
- }
- color: QP_COLOR_BLACK;
- visible: 1;
- }
- }
- part {
- name: "margin.help.right";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 8 0;
- max: 8 9999;
- rel1 {
- relative: 1.0 1.0;
- to_x: "background";
- to_y: "rect.reserved.buttons";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "background";
- }
- color: QP_COLOR_BLACK;
- visible: 1;
- }
- }
- part {
- name: "margin.help.top";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 8;
- max: 9999 8;
- rel1 {
- relative: 0.0 1.0;
- to_x: "background";
- to_y: "rect.reserved.buttons";
- }
- rel2 {
- relative: 1.0 1.0;
- to_x: "background";
- to_y: "rect.reserved.buttons";
- }
- align: 0.0 0.0;
- color: QP_COLOR_BLACK;
- visible: 1;
- }
- }
- part {
- name: "rect.section.help";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 281;
- max: 9999 281;
- rel1 {
- relative: 1.0 1.0;
- to_x: "margin.help.left";
- to_y: "margin.help.top";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "margin.help.right";
- to_y: "margin.help.top";
- }
- align: 0.0 0.0;
- color: QP_COLOR_BLACK;
- visible: 1;
- }
- description {
- state: "portrait" 0.0;
- inherit: "default" 0.0;
- }
- description {
- state: "landscape" 0.0;
- inherit: "default" 0.0;
- min: 0 160;
- }
- }
- part{
- name: "object.section.1";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.section.title.1";}
- rel2 {to: "rect.section.title.1";}
- align: 0.0 0.0;
- visible:1;
- }
- }
- part{
- name: "object.active.buttons";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.active.buttons";}
- rel2 {to: "rect.active.buttons";}
- visible:1;
- }
- }
- part{
- name: "object.section.2";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.section.title.2";}
- rel2 {to: "rect.section.title.2";}
- visible:1;
- }
- }
- part{
- name: "object.reserved.buttons";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 0;
- rel1 {to: "rect.reserved.buttons";}
- rel2 {to: "rect.reserved.buttons";}
- visible:1;
- }
- }
- part { name: "object.text.help";
- type: TEXTBLOCK;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.section.help";
- }
- rel2 {
- to: "rect.section.help";
- }
- text {
- style: "help";
- size: 22;
- size_range: 21 22;
- align: 0.0 0.0;
- }
- }
- }
- QUICKPANEL_FOCUS_OBJECT("focus.help", "rect.section.help", "rect.section.help")
- }
-
- programs {
- program{
- name: "portrait";
- signal: "portrait";
- source: "prog";
- action: STATE_SET "portrait" 0.0;
- target: "background";
- target: "rect.active.buttons";
- target: "rect.reserved.buttons";
- target: "rect.section.help";
- }
- program{
- name: "landscape";
- signal: "landscape";
- source: "prog";
- action: STATE_SET "landscape" 0.0;
- target: "background";
- target: "rect.active.buttons";
- target: "rect.reserved.buttons";
- target: "rect.section.help";
- }
- }
- }
-
- group {
- name: "quickpanel/page_edit_section";
- parts {
- part {
- name: "background";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 55;
- max: 9999 55;
- fixed: 0 1;
- rel1 {
- relative: 0.0 0.0;
- }
- rel2 {
- relative: 1.0 1.0;
- }
- align: 0.0 0.0;
- visible: 1;
- color: QP_COLOR_BLACK;
- }
- }
- part {
- name: "margin.left.label";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 13 0;
- max: 13 0;
- fixed: 1 0;
- rel1 {
- relative: 0.0 0.0;
- to: "background";
- }
- rel2 {
- relative: 0.0 1.0;
- to: "background";
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.top.label";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 27;
- max: 0 27;
- fixed: 0 1;
- rel1 {
- relative: 0.0 0.0;
- to: "background";
- }
- rel2 {
- relative: 1.0 0.0;
- to: "background";
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.right.label";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 129 0;
- max: 129 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- to: "background";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "background";
- }
- align: 1.0 0.0;
- }
- }
- part {
- name: "margin.bottom.label";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 4;
- max: 0 4;
- fixed: 0 1;
- rel1 {
- relative: 0.0 1.0;
- to: "background";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "background";
- }
- align: 0.0 1.0;
- }
- }
- part {
- name: "margin.top.button";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 0 16;
- max: 0 16;
- fixed: 0 1;
- rel1 {
- relative: 0.0 0.0;
- to: "background";
- }
- rel2 {
- relative: 1.0 0.0;
- to: "background";
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "margin.right.button";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 8 0;
- max: 8 0;
- fixed: 1 0;
- rel1 {
- relative: 1.0 0.0;
- to: "background";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "background";
- }
- align: 1.0 0.0;
- }
- }
- part {
- name: "rect.title";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 0 1;
- min: 0 25;
- rel1 {
- relative: 1.0 0.0;
- to_x: "margin.left.label";
- to_y: "margin.bottom.label";
- }
- rel2 {
- relative: 0.0 0.0;
- to_x: "margin.right.label";
- to_y: "margin.bottom.label";
- }
- align: 1.0 1.0;
- }
- }
- part {
- name: "rect.title.accessibility";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {
- relative: 0.0 0.0;
- to: "rect.title";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "rect.title";
- offset: 0 -20;
- }
- align: 0.0 0.0;
- }
- }
- part {
- name: "rect.button";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 106 35;
- min: 106 35;
- fixed: 1 1;
- rel1 {
- relative: 0.0 1.0;
- to_x: "margin.right.button";
- to_y: "margin.top.button";
- }
- rel2 {
- relative: 0.0 1.0;
- to_x: "margin.right.button";
- to_y: "margin.top.button";
- }
- align: 1.0 0.0;
- }
- }
- part { name: "object.text.title";
- type: TEXT;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- to: "rect.title";
- }
- rel2 {
- to: "rect.title";
- }
- color: 59 115 182 255;
- text {
- font: "Tizen:style=Bold";
- text_class: "tizen";
- size: 21;
- align: 0.0 1.0;
- ellipsis: 0.0;
- }
- }
- }
- part{
- name: "object.button";
- type:SWALLOW;
- scale: 1;
- description {
- state: "default" 0.0;
- fixed: 1 1;
- rel1 {to: "rect.button";}
- rel2 {to: "rect.button";}
- visible:1;
- }
- }
- QUICKPANEL_FOCUS_OBJECT("focus.title", "rect.title.accessibility", "rect.title.accessibility")
- }
- }
\ No newline at end of file
+++ /dev/null
-/*
- * 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.
- * 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 "color_classes.edc"
-
-collections
-{
- base_scale: 1.8;
-
- group {
- name: "slide_short";
-
- styles {
- style
- {
- name: "dual_sim_text_style";
- base: "font=Tizen:style=Regular font_size=17 text_class=ATO007D color=#FFFFFF color_class=ATO007D align=center wrap=none "; // unconnected
- tag: "icon_0" "+ text_class=ATO007E1 color=#FFFFFF color_class=ATO007E1 "; // SIM1
- tag: "icon_1" "+ text_class=ATO007E2 color=#FFFFFF color_class=ATO007E2 "; // SIM2
- tag: "icon_2" "+ text_class=ATO007E9 color=#FFFFFF color_class=ATO007E9 "; // Call
- tag: "icon_3" "+ text_class=ATO007E4 color=#FFFFFF color_class=ATO007E4 "; // SMS
- tag: "icon_4" "+ text_class=ATO007E5 color=#FFFFFF color_class=ATO007E5 "; // MMS
- tag: "icon_5" "+ text_class=ATO007E6 color=#FFFFFF color_class=ATO007E6 "; // Internet
- tag: "icon_6" "+ text_class=ATO007E7 color=#FFFFFF color_class=ATO007E7 "; // Home
- tag: "icon_7" "+ text_class=ATO007E3 color=#FFFFFF color_class=ATO007E3 "; // Office
- tag: "icon_8" "+ text_class=ATO007E8 color=#FFFFFF color_class=ATO007E8 "; // Heart
- }
- }
-
- parts {
- part {
- name: "base";
- type: SPACER;
- scale: 1;
- description {
- state: "default" 0.0;
- min: 84 (4 + 19 + 4);
- max: 84 (4 + 19 + 4);
- fixed: 1 1;
- }
- }
- part {
- name: "clip";
- type: RECT;
- scale: 1;
- description {
- state: "default" 0.0;
- rel1 {
- relative: 0.0 0.0;
- to: "base";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "base";
- }
- }
- }
- part {
- name: "text";
- type: TEXTBLOCK;
- mouse_events: 0;
- repeat_events: 1;
- scale: 1;
- clip_to: "clip";
- description {
- state: "default" 0.0;
- min: 84 (4 + 19 + 4);
- fixed: 1 1;
- align: 0.5 0.5;
- rel1 {
- relative: 0.0 0.0;
- to: "clip";
- }
- rel2 {
- relative: 1.0 1.0;
- to: "clip";
- }
- text {
- style: "dual_sim_text_style";
- min: 1 1;
- align: 0.5 0.5;
- }
- }
- description {
- state: "slide_end" 0.0;
- inherit: "default" 0.0;
- align: 1.0 0.5;
- }
- description {
- state: "slide_begin" 0.0;
- inherit: "default" 0.0;
- align: 0.0 0.5;
- }
- }
- }
-
- programs {
- program
- {
- name: "play_slide";
- source: "elm";
- signal: "elm,state,slide,start";
- action: STATE_SET "slide_begin" 0.0;
- target: "text";
- after: "start_slide";
- }
-
- program
- {
- name: "stop_slide";
- source: "elm";
- signal: "elm,state,slide,stop";
- action: STATE_SET "default" 0.0;
- target: "text";
- }
-
- program
- {
- name: "start_slide";
-
- action: STATE_SET "slide_end" 0.0;
- transition: LINEAR 5.0;
- target: "text";
- filter: "text" "slide_begin";
- in: 0.5 0.0;
- after: "end_slide";
- }
-
- program
- {
- name: "end_slide";
- action: STATE_SET "slide_begin" 0.0;
- filter: "text" "slide_end";
- target: "text";
- in: 0.5 0.0;
-
- after: "start_slide";
- }
- }
- }
-}