media_list_view_internal.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef LIBVLC_MEDIA_LIST_VIEW_INTERNAL_H
00026 #define LIBVLC_MEDIA_LIST_VIEW_INTERNAL_H 1
00027
00028 #ifdef HAVE_CONFIG_H
00029 # include "config.h"
00030 #endif
00031
00032 #include <vlc/vlc.h>
00033 #include <vlc/libvlc_structures.h>
00034 #include <vlc/libvlc_media_list.h>
00035
00036 #include <vlc_common.h>
00037
00038 typedef libvlc_media_list_view_t * (*libvlc_media_list_view_constructor_func_t)( libvlc_media_list_t * p_mlist, libvlc_exception_t * p_e ) ;
00039 typedef void (*libvlc_media_list_view_release_func_t)( libvlc_media_list_view_t * p_mlv ) ;
00040
00041 typedef int (*libvlc_media_list_view_count_func_t)( libvlc_media_list_view_t * p_mlv,
00042 libvlc_exception_t * ) ;
00043
00044 typedef libvlc_media_t *
00045 (*libvlc_media_list_view_item_at_index_func_t)(
00046 libvlc_media_list_view_t * p_mlv,
00047 int index,
00048 libvlc_exception_t * ) ;
00049
00050 typedef libvlc_media_list_view_t *
00051 (*libvlc_media_list_view_children_at_index_func_t)(
00052 libvlc_media_list_view_t * p_mlv,
00053 int index,
00054 libvlc_exception_t * ) ;
00055
00056
00057 struct libvlc_media_list_view_t
00058 {
00059 libvlc_event_manager_t * p_event_manager;
00060 libvlc_instance_t * p_libvlc_instance;
00061 int i_refcount;
00062 vlc_mutex_t object_lock;
00063
00064 libvlc_media_list_t * p_mlist;
00065
00066 struct libvlc_media_list_view_private_t * p_this_view_data;
00067
00068
00069 libvlc_media_list_view_count_func_t pf_count;
00070 libvlc_media_list_view_item_at_index_func_t pf_item_at_index;
00071 libvlc_media_list_view_children_at_index_func_t pf_children_at_index;
00072
00073 libvlc_media_list_view_constructor_func_t pf_constructor;
00074 libvlc_media_list_view_release_func_t pf_release;
00075
00076
00077 void (*pf_ml_item_added)(const libvlc_event_t *, libvlc_media_list_view_t *);
00078 void (*pf_ml_item_removed)(const libvlc_event_t *, libvlc_media_list_view_t *);
00079 };
00080
00081
00082 libvlc_media_list_view_t * libvlc_media_list_view_new(
00083 libvlc_media_list_t * p_mlist,
00084 libvlc_media_list_view_count_func_t pf_count,
00085 libvlc_media_list_view_item_at_index_func_t pf_item_at_index,
00086 libvlc_media_list_view_children_at_index_func_t pf_children_at_index,
00087 libvlc_media_list_view_constructor_func_t pf_constructor,
00088 libvlc_media_list_view_release_func_t pf_release,
00089 void * this_view_data,
00090 libvlc_exception_t * p_e );
00091
00092 void libvlc_media_list_view_set_ml_notification_callback(
00093 libvlc_media_list_view_t * p_mlv,
00094 void (*item_added)(const libvlc_event_t *, libvlc_media_list_view_t *),
00095 void (*item_removed)(const libvlc_event_t *, libvlc_media_list_view_t *) );
00096
00097 void libvlc_media_list_view_will_delete_item(
00098 libvlc_media_list_view_t * p_mlv,
00099 libvlc_media_t * p_item, int index );
00100
00101 void libvlc_media_list_view_item_deleted(
00102 libvlc_media_list_view_t * p_mlv,
00103 libvlc_media_t * p_item, int index );
00104
00105 void libvlc_media_list_view_will_add_item (
00106 libvlc_media_list_view_t * p_mlv,
00107 libvlc_media_t * p_item, int index );
00108
00109 void libvlc_media_list_view_item_added(
00110 libvlc_media_list_view_t * p_mlv,
00111 libvlc_media_t * p_item, int index );
00112
00113 #endif