mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 02:20:43 -05:00
clutter: add clutter_actor_has_accessible()
This new virtual function allows querying if an actor has an accessible without force creating the accessible. Doing so allows actors to more carefully avoid creating accessibles during removal of actors. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1044 https://gitlab.gnome.org/GNOME/mutter/merge_requests/1083
This commit is contained in:
parent
be269d0992
commit
629a4b4c21
@ -21192,3 +21192,14 @@ clutter_actor_create_texture_paint_node (ClutterActor *self,
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
gboolean
|
||||
clutter_actor_has_accessible (ClutterActor *actor)
|
||||
{
|
||||
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), FALSE);
|
||||
|
||||
if (CLUTTER_ACTOR_GET_CLASS (actor)->has_accessible)
|
||||
return CLUTTER_ACTOR_GET_CLASS (actor)->has_accessible (actor);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -299,10 +299,11 @@ struct _ClutterActorClass
|
||||
|
||||
gboolean (* touch_event) (ClutterActor *self,
|
||||
ClutterTouchEvent *event);
|
||||
gboolean (* has_accessible) (ClutterActor *self);
|
||||
|
||||
/*< private >*/
|
||||
/* padding for future expansion */
|
||||
gpointer _padding_dummy[26];
|
||||
gpointer _padding_dummy[25];
|
||||
};
|
||||
|
||||
/**
|
||||
@ -380,6 +381,8 @@ CLUTTER_EXPORT
|
||||
const gchar * clutter_actor_get_name (ClutterActor *self);
|
||||
CLUTTER_EXPORT
|
||||
AtkObject * clutter_actor_get_accessible (ClutterActor *self);
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_has_accessible (ClutterActor *self);
|
||||
|
||||
CLUTTER_EXPORT
|
||||
gboolean clutter_actor_is_visible (ClutterActor *self);
|
||||
|
Loading…
Reference in New Issue
Block a user