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,6 +64,21 @@ _efl_access_component_accessible_at_point_get(Eo *obj, void *_pd EINA_UNUSED, Ei
|
|||
return ret;
|
||||
}
|
||||
|
||||
Eina_Rect
|
||||
_efl_access_component_screen_coords_extents_get(const Eo *obj, Eina_Rect r)
|
||||
{
|
||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
||||
if (ee)
|
||||
{
|
||||
int ee_x = 0, ee_y = 0;
|
||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
||||
r.x += ee_x;
|
||||
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)
|
||||
{
|
||||
|
@ -72,14 +87,7 @@ _efl_access_component_extents_get(const Eo *obj, void *_pd EINA_UNUSED, Eina_Boo
|
|||
r = efl_gfx_entity_geometry_get(obj);
|
||||
if (screen_coords)
|
||||
{
|
||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
||||
if (ee)
|
||||
{
|
||||
int ee_x = 0, ee_y = 0;
|
||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
||||
r.x += ee_x;
|
||||
r.y += ee_y;
|
||||
}
|
||||
r = _efl_access_component_screen_coords_extents_get(obj, 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
|
||||
_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;
|
||||
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);
|
||||
if (screen_coords)
|
||||
{
|
||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(image));
|
||||
if (!ee) return r;
|
||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
||||
r.x += ee_x;
|
||||
r.y += ee_y;
|
||||
r = _efl_access_component_screen_coords_extents_get(obj, r);
|
||||
}
|
||||
elm_image_object_size_get(obj, &r.w, &r.h);
|
||||
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)
|
||||
{
|
||||
Eina_Rect r = EINA_RECT(-1, -1, -1, -1);
|
||||
int ee_x, ee_y;
|
||||
|
||||
if (!sd->view) return r;
|
||||
|
||||
r = efl_gfx_entity_geometry_get(sd->view);
|
||||
if (screen_coords)
|
||||
{
|
||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(sd->view));
|
||||
if (ee)
|
||||
{
|
||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
||||
r.x += ee_x;
|
||||
r.y += ee_y;
|
||||
}
|
||||
r = _efl_access_component_screen_coords_extents_get(obj, 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)
|
||||
{
|
||||
Eina_Rect r;
|
||||
int ee_x, ee_y;
|
||||
|
||||
r = efl_gfx_entity_geometry_get(obj);
|
||||
r.x = r.y = 0;
|
||||
if (screen_coords)
|
||||
{
|
||||
Ecore_Evas *ee = ecore_evas_ecore_evas_get(evas_object_evas_get(obj));
|
||||
if (ee)
|
||||
{
|
||||
ecore_evas_geometry_get(ee, &ee_x, &ee_y, NULL, NULL);
|
||||
r.x += ee_x;
|
||||
r.y += ee_y;
|
||||
}
|
||||
r = _efl_access_component_screen_coords_extents_get(obj, 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);
|
||||
Eina_Rect _efl_access_component_screen_coords_extents_get(const Eo *obj, Eina_Rect r);
|
||||
|
||||
/* Combobox: no proper support for Efl.Part API yet. */
|
||||
void _elm_combobox_part_text_set(Eo *obj, const char * part, const char *label);
|
||||
|
|
Loading…
Reference in New Issue