Commit a779588f authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

events: Add wrappers around vlc_event_manager_init for object casting.

parent 04f19d0c
...@@ -184,7 +184,12 @@ typedef void ( *vlc_event_callback_t )( const vlc_event_t *, void * ); ...@@ -184,7 +184,12 @@ typedef void ( *vlc_event_callback_t )( const vlc_event_t *, void * );
* which events are sent * which events are sent
* p_obj is here to give us a libvlc instance * p_obj is here to give us a libvlc instance
*/ */
VLC_EXPORT(int, vlc_event_manager_init, ( vlc_event_manager_t * p_em, #define vlc_event_manager_init_with_vlc_object(a,b) \
vlc_event_manager_init( a, b, b )
#define vlc_event_manager_init(a,b,c) \
__vlc_event_manager_init(a, b, VLC_OBJECT(c))
VLC_EXPORT(int, __vlc_event_manager_init, ( vlc_event_manager_t * p_em,
void * p_obj, vlc_object_t * )); void * p_obj, vlc_object_t * ));
/* /*
......
...@@ -406,7 +406,7 @@ vlc_error ...@@ -406,7 +406,7 @@ vlc_error
__vlc_event_attach __vlc_event_attach
vlc_event_detach vlc_event_detach
vlc_event_manager_fini vlc_event_manager_fini
vlc_event_manager_init __vlc_event_manager_init
vlc_event_manager_register_event_type vlc_event_manager_register_event_type
vlc_event_send vlc_event_send
__vlc_execve __vlc_execve
......
...@@ -110,7 +110,7 @@ group_contains_listener( vlc_event_listeners_group_t * group, ...@@ -110,7 +110,7 @@ group_contains_listener( vlc_event_listeners_group_t * group,
* for instance). * for instance).
* p_parent_obj gives a libvlc instance * p_parent_obj gives a libvlc instance
*/ */
int vlc_event_manager_init( vlc_event_manager_t * p_em, void * p_obj, int __vlc_event_manager_init( vlc_event_manager_t * p_em, void * p_obj,
vlc_object_t * p_parent_obj ) vlc_object_t * p_parent_obj )
{ {
p_em->p_obj = p_obj; p_em->p_obj = p_obj;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment