Name
bonobo-listener -- An Event Listener (an implementation of Bonobo::Listener)
Description
The BonoboListener object is a CORBA server used to receive events
emmited by a remote Bonobo::EventSource server. The combination
EventSource/Listener is used to notify one or more client
applications of events that happen in a component. Think of the
EventSource/Listener as a notification/callback system that allows
multiple clients to be informed of events.
Once created, the BonoboListener object needs to be attached to a
remote IDL:Bonobo/EventSource:1.0 server. This is done by passing the
CORBA Object reference of the BonoboListener to the addListener
method in the IDL:Bonobo/EventSource:1.0.
The BonoboListener object allows the user to specify a callback
function to be invoked when an event is emitted by the
IDL:Bonobo/EventSource:1.0 server. The BonoboListener object also
emits the "event_notify" Gtk+ signal, which allows you to connect
multiple code segments to the same event notification.
Here is a sample client application that registers interest in
being notified of events from the fictional "Keyboard" event
source:
The CORBA::any value passed to the listener function is defined by
the contract between the EventSource's event you are using and you.
To manipulate the value, you can use the CORBA DynAny interface to
introspect the value and extract the information you need.
Details
BONOBO_LISTENER_TYPE
#define BONOBO_LISTENER_TYPE (bonobo_listener_get_type ()) |
BONOBO_LISTENER()
#define BONOBO_LISTENER(o) (GTK_CHECK_CAST ((o), BONOBO_LISTENER_TYPE, BonoboListener)) |
BONOBO_IS_LISTENER()
#define BONOBO_IS_LISTENER(o) (GTK_CHECK_TYPE ((o), BONOBO_LISTENER_TYPE)) |
BONOBO_LISTENER_CLASS()
#define BONOBO_LISTENER_CLASS(k) (GTK_CHECK_CLASS_CAST((k), BONOBO_LISTENER_TYPE, BonoboListenerClass)) |
BONOBO_IS_LISTENER_CLASS()
#define BONOBO_IS_LISTENER_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), BONOBO_LISTENER_TYPE)) |
BonoboListener
typedef struct {
BonoboObject parent;
BonoboListenerPrivate *priv;
} BonoboListener; |
BonoboListenerClass
typedef struct {
BonoboObjectClass parent_class;
/* Signals */
void (* event_notify) (BonoboListener *listener,
char *event_name,
BonoboArg *event_data,
CORBA_Environment *ev);
} BonoboListenerClass; |
BonoboListenerCallbackFn ()
void (*BonoboListenerCallbackFn) (BonoboListener *listener,
char *event_name,
CORBA_any *any,
CORBA_Environment *ev,
gpointer user_data); |
The signature for the callback function invoked when an event is
delivered to the BonoboListener object.
bonobo_listener_construct ()
bonobo_listener_get_epv ()
POA_Bonobo_Listener__epv* bonobo_listener_get_epv
(void); |
bonobo_listener_corba_object_create ()
Bonobo_Listener bonobo_listener_corba_object_create
(BonoboObject *object); |