cedric pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=070430d51a9e6d7f44f239d5e83ba9fa42b529c7
commit 070430d51a9e6d7f44f239d5e83ba9fa42b529c7 Author: Jean Guyomarc'h <jean.guyoma...@gmail.com> Date: Tue Jan 5 23:54:57 2016 +0100 ecore_cocoa: implement and const-correct window size max 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 f3cbf7c..220cf2e 100644 --- a/src/lib/ecore_cocoa/Ecore_Cocoa.h +++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h @@ -220,9 +220,9 @@ EAPI void ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window, unsigned int max_width, unsigned int max_height); -EAPI void ecore_cocoa_window_size_max_get(Ecore_Cocoa_Window *window, - unsigned int *max_width, - unsigned int *max_height); +EAPI void ecore_cocoa_window_size_max_get(const Ecore_Cocoa_Window *window, + unsigned int *max_width, + unsigned int *max_height); EAPI void ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window, unsigned int step_width, diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m index e6a5fc5..2da957b 100644 --- a/src/lib/ecore_cocoa/ecore_cocoa_window.m +++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m @@ -372,6 +372,18 @@ ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window, } EAPI void +ecore_cocoa_window_size_max_get(const Ecore_Cocoa_Window *window, + unsigned int *max_width, + unsigned int *max_height) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + + const NSSize size = window->window.contentMaxSize; + if (max_width) *max_width = size.width; + if (max_height) *max_height = size.height; +} + +EAPI void ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window, unsigned int w, unsigned int h) --