forked from enlightenment/efl
ecore_cocoa: implement and const-correct window geometry getter
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
8992c2aeae
commit
24a7209b51
|
@ -198,11 +198,11 @@ EAPI void ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window,
|
||||||
int width,
|
int width,
|
||||||
int height);
|
int height);
|
||||||
|
|
||||||
EAPI void ecore_cocoa_window_geometry_get(Ecore_Cocoa_Window *window,
|
EAPI void ecore_cocoa_window_geometry_get(const Ecore_Cocoa_Window *window,
|
||||||
int *x,
|
int *x,
|
||||||
int *y,
|
int *y,
|
||||||
int *width,
|
int *w,
|
||||||
int *height);
|
int *h);
|
||||||
|
|
||||||
EAPI void ecore_cocoa_window_size_get(Ecore_Cocoa_Window *window,
|
EAPI void ecore_cocoa_window_size_get(Ecore_Cocoa_Window *window,
|
||||||
int *width,
|
int *width,
|
||||||
|
|
|
@ -402,6 +402,22 @@ ecore_cocoa_window_resize(Ecore_Cocoa_Window *window,
|
||||||
[window->window setFrame:win_frame display:YES];
|
[window->window setFrame:win_frame display:YES];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_cocoa_window_geometry_get(const Ecore_Cocoa_Window *window,
|
||||||
|
int *x,
|
||||||
|
int *y,
|
||||||
|
int *w,
|
||||||
|
int *h)
|
||||||
|
{
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN(window);
|
||||||
|
|
||||||
|
const NSRect frame = window->window.frame;
|
||||||
|
if (x) *x = frame.origin.x;
|
||||||
|
if (y) *y = frame.origin.y;
|
||||||
|
if (w) *w = frame.size.width;
|
||||||
|
if (h) *h = frame.size.height;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window,
|
ecore_cocoa_window_move_resize(Ecore_Cocoa_Window *window,
|
||||||
int x,
|
int x,
|
||||||
|
|
Loading…
Reference in New Issue