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.
This commit is contained in:
Matthias Clasen 2011-06-19 19:51:15 -04:00
parent 570c185935
commit 52aa225713
8 changed files with 93 additions and 0 deletions

View File

@ -264,6 +264,36 @@ dump_text_attributes (GString *string,
atk_attribute_set_free (attributes); 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 static void
dump_atk_text (AtkText *atk_text, dump_atk_text (AtkText *atk_text,
guint depth, guint depth,
@ -435,6 +465,9 @@ dump_accessible (AtkObject *accessible,
dump_state_set (string, depth, atk_object_ref_state_set (accessible)); dump_state_set (string, depth, atk_object_ref_state_set (accessible));
dump_attribute_set (string, depth, atk_object_get_attributes (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)) if (ATK_IS_TEXT (accessible))
dump_atk_text (ATK_TEXT (accessible), depth, string); dump_atk_text (ATK_TEXT (accessible), depth, string);

View File

@ -3,6 +3,9 @@ window1
index: 0 index: 0
state: enabled resizable sensitive showing visible state: enabled resizable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: window
alpha: 1
button1 button1
"push button" "push button"
parent: window1 parent: window1
@ -10,6 +13,9 @@ window1
name: Accessible name name: Accessible name
state: enabled focusable sensitive showing visible state: enabled focusable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: Hello World! text: Hello World!
character count: 12 character count: 12

View File

@ -3,6 +3,9 @@ window1
index: 0 index: 0
state: enabled resizable sensitive showing visible state: enabled resizable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: window
alpha: 1
button1 button1
"push button" "push button"
parent: window1 parent: window1
@ -10,6 +13,9 @@ window1
name: Hello World! name: Hello World!
state: enabled focusable sensitive showing visible state: enabled focusable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: Hello World! text: Hello World!
character count: 12 character count: 12

View File

@ -3,6 +3,9 @@ window1
index: 0 index: 0
state: enabled resizable sensitive showing visible state: enabled resizable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: window
alpha: 1
button1 button1
"push button" "push button"
parent: window1 parent: window1
@ -10,6 +13,9 @@ window1
name: Hello World! name: Hello World!
state: enabled focusable sensitive showing visible state: enabled focusable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: Hello World! text: Hello World!
character count: 12 character count: 12

View File

@ -3,12 +3,18 @@ window1
index: 0 index: 0
state: enabled resizable sensitive showing visible state: enabled resizable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: window
alpha: 1
box1 box1
"filler" "filler"
parent: window1 parent: window1
index: 0 index: 0
state: enabled horizontal sensitive state: enabled horizontal sensitive
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
label1 label1
"label" "label"
parent: box1 parent: box1
@ -17,6 +23,9 @@ window1
label-for: entry1 label-for: entry1
state: enabled multi-line sensitive visible state: enabled multi-line sensitive visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: Entry: text: Entry:
character count: 6 character count: 6
@ -29,6 +38,9 @@ window1
labelled-by: label1 labelled-by: label1
state: editable enabled focusable sensitive single-line visible state: editable enabled focusable sensitive single-line visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: text text: text
character count: 4 character count: 4

View File

@ -3,12 +3,18 @@ window1
index: 0 index: 0
state: enabled resizable sensitive showing visible state: enabled resizable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: window
alpha: 1
notebook1 notebook1
"page tab list" "page tab list"
parent: window1 parent: window1
index: 0 index: 0
state: enabled focusable sensitive showing visible state: enabled focusable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkSelection> <AtkSelection>
selection count: 1 selection count: 1
selected children: 0 selected children: 0
@ -18,6 +24,9 @@ window1
index: 0 index: 0
name: Tab 1 name: Tab 1
state: enabled multi-line selectable selected sensitive showing visible state: enabled multi-line selectable selected sensitive showing visible
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: Tab 1 text: Tab 1
character count: 5 character count: 5
@ -29,6 +38,9 @@ window1
name: Yes name: Yes
state: enabled focusable sensitive showing visible state: enabled focusable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: Yes text: Yes
character count: 3 character count: 3
@ -48,6 +60,9 @@ window1
index: 1 index: 1
name: Tab 2 name: Tab 2
state: enabled multi-line selectable sensitive showing visible state: enabled multi-line selectable sensitive showing visible
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: Tab 2 text: Tab 2
character count: 5 character count: 5
@ -59,6 +74,9 @@ window1
name: No name: No
state: enabled focusable sensitive visible state: enabled focusable sensitive visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: No text: No
character count: 2 character count: 2

View File

@ -3,12 +3,18 @@ window1
index: 0 index: 0
state: enabled resizable sensitive showing visible state: enabled resizable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: window
alpha: 1
scale1 scale1
"slider" "slider"
parent: window1 parent: window1
index: 0 index: 0
state: enabled focusable horizontal sensitive showing visible state: enabled focusable horizontal sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: 45.5 text: 45.5
character count: 5 character count: 5

View File

@ -3,12 +3,18 @@ window1
index: 0 index: 0
state: enabled resizable sensitive showing visible state: enabled resizable sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: window
alpha: 1
text1 text1
"text" "text"
parent: window1 parent: window1
index: 0 index: 0
state: editable enabled focusable multi-line sensitive showing visible state: editable enabled focusable multi-line sensitive showing visible
toolkit: gail toolkit: gail
<AtkComponent>
layer: widget
alpha: 1
<AtkText> <AtkText>
text: Twas brillig, and the slithy toves text: Twas brillig, and the slithy toves
Did gyre and gimple in the wabe Did gyre and gimple in the wabe