remove dependency on grab_highligh and clear_highlight
authorLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 4 Mar 2015 10:56:47 +0000 (11:56 +0100)
committerLukasz Stanislawski <l.stanislaws@samsung.com>
Wed, 4 Mar 2015 10:57:23 +0000 (11:57 +0100)
Adjust screen reader for tv profile.

Change-Id: Icc8b24f0d51539ed5aa1b7d29f3c0a9ccca394e1

src/navigator.c

index 3b37c51..0531097 100644 (file)
@@ -44,66 +44,8 @@ static FlatNaviContext *context;
 static void
 _current_highlight_object_set(AtspiAccessible *obj)
 {
-   GError *err = NULL;
-   if (!obj)
-     {
-        DEBUG("Clearing highligjt object");
-        current_obj = NULL;
-        return;
-     }
-   if (current_obj == obj)
-     {
-        DEBUG("Object already highlighted");
-        return;
-     }
-    if (obj && ATSPI_IS_COMPONENT(obj))
-      {
-         AtspiComponent *comp = atspi_accessible_get_component(obj);
-         if (!comp)
-           {
-             GError *err = NULL;
-             gchar *role = atspi_accessible_get_role_name(obj, &err);
-             ERROR("AtspiComponent *comp NULL, [%s]", role);
-             GERROR_CHECK(err);
-             g_free(role);
-             return;
-           }
-         atspi_component_grab_highlight(comp, &err);
-         GERROR_CHECK(err)
-         gchar *name;
-         gchar *role;
-
-
-         current_obj = obj;
-         const ObjectCache *oc = object_cache_get(obj);
-
-         if (oc) {
-             name = atspi_accessible_get_name(obj, &err);
-             GERROR_CHECK(err)
-             role = atspi_accessible_get_role_name(obj, &err);
-             GERROR_CHECK(err)
-             DEBUG("New highlighted object: %s, role: %s, (%d %d %d %d)",
-               role,
-               name,
-               oc->bounds->x, oc->bounds->y, oc->bounds->width, oc->bounds->height);
-             haptic_vibrate_start();
-         }
-         else {
-           name = atspi_accessible_get_name(obj, &err);
-           GERROR_CHECK(err)
-           role = atspi_accessible_get_role_name(obj, &err);
-           GERROR_CHECK(err)
-           DEBUG("New highlighted object: %s, role: %s",
-               name,
-               role
-               );
-           haptic_vibrate_start();
-               }
-         g_free(role);
-         g_free(name);
-      }
-    else
-       DEBUG("Unable to highlight object");
+   //TODO
+   //speak virtually focused widget
 }
 
 void test_debug(AtspiAccessible *current_widget)
@@ -685,16 +627,6 @@ void navigator_init(void)
 
 void navigator_shutdown(void)
 {
-  GError *err = NULL;
-   if (current_obj)
-     {
-       AtspiComponent *comp = atspi_accessible_get_component(current_obj);
-       if (comp)
-         {
-           atspi_component_clear_highlight(comp, &err);
-           GERROR_CHECK(err);
-         }
-     }
    if (context)
      {
         flat_navi_context_free(context);