*/
EAPI Eina_Bool ecore_evas_extn_plug_connect(Evas_Object *obj, const char *svcname, int svcnum, Eina_Bool svcsys);
+// TIZEN_ONLY(20160120): support visibility_change event
+/**
+ * @brief Query if the ecore evas is obscured or unobscured.
+ *
+ * @param ee The Ecore_Evas
+ * @return EINA_TRUE if the ecore evas is obscured, EINA_FALSE unobscured.
+ * @warning Support for this depends on the underlying windowing system.
+ *
+ * @since 1.16
+ */
+EAPI Eina_Bool ecore_evas_obscured_get(const Ecore_Evas *ee);
+//
+
/**
* @brief Retrieves the coordinates of the default mouse pointer.
*
IFE;
ee->func.fn_device_mouse_in = func;
}
+
+// TIZEN_ONLY(20160120): support visibility_change event
+EAPI Eina_Bool
+ecore_evas_obscured_get(const Ecore_Evas *ee)
+{
+ if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+ {
+ ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+ "ecore_evas_obscured_get");
+ return -1;
+ }
+ return ee->prop.obscured ? EINA_TRUE : EINA_FALSE;
+}
+//
Eina_Bool demand_attention : 1;
Eina_Bool focus_skip : 1;
Eina_Bool focused : 1;
+ Eina_Bool obscured : 1; // TIZEN_ONLY(20160120): support visibility_change event
} prop;
struct {
Eina_Bool shown : 1;
Eina_Bool stack_base : 1;
Eina_Bool paused : 1;
+
+ // TIZEN_ONLY(20160120): support visibility_change event
+ Eina_Bool obscured : 1;
+ //
};
struct _Input_Pointer_Iterator
static const char SIG_EFFECT_STARTED[] = "effect,started";
static const char SIG_EFFECT_DONE[] = "effect,done";
//
+// TIZEN_ONLY(20160120): support visibility_change event
+static const char SIG_VISIBILITY_CHANGED[] = "visibility,changed";
+//
static const Evas_Smart_Cb_Description _smart_callbacks[] = {
{SIG_DELETE_REQUEST, ""},
{SIG_WIDGET_UNFOCUSED, ""}, /**< handled by elm_widget */
{SIG_EFFECT_STARTED, ""},
{SIG_EFFECT_DONE, ""},
+ {SIG_VISIBILITY_CHANGED, ""},
{NULL, NULL}
};
Eina_Bool ch_maximized = EINA_FALSE;
Eina_Bool ch_profile = EINA_FALSE;
Eina_Bool ch_wm_rotation = EINA_FALSE;
+ Eina_Bool ch_visibility = EINA_FALSE;
const char *profile;
if (!sd) return;
}
}
+ // TIZEN_ONLY(20160120): support visibility_change event
+ if (sd->obscured != ecore_evas_obscured_get(sd->ee))
+ {
+ sd->obscured = ecore_evas_obscured_get(sd->ee);
+ ch_visibility = EINA_TRUE;
+ }
+ //
+
_elm_win_state_eval_queue();
if ((ch_withdrawn) || (ch_iconified))
(obj, EFL_UI_WIN_EVENT_ROTATION_CHANGED, NULL);
efl_event_callback_legacy_call
(obj, EFL_UI_WIN_EVENT_WM_ROTATION_CHANGED, NULL);
- if (_elm_config->atspi_mode)
- {
- Evas_Coord x = 0, y = 0, width = 0, height = 0;
- elm_win_screen_size_get(obj, &x, &y, &width, &height);
- if ((sd->rot == 0) || (sd->rot == 180))
- {
- efl_access_bounds_changed_signal_emit(obj, x, y, width, height);
- }
- else
- {
- efl_access_bounds_changed_signal_emit(obj, x, y, height, width);
- }
- }
}
+
+ // TIZEN_ONLY(20160120): support visibility_change event
+ if (ch_visibility)
+ evas_object_smart_callback_call(obj, SIG_VISIBILITY_CHANGED, (void*)!sd->obscured);
+ //
}
EOLIAN static Eina_Bool
* @li "theme,changed" - The theme was changed. (since 1.13)
* @li "effect,started" - window effect has been started.
* @li "effect,done" - window effect has been done.
+ * @li "visibility,changed" - visibility of the window has been changed.
*
* Note that calling evas_object_show() after window contents creation is
* recommended. It will trigger evas_smart_objects_calculate() and some backend
//
+// TIZEN_ONLY(20160120): support visibility_change event
+static Eina_Bool
+_ecore_evas_wl_common_cb_window_visibility_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
+{
+ Ecore_Evas *ee;
+ Ecore_Wl2_Event_Window_Visibility_Change *ev;
+
+ ev = event;
+ ee = ecore_event_window_match(ev->win);
+
+ if (!ee) return ECORE_CALLBACK_PASS_ON;
+ if (ev->win != ee->prop.window) return ECORE_CALLBACK_PASS_ON;
+
+ if (ee->prop.obscured == ev->fully_obscured)
+ return ECORE_CALLBACK_PASS_ON;
+
+ ee->prop.obscured = ev->fully_obscured;
+ _ecore_evas_wl_common_state_update(ee);
+ return ECORE_CALLBACK_PASS_ON;
+
+}
+//
+
static int
_ecore_evas_wl_common_init(void)
{
ecore_event_handler_add(ECORE_WL2_EVENT_TIZEN_DEVICE_DEL,
_ecore_evas_wl_common_cb_tizen_device_del, NULL);
//
+ // TIZEN_ONLY(20160120): support visibility_change event
+ _ecore_evas_wl_event_hdls[20] =
+ ecore_event_handler_add(ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE,
+ _ecore_evas_wl_common_cb_window_visibility_change, NULL);
+ //
ecore_event_evas_init();
ee->prop.request_pos = EINA_FALSE;
ee->prop.sticky = EINA_FALSE;
ee->prop.withdrawn = EINA_TRUE;
+ ee->prop.obscured = EINA_TRUE; // TIZEN_ONLY(20160120): support visibility_change event
ee->alpha = EINA_FALSE;
/* Wayland egl engine can't async render */