jypark pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=0c6b0efaee80d6ed64a2ad619d8bcb637fd6bec6

commit 0c6b0efaee80d6ed64a2ad619d8bcb637fd6bec6
Author: Ji-Youn Park <jy0703.p...@samsung.com>
Date:   Mon May 23 19:44:54 2016 +0830

    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.
---
 src/lib/elementary/elm_win.c        | 139 +++++++++++++++++++++---------------
 src/lib/elementary/elm_win.eo       |  87 ++++++++--------------
 src/lib/elementary/elm_win_legacy.h |  67 +++++++++++++++++
 3 files changed, 179 insertions(+), 114 deletions(-)

diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index a40e143..b4857c2 100644
--- a/src/lib/elementary/elm_win.c
+++ b/src/lib/elementary/elm_win.c
@@ -5116,76 +5116,32 @@ _elm_win_keyboard_win_get(Eo *obj EINA_UNUSED, 
Elm_Win_Data *sd)
 }
 
 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);
+   //TODO: this mode will be implemented after removing the conformant.
+   return;
 }
 
-EOLIAN static Elm_Win_Indicator_Opacity_Mode
-_elm_win_indicator_opacity_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
+EOLIAN static Eina_Bool
+_elm_win_indicator_enabled_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd 
EINA_UNUSED)
 {
-   return sd->ind_o_mode;
+   //TODO: this mode will be implemented after removing the conformant.
+   return EINA_FALSE;
 }
 
 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)
+_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_Overlap_Mode
-_elm_win_indicator_overlap_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd 
EINA_UNUSED)
+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_OVERLAP_UNKNOWN;
+
+   return ELM_WIN_INDICATOR_TYPE_UNKNOWN;
 }
 
 EOLIAN static void
@@ -6014,6 +5970,77 @@ elm_win_quickpanel_zone_get(const Evas_Object *obj)
    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
 # define EFL_TEAMWORK_VERSION 2
 #endif
diff --git a/src/lib/elementary/elm_win.eo b/src/lib/elementary/elm_win.eo
index 69571bf..a52b98f 100644
--- a/src/lib/elementary/elm_win.eo
+++ b/src/lib/elementary/elm_win.eo
@@ -97,48 +97,20 @@ enum Elm.Win.Keyboard_Mode
    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
-     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.
-   ]]
-
+   [[Defines the type indicator that can be shown]]
    legacy: elm_win_indicator;
 
-   unknown, [[Unknown indicator state]]
-   hide, [[Hides the indicator]]
-   show [[Shows the indicator]]
-}
-
-enum Elm.Win.Indicator_Opacity_Mode
-{
-   [[Defines the opacity modes of indicator that can be shown]]
-   legacy: elm_win_indicator;
-
-   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)]]
+   type_unknown, [[Unknown indicator type]]
+   bg_opaque, [[The icon of indicator is opaque, the background of indicator 
is also opaque. 
+                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.
+                     The content of window is located under the indicator in 
Z-order.
+                     The area of indicator and window content are overlapped]]
+   hidden [[The indicator is hidden, So user can see only the content of 
window like the video mode.
+            If user flicks the upper side of window, the incator is shown 
temporarily.]]
 }
 
 /**
@@ -183,37 +155,36 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
    eo_prefix: elm_obj_win;
    event_prefix: elm_win;
    methods {
-      @property indicator_mode {
-         set {
-            [[Sets the indicator mode of the window.]]
-         }
-         get {
-            [[Get the indicator mode of the window.]]
-         }
-         values {
-            mode: Elm.Win.Indicator_Mode; [[The mode, one of 
#Elm_Win_Indicator_Mode.]]
-         }
-      }
-      @property indicator_opacity {
+      @property indicator_enabled {
          set {
-            [[Sets the indicator opacity 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 the indicator opacity mode of the window.]]
+            [[Get the indicator enable of the window.]]
          }
          values {
-            mode: Elm.Win.Indicator_Opacity_Mode; [[The mode, one of 
#Elm_Win_Indicator_Opacity_Mode.]]
+            enabled: bool; [[If true, the indicator is enabled,
+                             If false, the indicator is disabled.]]
          }
       }
-      @property indicator_overlap {
+      @property indicator_type {
          set {
-            [[Sets the indicator overlap mode of the window.]]
+            [[Sets the indicator type of the window.]]
          }
          get {
-            [[Get the indicator overlap mode of the window.]]
+            [[Get the indicator type of the window.]]
          }
          values {
-            mode: Elm.Win.Indicator_Overlap_Mode; [[The mode, one of 
#Elm_Win_Indicator_Overlap_Mode.]]
+            type: Elm.Win.Indicator_Type; [[The type, one of 
#Elm_Win_Indicator_Type.]]
          }
       }
       @property keyboard_win {
diff --git a/src/lib/elementary/elm_win_legacy.h 
b/src/lib/elementary/elm_win_legacy.h
index a851921..a6893e0 100644
--- a/src/lib/elementary/elm_win_legacy.h
+++ b/src/lib/elementary/elm_win_legacy.h
@@ -1,6 +1,37 @@
 #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
  * @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);
 
+/**
+ * @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);
+

-- 


Reply via email to