forked from enlightenment/efl
atspi: move duplicated code in one place
Summary: we do not have to change several place for updating. Reviewers: Hermet, jsuya, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12282
This commit is contained in:
parent
6fb139f5f1
commit
bc48081c93
|
@ -64,14 +64,9 @@ _efl_access_component_accessible_at_point_get(Eo *obj, void *_pd EINA_UNUSED, Ei
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
EOLIAN static Eina_Rect
|
Eina_Rect
|
||||||
_efl_access_component_extents_get(const Eo *obj, void *_pd EINA_UNUSED, Eina_Bool screen_coords)
|
_efl_access_component_screen_coords_extents_get(const Eo *obj, Eina_Rect r)
|
||||||
{
|
{
|
||||||
Eina_Rect r;
|
|
||||||
|
|
||||||
r = efl_gfx_entity_geometry_get(obj);
|
|
||||||
if (screen_coords)
|
|
||||||
{
|
|
||||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
||||||
if (ee)
|
if (ee)
|
||||||
{
|
{
|
||||||
|
@ -80,6 +75,19 @@ _efl_access_component_extents_get(const Eo *obj, void *_pd EINA_UNUSED, Eina_Boo
|
||||||
r.x += ee_x;
|
r.x += ee_x;
|
||||||
r.y += ee_y;
|
r.y += ee_y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
EOLIAN static Eina_Rect
|
||||||
|
_efl_access_component_extents_get(const Eo *obj, void *_pd EINA_UNUSED, Eina_Bool screen_coords)
|
||||||
|
{
|
||||||
|
Eina_Rect r;
|
||||||
|
|
||||||
|
r = efl_gfx_entity_geometry_get(obj);
|
||||||
|
if (screen_coords)
|
||||||
|
{
|
||||||
|
r = _efl_access_component_screen_coords_extents_get(obj, r);
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2067,7 +2067,6 @@ _efl_ui_image_efl_gfx_arrangement_content_align_get(const Eo *obj EINA_UNUSED, E
|
||||||
EOLIAN static Eina_Rect
|
EOLIAN static Eina_Rect
|
||||||
_efl_ui_image_efl_access_component_extents_get(const Eo *obj, Efl_Ui_Image_Data *sd EINA_UNUSED, Eina_Bool screen_coords)
|
_efl_ui_image_efl_access_component_extents_get(const Eo *obj, Efl_Ui_Image_Data *sd EINA_UNUSED, Eina_Bool screen_coords)
|
||||||
{
|
{
|
||||||
int ee_x, ee_y;
|
|
||||||
Eina_Rect r;
|
Eina_Rect r;
|
||||||
Evas_Object *image = elm_image_object_get(obj);
|
Evas_Object *image = elm_image_object_get(obj);
|
||||||
|
|
||||||
|
@ -2077,11 +2076,7 @@ _efl_ui_image_efl_access_component_extents_get(const Eo *obj, Efl_Ui_Image_Data
|
||||||
evas_object_geometry_get(image, &r.x, &r.y, NULL, NULL);
|
evas_object_geometry_get(image, &r.x, &r.y, NULL, NULL);
|
||||||
if (screen_coords)
|
if (screen_coords)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(image));
|
r = _efl_access_component_screen_coords_extents_get(obj, r);
|
||||||
if (!ee) return r;
|
|
||||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
|
||||||
r.x += ee_x;
|
|
||||||
r.y += ee_y;
|
|
||||||
}
|
}
|
||||||
elm_image_object_size_get(obj, &r.w, &r.h);
|
elm_image_object_size_get(obj, &r.w, &r.h);
|
||||||
return r;
|
return r;
|
||||||
|
|
|
@ -5107,20 +5107,13 @@ EOLIAN static Eina_Rect
|
||||||
_elm_widget_item_efl_access_component_extents_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd EINA_UNUSED, Eina_Bool screen_coords)
|
_elm_widget_item_efl_access_component_extents_get(const Eo *obj EINA_UNUSED, Elm_Widget_Item_Data *sd EINA_UNUSED, Eina_Bool screen_coords)
|
||||||
{
|
{
|
||||||
Eina_Rect r = EINA_RECT(-1, -1, -1, -1);
|
Eina_Rect r = EINA_RECT(-1, -1, -1, -1);
|
||||||
int ee_x, ee_y;
|
|
||||||
|
|
||||||
if (!sd->view) return r;
|
if (!sd->view) return r;
|
||||||
|
|
||||||
r = efl_gfx_entity_geometry_get(sd->view);
|
r = efl_gfx_entity_geometry_get(sd->view);
|
||||||
if (screen_coords)
|
if (screen_coords)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(sd->view));
|
r = _efl_access_component_screen_coords_extents_get(obj, r);
|
||||||
if (ee)
|
|
||||||
{
|
|
||||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
|
||||||
r.x += ee_x;
|
|
||||||
r.y += ee_y;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -7485,19 +7485,12 @@ EOLIAN static Eina_Rect
|
||||||
_efl_ui_win_efl_access_component_extents_get(const Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, Eina_Bool screen_coords)
|
_efl_ui_win_efl_access_component_extents_get(const Eo *obj, Efl_Ui_Win_Data *_pd EINA_UNUSED, Eina_Bool screen_coords)
|
||||||
{
|
{
|
||||||
Eina_Rect r;
|
Eina_Rect r;
|
||||||
int ee_x, ee_y;
|
|
||||||
|
|
||||||
r = efl_gfx_entity_geometry_get(obj);
|
r = efl_gfx_entity_geometry_get(obj);
|
||||||
r.x = r.y = 0;
|
r.x = r.y = 0;
|
||||||
if (screen_coords)
|
if (screen_coords)
|
||||||
{
|
{
|
||||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
r = _efl_access_component_screen_coords_extents_get(obj, r);
|
||||||
if (ee)
|
|
||||||
{
|
|
||||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
|
||||||
r.x += ee_x;
|
|
||||||
r.y += ee_y;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
|
@ -848,6 +848,7 @@ EOAPI void efl_ui_focus_manager_calc_update_order(Eo *obj, Efl_Ui_Focus_Object *
|
||||||
|
|
||||||
|
|
||||||
void _efl_access_shutdown(void);
|
void _efl_access_shutdown(void);
|
||||||
|
Eina_Rect _efl_access_component_screen_coords_extents_get(const Eo *obj, Eina_Rect r);
|
||||||
|
|
||||||
/* Combobox: no proper support for Efl.Part API yet. */
|
/* Combobox: no proper support for Efl.Part API yet. */
|
||||||
void _elm_combobox_part_text_set(Eo *obj, const char * part, const char *label);
|
void _elm_combobox_part_text_set(Eo *obj, const char * part, const char *label);
|
||||||
|
|
Loading…
Reference in New Issue