Re: Any example of AtkDocument implementation?

Thanks a lot Bill.

I'm trying to make an OCR application. I'm
implementing AtkText for the same now. 
I'm confused about a new point now. If the page has a
lot of text, the get_text implementation is always
receiving a request with start_offset = 0 and
end_offset = -1 (from gnopernicus). In that case, I am
returning the entire page's contents.
So, every time the focus moves away and comes back to
the page, the entire contents are sent back.

Currently, the entire page has one associated
AtkObject. If I create an AtkObject for every
paragraph/line/word and implement get_n_children and
ref_child (setting their pointers in the class_init
function), can the screen reader request for the text
of one child at a time?

I mean, can I return only the appropriate AtkObject's
text, based on where the user has clicked. If the user
clicks inside a particular paragraph, only that
AtkObject's text is returned. How can this be done? Do
I need to implement AtkComponent?

Otherwise, what is the advantage of creating an
AtkObject for each paragraph/line/word as against
treating the entire page as one object?


----- Original Message ----- 
From: "Bill Haneman" <Bill Haneman Sun COM>
To: <gnome-accessibility-list gnome org>
Sent: Monday, February 16, 2004 6:32 PM
Subject: Re: Any example of AtkDocument

> Ashutosh wrote:
> >Hi,
> >
> >Is there any example for an implementation of
> >AtkDocument for any application?
> >
> No, there is no example at this time.  What were you
planning to use 
> this API for?
> AtkDocument is intended primarily for  XML-DOM-like
interfaces, but has 
> not been
> implemented for a number of technical reasons
including the absence of good
> normative C bindings for XML DOM which are usable
> If you are interested in 'text documents' then there
are conventions for 
> use of
> AtkText, i.e.
> * each paragraph is a separate AtkObject
implementing AtkText;
> * AtkRelations FLOWS_FROM and FLOWS_TO are used to
>    text flow;
> * text attributes are returned by atk_text API in
two ways: standard 
> 'get_attributes'
>   API returns the explicitly-applied attributes
(e.g. attributes that 
> differ from 'Default')
>   and the get_default_attributes API can be used to
get the default 
> attributes over
>   a range.  The get_default_attributes API should
return things like 
> font size, colors,
>   styles, etc. whereas the get_attributes API should
only return those 
> attributes if they have
>   been explicitly set to differ from the default
> regards
> Bill
> >
> >Thanks.
> >
> >Regards,
> >Ashutosh
> >
> >  
> >
> _______________________________________________
> gnome-accessibility-list mailing list
> gnome-accessibility-list gnome org

Yahoo! Messenger - Communicate instantly..."Ping" 
your friends today! Download Messenger Now

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