1 /*****************************************************************************
2 * VLCPlaylist.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2002-2015 VLC authors and VideoLAN
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>
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"
27 #import "VLCPLModel.h"
28 #import "VLCPlaylistView.h"
30 @interface VLCPlaylist
: NSResponder
<NSOutlineViewDelegate
>
32 @
property (readwrite
, weak
) IBOutlet NSMenu
*playlistMenu
;
33 @
property (readwrite
, weak
) IBOutlet NSMenuItem
*playPlaylistMenuItem
;
34 @
property (readwrite
, weak
) IBOutlet NSMenuItem
*deletePlaylistMenuItem
;
35 @
property (readwrite
, weak
) IBOutlet NSMenuItem
*infoPlaylistMenuItem
;
36 @
property (readwrite
, weak
) IBOutlet NSMenuItem
*revealInFinderPlaylistMenuItem
;
37 @
property (readwrite
, weak
) IBOutlet NSMenuItem
*selectAllPlaylistMenuItem
;
38 @
property (readwrite
, weak
) IBOutlet NSMenuItem
*recursiveExpandPlaylistMenuItem
;
39 @
property (readwrite
, weak
) IBOutlet NSMenuItem
*recursiveCollapsePlaylistMenuItem
;
40 @
property (readwrite
, weak
) IBOutlet NSMenuItem
*addFilesToPlaylistMenuItem
;
42 @
property (nonatomic
, readwrite
, weak
) VLCPlaylistView
*outlineView
;
43 @
property (nonatomic
, readwrite
, weak
) NSTableHeaderView
*playlistHeaderView
;
45 - (VLCPLModel
*)model
;
49 - (NSMenu
*)menuForEvent
:(NSEvent
*)o_event
;
51 - (void)playlistUpdated
;
52 - (void)playbackModeUpdated
;
54 - (void)currentlyPlayingItemChanged
;
56 - (BOOL
)isSelectionEmpty
;
58 - (IBAction
)playItem
:(id
)sender
;
59 - (IBAction
)revealItemInFinder
:(id
)sender
;
60 - (IBAction
)deleteItem
:(id
)sender
;
61 - (IBAction
)selectAll
:(id
)sender
;
62 - (IBAction
)recursiveExpandOrCollapseNode
:(id
)sender
;
63 - (IBAction
)showInfoPanel
:(id
)sender
;
64 - (IBAction
)addFilesToPlaylist
:(id
)sender
;
66 - (NSArray
*)draggedItems
;
69 * Prepares an array of playlist items for all suitable pasteboard types.
71 * This function checks external pasteboard objects (like files). If suitable,
72 * an array of all objects is prepared.
74 - (NSArray
*)createItemsFromExternalPasteboard
:(NSPasteboard
*)pasteboard
;
77 * Simplified version to add new items at the end of the current playlist
78 * @param array array of items. Each item is a Dictionary with meta info.
80 - (void)addPlaylistItems
:(NSArray
*)array
;
83 * Add new items to playlist, with the possibility to check if an item can be added
84 * to the currently playing media as subtitle.
86 * @param array array of items. Each item is a Dictionary with meta info.
87 * @param isSubtitle if YES, method tries to add the item as a subtitle
89 - (void)addPlaylistItems
:(NSArray
*)array tryAsSubtitle
:(BOOL
)isSubtitle
;
92 * Adds new items to the playlist, at specified parent node and index.
93 * @param o_array array of items. Each item is a Dictionary with meta info.
94 * @param i_plItemId parent playlist node id, -1 for default playlist
95 * @param i_position index for new items, -1 for appending at end
96 * @param b_start starts playback of first item if true
98 - (void)addPlaylistItems
:(NSArray
*)o_array withParentItemId
:(int)i_plItemId atPos
:(int)i_position startPlayback
:(BOOL
)b_start
;
101 - (void)continuePlaybackWhereYouLeftOff
:(input_thread_t
*)p_input_thread
;
102 - (void)storePlaybackPositionForItem
:(input_thread_t
*)p_input_thread
;