/**
* @internal
*
+ * Set a callback to be called after the window's visibility is changed
+ *
+ * @param window The window to listen to for a tizen visibility cb notify callback
+ * @param cb The callback function to call being passed data, window and visibility
+ * @param data The Data pointer to pass as data to the callback
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ * @since_tizen 7.0
+ */
+EAPI void ecore_wl2_window_visibility_callback_set(Ecore_Wl2_Window *window, void (*cb) (void *data, Ecore_Wl2_Window *win, Eina_Bool visibility), void *data);
+
+/**
+ * @internal
+ *
* Get the wl_surface which belongs to this window
*
* @param window The Ecore_Wl2_Window to get the surface of
void *cb_rot_changed_data;
//
+ void (*cb_visibility) (void *data, Ecore_Wl2_Window *win, Eina_Bool visibility);
+ void *cb_visibility_data;
+
// TIZEN_ONLY(20171207): add functions to set client's custom cursors
struct
{
else
ev->fully_obscured = 0;
- ecore_event_add(ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE, ev, NULL, NULL);
+ if (win->cb_visibility) win->cb_visibility(win->cb_visibility_data, win, !ev->fully_obscured);
+ else ecore_event_add(ECORE_WL2_EVENT_WINDOW_VISIBILITY_CHANGE, ev, NULL, NULL);
}
static void
window->cb_close_data = data;
}
+EAPI void
+ecore_wl2_window_visibility_callback_set(Ecore_Wl2_Window *window, void (*cb) (void *data, Ecore_Wl2_Window *win, Eina_Bool visibility), void *data)
+{
+ EINA_SAFETY_ON_NULL_RETURN(window);
+ window->cb_visibility = cb;
+ window->cb_visibility_data = data;
+}
+
EAPI struct wl_surface *
ecore_wl2_window_surface_get(Ecore_Wl2_Window *window)
{