summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJi-Youn Park <jy0703.park@samsung.com>2016-05-23 19:44:54 +0830
committerJi-Youn Park <jy0703.park@samsung.com>2016-05-23 19:44:54 +0830
commit0c6b0efaee80d6ed64a2ad619d8bcb637fd6bec6 (patch)
tree02960960ff5f14d01224f531dff7c14df0c7d561
parent4bdb1f73b8ec55d4d00a2ce6607d47f388150ed2 (diff)
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.
-rw-r--r--src/lib/elementary/elm_win.c139
-rw-r--r--src/lib/elementary/elm_win.eo87
-rw-r--r--src/lib/elementary/elm_win_legacy.h67
3 files changed, 179 insertions, 114 deletions
diff --git a/src/lib/elementary/elm_win.c b/src/lib/elementary/elm_win.c
index a40e143d62..b4857c2468 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)
5116} 5116}
5117 5117
5118EOLIAN static void 5118EOLIAN static void
5119_elm_win_indicator_mode_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Indicator_Mode mode) 5119_elm_win_indicator_enabled_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED, Eina_Bool enable EINA_UNUSED)
5120{ 5120{
5121 if (mode == sd->indmode) return; 5121 //TODO: this mode will be implemented after removing the conformant.
5122#ifdef HAVE_ELEMENTARY_X 5122 return;
5123 _internal_elm_win_xwindow_get(sd);
5124#endif
5125 sd->indmode = mode;
5126#ifdef HAVE_ELEMENTARY_X
5127 if (sd->x.xwin)
5128 {
5129 if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
5130 ecore_x_e_illume_indicator_state_set
5131 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
5132 else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
5133 ecore_x_e_illume_indicator_state_set
5134 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
5135 }
5136#endif
5137 eo_event_callback_call
5138 (obj, ELM_WIN_EVENT_INDICATOR_PROP_CHANGED, NULL);
5139}
5140
5141EOLIAN static Elm_Win_Indicator_Mode
5142_elm_win_indicator_mode_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd)
5143{
5144 return sd->indmode;
5145}
5146
5147EOLIAN static void
5148_elm_win_indicator_opacity_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd, Elm_Win_Indicator_Opacity_Mode mode)
5149{
5150 if (mode == sd->ind_o_mode) return;
5151 sd->ind_o_mode = mode;
5152#ifdef HAVE_ELEMENTARY_X
5153 _internal_elm_win_xwindow_get(sd);
5154 if (sd->x.xwin)
5155 {
5156 if (sd->ind_o_mode == ELM_WIN_INDICATOR_OPAQUE)
5157 ecore_x_e_illume_indicator_opacity_set
5158 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_OPAQUE);
5159 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSLUCENT)
5160 ecore_x_e_illume_indicator_opacity_set
5161 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT);
5162 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT)
5163 ecore_x_e_illume_indicator_opacity_set
5164 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
5165 }
5166#endif
5167 eo_event_callback_call
5168 (obj, ELM_WIN_EVENT_INDICATOR_PROP_CHANGED, NULL);
5169} 5123}
5170 5124
5171EOLIAN static Elm_Win_Indicator_Opacity_Mode 5125EOLIAN static Eina_Bool
5172_elm_win_indicator_opacity_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd) 5126_elm_win_indicator_enabled_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
5173{ 5127{
5174 return sd->ind_o_mode; 5128 //TODO: this mode will be implemented after removing the conformant.
5129 return EINA_FALSE;
5175} 5130}
5176 5131
5177EOLIAN static void 5132EOLIAN static void
5178_elm_win_indicator_overlap_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED, Elm_Win_Indicator_Overlap_Mode mode EINA_UNUSED) 5133_elm_win_indicator_type_set(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED, Elm_Win_Indicator_Type type EINA_UNUSED)
5179{ 5134{
5180 //TODO: this mode will be implemented after removing the conformant. 5135 //TODO: this mode will be implemented after removing the conformant.
5181 return; 5136 return;
5182} 5137}
5183 5138
5184EOLIAN static Elm_Win_Indicator_Overlap_Mode 5139EOLIAN static Elm_Win_Indicator_Type
5185_elm_win_indicator_overlap_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED) 5140_elm_win_indicator_type_get(Eo *obj EINA_UNUSED, Elm_Win_Data *sd EINA_UNUSED)
5186{ 5141{
5187 //TODO: this mode will be implemented after removing the conformant. 5142 //TODO: this mode will be implemented after removing the conformant.
5188 return ELM_WIN_INDICATOR_OVERLAP_UNKNOWN; 5143
5144 return ELM_WIN_INDICATOR_TYPE_UNKNOWN;
5189} 5145}
5190 5146
5191EOLIAN static void 5147EOLIAN static void
@@ -6014,6 +5970,77 @@ elm_win_quickpanel_zone_get(const Evas_Object *obj)
6014 return 0; 5970 return 0;
6015} 5971}
6016 5972
5973EAPI void
5974elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode)
5975{
5976 ELM_WIN_CHECK(obj);
5977 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
5978
5979 if (mode == sd->indmode) return;
5980#ifdef HAVE_ELEMENTARY_X
5981 _internal_elm_win_xwindow_get(sd);
5982#endif
5983 sd->indmode = mode;
5984#ifdef HAVE_ELEMENTARY_X
5985 if (sd->x.xwin)
5986 {
5987 if (sd->indmode == ELM_WIN_INDICATOR_SHOW)
5988 ecore_x_e_illume_indicator_state_set
5989 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_ON);
5990 else if (sd->indmode == ELM_WIN_INDICATOR_HIDE)
5991 ecore_x_e_illume_indicator_state_set
5992 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_STATE_OFF);
5993 }
5994#endif
5995 eo_event_callback_call
5996 (obj, ELM_WIN_EVENT_INDICATOR_PROP_CHANGED, NULL);
5997}
5998
5999EAPI Elm_Win_Indicator_Mode
6000elm_win_indicator_mode_get(const Evas_Object *obj)
6001{
6002 ELM_WIN_CHECK(obj) EINA_FALSE;
6003 ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, ELM_WIN_INDICATOR_UNKNOWN);
6004
6005 return sd->indmode;
6006}
6007
6008EAPI void
6009elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode)
6010{
6011 ELM_WIN_CHECK(obj);
6012 ELM_WIN_DATA_GET_OR_RETURN(obj, sd);
6013
6014 if (mode == sd->ind_o_mode) return;
6015 sd->ind_o_mode = mode;
6016#ifdef HAVE_ELEMENTARY_X
6017 _internal_elm_win_xwindow_get(sd);
6018 if (sd->x.xwin)
6019 {
6020 if (sd->ind_o_mode == ELM_WIN_INDICATOR_OPAQUE)
6021 ecore_x_e_illume_indicator_opacity_set
6022 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_OPAQUE);
6023 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSLUCENT)
6024 ecore_x_e_illume_indicator_opacity_set
6025 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSLUCENT);
6026 else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT)
6027 ecore_x_e_illume_indicator_opacity_set
6028 (sd->x.xwin, ECORE_X_ILLUME_INDICATOR_TRANSPARENT);
6029 }
6030#endif
6031 eo_event_callback_call
6032 (obj, ELM_WIN_EVENT_INDICATOR_PROP_CHANGED, NULL);
6033}
6034
6035EAPI Elm_Win_Indicator_Opacity_Mode
6036elm_win_indicator_opacity_get(const Evas_Object *obj)
6037{
6038 ELM_WIN_CHECK(obj) EINA_FALSE;
6039 ELM_WIN_DATA_GET_OR_RETURN_VAL(obj, sd, ELM_WIN_INDICATOR_OPACITY_UNKNOWN);
6040
6041 return sd->ind_o_mode;
6042}
6043
6017#ifndef EFL_TEAMWORK_VERSION 6044#ifndef EFL_TEAMWORK_VERSION
6018# define EFL_TEAMWORK_VERSION 2 6045# define EFL_TEAMWORK_VERSION 2
6019#endif 6046#endif
diff --git a/src/lib/elementary/elm_win.eo b/src/lib/elementary/elm_win.eo
index 69571bf9db..a52b98fab8 100644
--- a/src/lib/elementary/elm_win.eo
+++ b/src/lib/elementary/elm_win.eo
@@ -97,48 +97,20 @@ enum Elm.Win.Keyboard_Mode
97 j2me [[J2ME keyboard layout]] 97 j2me [[J2ME keyboard layout]]
98} 98}
99 99
100enum Elm.Win.Indicator_Mode 100enum Elm.Win.Indicator_Type
101{ 101{
102 [[In some environments, like phones, you may have an indicator that 102 [[Defines the type indicator that can be shown]]
103 shows battery status, reception, time etc. This is the indicator.
104
105 Sometimes you don't want it because you provide the same functionality
106 inside your app, so this will request that the indicator is hidden in
107 this circumstance. The default is depend on the environments.
108 For example, like phones, default is to have the indicator shown.
109 But like TV, default is to have the indicator hidden.
110 ]]
111
112 legacy: elm_win_indicator; 103 legacy: elm_win_indicator;
113 104
114 unknown, [[Unknown indicator state]] 105 type_unknown, [[Unknown indicator type]]
115 hide, [[Hides the indicator]] 106 bg_opaque, [[The icon of indicator is opaque, the background of indicator is also opaque.
116 show [[Shows the indicator]] 107 The content of window is located the end of indicator.
117} 108 The area of indicator and window content are not overlapped]]
118 109 bg_transparent, [[The icon of indicator is opaque, but the background is transparent.
119enum Elm.Win.Indicator_Opacity_Mode 110 The content of window is located under the indicator in Z-order.
120{ 111 The area of indicator and window content are overlapped]]
121 [[Defines the opacity modes of indicator that can be shown]] 112 hidden [[The indicator is hidden, So user can see only the content of window like the video mode.
122 legacy: elm_win_indicator; 113 If user flicks the upper side of window, the incator is shown temporarily.]]
123
124 opacity_unknown, [[Unknown indicator opacity mode]]
125 opaque, [[Opacifies the indicator]]
126 translucent, [[Be translucent the indicator]]
127 transparent [[Transparentizes the indicator]]
128}
129
130enum Elm.Win.Indicator_Overlap_Mode
131{
132 [[Defines the overlap modes of indicator that can be shown.
133 Using this mode, user can determine whether the content of window
134 overlaps with indicator or not.]]
135 legacy: elm_win_indicator;
136
137 overlap_unknown, [[Unknown indicator overlap mode]]
138 overlap, [[Indicator can be overlapped with the content of window.
139 Content can be placed under the indicator in z-order.]]
140 nooverlap, [[Indicator can not be overlapped with the content of window.
141 The Y coordinate of content is same as (Y coordinate of indicator + indicator height)]]
142} 114}
143 115
144/** 116/**
@@ -183,37 +155,36 @@ class Elm.Win (Elm.Widget, Elm.Interface.Atspi.Window,
183 eo_prefix: elm_obj_win; 155 eo_prefix: elm_obj_win;
184 event_prefix: elm_win; 156 event_prefix: elm_win;
185 methods { 157 methods {
186 @property indicator_mode { 158 @property indicator_enabled {
187 set {
188 [[Sets the indicator mode of the window.]]
189 }
190 get {
191 [[Get the indicator mode of the window.]]
192 }
193 values {
194 mode: Elm.Win.Indicator_Mode; [[The mode, one of #Elm_Win_Indicator_Mode.]]
195 }
196 }
197 @property indicator_opacity {
198 set { 159 set {
199 [[Sets the indicator opacity mode of the window.]] 160 [[In some environments, like phones, you may have an indicator that
161 shows battery status, reception, time etc. This is the indicator.
162
163 Sometimes you don't want it because you provide the same functionality
164 inside your app, so this will request that the indicator is disabled in
165 this circumstance. The default is depend on the environments.
166 For example, like phones, default is to enable the indicator.
167 But like TV, default is to disable the indicator.
168
169 Sets the indicator enable of the window.]]
200 } 170 }
201 get { 171 get {
202 [[Get the indicator opacity mode of the window.]] 172 [[Get the indicator enable of the window.]]
203 } 173 }
204 values { 174 values {
205 mode: Elm.Win.Indicator_Opacity_Mode; [[The mode, one of #Elm_Win_Indicator_Opacity_Mode.]] 175 enabled: bool; [[If true, the indicator is enabled,
176 If false, the indicator is disabled.]]
206 } 177 }
207 } 178 }
208 @property indicator_overlap { 179 @property indicator_type {
209 set { 180 set {
210 [[Sets the indicator overlap mode of the window.]] 181 [[Sets the indicator type of the window.]]
211 } 182 }
212 get { 183 get {
213 [[Get the indicator overlap mode of the window.]] 184 [[Get the indicator type of the window.]]
214 } 185 }
215 values { 186 values {
216 mode: Elm.Win.Indicator_Overlap_Mode; [[The mode, one of #Elm_Win_Indicator_Overlap_Mode.]] 187 type: Elm.Win.Indicator_Type; [[The type, one of #Elm_Win_Indicator_Type.]]
217 } 188 }
218 } 189 }
219 @property keyboard_win { 190 @property keyboard_win {
diff --git a/src/lib/elementary/elm_win_legacy.h b/src/lib/elementary/elm_win_legacy.h
index a8519213a4..a6893e071d 100644
--- a/src/lib/elementary/elm_win_legacy.h
+++ b/src/lib/elementary/elm_win_legacy.h
@@ -1,6 +1,37 @@
1#include "elm_win.eo.legacy.h" 1#include "elm_win.eo.legacy.h"
2 2
3/** 3/**
4 * @brief In some environments, like phones, you may have an indicator that
5 * shows battery status, reception, time etc. This is the indicator.
6 *
7 * Sometimes you don't want it because you provide the same functionality
8 * inside your app, so this will request that the indicator is hidden in this
9 * circumstance. The default is depend on the environments. For example, like
10 * phones, default is to have the indicator shown. But like TV, default is to
11 * have the indicator hidden.
12 *
13 * @ingroup Elm_Win
14 */
15typedef enum
16{
17 ELM_WIN_INDICATOR_UNKNOWN = 0, /** Unknown indicator state */
18 ELM_WIN_INDICATOR_HIDE, /** Hides the indicator */
19 ELM_WIN_INDICATOR_SHOW /** Shows the indicator */
20} Elm_Win_Indicator_Mode;
21
22/** Defines the opacity modes of indicator that can be shown
23 *
24 * @ingroup Elm_Win
25 */
26typedef enum
27{
28 ELM_WIN_INDICATOR_OPACITY_UNKNOWN = 0, /** Unknown indicator opacity mode */
29 ELM_WIN_INDICATOR_OPAQUE, /** Opacifies the indicator */
30 ELM_WIN_INDICATOR_TRANSLUCENT, /** Be translucent the indicator */
31 ELM_WIN_INDICATOR_TRANSPARENT /** Transparentizes the indicator */
32} Elm_Win_Indicator_Opacity_Mode;
33
34/**
4 * Adds a window object. If this is the first window created, pass NULL as 35 * Adds a window object. If this is the first window created, pass NULL as
5 * @p parent. 36 * @p parent.
6 * 37 *
@@ -463,3 +494,39 @@ EAPI void elm_win_quickpanel_priority_minor_set(Evas_Object *obj, int priority);
463 */ 494 */
464EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj); 495EAPI int elm_win_quickpanel_priority_minor_get(const Evas_Object *obj);
465 496
497/**
498 * @brief Sets the indicator mode of the window.
499 *
500 * @param[in] mode The mode, one of #Elm_Win_Indicator_Mode.
501 *
502 * @ingroup Elm_Win
503 */
504EAPI void elm_win_indicator_mode_set(Evas_Object *obj, Elm_Win_Indicator_Mode mode);
505
506/**
507 * @brief Get the indicator mode of the window.
508 *
509 * @return The mode, one of #Elm_Win_Indicator_Mode.
510 *
511 * @ingroup Elm_Win
512 */
513EAPI Elm_Win_Indicator_Mode elm_win_indicator_mode_get(const Evas_Object *obj);
514
515/**
516 * @brief Sets the indicator opacity mode of the window.
517 *
518 * @param[in] mode The mode, one of #Elm_Win_Indicator_Opacity_Mode.
519 *
520 * @ingroup Elm_Win
521 */
522EAPI void elm_win_indicator_opacity_set(Evas_Object *obj, Elm_Win_Indicator_Opacity_Mode mode);
523
524/**
525 * @brief Get the indicator opacity mode of the window.
526 *
527 * @return The mode, one of #Elm_Win_Indicator_Opacity_Mode.
528 *
529 * @ingroup Elm_Win
530 */
531EAPI Elm_Win_Indicator_Opacity_Mode elm_win_indicator_opacity_get(const Evas_Object *obj);
532