[gtk+/quartz-integration: 337/563] Dump AtkComponent properties



commit 3bf96b55c7539ab121ff0a843ef14e47b0a3b7a4
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 19 19:51:15 2011 -0400

    Dump AtkComponent properties
    
    Note that the spatial aspects of AtkComponent are all dependent
    on fonts and other environmental factors, thus we only dump the
    little bits outside of that.

 tests/a11y/accessibility-dump.c |   33 +++++++++++++++++++++++++++++++++
 tests/a11y/accessible-name.txt  |    6 ++++++
 tests/a11y/hello-world.txt      |    6 ++++++
 tests/a11y/link.txt             |    6 ++++++
 tests/a11y/mnemonic.txt         |   12 ++++++++++++
 tests/a11y/notebook.txt         |   18 ++++++++++++++++++
 tests/a11y/range.txt            |    6 ++++++
 tests/a11y/text.txt             |    6 ++++++
 8 files changed, 93 insertions(+), 0 deletions(-)
---
diff --git a/tests/a11y/accessibility-dump.c b/tests/a11y/accessibility-dump.c
index be0950b..457b461 100644
--- a/tests/a11y/accessibility-dump.c
+++ b/tests/a11y/accessibility-dump.c
@@ -264,6 +264,36 @@ dump_text_attributes (GString         *string,
   atk_attribute_set_free (attributes);
 }
 
