]> git.sesse.net Git - vlc/blob - modules/gui/macosx/playlist.h
f79f7b27534bcbd20a256178effb25c3da2db4de
[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 /* playlist column definitions */
29 #define TRACKNUM_COLUMN @"tracknumber"
30 #define TITLE_COLUMN @"name"
31 #define ARTIST_COLUMN @"artist"
32 #define DURATION_COLUMN @"duration"
33 #define GENRE_COLUMN @"genre"
34 #define ALBUM_COLUMN @"album"
35 #define DESCRIPTION_COLUMN @"description"
36 #define DATE_COLUMN @"date"
37 #define LANGUAGE_COLUMN @"language"
38 #define URI_COLUMN @"uri"
39 #define FILESIZE_COLUMN @"file-size"
40
41 /*****************************************************************************
42  * VLCPlaylistView interface
43  *****************************************************************************/
44 @interface VLCPlaylistView : NSOutlineView
45
46 @end
47
48 /*****************************************************************************
49  * VLCPlaylistWizard interface
50  *****************************************************************************/
51 @interface VLCPlaylistWizard : NSObject
52 - (IBAction)reloadOutlineView;
53
54 @end
55
56 #import "PLModel.h"
57
58 /*****************************************************************************
59  * VLCPlaylist interface
60  *****************************************************************************/
61 @interface VLCPlaylist : NSObject<NSOutlineViewDataSource, NSOutlineViewDelegate>
62 {
63     IBOutlet VLCPlaylistView* o_outline_view;
64
65     NSMutableDictionary *o_outline_dict;
66
67     IBOutlet id o_controller;
68     IBOutlet id o_playlist_wizard;
69
70     IBOutlet id o_btn_playlist;
71     IBOutlet id o_playlist_view;
72     IBOutlet id o_search_field;
73     IBOutlet id o_mi_save_playlist;
74     IBOutlet id o_ctx_menu;
75
76     IBOutlet id o_mi_play;
77     IBOutlet id o_mi_delete;
78     IBOutlet id o_mi_info;
79     IBOutlet id o_mi_preparse;
80     IBOutlet id o_mi_revealInFinder;
81     IBOutlet id o_mm_mi_revealInFinder;
82     IBOutlet id o_mi_dl_cover_art;
83     IBOutlet id o_mi_selectall;
84     IBOutlet id o_mi_sort_name;
85     IBOutlet id o_mi_sort_author;
86     IBOutlet id o_mi_recursive_expand;
87
88     IBOutlet id o_save_accessory_view;
89     IBOutlet id o_save_accessory_popup;
90     IBOutlet id o_save_accessory_text;
91
92     IBOutlet id o_playlist_header;
93
94     int currentResumeTimeout;
95
96     PLModel *o_model;
97 }
98
99 - (PLModel *)model;
100
101 - (playlist_item_t *)currentPlaylistRoot;
102 - (void)reloadStyles;
103
104 - (NSMenu *)menuForEvent:(NSEvent *)o_event;
105
106 - (IBAction)searchItem:(id)sender;
107
108 - (void)playlistUpdated;
109 - (void)outlineViewSelectionDidChange:(NSNotification *)notification;
110 - (void)sortNode:(int)i_mode;
111 - (void)updateRowSelection;
112
113 - (BOOL)isSelectionEmpty;
114
115 - (IBAction)playItem:(id)sender;
116 - (IBAction)revealItemInFinder:(id)sender;
117 - (IBAction)preparseItem:(id)sender;
118 - (IBAction)downloadCoverArt:(id)sender;
119 - (IBAction)savePlaylist:(id)sender;
120 - (IBAction)deleteItem:(id)sender;
121 - (IBAction)selectAll:(id)sender;
122 - (IBAction)sortNodeByName:(id)sender;
123 - (IBAction)sortNodeByAuthor:(id)sender;
124 - (IBAction)recursiveExpandNode:(id)sender;
125 - (IBAction)showInfoPanel:(id)sender;
126
127 - (id)playingItem;
128 - (NSArray *)draggedItems;
129
130 - (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
131 - (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position enqueue:(BOOL)b_enqueue;
132
133 - (void)setColumn: (NSString *)o_column state: (NSInteger)i_state translationDict:(NSDictionary *)o_dict;
134 - (void)continuePlaybackWhereYouLeftOff:(input_thread_t *)p_input_thread;
135 - (void)storePlaybackPositionForItem:(input_thread_t *)p_input_thread;
136
137 @end