summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-05 23:50:52 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-03-02 13:55:53 -0800
commit3eee82de31b4d77c2f7363948943cc7869bf7c65 (patch)
tree62cd729ec8b105dfd950643775513292beee2e1c /src/lib/ecore_cocoa
parent5deb157770ea2e5fc422725a263c5a73e4fb4d93 (diff)
ecore_cocoa: implement and const-correct window min size 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 7b499acff2..f3cbf7c6b8 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,
212 unsigned int min_width, 212 unsigned int min_width,
213 unsigned int min_height); 213 unsigned int min_height);
214 214
215EAPI void ecore_cocoa_window_size_min_get(Ecore_Cocoa_Window *window, 215EAPI void ecore_cocoa_window_size_min_get(const Ecore_Cocoa_Window *window,
216 unsigned int *min_width, 216 unsigned int *min_width,
217 unsigned int *min_height); 217 unsigned int *min_height);
218 218
219EAPI void ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window, 219EAPI void ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window,
220 unsigned int max_width, 220 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 4fcd8b517e..e6a5fc5f67 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,
350} 350}
351 351
352EAPI void 352EAPI void
353ecore_cocoa_window_size_min_get(const Ecore_Cocoa_Window *window,
354 unsigned int *min_width,
355 unsigned int *min_height)
356{
357 EINA_SAFETY_ON_NULL_RETURN(window);
358
359 const NSSize size = window->window.contentMinSize;
360 if (min_width) *min_width = size.width;
361 if (min_height) *min_height = size.height;
362}
363
364EAPI void
353ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window, 365ecore_cocoa_window_size_max_set(Ecore_Cocoa_Window *window,
354 unsigned int w, 366 unsigned int w,
355 unsigned int h) 367 unsigned int h)