ecore_wl_window_indicator_geometry_get(wlwin, &sx, &sy, &sw, &sh);
#endif
//
- if (((sd->rot == 90) || (sd->rot == 270)) && sd->landscape_indicator)
- _conformant_part_size_hints_set(obj, sd->landscape_indicator, sx, sy, sw, sh);
- else if (((sd->rot == 0) || (sd->rot == 180)) && sd->portrait_indicator)
- _conformant_part_size_hints_set(obj, sd->portrait_indicator, sx, sy, sw, sh);
+ // TIZEN_ONLY(20170228): Remove legacy to coraborate with current indicator properly
+ //if (((sd->rot == 90) || (sd->rot == 270)) && sd->landscape_indicator)
+ // _conformant_part_size_hints_set(obj, sd->landscape_indicator, sx, sy, sw, sh);
+ //else if (((sd->rot == 0) || (sd->rot == 180)) && sd->portrait_indicator)
+ // _conformant_part_size_hints_set(obj, sd->portrait_indicator, sx, sy, sw, sh);
+ _conformant_part_size_hints_set(obj, sd->indicator, sx, sy, sw, sh);
+ //END
}
if (part_type & ELM_CONFORMANT_VIRTUAL_KEYPAD_PART)
ELM_SAFE_FREE(sd->softkey, evas_object_del);
}
+// TIZEN_ONLY(20170228): Remove legacy to coraborate with current indicator properly
+/*
static Eina_Bool
_port_indicator_connect_cb(void *data)
{
_port_indicator_connect_cb, conform);
return EINA_TRUE;
}
+*/
+static Eina_Bool
+_indicator_connect_cb(void *data)
+{
+ const char *indicator_serv_name;
+ ELM_CONFORMANT_DATA_GET(data, sd);
+
+ if (!sd) return ECORE_CALLBACK_CANCEL;
+ if (sd->indmode != ELM_WIN_INDICATOR_SHOW)
+ {
+ sd->indi_timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ indicator_serv_name = elm_config_indicator_service_get(0);
+ if (!indicator_serv_name)
+ {
+ DBG("Conformant cannot find indicator service name\n");
+ sd->indi_timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ if (strchr(indicator_serv_name, '/'))
+ {
+ sd->indi_timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ if (elm_plug_connect(sd->indicator, indicator_serv_name, 0, EINA_FALSE))
+ {
+ DBG("Conformant connect to server[%s]\n", indicator_serv_name);
+ sd->indi_timer = NULL;
+ return ECORE_CALLBACK_CANCEL;
+ }
+ return ECORE_CALLBACK_RENEW;
+}
+
+static Eina_Bool
+_indicator_disconnected(void *data,
+ Eo *obj EINA_UNUSED,
+ const Eo_Event_Description *desc EINA_UNUSED,
+ void *event_info EINA_UNUSED)
+{
+ Evas_Object *conform = data;
+
+ ELM_CONFORMANT_DATA_GET(conform, sd);
+
+ sd->indi_timer = ecore_timer_add(ELM_CONFORM_INDICATOR_TIME,
+ _indicator_connect_cb, conform);
+ return EINA_TRUE;
+}
+// END
//TIZEN_ONLY(20170104): add plug message feature.
// procotol version - change this as needed
return EINA_TRUE;
}
-//
+// TIZEN_ONLY(20170228): Remove legacy to coraborate with current indicator properly
+/*
static Evas_Object *
_create_portrait_indicator(Evas_Object *obj)
{
evas_object_size_hint_max_set(land_indicator, -1, 0);
return land_indicator;
}
+*/
+static Evas_Object *
+_create_indicator(Evas_Object *obj)
+{
+ Evas_Object *indicator = NULL;
+ const char *indicator_serv_name;
+
+ ELM_CONFORMANT_DATA_GET(obj, sd);
+
+ indicator_serv_name = elm_config_indicator_service_get(0);
+ if (!indicator_serv_name)
+ {
+ DBG("Conformant cannot get indicator service name\n");
+ return NULL;
+ }
+ if (strchr(indicator_serv_name, '/'))
+ {
+ return NULL;
+ }
+
+ indicator = elm_plug_add(obj);
+ if (!indicator)
+ {
+ DBG("Conformant cannot create plug to server[%s]\n", indicator_serv_name);
+ return NULL;
+ }
+
+ if (!elm_plug_connect(indicator, indicator_serv_name, 0, EINA_FALSE))
+ {
+ DBG("Conformant cannot connect to server[%s]\n", indicator_serv_name);
+ sd->indi_timer = ecore_timer_add(ELM_CONFORM_INDICATOR_TIME,
+ _indicator_connect_cb, obj);
+ }
+
+ elm_widget_sub_object_add(obj, indicator);
+ //TIZEN_ONLY(20170104): add plug message feature.
+ eo_do(indicator, eo_event_callback_add
+ (ELM_PLUG_EVENT_MESSAGE_RECEIVED, _plug_msg_handle, obj));
+ //
+ eo_do(indicator, eo_event_callback_add
+ (ELM_PLUG_EVENT_IMAGE_DELETED, _indicator_disconnected, obj));
+ evas_object_size_hint_min_set(indicator, -1, 0);
+ evas_object_size_hint_max_set(indicator, -1, 0);
+
+ return indicator;
+}
+//END
// TIZEN_ONLY(20160801): indicator implementation
#ifdef HAVE_ELEMENTARY_WAYLAND
//create new indicator
if (!old_indi)
{
+ // TIZEN_ONLY(20170228): Remove legacy to coraborate with current indicator properly
+ /*
if ((sd->rot == 90)||(sd->rot == 270))
{
if (!sd->landscape_indicator)
if (!sd->portrait_indicator) return;
elm_layout_content_set(conformant, INDICATOR_PART, sd->portrait_indicator);
}
+ */
+ if (!sd->indicator)
+ sd->indicator = _create_indicator(conformant);
+ if (!sd->indicator) return;
+ elm_layout_content_set(conformant, INDICATOR_PART, sd->indicator);
+ //END
}
elm_object_signal_emit(conformant, "elm,state,indicator,show", "elm");
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);
+ return EINA_TRUE;
+ // TIZEN_ONLY(20170228): Remove legacy to coraborate with current indicator properly
+ //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;
evas_object_hide(old_indi);
elm_layout_content_set(conformant, INDICATOR_PART, sd->portrait_indicator);
}
return EINA_TRUE;
+ */
+ //END
}
// TIZEN_ONLY(20160801):indicator implementation
static void
ecore_job_del(sd->show_region_job);
ecore_timer_del(sd->port_indi_timer);
ecore_timer_del(sd->land_indi_timer);
+
+ // TIZEN_ONLY(20170228): Remove legacy to coraborate with current indicator properly
+ /*
//TIZEN_ONLY(20170104): add plug message feature.
eo_do(sd->portrait_indicator,
eo_event_callback_del(ELM_PLUG_EVENT_MESSAGE_RECEIVED,
//
evas_object_del(sd->portrait_indicator);
evas_object_del(sd->landscape_indicator);
+ */
+ evas_object_del(sd->indicator);
+ //END
+
evas_object_data_set(sd->win, "\377 elm,conformant", NULL);