Top | ![]() |
![]() |
![]() |
![]() |
BonoboEventSource * | bonobo_event_source_new () |
void | bonobo_event_source_notify_listeners () |
void | bonobo_event_source_notify_listeners_full () |
void | bonobo_event_source_client_remove_listener () |
void | bonobo_event_source_client_add_listener () |
gboolean | bonobo_event_source_has_listener () |
void | bonobo_event_source_client_add_listener_closure () |
Bonobo_Listener | bonobo_event_source_client_add_listener_full () |
void | bonobo_event_source_ignore_listeners () |
BonoboEventSource *
bonobo_event_source_new (void
);
Creates a new BonoboEventSource object. Typically this object will be exposed to clients through CORBA and they will register and unregister functions to be notified of events that this EventSource generates.
To notify clients of an event, use the bonobo_event_source_notify_listeners()
function.
void bonobo_event_source_notify_listeners (BonoboEventSource *event_source
,const char *event_name
,const CORBA_any *opt_value
,CORBA_Environment *opt_ev
);
This will notify all clients that have registered with this EventSource
(through the addListener or addListenerWithMask methods) of the availability
of the event named event_name
. The value
CORBA::any value is passed to
all listeners.
event_name
can not contain comma separators, as commas are used to
separate the various event names.
event_source |
the Event Source that will emit the event. |
|
event_name |
Name of the event being emitted |
|
opt_value |
A CORBA_any value that contains the data that is passed to interested clients, or NULL for an empty value |
|
opt_ev |
A CORBA_Environment where a failure code can be returned, can be NULL. |
void bonobo_event_source_notify_listeners_full (BonoboEventSource *event_source
,const char *path
,const char *type
,const char *subtype
,const CORBA_any *opt_value
,CORBA_Environment *opt_ev
);
void bonobo_event_source_client_remove_listener (Bonobo_Unknown object
,Bonobo_Listener listener
,CORBA_Environment *opt_ev
);
void bonobo_event_source_client_add_listener (Bonobo_Unknown object
,BonoboListenerCallbackFn event_callback
,const char *opt_mask
,CORBA_Environment *opt_ev
,gpointer user_data
);
gboolean bonobo_event_source_has_listener (BonoboEventSource *event_source
,const char *event_name
);
This method determines if there are any listeners for the event to be broadcast. This can be used to detect whether it is worth constructing a potentialy expensive state update, before sending it to no-one.
void bonobo_event_source_client_add_listener_closure (Bonobo_Unknown object
,GClosure *callback
,const char *opt_mask
,CORBA_Environment *opt_ev
);
Bonobo_Listener bonobo_event_source_client_add_listener_full (Bonobo_Unknown object
,GClosure *callback
,const char *opt_mask
,CORBA_Environment *opt_ev
);
void
bonobo_event_source_ignore_listeners (BonoboEventSource *event_source
);
Instructs the event source to de-register any listeners that are added from the global running context.