RE: [g-a-devel]Gnome 2.0 : accessibility for the gnome-cd application



jayaraj wrote:

>As i understand from the discussions till now, there are 2 approaches which
>we could follow to provide accessibility for the CDDisplay custom widget in
>gnome-cd.
>
>1.The first approach is to try to expose  separate AtkObjects for each
>PangoLayout. Does it mean that we have to implement AtkComponent for the
>container of the PangoLayout (which is the custom widget in this case)? Or
>can we override the atk_component_ref_accessible_at_point() method for the
>custom wiget, so that it returns different AtkObjects for each of the
>PangoLayouts depending on the x and y values. Also, i guess we need to
>implement a separate factory for the PangoLayout so that we can set the
>accessible name and description for each of the PangoLayouts and the code
>for this would reside in the application itself.
>
>2. The second approach is to try to implement most of the AtkText interfaces
>for the custom widget.
>
>Which one do you think would be more appropriate in this particular case?
>
>Regards,
>Jayaraj

I think that the first option is a bit better; however we still need to implement AtkText 
for the children of the custom widget.  Fortunately we have utilities/helper classes for 
doing this with PangoLayouts already, in gail.

You don't necessarily need a factory for the pango layout, though installing an 
accessibility factory for all instances of the PangoLayout type might be a useful thing 
to do.  We might do the latter in gail, in which case all you would need to do is call 

factory = atk_registry_get_factory (atkregistry, PANGO_TYPE_LAYOUT);
atkobject = atk_factory_create_accessible (factory, pangolayoutinstance);

from within the custom code for parts of the custom widget's AtkObject implementation, to 
create the appropriate AtkObject children, which could be cached and returned by calls to 
atk_component_ref_accessible_at_point() and atk_object_ref_child().

-Bill
------
Bill Haneman x19279
Gnome Accessibility / Batik SVG Toolkit
Sun Microsystems Ireland 




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