1 /*****************************************************************************
2 * playlist.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2002-2012 VLC authors and VideoLAN
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8 * Derk-Jan Hartman <hartman at videolan dot org>
9 * Felix Paul Kühne <fkuehne at videolan dot org>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
26 #import "PXSourceList.h"
28 /*****************************************************************************
29 * VLCPlaylistView interface
30 *****************************************************************************/
31 @interface VLCPlaylistView : NSOutlineView
35 /*****************************************************************************
36 * VLCPlaylistWizard interface
37 *****************************************************************************/
38 @interface VLCPlaylistWizard : NSObject
39 - (IBAction)reloadOutlineView;
45 /*****************************************************************************
46 * VLCPlaylist interface
47 *****************************************************************************/
48 @interface VLCPlaylist : NSObject<NSOutlineViewDataSource, NSOutlineViewDelegate>
50 IBOutlet VLCPlaylistView* o_outline_view;
52 IBOutlet id o_controller;
53 IBOutlet id o_playlist_wizard;
55 IBOutlet id o_btn_playlist;
56 IBOutlet id o_playlist_view;
57 IBOutlet id o_search_field;
58 IBOutlet id o_mi_save_playlist;
59 IBOutlet id o_ctx_menu;
61 IBOutlet id o_mi_play;
62 IBOutlet id o_mi_delete;
63 IBOutlet id o_mi_info;
64 IBOutlet id o_mi_preparse;
65 IBOutlet id o_mi_revealInFinder;
66 IBOutlet id o_mm_mi_revealInFinder;
67 IBOutlet id o_mi_dl_cover_art;
68 IBOutlet id o_mi_selectall;
69 IBOutlet id o_mi_sort_name;
70 IBOutlet id o_mi_sort_author;
71 IBOutlet id o_mi_recursive_expand;
73 IBOutlet id o_save_accessory_view;
74 IBOutlet id o_save_accessory_popup;
75 IBOutlet id o_save_accessory_text;
77 IBOutlet id o_playlist_header;
79 int currentResumeTimeout;
88 - (NSMenu *)menuForEvent:(NSEvent *)o_event;
90 - (IBAction)searchItem:(id)sender;
92 - (void)playlistUpdated;
93 - (void)outlineViewSelectionDidChange:(NSNotification *)notification;
94 - (void)sortNode:(int)i_mode;
95 - (void)updateRowSelection;
97 - (BOOL)isSelectionEmpty;
99 - (IBAction)playItem:(id)sender;
100 - (IBAction)revealItemInFinder:(id)sender;
101 - (IBAction)preparseItem:(id)sender;
102 - (IBAction)downloadCoverArt:(id)sender;
103 - (IBAction)savePlaylist:(id)sender;
104 - (IBAction)deleteItem:(id)sender;
105 - (IBAction)selectAll:(id)sender;
106 - (IBAction)sortNodeByName:(id)sender;
107 - (IBAction)sortNodeByAuthor:(id)sender;
108 - (IBAction)recursiveExpandNode:(id)sender;
109 - (IBAction)showInfoPanel:(id)sender;
111 - (NSArray *)draggedItems;
114 * Simplified version to add new items at the end of the current playlist
116 - (void)addPlaylistItems:(NSArray*)o_array;
119 * Adds new items to the playlist, at specified parent node and index.
120 * @param o_array array of items. Each item is a Dictionary with meta info.
121 * @param i_plItemId parent playlist node id, -1 for default playlist
122 * @param i_position index for new items, -1 for appending at end
123 * @param b_start starts playback of first item if true
125 - (void)addPlaylistItems:(NSArray*)o_array withParentItemId:(int)i_plItemId atPos:(int)i_position startPlayback:(BOOL)b_start;
128 - (void)setColumn: (NSString *)o_column state: (NSInteger)i_state translationDict:(NSDictionary *)o_dict;
129 - (void)continuePlaybackWhereYouLeftOff:(input_thread_t *)p_input_thread;
130 - (void)storePlaybackPositionForItem:(input_thread_t *)p_input_thread;