summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-05 23:54:57 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-03-02 13:55:57 -0800
commit070430d51a9e6d7f44f239d5e83ba9fa42b529c7 (patch)
treeea1902b0744ddc6f474c3c0f21f412b97890537c /src/lib/ecore_cocoa
parent3eee82de31b4d77c2f7363948943cc7869bf7c65 (diff)
ecore_cocoa: implement and const-correct window size max getter
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/lib/ecore_cocoa')
-rw-r--r--src/lib/ecore_cocoa/Ecore_Cocoa.h6
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_window.m12
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 f3cbf7c6b8..220cf2e818 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,
220 unsigned int max_width, 220 unsigned int max_width,
221 unsigned int max_height); 221 unsigned int max_height);
222 222
223EAPI void ecore_cocoa_window_size_max_get(Ecore_Cocoa_Window *window, 223EAPI void ecore_cocoa_window_size_max_get(const Ecore_Cocoa_Window *window,
224 unsigned int *max_width, 224 unsigned int *max_width,
225 unsigned int *max_height); 225 unsigned int *max_height);
226 226
227EAPI void ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window, 227EAPI void ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window,
228 unsigned int step_width, 228 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 e6a5fc5f67..2da957bf13 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,
372} 372}
373 373
374EAPI void 374EAPI void
375ecore_cocoa_window_size_max_get(const Ecore_Cocoa_Window *window,
376 unsigned int *max_width,
377 unsigned int *max_height)
378{
379 EINA_SAFETY_ON_NULL_RETURN(window);
380
381 const NSSize size = window->window.contentMaxSize;
382 if (max_width) *max_width = size.width;
383 if (max_height) *max_height = size.height;
384}
385
386EAPI void
375ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window, 387ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window,
376 unsigned int w, 388 unsigned int w,
377 unsigned int h) 389 unsigned int h)