Re: [g-a-devel] GtkSocket/GtkPlug accessibility



Samuel Thibault, le mer. 14 août 2019 17:44:43 +0200, a ecrit:
Maybe another way would be to make GtkSocket/GtkPlug directly create
AtkSocket/AtkPlug, and override the get_accessible method to return the
AtkSocket/AtkPlug directly?  I didn't see such approach used in gtk
so I'm unsure if that's supposed to work?

I just gave it a small try with GtkPlug, and the problem is that it
doesn't allow to inherit the underlying methods:

When atk_object_get_n_accessible_children calls get_n_children, we'd
want it to directly call gtk_container_accessible_get_n_children and
let that take the information from the GtkContainer behind GtkPlug. But
gtk_container_accessible_get_n_children assumes that the parameter is a
GtkContainerAccessible, not an AtkPlug (multi-heritage issue again).  So
we'd have to reimplement the get_n_children method anyway to reach the
proper GtkWidget.

So AIUI it's actually simpler to just indeed introduce the intermediate
accessible objects?  We could probably stuff that into some
GtkSocketAccessible/GtkPlugAccessible?  The application would
then only have to use some gtk_plug_accessible_get_id() and
gtk_socket_accessible_embed().

Samuel


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