The Gtk.Widget
class has an Accessible
property of type Atk.Object
. You can get but not set this property. You also cannot override it in a subclass. However, it appears that Atk.Object
has several writable properties, and writing to them changes the information returned by AT.
For example:
var widget = new Gtk.Label("Hello World");
widget.Accessible.Role = Atk.Role.PushButton;
This creates a normal label widget, but causes AT to believe that it's actually a button widget.
I have yet to determine how to change a widget's apparent state. There are two ways it looks like this should be possible:
Atk.Object.NotifyStateChange(Atk.StateType, bool)
looks like it might send a change signal indicating that a certain state type now has a given bool value.Atk.Object.RefStateSet()
returns anAtk.StateSet
, on which you can callAddState(Atk.StateType)
andRemoveState(Atk.StateType)
.
Neither of these actually has any effect on the information reported by AT. I even tried changing the state set first and firing the event afterwards... It still has absolutely no effect at all.