summaryrefslogtreecommitdiff
path: root/src/lib/ecore_cocoa
diff options
context:
space:
mode:
authorJean Guyomarc'h <jean.guyomarch@gmail.com>2016-01-05 23:58:04 +0100
committerCedric BAIL <cedric@osg.samsung.com>2016-03-02 13:56:01 -0800
commitf85667c3fcd79916628243640dea3ec8c07773e4 (patch)
treed47c9e8e4d4833550c197b3aa977ed124d65228a /src/lib/ecore_cocoa
parent070430d51a9e6d7f44f239d5e83ba9fa42b529c7 (diff)
ecore_cocoa: implement and const-correct window size step 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 220cf2e818..bee13926bc 100644
--- a/src/lib/ecore_cocoa/Ecore_Cocoa.h
+++ b/src/lib/ecore_cocoa/Ecore_Cocoa.h
@@ -228,9 +228,9 @@ EAPI void ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window,
228 unsigned int step_width, 228 unsigned int step_width,
229 unsigned int step_height); 229 unsigned int step_height);
230 230
231EAPI void ecore_cocoa_window_size_step_get(Ecore_Cocoa_Window *window, 231EAPI void ecore_cocoa_window_size_step_get(const Ecore_Cocoa_Window *window,
232 unsigned int *step_width, 232 unsigned int *step_width,
233 unsigned int *step_height); 233 unsigned int *step_height);
234 234
235EAPI void ecore_cocoa_window_show(Ecore_Cocoa_Window *window); 235EAPI void ecore_cocoa_window_show(Ecore_Cocoa_Window *window);
236 236
diff --git a/src/lib/ecore_cocoa/ecore_cocoa_window.m b/src/lib/ecore_cocoa/ecore_cocoa_window.m
index 2da957bf13..ae985e46bc 100644
--- a/src/lib/ecore_cocoa/ecore_cocoa_window.m
+++ b/src/lib/ecore_cocoa/ecore_cocoa_window.m
@@ -394,6 +394,18 @@ ecore_cocoa_window_size_step_set(Ecore_Cocoa_Window *window,
394} 394}
395 395
396EAPI void 396EAPI void
397ecore_cocoa_window_size_step_get(const Ecore_Cocoa_Window *window,
398 unsigned int *step_width,
399 unsigned int *step_height)
400{
401 EINA_SAFETY_ON_NULL_RETURN(window);
402
403 const NSSize size = window->window.contentResizeIncrements;
404 if (step_width) *step_width = size.width;
405 if (step_height) *step_height = size.height;
406}
407
408EAPI void
397ecore_cocoa_window_move(Ecore_Cocoa_Window *window, 409ecore_cocoa_window_move(Ecore_Cocoa_Window *window,
398 int x, 410 int x,
399 int y) 411 int y)