forked from enlightenment/efl
elm_win: add elm_win_indcator_type and elm_win_indicator_enabled into window's eo.
elm_window will be changed to control layout related with conformant. remove opacity and overlap mode and add type set.
This commit is contained in:
parent
4bdb1f73b8
commit
0c6b0efaee
|
@ -5116,76 +5116,32 @@ _elm_win_keyboard_win_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
_elm_win_indicator_mode_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Indicator_Mode mode)
|
_elm_win_indicator_enabled_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED, Eina_Bool enable EINA_UNUSED)
|
||||||
{
|
|
||||||
if (mode == sd->indmode) return;
|
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
|
||||||
_internal_elm_win_xwindow_get(sd);
|
|
||||||
#endif
|
|
||||||
sd->indmode = mode;
|
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
|
||||||
if (sd->x.xwin)
|
|
||||||
{
|
|
||||||
if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
|
|
||||||
ecore_x_e_illume_indicator_state_set
|
|
||||||
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
|
|
||||||
else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
|
|
||||||
ecore_x_e_illume_indicator_state_set
|
|
||||||
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
eo_event_callback_call
|
|
||||||
(obj, ELM_WIN_EVENT_INDICATOR_PROP_CHANGED, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static Elm_Win_Indicator_Mode
|
|
||||||
_elm_win_indicator_mode_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
|
|
||||||
{
|
|
||||||
return sd->indmode;
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static void
|
|
||||||
_elm_win_indicator_opacity_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Indicator_Opacity_Mode mode)
|
|
||||||
{
|
|
||||||
if (mode == sd->ind_o_mode) return;
|
|
||||||
sd->ind_o_mode = mode;
|
|
||||||
#ifdef HAVE_ELEMENTARY_X
|
|
||||||
_internal_elm_win_xwindow_get(sd);
|
|
||||||
if (sd->x.xwin)
|
|
||||||
{
|
|
||||||
if (sd->ind_o_mode == ELM_WIN_INDICATOR_OPAQUE)
|
|
||||||
ecore_x_e_illume_indicator_opacity_set
|
|
||||||
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_OPAQUE);
|
|
||||||
else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSLUCENT)
|
|
||||||
ecore_x_e_illume_indicator_opacity_set
|
|
||||||
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT);
|
|
||||||
else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT)
|
|
||||||
ecore_x_e_illume_indicator_opacity_set
|
|
||||||
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
eo_event_callback_call
|
|
||||||
(obj, ELM_WIN_EVENT_INDICATOR_PROP_CHANGED, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static Elm_Win_Indicator_Opacity_Mode
|
|
||||||
_elm_win_indicator_opacity_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
|
|
||||||
{
|
|
||||||
return sd->ind_o_mode;
|
|
||||||
}
|
|
||||||
|
|
||||||
EOLIAN static void
|
|
||||||
_elm_win_indicator_overlap_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED, Elm_Win_Indicator_Overlap_Mode mode EINA_UNUSED)
|
|
||||||
{
|
{
|
||||||
//TODO: this mode will be implemented after removing the conformant.
|
//TODO: this mode will be implemented after removing the conformant.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Elm_Win_Indicator_Overlap_Mode
|
EOLIAN static Eina_Bool
|
||||||
_elm_win_indicator_overlap_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
|
_elm_win_indicator_enabled_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
|
||||||
{
|
{
|
||||||
//TODO: this mode will be implemented after removing the conformant.
|
//TODO: this mode will be implemented after removing the conformant.
|
||||||
return ELM_WIN_INDICATOR_OVERLAP_UNKNOWN;
|
return EINA_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static void
|
||||||
|
_elm_win_indicator_type_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED, Elm_Win_Indicator_Type type EINA_UNUSED)
|
||||||
|
{
|
||||||
|
//TODO: this mode will be implemented after removing the conformant.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static Elm_Win_Indicator_Type
|
||||||
|
_elm_win_indicator_type_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
|
||||||
|
{
|
||||||
|
//TODO: this mode will be implemented after removing the conformant.
|
||||||
|
|
||||||
|
return ELM_WIN_INDICATOR_TYPE_UNKNOWN;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static void
|
EOLIAN static void
|
||||||
|
@ -6014,6 +5970,77 @@ elm_win_quickpanel_zone_get(const Evas_Object *obj)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode)
|
||||||
|
{
|
||||||
|
ELM_WIN_CHECK(obj);
|
||||||
|
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
|
||||||
|
|
||||||
|
if (mode == sd->indmode) return;
|
||||||
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
|
_internal_elm_win_xwindow_get(sd);
|
||||||
|
#endif
|
||||||
|
sd->indmode = mode;
|
||||||
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
|
if (sd->x.xwin)
|
||||||
|
{
|
||||||
|
if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
|
||||||
|
ecore_x_e_illume_indicator_state_set
|
||||||
|
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
|
||||||
|
else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
|
||||||
|
ecore_x_e_illume_indicator_state_set
|
||||||
|
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
eo_event_callback_call
|
||||||
|
(obj, ELM_WIN_EVENT_INDICATOR_PROP_CHANGED, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Elm_Win_Indicator_Mode
|
||||||
|
elm_win_indicator_mode_get(const Evas_Object *obj)
|
||||||
|
{
|
||||||
|
ELM_WIN_CHECK(obj) EINA_FALSE;
|
||||||
|
ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, ELM_WIN_INDICATOR_UNKNOWN);
|
||||||
|
|
||||||
|
return sd->indmode;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode)
|
||||||
|
{
|
||||||
|
ELM_WIN_CHECK(obj);
|
||||||
|
ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
|
||||||
|
|
||||||
|
if (mode == sd->ind_o_mode) return;
|
||||||
|
sd->ind_o_mode = mode;
|
||||||
|
#ifdef HAVE_ELEMENTARY_X
|
||||||
|
_internal_elm_win_xwindow_get(sd);
|
||||||
|
if (sd->x.xwin)
|
||||||
|
{
|
||||||
|
if (sd->ind_o_mode == ELM_WIN_INDICATOR_OPAQUE)
|
||||||
|
ecore_x_e_illume_indicator_opacity_set
|
||||||
|
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_OPAQUE);
|
||||||
|
else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSLUCENT)
|
||||||
|
ecore_x_e_illume_indicator_opacity_set
|
||||||
|
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT);
|
||||||
|
else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT)
|
||||||
|
ecore_x_e_illume_indicator_opacity_set
|
||||||
|
(sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
eo_event_callback_call
|
||||||
|
(obj, ELM_WIN_EVENT_INDICATOR_PROP_CHANGED, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Elm_Win_Indicator_Opacity_Mode
|
||||||
|
elm_win_indicator_opacity_get(const Evas_Object *obj)
|
||||||
|
{
|
||||||
|
ELM_WIN_CHECK(obj) EINA_FALSE;
|
||||||
|
ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, ELM_WIN_INDICATOR_OPACITY_UNKNOWN);
|
||||||
|
|
||||||
|
return sd->ind_o_mode;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef EFL_TEAMWORK_VERSION
|
#ifndef EFL_TEAMWORK_VERSION
|
||||||
# define EFL_TEAMWORK_VERSION 2
|
# define EFL_TEAMWORK_VERSION 2
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -97,48 +97,20 @@ enum Elm.Win.Keyboard_Mode
|
||||||
j2me [[J2ME keyboard layout]]
|
j2me [[J2ME keyboard layout]]
|
||||||
}
|
}
|
||||||
|
|
||||||
enum Elm.Win.Indicator_Mode
|
enum Elm.Win.Indicator_Type
|
||||||
{
|
{
|
||||||
[[In some environments, like phones, you may have an indicator that
|
[[Defines the type indicator that can be shown]]
|
||||||
shows battery status, reception, time etc. This is the indicator.
|
|
||||||
|
|
||||||
Sometimes you don't want it because you provide the same functionality
|
|
||||||
inside your app, so this will request that the indicator is hidden in
|
|
||||||
this circumstance. The default is depend on the environments.
|
|
||||||
For example, like phones, default is to have the indicator shown.
|
|
||||||
But like TV, default is to have the indicator hidden.
|
|
||||||
]]
|
|
||||||
|
|
||||||
legacy: elm_win_indicator;
|
legacy: elm_win_indicator;
|
||||||
|
|
||||||
unknown, [[Unknown indicator state]]
|
type_unknown, [[Unknown indicator type]]
|
||||||
hide, [[Hides the indicator]]
|
bg_opaque, [[The icon of indicator is opaque, the background of indicator is also opaque.
|
||||||
show [[Shows the indicator]]
|
The content of window is located the end of indicator.
|
||||||
}
|
The area of indicator and window content are not overlapped]]
|
||||||
|
bg_transparent, [[The icon of indicator is opaque, but the background is transparent.
|
||||||
enum Elm.Win.Indicator_Opacity_Mode
|
The content of window is located under the indicator in Z-order.
|
||||||
{
|
The area of indicator and window content are overlapped]]
|
||||||
[[Defines the opacity modes of indicator that can be shown]]
|
hidden [[The indicator is hidden, So user can see only the content of window like the video mode.
|
||||||
legacy: elm_win_indicator;
|
If user flicks the upper side of window, the incator is shown temporarily.]]
|
||||||
|
|
||||||
opacity_unknown, [[Unknown indicator opacity mode]]
|
|
||||||
opaque, [[Opacifies the indicator]]
|
|
||||||
translucent, [[Be translucent the indicator]]
|
|
||||||
transparent [[Transparentizes the indicator]]
|
|
||||||
}
|
|
||||||
|
|
||||||
enum Elm.Win.Indicator_Overlap_Mode
|
|
||||||
{
|
|
||||||
[[Defines the overlap modes of indicator that can be shown.
|
|
||||||
Using this mode, user can determine whether the content of window
|
|
||||||
overlaps with indicator or not.]]
|
|
||||||
legacy: elm_win_indicator;
|
|
||||||
|
|
||||||
overlap_unknown, [[Unknown indicator overlap mode]]
|
|
||||||
overlap, [[Indicator can be overlapped with the content of window.
|
|
||||||
Content can be placed under the indicator in z-order.]]
|
|
||||||
nooverlap, [[Indicator can not be overlapped with the content of window.
|
|
||||||
The Y coordinate of content is same as (Y coordinate of indicator + indicator height)]]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -183,37 +155,36 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
|
||||||
eo_prefix: elm_obj_win;
|
eo_prefix: elm_obj_win;
|
||||||
event_prefix: elm_win;
|
event_prefix: elm_win;
|
||||||
methods {
|
methods {
|
||||||
@property indicator_mode {
|
@property indicator_enabled {
|
||||||
set {
|
set {
|
||||||
[[Sets the indicator mode of the window.]]
|
[[In some environments, like phones, you may have an indicator that
|
||||||
|
shows battery status, reception, time etc. This is the indicator.
|
||||||
|
|
||||||
|
Sometimes you don't want it because you provide the same functionality
|
||||||
|
inside your app, so this will request that the indicator is disabled in
|
||||||
|
this circumstance. The default is depend on the environments.
|
||||||
|
For example, like phones, default is to enable the indicator.
|
||||||
|
But like TV, default is to disable the indicator.
|
||||||
|
|
||||||
|
Sets the indicator enable of the window.]]
|
||||||
}
|
}
|
||||||
get {
|
get {
|
||||||
[[Get the indicator mode of the window.]]
|
[[Get the indicator enable of the window.]]
|
||||||
}
|
}
|
||||||
values {
|
values {
|
||||||
mode: Elm.Win.Indicator_Mode; [[The mode, one of #Elm_Win_Indicator_Mode.]]
|
enabled: bool; [[If true, the indicator is enabled,
|
||||||
|
If false, the indicator is disabled.]]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property indicator_opacity {
|
@property indicator_type {
|
||||||
set {
|
set {
|
||||||
[[Sets the indicator opacity mode of the window.]]
|
[[Sets the indicator type of the window.]]
|
||||||
}
|
}
|
||||||
get {
|
get {
|
||||||
[[Get the indicator opacity mode of the window.]]
|
[[Get the indicator type of the window.]]
|
||||||
}
|
}
|
||||||
values {
|
values {
|
||||||
mode: Elm.Win.Indicator_Opacity_Mode; [[The mode, one of #Elm_Win_Indicator_Opacity_Mode.]]
|
type: Elm.Win.Indicator_Type; [[The type, one of #Elm_Win_Indicator_Type.]]
|
||||||
}
|
|
||||||
}
|
|
||||||
@property indicator_overlap {
|
|
||||||
set {
|
|
||||||
[[Sets the indicator overlap mode of the window.]]
|
|
||||||
}
|
|
||||||
get {
|
|
||||||
[[Get the indicator overlap mode of the window.]]
|
|
||||||
}
|
|
||||||
values {
|
|
||||||
mode: Elm.Win.Indicator_Overlap_Mode; [[The mode, one of #Elm_Win_Indicator_Overlap_Mode.]]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@property keyboard_win {
|
@property keyboard_win {
|
||||||
|
|
|
@ -1,5 +1,36 @@
|
||||||
#include "elm_win.eo.legacy.h"
|
#include "elm_win.eo.legacy.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief In some environments, like phones, you may have an indicator that
|
||||||
|
* shows battery status, reception, time etc. This is the indicator.
|
||||||
|
*
|
||||||
|
* Sometimes you don't want it because you provide the same functionality
|
||||||
|
* inside your app, so this will request that the indicator is hidden in this
|
||||||
|
* circumstance. The default is depend on the environments. For example, like
|
||||||
|
* phones, default is to have the indicator shown. But like TV, default is to
|
||||||
|
* have the indicator hidden.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ELM_WIN_INDICATOR_UNKNOWN = 0, /** Unknown indicator state */
|
||||||
|
ELM_WIN_INDICATOR_HIDE, /** Hides the indicator */
|
||||||
|
ELM_WIN_INDICATOR_SHOW /** Shows the indicator */
|
||||||
|
} Elm_Win_Indicator_Mode;
|
||||||
|
|
||||||
|
/** Defines the opacity modes of indicator that can be shown
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ELM_WIN_INDICATOR_OPACITY_UNKNOWN = 0, /** Unknown indicator opacity mode */
|
||||||
|
ELM_WIN_INDICATOR_OPAQUE, /** Opacifies the indicator */
|
||||||
|
ELM_WIN_INDICATOR_TRANSLUCENT, /** Be translucent the indicator */
|
||||||
|
ELM_WIN_INDICATOR_TRANSPARENT /** Transparentizes the indicator */
|
||||||
|
} Elm_Win_Indicator_Opacity_Mode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds a window object. If this is the first window created, pass NULL as
|
* Adds a window object. If this is the first window created, pass NULL as
|
||||||
* @p parent.
|
* @p parent.
|
||||||
|
@ -463,3 +494,39 @@ EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority);
|
||||||
*/
|
*/
|
||||||
EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj);
|
EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the indicator mode of the window.
|
||||||
|
*
|
||||||
|
* @param[in] mode The mode, one of #Elm_Win_Indicator_Mode.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
EAPI void elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the indicator mode of the window.
|
||||||
|
*
|
||||||
|
* @return The mode, one of #Elm_Win_Indicator_Mode.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
EAPI Elm_Win_Indicator_Mode elm_win_indicator_mode_get(const Evas_Object *obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Sets the indicator opacity mode of the window.
|
||||||
|
*
|
||||||
|
* @param[in] mode The mode, one of #Elm_Win_Indicator_Opacity_Mode.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
EAPI void elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the indicator opacity mode of the window.
|
||||||
|
*
|
||||||
|
* @return The mode, one of #Elm_Win_Indicator_Opacity_Mode.
|
||||||
|
*
|
||||||
|
* @ingroup Elm_Win
|
||||||
|
*/
|
||||||
|
EAPI Elm_Win_Indicator_Opacity_Mode elm_win_indicator_opacity_get(const Evas_Object *obj);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue