]> Pileus Git - ~andy/gtk/commitdiff
Dump AtkImage properties too
authorMatthias Clasen <mclasen@redhat.com>
Sun, 19 Jun 2011 19:30:01 +0000 (15:30 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Tue, 5 Jul 2011 20:07:59 +0000 (16:07 -0400)
Update expected output to match.

tests/a11y/accessibile-name.txt [new file with mode: 0644]
tests/a11y/accessibility-dump.c
tests/a11y/accessible-name.txt
tests/a11y/hello-world.txt

diff --git a/tests/a11y/accessibile-name.txt b/tests/a11y/accessibile-name.txt
new file mode 100644 (file)
index 0000000..3a75382
--- /dev/null
@@ -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)
index 9bdc70621f996ce34735be0141abbb36fddda0ba..aec4038e6f115b4c27344d2be96d192ac5462f88 100644 (file)
@@ -284,6 +284,19 @@ dump_atk_text (AtkText *atk_text,
   dump_text_attributes (string, depth, "default attributes", atk_text_get_default_attributes (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,
@@ -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++)
     {
index 438054b837d13bea59333fd005a4b1965deb4ee8..3a753826ff23aaf5bf5595d49e52ad741482bfd2 100644 (file)
@@ -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)
index 6a76eee09f3ed6ecb8975740f892c2fe28b06a3d..a24a9ad7d37a9bc8ecaa6c881bbb540e2e2d9e25 100644 (file)
@@ -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)