forked from enlightenment/efl
ecore_cocoa: add missing window state functions
implement missing window state functions: * raise * lower * activate * iconified_set * withdrawn_set * move Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
parent
ca3bd69485
commit
59532c7d96
|
@ -145,6 +145,8 @@ EAPI void ecore_cocoa_window_raise(Ecore_Cocoa_Window *window);
|
|||
|
||||
EAPI void ecore_cocoa_window_lower(Ecore_Cocoa_Window *window);
|
||||
|
||||
EAPI void ecore_cocoa_window_activate(Ecore_Cocoa_Window *window);
|
||||
|
||||
EAPI void ecore_cocoa_window_title_set(Ecore_Cocoa_Window *window,
|
||||
const char *title);
|
||||
|
||||
|
|
|
@ -410,6 +410,46 @@ ecore_cocoa_window_hide(Ecore_Cocoa_Window *window)
|
|||
[window->window orderOut:NSApp];
|
||||
}
|
||||
|
||||
void ecore_cocoa_window_raise(Ecore_Cocoa_Window *window)
|
||||
{
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
[window->window orderFront:nil];
|
||||
}
|
||||
|
||||
void ecore_cocoa_window_lower(Ecore_Cocoa_Window *window)
|
||||
{
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
[window->window orderBack:nil];
|
||||
}
|
||||
|
||||
void ecore_cocoa_window_activate(Ecore_Cocoa_Window *window)
|
||||
{
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
[window->window makeKeyAndOrderFront:nil];
|
||||
}
|
||||
|
||||
void ecore_cocoa_window_iconified_set(Ecore_Cocoa_Window *window,
|
||||
int on)
|
||||
{
|
||||
if (!window)
|
||||
return;
|
||||
|
||||
if (on)
|
||||
{
|
||||
[window->window miniaturize:nil];
|
||||
}
|
||||
else
|
||||
{
|
||||
[window->window deminiaturize:nil];
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
ecore_cocoa_window_borderless_set(Ecore_Cocoa_Window *window,
|
||||
int on)
|
||||
|
|
|
@ -319,7 +319,14 @@ _ecore_evas_size_step_set(Ecore_Evas *ee, int w, int h)
|
|||
{
|
||||
ecore_cocoa_window_size_step_set((Ecore_Cocoa_Window *)ee->prop.window, w, h);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_ecore_evas_move(Ecore_Evas *ee, int x, int y)
|
||||
{
|
||||
DBG("Move");
|
||||
ecore_cocoa_window_move((Ecore_Cocoa_Window *)ee->prop.window, x, y);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_resize(Ecore_Evas *ee, int w, int h)
|
||||
{
|
||||
|
@ -389,6 +396,38 @@ _ecore_evas_hide(Ecore_Evas *ee)
|
|||
ee->should_be_visible = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_raise(Ecore_Evas *ee)
|
||||
{
|
||||
DBG("Raise");
|
||||
|
||||
ecore_cocoa_window_raise((Ecore_Cocoa_Window *)ee->prop.window);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_lower(Ecore_Evas *ee)
|
||||
{
|
||||
DBG("Lower");
|
||||
|
||||
ecore_cocoa_window_lower((Ecore_Cocoa_Window *)ee->prop.window);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_activate(Ecore_Evas *ee)
|
||||
{
|
||||
DBG("Activate");
|
||||
|
||||
ecore_cocoa_window_activate((Ecore_Cocoa_Window *)ee->prop.window);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_iconified_set(Ecore_Evas *ee, Eina_Bool on)
|
||||
{
|
||||
DBG("IconifiedSet");
|
||||
|
||||
ecore_cocoa_window_iconified_set((Ecore_Cocoa_Window *)ee->prop.window, on);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_title_set(Ecore_Evas *ee, const char *title)
|
||||
{
|
||||
|
@ -455,6 +494,15 @@ _ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int h
|
|||
evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL, _ecore_evas_object_cursor_del, ee);
|
||||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_withdrawn_set(Ecore_Evas *ee, Eina_Bool on)
|
||||
{
|
||||
if (on)
|
||||
_ecore_evas_hide(ee);
|
||||
else
|
||||
_ecore_evas_show(ee);
|
||||
}
|
||||
|
||||
static int
|
||||
_ecore_evas_engine_cocoa_init(Ecore_Evas *ee)
|
||||
{
|
||||
|
@ -518,6 +566,7 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
|
|||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
_ecore_evas_callback_delete_request_set,
|
||||
NULL,
|
||||
NULL,
|
||||
|
@ -528,8 +577,7 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
|
|||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, //move
|
||||
_ecore_evas_move, //move
|
||||
NULL,
|
||||
_ecore_evas_resize,
|
||||
_ecore_evas_move_resize,
|
||||
|
@ -537,9 +585,9 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
|
|||
NULL, //shaped
|
||||
_ecore_evas_show,
|
||||
_ecore_evas_hide,
|
||||
NULL, //raise
|
||||
NULL, //lower
|
||||
NULL, //activate
|
||||
_ecore_evas_raise,
|
||||
_ecore_evas_lower,
|
||||
_ecore_evas_activate,
|
||||
_ecore_evas_title_set,
|
||||
NULL,
|
||||
_ecore_evas_size_min_set,
|
||||
|
@ -550,13 +598,13 @@ static Ecore_Evas_Engine_Func _ecore_cocoa_engine_func =
|
|||
_ecore_evas_object_cursor_unset,
|
||||
NULL,
|
||||
NULL,
|
||||
_ecore_evas_iconified_set,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
_ecore_evas_withdrawn_set,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
|
|
Loading…
Reference in New Issue