elm_win: move quickpanel feature from eo to legacy

all quickpanel APIs were only supported in X.
quickpanel property can be managed by name property.
zone set canbe managed by aux_hint
minor, and major set are not used anymore
This commit is contained in:
Ji-Youn Park 2016-05-16 15:36:58 +08:30
parent d7c9790450
commit 0c2ad7ff10
3 changed files with 216 additions and 166 deletions

View File

@ -5236,125 +5236,6 @@ _elm_win_conformant_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
return EINA_FALSE;
}
EOLIAN static void
_elm_win_quickpanel_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool quickpanel)
{
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
{
ecore_x_e_illume_quickpanel_set(sd->x.xwin, quickpanel);
if (quickpanel)
{
Ecore_X_Window_State states[2];
states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
ecore_x_netwm_window_state_set(sd->x.xwin, states, 2);
ecore_x_icccm_hints_set(sd->x.xwin, 0, 0, 0, 0, 0, 0, 0);
}
}
#else
(void)sd;
(void)quickpanel;
#endif
}
EOLIAN static Eina_Bool
_elm_win_quickpanel_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_quickpanel_get(sd->x.xwin);
#else
(void)sd;
#endif
return EINA_FALSE;
}
EOLIAN static void
_elm_win_quickpanel_priority_major_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int priority)
{
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_priority_major_set(sd->x.xwin, priority);
#else
(void)sd;
(void)priority;
#endif
}
EOLIAN static int
_elm_win_quickpanel_priority_major_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_quickpanel_priority_major_get(sd->x.xwin);
#else
(void)sd;
#endif
return -1;
}
EOLIAN static void
_elm_win_quickpanel_priority_minor_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int priority)
{
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_priority_minor_set(sd->x.xwin, priority);
#else
(void)sd;
(void)priority;
#endif
}
EOLIAN static int
_elm_win_quickpanel_priority_minor_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_quickpanel_priority_minor_get(sd->x.xwin);
#else
(void)sd;
#endif
return -1;
}
EOLIAN static void
_elm_win_quickpanel_zone_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, int zone)
{
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_zone_set(sd->x.xwin, zone);
#else
(void)sd;
(void)zone;
#endif
}
EOLIAN static int
_elm_win_quickpanel_zone_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
{
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_quickpanel_zone_get(sd->x.xwin);
#else
(void)sd;
#endif
return 0;
}
EOLIAN static void
_elm_win_prop_focus_skip_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Eina_Bool skip)
{
@ -5974,4 +5855,147 @@ elm_win_lower(Evas_Object *obj)
TRAP(sd, lower);
}
EAPI void
elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel)
{
ELM_WIN_CHECK(obj);
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
{
ecore_x_e_illume_quickpanel_set(sd->x.xwin, quickpanel);
if (quickpanel)
{
Ecore_X_Window_State states[2];
states[0] = ECORE_X_WINDOW_STATE_SKIP_TASKBAR;
states[1] = ECORE_X_WINDOW_STATE_SKIP_PAGER;
ecore_x_netwm_window_state_set(sd->x.xwin, states, 2);
ecore_x_icccm_hints_set(sd->x.xwin, 0, 0, 0, 0, 0, 0, 0);
}
}
#else
(void)sd;
(void)quickpanel;
#endif
}
EAPI Eina_Bool
elm_win_quickpanel_get(const Evas_Object *obj)
{
ELM_WIN_CHECK(obj) EINA_FALSE;
ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_quickpanel_get(sd->x.xwin);
#else
(void)sd;
#endif
return EINA_FALSE;
}
EAPI void
elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority)
{
ELM_WIN_CHECK(obj);
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_priority_major_set(sd->x.xwin, priority);
#else
(void)sd;
(void)priority;
#endif
}
EAPI int
elm_win_quickpanel_priority_major_get(const Evas_Object *obj)
{
ELM_WIN_CHECK(obj) EINA_FALSE;
ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, -1);
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_quickpanel_priority_major_get(sd->x.xwin);
#else
(void)sd;
#endif
return -1;
}
EAPI void
elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority)
{
ELM_WIN_CHECK(obj);
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_priority_minor_set(sd->x.xwin, priority);
#else
(void)sd;
(void)priority;
#endif
}
EAPI int
elm_win_quickpanel_priority_minor_get(const Evas_Object *obj)
{
ELM_WIN_CHECK(obj) EINA_FALSE;
ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, -1);
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_quickpanel_priority_minor_get(sd->x.xwin);
#else
(void)sd;
#endif
return -1;
}
EAPI void
elm_win_quickpanel_zone_set(Evas_Object *obj, int zone)
{
ELM_WIN_CHECK(obj);
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
ecore_x_e_illume_quickpanel_zone_set(sd->x.xwin, zone);
#else
(void)sd;
(void)zone;
#endif
}
EAPI int
elm_win_quickpanel_zone_get(const Evas_Object *obj)
{
ELM_WIN_CHECK(obj) EINA_FALSE;
ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, 0);
#ifdef HAVE_ELEMENTARY_X
_internal_elm_win_xwindow_get(sd);
if (sd->x.xwin)
return ecore_x_e_illume_quickpanel_zone_get(sd->x.xwin);
#else
(void)sd;
#endif
return 0;
}
#include "elm_win.eo.c"

