Re: [g-a-devel]Accessibility for Gdk widgets in Pager Applet [workspace switcher]



> When dealing with widgets that paint non-GOBject-based elements
> into themselves (such as Gdk rectangles), our options are limited.
> About the best you can do is to implement accessibility on the
> container, override get_n_children and ref_child, and return
> special AtkObject instances which you create inside the applet code.
> You can't really create factory instances for the Gdk elements since
> they are not really widgets, so you create them on-demand inside
> the container's ref_child implementation, and must cache them, etc.
> 
> These AtkObjects (the child objects of the container's AtkObject)
> should implement AtkComponent, and AtkAction; I believe that the
> container should implement AtkSelection.   The AtkAction impleentation
> for the children might be unnecessary if it is fullt redundant with
> AtkSelection for the container (i.e. the Pager GtkWidget).
> 
> -Bill


Hi Bill,
Thanks for the input. I have decided to expose the workspaces (Gdk
rectangles) as static Atkobjects through the parent's get_n_children.
And return the appropriate static atk object through ref_child. 

I would appreciate if you could take some time to validate my approach:

(1) The pager widget (Pager GtkWidget) is created as pager =
wnck_pager_new(). The default atk implementation is GailContainer. I
plan to override the get_accessible in *wnck library* to point to mine,
say, pager_get_accessible() (Note: wnck is a separate library),

(2) pager_get_accessible will return atk object (say, aobj_pager) whose
parent is wnck's atk object,

(3) aobj_pager->get_n_children will return number of workspaces,

(4) aobj_pager->ref_child() will return the appropriate static atk
object, say, aobj_ws (ws = work_space),

(5) aobj_pager will implement 'selection' interface. And *this* is the
reason why am deriving a new atk object for the pager instead of
overriding the parent (GailContainer) for the above implementations,

(6) aobj_ws will only implement component interface.

Please note that the accessibility implementation could be extended
further: The user can bring to focus individual windows within the
selected workspace by clicking the corresponding shaded portion within.
And that implementing (am not sure) AtkAction interface for aobj_ws. But
am not planning to do this since it isn't worth the pain in
accomplishing this task.

The same argument could be extended to the selection interface for the
aobj_pager but the only difference is it's simple in the case of
aobj_pager and not so, with aobj_ws.

Thanks a load for your time!

-Raj.



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