Re: [g-a-devel]active-descendant-changed signal and at-spi
- From: "Padraig O'Briain" <Padraig Obriain sun com>
- To: bill haneman sun com
- Cc: michael ximian com, gnome-accessibility-devel gnome org
- Subject: Re: [g-a-devel]active-descendant-changed signal and at-spi
- Date: Thu, 5 Dec 2002 11:14:02 +0000 (GMT)
I have started trying to add support for active-descendant-changed in the bridge
and I have hit a problem.
The any_data field in Accessibility_Event is a CORBA_any and the function
spi_init_any_object() returns a CORBA_any for a CORBA_object. I have an
AtkObject. I can create an SpiAccessible from it but how do I get a
CORBA_object?
Padraig
> > The only interesting thing in the active-descendant-changed signal is the
object
> > which is the new active descendant.
> >
> > Do I need to call BONOBO_OBJECT_REF (spi_accessible_new()) on it and stick
it
> > into the any_data field?
>
> If you did, you of course would need to unref it again after the event
> emission since at the moment listeners are not guaranteed to do the
> unref (and it would be more traffic over the wire anyway).
>
> You will note that at the moment the code to do this lives in
> spi_atk_signal_emit_event (and, in turn, in spi_init_any_object () which
> it calls); there's some commented-out stuff for the child-changed
> signal, and presumably we'd need to add code to handle the
> active-descendant-changed signal as well. As Michael has pointed out
> recently, the existing code is not the correct way of doing this (see
> below), which is the main reason the implementation is commented out
> until somebody has time to do this thoughtfully and properly.
>
> For the cases where the Any contains an object reference I think we
> should not take ownership of the reference or increment it; this has the
> disadvantage that the listener must make sure the object is still alive
> before using the reference, but the advantage of preventing leaks and
> extra CORBA traffic if the listening client doesn't choose to use the
> reference.
>
> In the meantime if you just add the signal listener, we can handle the
> any_data initialization in the emission handler (above), just as we
> intend to for child-changed events once we get spi_init_any_object()
> fixed.
>
> -Bill
>
> > Padraig
> >
> > > Subject: Re: [g-a-devel]active-descendant-changed signal and at-spi
> > > To: "Padraig O'Briain" <Padraig Obriain Sun COM>
> > > Cc: accessibility mailing list <gnome-accessibility-devel gnome org>
> > > Mime-Version: 1.0
> > > Content-Transfer-Encoding: 7bit
> > >
> > > Hi Padraig,
> > >
> > > On Wed, 2002-11-27 at 11:48, Padraig O'Briain wrote:
> > > > I am trying to figure out what needs to change in at-spi to support
> > > > active-descendant-changed signal.
> > > >
> > > > It looks like a signal handler for it needs to be added to the bridge.
> > >
> > > Quite.
> > >
> > > > What should happen when the signal is emitted?
> > >
> > > You get to make up some string name for it; ram whatever detail you
> > > think is useful into the event structure; and do an emitv of some sort
> > > in the handler.
> > >
> > > HTH,
> > >
> > > Michael.
> > >
> > > --
> > > mmeeks gnu org <><, Pseudo Engineer, itinerant idiot
> > >
> >
> > _______________________________________________
> > Gnome-accessibility-devel mailing list
> > Gnome-accessibility-devel gnome org
> > http://mail.gnome.org/mailman/listinfo/gnome-accessibility-devel
>
>
> _______________________________________________
> 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]