~ubuntu-branches/ubuntu/natty/vlc/natty

« back to all changes in this revision

Viewing changes to src/control/media_list_view_internal.h

  • Committer: Bazaar Package Importer
  • Author(s): Benjamin Drung
  • Date: 2010-06-25 01:09:16 UTC
  • mfrom: (1.1.30 upstream)
  • Revision ID: james.westby@ubuntu.com-20100625010916-asxhep2mutg6g6pd
Tags: 1.1.0-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - build and install the libx264 plugin
  - add Xb-Npp header to vlc package
  - Add apport hook to include more vlc dependencies in bug reports
* Drop xulrunner patches.
* Drop 502_xulrunner_191.diff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*****************************************************************************
2
 
 * libvlc_internal.h : Definition of opaque structures for libvlc exported API
3
 
 * Also contains some internal utility functions
4
 
 *****************************************************************************
5
 
 * Copyright (C) 2005-2009 the VideoLAN team
6
 
 * $Id: b45347889a812d05257bf744745423bcd307146e $
7
 
 *
8
 
 * Authors: Clément Stenac <zorglub@videolan.org>
9
 
 *
10
 
 * This program is free software; you can redistribute it and/or modify
11
 
 * it under the terms of the GNU General Public License as published by
12
 
 * the Free Software Foundation; either version 2 of the License, or
13
 
 * (at your option) any later version.
14
 
 *
15
 
 * This program is distributed in the hope that it will be useful,
16
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 
 * GNU General Public License for more details.
19
 
 *
20
 
 * You should have received a copy of the GNU General Public License
21
 
 * along with this program; if not, write to the Free Software
22
 
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23
 
 *****************************************************************************/
24
 
 
25
 
#ifndef LIBVLC_MEDIA_LIST_VIEW_INTERNAL_H
26
 
#define LIBVLC_MEDIA_LIST_VIEW_INTERNAL_H 1
27
 
 
28
 
#ifdef HAVE_CONFIG_H
29
 
# include "config.h"
30
 
#endif
31
 
 
32
 
#include <vlc/vlc.h>
33
 
#include <vlc/libvlc_structures.h>
34
 
#include <vlc/libvlc_media_list.h>
35
 
 
36
 
#include <vlc_common.h>
37
 
 
38
 
typedef libvlc_media_list_view_t * (*libvlc_media_list_view_constructor_func_t)( libvlc_media_list_t * p_mlist, libvlc_exception_t * p_e ) ;
39
 
typedef void (*libvlc_media_list_view_release_func_t)( libvlc_media_list_view_t * p_mlv ) ;
40
 
 
41
 
typedef int (*libvlc_media_list_view_count_func_t)( libvlc_media_list_view_t * p_mlv,
42
 
        libvlc_exception_t * ) ;
43
 
 
44
 
typedef libvlc_media_t *
45
 
        (*libvlc_media_list_view_item_at_index_func_t)(
46
 
                libvlc_media_list_view_t * p_mlv,
47
 
                int index,
48
 
                libvlc_exception_t * ) ;
49
 
 
50
 
typedef libvlc_media_list_view_t *
51
 
        (*libvlc_media_list_view_children_at_index_func_t)(
52
 
                libvlc_media_list_view_t * p_mlv,
53
 
                int index,
54
 
                libvlc_exception_t * ) ;
55
 
 
56
 
/* A way to see a media list */
57
 
struct libvlc_media_list_view_t
58
 
{
59
 
    libvlc_event_manager_t *    p_event_manager;
60
 
    libvlc_instance_t *         p_libvlc_instance;
61
 
    int                         i_refcount;
62
 
    vlc_mutex_t                 object_lock;
63
 
 
64
 
    libvlc_media_list_t *       p_mlist;
65
 
 
66
 
    struct libvlc_media_list_view_private_t * p_this_view_data;
67
 
 
68
 
    /* Accessors */
69
 
    libvlc_media_list_view_count_func_t              pf_count;
70
 
    libvlc_media_list_view_item_at_index_func_t      pf_item_at_index;
71
 
    libvlc_media_list_view_children_at_index_func_t  pf_children_at_index;
72
 
 
73
 
    libvlc_media_list_view_constructor_func_t        pf_constructor;
74
 
    libvlc_media_list_view_release_func_t            pf_release;
75
 
 
76
 
    /* Notification callback */
77
 
    void (*pf_ml_item_added)(const libvlc_event_t *, libvlc_media_list_view_t *);
78
 
    void (*pf_ml_item_removed)(const libvlc_event_t *, libvlc_media_list_view_t *);
79
 
};
80
 
 
81
 
/* Media List View */
82
 
libvlc_media_list_view_t * libvlc_media_list_view_new(
83
 
        libvlc_media_list_t * p_mlist,
84
 
        libvlc_media_list_view_count_func_t pf_count,
85
 
        libvlc_media_list_view_item_at_index_func_t pf_item_at_index,
86
 
        libvlc_media_list_view_children_at_index_func_t pf_children_at_index,
87
 
        libvlc_media_list_view_constructor_func_t pf_constructor,
88
 
        libvlc_media_list_view_release_func_t pf_release,
89
 
        void * this_view_data,
90
 
        libvlc_exception_t * p_e );
91
 
 
92
 
void libvlc_media_list_view_set_ml_notification_callback(
93
 
        libvlc_media_list_view_t * p_mlv,
94
 
        void (*item_added)(const libvlc_event_t *, libvlc_media_list_view_t *),
95
 
        void (*item_removed)(const libvlc_event_t *, libvlc_media_list_view_t *) );
96
 
 
97
 
void libvlc_media_list_view_will_delete_item(
98
 
        libvlc_media_list_view_t * p_mlv,
99
 
        libvlc_media_t * p_item, int index );
100
 
 
101
 
void libvlc_media_list_view_item_deleted(
102
 
        libvlc_media_list_view_t * p_mlv,
103
 
        libvlc_media_t * p_item, int index );
104
 
 
105
 
void libvlc_media_list_view_will_add_item (
106
 
        libvlc_media_list_view_t * p_mlv,
107
 
        libvlc_media_t * p_item, int index );
108
 
 
109
 
void libvlc_media_list_view_item_added(
110
 
        libvlc_media_list_view_t * p_mlv,
111
 
        libvlc_media_t * p_item, int index );
112
 
 
113
 
#endif