return land_indicator;
}
+// TIZEN_ONLY(20160801): indicator implementation
+static Eina_Bool
+_indicator_visible_type_set(Evas_Object *obj, Eina_Bool visible)
+{
+ Evas_Object *top = NULL;
+ Ecore_Wl_Window *wlwin = NULL;
+
+ top = elm_widget_top_get(obj);
+ if (!top) return EINA_FALSE;
+
+ wlwin = elm_win_wl_window_get(top);
+ if (!wlwin) return EINA_FALSE;
+
+ if (visible)
+ {
+ ecore_wl_indicator_visible_type_set(wlwin, ECORE_WL_INDICATOR_VISIBLE_TYPE_SHOWN);
+ }
+ else
+ {
+ ecore_wl_indicator_visible_type_set(wlwin, ECORE_WL_INDICATOR_VISIBLE_TYPE_HIDDEN);
+ }
+ return EINA_TRUE;
+}
+static Eina_Bool
+_indicator_hide_effect(void *data)
+{
+ Evas_Object *conformant = data;
+
+ DBG("[INDICATOR]Hide effect ");
+ ELM_CONFORMANT_DATA_GET(conformant, sd);
+ sd->on_indicator_effect = EINA_FALSE;
+
+ if(((sd->rot == 90) || (sd->rot == 270)) ||
+ (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT))
+ {
+ elm_object_signal_emit(conformant, "indicator,hide,effect", "elm");
+ sd->indicator_effect_timer = NULL;
+ _indicator_visible_type_set(data, EINA_FALSE);
+ }
+ return ECORE_CALLBACK_CANCEL;
+}
+static void
+_indicator_show_effect(Evas_Object *conformant, double duration)
+{
+ ELM_CONFORMANT_DATA_GET(conformant, sd);
+ DBG("[IND]Show effect ");
+
+ sd->on_indicator_effect = EINA_TRUE;
+ elm_object_signal_emit(conformant, "indicator,show,effect", "elm");
+
+ if (sd->indicator_effect_timer) ecore_timer_del(sd->indicator_effect_timer);
+ sd->indicator_effect_timer = ecore_timer_add(duration, _indicator_hide_effect, conformant);
+}
+static void
+_indicator_post_appearance_changed(Evas_Object *conformant)
+{
+ ELM_CONFORMANT_DATA_GET(conformant, sd);
+
+ if((sd->indmode != ELM_WIN_INDICATOR_SHOW))
+ {
+ _indicator_visible_type_set(conformant, EINA_FALSE);
+ return;
+ }
+
+ if ((sd->ind_o_mode == ELM_WIN_INDICATOR_OPACITY_UNKNOWN) ||
+ (sd->indmode == ELM_WIN_INDICATOR_UNKNOWN))
+ return;
+
+ _indicator_visible_type_set(conformant, EINA_TRUE);
+ _indicator_show_effect(conformant, 3);
+}
+// END
static void
_indicator_mode_set(Evas_Object *conformant, Elm_Win_Indicator_Mode indmode)
{
elm_object_signal_emit(conformant, "elm,state,indicator,opaque", "elm");
/////////////////////////////////////////////////////////////////////////////
}
-
static Eina_Bool
_on_indicator_mode_changed(void *data,
Eo *obj, const Eo_Event_Description *desc EINA_UNUSED,
indmode = elm_win_indicator_mode_get(win);
ind_o_mode = elm_win_indicator_opacity_get(win);
+
+ Eina_Bool sc = ((indmode != sd->indmode) | (ind_o_mode != sd->ind_o_mode)) ; // TIZEN_ONLY(20160801):indicator implementation
+
if (indmode != sd->indmode)
_indicator_mode_set(conformant, indmode);
if (ind_o_mode != sd->ind_o_mode)
_indicator_opacity_set(conformant, ind_o_mode);
+ // TIZEN_ONLY(20160801):indicator implementation
+ if (sc)
+ _indicator_post_appearance_changed(conformant);
+ // END
return EINA_TRUE;
}
rot = elm_win_rotation_get(win);
if (rot == sd->rot) return EINA_TRUE;
-
sd->rot = rot;
+ _indicator_post_appearance_changed(conformant); // TIZEN_ONLY(20160801):indicator implementation
old_indi = elm_layout_content_unset(conformant, INDICATOR_PART);
/* this means ELM_WIN_INDICATOR_SHOW never be set.we don't need to change indicator type*/
if (!old_indi) return EINA_TRUE;
}
return EINA_TRUE;
}
+// TIZEN_ONLY(20160801):indicator implementation
+static void
+_on_indicator_flick_done(void *data,
+ Evas_Object *obj EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ Evas_Object *conformant = data;
+ _indicator_post_appearance_changed(conformant);
+}
+// END
EOLIAN static Elm_Theme_Apply
_elm_conformant_elm_widget_theme_apply(Eo *obj, Elm_Conformant_Data *_pd EINA_UNUSED)
#ifdef HAVE_ELEMENTARY_WAYLAND
evas_object_smart_callback_del_full
(sd->win, "conformant,changed", _on_conformant_changed, obj);
+ // END
+ // TIZEN_ONLY(20160801): indicator implementation
+ evas_object_smart_callback_del_full
+ (sd->win, "indicator,flick,done", _on_indicator_flick_done, obj);
+ //END
#endif
- //
// TIZEN_ONLY(20160628): Unregister callbacks for ATSPI bridge enable/disable
_unregister_conformant_atspi_bridge_callbacks(obj);
//
#ifdef HAVE_ELEMENTARY_WAYLAND
evas_object_smart_callback_add
(sd->win, "conformant,changed", _on_conformant_changed, obj);
+ // END
+ // TIZEN_ONLY(20160801): indicator implementation
+ evas_object_smart_callback_add
+ (sd->win, "indicator,flick,done", _on_indicator_flick_done, obj);
+ // END
#endif
- //
return obj;
}
Eina_Bool opaque_dirty : 1;
Ecore_Event_Handler *effect_start_handler;
Ecore_Event_Handler *effect_end_handler;
+ Ecore_Event_Handler *indicator_flick_handler; // TIZEN_ONLY(20160801): indicator implementation
} wl;
#endif
static const char SIG_WM_ROTATION_CHANGED[] = "wm,rotation,changed";
#ifdef HAVE_ELEMENTARY_WAYLAND
static const char SIG_CONFORMANT_CHANGED[] = "conformant,changed";
+static const char SIG_INDICATOR_FLICK_DONE[] = "indicator,flick,done"; // TIZEN_ONLY(20160801): indicator implementation
#endif
static const char SIG_AUX_HINT_ALLOWED[] = "aux,hint,allowed";
static const char SIG_VISIBILITY_CHANGED[] = "visibility,changed";
#ifdef HAVE_ELEMENTARY_WAYLAND
ecore_event_handler_del(sd->wl.effect_start_handler);
ecore_event_handler_del(sd->wl.effect_end_handler);
+ ecore_event_handler_del(sd->wl.indicator_flick_handler); // TIZEN_ONLY(20160801): indicator implementation
#endif
if (sd->img_obj)
}
//
+// TIZEN_ONLY(20160728): Indicator Impelementation
+static Eina_Bool
+_elm_win_wl_indicator_flick(void *data, int type EINA_UNUSED, void *event)
+{
+ ELM_WIN_DATA_GET(data, sd);
+ evas_object_smart_callback_call(sd->obj, SIG_INDICATOR_FLICK_DONE, NULL);
+ return ECORE_CALLBACK_PASS_ON;
+}
+// END
+
EAPI Evas_Object *
elm_win_add(Evas_Object *parent,
const char *name,
(ECORE_WL_EVENT_EFFECT_START, _elm_win_wl_effect_start, obj);
sd->wl.effect_end_handler = ecore_event_handler_add
(ECORE_WL_EVENT_EFFECT_END, _elm_win_wl_effect_end, obj);
+ // TIZEN_ONLY(20160801): indicator implementation
+ sd->wl.indicator_flick_handler = ecore_event_handler_add
+ (ECORE_WL_EVENT_INDICATOR_FLICK, _elm_win_wl_indicator_flick, obj);
+ // END
}
#endif
else if ((engine) && (!strncmp(engine, "shot:", 5)))
else if (sd->ind_o_mode == ELM_WIN_INDICATOR_TRANSPARENT)
ecore_wl_window_indicator_opacity_set
(sd->wl.win, ECORE_WL_INDICATOR_TRANSPARENT);
+ else if (sd->ind_o_mode == ELM_WIN_INDICATOR_BG_TRANSPARENT)
+ ecore_wl_window_indicator_opacity_set
+ (sd->wl.win, ECORE_WL_INDICATOR_BG_TRANSPARENT);
}
#endif
eo_do(obj, eo_event_callback_call