summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-05 23:45:50 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-03-02 13:55:43 -0800
commit24a7209b51442acd23eb47c1cc0598bd6f85389c (patch)
treec5062a22ec20ba4da046f535116511cf57200539 /src/lib/ecore_cocoa
parent8992c2aeae4f77271a72c99a3f10199ac44ac663 (diff)
ecore_cocoa: implement and const-correct window geometry 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.h10
-rw-r--r--src/lib/ecore_cocoa/ecore_cocoa_window.m16
2 files changed, 21 insertions, 5 deletions
diff --git a/src/lib/ecore_cocoa/Ecore_Cocoa.h b/src/lib/ecore_cocoa/Ecore_Cocoa.h
index 58b7e6880c..cad972d6e4 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -198,11 +198,11 @@ EAPI void ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window,
198 int width, 198 int width,
199 int height); 199 int height);
200 200
201EAPI void ecore_cocoa_window_geometry_get(Ecore_Cocoa_Window *window, 201EAPI void ecore_cocoa_window_geometry_get(const Ecore_Cocoa_Window *window,
202 int *x, 202 int *x,
203 int *y, 203 int *y,
204 int *width, 204 int *w,
205 int *height); 205 int *h);
206 206
207EAPI void ecore_cocoa_window_size_get(Ecore_Cocoa_Window *window, 207EAPI void ecore_cocoa_window_size_get(Ecore_Cocoa_Window *window,
208 int *width, 208 int *width,
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 32b37511d4..61bbacb03f 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -403,6 +403,22 @@ ecore_cocoa_window_resize(Ecore_Cocoa_Window *window,
403} 403}
404 404
405EAPI void 405EAPI void
406ecore_cocoa_window_geometry_get(const Ecore_Cocoa_Window *window,
407 int *x,
408 int *y,
409 int *w,
410 int *h)
411{
412 EINA_SAFETY_ON_NULL_RETURN(window);
413
414 const NSRect frame = window->window.frame;
415 if (x) *x = frame.origin.x;
416 if (y) *y = frame.origin.y;
417 if (w) *w = frame.size.width;
418 if (h) *h = frame.size.height;
419}
420
421EAPI void
406ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window, 422ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window,
407 int x, 423 int x,
408 int y, 424 int y,