[at-spi2-core] Add atspi_accessible_clear_cache



commit ceeff4934d735e18f1e96413335da9ea240094ea
Author: Mike Gorse <mgorse novell com>
Date:   Tue May 24 16:56:42 2011 -0500

    Add atspi_accessible_clear_cache

 atspi/atspi-accessible.c |   20 ++++++++++++++++++++
 atspi/atspi-accessible.h |    2 ++
 2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/atspi/atspi-accessible.c b/atspi/atspi-accessible.c
index 6784607..2a42d41 100644
--- a/atspi/atspi-accessible.c
+++ b/atspi/atspi-accessible.c
@@ -1395,6 +1395,26 @@ atspi_accessible_set_cache_mask (AtspiAccessible *accessible, AtspiCache mask)
   accessible->parent.app->cache = mask;
 }
 
+/**
+ * atspi_accessible_clear_cache:
+ * @accessible: The #AtspiAccessible whose cache to clear.
+ *
+ * Clears the cached information for the given accessible and all of its
+ * descendants.
+ */
+void
+atspi_accessible_clear_cache (AtspiAccessible *accessible)
+{
+  GList *l;
+
+  if (accessible)
+  {
+    accessible->cached_properties = ATSPI_CACHE_NONE;
+    for (l = accessible->children; l; l = l->next)
+      atspi_accessible_clear_cache (l->data);
+  }
+}
+
 static AtspiCache
 _atspi_accessible_get_cache_mask (AtspiAccessible *accessible)
 {
diff --git a/atspi/atspi-accessible.h b/atspi/atspi-accessible.h
index 60972aa..ffa7f40 100644
--- a/atspi/atspi-accessible.h
+++ b/atspi/atspi-accessible.h
@@ -131,6 +131,8 @@ GArray * atspi_accessible_get_interfaces (AtspiAccessible *obj);
 
 void atspi_accessible_set_cache_mask (AtspiAccessible *accessible, AtspiCache mask);
 
+void atspi_accessible_clear_cache (AtspiAccessible *accessible);
+
 /* private */
 void _atspi_accessible_add_cache (AtspiAccessible *accessible, AtspiCache flag);
 gboolean _atspi_accessible_test_cache (AtspiAccessible *accessible, AtspiCache flag);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]