AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR}/test TEST_SRCS)
-IF(${WINSYS} STREQUAL "x11")
-SET(EXTRA_SRCS
- daemon/service/keyboard_x.c
-)
-ELSE (${WINSYS} STREQUAL "x11")
-SET(EXTRA_SRCS
-)
-ENDIF (${WINSYS} STREQUAL "x11")
-
SET(SRCS
daemon/modules.c
daemon/dbus_utility.c
tzsh-quickpanel-service
)
-IF(${WINSYS} STREQUAL "x11")
-pkg_check_modules(x11_pkgs REQUIRED
- ecore-x
- utilX
- inputproto
- xi
- libprivilege-control
-)
-ENDIF(${WINSYS} STREQUAL "x11")
-
-
FOREACH(flag ${pkgs_CFLAGS} ${x11_pkgs_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
MESSAGE("add -DTARGET")
ENDIF("${ARCH}" STREQUAL "arm")
-IF(${WINSYS} STREQUAL "x11")
-ADD_DEFINITIONS("-DWINSYS_X11=1")
-ENDIF(${WINSYS} STREQUAL "x11")
-
ADD_DEFINITIONS("-DQP_SETTING_ENABLE")
ADD_DEFINITIONS("-DQP_BRIGHTNESS_ENABLE")
ADD_DEFINITIONS("-DQP_MINICTRL_ENABLE")
INSTALL(DIRECTORY DESTINATION ${DATADIR})
INSTALL(DIRECTORY DESTINATION ${DATADIR_RW})
INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/quickpanel_icon_default.png DESTINATION ${RESDIR})
-IF(${WINSYS} STREQUAL "x11")
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${PKGNAME}.efl DESTINATION /etc/smack/accesses.d)
-ENDIF(${WINSYS} STREQUAL "x11")
# icon for setting
INSTALL(FILES ${CMAKE_SOURCE_DIR}/icons/settings_noti_panel.png DESTINATION ${SHARED_DIR}/icons)
#include <system_info.h>
#include <common_uic.h>
-#if defined(WINSYS_X11)
-#include <Ecore_X.h>
-#include <X11/Xlib.h>
-#include <utilX.h>
-#endif
-
#include <tzsh.h>
#include <tzsh_quickpanel_service.h>
#include <E_DBus.h>
retif(ad == NULL, , "Invalid parameter!");
retif(ad->win == NULL, , "Invalid parameter!");
-#if defined(WINSYS_X11)
- Ecore_X_Window xwin;
- Ecore_X_Window zone;
- xwin = elm_win_xwindow_get(ad->win);
- if (xwin != 0) {
- if ((zone = ecore_x_e_illume_zone_get(xwin)) != 0) {
- if (ecore_x_e_illume_quickpanel_state_get(zone) == ECORE_X_ILLUME_QUICKPANEL_STATE_OFF) {
- ecore_x_e_illume_quickpanel_state_send(zone, ECORE_X_ILLUME_QUICKPANEL_STATE_ON);
- quickpanel_uic_opened_reason_set(reason);
- }
- } else {
- ERR("failed to get zone");
- }
- } else {
- ERR("failed to get xwin");
- }
-#else
ERR("Not yet implemented");
-#endif
+
}
HAPI void quickpanel_uic_opened_reason_set(int reason)
return;
}
-#if defined(WINSYS_X11)
- Ecore_X_Window xwin;
- Ecore_X_Window zone;
- xwin = elm_win_xwindow_get(ad->win);
- if (xwin != 0) {
- if ((zone = ecore_x_e_illume_zone_get(xwin)) != 0) {
- if (ecore_x_e_illume_quickpanel_state_get(zone) == ECORE_X_ILLUME_QUICKPANEL_STATE_ON) {
- ecore_x_e_illume_quickpanel_state_send(zone, ECORE_X_ILLUME_QUICKPANEL_STATE_OFF);
- }
- } else {
- ERR("failed to get zone");
- }
- } else {
- ERR("failed to get xwin");
- }
-#else
int ret = 0;
ret = tzsh_quickpanel_service_hide(ad->quickpanel_service);
if(ret != 0) {
ERR("failed tzsh_quickpanel_service_hide");
}
-#endif
+
}
static Eina_Bool _quickpanel_close_timer_cb(void *data)
HAPI void quickpanel_uic_toggle_openning_quickpanel(void)
{
-#if defined(WINSYS_X11)
-
- Ecore_X_Window xwin;
- Ecore_X_Window zone;
- struct appdata *ad = quickpanel_get_app_data();
-
- DBG("");
-
- if (!ad || !ad->win) {
- ERR("Invalid parameters");
- return;
- }
-
- xwin = elm_win_xwindow_get(ad->win);
- if (xwin != 0) {
-
- if ((zone = ecore_x_e_illume_zone_get(xwin)) != 0) {
- if (ecore_x_e_illume_quickpanel_state_get(zone) == ECORE_X_ILLUME_QUICKPANEL_STATE_ON) {
- ecore_x_e_illume_quickpanel_state_send(zone, ECORE_X_ILLUME_QUICKPANEL_STATE_OFF);
- } else {
- ecore_x_e_illume_quickpanel_state_send(zone, ECORE_X_ILLUME_QUICKPANEL_STATE_ON);
- }
- } else {
- ERR("failed to get zone");
- }
- } else {
- ERR("failed to get xwin");
- }
-
-#endif
+ /* TO DO */
}
+++ /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 <app.h>
-#include <sys/utsname.h>
-#include <X11/Xlib.h>
-#include <utilX.h>
-#include <Ecore_Input.h>
-#include <vconf.h>
-#include <notification.h>
-#include <app_control_internal.h>
-#include <bundle_internal.h>
-#include "common.h"
-#include "quickpanel-ui.h"
-
-
-/* binary information */
-#define QP_EMUL_STR "Emulator"
-#define DEL_TIMER_VALUE 0.480
-#define SYSTEM_INFO_KEY_MODEL "http://tizen.org/system/model_name"
-static Ecore_Timer *_close_timer = NULL;
-
-
-static void _quickpanel_move_data_to_service(const char *key, const char *val, void *data)
-{
- retif(data == NULL || key == NULL || val == NULL, , "Invialid parameter!");
-
- app_control_h service = data;
- app_control_add_extra_data(service, key, val);
-}
-
-HAPI Evas_Object *quickpanel_uic_load_edj(Evas_Object * parent, const char *file,
- const char *group, int is_just_load)
-{
- Eina_Bool r;
- Evas_Object *eo = NULL;
-
- retif(parent == NULL, NULL, "Invalid parameter!");
-
- eo = elm_layout_add(parent);
- retif(eo == NULL, NULL, "Failed to add layout object!");
-
- r = elm_layout_file_set(eo, file, group);
- retif(r != EINA_TRUE, NULL,
- "Failed to set edje object file[%s-%s]!", file, group);
-
- evas_object_size_hint_weight_set(eo,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(eo,
- EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- if (is_just_load == 1) {
- elm_win_resize_object_add(parent, eo);
- }
- evas_object_show(eo);
-
- return eo;
-}
-
-HAPI int quickpanel_uic_is_opened(void)
-{
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, 0, "invalid data.");
-
- return ad->is_opened;
-}
-
-HAPI int quickpanel_uic_is_suspended(void)
-{
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, 0, "invalid data.");
-
- return ad->is_suspended;
-}
-
-HAPI int quickpanel_uic_is_emul(void)
-{
- int is_emul = 0;
- char *info = NULL;
- if (system_info_get_platform_string(SYSTEM_INFO_KEY_MODEL, &info) == 0) {
- if (info == NULL) {
- return 0;
- }
- if (!strncmp(QP_EMUL_STR, info, strlen(info))) {
- is_emul = 1;
- }
- }
-
- if (info != NULL) free(info);
-
- return is_emul;
-}
-
-HAPI void quickpanel_uic_initial_resize(Evas_Object *obj, int height)
-{
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid data.");
-
- height = (height % 2 != 0) ? height + 1 : height;
-
- if (ad->angle == 90 || ad->angle == 270) {
- evas_object_resize(obj, ad->win_height, height * ad->scale);
- } else {
- evas_object_resize(obj, ad->win_width, height * ad->scale);
- }
-}
-
-HAPI int quickpanel_uic_launch_app(char *app_id, void *data)
-{
- int ret = APP_CONTROL_ERROR_NONE;
- app_control_h service = NULL;
- char *app_id_from_service = NULL;
-
- retif(app_id == NULL && data == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "Invialid parameter!");
-
- ret = app_control_create(&service);
- if (ret != APP_CONTROL_ERROR_NONE) {
- ERR("app_control_create() return error : %d", ret);
- return ret;
- }
- retif(service == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "fail to create service handle!");
-
- if (app_id != NULL) {
- app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
- app_control_set_app_id(service, app_id);
-
- if (data != NULL) {
- bundle_iterate((bundle *)data, _quickpanel_move_data_to_service, service);
- }
- } else {
- if (data != NULL) {
- ret = app_control_import_from_bundle(service, data);
- if (ret != APP_CONTROL_ERROR_NONE) {
- ERR("Failed to import[%d]", ret);
- }
- }
- }
-
- ret = app_control_send_launch_request(service, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE) {
- ERR("app_control_send_launch_request() is failed : %d", ret);
- app_control_get_app_id(service, &app_id_from_service);
- if (app_id_from_service != NULL) {
- quickpanel_uic_launch_app_inform_result(app_id_from_service, ret);
- free(app_id_from_service);
- } else {
- quickpanel_uic_launch_app_inform_result(app_id, ret);
- }
- app_control_destroy(service);
- return ret;
- }
- app_control_destroy(service);
- return ret;
-}
-
-HAPI int quickpanel_uic_launch_ug_by_appcontrol(const char *package, void *data)
-{
- int ret = APP_CONTROL_ERROR_NONE;
- app_control_h service = NULL;
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "ad null");
- retif(package == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "package null");
-
- ret = app_control_create(&service);
- if (ret != APP_CONTROL_ERROR_NONE) {
- ERR("app_control_create() return error : %d", ret);
- return ret;
- }
- retif(service == NULL, APP_CONTROL_ERROR_INVALID_PARAMETER, "fail to create service handle!");
-
- app_control_set_operation(service, APP_CONTROL_OPERATION_DEFAULT);
- app_control_set_app_id(service, package);
-
- if (data != NULL) {
- bundle_iterate((bundle *)data, _quickpanel_move_data_to_service, service);
- }
-
- ret = app_control_send_launch_request(service, NULL, NULL);
- if (ret != APP_CONTROL_ERROR_NONE) {
- ERR("app_control_send_launch_request() is failed : %d", ret);
- app_control_destroy(service);
- return ret;
- }
- app_control_destroy(service);
- return ret;
-}
-
-HAPI void quickpanel_uic_launch_app_inform_result(const char *pkgname, int retcode)
-{
- retif(retcode == APP_CONTROL_ERROR_NONE, , "retcode = APP_CONTROL_ERROR_NONE!");
- retif(pkgname == NULL && retcode != APP_CONTROL_ERROR_APP_NOT_FOUND, , "Invialid parameter!");
-
- const char *msg = NULL;
- char *app_label = NULL;
-
- if (retcode == APP_CONTROL_ERROR_APP_NOT_FOUND) {
- notification_status_message_post(_NOT_LOCALIZED("Unable to find application to perform this action."));
- } else {
- Eina_Strbuf *strbuf = eina_strbuf_new();
- char *format = _("IDS_QP_TPOP_UNABLE_TO_OPEN_PS");
-
- if (strbuf != NULL) {
- app_label = quickpanel_common_ui_get_pkginfo_label(pkgname);
- if (app_label != NULL) {
- eina_strbuf_append_printf(strbuf, format, app_label);
- free(app_label);
- } else {
- eina_strbuf_append_printf(strbuf, format, pkgname);
- }
- eina_strbuf_append_printf(strbuf, "(%x)", retcode);
- msg = eina_strbuf_string_get(strbuf);
-
- if (msg != NULL) {
- notification_status_message_post(msg);
- }
- eina_strbuf_free(strbuf);
- }
- }
-}
-
-HAPI void quickpanel_uic_open_quickpanel(int reason)
-{
- Ecore_X_Window xwin;
- Ecore_X_Window zone;
- struct appdata *ad = quickpanel_get_app_data();
-
- DBG("reason:%d", reason);
-
- retif(ad == NULL, , "Invalid parameter!");
- retif(ad->win == NULL, , "Invalid parameter!");
-
- xwin = elm_win_xwindow_get(ad->win);
- if (xwin != 0) {
- if ((zone = ecore_x_e_illume_zone_get(xwin)) != 0) {
- if (ecore_x_e_illume_quickpanel_state_get(zone) == ECORE_X_ILLUME_QUICKPANEL_STATE_OFF) {
- ecore_x_e_illume_quickpanel_state_send(zone, ECORE_X_ILLUME_QUICKPANEL_STATE_ON);
- quickpanel_uic_opened_reason_set(reason);
- }
- } else {
- ERR("failed to get zone");
- }
- } else {
- ERR("failed to get xwin");
- }
-}
-
-HAPI void quickpanel_uic_opened_reason_set(int reason)
-{
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "Invalid parameter!");
-
- ad->opening_reason = reason;
-}
-
-HAPI int quickpanel_uic_opened_reason_get(void)
-{
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, OPENED_NO_REASON, "Invalid parameter!");
-
- return ad->opening_reason;
-}
-
-static void _quickpanel_close(void)
-{
- Ecore_X_Window xwin;
- Ecore_X_Window zone;
- struct appdata *ad = quickpanel_get_app_data();
-
- DBG("");
-
- retif(ad == NULL, , "Invalid parameter!");
- retif(ad->win == NULL, , "Invalid parameter!");
-
- xwin = elm_win_xwindow_get(ad->win);
- if (xwin != 0) {
- if ((zone = ecore_x_e_illume_zone_get(xwin)) != 0) {
- if (ecore_x_e_illume_quickpanel_state_get(zone) == ECORE_X_ILLUME_QUICKPANEL_STATE_ON) {
- ecore_x_e_illume_quickpanel_state_send(zone, ECORE_X_ILLUME_QUICKPANEL_STATE_OFF);
- }
- } else {
- ERR("failed to get zone");
- }
- } else {
- ERR("failed to get xwin");
- }
-}
-
-static Eina_Bool _quickpanel_close_timer_cb(void *data)
-{
- if( _close_timer != NULL ) {
- _close_timer = NULL;
- }
- _quickpanel_close();
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-HAPI void quickpanel_uic_close_quickpanel(bool is_check_lock, int is_delay_needed) {
- int ret = 0;
- int is_lock_launched = VCONFKEY_IDLE_UNLOCK;
-
- if (is_check_lock == true) {
- if (vconf_get_int(VCONFKEY_IDLE_LOCK_STATE, &is_lock_launched) == 0) {
- if (is_lock_launched == VCONFKEY_IDLE_LOCK) {
- ret = vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);
- if (ret == 0) {
- ERR("unlock the lockscreen from quickpanel");
- } else {
- ERR("failed to unlock the lockscreen from quickpanel");
- }
- }
- }
- }
-
- if (is_delay_needed) {
- if( _close_timer == NULL ) {
- _close_timer = ecore_timer_add(DEL_TIMER_VALUE, _quickpanel_close_timer_cb, NULL);
- }
- } else {
- _quickpanel_close();
- }
-}
-
-HAPI void quickpanel_uic_toggle_openning_quickpanel(void)
-{
- Ecore_X_Window xwin;
- Ecore_X_Window zone;
- struct appdata *ad = quickpanel_get_app_data();
-
- DBG("");
-
- retif(ad == NULL, , "Invalid parameter!");
- retif(ad->win == NULL, , "Invalid parameter!");
-
- xwin = elm_win_xwindow_get(ad->win);
- if (xwin != 0) {
- if ((zone = ecore_x_e_illume_zone_get(xwin)) != 0) {
- if (ecore_x_e_illume_quickpanel_state_get(zone) == ECORE_X_ILLUME_QUICKPANEL_STATE_ON) {
- ecore_x_e_illume_quickpanel_state_send(zone, ECORE_X_ILLUME_QUICKPANEL_STATE_OFF);
- } else {
- ecore_x_e_illume_quickpanel_state_send(zone, ECORE_X_ILLUME_QUICKPANEL_STATE_ON);
- }
- } else {
- ERR("failed to get zone");
- }
- } else {
- ERR("failed to get xwin");
- }
-}
*/
#include <Elementary.h>
-#if defined(WINSYS_X11)
-#include <utilX.h>
-#include <Ecore_X.h>
-#endif
#include <efl_util.h>
#define NOTI_HEIGHT ELM_SCALE_SIZE(260)
+++ /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 <utilX.h>
-#include <efl_util.h>
-
-#define NOTI_HEIGHT 200
-#define NOTI_BTN_HEIGHT 80
-
-#ifndef __UNUSED__
-#define __UNUSED__ __attribute__((unused))
-#endif
-/* Using this macro to emphasize that some portion like stacking and
-rotation handling are implemented for X based platform
-*/
-
-#include <Ecore_X.h>
-#include "common.h"
-#include "noti_win.h"
-#include "dbus_utility.h"
-
-struct Internal_Data {
- Evas_Object *content;
- Ecore_Event_Handler *rotation_event_handler;
- Evas_Coord w;
- Evas_Coord h;
- int angle;
- enum Noti_Orient orient;
-};
-
-static const char *data_key = "_data";
-
-static void _show(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
- void *event_info __UNUSED__)
-{
- struct Internal_Data *wd = evas_object_data_get(obj, data_key);
-
- if (!wd) {
- return;
- }
- if (wd->content) {
- evas_object_show(wd->content);
- }
-}
-
-static void _content_changed_size_hints(void *data, Evas *e __UNUSED__,
- Evas_Object *obj, void *event_info __UNUSED__)
-{
- Evas_Coord h = 0;
- struct Internal_Data *wd = evas_object_data_get(data, data_key);
-
- if (!wd) {
- return;
- }
-
- evas_object_size_hint_min_get(obj, NULL, &h);
- if ((h > 0)) {
- wd->h = h;
- evas_object_size_hint_min_set(obj, wd->w, wd->h);
- evas_object_size_hint_min_set(data, wd->w, wd->h);
- evas_object_resize(data, wd->w, wd->h);
- }
-}
-
-static void _sub_del(void *data __UNUSED__, Evas_Object *obj, void *event_info)
-{
- struct Internal_Data *wd = evas_object_data_get(obj, data_key);
- Evas_Object *sub = event_info;
-
- if (!wd) {
- return;
- }
- if (sub == wd->content) {
- evas_object_event_callback_del(wd->content,
- EVAS_CALLBACK_CHANGED_SIZE_HINTS,
- _content_changed_size_hints);
- wd->content = NULL;
- }
-}
-
-static void _resized(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
- void *event_info __UNUSED__)
-{
- evas_object_show(obj);
-}
-
-static void _del(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj,
- void *event_info __UNUSED__)
-{
-
- struct Internal_Data *wd = evas_object_data_get(obj, data_key);
-
- if (wd) {
- if (wd->rotation_event_handler) {
- ecore_event_handler_del(wd->rotation_event_handler);
- }
- free(wd);
- }
-
- evas_object_data_set(data, data_key, NULL);
-}
-
-static void _update_geometry_on_rotation(Evas_Object *obj, int angle,
- int *x, int *y, int *w)
-{
- Evas_Coord root_w, root_h;
- struct Internal_Data *wd = evas_object_data_get(obj, data_key);
-
- if (!wd) {
- return;
- }
-
- ecore_x_window_size_get(ecore_x_window_root_first_get(), &root_w, &root_h);
-
- switch (angle) {
- case 90:
- *w = root_h;
- if (wd->orient == NOTI_ORIENT_BOTTOM) {
- *x = root_w - wd->h;
- }
- break;
- case 270:
- *w = root_h;
- if (!(wd->orient == NOTI_ORIENT_BOTTOM)) {
- *x = root_w - wd->h;
- }
- break;
- case 180:
- *w = root_w;
- if (!wd->orient == NOTI_ORIENT_BOTTOM) {
- *y = root_h - wd->h;
- }
- break;
- case 0:
- default:
- *w = root_w;
- if (wd->orient == NOTI_ORIENT_BOTTOM) {
- *y = root_h - wd->h;
- }
- break;
- }
-}
-static void _win_rotated(Evas_Object *obj)
-{
- int x = 0;
- int y = 0;
- int w = 0;
- int angle = 0;
- struct Internal_Data *wd = evas_object_data_get(obj, data_key);
-
- if (!wd) {
- return;
- }
- angle = elm_win_rotation_get(obj);
- if (angle % 90) {
- return;
- }
- angle %= 360;
- if (angle < 0)
- angle += 360;
- wd->angle = angle;
-
- _update_geometry_on_rotation(obj, wd->angle, &x, &y, &w);
-
- evas_object_move(obj, x, y);
- wd->w = w;
- evas_object_resize(obj, wd->w, wd->h);
-}
-
-static void _ui_rotation_wm_cb(void *data, Evas_Object *obj, void *event)
-{
- int angle = 0;
- angle = elm_win_rotation_get((Evas_Object *)obj);
-
- DBG("ACTIVENOTI ROTATE:%d", angle);
-
- _win_rotated(obj);
-}
-
-HAPI Evas_Object *quickpanel_noti_win_add(Evas_Object *parent)
-{
- Evas_Object *win;
- Evas_Object *bg;
- struct Internal_Data *wd;
- Evas_Coord w = 0, h = 0;
-
- win = elm_win_add(parent, "noti_win", ELM_WIN_NOTIFICATION);
- if (!win) {
- return NULL;
- }
-
- elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_SHOW);
- elm_win_alpha_set(win, EINA_FALSE);
- elm_win_indicator_type_set(win,ELM_WIN_INDICATOR_TYPE_1);
- elm_win_title_set(win, "noti_win");
- elm_win_borderless_set(win, EINA_TRUE);
- elm_win_autodel_set(win, EINA_TRUE);
- evas_object_size_hint_weight_set(win, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- evas_object_size_hint_align_set(win, EVAS_HINT_FILL, EVAS_HINT_FILL);
-
- efl_util_set_notification_window_level(win, EFL_UTIL_NOTIFICATION_LEVEL_DEFAULT);
- elm_win_aux_hint_add(win, "wm.policy.win.user.geometry", "1");
- elm_win_prop_focus_skip_set(win, EINA_TRUE);
-
- bg = elm_bg_add(win);
- evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(win, bg);
-
- if (elm_win_wm_rotation_supported_get(win)) {
- int rots[4] = { 0, 90, 180, 270 };
- elm_win_wm_rotation_available_rotations_set(win, rots, 4);
- }
- evas_object_smart_callback_add(win, "wm,rotation,changed", _ui_rotation_wm_cb, NULL);
-
- wd = (struct Internal_Data *) calloc(1, sizeof(struct Internal_Data));
- if (!wd) {
- if (win) {
- evas_object_del(win);
- }
- return NULL;
- }
- evas_object_data_set(win, data_key, wd);
- wd->angle = 0;
- wd->orient = NOTI_ORIENT_TOP;
- evas_object_move(win, 0, 0);
- elm_win_screen_size_get(win, NULL, NULL, &w, &h);
-
- wd->w = w;
- wd->h = NOTI_HEIGHT;
-
- evas_object_resize(win, w, wd->h);
- evas_object_event_callback_add(win, EVAS_CALLBACK_SHOW, _show, NULL);
- evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _del, NULL);
- evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, _resized, NULL);
-
- return win;
-}
-
-HAPI void quickpanel_noti_win_content_set(Evas_Object *obj, Evas_Object *content, int btn_cnt)
-{
- Evas_Coord h;
- struct Internal_Data *wd;
-
- if (!obj) {
- return;
- }
- wd = evas_object_data_get(obj, data_key);
- if (!wd) {
- return;
- }
- if (wd->content && content != NULL) {
- evas_object_del(content);
- content = NULL;
- }
- wd->content = content;
-
- if (btn_cnt > 0) {
- wd->h += NOTI_BTN_HEIGHT;
- }
- if (content) {
- evas_object_size_hint_weight_set(wd->content, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(obj, wd->content);
- evas_object_size_hint_min_set(wd->content, wd->w, wd->h);
- evas_object_resize(obj, wd->w, wd->h);
- evas_object_event_callback_add(wd->content, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _content_changed_size_hints, obj);
- }
-}
-
-HAPI void quickpanel_noti_win_orient_set(Evas_Object *obj, enum Noti_Orient orient)
-{
- Evas_Coord root_w, root_h;
- struct Internal_Data *wd = evas_object_data_get(obj, data_key);
-
- if (!wd) {
- return;
- }
- if (orient >= NOTI_ORIENT_LAST) {
- return;
- }
- ecore_x_window_size_get(ecore_x_window_root_first_get(), &root_w, &root_h);
- switch (orient) {
- case NOTI_ORIENT_BOTTOM:
- evas_object_move(obj, 0, root_h - wd->h);
- wd->orient = NOTI_ORIENT_BOTTOM;
- break;
- case NOTI_ORIENT_TOP:
- default:
- evas_object_move(obj, 0, 0);
- wd->orient = NOTI_ORIENT_TOP;
- break;
- }
-}
#include <Elementary.h>
-#if defined(WINSYS_X11)
-#include <Ecore_X.h>
-#endif
-
#include <tzsh.h>
#include <tzsh_quickpanel_service.h>
#include <E_DBus.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 "pager.h"
-#include "datetime.h"
-
-#define EVAS_DATA_PAGE_HANDLER "page_handler"
-
-static inline void _scroll_hold(Evas_Object *viewer)
-{
- int hold_count = 0;
- retif(viewer == NULL, , "Invalid parameter!");
-
- hold_count = elm_object_scroll_hold_get(viewer);
-
- if (hold_count <= 0) {
- elm_object_scroll_hold_push(viewer);
- }
-}
-
-static inline void _scroll_unhold(Evas_Object *viewer)
-{
- int i = 0, hold_count = 0;
- retif(viewer == NULL, , "Invalid parameter!");
-
- hold_count = elm_object_scroll_hold_get(viewer);
-
- for (i = 0 ; i < hold_count; i++) {
- elm_object_scroll_hold_pop(viewer);
- }
-}
-
-static inline void _scroll_freeze(Evas_Object *viewer)
-{
- int freezed_count = 0;
- retif(viewer == NULL, , "Invalid parameter!");
-
- freezed_count = elm_object_scroll_freeze_get(viewer);
-
- if (freezed_count <= 0) {
- elm_object_scroll_freeze_push(viewer);
- }
-}
-
-static inline void _scroll_unfreeze(Evas_Object *viewer)
-{
- int i = 0, freezed_count = 0;
- retif(viewer == NULL, , "Invalid parameter!");
-
- freezed_count = elm_object_scroll_freeze_get(viewer);
-
- for (i = 0 ; i < freezed_count; i++) {
- elm_object_scroll_freeze_pop(viewer);
- }
-}
-
-HAPI void quickpanel_page_handler_set(Evas_Object *page, QP_Page_Handler *handler)
-{
- retif(page == NULL, , "invalid parameter");
-
- evas_object_data_set(page, EVAS_DATA_PAGE_HANDLER, handler);
-}
-
-HAPI QP_Page_Handler *quickpanel_page_handler_get(Evas_Object *page)
-{
- retif(page == NULL, NULL, "invalid parameter");
-
- return evas_object_data_get(page, EVAS_DATA_PAGE_HANDLER);
-}
-
-HAPI void quickpanel_page_scroll_freeze_set(Eina_Bool is_freeze)
-{
- Evas_Object *pager_scroller = quickpanel_pager_view_get("SCROLLER");
- retif(pager_scroller == NULL, , "pager null");
-
- if (is_freeze) {
- _scroll_freeze(pager_scroller);
- } else {
- _scroll_unfreeze(pager_scroller);
- }
-}
-
-HAPI void quickpanel_page_scroll_hold_set(Eina_Bool is_freeze)
-{
- Evas_Object *pager_scroller = quickpanel_pager_view_get("SCROLLER");
- retif(pager_scroller == NULL, , "pager null");
-
- if (is_freeze) {
- _scroll_hold(pager_scroller);
- } else {
- _scroll_unhold(pager_scroller);
- }
-}
-
-HAPI void quickpanel_page_get_recoordinated_pos(int local_x, int local_y, int *x, int *y)
-{
- int rot_x = 0;
- int rot_y = 0;
- int width = 0;
- int height = 0;
- retif(x == NULL && y == NULL, , "invalid parameter");
-
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid parameter");
-
- //ecore_x_window_size_get(ecore_x_window_root_first_get(), &width, &height);
- elm_win_screen_size_get(ad->win, NULL, NULL, &width, &height);
-
- switch (ad->angle) {
- case 0:
- rot_x = local_x;
- rot_y = local_y;
- break;
- case 90:
- rot_x = height - local_y;
- rot_y = local_x;
- break;
- case 180:
- rot_x = width - local_x;
- rot_y = height - local_y;
- break;
- case 270:
- rot_x = local_y;
- rot_y = width - local_x;
- break;
- default:
- break;
- }
-
- if (x != NULL) {
- *x = rot_x;
- }
-
- if (y != NULL) {
- *y = rot_y;
- }
-}
-
-HAPI void quickpanel_page_get_touched_pos(int *x, int *y)
-{
- int rot_x = 0;
- int rot_y = 0;
- int local_x = 0;
- int local_y = 0;
- retif(x == NULL && y == NULL, , "invalid parameter");
-
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid parameter");
-
- ecore_x_pointer_last_xy_get(&local_x, &local_y);
- quickpanel_page_get_recoordinated_pos(local_x, local_y, &rot_x, &rot_y);
-
- if (x != NULL) {
- *x = rot_x;
- }
-
- if (y != NULL) {
- *y = rot_y;
- }
-}
-
-HAPI void quickpanel_page_editing_icon_visible_status_update(void)
-{
- int is_visible = 0;
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid parameter");
-
- if (quickpanel_pager_current_page_get() == PAGE_IDX_EDITING) {
- is_visible = 1;
- } else {
- is_visible = 0;
- }
-
- quickpanel_datetime_editing_icon_visibility_set(is_visible);
-}
\ No newline at end of file
#include <media.h>
#include <system_settings.h>
-#if defined(WINSYS_X11)
-#include <X11/Xlib.h>
-#include <utilX.h>
-#include <Ecore_X.h>
-#include <privilege-control.h>
-#endif
-
/* quickpanel basics */
#include "common.h"
#include "common_uic.h"
/* services */
#include "keyboard.h"
-#include "keyboard_x.h"
#include "uninstall.h"
#ifdef QP_REMINDER_ENABLE
#include "reminder.h"
static struct appdata *g_app_data = NULL;
-#if defined(WINSYS_X11)
-static Ecore_X_Atom E_ILLUME_ATOM_MV_QUICKPANEL_STATE;
-#endif
-
static void _ui_rotate(void *data, int new_angle);
static void _ui_geometry_info_set(void *data);
static void _ui_handler_info_set(void *data);
static void _ui_handler_input_region_set(void *data, int contents_height)
{
struct appdata *ad = NULL;
-#if defined(WINSYS_X11)
- Ecore_X_Window xwin;
- Ecore_X_Atom atom_window_input_region = 0;
-#else
tzsh_region_h region;
-#endif
unsigned int window_input_region[4] = {0,};
retif(data == NULL, , "Invialid parameter!");
ad = data;
-#if defined(WINSYS_X11)
- xwin = elm_win_xwindow_get(ad->win);
-#else
region = tzsh_region_create(ad->tzsh);
-#endif
switch (ad->angle) {
case 0:
,window_input_region[3]
);
-#if defined(WINSYS_X11)
- atom_window_input_region = ecore_x_atom_get(STR_ATOM_WINDOW_INPUT_REGION);
- ecore_x_window_prop_card32_set(xwin, atom_window_input_region, window_input_region, 4);
-#else
tzsh_region_add(region, 0, contents_height, ad->win_width, ELM_SCALE_SIZE(QP_HANDLE_H));
tzsh_quickpanel_service_handler_region_set(ad->quickpanel_service, ad->angle, region);
tzsh_region_destroy(region);
-#endif
}
static void _ui_handler_content_region_set(void *data, int contents_height)
{
struct appdata *ad = NULL;
-#if defined(WINSYS_X11)
- Ecore_X_Window xwin;
- Ecore_X_Atom atom_window_contents_region = 0;
-#else
tzsh_region_h region;
-#endif
+
unsigned int window_contents_region[4] = {0,};
retif(data == NULL, , "Invialid parameter!");
ad = data;
-#if defined(WINSYS_X11)
- xwin = elm_win_xwindow_get(ad->win);
-#else
region = tzsh_region_create(ad->tzsh);
-#endif
switch (ad->angle) {
case 0:
,window_contents_region[3]
);
-#if defined(WINSYS_X11)
- atom_window_contents_region = ecore_x_atom_get(STR_ATOM_WINDOW_CONTENTS_REGION);
- ecore_x_window_prop_card32_set(xwin, atom_window_contents_region, window_contents_region, 4);
-#else
tzsh_region_add(region, 0, contents_height, ad->win_width, ELM_SCALE_SIZE(QP_HANDLE_H));
tzsh_quickpanel_service_content_region_set(ad->quickpanel_service, ad->angle, region);
tzsh_region_destroy(region);
-#endif
+
}
static void _ui_handler_info_set(void *data)
}
}
-#if defined(WINSYS_X11)
-static Eina_Bool _ecore_event_client_message_cb(void *data, int type,
- void *event)
-{
- struct appdata *ad = data;
-
- Ecore_X_Event_Client_Message *ev = event;
- retif(data == NULL || event == NULL,
- ECORE_CALLBACK_RENEW, "Invalid parameter!");
-
- if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) {
- if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF) {
- SERR("quickpanel is closed");
- ad->is_opened = 0;
- quickpanel_util_time_timer_enable_set(0);
- quickpanel_keyboard_closing_fini(ad);
- quickpanel_keyboard_x_closing_fini(ad);
- quickpanel_modules_closed(data);
- quickpanel_media_player_stop();
- }
- } else if (ev->message_type == E_ILLUME_ATOM_MV_QUICKPANEL_STATE) {
- if (ev->data.l[0] == 1) {
- // pressed
- if (ad->is_opened == 0) {
- quickpanel_util_time_timer_enable_set(1);
- quickpanel_keyboard_openning_init(ad);
- quickpanel_keyboard_x_openning_init(ad);
- if (quickpanel_uic_opened_reason_get() != OPENED_BY_CMD_SHOW_SETTINGS) {
- quickpanel_pager_page_set(PAGE_IDX_MAIN, 0);
- }
- }
- _ui_handler_enable_set(EINA_TRUE);
- }
- if (ev->data.l[0] == 0) {
- // released
- if (ad->is_opened == 0) {
- SERR("quickpanel is opened");
- ad->is_opened = 1;
- quickpanel_modules_opened(data);
- quickpanel_media_player_stop();
- quickpanel_uic_opened_reason_set(OPENED_NO_REASON);
- }
- _ui_handler_enable_set(EINA_FALSE);
- }
- }
- return ECORE_CALLBACK_RENEW;
-}
-#else
void _event_message_cb(void *data, Evas_Object *obj, void *event_info)
{
bool visiblity = (bool)event_info;
}
quickpanel_media_player_stop();
}
-#endif
static void _vconf_init(struct appdata *ad)
{
static void _ecore_event_init(struct appdata *ad)
{
-#if defined(WINSYS_X11)
- Ecore_Event_Handler *hdl = NULL;
-
- /* Register window rotate event */
- hdl = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
- _ecore_event_client_message_cb, ad);
- if (hdl == NULL) {
- ERR("failed to add handler(ECORE_X_EVENT_CLIENT_MESSAGE)");
- }
-
- ad->hdl_client_message = hdl;
-#else
DBG("");
evas_object_smart_callback_add(ad->win, "visibility,changed", _event_message_cb, ad);
-#endif
}
static void _ecore_event_fini(struct appdata *ad)
}
}
-static void _x_atom_init(void)
-{
-#if defined(WINSYS_X11)
- E_ILLUME_ATOM_MV_QUICKPANEL_STATE = ecore_x_atom_get("_E_MOVE_QUICKPANEL_STATE");
-#endif
-}
/*****************************************************************************
*
* App efl main interface
quickpanel_media_init();
- _x_atom_init();
_ecore_event_init(ad);
_vconf_init(ad);
_edbus_init(ad);
quickpanel_emergency_mode_init(ad);
#endif
quickpanel_keyboard_init(ad);
-#if defined(WINSYS_X11)
- quickpanel_keyboard_x_init(ad);
-#endif
#ifdef QP_REMINDER_ENABLE
quickpanel_reminder_init(ad);
#endif
static bool _app_create_cb(void *data)
{
ERR("");
-#if defined(WINSYS_X11)
- elm_config_engine_set("opengl_x11");
-#endif
+
elm_app_base_scale_set(1.8);
pid_t pid;
_ecore_event_fini(ad);
quickpanel_keyboard_fini(ad);
-#if defined(WINSYS_X11)
- quickpanel_keyboard_x_fini(ad);
-#endif
quickpanel_uninstall_fini(ad);
#ifdef QP_REMINDER_ENABLE
quickpanel_reminder_fini(ad);
ERR("quickpanel is forked");
-#if defined(WINSYS_X11)
- ret = perm_app_set_privilege("org.tizen.", NULL, NULL);
- if (ret != 0) {
- WARN("Failed to control privilege!");
- }
-#endif
-
event_callback.create = _app_create_cb;
event_callback.terminate = _app_terminate_cb;
event_callback.pause = _app_pause_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 <stdio.h>
-#include <signal.h>
-#include <app.h>
-#include <sys/utsname.h>
-#include <X11/Xlib.h>
-#include <utilX.h>
-#include <Ecore_Input.h>
-#include <vconf.h>
-#include <unistd.h>
-#include <malloc.h>
-#include <privilege-control.h>
-
-/* quickpanel basics */
-#include "common.h"
-#include "quickpanel-ui.h"
-#include "modules.h"
-#include "quickpanel_def.h"
-#include "list_util.h"
-#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"
-
-/* services */
-#include "keyboard.h"
-#include "keyboard_x.h"
-#include "uninstall.h"
-#ifdef QP_REMINDER_ENABLE
-#include "reminder.h"
-#endif
-#ifdef QP_EMERGENCY_MODE_ENABLE
-#include "emergency_mode.h"
-#endif
-#include "configuration.h"
-#include "minictrl.h"
-#include "util-time.h"
-
-#include <tapi_common.h>
-#include <ITapiSim.h>
-
-
-#define QP_WINDOW_PRIO 300
-
-static struct appdata *g_app_data = NULL;
-
-static Ecore_X_Atom E_ILLUME_ATOM_MV_QUICKPANEL_STATE;
-
-static void _ui_rotate(void *data, int new_angle);
-static void _ui_geometry_info_set(void *data);
-static void _ui_handler_info_set(void *data);
-static void _ui_efl_cache_flush(void *evas);
-
-HAPI void *quickpanel_get_app_data(void)
-{
- return g_app_data;
-}
-
-/******************************************************************************
- *
- * UI
- *
- ****************************************************************************/
-static void _ui_efl_cache_flush(void *evas)
-{
- int file_cache;
- int collection_cache;
- int image_cache;
- int font_cache;
-
- retif(evas == NULL, , "Evas is NULL\n");
-
- file_cache = edje_file_cache_get();
- collection_cache = edje_collection_cache_get();
- image_cache = evas_image_cache_get(evas);
- font_cache = evas_font_cache_get(evas);
-
- edje_file_cache_set(file_cache);
- edje_collection_cache_set(collection_cache);
- evas_image_cache_set(evas, 0);
- evas_font_cache_set(evas, 0);
-
- evas_image_cache_flush(evas);
- evas_render_idle_flush(evas);
- evas_font_cache_flush(evas);
-
- edje_file_cache_flush();
- edje_collection_cache_flush();
-
- edje_file_cache_set(file_cache);
- edje_collection_cache_set(collection_cache);
- evas_image_cache_set(evas, image_cache);
- evas_font_cache_set(evas, font_cache);
-
- elm_cache_all_flush();
- malloc_trim(0);
-}
-
-static void _ui_handler_input_region_set(void *data, int contents_height)
-{
- struct appdata *ad = NULL;
- Ecore_X_Window xwin;
- Ecore_X_Atom atom_window_input_region = 0;
- unsigned int window_input_region[4] = {0,};
-
- retif(data == NULL, , "Invialid parameter!");
- ad = data;
-
- xwin = elm_win_xwindow_get(ad->win);
-
- switch (ad->angle) {
- case 0:
- window_input_region[0] = 0; //X
- window_input_region[1] = contents_height; // Y
- window_input_region[2] = ad->win_width; // Width
- window_input_region[3] = ELM_SCALE_SIZE(QP_HANDLE_H); // height
- break;
- case 90:
- window_input_region[0] = contents_height; //X
- window_input_region[1] = 0; // Y
- window_input_region[2] = ELM_SCALE_SIZE(QP_HANDLE_H); // Width
- window_input_region[3] = ad->win_height; // height
- break;
- case 180:
- window_input_region[0] = 0; //X
- window_input_region[1] = ad->win_height - contents_height - ELM_SCALE_SIZE(QP_HANDLE_H); // Y
- window_input_region[2] = ad->win_width; // Width
- window_input_region[3] = ELM_SCALE_SIZE(QP_HANDLE_H); // height
- break;
- case 270:
- window_input_region[0] = ad->win_width - contents_height - ELM_SCALE_SIZE(QP_HANDLE_H); //X
- window_input_region[1] = 0; // Y
- window_input_region[2] = ELM_SCALE_SIZE(QP_HANDLE_H); // Width
- window_input_region[3] = ad->win_height; // height
- break;
- }
-
- INFO("win_input_0:%d\nwin_input_1:%d\nwin_input_2:%d\nwin_input_3:%d\n"
- ,window_input_region[0]
- ,window_input_region[1]
- ,window_input_region[2]
- ,window_input_region[3]
- );
-
- atom_window_input_region = ecore_x_atom_get(STR_ATOM_WINDOW_INPUT_REGION);
- ecore_x_window_prop_card32_set(xwin, atom_window_input_region, window_input_region, 4);
-}
-
-static void _ui_handler_content_region_set(void *data, int contents_height)
-{
- struct appdata *ad = NULL;
- Ecore_X_Window xwin;
- Ecore_X_Atom atom_window_contents_region = 0;
- unsigned int window_contents_region[4] = {0,};
-
- retif(data == NULL, , "Invialid parameter!");
- ad = data;
-
- xwin = elm_win_xwindow_get(ad->win);
-
- switch (ad->angle) {
- case 0:
- window_contents_region[0] = 0; //X
- window_contents_region[1] = 0; // Y
- window_contents_region[2] = ad->win_width; // Width
- window_contents_region[3] = contents_height; // height
- break;
- case 90:
- window_contents_region[0] = 0; //X
- window_contents_region[1] = 0; // Y
- window_contents_region[2] = contents_height; // Width
- window_contents_region[3] = ad->win_height; // height
- break;
- case 180:
- window_contents_region[0] = 0; //X
- window_contents_region[1] = ad->win_height - contents_height; // Y
- window_contents_region[2] = ad->win_width; // Width
- window_contents_region[3] = contents_height; // height
- break;
- case 270:
- window_contents_region[0] = ad->win_width - contents_height ; //X
- window_contents_region[1] = 0; // Y
- window_contents_region[2] = contents_height; // Width
- window_contents_region[3] = ad->win_height; // height
- break;
- }
-
- DBG("win_contents_0:%d\nwin_contents_1:%d\nwin_contents_2:%d\nwin_contents_3:%d\n"
- ,window_contents_region[0]
- ,window_contents_region[1]
- ,window_contents_region[2]
- ,window_contents_region[3]
- );
-
- atom_window_contents_region = ecore_x_atom_get(STR_ATOM_WINDOW_CONTENTS_REGION);
- ecore_x_window_prop_card32_set(xwin, atom_window_contents_region, window_contents_region, 4);
-}
-
-static void _ui_handler_info_set(void *data)
-{
- int contents_height = 0;
- struct appdata *ad = NULL;
-
- retif(data == NULL, , "data is NULL");
- ad = data;
-
- contents_height = ad->gl_distance_from_top + ad->gl_limit_height;
-
- _ui_handler_input_region_set(ad, contents_height);
- _ui_handler_content_region_set(ad, contents_height);
-}
-
-static void _ui_geometry_info_set(void *data)
-{
- struct appdata *ad = NULL;
- int max_height_window = 0;
- Evas_Coord genlist_y = 0;
-
- retif(data == NULL, , "data is NULL");
- ad = data;
-
- if (ad->angle == 90 || ad->angle == 270 ) {
- max_height_window = ad->win_width;
- } else {
- max_height_window = ad->win_height;
- }
-
- edje_object_part_geometry_get(_EDJ(ad->ly), "qp.base.list.swallow", NULL, &genlist_y, NULL, NULL);
-
- ad->gl_distance_from_top = genlist_y;
- ad->gl_distance_to_bottom = ELM_SCALE_SIZE(QP_HANDLE_H);
- ad->gl_limit_height = max_height_window - ad->gl_distance_from_top - ad->gl_distance_to_bottom;
-}
-
-/*****************************************************************************
- *
- * ui rotation functions
- *
- ****************************************************************************/
-static void _ui_rotation_wm_cb(void *data, Evas_Object *obj, void *event)
-{
- int angle = 0;
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- angle = elm_win_rotation_get((Evas_Object *)obj);
-
- DBG("ROTATE:%d", angle);
-
- quickpanel_minictrl_rotation_report(angle);
-
- _ui_rotate(ad, angle);
-}
-
-static int _ui_rotation_angle_get(void *data)
-{
- struct appdata *ad = (struct appdata *)data;
- retif(ad == NULL, 0, "Invalid parameter!");
- retif(ad->win == NULL, 0, "Invalid parameter!");
-
- return elm_win_rotation_get(ad->win);
-}
-
-static void _ui_handler_enable_set(Eina_Bool is_enable)
-{
- const char *signal = NULL;
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid data.");
- retif(ad->view_root == NULL, , "data is NULL");
-
- if (is_enable == EINA_TRUE) {
- signal = "mouse,down,1";
- } else {
- signal = "mouse,up,1";
- }
-
- elm_object_signal_emit(ad->view_root, signal, "qp.handler.bg");
-}
-
-static void _ui_rotation_handler(struct appdata *ad, int angle)
-{
- const char *signal = NULL;
-
- retif(ad == NULL, , "data is NULL");
- retif(ad->view_root == NULL, , "data is NULL");
-
-
- if (angle == 90 || angle == 270) {
- signal = "quickpanel.landscape";
- } else {
- signal = "quickpanel.portrait";
- }
-
- elm_object_signal_emit(ad->view_root, signal, "quickpanel.prog");
-}
-
-static void _ui_rotate(void *data, int new_angle)
-{
- struct appdata *ad = data;
- retif(data == NULL, , "Invalid parameter!");
-
- DBG("ROTATION: new:%d old:%d", new_angle, ad->angle);
-
- if (new_angle == 0 || new_angle == 90 || new_angle == 180 || new_angle == 270) {
- if (new_angle != ad->angle) {
- ad->angle = new_angle;
- quickpanel_modules_refresh(ad);
- _ui_geometry_info_set(ad);
- _ui_handler_info_set(ad);
- _ui_rotation_handler(ad, ad->angle);
- }
- }
-}
-
-/*****************************************************************************
- *
- * ui creation/deletion functions
- *
- ****************************************************************************/
-static Evas_Object *_ui_window_add(const char *name, int prio)
-{
- Evas_Object *eo = NULL;
- Ecore_X_Window xwin;
-
- eo = elm_win_add(NULL, name, ELM_WIN_BASIC);
-
- if (eo != NULL) {
- elm_win_alpha_set(eo, EINA_TRUE);
- elm_win_indicator_mode_set(eo, ELM_WIN_INDICATOR_HIDE);
-
- elm_win_title_set(eo, name);
- elm_win_borderless_set(eo, EINA_TRUE);
- elm_win_autodel_set(eo, EINA_TRUE);
-
- /* set this window as a quickpanel */
- elm_win_quickpanel_set(eo, 1);
- elm_win_quickpanel_priority_major_set(eo, prio);
-
- if (elm_win_wm_rotation_supported_get(eo)) {
- int rots[4] = { 0, 90, 180, 270 };
- elm_win_wm_rotation_available_rotations_set(eo, rots, 4);
- }
-
- /* icccm name class set */
- xwin = elm_win_xwindow_get(eo);
- ecore_x_icccm_name_class_set(xwin, "QUICKPANEL", "QUICKPANEL");
-
- unsigned int val = 1;
- ecore_x_window_prop_card32_set
- (xwin, ECORE_X_ATOM_E_ILLUME_ACCESS_CONTROL, &val, 1);
-
- evas_object_show(eo);
- }
-
- return eo;
-}
-
-static int _ui_gui_create(void *data)
-{
- struct appdata *ad = data;
- int w = 0, h = 0;
- int initial_angle = 0;
- Evas_Object *page_base = NULL;
-
- retif(data == NULL, QP_FAIL, "Invialid parameter!");
-
- ad->win = _ui_window_add("Quickpanel Window",
- QP_WINDOW_PRIO);
- retif(ad->win == NULL, QP_FAIL, "Failed to create main window");
- //build error
- //elm_win_focus_allow_set(ad->win, EINA_TRUE);
-
- evas_object_smart_callback_add(ad->win, "wm,rotation,changed",
- _ui_rotation_wm_cb, ad);
-
- ad->background = elm_bg_add(ad->win);
- if (ad->background != NULL) {
- evas_object_size_hint_weight_set(ad->background,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_win_resize_object_add(ad->win, ad->background);
- evas_object_show(ad->background);
- } else {
- ERR("failed to create background");
- }
-
- ad->view_root = quickpanel_uic_load_edj(ad->background,
- DEFAULT_EDJ, "quickpanel/root", 0);
- retif(ad->view_root == NULL, QP_FAIL, "Failed to create main page");
-
- Evas_Object *pager_scroller = quickpanel_pager_new(ad->view_root, NULL);
- Evas_Object *pager_box = quickpanel_pager_view_get("BOX");
-
- page_base = quickpanel_page_base_create(pager_box, NULL);
- retif(page_base == NULL, QP_FAIL, "Failed to create main page");
- ad->ly = quickpanel_page_base_view_get("LAYOUT");
- retif(ad->ly == NULL, QP_FAIL, "Failed to create main page");
-
- elm_box_pack_end(pager_box, page_base);
- elm_win_resize_object_add(ad->win, ad->view_root);
- elm_object_part_content_set(ad->view_root, "qp.root.swallow", pager_scroller);
-
- /* get noti evas */
- ad->evas = evas_object_evas_get(ad->win);
- ad->list = quickpanel_page_base_view_get("BOX");
- ad->scroller = quickpanel_page_base_view_get("SCROLLER");
-
- //ecore_x_window_size_get(ecore_x_window_root_first_get(), &w, &h);
- elm_win_screen_size_get(ad->win, NULL, NULL, &w, &h);
- evas_object_resize(ad->win, w, h);
-
- ad->win_width = w;
- ad->win_height = h;
-
- _ui_geometry_info_set(ad);
-
- initial_angle = _ui_rotation_angle_get(ad);
- _ui_rotate(ad, initial_angle);
-
- quickpanel_pager_page_set(PAGE_IDX_MAIN, 1);
-
- sim_controller_init(ad->ly);
-
- quickpanel_noti_init_noti_section();
-
- return 0;
-}
-
-static int _ui_gui_destroy(void *data)
-{
- struct appdata *ad = data;
- retif(data == NULL, QP_FAIL, "Invialid parameter!");
-
- if (ad->list != NULL) {
- evas_object_del(ad->list);
- ad->list = NULL;
- }
- if (ad->scroller != NULL) {
- evas_object_del(ad->scroller);
- ad->scroller = NULL;
- }
- if (ad->ly != NULL) {
- evas_object_del(ad->ly);
- ad->ly = NULL;
- }
- if (ad->win != NULL) {
- evas_object_del(ad->win);
- ad->win = NULL;
- }
-
- return QP_OK;
-}
-
-static void _ui_setting_visibility_set(struct appdata *ad, int show)
-{
- retif(ad == NULL, , "data is NULL");
- retif(ad->ly == NULL, , "data is NULL");
-
- elm_object_signal_emit(ad->ly, "quickpanel.setting.show",
- "quickpanel.prog");
-}
-
-/*****************************************************************************
- *
- * event handler initialization functions
- *
- ****************************************************************************/
-static void _vconf_event_powerff_cb(keynode_t *node,
- void *data)
-{
- int val;
- if (vconf_get_int(VCONFKEY_SYSMAN_POWER_OFF_STATUS, &val) == 0 &&
- (val == VCONFKEY_SYSMAN_POWER_OFF_DIRECT || val == VCONFKEY_SYSMAN_POWER_OFF_RESTART)) {
- ui_app_exit();
- }
-}
-
-static void _vconf_event_lcdoff_cb(keynode_t *node,
- void *data)
-{
- int ret = 0;
- int pm_state = VCONFKEY_PM_STATE_NORMAL;
-
- ret = vconf_get_int(VCONFKEY_PM_STATE, &pm_state);
-
- if (ret == 0 && pm_state == VCONFKEY_PM_STATE_LCDOFF) {
- quickpanel_uic_close_quickpanel(false, 0);
- }
-}
-
-static Eina_Bool _ecore_event_client_message_cb(void *data, int type,
- void *event)
-{
- struct appdata *ad = data;
- Ecore_X_Event_Client_Message *ev = event;
-
- retif(data == NULL || event == NULL,
- ECORE_CALLBACK_RENEW, "Invalid parameter!");
-
- if (ev->message_type == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_STATE) {
- if (ev->data.l[0] == ECORE_X_ATOM_E_ILLUME_QUICKPANEL_OFF) {
- SERR("quickpanel is closed");
- ad->is_opened = 0;
- quickpanel_util_time_timer_enable_set(0);
- quickpanel_keyboard_closing_fini(ad);
- quickpanel_keyboard_x_closing_fini(ad);
- quickpanel_modules_closed(data);
- quickpanel_media_player_stop();
- }
- } else if (ev->message_type == E_ILLUME_ATOM_MV_QUICKPANEL_STATE) {
- if (ev->data.l[0] == 1) {
- // pressed
- if (ad->is_opened == 0) {
- quickpanel_util_time_timer_enable_set(1);
- quickpanel_keyboard_openning_init(ad);
- quickpanel_keyboard_x_openning_init(ad);
- if (quickpanel_uic_opened_reason_get() != OPENED_BY_CMD_SHOW_SETTINGS) {
- quickpanel_pager_page_set(PAGE_IDX_MAIN, 0);
- }
- }
- _ui_handler_enable_set(EINA_TRUE);
- }
- if (ev->data.l[0] == 0) {
- // released
- if (ad->is_opened == 0) {
- SERR("quickpanel is opened");
- ad->is_opened = 1;
- quickpanel_modules_opened(data);
- quickpanel_media_player_stop();
- quickpanel_uic_opened_reason_set(OPENED_NO_REASON);
- }
- _ui_handler_enable_set(EINA_FALSE);
- }
- }
- return ECORE_CALLBACK_RENEW;
-}
-
-static void _vconf_init(struct appdata *ad)
-{
- int ret = 0;
-
- ret = vconf_notify_key_changed(VCONFKEY_PM_STATE,
- _vconf_event_lcdoff_cb, ad);
- if (ret != 0) {
- ERR("VCONFKEY_PM_STATE: %d", ret);
- }
-
- ret = vconf_notify_key_changed(VCONFKEY_SYSMAN_POWER_OFF_STATUS,
- _vconf_event_powerff_cb, ad);
- if (ret != 0) {
- ERR("VCONFKEY_PM_STATE: %d", ret);
- }
-}
-
-static void _vconf_fini(struct appdata *ad)
-{
- int ret = 0;
-
- ret = vconf_ignore_key_changed(VCONFKEY_PM_STATE,
- _vconf_event_lcdoff_cb);
- if (ret != 0) {
- ERR("VCONFKEY_PM_STATE: %d", ret);
- }
-
- ret = vconf_ignore_key_changed(VCONFKEY_SYSMAN_POWER_OFF_STATUS,
- _vconf_event_powerff_cb);
- if (ret != 0) {
- ERR("VCONFKEY_PM_STATE: %d", ret);
- }
-}
-
-static void _edbus_init(struct appdata *ad)
-{
- e_dbus_init();
- ad->dbus_connection = e_dbus_bus_get(DBUS_BUS_SYSTEM);
- if (ad->dbus_connection == NULL) {
- ERR("noti register : failed to get dbus bus");
- }
-}
-
-static void _edbus_fini(struct appdata *ad)
-{
- if (ad->dbus_connection != NULL) {
- e_dbus_connection_close(ad->dbus_connection);
- ad->dbus_connection = NULL;
- e_dbus_shutdown();
- }
-}
-
-static void _ecore_event_init(struct appdata *ad)
-{
- Ecore_Event_Handler *hdl = NULL;
-
- /* Register window rotate event */
- hdl = ecore_event_handler_add(ECORE_X_EVENT_CLIENT_MESSAGE,
- _ecore_event_client_message_cb, ad);
- if (hdl == NULL) {
- ERR("failed to add handler(ECORE_X_EVENT_CLIENT_MESSAGE)");
- }
-
- ad->hdl_client_message = hdl;
-}
-
-static void _ecore_event_fini(struct appdata *ad)
-{
- if (ad->hdl_client_message != NULL) {
- ecore_event_handler_del(ad->hdl_client_message);
- ad->hdl_client_message = NULL;
- }
-}
-
-static void _x_atom_init(void)
-{
- E_ILLUME_ATOM_MV_QUICKPANEL_STATE = ecore_x_atom_get("_E_MOVE_QUICKPANEL_STATE");
-}
-/*****************************************************************************
- *
- * App efl main interface
- *
- ****************************************************************************/
-static void _sigaction_terminate_handler(int signum, siginfo_t *info, void *unused)
-{
- ERR("quickpanel going to be terminated");
- ui_app_exit();
-}
-
-static void _service_request_process(app_control_h service, void *data)
-{
- char *value = NULL;
- retif(service == NULL, , "Invialid parameter!");
-
- if (!app_control_get_extra_data(service, "HIDE_LAUNCH", &value))
- {
- if (value != NULL) {
- ERR("HIDE_LAUNCH: %s", value);
- if (!strcmp(value, "1")) {
- quickpanel_uic_close_quickpanel(false, 0);
- } else {
- quickpanel_uic_open_quickpanel(OPENED_BY_CMD_HIDE_LAUNCH);
- }
-
- free(value);
- }
- } else if (!app_control_get_extra_data(service, "SHOW_SETTINGS", &value)) {
- if (value != NULL) {
- ERR("SHOW_SETTINGS: %s", value);
- if (!strcmp(value, "1")) {
- quickpanel_pager_page_set(PAGE_IDX_EDITING, 0);
- quickpanel_uic_open_quickpanel(OPENED_BY_CMD_SHOW_SETTINGS);
- }
-
- free(value);
- }
- }
-#ifdef QP_EMERGENCY_MODE_ENABLE
- else if (!app_control_get_extra_data(service, "EMERGENCY_MODE_LAUNCH", &value)) {
- if (value != NULL) {
- ERR("EMERGENCY_MODE_LAUNCH: %s", value);
- if (!strcmp(value, "1")) {
- if (quickpanel_emergency_mode_syspopup_launch() == QP_FAIL) {
- ERR("failed to launch emergency mode syspopup");
- } else {
- quickpanel_uic_close_quickpanel(true, 0);
- }
- }
-
- free(value);
- }
- }
-#endif
-}
-
-static Eina_Bool _appcore_cache_flush_timer_cb(void *data)
-{
- if (!quickpanel_uic_is_suspended()) {
- return ECORE_CALLBACK_CANCEL;
- }
-
- return ECORE_CALLBACK_CANCEL;
-}
-
-static Eina_Bool _ui_refresh_idler_cb(void *data)
-{
- DBG("");
- struct appdata *ad = data;
- retif(ad == NULL, QP_FAIL, "Invalid parameter!");
-
- quickpanel_modules_refresh(ad);
- _ui_geometry_info_set(ad);
- _ui_handler_info_set(ad);
-
- /* Cache memory is cleared when the application paused (every time, after 5 seconds (in appcore)),
- * but after running in a minimized mode application have status AS_RUNNING.
- * Application have status AS_PAUSED only after change of visibility to hidden condition by user (on hiding window)
- * Cleaning must be performed only once after application loading in hidden condition
- * (and stay in a hidden condition at time of cleaning).
- */
- ecore_timer_add(10, _appcore_cache_flush_timer_cb, NULL);
-
- return EINA_FALSE;
-}
-
-static void _quickpanel_initialize(void *data)
-{
- int ret = 0;
- struct appdata *ad = data;
- retif(ad == NULL, , "Invialid parameter!");
-
- INFO(">> Creating Quickpanel");
- /* Check emulator */
- ad->is_emul = quickpanel_uic_is_emul();
- INFO("quickpanel run in %s", ad->is_emul ? "Emul" : "Device");
-
- int w, h;
- Ecore_X_Screen *screen = ecore_x_default_screen_get();
- //ecore_x_screen_size_get(screen, &w, &h);
- elm_win_screen_size_get(screen, NULL, NULL, &w, &h);
-
- ad->scale = elm_config_scale_get();
- if (ad->scale < 0) {
- ad->scale = 1.0;
- }
-
- INFO("quickpanel scale %f", ad->scale);
-
- ad->is_suspended = 1;
-
- /* Get theme */
- elm_theme_extension_add(NULL, DEFAULT_THEME_EDJ);
- /* create quickpanel window */
- ret = _ui_gui_create(ad);
- retif(ret != QP_OK, , "Failed to create window!");
-
- quickpanel_media_init();
-
- _x_atom_init();
- _ecore_event_init(ad);
- _vconf_init(ad);
- _edbus_init(ad);
-
- quickpanel_uninstall_init(ad);
-#ifdef QP_EMERGENCY_MODE_ENABLE
- quickpanel_emergency_mode_init(ad);
-#endif
- quickpanel_conf_init(ad);
- quickpanel_keyboard_init(ad);
- quickpanel_keyboard_x_init(ad);
-#ifdef QP_REMINDER_ENABLE
- quickpanel_reminder_init(ad);
-#endif
-
-#ifdef QP_SETTING_ENABLE
- _ui_setting_visibility_set(ad, 1);
-#else /* QP_SETTING_ENABLE */
- _ui_setting_visibility_set(ad, 0);
-#endif /* QP_SETTING_ENABLE */
-
- /* init quickpanel modules */
- quickpanel_modules_init(ad);
- ecore_idler_add(_ui_refresh_idler_cb, ad);
-}
-
-static bool _app_create_cb(void *data)
-{
- ERR("");
-
- elm_config_engine_set("opengl_x11");
-
- elm_app_base_scale_set(1.8);
-
- pid_t pid;
- int r;
-
- // signal handler
- struct sigaction act;
- act.sa_sigaction = _sigaction_terminate_handler;
- act.sa_flags = SA_SIGINFO;
-
- int ret = sigemptyset(&act.sa_mask);
- if (ret < 0) {
- ERR("Failed to sigemptyset[%s]", strerror(errno));
- }
- ret = sigaddset(&act.sa_mask, SIGTERM);
- if (ret < 0) {
- ERR("Failed to sigaddset[%s]", strerror(errno));
- }
- ret = sigaction(SIGTERM, &act, NULL);
- if (ret < 0) {
- ERR("Failed to sigaction[%s]", strerror(errno));
- }
-
- pid = setsid();
- if (pid < 0) {
- WARN("Failed to set session id!");
- }
-
- r = nice(2);
- if (r == -1) {
- WARN("Failed to set nice value!");
- }
-
- return TRUE;
-}
-
-static void _app_service_cb(app_control_h service, void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invialid parameter!");
-
- if (ad->win == NULL && ad->ly == NULL) {
- _quickpanel_initialize(data);
- } else {
- _service_request_process(service, data);
- }
-}
-
-static void _app_terminate_cb(void *data)
-{
- ERR("");
-
- struct appdata *ad = data;
- retif(ad == NULL, , "invalid data.");
-
- quickpanel_media_fini();
-
- /* fini quickpanel modules */
- quickpanel_modules_fini(ad);
- _edbus_fini(ad);
- _vconf_fini(ad);
- _ecore_event_fini(ad);
-
- quickpanel_keyboard_fini(ad);
- quickpanel_keyboard_x_fini(ad);
- quickpanel_uninstall_fini(ad);
-#ifdef QP_REMINDER_ENABLE
- quickpanel_reminder_fini(ad);
-#endif
-#ifdef QP_EMERGENCY_MODE_ENABLE
- quickpanel_emergency_mode_fini(ad);
-#endif
- quickpanel_conf_fini(ad);
-
- /* delete quickpanel window */
- _ui_gui_destroy(ad);
-
- INFO("Quickpanel is terminated");
-}
-
-static void _app_resume_cb(void *data)
-{
- DBG("");
- struct appdata *ad = data;
- retif(ad == NULL,, "invalid data.");
-
- ad->is_suspended = 0;
- _ui_handler_enable_set(EINA_FALSE);
-
- quickpanel_modules_resume(data);
-
- sim_controller_resume();
-}
-
-static void _app_pause_cb(void *data)
-{
- DBG("");
- struct appdata *ad = data;
- retif(ad == NULL,, "invalid data.");
-
-
- quickpanel_modules_suspend(ad);
-
- ad->is_suspended = 1;
-
- if (ad->evas != NULL) {
- _ui_efl_cache_flush(ad->evas);
- evas_event_feed_mouse_cancel(ad->evas, ecore_time_get(), NULL);
- }
-}
-
-static void _app_language_changed_cb(app_event_info_h event_info, void *data)
-{
- DBG("");
- quickpanel_modules_lang_change(data);
-
- sim_controller_on_language_change();
-}
-
-static void _app_region_format_changed_cb(app_event_info_h event_info, void *data)
-{
- DBG("");
- quickpanel_modules_lang_change(data);
-}
-
-int main(int argc, char *argv[])
-{
- INFO("BUILD START: %s %s", __DATE__, __TIME__);
- ERR("BUILD START: %s %s", __DATE__, __TIME__);
-
- int ret = 0;
- struct appdata ad;
- ui_app_lifecycle_callback_s event_callback = {0,};
- app_event_handler_h handlers[5] = {NULL, };
-
- ERR("quickpanel is forked");
-
- ret = control_privilege();
- if (ret != 0) {
- WARN("Failed to control privilege!");
- }
-
- event_callback.create = _app_create_cb;
- event_callback.terminate = _app_terminate_cb;
- event_callback.pause = _app_pause_cb;
- event_callback.resume = _app_resume_cb;
- event_callback.app_control = _app_service_cb;
-
- ui_app_add_event_handler(&handlers[APP_EVENT_LOW_BATTERY], APP_EVENT_LOW_BATTERY, NULL, NULL);
- ui_app_add_event_handler(&handlers[APP_EVENT_LOW_MEMORY], APP_EVENT_LOW_MEMORY, NULL, NULL);
- ui_app_add_event_handler(&handlers[APP_EVENT_DEVICE_ORIENTATION_CHANGED], APP_EVENT_DEVICE_ORIENTATION_CHANGED, NULL, NULL);
- ui_app_add_event_handler(&handlers[APP_EVENT_LANGUAGE_CHANGED], APP_EVENT_LANGUAGE_CHANGED, _app_language_changed_cb, &ad);
- ui_app_add_event_handler(&handlers[APP_EVENT_REGION_FORMAT_CHANGED], APP_EVENT_REGION_FORMAT_CHANGED, _app_region_format_changed_cb, &ad);
-
- memset(&ad, 0x0, sizeof(struct appdata));
-
- g_app_data = &ad;
-
- ret = ui_app_main(argc, argv, &event_callback, (void *)&ad);
- if (ret != APP_ERROR_NONE) {
- ERR("ui_app_main() is failed. err = %d", ret);
- }
-
- return ret;
-
-}
#include <tzsh_quickpanel_service.h>
#include <notification.h>
-#if defined(WINSYS_X11)
-#include <Ecore_X.h>
-#include <X11/Xlib.h>
-#include <utilX.h>
-#endif
#include <E_DBus.h>
#include "quickpanel-ui.h" // appdata
+++ /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 <Ecore_X.h>
-#include <Ecore_Input.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/XInput2.h>
-
-#include <vconf.h>
-#include <utilX.h>
-#include <feedback.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <notification.h>
-#include <E_DBus.h>
-
-#include "quickpanel-ui.h"
-#include "common.h"
-#include "noti_util.h"
-#include "keyboard_x.h"
-
-#define TAB 23
-#define SHIFT 50
-#define RETURN 36
-#define ARROW_KP_UP 80
-#define ARROW_KP_DOWN 88
-#define ARROW_KP_LEFT 83
-#define ARROW_KP_RIGHT 85
-#define ARROW_UP 111
-#define ARROW_DOWN 116
-#define ARROW_LEFT 113
-#define ARROW_RIGHT 114
-
-typedef struct _key_info {
- int keycode;
- const char *keyname;
- const char *key;
- const char *string;
- const char *compose;
-} key_info;
-
-key_info key_infos[] = {
- { TAB, "Tab", "Tab", "\t", "\t" },
- { RETURN, "Return", "Return", "\n", "\n" },
- { ARROW_UP, "Up", "Up", NULL, NULL },
- { ARROW_KP_UP, "Up", "Up", NULL, NULL },
- { ARROW_DOWN, "Down", "Down", NULL, NULL },
- { ARROW_KP_DOWN, "Down", "Down", NULL, NULL },
- { ARROW_LEFT, "Left", "Left", NULL, NULL },
- { ARROW_KP_LEFT, "Left", "Left", NULL, NULL },
- { ARROW_RIGHT, "Right", "Right", NULL, NULL },
- { ARROW_KP_RIGHT, "Right", "Right", NULL, NULL },
- { SHIFT, "Shift", "Shift", NULL, NULL },
-};
-
-static int _cb_event_generic(void *data, int ev_type, void *event);
-static Eina_Bool _xinput_init(void);
-static void _key_event_select(void);
-static void _focus_ui_process_press(XIRawEvent *raw_event);
-static void _focus_ui_process_release(XIRawEvent *raw_event);
-
-static struct _s_info {
- int xi2_opcode;
- int is_shift_pressed;
- Ecore_Event_Handler *hdl_key_event;
-} s_info = {
- .xi2_opcode = -1,
- .is_shift_pressed = 0,
- .hdl_key_event = NULL,
-};
-
-static int _key_event_validation_check(int keycode)
-{
- int i = 0, len = 0;
-
- len = sizeof(key_infos) / sizeof(key_infos[0]);
-
- for (i = 0; i < len; i++ ) {
- if (key_infos[i].keycode == keycode) {
- return 1;
- }
- }
-
- return 0;
-}
-
-static void _key_event_select(void)
-{
- int rc;
- XIEventMask mask;
- Ecore_X_Display *d;
-
- d = ecore_x_display_get();
- if (d == NULL) {
- ERR("failed to get ecore-display");
- return;
- }
-
- mask.mask_len = XIMaskLen(XI_LASTEVENT);
- mask.deviceid = XIAllDevices;
- mask.mask = calloc(mask.mask_len, sizeof(char));
- if (mask.mask == NULL) {
- ERR("failed to get ecore-display");
- return;
- }
- memset(mask.mask, 0, mask.mask_len);
-
- XISetMask(mask.mask, XI_RawKeyPress);
- XISetMask(mask.mask, XI_RawKeyRelease);
-
- rc = XISelectEvents(d, ecore_x_window_root_first_get(), &mask, 1);
- if (Success != rc) {
- ERR("Failed to select XInput extension events");
- }
- if (mask.mask) {
- free( mask.mask);
- }
- ecore_x_sync();
-}
-
-static Eina_Bool _xinput_init(void)
-{
- int event, error;
-
- if (!XQueryExtension(ecore_x_display_get(), "XInputExtension", &s_info.xi2_opcode, &event, &error)) {
- s_info.xi2_opcode = -1;
-
- SERR("failed to initialize key event receiver");
- return EINA_FALSE;
- }
-
- _key_event_select();
-
- return EINA_TRUE;
-}
-
-static int _cb_event_generic(void *data, int ev_type, void *event)
-{
- Ecore_X_Event_Generic *e;
- XIDeviceEvent *evData;
-
- e = (Ecore_X_Event_Generic *)event;
- evData = (XIDeviceEvent *)(e->data);
-
- if (e->extension != s_info.xi2_opcode) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- if (!evData || evData->send_event) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- switch (e->evtype) {
- case XI_RawKeyPress:
- if (evData->deviceid == 3) {
- break;
- }
- _focus_ui_process_press((XIRawEvent *)evData);
- break;
- case XI_RawKeyRelease:
- if (evData->deviceid == 3) {
- break;
- }
- _focus_ui_process_release((XIRawEvent *)evData);
- break;
- default:
- break;
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static void _focus_ui_process_press(XIRawEvent *raw_event)
-{
- XEvent xev;
- Ecore_X_Display *d;
- struct appdata *ad;
-
- ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid data.");
- retif(raw_event == NULL, , "invalid data.");
-
- if (raw_event->detail == SHIFT) {
- s_info.is_shift_pressed = 1;
- return;
- }
- if (_key_event_validation_check(raw_event->detail) == 0) {
- return;
- }
-
- d = ecore_x_display_get();
- if (d == NULL) {
- ERR("failed to get ecore-display");
- return;
- }
-
- memset(&xev, 0, sizeof(XEvent));
- xev.xany.display = ecore_x_display_get();
- xev.xkey.keycode = raw_event->detail;
- xev.xkey.time = raw_event->time;
- if (s_info.is_shift_pressed == 1) {
- xev.xkey.state = 0x1;
- } else {
- xev.xkey.state = 0;
- }
- xev.xkey.root = ecore_x_window_root_first_get();
- xev.xkey.send_event = 1;
- xev.xkey.subwindow = None;
- xev.xkey.type = KeyPress;
- xev.xkey.window = elm_win_xwindow_get(ad->win);
- XSendEvent(d, elm_win_xwindow_get(ad->win) , False, NoEventMask, &xev);
- DBG("keypressed:%d", raw_event->detail);
-}
-
-static void _focus_ui_process_release(XIRawEvent *raw_event)
-{
- XEvent xev;
- Ecore_X_Display *d;
- struct appdata *ad;
-
- ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid data.");
- retif(raw_event == NULL, , "invalid data.");
-
- if (raw_event->detail == SHIFT) {
- s_info.is_shift_pressed = 0;
- return;
- }
-
- if (_key_event_validation_check(raw_event->detail) == 0) {
- return;
- }
-
- d = ecore_x_display_get();
- if (d == NULL) {
- ERR("failed to get ecore-display");
- return;
- }
-
- memset(&xev, 0, sizeof(XEvent));
- xev.xany.display = d;
- xev.xkey.keycode = raw_event->detail;
- xev.xkey.time = raw_event->time;
- if (s_info.is_shift_pressed == 1) {
- xev.xkey.state = 0x1;
- } else {
- xev.xkey.state = 0;
- }
- xev.xkey.root = ecore_x_window_root_first_get();
- xev.xkey.send_event = 1;
- xev.xkey.subwindow = None;
- xev.xkey.type = KeyRelease;
- xev.xkey.window = elm_win_xwindow_get(ad->win);
- XSendEvent(d, elm_win_xwindow_get(ad->win) , False, NoEventMask, &xev);
- DBG("keyrelease:%d", raw_event->detail);
-}
-
-static void _focus_cleanup(void *data)
-{
- struct appdata *ad = data;
- Evas_Object *focused_obj = NULL;
- retif(ad == NULL, , "invalid data.");
- retif(ad->win == NULL, , "invalid data.");
-
- focused_obj = elm_object_focused_object_get(ad->win);
- if (focused_obj != NULL) {
- elm_object_focus_set(focused_obj, EINA_FALSE);
- }
- elm_win_focus_highlight_enabled_set(ad->win, EINA_FALSE);
-}
-
-HAPI void quickpanel_keyboard_x_init(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- _xinput_init();
-}
-
-HAPI void quickpanel_keyboard_x_fini(void *data)
-{
- struct appdata *ad;
-
- ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- if (s_info.hdl_key_event != NULL) {
- ecore_event_handler_del(s_info.hdl_key_event);
- s_info.hdl_key_event = NULL;
- }
-
- _focus_cleanup(ad);
-}
-
-HAPI void quickpanel_keyboard_x_openning_init(void *data)
-{
- struct appdata *ad;
-
- ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- if (s_info.hdl_key_event != NULL) {
- ecore_event_handler_del(s_info.hdl_key_event);
- s_info.hdl_key_event = NULL;
- }
- s_info.hdl_key_event = ecore_event_handler_add(ECORE_X_EVENT_GENERIC, (Ecore_Event_Handler_Cb)_cb_event_generic, NULL);
-}
-
-HAPI void quickpanel_keyboard_x_closing_fini(void *data)
-{
- struct appdata *ad;
-
- ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- if (s_info.hdl_key_event != NULL) {
- ecore_event_handler_del(s_info.hdl_key_event);
- s_info.hdl_key_event = NULL;
- }
-
- if (ad->win != NULL) {
- elm_win_focus_highlight_enabled_set(ad->win, EINA_FALSE);
- }
-}
+++ /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_KEYBOARD_X_DEF_
-#define _QP_SERVICE_KEYBOARD_X_DEF_
-
-#include "quickpanel-ui.h"
-
-void quickpanel_keyboard_x_init(void *data);
-void quickpanel_keyboard_x_fini(void *data);
-void quickpanel_keyboard_x_openning_init(void *data);
-void quickpanel_keyboard_x_closing_fini(void *data);
-
-#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 <Ecore_X.h>
-#include <Ecore_Input.h>
-#include <X11/Xlib.h>
-#include <X11/extensions/XInput.h>
-#include <X11/extensions/XInput2.h>
-
-#include <vconf.h>
-#include <utilX.h>
-#include <feedback.h>
-#include <tzsh.h>
-#include <tzsh_quickpanel_service.h>
-#include <notification.h>
-#include <E_DBus.h>
-
-#include "quickpanel-ui.h"
-#include "common.h"
-#include "noti_util.h"
-#include "keyboard_x.h"
-
-#define TAB 23
-#define SHIFT 50
-#define RETURN 36
-#define ARROW_KP_UP 80
-#define ARROW_KP_DOWN 88
-#define ARROW_KP_LEFT 83
-#define ARROW_KP_RIGHT 85
-#define ARROW_UP 111
-#define ARROW_DOWN 116
-#define ARROW_LEFT 113
-#define ARROW_RIGHT 114
-
-typedef struct _key_info {
- int keycode;
- const char *keyname;
- const char *key;
- const char *string;
- const char *compose;
-} key_info;
-
-key_info key_infos[] = {
- {TAB, "Tab", "Tab", "\t", "\t"},
- {RETURN, "Return", "Return", "\n", "\n"},
- {ARROW_UP, "Up", "Up", NULL, NULL},
- {ARROW_KP_UP, "Up", "Up", NULL, NULL},
- {ARROW_DOWN, "Down", "Down", NULL, NULL},
- {ARROW_KP_DOWN, "Down", "Down", NULL, NULL},
- {ARROW_LEFT, "Left", "Left", NULL, NULL},
- {ARROW_KP_LEFT, "Left", "Left", NULL, NULL},
- {ARROW_RIGHT, "Right", "Right", NULL, NULL},
- {ARROW_KP_RIGHT, "Right", "Right", NULL, NULL},
- {SHIFT, "Shift", "Shift", NULL, NULL},
-};
-
-static int _cb_event_generic(void *data, int ev_type, void *event);
-static Eina_Bool _xinput_init(void);
-static void _key_event_select(void);
-static void _focus_ui_process_press(XIRawEvent *raw_event);
-static void _focus_ui_process_release(XIRawEvent *raw_event);
-
-static struct _s_info {
- int xi2_opcode;
- int is_shift_pressed;
- Ecore_Event_Handler *hdl_key_event;
-} s_info = {
- .xi2_opcode = -1,
- .is_shift_pressed = 0,
- .hdl_key_event = NULL,
-};
-
-static int _key_event_validation_check(int keycode)
-{
- int i = 0, len = 0;
-
- len = sizeof(key_infos) / sizeof(key_infos[0]);
-
- for (i = 0; i < len; i++ ) {
- if (key_infos[i].keycode == keycode) {
- return 1;
- }
- }
-
- return 0;
-}
-
-static void _key_event_select(void)
-{
- int rc;
- XIEventMask mask;
- Ecore_X_Display *d = NULL;
-
- d = ecore_x_display_get();
- if (d == NULL) {
- ERR("failed to get ecore-display");
- return;
- }
-
- mask.mask_len = XIMaskLen(XI_LASTEVENT);
- mask.deviceid = XIAllDevices;
- mask.mask = calloc(mask.mask_len, sizeof(char));
- if (mask.mask == NULL) {
- ERR("failed to get ecore-display");
- return;
- }
- memset(mask.mask, 0, mask.mask_len);
-
- XISetMask(mask.mask, XI_RawKeyPress);
- XISetMask(mask.mask, XI_RawKeyRelease);
-
- rc = XISelectEvents(d, ecore_x_window_root_first_get(), &mask, 1);
- if (Success != rc) {
- ERR("Failed to select XInput extension events");
- }
- if (mask.mask) {
- free( mask.mask);
- }
- ecore_x_sync();
-}
-
-static Eina_Bool _xinput_init(void)
-{
- int event, error;
-
- if (!XQueryExtension(ecore_x_display_get(), "XInputExtension",
- &s_info.xi2_opcode, &event, &error)) {
- s_info.xi2_opcode = -1;
-
- SERR("failed to initialize key event receiver");
- return EINA_FALSE;
- }
-
- _key_event_select();
-
- return EINA_TRUE;
-}
-
-static int _cb_event_generic(void *data, int ev_type, void *event)
-{
- Ecore_X_Event_Generic *e = (Ecore_X_Event_Generic *)event;
- XIDeviceEvent *evData = (XIDeviceEvent *)(e->data);
-
- if ( e->extension != s_info.xi2_opcode ) {
- return ECORE_CALLBACK_PASS_ON;
- }
- if ( !evData || evData->send_event ) {
- return ECORE_CALLBACK_PASS_ON;
- }
-
- switch( e->evtype ) {
- case XI_RawKeyPress:
- if (evData->deviceid == 3) {
- break;
- }
- _focus_ui_process_press((XIRawEvent *)evData);
- break;
- case XI_RawKeyRelease:
- if (evData->deviceid == 3) {
- break;
- }
- _focus_ui_process_release((XIRawEvent *)evData);
- break;
- default:
- break;
- }
-
- return ECORE_CALLBACK_PASS_ON;
-}
-
-static void _focus_ui_process_press(XIRawEvent *raw_event)
-{
- XEvent xev;
-
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid data.");
- retif(raw_event == NULL, , "invalid data.");
-
- if (raw_event->detail == SHIFT) {
- s_info.is_shift_pressed = 1;
- return;
- }
- if (_key_event_validation_check(raw_event->detail) == 0) {
- return;
- }
-
- Ecore_X_Display *d = ecore_x_display_get();
- if (d == NULL) {
- ERR("failed to get ecore-display");
- return;
- }
-
- memset(&xev, 0, sizeof(XEvent));
- xev.xany.display = ecore_x_display_get();
- xev.xkey.keycode = raw_event->detail;
- xev.xkey.time = raw_event->time;
- if (s_info.is_shift_pressed == 1) {
- xev.xkey.state = 0x1;
- } else {
- xev.xkey.state = 0;
- }
- xev.xkey.root = ecore_x_window_root_first_get();
- xev.xkey.send_event = 1;
- xev.xkey.subwindow = None;
- xev.xkey.type = KeyPress;
- xev.xkey.window = elm_win_xwindow_get(ad->win);
- XSendEvent(d, elm_win_xwindow_get(ad->win)
- , False, NoEventMask, &xev);
- DBG("keypressed:%d", raw_event->detail);
-}
-
-static void _focus_ui_process_release(XIRawEvent *raw_event)
-{
- XEvent xev;
-
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, , "invalid data.");
- retif(raw_event == NULL, , "invalid data.");
-
- if (raw_event->detail == SHIFT) {
- s_info.is_shift_pressed = 0;
- return;
- }
- if (_key_event_validation_check(raw_event->detail) == 0) {
- return;
- }
-
- Ecore_X_Display *d = ecore_x_display_get();
- if (d == NULL) {
- ERR("failed to get ecore-display");
- return;
- }
-
- memset(&xev, 0, sizeof(XEvent));
- xev.xany.display = d;
- xev.xkey.keycode = raw_event->detail;
- xev.xkey.time = raw_event->time;
- if (s_info.is_shift_pressed == 1) {
- xev.xkey.state = 0x1;
- } else {
- xev.xkey.state = 0;
- }
- xev.xkey.root = ecore_x_window_root_first_get();
- xev.xkey.send_event = 1;
- xev.xkey.subwindow = None;
- xev.xkey.type = KeyRelease;
- xev.xkey.window = elm_win_xwindow_get(ad->win);
- XSendEvent(d, elm_win_xwindow_get(ad->win)
- , False, NoEventMask, &xev);
- DBG("keyrelease:%d", raw_event->detail);
-}
-
-static void _focus_cleanup(void *data)
-{
- struct appdata *ad = data;
- Evas_Object *focused_obj = NULL;
- retif(ad == NULL, , "invalid data.");
- retif(ad->win == NULL, , "invalid data.");
-
- focused_obj = elm_object_focused_object_get(ad->win);
- if (focused_obj != NULL) {
- elm_object_focus_set(focused_obj, EINA_FALSE);
- }
- elm_win_focus_highlight_enabled_set(ad->win, EINA_FALSE);
-}
-
-HAPI void quickpanel_keyboard_x_init(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- _xinput_init();
-}
-
-HAPI void quickpanel_keyboard_x_fini(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- if (s_info.hdl_key_event != NULL) {
- ecore_event_handler_del(s_info.hdl_key_event);
- s_info.hdl_key_event = NULL;
- }
-
- _focus_cleanup(ad);
-}
-
-HAPI void quickpanel_keyboard_x_openning_init(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- if (s_info.hdl_key_event != NULL) {
- ecore_event_handler_del(s_info.hdl_key_event);
- s_info.hdl_key_event = NULL;
- }
- s_info.hdl_key_event =
- ecore_event_handler_add(ECORE_X_EVENT_GENERIC, (Ecore_Event_Handler_Cb)_cb_event_generic, NULL);
-}
-
-HAPI void quickpanel_keyboard_x_closing_fini(void *data)
-{
- struct appdata *ad = data;
- retif(ad == NULL, , "Invalid parameter!");
-
- if (s_info.hdl_key_event != NULL) {
- ecore_event_handler_del(s_info.hdl_key_event);
- s_info.hdl_key_event = NULL;
- }
-
- if (ad->win != NULL) {
- elm_win_focus_highlight_enabled_set(ad->win, EINA_FALSE);
- }
-}
#include <Elementary.h>
#include <glib.h>
-#if defined(WINSYS_X11)
-#include <Ecore_X.h>
-#endif
-
#include <notification.h>
#include <tzsh.h>
#include <tzsh_quickpanel_service.h>
Evas_Object *scroller = quickpanel_setting_scroller_get(ad->ly);
int w, h;
-#if defined(WINSYS_X11)
- Ecore_X_Screen *screen = ecore_x_default_screen_get();
- ecore_x_screen_size_get(screen, &w, &h);
-#else
elm_win_screen_size_get(ad->win, NULL, NULL, &w, &h);
-#endif
-
elm_scroller_page_size_set(scroller, w / QP_SETTING_NUM_PORTRAIT_ICONS, 0);
return 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.
- *
- */
-
-
-#include <glib.h>
-#include <efl_assist.h>
-#include <notification.h>
-
-#include "common.h"
-#include "quickpanel_def.h"
-#include "quickpanel-ui.h"
-#include "setting_utils.h"
-#ifdef QP_SCREENREADER_ENABLE
-#include "accessibility.h"
-#endif
-
-#define DEFAULT_EDJ EDJDIR"/"PACKAGE".edj"
-#define _EDJ(o) elm_layout_edje_get(o)
-
-#define TEXT_LEN 128
-#define QP_SETTING_INITIAL_PAGE_NUM 0
-#define DIVIDER_MAGIC 0xCAFECAFE
-#define E_DATA_DIVIDER_MAGIC "divider_magic"
-
-static inline void __escaped_text_set(Evas_Object *obj,
- const char *part, const char *text)
-{
- char buf[256] = {0,};
- char *ecaped = NULL;
-
- if (!obj) {
- return;
- }
-
- if (!part) {
- return;
- }
-
- strncpy(buf, text, sizeof(buf) - 1);
- quickpanel_common_util_char_trim(buf);
- ecaped = evas_textblock_text_utf8_to_markup(NULL, buf);
-
- elm_object_part_text_set(obj, part, ecaped);
-
- if (ecaped) {
- free(ecaped);
- }
-}
-
-HAPI int quickpanel_setting_icon_text_set(Evas_Object *icon, const char *text, int state)
-{
- retif(icon == NULL, QP_FAIL, "invalid parameter");
- retif(text == NULL, QP_FAIL, "invalid parameter");
-
- __escaped_text_set(icon, "icon.text", text);
-
-#ifdef QP_SCREENREADER_ENABLE
- char buf[256] = {0,};
- Evas_Object *ao = NULL;
-
- ao = quickpanel_accessibility_screen_reader_object_get(icon,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", icon);
- if (ao != NULL) {
- elm_access_info_set(ao, ELM_ACCESS_TYPE, _NOT_LOCALIZED("Button"));
- strncpy(buf, text, sizeof(buf) - 1);
- quickpanel_common_util_char_replace(buf, '\n', ' ');
- elm_access_info_set(ao, ELM_ACCESS_INFO, buf);
- }
-
- ao = quickpanel_accessibility_screen_reader_object_get(icon,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", icon);
- if (ao != NULL) {
- if (state == ICON_VIEW_STATE_ON) {
- elm_access_info_set(ao, ELM_ACCESS_STATE, _NOT_LOCALIZED("On"));
- } else if (state == ICON_VIEW_STATE_DIM) {
- elm_access_info_set(ao, ELM_ACCESS_STATE, _NOT_LOCALIZED("Turned off"));
- } else if (state == ICON_VIEW_STATE_OFF) {
- elm_access_info_set(ao, ELM_ACCESS_STATE, _NOT_LOCALIZED("Off"));
- }
- }
-#endif
-
- return QP_OK;
-}
-
-HAPI void quickpanel_setting_icon_access_text_set(Evas_Object *icon, const char *text)
-{
-#ifdef QP_SCREENREADER_ENABLE
- char buf[256] = {0,};
- Evas_Object *ao = NULL;
-#endif
-
- retif(icon == NULL, , "invalid parameter");
- retif(text == NULL, , "invalid parameter");
-
-#ifdef QP_SCREENREADER_ENABLE
- ao = quickpanel_accessibility_screen_reader_object_get(icon,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", icon);
- if (ao != NULL) {
- elm_access_info_set(ao, ELM_ACCESS_TYPE, _NOT_LOCALIZED("Button"));
- strncpy(buf, text, sizeof(buf) - 1);
- quickpanel_common_util_char_replace(buf, '\n', ' ');
- elm_access_info_set(ao, ELM_ACCESS_INFO, buf);
- }
-#endif
-}
-
-HAPI Evas_Object *quickpanel_setting_icon_content_get(Evas_Object *icon)
-{
- retif(icon == NULL, NULL, "invalid parameter");
-
- struct appdata *ad = (struct appdata*)quickpanel_get_app_data();
- retif(ad == NULL, NULL, "application data is NULL");
-
- return elm_object_part_content_get(icon, "icon.swallow.wvga");
-}
-
-HAPI int quickpanel_setting_icon_content_set(Evas_Object *icon, Evas_Object *content)
-{
- retif(icon == NULL, QP_FAIL, "invalid parameter");
- retif(content == NULL, QP_FAIL, "invalid parameter");
-
- struct appdata *ad = (struct appdata*)quickpanel_get_app_data();
- retif(ad == NULL, QP_FAIL, "application data is NULL");
-
- elm_object_part_content_set(icon, "icon.swallow.wvga", content);
-
- return QP_OK;
-}
-
-HAPI int quickpanel_setting_icon_state_set(Evas_Object *icon, int state)
-{
-#ifdef QP_SCREENREADER_ENABLE
- Evas_Object *ao = NULL;
-#endif
- retif(icon == NULL, -1, "invalid parameter");
- SERR("icon:%p state:%d", icon, state);
-
-#ifdef QP_SCREENREADER_ENABLE
- ao = quickpanel_accessibility_screen_reader_object_get(icon,
- SCREEN_READER_OBJ_TYPE_ELM_OBJECT, "focus", icon);
- if (ao != NULL) {
- if (state == ICON_VIEW_STATE_ON) {
- elm_access_info_set(ao, ELM_ACCESS_STATE, _NOT_LOCALIZED("On"));
- } else if (state == ICON_VIEW_STATE_DIM) {
- elm_access_info_set(ao, ELM_ACCESS_STATE, _NOT_LOCALIZED("Turned off"));
- } else if (state == ICON_VIEW_STATE_OFF) {
- elm_access_info_set(ao, ELM_ACCESS_STATE, _NOT_LOCALIZED("Off"));
- }
- }
-#endif
-
- if (state == ICON_VIEW_STATE_ON) {
- elm_object_signal_emit(icon, "icon.on", "quickpanl.prog");
- } else if (state == ICON_VIEW_STATE_DIM) {
- elm_object_signal_emit(icon, "icon.dim", "quickpanl.prog");
- } else {
- elm_object_signal_emit(icon, "icon.off", "quickpanl.prog");
- }
-
- edje_object_message_signal_process(_EDJ(icon));
-
- return 0;
-}
-
-HAPI int quickpanel_setting_icon_state_progress_set(Evas_Object *icon)
-{
- retif(icon == NULL, -1, "invalid parameter");
-
- elm_object_signal_emit(icon, "icon.progress", "quickpanl.prog");
- edje_object_message_signal_process(_EDJ(icon));
-
- return 0;
-}
-
-HAPI Evas_Object *quickpanel_setting_icon_new(Evas_Object *parent)
-{
- const char *signal = NULL;
- Evas_Object *icon = NULL;
- retif(parent == NULL, NULL, "invalid parameter");
-
- struct appdata *ad = quickpanel_get_app_data();
- retif(ad == NULL, EINA_FALSE, "invalid data.");
-
- icon = elm_layout_add(parent);
- retif(!icon, NULL, "fail to add layout");
-
- elm_layout_file_set(icon, DEFAULT_EDJ, "quickpanel/setting_icon_wvga");
-
- evas_object_size_hint_weight_set(icon,
- EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
- elm_object_signal_emit(icon, "icon.off", "quickpanl.prog");
-
- Evas_Object *focus = quickpanel_accessibility_ui_get_focus_object(icon);
- elm_object_part_content_set(icon, "focus", focus);
-
- if (ad->angle == 0 || ad->angle == 180) {
- signal = "icon.portrait";
- } else {
- signal = "icon.landscape";
- }
-
- elm_object_signal_emit(icon, signal, "quickpanl.prog");
- edje_object_message_signal_process(_EDJ(icon));
-
- return icon;
-}
-
-HAPI Evas_Object *quickpanel_setting_icon_image_new(Evas_Object *parent, const char *img_path)
-{
- Evas_Object *content = NULL;
- retif(parent == NULL, NULL, "invalid parameter");
- retif(img_path == NULL, NULL, "invalid parameter");
-
- content = elm_image_add(parent);
- retif(content == NULL, NULL, "failed to create image");
-
- if (!elm_image_file_set(content, DEFAULT_EDJ, img_path)) {
- ERR("fail to set file[%s]", img_path);
- evas_object_del(content);
- content = NULL;
- return NULL;
- }
-
- return content;
-}
-
-HAPI static Evas_Object *quickpanel_setting_container_get(Evas_Object *base)
-{
- Evas_Object *container = NULL;
- retif(base == NULL, NULL, "invalid parameter");
-
- container = elm_object_part_content_get(base, QP_SETTING_BASE_PART);
-
- return container;
-}
-
-HAPI Evas_Object *quickpanel_setting_scroller_get(Evas_Object *base)
-{
- Evas_Object *container = NULL;
- Evas_Object *scroller = NULL;
- retif(base == NULL, NULL, "invalid parameter");
-
- struct appdata *ad = (struct appdata*)quickpanel_get_app_data();
- retif(ad == NULL, NULL, "application data is NULL");
-
- container = quickpanel_setting_container_get(base);
-
- scroller = elm_object_part_content_get(container, QP_SETTING_SCROLLER_PART_WVGA);
-
- retif(scroller == NULL, NULL, "invalid parameter");
-
- return scroller;
-}
-
-HAPI Evas_Object *quickpanel_setting_box_get_from_scroller(Evas_Object *base)
-{
- Evas_Object *scroller = NULL;
- Evas_Object *box = NULL;
- retif(base == NULL, NULL, "invalid parameter");
-
- scroller = quickpanel_setting_scroller_get(base);
- retif(scroller == NULL, NULL, "invalid parameter");
-
- box = elm_object_content_get(scroller);
-
- return box;
-}
-
-
-HAPI Evas_Object *quickpanel_setting_box_get(Evas_Object *base)
-{
- Evas_Object *container = NULL;
- Evas_Object *box = NULL;
- retif(base == NULL, NULL, "invalid parameter");
-
- container = quickpanel_setting_container_get(base);
- retif(container == NULL, NULL, "invalid parameter");
- box = elm_object_part_content_get(container, QP_SETTING_SCROLLER_PART_WVGA);
-
- return box;
-}
-
-
-HAPI int quickpanel_setting_container_rotation_set(Evas_Object *base, int angle)
-{
- Evas_Object *container = NULL;
- const char *signal = NULL;
-
- retif(!base, -1, "base is NULL");
- retif(angle < 0, -1, "angle is %d", angle);
-
- container = quickpanel_setting_container_get(base);
- retif(!container, -1, "box is NULL");
-
- if (angle % 180 == 0) {
- signal = "portrait";
- } else {
- signal = "landscape";
- }
-
- elm_object_signal_emit(container, signal, "background");
- edje_object_message_signal_process(_EDJ(container));
-
- return 0;
-}
-
-HAPI int quickpanel_setting_icons_rotation_set(Evas_Object *base, int angle)
-{
- Evas_Object *box = NULL;
- Evas_Object *icon = NULL;
- Eina_List *icons = NULL;
- Eina_List *l = NULL;
- const char *signal = NULL;
-
- retif(!base, -1, "base is NULL");
- retif(angle < 0, -1, "angle is %d", angle);
-
- box = quickpanel_setting_box_get(base);
- retif(!box, -1, "box is NULL");
-
- icons = elm_box_children_get(box);
- retif(!icons, -1, "icons list is NULL");
-
- if (angle % 180 == 0) {
- signal = "icon.portrait";
- } else {
- signal = "icon.landscape";
- }
-
- EINA_LIST_FOREACH(icons, l, icon) {
- elm_object_signal_emit(icon, signal, "quickpanl.prog");
- edje_object_message_signal_process(_EDJ(icon));
- }
-
- eina_list_free(icons);
-
- return 0;
-}
-
-HAPI void quickpanel_setting_icons_emit_sig(Evas_Object *icon, const char *signal)
-{
- retif(!icon, , "icon is NULL");
- retif(!signal, , "icon is NULL");
-
- elm_object_signal_emit(icon, signal, "quickpanl.prog");
- edje_object_message_signal_process(_EDJ(icon));
-}
-
-HAPI int quickpanel_setting_icons_dragging_set(Evas_Object *icon, int is_on)
-{
- const char *signal = NULL;
- retif(!icon, QP_FAIL, "icon is NULL");
-
- if (is_on == 1) {
- signal = "dragging.on";
- } else {
- signal = "dragging.off";
- }
-
- elm_object_signal_emit(icon, signal, "quickpanl.prog");
- edje_object_message_signal_process(_EDJ(icon));
-
- return QP_OK;
-}
-
-HAPI int quickpanel_setting_icons_screen_mode_set(Evas_Object *icon, int screen_mode)
-{
- const char *signal = NULL;
- retif(!icon, QP_FAIL, "icon is NULL");
-
- if (screen_mode == 0) {
- signal = "icon.portrait";
- } else {
- signal = "icon.landscape";
- }
-
- elm_object_signal_emit(icon, signal, "quickpanl.prog");
- edje_object_message_signal_process(_EDJ(icon));
-
- return QP_OK;
-}
-
-HAPI int quickpanel_setting_icon_pack(Evas_Object *box, Evas_Object *icon, int is_attach_divider)
-{
- retif(box == NULL, QP_FAIL, "box is NULL");
-
- elm_box_pack_end(box, icon);
-
- return QP_OK;
-}
-
-HAPI void quickpanel_setting_icon_unpack_all(Evas_Object *box)
-{
- Eina_List *l;
- Eina_List *l_next;
- Evas_Object *node = NULL;
- Eina_List *list = NULL;
- retif(box == NULL, , "invalid parameter");
-
- list = elm_box_children_get(box);
- retif(list == NULL, , "empty list");
-
- elm_box_unpack_all(box);
-
- EINA_LIST_FOREACH_SAFE(list, l, l_next, node) {
- if (node != NULL) {
- if (evas_object_data_get(node, E_DATA_DIVIDER_MAGIC) == (void *)DIVIDER_MAGIC) {
- evas_object_del(node);
- node = NULL;
- }
- }
- }
-
- eina_list_free(list);
-}
-
-HAPI int quickpanel_setting_scroll_page_get(void *data)
-{
- int page_h = 0x99;
- struct appdata *ad = NULL;
- retif(data == NULL, QP_FAIL, "Invalid parameter!");
-
- ad = data;
- retif(!ad->ly, QP_FAIL, "layout is NULL!");
-
- Evas_Object *scroller = quickpanel_setting_scroller_get(ad->ly);
- elm_scroller_current_page_get(scroller, &page_h, NULL);
-
- return page_h;
-}
-
-HAPI int quickpanel_setting_set_scroll_page_width(void *data)
-{
- struct appdata *ad = NULL;
- retif(data == NULL, QP_FAIL, "Invalid parameter!");
-
- ad = data;
- retif(!ad->ly, QP_FAIL, "layout is NULL!");
-
- Evas_Object *scroller = quickpanel_setting_scroller_get(ad->ly);
-
- int w, h;
- Ecore_X_Screen *screen = ecore_x_default_screen_get();
- ecore_x_screen_size_get(screen, &w, &h);
-
- elm_scroller_page_size_set(scroller, w / QP_SETTING_NUM_PORTRAIT_ICONS, 0);
-
- return 0;
-}
-
-HAPI int quickpanel_setting_start(Evas_Object *base)
-{
- Evas_Object *scroller = NULL;
- retif(base == NULL, QP_FAIL, "Invalid parameter!");
-
- scroller = quickpanel_setting_scroller_get(base);
- retif(scroller == NULL, QP_FAIL, "Invalid parameter!");
-
- elm_scroller_page_bring_in(scroller, 0, 0);
-
- return QP_OK;
-}
-
-HAPI int quickpanel_setting_stop(Evas_Object *base, int is_bring_in)
-{
- int page = QP_SETTING_INITIAL_PAGE_NUM;
- Evas_Object *scroller = NULL;
- retif(base == NULL, QP_FAIL, "Invalid parameter!");
-
- scroller = quickpanel_setting_scroller_get(base);
- retif(scroller == NULL, QP_FAIL, "Invalid parameter!");
-
- if (is_bring_in == 1) {
- elm_scroller_page_bring_in(scroller, page, 0);
- } else {
- elm_scroller_page_show(scroller, page, 0);
- }
-
- return QP_OK;
-}
-
-HAPI int quickpanel_setting_layout_set(Evas_Object *base, Evas_Object *setting)
-{
- retif(base == NULL, QP_FAIL, "Invalid parameter!");
- retif(setting == NULL, QP_FAIL, "Invalid parameter!");
-
- elm_object_part_content_set(base, QP_SETTING_BASE_PART, setting);
-
- return 0;
-}
-
-HAPI Evas_Object *quickpanel_setting_layout_get(Evas_Object *base, const char *setting_part)
-{
- retif(base == NULL, NULL, "Invalid parameter!");
- retif(setting_part == NULL, NULL, "Invalid parameter!");
-
- return elm_object_part_content_get(base, setting_part);
-}
-
-HAPI int quickpanel_setting_layout_remove(Evas_Object *base)
-{
- Evas_Object *container = NULL;
- Evas_Object *scroller = NULL;
- Evas_Object *box = NULL;
- retif(base == NULL, QP_FAIL, "Invalid parameter!");
-
- container = quickpanel_setting_container_get(base);
- scroller = quickpanel_setting_scroller_get(base);
- box = quickpanel_setting_box_get(base);
-
- if (box) {
- elm_box_clear(box);
- evas_object_del(box);
- box = NULL;
- }
- if (scroller) {
- evas_object_del(scroller);
- scroller = NULL;
- }
- if (container) {
- evas_object_del(container);
- container = NULL;
- }
-
- return QP_OK;
-}
-
-HAPI void quickpanel_setting_create_confirm_popup(
- Evas_Object *parent,
- char *title,
- char *text,
- Evas_Smart_Cb func)
-{
- Evas_Object *popup = elm_popup_add(parent);
- Evas_Object *btn = NULL;
-
- if (popup == NULL) {
- return;
- }
-
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
-
- if (title) {
- elm_object_part_text_set(popup, "title,text", title);
- }
-
- if (text) {
- elm_object_text_set(popup, text);
- }
-
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, _("IDS_ST_SK_OK"));
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", func, popup);
-
- evas_object_show(popup);
- quickpanel_common_ui_set_current_popup(popup, func);
-}
-
-HAPI void quickpanel_setting_create_2button_confirm_popup(
- Evas_Object *parent,
- char *title,
- char *text,
- char *btn1_text,
- Evas_Smart_Cb btn1_func,
- char *btn2_text,
- Evas_Smart_Cb btn2_func)
-{
- Evas_Object *popup = elm_popup_add(parent);
- Evas_Object *btn = NULL;
-
- if (popup == NULL) {
- return;
- }
-
- evas_object_size_hint_weight_set(popup, EVAS_HINT_EXPAND,
- EVAS_HINT_EXPAND);
-
- if (title) {
- elm_object_part_text_set(popup, "title,text", title);
- }
-
- if (text) {
- elm_object_text_set(popup, text);
- }
-
- if (btn1_func != NULL && btn1_text != NULL) {
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, btn1_text);
- elm_object_part_content_set(popup, "button1", btn);
- evas_object_smart_callback_add(btn, "clicked", btn1_func, popup);
- }
- if (btn2_func != NULL && btn2_text != NULL) {
- btn = elm_button_add(popup);
- elm_object_style_set(btn, "popup");
- elm_object_text_set(btn, btn2_text);
- elm_object_part_content_set(popup, "button2", btn);
- evas_object_smart_callback_add(btn, "clicked", btn2_func, popup);
- }
-
- evas_object_show(popup);
- quickpanel_common_ui_set_current_popup(popup, btn1_func);
-}
-
-HAPI void
-quickpanel_setting_create_timeout_popup(Evas_Object *parent, char *msg)
-{
- retif(msg == NULL, , "invalid parameter");
-
- notification_status_message_post(msg);
-}
return ECORE_CALLBACK_CANCEL;
}
-static void _icon_mouse_move_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
-{
- int down_x = 0;
- retif(obj == NULL, , "invalid argument");
-
- quickpanel_page_get_touched_pos(&down_x, NULL);
-
- if (s_info.down_x - down_x > 15 || s_info.down_x - down_x < -15) {
- if (s_info.timer_longpress != NULL) {
- ecore_timer_del(s_info.timer_longpress);
- s_info.timer_longpress = NULL;
- }
- }
-}
-
static void _icon_mouse_up_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
{
retif(obj == NULL, , "invalid argument");
s_info.timer_longpress = NULL;
s_info.is_longpressed = EINA_FALSE;
}
-
- evas_object_event_callback_del(obj, EVAS_CALLBACK_MOUSE_MOVE,
- _icon_mouse_move_cb);
}
static void _icon_mouse_down_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
s_info.is_longpressed = EINA_FALSE;
s_info.timer_longpress = ecore_timer_add(TAP_AND_DELAY_LONG,_icon_handler_longpress, obj);
-
- evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_MOVE,
- _icon_mouse_move_cb, NULL);
}
#ifdef QP_SCREENREADER_ENABLE
+++ /dev/null
-org.tizen.quickpanel systemd r----- ------
-org.tizen.quickpanel systemd r----- ------
-org.tizen.quickpanel syslogd -w---- ------
-org.tizen.quickpanel syslogd -w---- ------
-org.tizen.quickpanel system::use_internet r----- ------
-org.tizen.quickpanel secure-storage-client rw---- ------
-org.tizen.quickpanel secure-storage rw---- ------
-org.tizen.quickpanel secure-storage::tethering rw---- ------
-org.tizen.quickpanel tethering::dbus-access rw---- ------
-org.tizen.quickpanel mdm-server rwx--- ------
-org.tizen.quickpanel xorg rw---- ------
-org.tizen.quickpanel device::bklight rw---- ------
-org.tizen.quickpanel org.tizen.indicator rwx--- ------
-org.tizen.quickpanel crash-popup r-x--- ------
-org.tizen.quickpanel system-server rwx--- ------
-org.tizen.quickpanel immvibed rw---- ------
-org.tizen.quickpanel display_wd r-x--- ------
-org.tizen.quickpanel sound_server rwxa-- ------
-org.tizen.quickpanel dbus rwx--- ------
-org.tizen.quickpanel e17 rwx--- ------
-org.tizen.quickpanel e17::notification rwx--- ------
-org.tizen.quickpanel svi-data r-x--- ------
-org.tizen.quickpanel org.tizen.oma-dm r-x--- ------
-org.tizen.quickpanel isf rwx--- ------
-org.tizen.quickpanel media-server r-x--- ------
-org.tizen.quickpanel deviced rwx--- ------
-org.tizen.quickpanel deviced::display rw---- ------
-org.tizen.quickpanel deviced::led rw---- ------
-org.tizen.quickpanel deviced::haptic rw---- ------
-org.tizen.quickpanel csc-feature r----- ------
-org.tizen.quickpanel notification::db rw---- ------
-org.tizen.quickpanel data-provider-master rw---- ------
-org.tizen.quickpanel data-provider-master::notification rw---- ------
-org.tizen.quickpanel data-provider-master::notification.client rw---- ------
-org.tizen.quickpanel data-provider-master::badge rw---- ------
-org.tizen.quickpanel data-provider-master::badge.client -w---- ------
-org.tizen.quickpanel data-provider-master::badge.manager -w---- ------
-org.tizen.quickpanel org.tizen.setting::default-resources r-x--- ------
-org.tizen.quickpanel org.tizen.ready-to-share::state rw---- ------
-org.tizen.quickpanel oma-ds-agent::cfg r----- ------
-org.tizen.quickpanel oma-ds-agent::svc rw---- ------
-org.tizen.quickpanel nfc-manager rwx--- ------
-org.tizen.quickpanel tts-server r-x--- ------
-org.tizen.quickpanel pkgmgr::db rw---l ------
-org.tizen.quickpanel pkgmgr-client r-x--- ------
-org.tizen.quickpanel bt-service rw---- ------
-org.tizen.quickpanel bt-service::admin rw---- ------
-org.tizen.quickpanel bt-service::public r----- ------
-org.tizen.quickpanel bt-service::platform -w---- ------
-org.tizen.quickpanel syspopup::db rwx--- ------
-org.tizen.quickpanel connman rw---- ------
-org.tizen.quickpanel connman::set rw---- ------
-org.tizen.quickpanel connman::get rw---- ------
-org.tizen.quickpanel net-config rw---- ------
-org.tizen.quickpanel ug-setting-mobileap-efl r----l ------
-org.tizen.quickpanel aul::launch --x--- ------
-org.tizen.quickpanel alarm-manager::alarm rw---- ------
-org.tizen.quickpanel alarm-server::alarm -w---- ------
-org.tizen.quickpanel drmfw rw---- ------
-org.tizen.quickpanel app-svc --x--- ------
-org.tizen.quickpanel app-svc::db rw---l ------
-org.tizen.quickpanel trm -w---- ------
-org.tizen.quickpanel network::set rw---- ------
-org.tizen.quickpanel network::get rw---- ------
-org.tizen.quickpanel telephony_framework::api_ps_public rw---- ------
-org.tizen.quickpanel telephony_framework::api_call rw---- ------
-org.tizen.quickpanel telephony_framework::api_modem rw---- ------
-org.tizen.quickpanel telephony_framework::properties rw---- ------
-org.tizen.quickpanel telephony_framework::api_sim r----- ------
-org.tizen.quickpanel contacts-service::svc --x--- ------
-system org.tizen.quickpanel -w---- ------
-display_wd org.tizen.quickpanel -w---- ------
-dbus org.tizen.quickpanel rwx--- ------
-org.tizen.app-tray org.tizen.quickpanel r-x--- ------
-org.tizen.quickpanel system::homedir rwxat- ------
-org.tizen.quickpanel system::media rwxat- ------
-org.tizen.quickpanel system::share rwxat- ------
-org.tizen.quickpanel pulseaudio rwxat- ------
-e17 org.tizen.quickpanel -w---- ------
-org.tizen.quickpanel device::app_logging -w---- ------
-org.tizen.quickpanel sys-assert::core rwxat- ------
-org.tizen.quickpanel privacy-manager::db r----l ------
-org.tizen.quickpanel ecore::lock rwxat- ------
-org.tizen.quickpanel com.samsung.download-manager r-x--- ------
-org.tizen.quickpanel tizen::vconf::setting::admin rw---- ------
-org.tizen.quickpanel tizen::vconf::location::enable rw---l ------
-org.tizen.quickpanel tizen::vconf::tethering::admin r----l ------
-org.tizen.quickpanel tizen::vconf::platform::r rwx--l ------
-org.tizen.quickpanel tizen::vconf::platform::rw rwx--l ------
-org.tizen.quickpanel tizen::vconf::telephony::admin r----- ------
-org.tizen.quickpanel tizen::vconf::display r----l ------
-org.tizen.quickpanel vc-server rwx--- ------
-org.tizen.quickpanel tizen::vconf::public::admin r----l ------
-org.tizen.quickpanel notification r-x--- ------
-org.tizen.quickpanel org.tizen.volume rwx--- ------
-org.tizen.quickpanel security-server::api-permissions -w---- ------
+++ /dev/null
-[Unit]
-Description=Start the Quickpanel
-After=check-mount.service connman.service
-
-[Service]
-Type=simple
-User=app
-Group=app
-SmackProcessLabel=org.tizen.quickpanel
-EnvironmentFile=/run/tizen-mobile-env
-ExecStart=/usr/apps/org.tizen.quickpanel/bin/quickpanel
-Restart=always
-RestartSec=0
-KillSignal=SIGKILL
-OOMScoreAdjust=200
-
-[Install]
-WantedBy=multi-user.target
--- /dev/null
+<manifest>
+ <request>
+ <domain name="_" />
+ </request>
+ <assign>
+ <filesystem path="/usr/apps/org.tizen.quickpanel/bin/quickpanel" exec_label="User::App::org.tizen.quickpanel" />
+ </assign>
+</manifest>
+++ /dev/null
-<manifest>
- <request>
- <domain name="_" />
- </request>
- <assign>
- <filesystem path="/usr/apps/org.tizen.quickpanel/bin/quickpanel" exec_label="User::App::org.tizen.quickpanel" />
- </assign>
-</manifest>
Source0: %{name}-%{version}.tar.gz
Source102: quickpanel-system.service
Source104: quickpanel-system.path
-
-%if %{with wayland}
-Source103: org.tizen.quickpanel.manifest.3.0
-%else
-Source103: org.tizen.quickpanel.manifest.2.4
-%endif
+Source103: org.tizen.quickpanel.manifest
%if "%{?profile}" == "wearable"
ExcludeArch: %{arm} %ix86 x86_64
BuildRequires: pkgconfig(iniparser)
BuildRequires: pkgconfig(capi-appfw-package-manager)
BuildRequires: pkgconfig(alarm-service)
-%if %{with wayland}
BuildRequires: pkgconfig(ecore-wayland)
-%else
-BuildRequires: pkgconfig(inputproto)
-BuildRequires: pkgconfig(xi)
-BuildRequires: pkgconfig(utilX)
-BuildRequires: pkgconfig(ecore-x)
-BuildRequires: pkgconfig(libprivilege-control)
-%endif
BuildRequires: pkgconfig(voice-control-setting)
BuildRequires: pkgconfig(tzsh-quickpanel-service)
BuildRequires: gettext-tools
LDFLAGS+="-Wl,--rpath=%{name}/lib -Wl,--as-needed";
export LDFLAGS
-
-%if %{with wayland}
export WINSYS="wayland"
export WAYLAND_SUPPORT=On
export X11_SUPPORT=Off
-%else
-export WAYLAND_SUPPORT=Off
-export X11_SUPPORT=On
-export WINSYS="x11"
-%endif
+
%cmake . -DPKGNAME=%{name} -DWINSYS=${WINSYS}
make %{?jobs:-j%jobs}
%{__usrdir}/quickpanel.service
%{__usrdir}/quickpanel.path
%{_prefix}/share/license/%{name}
-%if %{with wayland}
-# Do not install the SMACK Rule file for Tizen 3.x
-%else
-%{_sysconfdir}/smack/accesses.d/%{name}.efl
-%endif