Merge "[screen reader utils] fun display_info_about_object() moved to utils" into...
authorTomasz Wozniak <t.wozniak@samsung.com>
Fri, 18 Nov 2016 08:05:57 +0000 (00:05 -0800)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 18 Nov 2016 08:05:57 +0000 (00:05 -0800)
1  2 
src/navigator.c

diff --cc src/navigator.c
index 1454de1e4de03d76185900f51102f6c4988c9314,edb0c70b90078ca0e302a5268ed9b9a5fb140a63..0221b6f44c657e3dc044d6c847e30b52cfee3227
@@@ -272,79 -171,63 +171,8 @@@ static void _send_highlighted_object_in
                eldbus_connection_unref(conn);
  
        eldbus_shutdown();
- }
- static void display_info_about_object(AtspiAccessible *obj, bool display_parent_info)
- {
-       if(!obj)
-       {
-               return;
-       }
-       DEBUG("START");
-       DEBUG("------------------------");
-       gchar *name = atspi_accessible_get_name(obj, NULL);
-       gchar *role = atspi_accessible_get_localized_role_name(obj, NULL);
-       gchar *description = atspi_accessible_get_description(obj, NULL);
-       char *state_name = NULL;
-       AtspiStateSet *st = atspi_accessible_get_state_set(obj);
-       GArray *states = atspi_state_set_get_states(st);
-       AtspiComponent *comp = atspi_accessible_get_component_iface(obj);
-       AtspiValue *value = atspi_accessible_get_value_iface(obj);
-       AtspiRect *rect_screen = atspi_component_get_extents(comp, ATSPI_COORD_TYPE_SCREEN, NULL);
-       AtspiRect *rect_win = atspi_component_get_extents(comp, ATSPI_COORD_TYPE_WINDOW, NULL);
-       if(display_parent_info) {
-               AtspiAccessible *parent = atspi_accessible_get_parent(obj, NULL);
-               display_info_about_object(parent, false);
-               g_object_unref(parent);
-       }
-       DEBUG("NAME:%s", name);
-       DEBUG("ROLE:%s", role);
-       DEBUG("DESCRIPTION:%s", description);
-       DEBUG("CHILDS:%d", atspi_accessible_get_child_count(obj, NULL));
-       DEBUG("HIGHLIGHT_INDEX:%d", atspi_component_get_highlight_index(comp, NULL));
-       DEBUG("INDEX IN PARENT:%d", atspi_accessible_get_index_in_parent(obj, NULL));
-       if (value) {
-               DEBUG("VALUE:%f", atspi_value_get_current_value(value, NULL));
-               DEBUG("VALUE MAX:%f", atspi_value_get_maximum_value(value, NULL));
-               DEBUG("VALUE MIN:%f", atspi_value_get_minimum_value(value, NULL));
-               g_object_unref(value);
-       }
-       DEBUG("STATES:");
-       int a;
-       AtspiStateType stat;
-       for (a = 0; states && (a < states->len); ++a) {
-               stat = g_array_index(states, AtspiStateType, a);
-               state_name = state_to_char(stat);
-               DEBUG("   %s", state_name);
-               free(state_name);
-       }
-       g_array_free(states, 0);
-       DEBUG("LOCALE:%s", atspi_accessible_get_object_locale(obj, NULL));
-       DEBUG("SIZE ON SCREEN, width:%d, height:%d", rect_screen->width, rect_screen->height);
-       DEBUG("POSITION ON SCREEN: x:%d y:%d", rect_screen->x, rect_screen->y);
-       DEBUG("SIZE ON WIN, width:%d, height:%d", rect_win->width, rect_win->height);
-       DEBUG("POSITION ON WIN: x:%d y:%d", rect_win->x, rect_win->y);
-       DEBUG("INTERFACES:");
-       GArray *ifaces = atspi_accessible_get_interfaces(obj);
-       for (a = 0; ifaces && (a < ifaces->len); ++a) {
-               gchar *interface_name = g_array_index(ifaces, gchar *, a);
-               DEBUG("   %s", interface_name);
-               g_free(interface_name);
-       }
-       if (ifaces)
-               g_array_free(ifaces, FALSE);
-       DEBUG("------------------------");
-       DEBUG("END");
-       g_free(name);
-       g_free(role);
-       g_free(description);
  }
  
 -char *generate_description_for_subtrees(AtspiAccessible *obj)
 -{
 -      DEBUG("START");
 -
 -      if (!obj)
 -              return strdup("");
 -      return strdup("");
 -      /*
 -         AtspiRole role;
 -         int child_count;
 -         int i;
 -         char *name = NULL;
 -         char *below = NULL;
 -         char ret[TTS_MAX_TEXT_SIZE] = "\0";
 -         AtspiAccessible *child = NULL;
 -
 -         int child_count = atspi_accessible_get_child_count(obj, NULL);
 -
 -         role = atspi_accessible_get_role(obj, NULL);
 -
 -         // Do not generate that for popups
 -         if (role == ATSPI_ROLE_POPUP_MENU || role == ATSPI_ROLE_DIALOG)
 -         return strdup("");
 -
 -         child_count = atspi_accessible_get_child_count(obj, NULL);
 -
 -         DEBUG("There is %d children inside this object", child_count);
 -         if (!child_count)
 -         return strdup("");
 -
 -         for (i=0; i < child_count; i++)
 -         {
 -         child = atspi_accessible_get_child_at_index(obj, i, NULL);
 -         name = atspi_accessible_get_name(child, NULL);
 -         DEBUG("%d child name:%s", i, name);
 -         if (name && strncmp(name, "\0", 1))
 -         {
 -         strncat(ret, name, sizeof(ret) - strlen(ret) - 1);
 -         }
 -         strncat(ret, " ", sizeof(ret) - strlen(ret) - 1);
 -         below = generate_description_for_subtrees(child);
 -         DEBUG("%s from below", below);
 -         if (strncmp(below, "\0", 1))
 -         {
 -         strncat(ret, below, sizeof(ret) - strlen(ret) - 1);
 -         }
 -
 -         g_object_unref(child);
 -         free(below);
 -         free(name);
 -         }
 -         return strdup(ret);
 -       */
 -}
 -
  static int _check_list_children_count(AtspiAccessible *obj)
  {
        int list_count = 0;