]> git.sesse.net Git - vlc/blob - modules/gui/macosx/playlist.h
macosx: cleanup pl data source, do not show file size for directories
[vlc] / modules / gui / macosx / playlist.h
1 /*****************************************************************************
2  * playlist.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2012 VLC authors and VideoLAN
5  * $Id$
6  *
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>
10  *
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.
15  *
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.
20  *
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  *****************************************************************************/
25
26 #import "PXSourceList.h"
27
28 /*****************************************************************************
29  * VLCPlaylistView interface
30  *****************************************************************************/
31 @interface VLCPlaylistView : NSOutlineView
32
33 @end
34
35 /*****************************************************************************
36  * VLCPlaylistWizard interface
37  *****************************************************************************/
38 @interface VLCPlaylistWizard : NSObject
39 - (IBAction)reloadOutlineView;
40
41 @end
42
43 #import "PLModel.h"
44
45 /*****************************************************************************
46  * VLCPlaylist interface
47  *****************************************************************************/
48 @interface VLCPlaylist : NSObject<NSOutlineViewDataSource, NSOutlineViewDelegate>
49 {
50     IBOutlet VLCPlaylistView* o_outline_view;
51
52     IBOutlet id o_controller;
53     IBOutlet id o_playlist_wizard;
54
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;
60
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;
72
73     IBOutlet id o_save_accessory_view;
74     IBOutlet id o_save_accessory_popup;
75     IBOutlet id o_save_accessory_text;
76
77     IBOutlet id o_playlist_header;
78
79     int currentResumeTimeout;
80
81     PLModel *o_model;
82 }
83
84 - (PLModel *)model;
85
86 - (void)reloadStyles;
87
88 - (NSMenu *)menuForEvent:(NSEvent *)o_event;
89
90 - (IBAction)searchItem:(id)sender;
91
92 - (void)playlistUpdated;
93 - (void)outlineViewSelectionDidChange:(NSNotification *)notification;
94 - (void)sortNode:(int)i_mode;
95 - (void)updateRowSelection;
96
97 - (BOOL)isSelectionEmpty;
98
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;
110
111 - (NSArray *)draggedItems;
112
113 /**
114  * Simplified version to add new items at the end of the current playlist
115  */
116 - (void)addPlaylistItems:(NSArray*)o_array;
117
118 /**
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
124  */
125 - (void)addPlaylistItems:(NSArray*)o_array withParentItemId:(int)i_plItemId atPos:(int)i_position startPlayback:(BOOL)b_start;
126
127
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;
131
132 @end