evas_object_propagate_events_set(VIEW(item), !is_access);
}
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+static char *
+_label_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
+{
+ ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN_VAL(data, sd, NULL);
+ return strdup((char *)sd->label_str);
+}
+
+static void
+_atspi_multibuttonentry_label_register(Evas_Object *obj, Eina_Bool is_atspi)
+{
+ ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(obj, sd);
+ Evas_Object *label_obj;
+ label_obj = (Evas_Object *)edje_object_part_object_get(sd->label, "elm.text");
+ if (label_obj)
+ {
+ if (is_atspi)
+ {
+ sd->label_access = elm_access_object_register(label_obj, obj);
+ _elm_access_callback_set(_elm_access_info_get(sd->label_access),
+ ELM_ACCESS_INFO, _label_access_info_cb, obj);
+ efl_access_role_set(sd->label_access, EFL_ACCESS_ROLE_HEADING);
+ evas_object_pass_events_set(label_obj, !_elm_config->atspi_mode);
+ evas_object_propagate_events_set(sd->label, !_elm_config->atspi_mode);
+ }
+ else
+ {
+ elm_access_object_unregister(label_obj);
+ }
+ }
+}
+
+static void
+_atspi_multibuttonentry_item_register(Evas_Object *obj,
+ Elm_Object_Item *eo_item,
+ Eina_Bool is_atspi)
+{
+ ELM_MULTIBUTTONENTRY_ITEM_DATA_GET(eo_item, item);
+ if (is_atspi)
+ {
+ efl_access_children_changed_added_signal_emit(obj, eo_item);
+ efl_access_added(eo_item);
+ }
+ else
+ efl_access_children_changed_del_signal_emit(obj, eo_item);
+}
+//
+
EOLIAN static Eo *
_elm_multibuttonentry_item_efl_object_constructor(Eo *eo_item, Elm_Multibuttonentry_Item_Data *item)
{
efl_event_callback_legacy_call
(obj, EFL_UI_MULTIBUTTONENTRY_EVENT_ITEM_ADDED, eo_item);
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
if (_elm_config->atspi_mode)
- {
- efl_access_children_changed_added_signal_emit(obj, eo_item);
- efl_access_added(eo_item);
- }
+ _atspi_multibuttonentry_item_register(obj, eo_item, EINA_TRUE);
+ //
return eo_item;
}
}
}
-//TIZEN_ONLY(20160527) : expose label as at-spi object
-static char *
-_label_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
-{
- ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN_VAL(data, sd, NULL);
- return strdup((char *)sd->label_str);
-}
-//
-
static void
_view_init(Evas_Object *obj, Efl_Ui_Multibuttonentry_Data *sd)
{
//TIZEN_ONLY(20160527) : expose label as at-spi object
if (_elm_config->atspi_mode)
- {
- Evas_Object *label_obj;
- label_obj = (Evas_Object *)edje_object_part_object_get(sd->label, "elm.text");
- if (label_obj)
- {
- sd->label_access = elm_access_object_register(label_obj, obj);
- _elm_access_callback_set(_elm_access_info_get(sd->label_access),
- ELM_ACCESS_INFO, _label_access_info_cb, obj);
- efl_access_role_set(sd->label_access, EFL_ACCESS_ROLE_HEADING);
- evas_object_pass_events_set(label_obj, !_elm_config->atspi_mode);
- evas_object_propagate_events_set(sd->label, !_elm_config->atspi_mode);
- }
- }
- ///
+ _atspi_multibuttonentry_label_register(obj, EINA_TRUE);
+ //
sd->entry = efl_add(EFL_UI_TEXT_CLASS, sd->box,
efl_text_multiline_set(efl_added, EINA_FALSE),
_access_multibuttonentry_item_register(obj, it, is_access);
}
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+static void
+_atspi_obj_process(Evas_Object *obj, Eina_Bool is_atspi)
+{
+ Eina_List *l;
+ Elm_Object_Item *it;
+
+ ELM_MULTIBUTTONENTRY_DATA_GET_OR_RETURN(obj, sd);
+
+ /* label */
+ _atspi_multibuttonentry_label_register(obj, is_atspi);
+
+ /* items */
+ EINA_LIST_FOREACH(sd->items, l, it)
+ _atspi_multibuttonentry_item_register(obj, it, is_atspi);
+}
+//
+
EOLIAN static void
_efl_ui_multibuttonentry_elm_widget_on_access_update(Eo *obj, Efl_Ui_Multibuttonentry_Data *sd EINA_UNUSED, Eina_Bool acs)
{
_access_obj_process(obj, _efl_ui_multibuttonentry_smart_focus_next_enable);
}
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_multibuttonentry_elm_widget_atspi(Eo *obj, Elm_Multibuttonentry_Data *sd EINA_UNUSED, Eina_Bool is_atspi)
+{
+ _atspi_obj_process(obj, is_atspi);
+}
+//
+
EAPI Evas_Object *
elm_multibuttonentry_add(Evas_Object *parent)
{
Elm.Widget.on_access_update;
Efl.Ui.Translatable.translation_update;
Elm.Widget.widget_event;
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
+ Elm.Widget.atspi;
+ //
Efl.Access.children { get; }
Efl.Part.part;
Efl.Ui.Format.format_cb { set; }
}
}
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+void
+_elm_win_atspi(Eina_Bool is_atspi)
+{
+ Evas *evas;
+ const Eina_List *l;
+ Evas_Object *obj;
+ Evas_Object *fobj;
+
+ EINA_LIST_FOREACH(_elm_win_list, l, obj)
+ {
+ elm_widget_atspi(obj, is_atspi);
+
+ /* floating orphan object. if there are A, B, C objects and user does
+ as below, then there would be floating orphan objects.
+
+ 1. elm_object_content_set(layout, A);
+ 2. elm_object_content_set(layout, B);
+ 3. elm_object_content_set(layout, C);
+
+ now, the object A and B are floating orphan objects */
+
+ fobj = obj;
+ for (;;)
+ {
+ fobj = evas_object_below_get(fobj);
+ if (!fobj) break;
+
+ if (elm_widget_is(fobj) && !elm_widget_parent_get(fobj))
+ {
+ elm_widget_atspi(fobj, is_atspi);
+ }
+ }
+
+ if (!is_atspi)
+ {
+ efl_access_component_highlight_clear(obj);
+ }
+ }
+}
+//
+
void
_elm_win_translate(void)
{
static void
_unregister_naviframe_atspi_bridge_callbacks(Elm_Naviframe_Item_Data *it EINA_UNUSED)
{
- if (!_elm_config->atspi_mode) return;
-
Eo *bridge = _elm_atspi_bridge_get();
if (!bridge) return;
}
static void
-_atspi_expose_title(Elm_Naviframe_Item_Data *it)
+_atspi_expose_title(Elm_Naviframe_Item_Data *it, Eina_Bool is_atspi)
{
Eina_Bool connected = EINA_FALSE;
-
- if (!_elm_config->atspi_mode) return;
+ _unregister_naviframe_atspi_bridge_callbacks(it);
+ if (!is_atspi) return;
Eo *bridge = _elm_atspi_bridge_get();
if (!bridge) return;
evas_object_freeze_events_set(VIEW(it), EINA_FALSE);
//TIZEN ONLY(20151012): expose title as at-spi object
- _atspi_expose_title(it);
+ if (_elm_config->atspi_mode)
+ _atspi_expose_title(it, EINA_TRUE);
//
}
_access_obj_process(it, is_access);
}
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_naviframe_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Naviframe_Data *sd, Eina_Bool is_atspi)
+{
+ Elm_Naviframe_Item_Data *it;
+
+ EINA_INLIST_FOREACH(sd->stack, it)
+ _atspi_expose_title(it, is_atspi);
+}
+//
+
static void
_schedule_deferred(Elm_Naviframe_Op *nfo, Elm_Naviframe_Data *sd)
{
}
}
+//TIZEN ONLY(20150717): expose title as at-spi object
+static char *
+_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
+{
+ Eina_Strbuf *buf;
+ Elm_Popup_Data *priv = data;
+ char *ret = NULL;
+ if (priv->title_text)
+ {
+ buf = eina_strbuf_new();
+ eina_strbuf_append_printf(buf, "%s, %s", priv->title_text, N_("Title"));
+ ret = eina_strbuf_string_steal(buf);
+ eina_strbuf_free(buf);
+ return strdup(ret);
+ }
+ return NULL;
+}
+//
+
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+static void
+_atspi_expose_title(Eo *obj, Eina_Bool is_atspi)
+{
+ Evas_Object *ao = NULL;
+ ELM_POPUP_DATA_GET(obj, sd);
+
+ if (sd->title_text && is_atspi)
+ {
+ ao = _access_object_get(obj, ACCESS_TITLE_PART);
+ if (!ao)
+ {
+ ao = _elm_access_edje_object_part_object_register
+ (sd->main_layout, elm_layout_edje_get(sd->main_layout), ACCESS_TITLE_PART);
+ efl_access_role_set(ao, EFL_ACCESS_ROLE_HEADING);
+ _elm_access_callback_set(_elm_access_info_get(ao),
+ ELM_ACCESS_INFO, _access_info_cb, sd);
+ }
+ }
+ else
+ {
+ ao = _access_object_get(obj, ACCESS_TITLE_PART);
+ if (ao)
+ _elm_access_object_unregister(ao, NULL);
+ }
+}
+//
+
static void
_access_obj_process(Eo *obj, Eina_Bool is_access)
{
}
}
-//TIZEN ONLY(20150717): expose title as at-spi object
-static char *
-_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
-{
- Eina_Strbuf *buf;
- Elm_Popup_Data *priv = data;
- char *ret = NULL;
- if (priv->title_text)
- {
- buf = eina_strbuf_new();
- eina_strbuf_append_printf(buf, "%s, %s", priv->title_text, N_("Title"));
- ret = eina_strbuf_string_steal(buf);
- eina_strbuf_free(buf);
- return strdup(ret);
- }
- return NULL;
-}
-//
-
static Eina_Bool
_title_text_set(Evas_Object *obj,
const char *text)
//TIZEN ONLY(20150717): expose title as at-spi object
if (_elm_config->atspi_mode)
- {
- if (sd->title_text)
- {
- ao = _access_object_get(obj, ACCESS_TITLE_PART);
- if (!ao)
- {
- ao = _elm_access_edje_object_part_object_register
- (sd->main_layout, elm_layout_edje_get(sd->main_layout), ACCESS_TITLE_PART);
- efl_access_role_set(ao, EFL_ACCESS_ROLE_HEADING);
- _elm_access_callback_set(_elm_access_info_get(ao),
- ELM_ACCESS_INFO, _access_info_cb, sd);
- }
- }
- else
- {
- ao = _access_object_get(obj, ACCESS_TITLE_PART);
- if (ao)
- _elm_access_object_unregister(ao, NULL);
- }
- }
- //
+ _atspi_expose_title(obj, EINA_TRUE);
+
if (sd->title_text)
elm_layout_signal_emit(sd->main_layout, "elm,state,title,text,visible", "elm");
else
_access_obj_process(obj, is_access);
}
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_popup_elm_widget_atspi(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, Eina_Bool is_atspi)
+{
+ _atspi_expose_title(obj, is_atspi);
+}
+//
+
EAPI Evas_Object *
elm_popup_add(Evas_Object *parent)
{
_a11y_connection_init(data);
else
DBG("AT-SPI2 stack not enabled.");
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
+ _elm_win_atspi(is_enabled);
+ //
}
static void _bridge_object_register(Eo *bridge, Eo *obj)
_a11y_connection_init(bridge);
else
_a11y_connection_shutdown(bridge);
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
+ _elm_win_atspi(val);
+ //
}
}
Eo *bridge = _elm_atspi_bridge_get();
if (!bridge) return;
- efl_event_callback_del(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, NULL);
- efl_event_callback_del(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_connect_cb, NULL);
+ efl_event_callback_del(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, obj);
+ efl_event_callback_del(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_connect_cb, obj);
}
static void
-_register_smart_callbacks_for_calendar_buttons(Evas_Object *obj)
+_atspi_expose_objects(Evas_Object *obj, Eina_Bool is_atspi)
{
Eina_Bool connected = EINA_FALSE;
-
- if (!_elm_config->atspi_mode) return;
-
- Eo *bridge = _elm_atspi_bridge_get();
- if (!bridge) return;
-
- // If already connected register callendar buttons callbacks
- connected = elm_obj_atspi_bridge_connected_get(bridge);
- if (connected)
- _calendar_atspi_bridge_on_connect_cb(obj, NULL);
-
// Register bridge connect/disconnect
_unregister_atspi_calendar_bridge_callbacks(obj);
- efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, NULL);
- efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_disconnect_cb, NULL);
+ if (is_atspi)
+ {
+ // If already connected register callendar buttons callbacks
+ Eo *bridge = _elm_atspi_bridge_get();
+ if (!bridge) return;
+ connected = elm_obj_atspi_bridge_connected_get(bridge);
+ if (connected)
+ _calendar_atspi_bridge_on_connect_cb(obj, NULL);
+ efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _calendar_atspi_bridge_on_connect_cb, obj);
+ efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _calendar_atspi_bridge_on_disconnect_cb, obj);
+ }
}
//
edje_object_message_signal_process(elm_layout_edje_get(obj));
//TIZEN_ONLY(20151012): Register smart callbacks for calendar buttons.
- _register_smart_callbacks_for_calendar_buttons(obj);
+ if (_elm_config->atspi_mode)
+ _atspi_expose_objects(obj, EINA_TRUE);
//
_flush_calendar_composite_elements(obj, sd);
_access_obj_process(obj, _elm_calendar_smart_focus_next_enable);
}
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_calendar_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Calendar_Data *_pd EINA_UNUSED, Eina_Bool is_atspi)
+{
+ _atspi_expose_objects(obj, is_atspi);
+}
+//
+
EAPI Evas_Object *
elm_calendar_add(Evas_Object *parent)
{
Elm.Widget.on_access_update;
Elm.Widget.on_focus_update;
Elm.Widget.widget_event;
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
+ Elm.Widget.atspi;
+ //
Efl.Access.Widget.Action.elm_actions { get; }
}
events {
}
static void
-_atspi_expose_flipselector_top_bottom(Elm_Flipselector_Data *sd)
+_atspi_expose_flipselector_top_bottom(Elm_Flipselector_Data *sd, Eina_Bool is_atspi)
{
Eina_Bool connected = EINA_FALSE;
- if (!_elm_config->atspi_mode) return;
-
- Eo *bridge = _elm_atspi_bridge_get();
- if (!bridge) return;
-
sd->access_top_button = NULL;
sd->access_bottom_button = NULL;
- // Expose flipselector buttons
- connected = elm_obj_atspi_bridge_connected_get(bridge);
- if (connected)
- _flipselector_atspi_bridge_on_connect_cb(sd, NULL);
-
- // Register for ATSPI bridge enable/disable
+ // UnRegister for ATSPI bridge enable/disable
_unregister_flipselector_atspi_bridge_callbacks(sd);
- efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _flipselector_atspi_bridge_on_connect_cb, NULL);
- efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _flipselector_atspi_bridge_on_disconnect_cb, NULL);
+
+ if (is_atspi)
+ {
+ // Expose flipselector buttons
+ Eo *bridge = _elm_atspi_bridge_get();
+ if (!bridge) return;
+ connected = elm_obj_atspi_bridge_connected_get(bridge);
+ if (connected)
+ _flipselector_atspi_bridge_on_connect_cb(sd, NULL);
+
+ efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_CONNECTED, _flipselector_atspi_bridge_on_connect_cb, NULL);
+ efl_event_callback_add(bridge, ELM_ATSPI_BRIDGE_EVENT_DISCONNECTED, _flipselector_atspi_bridge_on_disconnect_cb, NULL);
+ }
+}
+//
+
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EOLIAN static void
+_elm_flipselector_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Flipselector_Data *sd, Eina_Bool is_atspi)
+{
+ _atspi_expose_flipselector_top_bottom(sd, is_atspi);
}
//
efl_access_role_set(obj, EFL_ACCESS_ROLE_LIST);
//TIZEN ONLY(20151012): expose flipselector top/bottom buttons for accessibility tree
- _atspi_expose_flipselector_top_bottom(sd);
- //
+ if (_elm_config->atspi_mode)
+ _atspi_expose_flipselector_top_bottom(sd, EINA_TRUE);
+ //
return obj;
}
Efl.Object.constructor;
Elm.Widget.theme_apply;
Elm.Widget.widget_event;
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
+ Elm.Widget.atspi;
+ //
Efl.Ui.Range.range_min_max { get; set; }
Efl.Ui.Range.range_step { get; set; }
Efl.Ui.Range.range_value { get; set; }
This pops an item that is on the top(visible) of the naviframe, makes it
disappear, then deletes the item. The item that was underneath it on the
stack will become visible.
-
+
When pop transition animation is in progress, new pop operation is blocked until current pop operation
is complete.
]]
The item pushed becomes one page of the naviframe, this item will be
deleted when it is popped.
-
+
When push transition animation is in progress, pop operation is blocked until push is complete.
The following styles are available for this item:
Efl.Ui.Translatable.translation_update;
Elm.Widget.theme_apply;
Elm.Widget.widget_event;
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
+ Elm.Widget.atspi;
+ //
Efl.Layout.Signal.signal_emit;
Efl.Access.Widget.Action.elm_actions { get; }
Elm.Widget.resize_object { set; }
//TIZEN_ONLY(20160726): add API elm_object_part_access_object_get
Elm.Widget.part_access_object_get;
//
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
+ Elm.Widget.atspi;
+ //
Efl.Layout.Signal.signal_emit;
Efl.Access.Widget.Action.elm_actions { get; }
Efl.Access.state_set { get; }
void _elm_win_rescale(Elm_Theme *th,
Eina_Bool use_theme);
void _elm_win_access(Eina_Bool is_access);
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+void _elm_win_atspi(Eina_Bool is_atspi);
+//
void _elm_win_translate(void);
void _elm_win_focus_reconfigure(void);
void _elm_win_standard_init(Eo *win);
return sd->access_info;
}
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EAPI Eina_Bool
+elm_widget_atspi(Evas_Object *obj,
+ Eina_Bool is_atspi)
+{
+ const Eina_List *l;
+ Evas_Object *child;
+ Eina_Bool ret = EINA_TRUE;
+
+ API_ENTRY return EINA_FALSE;
+ EINA_LIST_FOREACH(sd->subobjs, l, child)
+ {
+ if (elm_widget_is(child))
+ ret &= elm_widget_atspi(child, is_atspi);
+ }
+ elm_obj_widget_atspi(obj, is_atspi);
+
+ return ret;
+}
+
+EOLIAN static void
+_elm_widget_atspi(Eo *obj EINA_UNUSED, Elm_Widget_Smart_Data *_pd EINA_UNUSED, Eina_Bool is_atspi EINA_UNUSED)
+{
+}
+//
+
EAPI Elm_Theme *
elm_widget_theme_get(const Evas_Object *obj)
{
legacy: null; /* FIXME: legacy API does extra work */
}
+ //TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+ //register/unregister access objects accordingly.
+ atspi {
+ [['Virtual' function on the widget being set access.]]
+ params {
+ @in is_atspi: bool;
+ }
+ legacy: null;
+ }
+ //
+
/* Internal hooks. */
widget_sub_object_add @protected {
[[Virtual function handling sub objects being added.
EAPI Evas_Object *elm_widget_add(Evas_Smart *, Evas_Object *);
EAPI Eina_Bool elm_widget_api_check(int ver);
EAPI Eina_Bool elm_widget_access(Evas_Object *obj, Eina_Bool is_access);
+//TIZEN_ONLY(20160822): When atspi mode is dynamically switched on/off,
+//register/unregister access objects accordingly.
+EAPI Eina_Bool elm_widget_atspi(Evas_Object *obj, Eina_Bool is_atspi);
+//
EAPI Efl_Ui_Theme_Apply elm_widget_theme(Evas_Object *obj);
EAPI void elm_widget_theme_specific(Evas_Object *obj, Elm_Theme *th, Eina_Bool force);
EAPI void elm_widget_on_show_region_hook_set(Evas_Object *obj, void *data, Efl_Ui_Scrollable_On_Show_Region func, Eina_Free_Cb data_free);