ecore ecore-input ecore-evas capi-appfw-application
feedback appsvc deviced capi-system-device capi-system-info
capi-media-sound-manager efl-extension capi-system-system-settings
- capi-ui-efl-util aul pkgmgr pkgmgr-info
+ capi-ui-efl-util aul pkgmgr pkgmgr-info tzsh-quickpanel-service
)
#??
+/*
+ * Samsung API
+ * Copyright (c) 2013 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Flora License, Version 1.1 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://floralicense.org/license/
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
#include <Elementary.h>
#include <Eina.h>
#include <efl_extension.h>
#include <device/power.h>
#include <feedback.h>
#include <efl_util.h>
+#include "tzsh_quickpanel_service.h"
#if !defined(PACKAGE)
# define PACKAGE "windicator"
#define DYNAMIC_ICON_WIDTH 24
#define DYNAMIC_ICON_HEIGHT 26
-//#define ICON_PATH "/usr/apps/org.tizen.windicator/res/image/windicator/"
#define ICON_PATH "image/windicator"
#define PATH_MAX 4096
int is_tutorial;
int is_poweroff_state;
int moment_bar_rotary_index;
- int is_getting_back;
-
/* RSSI, Connection */
int rssi_hide;
int connection_hide;
Evas *moment_bar_evas;
Ecore_Evas *moment_bar_ee;
Evas_Object *moment_bar_win;
- Evas_Object *moment_bar_bg;
Evas_Object *moment_bar_conformant;
Eext_Circle_Surface *moment_bar_circle_surface;
Evas_Object *moment_bar_first_page_layout;
Ecore_Event_Handler *hdl_client_message;
int momentbar_showing;
void* msg_handle;
+ tzsh_quickpanel_service_h qp_service;
};
struct appdata *windicator_appdata_get(void);
void windicator_lo_update(void* data);
BuildRequires: pkgconfig(aul)
BuildRequires: gettext-tools
BuildRequires: edje-bin, embryo-bin
-
+BuildRequires: pkgconfig(tzsh-quickpanel-service)
%description
Notification panel for wearable devices
part {
name : "rect.bg";
type : RECT;
+ clip_to: "mask";
scale : 1;
description {
state : "default" 0.0;
color : 0 0 0 255;
}
}
- /*
+
part {
- name : "img.bg";
- type : IMAGE;
- scale : 1;
- description {
- state : "default" 0.0;
- min : WIN_WIDTH WIN_HEIGHT;
- max : WIN_WIDTH WIN_HEIGHT;
- fixed : 1 1;
- image.normal: "b_moment_bar_detail_bg.png";
- color_class : "AO013";
- }
+ name: "mask";
+ type: IMAGE;
+ description
+ {
+ state: "default" 0.0;
+ rel1 { relative : 0.0 0.0; to : "rect.bg"; }
+ rel2 { relative : 1.0 1.0; to : "rect.bg"; }
+ image.normal: "b_moment_bar_detail_bg.png";
+ }
}
- part {
- name : "img.bg.cover";
- type : IMAGE;
- scale : 1;
- description {
- state : "default" 0.0;
- min : WIN_WIDTH WIN_HEIGHT;
- max : WIN_WIDTH WIN_HEIGHT;
- fixed : 1 1;
- image.normal: "b_moment_bar_detail_bg_cover.png";
- color_class : "AO0131";
- }
- }*/
#if 0
/* Icons */
// Battery
#include <Elementary.h>
#include <appcore-efl.h>
#include <app.h>
+#include <tzsh_quickpanel_service.h>
#include "windicator.h"
#include "log.h"
ad->down_key_handler = NULL;
ad->is_tutorial = 0;
ad->moment_bar_rotary_index = 0;
- ad->is_getting_back = 0;
-
/* RSSI, Connection */
ad->rssi_hide = 1;
ad->connection_hide = 1;
/* Moment Bar */
ad->moment_bar_win = NULL;
- ad->moment_bar_bg = NULL;
ad->moment_bar_conformant = NULL;
ad->moment_bar_circle_surface = NULL;
ad->moment_bar_first_page_layout = NULL;
struct appdata *ad = (struct appdata *)user_data;
elm_config_preferred_engine_set("opengl_x11");
_init_variables(ad);
+ tzsh_quickpanel_service_h qp_service;
+ tzsh_region_h region;
+ tzsh_window tz_win;
+ tzsh_h tzsh = NULL;
+ tzsh = tzsh_create(TZSH_TOOLKIT_TYPE_EFL);
+ if (!tzsh) {
+ _E("Failed to create tzsh\n");
+ return;
+ }
/* initialize Moment Bar */
if (WINDICATOR_ERROR_OK != windicator_moment_bar_init(ad)) {
if (WINDICATOR_ERROR_OK != windicator_moment_view_init(ad)) {
_E("Failed to intialize moment view");
}
- //evas_object_show(ad->moment_view_win);
- //evas_object_show(ad->moment_bar_win);
+ tz_win = elm_win_window_id_get(ad->moment_bar_win);
+ if (!tz_win) {
+ _E("Failed to get window ID\n");
+ return;
+ }
+ qp_service = tzsh_quickpanel_service_create(tzsh, tz_win);
+ ad->qp_service = qp_service;
+ tzsh_quickpanel_service_effect_type_set(qp_service, TZSH_QUICKPANEL_SERVICE_EFFECT_TYPE_MOVE);
+ region = tzsh_region_create(tzsh);
+ tzsh_region_add(region, 0, 300, 360, 60);
+ tzsh_quickpanel_service_handler_region_set(qp_service, 0, region);
+ tzsh_region_destroy(region);
}
static bool app_create(void *data)
*/
#include <efl_extension.h>
+#include <tzsh_quickpanel_service.h>
#include "windicator.h"
#include "log.h"
_D("Key(%s) pressed", ev->keyname);
if (!strcmp(ev->keyname, KEY_BACK)) {
- if (ad->is_getting_back == 0) {
_D("Moment bar status -> idle. (Hide Moment bar)");
- ad->is_getting_back = 1; // ad->is_getting_back will be set 0 in moment_bar_show
- //windicator_hide_moment_bar_directly(ad);
- //elm_exit() is bad to use it here. Replace it asap once alternative way is found.
- elm_exit();
- } else {
- _D("Back key animation is operating, so skip back key event");
- }
+ tzsh_quickpanel_service_hide(ad->qp_service);
}
return EINA_FALSE;
}
if(!strcmp(ev->keyname, KEY_DOWN)) {
_D("Moment bar status -> Exit. (Exit Moment bar)");
- elm_exit();
+ tzsh_quickpanel_service_hide(ad->qp_service);
}
return EINA_FALSE;
}
retv_if(ad == NULL, WINDICATOR_ERROR_INVALID_PARAMETER);
_I("Show Moment Bar : dynamic_layout(%p)", ad->moment_bar_dynamic_layout);
- ad->is_getting_back = 0;
-
/* update LO layout */
windicator_lo_update(ad);
ad->moment_bar_evas = evas_object_evas_get(ad->moment_bar_win);
ad->moment_bar_ee = ecore_evas_ecore_evas_get(ad->moment_bar_evas);
- /* create moment bar bg */
- ad->moment_bar_bg = windicator_util_bg_create(ad->moment_bar_win);
- retv_if(ad->moment_bar_bg == NULL, WINDICATOR_ERROR_FAIL);
-
/* create moment bar conformant */
ad->moment_bar_conformant = windicator_util_conformant_create(ad->moment_bar_win);
retv_if(ad->moment_bar_conformant == NULL, WINDICATOR_ERROR_FAIL);
elm_win_borderless_set(win, EINA_TRUE);
elm_win_autodel_set(win, EINA_TRUE);
elm_win_role_set(win, "no-dim");
+ elm_win_alpha_set(win, EINA_TRUE);
if (elm_win_wm_rotation_supported_get(win)) {
int rots[4] = { 0, 90, 180, 270 };
retv_if(!win, NULL);
elm_win_title_set(win, name);
elm_win_autodel_set(win, EINA_TRUE);
+ elm_win_alpha_set(win, EINA_TRUE);
if (elm_win_wm_rotation_supported_get(win)) {
int rots[4] = { 0, 90, 180, 270 };
elm_win_wm_rotation_available_rotations_set(win, (const int*)(&rots), 4);