[gtk+] Dump AtkImage properties too



commit 22fc55f716e6cf026c84ca14b6c5b8e483d73cb8
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 19 15:30:01 2011 -0400

    Dump AtkImage properties too
    
    Update expected output to match.

 tests/a11y/accessibile-name.txt |   18 ++++++++++++++++++
 tests/a11y/accessibility-dump.c |   15 +++++++++++++++
 tests/a11y/accessible-name.txt  |    2 ++
 tests/a11y/hello-world.txt      |    2 ++
 4 files changed, 37 insertions(+), 0 deletions(-)
---
diff --git a/tests/a11y/accessibile-name.txt b/tests/a11y/accessibile-name.txt
new file mode 100644
index 0000000..3a75382
--- /dev/null
+++ b/tests/a11y/accessibile-name.txt
@@ -0,0 +1,18 @@
+window1
+  "window"
+  index: 0
+  state: enabled resizable sensitive showing visible
+  toolkit: gail
+  button1
+    "push button"
+    parent: window1
+    index: 0
+    name: Accessible name
+    state: enabled focusable sensitive showing visible
+    toolkit: gail
+    text: Hello World!
+    character count: 12
+    caret offset: 0
+    default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
+    image size: -1 x -1
+    image description: (null)
diff --git a/tests/a11y/accessibility-dump.c b/tests/a11y/accessibility-dump.c
index 9bdc706..aec4038 100644
--- a/tests/a11y/accessibility-dump.c
+++ b/tests/a11y/accessibility-dump.c
@@ -285,6 +285,19 @@ dump_atk_text (AtkText *atk_text,
 }
 
 static void
+dump_atk_image (AtkImage *atk_image,
+                guint     depth,
+                GString  *string)
+{
+  gint width, height;
+
+  atk_image_get_image_size (atk_image, &width, &height);
+  g_string_append_printf (string, "%*simage size: %d x %d\n", depth, "", width, height);
+
+  g_string_append_printf (string, "%*simage description: %s\n", depth, "", atk_image_get_image_description (atk_image));
+}
+
+static void
 dump_accessible (AtkObject     *accessible,
                  guint          depth,
                  GString       *string)
@@ -308,6 +321,8 @@ dump_accessible (AtkObject     *accessible,
   dump_attribute_set (string, depth, atk_object_get_attributes (accessible));
   if (ATK_IS_TEXT (accessible))
     dump_atk_text (ATK_TEXT (accessible), depth, string);
+  if (ATK_IS_IMAGE (accessible))
+    dump_atk_image (ATK_IMAGE (accessible), depth, string);
 
   for (i = 0; i < atk_object_get_n_accessible_children (accessible); i++)
     {
diff --git a/tests/a11y/accessible-name.txt b/tests/a11y/accessible-name.txt
index 438054b..3a75382 100644
--- a/tests/a11y/accessible-name.txt
+++ b/tests/a11y/accessible-name.txt
@@ -14,3 +14,5 @@ window1
     character count: 12
     caret offset: 0
     default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
+    image size: -1 x -1
+    image description: (null)
diff --git a/tests/a11y/hello-world.txt b/tests/a11y/hello-world.txt
index 6a76eee..a24a9ad 100644
--- a/tests/a11y/hello-world.txt
+++ b/tests/a11y/hello-world.txt
@@ -14,3 +14,5 @@ window1
     character count: 12
     caret offset: 0
     default attributes: left-margin:0 right-margin:0 indent:0 invisible:false editable:false pixels-above-lines:0 pixels-below-lines:0 pixels-inside-wrap:0 bg-full-height:0 scale:1 rise:0 underline:none strikethrough:false bg-stipple:false fg-stipple:false fg-color:0,0,0 bg-color:56540,56026,54741 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
+    image size: -1 x -1
+    image description: (null)



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