Eina_Bool object_has_defunct_state(AtspiAccessible *obj);
Eina_Bool object_has_highlighted_state(AtspiAccessible *obj);
Eina_Bool object_get_extents(AtspiAccessible *object, AtspiRect *extents);
-Eina_Bool is_legacy_toolkit(AtspiAccessible *obj);
int get_percent_value(double value, double lower, double upper);
Eina_Bool rect_contains(const AtspiRect *rect, int x, int y);
Live_Region_Politeness try_parse_politeness(GHashTable *attrs, Eina_Bool assertive_by_default);
+Eina_Bool has_legacy_elm_type(AtspiAccessible *obj);
static inline void ESAL(Eina_Strbuf *buf, const char *txt)
{
DEBUG("Append Window");
window_tracker_window_append(atd->window_tracker_data, event->source, EINA_FALSE);
} else if (role == ATSPI_ROLE_PAGE_TAB) {
- if (is_legacy_toolkit(event->source)) {
+ if (has_legacy_elm_type(event->source)) {
// EFL only: refresh default label for newly showing page tab
DEBUG("Refreshing TAB");
timer_reschedule(atd);
}
case ATSPI_ROLE_PAGE_TAB: {
AtspiAccessible *parent = rm->parent;
- if (!parent || is_legacy_toolkit(rm->self)) break;
+ if (!parent || has_legacy_elm_type(rm->self)) break;
AtspiRole parent_role = rm->parent_role;
if (parent_role == ATSPI_ROLE_PAGE_TAB_LIST) {
}
case ATSPI_ROLE_PAGE_TAB: {
AtspiAccessible *parent = rm->parent;
- if (!parent || is_legacy_toolkit(rm->self)) break;
+ if (!parent || has_legacy_elm_type(rm->self)) break;
AtspiRole parent_role = rm->parent_role;
if (parent_role == ATSPI_ROLE_PAGE_TAB_LIST) {
return _object_has_state(obj, ATSPI_STATE_HIGHLIGHTED);
}
-Eina_Bool is_legacy_toolkit(AtspiAccessible *obj) {
- Eina_Bool ret = EINA_FALSE;
- AtspiAccessible *app = atspi_accessible_get_application(obj, NULL);
- if (app) {
- gchar* toolkit_name = atspi_accessible_get_toolkit_name(app, NULL);
- if (toolkit_name) {
- if (g_str_equal(toolkit_name, "elementary")) {
- ret = EINA_TRUE;
- }
- g_free(toolkit_name);
- }
- g_object_unref(app);
- }
- DEBUG("is_legacy_toolkit=%d", ret);
- return ret;
-}
-
int get_percent_value(double value, double lower, double upper)
{
double add_for_rounding = 0.5f;
DEBUG("speaking politeness mode is %d", mode);
return mode;
}
+
+Eina_Bool has_legacy_elm_type(AtspiAccessible *obj)
+{
+ Eina_Bool ret = EINA_FALSE;
+ GHashTable *attrs = atspi_accessible_get_attributes(obj, NULL);
+ if (attrs) {
+ const char *val = g_hash_table_lookup(attrs, "type");
+ if (val) {
+ DEBUG("type attr is '%s'", val);
+ if (g_strcmp0(val, "Elm_Layout") == 0 || g_strcmp0(val, "Eext.Sidenavi") == 0) ret = EINA_TRUE;
+ }
+
+ if (attrs) g_hash_table_unref(attrs);
+ }
+
+ return ret;
+}