[mutter/wip/chergert/has-accessible: 10/11] clutter: add clutter_actor_has_accessible()
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/chergert/has-accessible: 10/11] clutter: add clutter_actor_has_accessible()
- Date: Mon, 24 Feb 2020 22:21:52 +0000 (UTC)
commit 629a4b4c2102756d5ad42544996cbf31b43d1a8a
Author: Christian Hergert <chergert redhat com>
Date: Sun Feb 23 14:07:24 2020 -0800
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
clutter/clutter/clutter-actor.c | 11 +++++++++++
clutter/clutter/clutter-actor.h | 5 ++++-
2 files changed, 15 insertions(+), 1 deletion(-)
---
diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
index 8dd22476a..4964586a9 100644
--- a/clutter/clutter/clutter-actor.c
+++ b/clutter/clutter/clutter-actor.c
@@ -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;
+}
diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h
index bb968ddd0..e4f25d985 100644
--- a/clutter/clutter/clutter-actor.h
+++ b/clutter/clutter/clutter-actor.h
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]