[g-a-devel] AT-SPI isssues with own ATK object implementations


as Bill Haneman wrote some time ago, I am currently working on an own
ATK implementation for a non-Gtk+ GUI toolkit.

I luckily managed it so far to load the atk-bridge and to create own
AtkObject instances, which are bound to my own object types. When using
at-poke to inspect the progress, I am stuck with errors, that do not
allow me to use at-poke as the AT-SPI interfaces do not seem to return
the wanted data.

Let me first explain what is done by the implementation:
It first peeks the AtkUtilClass and AtkObjectClass types and binds their
interfaces to my method implementations. Namely get_root, get_toolkit_name,
get_toolkit_version and add_global_event_listener for AtkUtilClass and
get_n_children, ref_child and get_index_in_parent for AtkObjectClass.
If peeking the both types does not return an instance, they will be
created using the appropriate g_type_class_ref() methods.

The AtkObjects are encaspulated in an Python object type, one per
instance and will be created using g_object_new(). The python code then
can (and will) fill the AtkObject internals with the necessary data,
such as the name, role, etc. pp.

When I run such an application, it seems to be registered correctly on
the AT-SPI side:
        ** Message: About to register application
        ** Message: Application registered & listening

at-poke however hangs itself up (if there is not running
at-spi-registryd instance before), but recognizes, that there is an
        ** (at-poke:65646): WARNING **: initial 'DISPLAY=:0.0' target '(null)'
         [locked from here until the application is closed]

The lock seems to happen within the populate_app_list() method when
Accessible_getChildAtIndex() is called.
If the application is closed, at-poke continues to run but the AT-SPI
interfaces throw some warnings:
        Warning: AT-SPI error: getName: Unknown CORBA exception id:
        Warning: AT-SPI error: getDescription: Unknown CORBA exception id:
        Warning: AT-SPI error: queryInterface: Unknown CORBA exception
        id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'

at-poke now will neither show the correct application name, nor the name
of the toolkit. Instead <unnamed> will be shown in the treeview and the
toolkit information. After refreshing at-poke, those entries are gone (as
the application is closed, this is the correct behaviour).

If the at-spi-registryd is already running when starting the
application, at-poke will not be aware of it, although it registered
itself correctly. Instead it shows nothing on refresh, not even error

If the application is closed, the AT-SPI interfaces and at-poke become
noisy again:
        Received an app_list_changed event
        ** (at-poke:65646): CRITICAL **: get_accessible_at_index:
        assertion `ret' failed (<-- caused by the at-poke treeview)
        Received an app_list_changed event
        Warning: AT-SPI error: pre method check: add: Unknown CORBA
        exception id: 'IDL:omg.org/CORBA/COMM_FAILURE:1.0'

I wonder where this weird behaviour of both, at-poke and AT-SPI, might
come from. First I thoght it is caused by my way of overriding the
AtkUtilClass and AtkObjectClass interfaces, but after looking through
gail.c and gailutil.c closely, I noticed that those do it the same way.
The only difference is that GAIL uses own GType implementations such as
GailUtilClass in contrast of mine approach.

Maybe someone knows, what I am doing wrong here, or where I am missing
some critical piece of code and can point me to the right direction. Any
help is highly appreciated.
The complete code (Python/C) can be made available, if that helps
tracking down the issue.

Installed library versions are:
glib-2.8.6, atk-1.10.3, at-spi-1.6.6, at-poke-0.2.3

Thanks and regards

Attachment: pgp3I23NGjHIo.pgp
Description: PGP signature

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