MLT 6.22.1
mlt_events.h
Go to the documentation of this file.
1
23#ifndef MLT_EVENTS_H
24#define MLT_EVENTS_H
25
26#include "mlt_types.h"
27
28#if GCC_VERSION >= 40000
29typedef void ( *mlt_transmitter )( void *, ... );
30typedef void ( *mlt_listener )( void *, ... );
31#else
35typedef void ( *mlt_transmitter )( );
41typedef void ( *mlt_listener )( );
42#endif
43
44extern void mlt_events_init( mlt_properties self );
45extern int mlt_events_register( mlt_properties self, const char *id, mlt_transmitter transmitter );
46extern int mlt_events_fire( mlt_properties self, const char *id, ... );
47extern mlt_event mlt_events_listen( mlt_properties self, void *service, const char *id, mlt_listener listener );
48extern void mlt_events_block( mlt_properties self, void *service );
49extern void mlt_events_unblock( mlt_properties self, void *service );
50extern void mlt_events_disconnect( mlt_properties self, void *service );
51
52extern mlt_event mlt_events_setup_wait_for( mlt_properties self, const char *id );
53extern void mlt_events_wait_for( mlt_properties self, mlt_event event );
55
56extern void mlt_event_inc_ref( mlt_event self );
57extern void mlt_event_block( mlt_event self );
58extern void mlt_event_unblock( mlt_event self );
59extern void mlt_event_close( mlt_event self );
60
61#endif
62
void(* mlt_transmitter)()
callback function to send an event message
Definition: mlt_events.h:35
void(* mlt_listener)()
event handler when receiving an event message
Definition: mlt_events.h:41
Provides forward definitions of all public types.
Event class.
Definition: mlt_events.c:61
void mlt_event_unblock(mlt_event self)
Decrement the block count on self event.
Definition: mlt_events.c:99
void mlt_event_inc_ref(mlt_event self)
Increment the reference count on self event.
Definition: mlt_events.c:75
void mlt_event_block(mlt_event self)
Increment the block count on self event.
Definition: mlt_events.c:87
void mlt_event_close(mlt_event self)
Close self event.
Definition: mlt_events.c:111
int mlt_events_fire(mlt_properties self, const char *id,...)
Fire an event.
Definition: mlt_events.c:187
void mlt_events_block(mlt_properties self, void *service)
Block all events for a given service.
Definition: mlt_events.c:298
void mlt_events_init(mlt_properties self)
Initialise the events structure.
Definition: mlt_events.c:139
int mlt_events_register(mlt_properties self, const char *id, mlt_transmitter transmitter)
Register an event and transmitter.
Definition: mlt_events.c:161
void mlt_events_disconnect(mlt_properties self, void *service)
Disconnect all events for a given service.
Definition: mlt_events.c:360
void mlt_events_wait_for(mlt_properties self, mlt_event event)
Wait for an event.
Definition: mlt_events.c:432
void mlt_events_unblock(mlt_properties self, void *service)
Unblock all events for a given service.
Definition: mlt_events.c:329
mlt_event mlt_events_listen(mlt_properties self, void *service, const char *id, mlt_listener listener)
Register a listener.
Definition: mlt_events.c:238
mlt_event mlt_events_setup_wait_for(mlt_properties self, const char *id)
Prepare to wait for an event.
Definition: mlt_events.c:416
void mlt_events_close_wait_for(mlt_properties self, mlt_event event)
Cleanup after waiting for an event.
Definition: mlt_events.c:448
Properties class.
Definition: mlt_properties.h:37