cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3eee82de31b4d77c2f7363948943cc7869bf7c65

commit 3eee82de31b4d77c2f7363948943cc7869bf7c65
Author: Jean Guyomarc'h <jean.guyoma...@gmail.com>
Date:   Tue Jan 5 23:50:52 2016 +0100

    ecore_cocoa: implement and const-correct window min size getter
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/lib/ecore_cocoa/Ecore_Cocoa.h        |  6 +++---
 src/lib/ecore_cocoa/ecore_cocoa_window.m | 12 ++++++++++++
 2 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h 
b/src/lib/ecore_cocoa/Ecore_Cocoa.h
index 7b499ac..f3cbf7c 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -212,9 +212,9 @@ EAPI void 
ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window,
                                           unsigned int        min_width,
                                           unsigned int        min_height);
 
-EAPI void ecore_cocoa_window_size_min_get(Ecore_Cocoa_Window *window,
-                                          unsigned int       *min_width,
-                                          unsigned int       *min_height);
+EAPI void ecore_cocoa_window_size_min_get(const Ecore_Cocoa_Window *window,
+                                          unsigned int             *min_width,
+                                          unsigned int             
*min_height);
 
 EAPI void ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window,
                                           unsigned int        max_width,
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m 
b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 4fcd8b5..e6a5fc5 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -350,6 +350,18 @@ ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window,
 }
 
 EAPI void
+ecore_cocoa_window_size_min_get(const Ecore_Cocoa_Window *window,
+                                unsigned int             *min_width,
+                                unsigned int             *min_height)
+{
+   EINA_SAFETY_ON_NULL_RETURN(window);
+
+   const NSSize size = window->window.contentMinSize;
+   if (min_width) *min_width = size.width;
+   if (min_height) *min_height = size.height;
+}
+
+EAPI void
 ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window,
                                 unsigned int w,
                                 unsigned int h)

-- 


Reply via email to