View File

@ -270,17 +270,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
return: bool;
}
}
@property quickpanel_zone {
set {
[[Set which zone this quickpanel should appear in.]]
}
get {
[[Get which zone this quickpanel should appear in.]]
}
values {
zone: int; [[The requested zone for this quickpanel.]]
}
}
@property maximized {
set {
[[Set the maximized state of a window.]]
@ -569,17 +558,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
}
}
}
@property quickpanel_priority_minor {
set {
[[Set the minor priority of a quickpanel window.]]
}
get {
[[Get the minor priority of a quickpanel window.]]
}
values {
priority: int(-1); [[The minor priority for this quickpanel.]]
}
}
@property sticky {
set {
[[Set the sticky state of the window.
@ -635,17 +613,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
otherwise it is width divided by height.]]
}
}
@property quickpanel_priority_major {
set {
[[Set the major priority of a quickpanel window.]]
}
get {
[[Get the major priority of a quickpanel window.]]
}
values {
priority: int(-1); [[The major priority for this quickpanel or -1.]]
}
}
@property indicator_opacity {
set {
[[Sets the indicator opacity mode of the window.]]
@ -833,20 +800,6 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
h: int; [[The base height.]]
}
}
@property quickpanel {
set {
[[Set a window to be an illume quickpanel window.
By default window objects are not quickpanel windows.
]]
}
get {
[[Get if this window is a quickpanel or not.]]
}
values {
quickpanel: bool; [[The quickpanel flag.]]
}
}
@property rotation_with_resize {
set {
[[Rotates the window and resizes it.

View File

@ -390,3 +390,76 @@ EAPI Eina_Bool elm_win_override_get(const Evas_Object *obj);
* @ingroup Elm_Win
*/
EAPI void elm_win_lower(Evas_Object *obj);
/**
* @brief Set a window to be an illume quickpanel window.
*
* By default window objects are not quickpanel windows.
*
* @param[in] quickpanel The quickpanel flag.
*
* @ingroup Elm_Win
*/
EAPI void elm_win_quickpanel_set(Evas_Object *obj, Eina_Bool quickpanel);
/**
* @brief Get if this window is a quickpanel or not.
*
* @return The quickpanel flag.
*
* @ingroup Elm_Win
*/
EAPI Eina_Bool elm_win_quickpanel_get(const Evas_Object *obj);
/**
* @brief Set which zone this quickpanel should appear in.
*
* @param[in] zone The requested zone for this quickpanel.
*
* @ingroup Elm_Win
*/
EAPI void elm_win_quickpanel_zone_set(Evas_Object *obj, int zone);
/**
* @brief Get which zone this quickpanel should appear in.
*
* @return The requested zone for this quickpanel.
*
* @ingroup Elm_Win
*/
EAPI int elm_win_quickpanel_zone_get(const Evas_Object *obj);
/**
* @brief Set the major priority of a quickpanel window.
*
* @param[in] priority The major priority for this quickpanel or -1.
*
* @ingroup Elm_Win
*/
EAPI void elm_win_quickpanel_priority_major_set(Evas_Object *obj, int priority);
/**
* @brief Get the major priority of a quickpanel window.
*
* @return The major priority for this quickpanel or -1.
*
* @ingroup Elm_Win
*/
EAPI int elm_win_quickpanel_priority_major_get(const Evas_Object *obj);
/**
* @brief Set the minor priority of a quickpanel window.
*
* @param[in] priority The minor priority for this quickpanel.
*
* @ingroup Elm_Win
*/
EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority);
/**
* @brief Get the minor priority of a quickpanel window.
*
* @return The minor priority for this quickpanel.
*
* @ingroup Elm_Win
*/
EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj);