Changeset 5e827398d077bd2c2a560f2be6bedeb7a868fe92

Show
Ignore:
Timestamp:
20/08/07 01:38:02 (1 year ago)
Author:
Pierre d'Herbemont <pdherbemont@videolan.org>
git-committer:
Pierre d'Herbemont <pdherbemont@videolan.org> 1187566682 +0000
git-parent:

[17b50a650d27292d4d5b6901133eb23230691ddd]

git-author:
Pierre d'Herbemont <pdherbemont@videolan.org> 1187566682 +0000
Message:

control/tree.c: Add a new structure to work with tree.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • include/vlc/libvlc.h

    rd98eefb r5e82739  
    122122/** @}*/ 
    123123 
     124/***************************************************************************** 
     125 * Tree 
     126 *****************************************************************************/ 
     127/** defgroup libvlc_tree Tree 
     128 * \ingroup libvlc 
     129 * LibVLC Tree. A tree holds an item plus several subtrees. 
     130 * @{ 
     131 */ 
     132VLC_PUBLIC_API libvlc_tree_t * 
     133    libvlc_tree_new_with_media_list_as_item( libvlc_media_list_t * p_mlist, 
     134                                             libvlc_exception_t * p_e ); 
     135 
     136VLC_PUBLIC_API libvlc_tree_t * 
     137    libvlc_tree_new_with_string_as_item( const char * psz, 
     138                                         libvlc_exception_t * p_e ); 
     139VLC_PUBLIC_API void 
     140    libvlc_tree_release( libvlc_tree_t * p_tree ); 
     141 
     142VLC_PUBLIC_API void 
     143    libvlc_tree_retain( libvlc_tree_t * p_tree ); 
     144 
     145VLC_PUBLIC_API char * 
     146    libvlc_tree_item_as_string( libvlc_tree_t * p_tree, 
     147                                libvlc_exception_t * p_e ); 
     148 
     149VLC_PUBLIC_API libvlc_media_list_t * 
     150    libvlc_tree_item_as_media_list( libvlc_tree_t * p_tree, 
     151                                    libvlc_exception_t * p_e ); 
     152 
     153VLC_PUBLIC_API int 
     154    libvlc_tree_subtree_count( libvlc_tree_t * p_tree, libvlc_exception_t * p_e ); 
     155 
     156VLC_PUBLIC_API libvlc_tree_t * 
     157    libvlc_tree_subtree_at_index( libvlc_tree_t * p_tree, 
     158                              int index, 
     159                              libvlc_exception_t * p_e ); 
     160 
     161VLC_PUBLIC_API void 
     162    libvlc_tree_insert_subtree_at_index( libvlc_tree_t * p_tree, 
     163                                         libvlc_tree_t * p_subtree, 
     164                                         int index, 
     165                                         libvlc_exception_t * p_e ); 
     166 
     167VLC_PUBLIC_API void 
     168    libvlc_tree_remove_subtree_at_index( libvlc_tree_t * p_tree, 
     169                                         int index, 
     170                                         libvlc_exception_t * p_e ); 
     171 
     172/**@} */ 
     173 
     174 
    124175 
    125176/***************************************************************************** 
  • include/vlc/libvlc_structures.h

    rd98eefb r5e82739  
    5454 
    5555/***************************************************************************** 
     56 * Tree 
     57 *****************************************************************************/ 
     58/** defgroup libvlc_tree Tree 
     59 * \ingroup libvlc 
     60 * LibVLC Tree  
     61 * @{ 
     62 */ 
     63 
     64typedef void (*libvlc_retain_function)(void *); 
     65typedef void (*libvlc_release_function)(void *); 
     66 
     67typedef struct libvlc_tree_t libvlc_tree_t; 
     68 
     69/**@} */ 
     70 
     71/***************************************************************************** 
    5672 * Tag 
    5773 *****************************************************************************/ 
  • src/control/libvlc_internal.h

    r17b50a6 r5e82739  
    8181 
    8282 
     83struct libvlc_tree_t 
     84{ 
     85    int     i_refcount; 
     86    void *  p_item; /* For dynamic sublist */ 
     87    libvlc_retain_function  pf_item_retain; 
     88    libvlc_release_function pf_item_release; 
     89    DECL_ARRAY(struct libvlc_tree_t *)  subtrees; /* For dynamic sublist */ 
     90}; 
     91 
    8392struct libvlc_media_list_t 
    8493{