summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-05 23:47:30 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-03-02 13:55:49 -0800
commit5deb157770ea2e5fc422725a263c5a73e4fb4d93 (patch)
tree63fb39d89fbaf07a386b846b0a0de5958cc93ee7 /src/lib/ecore_cocoa
parent24a7209b51442acd23eb47c1cc0598bd6f85389c (diff)
ecore_cocoa: implement and const-correct window 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 cad972d6e4..7b499acff2 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -204,9 +204,9 @@ EAPI void ecore_cocoa_window_geometry_get(const Ecore_Cocoa_Window *window,
204 int *w, 204 int *w,
205 int *h); 205 int *h);
206 206
207EAPI void ecore_cocoa_window_size_get(Ecore_Cocoa_Window *window, 207EAPI void ecore_cocoa_window_size_get(const Ecore_Cocoa_Window *window,
208 int *width, 208 int *w,
209 int *height); 209 int *h);
210 210
211EAPI void ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window, 211EAPI void ecore_cocoa_window_size_min_set(Ecore_Cocoa_Window *window,
212 unsigned int min_width, 212 unsigned int min_width,
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 61bbacb03f..4fcd8b517e 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -419,6 +419,18 @@ ecore_cocoa_window_geometry_get(const Ecore_Cocoa_Window *window,
419} 419}
420 420
421EAPI void 421EAPI void
422ecore_cocoa_window_size_get(const Ecore_Cocoa_Window *window,
423 int *w,
424 int *h)
425{
426 EINA_SAFETY_ON_NULL_RETURN(window);
427
428 const NSSize size = window->window.frame.size;
429 if (w) *w = size.width;
430 if (h) *h = size.height;
431}
432
433EAPI void
422ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window, 434ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window,
423 int x, 435 int x,
424 int y, 436 int y,