devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5c6376fa29933353df9ca68940b57e4e0ec0c7f9

commit 5c6376fa29933353df9ca68940b57e4e0ec0c7f9
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Wed Sep 9 12:27:23 2015 -0400

    ecore-wl2: Add API function to resize a window
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/ecore_wl2/Ecore_Wl2.h        | 12 ++++++++++++
 src/lib/ecore_wl2/ecore_wl2_window.c | 23 +++++++++++++++++++++++
 2 files changed, 35 insertions(+)

diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 16743c1..69309d9 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -294,6 +294,18 @@ EAPI void ecore_wl2_window_free(Ecore_Wl2_Window *window);
  */
 EAPI void ecore_wl2_window_move(Ecore_Wl2_Window *window, int x, int y);
 
+/**
+ * Resize a given Ecore_Wl2_Window
+ *
+ * @param window The Ecore_Wl2_Window which to resize
+ * @param w Desired width of window
+ * @param h Desired height of window
+ * @param location The edge of the window from where the resize should start
+ *
+ * @ingroup Ecore_Wl2_Window_Group
+ */
+EAPI void ecore_wl2_window_resize(Ecore_Wl2_Window *window, int w, int h, int 
location);
+
 /* # ifdef __cplusplus */
 /* } */
 /* # endif */
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c 
b/src/lib/ecore_wl2/ecore_wl2_window.c
index 9b6cd13..82629c8 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -321,3 +321,26 @@ ecore_wl2_window_move(Ecore_Wl2_Window *window, int x, int 
y)
    /*   wl_shell_surface_move(window->wl_shell_surface, seat, */
    /*                         window->display->serial); */
 }
+
+EAPI void
+ecore_wl2_window_resize(Ecore_Wl2_Window *window, int w, int h, int location)
+{
+   EINA_SAFETY_ON_NULL_RETURN(window);
+
+   /* test for no-op resize */
+   if ((window->geometry.w == w) && (window->geometry.h == h))
+     return;
+
+   window->geometry.w = w;
+   window->geometry.h = h;
+
+   /* TODO: input grab release ? */
+
+   /* TODO: enable once input is done */
+   /* if (window->xdg_surface) */
+   /*   xdg_surface_resize(window->xdg_surface, seat, */
+   /*                      window->display->serial, location); */
+   /* else if (window->wl_shell_surface) */
+   /*   wl_shell_surface_resize(window->wl_shell_surface, seat, */
+   /*                           window->display->serial, location); */
+}

-- 


Reply via email to