Re: [g-a-devel]Atk text interface for Stock Ticker applet



jagadeesh banavara wrote:
> 
> Hi Bill,
> 
> Below is the gle output for the stock ticker applet.
> 
> BonoboPlug
>   +------PanelApplet
>                 +-----GtkHBox
>                             +------GtkButton
>                              |             +-----GtkLabel
>                             +------GtkButton
>                              |             +-----GtkLabel
>                             +------GtkFrame
>                                            +-----GtkDrawingArea
> 
> Panel Applet is defined in the libpanel-applet library.
> The ferret dump shows the button_watcher event gets
> called for Atkobject of BonoboPlug and PanelApplet
> whose role is "frame" and "panel" respectively.
> 
> I am confused for which widget I have to implement
> AtkText interface.
> 
> The problem if I implement AtkText for a subclass of
> GtkDrawingArea is that ferret traverses the object
> hierarchy only till PanelApplet. Is there any reason why
> the _button_watcher routine in ferret does not get called
> for all the objects in the hierarchy?

Ferret is not the "last word" in tools, it could use
substantial improvements. 

If you use "follow mouse" then you are listening to 
two kinds of events, GtkWidget:button-press-event, and
GtkWidget:enter_notify_event.  You won't get an enter_notify_event
for something that isn't a GtkWidget.  As for the button
press event, if you look at the code you see that the source of the
event must be a GtkWidget's AtkObject, not another
child AtkObject.  From there the code checks to see if the
'source' AtkObject is a container, in which case it calls
atk_object_ref_accessible_at_point.

So for this to work, the containing AtkObject must override
get_n_children, ref_child, ref_child_at_point, etc.  Once
that is done, the atk_object_ref_accessible_at_point call 
in the button_watcher code should return the appropriate
AtkObject for the GtkDrawingArea.

Regards,

Bill

> Regards
> Jagadeesh
>



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