2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 /* accessibleeventlistener.c: implementation of SpiListener.idl */
30 #include <libspi/eventlistener.h>
32 /* Our parent Gtk object type */
33 #define PARENT_TYPE SPI_LISTENER_TYPE
39 static guint signals [LAST_SIGNAL];
42 * CORBA Accessibility::Listener::notifyEvent method implementation
45 impl_accessible_event_notify_event (PortableServer_Servant servant,
46 const Accessibility_Event *e,
47 CORBA_Environment *ev)
49 SpiEventListener *listener = SPI_EVENT_LISTENER (
50 bonobo_object_from_servant (servant));
52 g_signal_emit (G_OBJECT (listener), signals [EVENT], 0, e);
57 spi_event_listener_class_init (SpiEventListenerClass *klass)
59 SpiListenerClass *spi_listener_class = (SpiListenerClass *) klass;
60 POA_Accessibility_EventListener__epv *epv = &spi_listener_class->epv;
62 signals [EVENT] = g_signal_new (
64 G_TYPE_FROM_CLASS (klass),
66 G_STRUCT_OFFSET (SpiEventListenerClass, event),
68 g_cclosure_marshal_VOID__POINTER,
69 G_TYPE_NONE, 1, G_TYPE_POINTER);
71 epv->notifyEvent = impl_accessible_event_notify_event;
75 spi_event_listener_init (SpiEventListener *listener)
79 BONOBO_TYPE_FUNC (SpiEventListener,
84 spi_event_listener_new (void)
86 SpiEventListener *retval = g_object_new (
87 SPI_EVENT_LISTENER_TYPE, NULL);