From: Doyoun Kang <doyoun.kang@samsung.com>

Subject: [E-devel] [patch] Add APIs for floating mode

I added APIs for supporting the floating mode -
elm_win_floating_mode_set, elm_win_floating_mode_get. 
The floating mode will be used on mobile environment. For example, if
the video-player window set the floating mode, then e (enlightenment
window manager) changes it's geometry and handles it like a popup.
Please check these APIs and give an advice for me.



SVN revision: 76667
This commit is contained in:
Doyoun Kang 2012-09-14 13:06:57 +00:00 committed by Carsten Haitzler
parent 968ec61137
commit 2e8cbfe9b4
4 changed files with 66 additions and 0 deletions

View File

@ -502,3 +502,11 @@
- elm_layout_text_get
- elm_layout_text_set
- elm_layout_theme_set
2012-09-14 Doyoun Kang
* Add APIs for floating mode
- elm_win_floating_mode_set
- elm_win_floating_mode_get

View File

@ -5,6 +5,7 @@ Additions:
* Add ELM_INPUT_PANEL_RETURN_KEY_TYPE_SIGNIN.
* Add elementary_codegen
* Add window floating mode api's
Improvements:

View File

@ -144,6 +144,7 @@ struct _Elm_Win_Smart_Data
Eina_Bool fullscreen : 1;
Eina_Bool maximized : 1;
Eina_Bool skip_focus : 1;
Eina_Bool floating : 1;
};
static const char SIG_DELETE_REQUEST[] = "delete,request";
@ -4035,3 +4036,35 @@ elm_win_trap_set(const Elm_Win_Trap *t)
trap = t;
return EINA_TRUE;
}
EAPI void
elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating)
{
ELM_WIN_CHECK(obj);
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
if (floating == sd->floating) return;
sd->floating = floating;
#ifdef HAVE_ELEMENTARY_X
_elm_win_xwindow_get(sd);
if (sd->x.xwin)
{
if (sd->floating)
ecore_x_e_illume_window_state_set
(sd->x.xwin, ECORE_X_ILLUME_WINDOW_STATE_FLOATING);
else
ecore_x_e_illume_window_state_set
(sd->x.xwin, ECORE_X_ILLUME_WINDOW_STATE_NORMAL);
}
#endif
}
EAPI Eina_Bool
elm_win_floating_mode_get(const Evas_Object *obj)
{
ELM_WIN_CHECK(obj) EINA_FALSE;
ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
return sd->floating;
}

View File

@ -1480,6 +1480,30 @@ struct _Elm_Win_Trap
*/
EAPI Eina_Bool elm_win_trap_set(const Elm_Win_Trap *trap);
/**
* Set the floating mode of a window.
*
* @param obj The window object
* @param floating If true, the window is floating mode
*
* @ingroup Win
* @see elm_win_floating_mode_get()
* @since 1.8
*/
EAPI void elm_win_floating_mode_set(Evas_Object *obj, Eina_Bool floating);
/**
* Get the floating mode of a window.
*
* @param obj The window object
* @return If true, the window is floating mode
*
* @ingroup Win
* @see elm_win_floating_mode_set()
* @since 1.8
*/
EAPI Eina_Bool elm_win_floating_mode_get(const Evas_Object *obj);
/**
* @}
*/