Re: [g-a-devel]Detecting opening and closure of dialogs using CSPI
- From: Bill Haneman <bill haneman sun com>
- To: mukund rajagopalan wipro com
- Cc: "'accessibility mailing list'" <gnome-accessibility-devel gnome org>
- Subject: Re: [g-a-devel]Detecting opening and closure of dialogs using CSPI
- Date: Sat, 16 Mar 2002 16:34:09 +0000
Hi Mukund:
This approach does not seem completely correct to me.
I think that for dialogs, in most cases what you are
looking for is the creation of new toplevel windows.
You are right in thinking that children_changed events
are fired in this case, but they are fired on the
application objects (not the toplevel windows),
and application objects do have parent accessibles.
The opening of a new dialog should generate focus events
too, so you can work upwards to find the toplevel window
in which focus resides. Toplevel windows have a role of
"FRAME" (rather than "WINDOW", etc.).
I should probably write more information about this soon, but
don't have time at the moment, apologies.
-Bill
Mukund wrote:
>
> Folks,
>
> Using CSPI, Am trying to detect a dialog getting launched or
> closed
> within an application and this is what I did:
>
> I registered for object:children-changed event and in the
> event hook,
> tried checking if the event source's parent is NULL:
>
> /* this code is inside event hook */
>
> parent = Accessible_getParent (event->source);
> if (!parent)
> {
> /* this is top window */
Not really top "window", toplevel windows
have the application itself as parent. And
applications have the "desktop objects"
as their parents.
So I don't believe this code should work.
-Bill
...
> }
>
> My understanding is that the main window of the application
> emits
> children-changed event when a new dialog is launched or
> closed.
>
> I would expect that the control would flow into the 'if'
> statement
> _once_ for launching a new dialog and _once_ for closing it.
> But what
> happens is the 'if' block gets executed several times for a
> single
> launch and closure of a dialog (gtk-demo is my application).
>
> Is this the expected behavior ? Or, is this not the way of
> detecting
> dialogs getting launched or closed ?
>
> Cheers,
> Mukund.
>
> _______________________________________________
> Gnome-accessibility-devel mailing list
> Gnome-accessibility-devel gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]