[gtk+/a11y] Dump AtkAction properties



commit 22b8f4c1d6b3fb729941abbcc2d8f00201e9ec81
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jun 19 16:53:16 2011 -0400

    Dump AtkAction properties
    
    Adjust expected output to match.

 tests/a11y/accessibility-dump.c |   20 ++++++++++++++++++++
 tests/a11y/accessible-name.txt  |    3 +++
 tests/a11y/hello-world.txt      |    3 +++
 tests/a11y/mnemonic.txt         |    2 ++
 4 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/tests/a11y/accessibility-dump.c b/tests/a11y/accessibility-dump.c
index aec4038..4dbb74e 100644
--- a/tests/a11y/accessibility-dump.c
+++ b/tests/a11y/accessibility-dump.c
@@ -298,6 +298,24 @@ dump_atk_image (AtkImage *atk_image,
 }
 
 static void
+dump_atk_action (AtkAction *atk_action,
+                 guint      depth,
+                 GString   *string)
+{
+  gint i;
+
+  for (i = 0; i < atk_action_get_n_actions (atk_action); i++)
+    {
+      if (atk_action_get_name (atk_action, i))
+        g_string_append_printf (string, "%*saction %d name: %s\n", depth, "", i, atk_action_get_name (atk_action, i));
+      if (atk_action_get_description (atk_action, i))
+        g_string_append_printf (string, "%*saction %d description: %s\n", depth, "", i, atk_action_get_description (atk_action, i));
+      if (atk_action_get_keybinding (atk_action, i))
+        g_string_append_printf (string, "%*saction %d keybinding: %s\n", depth, "", i, atk_action_get_keybinding (atk_action, i));
+    }
+}
+
+static void
 dump_accessible (AtkObject     *accessible,
                  guint          depth,
                  GString       *string)
@@ -323,6 +341,8 @@ dump_accessible (AtkObject     *accessible,
     dump_atk_text (ATK_TEXT (accessible), depth, string);
   if (ATK_IS_IMAGE (accessible))
     dump_atk_image (ATK_IMAGE (accessible), depth, string);
+  if (ATK_IS_ACTION (accessible))
+    dump_atk_action (ATK_ACTION (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 3a75382..27a4d34 100644
--- a/tests/a11y/accessible-name.txt
+++ b/tests/a11y/accessible-name.txt
@@ -16,3 +16,6 @@ window1
     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)
+    action 0 name: click
+    action 1 name: press
+    action 2 name: release
diff --git a/tests/a11y/hello-world.txt b/tests/a11y/hello-world.txt
index a24a9ad..b9e20a3 100644
--- a/tests/a11y/hello-world.txt
+++ b/tests/a11y/hello-world.txt
@@ -16,3 +16,6 @@ window1
     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)
+    action 0 name: click
+    action 1 name: press
+    action 2 name: release
diff --git a/tests/a11y/mnemonic.txt b/tests/a11y/mnemonic.txt
index 8925d41..acfdb78 100644
--- a/tests/a11y/mnemonic.txt
+++ b/tests/a11y/mnemonic.txt
@@ -32,3 +32,5 @@ window1
       character count: 4
       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:65535,65535,65535 wrap-mode:word justification:left size:<omitted> weight:<omitted> family-name:<omitted> stretch:<omitted> variant:<omitted> style:<omitted> language:<omitted> direction:<omitted>
+      action 0 name: activate
+      action 0 keybinding: <Alt>e



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