/** * @brief Gets the number of accessible children of the accessible * * Implementation AtkObject->get_n_children callback. * * @param obj AtkObject instance * * @returns integer representing the number of accessible children of * the accessible */ static gint eail_ctxpopup_get_n_children(AtkObject *obj) { Evas_Object *nested_widget = NULL; nested_widget = _eail_get_nested_widget(obj); if (nested_widget) return 1; return 0; }
/** * @brief Gets a reference to the specified accessible child of the object * * The accessible children are 0-based so the first accessible child * is at index 0, the second at index 1 and so on. * * Implementation of AtkObject->ref_child callback. * * @param obj AtkObject instance * @param i index of the child * * @returns AtkObject representing the specified accessible child of the * accessible */ static AtkObject * eail_ctxpopup_ref_child(AtkObject *obj, gint i) { Evas_Object *nested_widget = NULL; AtkObject *atk_obj; nested_widget = _eail_get_nested_widget(obj); atk_obj = eail_factory_get_accessible(nested_widget); if (atk_obj) g_object_ref(atk_obj); return atk_obj; }
/** * @brief Prepares Eina_List filled with Evas_Object * objects * representing nested content in elm_popup widget * * @param obj an AtkObject * * @return filled list with Evas_Object* objects. Call eina_list_free on that * list when results processing has been finished */ static Eina_List * _eail_popup_get_items(AtkObject *obj) { Eina_List *items = NULL; Evas_Object *widget = NULL; gint i = 0; /* nested widget */ widget = _eail_get_nested_widget(obj); if (widget) items = eina_list_append(items, widget); /* action buttons below popup content */ for (i = 0; i < EAIL_POPUP_NUM_BUTTONS; ++i) { widget = _eail_get_nested_popup_button(obj, i); if (widget) items = eina_list_append(items, widget); } return items; }