VLCPlaylist.h 4.5 KB
Newer Older
Renaud Dartus's avatar
Renaud Dartus committed
1
/*****************************************************************************
2
 * VLCPlaylist.h: MacOS X interface module
Renaud Dartus's avatar
Renaud Dartus committed
3
 *****************************************************************************
4
 * Copyright (C) 2002-2015 VLC authors and VideoLAN
Benjamin Pracht's avatar
Benjamin Pracht committed
5
 * $Id$
Renaud Dartus's avatar
Renaud Dartus committed
6
 *
7
 * Authors: Benjamin Pracht <bigben at videolab dot org>
8
 *          Felix Paul Kühne <fkuehne at videolan dot org>
9
 *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
Renaud Dartus's avatar
Renaud Dartus committed
10 11 12 13 14
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
15
 *
Renaud Dartus's avatar
Renaud Dartus committed
16 17 18 19 20 21 22
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
Antoine Cellerier's avatar
Antoine Cellerier committed
23
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
Renaud Dartus's avatar
Renaud Dartus committed
24 25
 *****************************************************************************/

26
#import "PXSourceList.h"
27
#import "VLCPLModel.h"
28
#import "VLCPlaylistView.h"
29

30
@interface VLCPlaylist : NSResponder<NSOutlineViewDelegate>
31

32 33 34 35 36 37 38 39 40 41 42
@property (readwrite, weak) IBOutlet NSMenu *playlistMenu;
@property (readwrite, weak) IBOutlet NSMenuItem *playPlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *deletePlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *infoPlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *preparsePlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *revealInFinderPlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *downloadCoverArtPlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *selectAllPlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *sortNamePlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *sortAuthorPlaylistMenuItem;
@property (readwrite, weak) IBOutlet NSMenuItem *recursiveExpandPlaylistMenuItem;
43
@property (readwrite, weak) IBOutlet NSMenuItem *addFilesToPlaylistMenuItem;
44 45 46

@property (nonatomic, readwrite, weak) VLCPlaylistView *outlineView;
@property (nonatomic, readwrite, weak) NSTableHeaderView *playlistHeaderView;
47

48
- (VLCPLModel *)model;
49

50 51
- (void)reloadStyles;

Benjamin Pracht's avatar
Benjamin Pracht committed
52
- (NSMenu *)menuForEvent:(NSEvent *)o_event;
Derk-Jan Hartman's avatar
Derk-Jan Hartman committed
53

54
- (void)playlistUpdated;
55
- (void)playbackModeUpdated;
56
- (void)sortNode:(int)i_mode;
57 58

- (void)currentlyPlayingItemChanged;
59

60 61
- (BOOL)isSelectionEmpty;

62
- (IBAction)playItem:(id)sender;
63
- (IBAction)revealItemInFinder:(id)sender;
64
- (IBAction)preparseItem:(id)sender;
65
- (IBAction)downloadCoverArt:(id)sender;
Benjamin Pracht's avatar
Benjamin Pracht committed
66
- (IBAction)deleteItem:(id)sender;
67
- (IBAction)selectAll:(id)sender;
68 69
- (IBAction)sortNodeByName:(id)sender;
- (IBAction)sortNodeByAuthor:(id)sender;
70
- (IBAction)recursiveExpandNode:(id)sender;
71
- (IBAction)showInfoPanel:(id)sender;
72
- (IBAction)addFilesToPlaylist:(id)sender;
73

74
- (NSArray *)draggedItems;
75

76 77 78 79 80 81 82 83
/**
 * Prepares an array of playlist items for all suitable pasteboard types.
 *
 * This function checks external pasteboard objects (like files). If suitable,
 * an array of all objects is prepared.
 */
- (NSArray *)createItemsFromExternalPasteboard:(NSPasteboard *)pasteboard;

84 85
/**
 * Simplified version to add new items at the end of the current playlist
86
 * @param o_array array of items. Each item is a Dictionary with meta info.
87 88 89
 */
- (void)addPlaylistItems:(NSArray*)o_array;

90 91 92 93 94 95 96 97 98
/**
 * Add new items to playlist, with the possibility to check if an item can be added
 * to the currently playing media as subtitle.
 *
 * @param array array of items. Each item is a Dictionary with meta info.
 * @param isSubtitle if YES, method tries to add the item as a subtitle
 */
- (void)addPlaylistItems:(NSArray*)array tryAsSubtitle:(BOOL)isSubtitle;

99 100 101 102 103 104 105 106 107
/**
 * Adds new items to the playlist, at specified parent node and index.
 * @param o_array array of items. Each item is a Dictionary with meta info.
 * @param i_plItemId parent playlist node id, -1 for default playlist
 * @param i_position index for new items, -1 for appending at end
 * @param b_start starts playback of first item if true
 */
- (void)addPlaylistItems:(NSArray*)o_array withParentItemId:(int)i_plItemId atPos:(int)i_position startPlayback:(BOOL)b_start;

108

109 110 111
- (void)continuePlaybackWhereYouLeftOff:(input_thread_t *)p_input_thread;
- (void)storePlaybackPositionForItem:(input_thread_t *)p_input_thread;

112
@end