a11y: expose _cally_actor_get_top_level_origin in cally-actor-private
As this function is needed for atktext get_character_extents and get_offset_at_point implementations.
This commit is contained in:
parent
ae0aa9e4cf
commit
61ea64c8c1
@ -35,4 +35,8 @@
|
|||||||
#define CALLY_GET_CLUTTER_ACTOR(cally_object) \
|
#define CALLY_GET_CLUTTER_ACTOR(cally_object) \
|
||||||
(CLUTTER_ACTOR (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (cally_object))))
|
(CLUTTER_ACTOR (atk_gobject_accessible_get_object (ATK_GOBJECT_ACCESSIBLE (cally_object))))
|
||||||
|
|
||||||
|
void _cally_actor_get_top_level_origin (ClutterActor *actor,
|
||||||
|
gint *x,
|
||||||
|
gint *y);
|
||||||
|
|
||||||
#endif /* __CALLY_ACTOR_PRIVATE_H__ */
|
#endif /* __CALLY_ACTOR_PRIVATE_H__ */
|
||||||
|
@ -186,9 +186,6 @@ static void cally_actor_remove_focus_handler (AtkComponent *component,
|
|||||||
static void cally_actor_focus_event (AtkObject *obj,
|
static void cally_actor_focus_event (AtkObject *obj,
|
||||||
gboolean focus_in);
|
gboolean focus_in);
|
||||||
static gboolean _is_actor_on_screen (ClutterActor *actor);
|
static gboolean _is_actor_on_screen (ClutterActor *actor);
|
||||||
static void _get_top_level_origin (ClutterActor *actor,
|
|
||||||
gint *x,
|
|
||||||
gint *y);
|
|
||||||
|
|
||||||
/* AtkAction.h */
|
/* AtkAction.h */
|
||||||
static void cally_actor_action_interface_init (AtkActionIface *iface);
|
static void cally_actor_action_interface_init (AtkActionIface *iface);
|
||||||
@ -809,7 +806,7 @@ cally_actor_get_extents (AtkComponent *component,
|
|||||||
|
|
||||||
if (coord_type == ATK_XY_SCREEN)
|
if (coord_type == ATK_XY_SCREEN)
|
||||||
{
|
{
|
||||||
_get_top_level_origin (actor, &top_level_x, &top_level_y);
|
_cally_actor_get_top_level_origin (actor, &top_level_x, &top_level_y);
|
||||||
|
|
||||||
*x += top_level_x;
|
*x += top_level_x;
|
||||||
*y += top_level_y;
|
*y += top_level_y;
|
||||||
@ -914,14 +911,14 @@ _is_actor_on_screen (ClutterActor *actor)
|
|||||||
* required
|
* required
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static void
|
void
|
||||||
_get_top_level_origin (ClutterActor *actor,
|
_cally_actor_get_top_level_origin (ClutterActor *actor,
|
||||||
gint *x,
|
gint *xp,
|
||||||
gint *y)
|
gint *yp)
|
||||||
{
|
{
|
||||||
/* default values */
|
/* default values */
|
||||||
*x = 0;
|
gint x = 0;
|
||||||
*y = 0;
|
gint y = 0;
|
||||||
|
|
||||||
#ifdef HAVE_CLUTTER_GLX
|
#ifdef HAVE_CLUTTER_GLX
|
||||||
{
|
{
|
||||||
@ -941,7 +938,7 @@ _get_top_level_origin (ClutterActor *actor,
|
|||||||
stage_window = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
stage_window = clutter_x11_get_stage_window (CLUTTER_STAGE (stage));
|
||||||
|
|
||||||
return_val = XTranslateCoordinates (display, stage_window, root_window,
|
return_val = XTranslateCoordinates (display, stage_window, root_window,
|
||||||
0, 0, x, y,
|
0, 0, &x, &y,
|
||||||
&child);
|
&child);
|
||||||
|
|
||||||
if (!return_val)
|
if (!return_val)
|
||||||
@ -962,6 +959,12 @@ _get_top_level_origin (ClutterActor *actor,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (xp)
|
||||||
|
*xp = x;
|
||||||
|
|
||||||
|
if (yp)
|
||||||
|
*yp = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* AtkAction implementation */
|
/* AtkAction implementation */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user