summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wl2/ecore_wl2_window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_window.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 71c74f3..9793833 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -264,7 +264,11 @@ _xdg_toplevel_cb_close(void *data, struct xdg_toplevel *xdg_toplevel EINA_UNUSED
264 264
265 win = data; 265 win = data;
266 if (!win) return; 266 if (!win) return;
267 267 if (win->cb_close)
268 {
269 win->cb_close(win->cb_close_data, win);
270 win->cb_close = NULL;
271 }
268 ecore_wl2_window_free(win); 272 ecore_wl2_window_free(win);
269} 273}
270 274
@@ -568,6 +572,14 @@ ecore_wl2_window_new(Ecore_Wl2_Display *display, Ecore_Wl2_Window *parent, int x
568 return win; 572 return win;
569} 573}
570 574
575EAPI void
576ecore_wl2_window_close_callback_set(Ecore_Wl2_Window *window, void (*cb) (void *data, Ecore_Wl2_Window *win), void *data)
577{
578 EINA_SAFETY_ON_NULL_RETURN(window);
579 window->cb_close = cb;
580 window->cb_close_data = data;
581}
582
571EAPI struct wl_surface * 583EAPI struct wl_surface *
572ecore_wl2_window_surface_get(Ecore_Wl2_Window *window) 584ecore_wl2_window_surface_get(Ecore_Wl2_Window *window)
573{ 585{