[g-a-devel] Focus problems



Hi again,

I'm having some problems with the focus and how gnopernicus follows it.

If we have a webpage which has a number of "widgets" on it (that are
not actual GtkWidget's but are things directly drawn on the GdkWindow
of the client area) and we manually draw focusrects around links etc,
how do we notify atk so that gnopernicus queries us for that "widget"
and reads it out.

I have a GtkLayout on which the entire page is rendered and when the
focus is on a link on the page, I create an AtkObject for it (with
AtkAction, etc.) and issue the following notification:

AtkStateSet *stateSet = my_link_ref_state_set (linkAtkObject);
atk_state_set_add_state (stateSet, ATK_STATE_FOCUSED);
atk_object_notify_state_change (linkAtkObject, ATK_STATE_FOCUSED, true);

After this, gnopernicus does query the linkAtkObject for its details
but never reads them out. Is this because there is no physical widget
for the link? Or is it because the actual focus (gtk's focus) is on
the GtkLayout which houses all the content of the page? I also tried
atk_state_set_remove_state(stateSetOfPageAtkObject,
ATK_STATE_FOCUSED); but it did not help.

What should be the correct procedure here? This seems like a generic
problem with any AtkObjects that do not have an actual GtkWidget. I
think I'm doing the above incorrectly.

Thanks,
Ashutosh



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