The doc build for that is currently broken, and libgail-util is
undergoing reconstructive surgery anyway, currently.
Or maybe it'll turn out to be an amputation...
It turns out that ATK_DEFINE_TYPE_WITH_CODE() is broken; it
tells GType that the class and instance size for the accessible
type are the same as for its parent type. Which is not true
if your instance struct has members such as 'description' here.
This was causing hard-to-track-down memory corruption, since
description and the GtkAccessible private pointer were sharing
the same memory location.
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.
Not really the best fix; for now just ignore accessible parents
that are not GtkAccessibles - it seems that something causes
GailToplevels to show up as parents of GailWindows, randomly.
For initial creation of the results, allow to run
accessibility-dump --generate file.ui,
which will dump just the expected output to stdout,
without any extra decorations.
The tool works like this:
./accessibility-dump [FILE ...]
If no files are given, all files with the extension ".ui" in the current
directory are taken. For every file "test.ui", the following steps are
performed:
1) test.ui is loaded using GtkBuilder
2) The accessible for the window is loaded
3) The information of accessible is converted into a string using a
syntax defined in this test file
4) The generated string is diffed with the file "test.txt"
5) If the diff is empty, the test is a success, if not, the test fails.
6) The diff is output when the test runner is run with --verbose
So to add a test named "test", create a file called "test.ui", put it
into this directory. Then create the expected output file "test.txt",
put it into this directory too. You can create the initial version of
this file by invoking "./accessibility-dump --verbose test.ui". The
output will contain the expected text and can be copy/pasted into the
text file.
The function is supposed to bypass the ATK registry. For 2 reasons:
1) We get rid of a lot of boilerplate madness.
2) The registry allows creating multiple accessibles per widget and we
don't.
The old code for registries is still there.