+extern GType atk_layer_get_type (void);
+
+static const gchar *
+layer_name (AtkLayer layer)
+{
+  GEnumClass *class;
+  GEnumValue *value;
+
+  class = g_type_class_ref (atk_layer_get_type ());
+  value = g_enum_get_value (class, layer);
+  g_type_class_unref (class);
+
+  return value->value_nick;
+}
+
+static void
+dump_atk_component (AtkComponent *atk_component,
+                    guint         depth,
+                    GString      *string)
+{
+  AtkLayer layer;
+
+  g_string_append_printf (string, "%*s<AtkComponent>\n", depth, "");
+
+  layer = atk_component_get_layer (atk_component);
+  g_string_append_printf (string, "%*slayer: %s\n", depth, "", layer_name (layer));
+
+  g_string_append_printf (string, "%*salpha: %g\n", depth, "", atk_component_get_alpha (atk_component));
+}
+
 static void
 dump_atk_text (AtkText *atk_text,
                guint    depth,
@@ -435,6 +465,9 @@ dump_accessible (AtkObject     *accessible,
   dump_state_set (string, depth, atk_object_ref_state_set (accessible));
   dump_attribute_set (string, depth, atk_object_get_attributes (accessible));
 
+  if (ATK_IS_COMPONENT (accessible))
+    dump_atk_component (ATK_COMPONENT (accessible), depth, string);
+
   if (ATK_IS_TEXT (accessible))
     dump_atk_text (ATK_TEXT (accessible), depth, string);
 
diff --git a/tests/a11y/accessible-name.txt b/tests/a11y/accessible-name.txt
index cc427fd..cd88807 100644
--- a/tests/a11y/accessible-name.txt
+++ b/tests/a11y/accessible-name.txt
@@ -3,6 +3,9 @@ window1
   index: 0
   state: enabled resizable sensitive showing visible
   toolkit: gail
+  <AtkComponent>
+  layer: window
+  alpha: 1
   button1
     "push button"
     parent: window1
@@ -10,6 +13,9 @@ window1
     name: Accessible name
     state: enabled focusable sensitive showing visible
     toolkit: gail
+    <AtkComponent>
+    layer: widget
+    alpha: 1
     <AtkText>
     text: Hello World!
     character count: 12
diff --git a/tests/a11y/hello-world.txt b/tests/a11y/hello-world.txt
index 1714b4a..92fab61 100644
--- a/tests/a11y/hello-world.txt
+++ b/tests/a11y/hello-world.txt
@@ -3,6 +3,9 @@ window1
   index: 0
   state: enabled resizable sensitive showing visible
   toolkit: gail
+  <AtkComponent>
+  layer: window
+  alpha: 1
   button1
     "push button"
     parent: window1
@@ -10,6 +13,9 @@ window1
     name: Hello World!
     state: enabled focusable sensitive showing visible
     toolkit: gail
+    <AtkComponent>
+    layer: widget
+    alpha: 1
     <AtkText>
     text: Hello World!
     character count: 12
diff --git a/tests/a11y/link.txt b/tests/a11y/link.txt
index 7866eff..629917a 100644
--- a/tests/a11y/link.txt
+++ b/tests/a11y/link.txt
@@ -3,6 +3,9 @@ window1
   index: 0
   state: enabled resizable sensitive showing visible
   toolkit: gail
+  <AtkComponent>
+  layer: window
+  alpha: 1
   button1
     "push button"
     parent: window1
@@ -10,6 +13,9 @@ window1
     name: Hello World!
     state: enabled focusable sensitive showing visible
     toolkit: gail
+    <AtkComponent>
+    layer: widget
+    alpha: 1
     <AtkText>
     text: Hello World!
     character count: 12
diff --git a/tests/a11y/mnemonic.txt b/tests/a11y/mnemonic.txt
index ea5dc31..ae3ff4c 100644
--- a/tests/a11y/mnemonic.txt
+++ b/tests/a11y/mnemonic.txt
@@ -3,12 +3,18 @@ window1
   index: 0
   state: enabled resizable sensitive showing visible
   toolkit: gail
+  <AtkComponent>
+  layer: window
+  alpha: 1
   box1
     "filler"
     parent: window1
     index: 0
     state: enabled horizontal sensitive
     toolkit: gail
+    <AtkComponent>
+    layer: widget
+    alpha: 1
     label1
       "label"
       parent: box1
@@ -17,6 +23,9 @@ window1
       label-for: entry1
       state: enabled multi-line sensitive visible
       toolkit: gail
+      <AtkComponent>
+      layer: widget
+      alpha: 1
       <AtkText>
       text: Entry:
       character count: 6
@@ -29,6 +38,9 @@ window1
       labelled-by: label1
       state: editable enabled focusable sensitive single-line visible
       toolkit: gail
+      <AtkComponent>
+      layer: widget
+      alpha: 1
       <AtkText>
       text: text
       character count: 4
diff --git a/tests/a11y/notebook.txt b/tests/a11y/notebook.txt
index 18258af..49eb9b0 100644
--- a/tests/a11y/notebook.txt
+++ b/tests/a11y/notebook.txt
@@ -3,12 +3,18 @@ window1
   index: 0
   state: enabled resizable sensitive showing visible
   toolkit: gail
+  <AtkComponent>
+  layer: window
+  alpha: 1
   notebook1
     "page tab list"
     parent: window1
     index: 0
     state: enabled focusable sensitive showing visible
     toolkit: gail
+    <AtkComponent>
+    layer: widget
+    alpha: 1
     <AtkSelection>
     selection count: 1
     selected children: 0
@@ -18,6 +24,9 @@ window1
       index: 0
       name: Tab 1
       state: enabled multi-line selectable selected sensitive showing visible
+      <AtkComponent>
+      layer: widget
+      alpha: 1
       <AtkText>
       text: Tab 1
       character count: 5
@@ -29,6 +38,9 @@ window1
         name: Yes
         state: enabled focusable sensitive showing visible
         toolkit: gail
+        <AtkComponent>
+        layer: widget
+        alpha: 1
         <AtkText>
         text: Yes
         character count: 3
@@ -48,6 +60,9 @@ window1
       index: 1
       name: Tab 2
       state: enabled multi-line selectable sensitive showing visible
+      <AtkComponent>
+      layer: widget
+      alpha: 1
       <AtkText>
       text: Tab 2
       character count: 5
@@ -59,6 +74,9 @@ window1
         name: No
         state: enabled focusable sensitive visible
         toolkit: gail
+        <AtkComponent>
+        layer: widget
+        alpha: 1
         <AtkText>
         text: No
         character count: 2
diff --git a/tests/a11y/range.txt b/tests/a11y/range.txt
index 75e3939..56007ad 100644
--- a/tests/a11y/range.txt
+++ b/tests/a11y/range.txt
@@ -3,12 +3,18 @@ window1
   index: 0
   state: enabled resizable sensitive showing visible
   toolkit: gail
+  <AtkComponent>
+  layer: window
+  alpha: 1
   scale1
     "slider"
     parent: window1
     index: 0
     state: enabled focusable horizontal sensitive showing visible
     toolkit: gail
+    <AtkComponent>
+    layer: widget
+    alpha: 1
     <AtkText>
     text: â45.5
     character count: 5
diff --git a/tests/a11y/text.txt b/tests/a11y/text.txt
index 8293910..434bac8 100644
--- a/tests/a11y/text.txt
+++ b/tests/a11y/text.txt
@@ -3,12 +3,18 @@ window1
   index: 0
   state: enabled resizable sensitive showing visible
   toolkit: gail
+  <AtkComponent>
+  layer: window
+  alpha: 1
   text1
     "text"
     parent: window1
     index: 0
     state: editable enabled focusable multi-line sensitive showing visible
     toolkit: gail
+    <AtkComponent>
+    layer: widget
+    alpha: 1
     <AtkText>
     text: Twas brillig, and the slithy toves
 Did gyre and gimple in the wabe



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