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



JAYARAJ P R wrote:
> 
> Hi Bill,
> 
> Marc has suggested the following approach for the gnome-cd application
> 
> 1. Inherit AtkComponent for the custom widget from the parent (GailWidget).
> 2. Implement functions like atk_object_ref_accessible_child() for the custom
>    widget.
> 3. Implement AtkText for the children (PangoLayouts).
> 
> Does this approach seem fine with you?

Yes, especially if Marc thinks it's the right approach :-)

> Your earlier mail mentioned that we don't necessarily need a factory for the
> pango layout. In that case, what is the other approach?

Well, you could implement your own internal methods that the 
ref_accessible_child_at_index implementation calls.

See my original post about how to use our own PangoLayout code
from gail; and please coordinate that with Padraig, I believe
there is code in gail (gail-util.h) that allows you to get
an AtkObject appropriate to a PangoLayout.

>...In gail we
> do this through the GtkAccessible structure which has a pointer to the
> Widget (GtkWidget *). But how we do this in case of a PangoLayout if we
> go for a factory approach?

If you create your own subtype of AtkObject (which you must, if you are
adding or modifying implementation code) then you can add your own
private
dats, which could include a pointer to the PangoLayout.  I believe that
our existing PangoLayout support code creates AtkObjects which do
this already; Padraig?

-best regards

-Bill

> Please let me know your comments.
> 
> Thanks,
> Jayaraj.
> 
> -----Original Message-----
> From: gnome-accessibility-devel-admin gnome org
> [mailto:gnome-accessibility-devel-admin gnome org]On Behalf Of Bill
> Haneman
> Sent: Tuesday, February 05, 2002 8:32 PM
> To: bill haneman Sun COM; jayaraj rajappan wipro com
> Cc: mukund rajagopalan wipro com; gnome-accessibility-devel gnome org
> Subject: 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



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