src/framework/*: improve the doxygen documentation (work in progress). This also...
[melted] / src / framework / mlt_events.h
1 /**
2 * \file mlt_events.h
3 * \brief event handling
4 *
5 * Copyright (C) 2004-2008 Ushodaya Enterprises Limited
6 * \author Charles Yates <charles.yates@pandora.be>
7 *
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
12 *
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 * Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23 #ifndef _MLT_EVENTS_H_
24 #define _MLT_EVENTS_H_
25
26 #include "mlt_types.h"
27
28 #if GCC_VERSION >= 40000
29 typedef void ( *mlt_transmitter )( void *, ... );
30 typedef void ( *mlt_listener )( void *, ... );
31 #else
32 /** callback function to send an event message
33 *
34 */
35 typedef void ( *mlt_transmitter )( );
36 /** event handler when receiving an event message
37 * \param the properties object on which the event was registered
38 * \param an opaque pointer to a service or really an object
39 * \param variable args supplied by the transmitter
40 */
41 typedef void ( *mlt_listener )( );
42 #endif
43
44 extern void mlt_events_init( mlt_properties self );
45 extern int mlt_events_register( mlt_properties self, char *id, mlt_transmitter transmitter );
46 extern void mlt_events_fire( mlt_properties self, char *id, ... );
47 extern mlt_event mlt_events_listen( mlt_properties self, void *service, char *id, mlt_listener listener );
48 extern void mlt_events_block( mlt_properties self, void *service );
49 extern void mlt_events_unblock( mlt_properties self, void *service );
50 extern void mlt_events_disconnect( mlt_properties self, void *service );
51
52 extern mlt_event mlt_events_setup_wait_for( mlt_properties self, char *id );
53 extern void mlt_events_wait_for( mlt_properties self, mlt_event event );
54 extern void mlt_events_close_wait_for( mlt_properties self, mlt_event event );
55
56 extern void mlt_event_inc_ref( mlt_event self );
57 extern void mlt_event_block( mlt_event self );
58 extern void mlt_event_unblock( mlt_event self );
59 extern void mlt_event_close( mlt_event self );
60
61 #endif
62