让自定义组件获得辅助功能

Adding ATK support to your custom widget will assure its cooperation with the accessibility infrastructure. These are the general steps that are required:

  • assess a custom widget according to the applicable User Interface Guidelines;

  • determine which ATK interfaces a custom widget should implement, according to the widget's feature set and function;

  • assess which ATK interfaces can be inherited from the parent widget class;

  • 部件类的 ATK 接口可以两种方式实现:

    如果使用第二种方法,则在运行时必须使用 AtkObjectFactoryRegistry 来注册合适的 factory 类型。