From b5e27a51b4220cdbe2e05fe1ba2e261b4f5d4948 Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Tue, 10 Sep 2019 14:11:45 +0900 Subject: [PATCH] e_desk: add E_EVENT_DESK_ZOOM_SET/UNSET event Change-Id: Ic20c5de6011a4377af57d37e8bd6aadb550b4fce --- src/bin/e_desk.c | 22 +++++++++++++++++----- src/bin/e_desk.h | 4 ++++ 2 files changed, 21 insertions(+), 5 deletions(-) diff --git a/src/bin/e_desk.c b/src/bin/e_desk.c index 20d69d09f2..172eeb14eb 100644 --- a/src/bin/e_desk.c +++ b/src/bin/e_desk.c @@ -60,6 +60,9 @@ E_API int E_EVENT_DESK_DESKSHOW = 0; E_API int E_EVENT_DESK_NAME_CHANGE = 0; E_API int E_EVENT_DESK_WINDOW_PROFILE_CHANGE = 0; E_API int E_EVENT_DESK_GEOMETRY_CHANGE = 0; +E_API int E_EVENT_DESK_ZOOM_SET = 0; +E_API int E_EVENT_DESK_ZOOM_UNSET = 0; + static void _e_desk_event_simple_free(void *d EINA_UNUSED, E_Event_Desk *event) @@ -94,6 +97,9 @@ e_desk_init(void) E_EVENT_DESK_NAME_CHANGE = ecore_event_type_new(); E_EVENT_DESK_WINDOW_PROFILE_CHANGE = ecore_event_type_new(); E_EVENT_DESK_GEOMETRY_CHANGE = ecore_event_type_new(); + E_EVENT_DESK_ZOOM_SET = ecore_event_type_new(); + E_EVENT_DESK_ZOOM_UNSET = ecore_event_type_new(); + return 1; } @@ -906,14 +912,14 @@ e_desk_zoom_set(E_Desk *desk, double zoomx, double zoomy, int cx, int cy) if (!eout) { ERR("e_desk_zoom_set: fail get eout"); - return; + goto end; } if (!e_output_zoom_set(eout, zoomx, zoomy, cx, cy)) ERR("e_desk_zoom_set: fail zoom set"); else DBG("e_desk_zoom_set: zoomx:%f, zoomy:%f, x:%d, y:%d", zoomx, zoomy, cx, cy); - return; + goto end; } } @@ -946,6 +952,9 @@ e_desk_zoom_set(E_Desk *desk, double zoomx, double zoomy, int cx, int cy) _e_desk_util_comp_hwc_disable_set(EINA_TRUE); } } + +end: + _e_desk_event_simple_add(desk, E_EVENT_DESK_ZOOM_SET); } E_API Eina_Bool @@ -1011,13 +1020,13 @@ e_desk_zoom_unset(E_Desk *desk) if (!eout) { ERR("e_desk_zoom_unset: fail get eout"); - return; + goto end; } e_output_zoom_unset(eout); DBG("e_desk_zoom_unset"); - return; + goto end; } } @@ -1026,7 +1035,7 @@ e_desk_zoom_unset(E_Desk *desk) E_DESK_SMART_DATA_GET_OR_RETURN(desk->smart_obj, sd); if (!sd->zoom.enabled) - return; + goto end; sd->zoom.ratio_x = 1.0; sd->zoom.ratio_y = 1.0; @@ -1049,6 +1058,9 @@ e_desk_zoom_unset(E_Desk *desk) /* FIXME TEMP enable hwc */ _e_desk_util_comp_hwc_disable_set(EINA_FALSE); } + +end: + _e_desk_event_simple_add(desk, E_EVENT_DESK_ZOOM_UNSET); } E_API void diff --git a/src/bin/e_desk.h b/src/bin/e_desk.h index 13aa9c0a4f..05e500915a 100644 --- a/src/bin/e_desk.h +++ b/src/bin/e_desk.h @@ -8,6 +8,8 @@ typedef struct _E_Event_Desk E_Event_Desk_Before_Show; typedef struct _E_Event_Desk E_Event_Desk_After_Show; typedef struct _E_Event_Desk E_Event_Desk_Name_Change; typedef struct _E_Event_Desk E_Event_Desk_Window_Profile_Change; +typedef struct _E_Event_Desk E_Event_Desk_Zoom_Set; +typedef struct _E_Event_Desk E_Event_Desk_Zoom_Unset; typedef struct _E_Event_Desk_Geometry_Change E_Event_Desk_Geometry_Change; typedef void (*E_Desk_Flip_Cb)(void *data, E_Desk *desk, int dx, int dy, Eina_Bool show); @@ -109,6 +111,8 @@ extern E_API int E_EVENT_DESK_DESKSHOW; extern E_API int E_EVENT_DESK_NAME_CHANGE; extern E_API int E_EVENT_DESK_WINDOW_PROFILE_CHANGE; extern E_API int E_EVENT_DESK_GEOMETRY_CHANGE; +extern E_API int E_EVENT_DESK_ZOOM_SET; +extern E_API int E_EVENT_DESK_ZOOM_UNSET; #endif #endif -- 2.34.1