playlist.h 4.8 KB
Newer Older
Renaud Dartus's avatar
Renaud Dartus committed
1
/*****************************************************************************
2
 * playlist.h: MacOS X interface module
Renaud Dartus's avatar
Renaud Dartus committed
3
 *****************************************************************************
Felix Paul Kühne's avatar
Felix Paul Kühne committed
4
 * Copyright (C) 2002-2006 VLC authors and VideoLAN
Benjamin Pracht's avatar
Benjamin Pracht committed
5
 * $Id$
Renaud Dartus's avatar
Renaud Dartus committed
6
 *
7
 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8
 *          Derk-Jan Hartman <hartman at videolan dot org>
Renaud Dartus's avatar
Renaud Dartus committed
9 10 11 12 13
 *
 * 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.
14
 *
Renaud Dartus's avatar
Renaud Dartus committed
15 16 17 18 19 20 21
 * 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
22
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
Renaud Dartus's avatar
Renaud Dartus committed
23 24
 *****************************************************************************/

25 26
#import "PXSourceList.h"

27
/*****************************************************************************
28
 * VLCPlaylistView interface
29
 *****************************************************************************/
30
@interface VLCPlaylistView : NSOutlineView
31
{
32 33 34 35 36
}

@end

/*****************************************************************************
37
 * VLCPlaylistCommon interface
38
 *****************************************************************************/
39
@interface VLCPlaylistCommon : NSObject <NSOutlineViewDataSource, NSOutlineViewDelegate>
40 41 42 43
{
    IBOutlet id o_tc_name;
    IBOutlet id o_tc_author;
    IBOutlet id o_tc_duration;
44
    IBOutlet VLCPlaylistView* o_outline_view;
45

46 47 48
    IBOutlet id o_tc_name_other;
    IBOutlet id o_tc_author_other;
    IBOutlet id o_tc_duration_other;
49
    IBOutlet VLCPlaylistView* o_outline_view_other;
50

51
    NSMutableDictionary *o_outline_dict;
52 53 54 55 56
}

- (void)initStrings;
- (playlist_item_t *)selectedPlaylistItem;
- (NSOutlineView *)outlineView;
57
- (void)swapPlaylists:(id)newList;
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
@end

/*****************************************************************************
 * VLCPlaylistWizard interface
 *****************************************************************************/
@interface VLCPlaylistWizard : VLCPlaylistCommon
{
}

- (IBAction)reloadOutlineView;

@end

/*****************************************************************************
 * VLCPlaylist interface
 *****************************************************************************/
@interface VLCPlaylist : VLCPlaylistCommon
75
{
76
    IBOutlet id o_controller;
77
    IBOutlet id o_playlist_wizard;
78

79
    IBOutlet id o_btn_playlist;
80
    IBOutlet id o_playlist_view;
81
    IBOutlet id o_search_field;
82
    IBOutlet id o_search_field_other;
83
    IBOutlet id o_mi_save_playlist;
84 85 86 87 88
    IBOutlet id o_ctx_menu;

    IBOutlet id o_mi_play;
    IBOutlet id o_mi_delete;
    IBOutlet id o_mi_info;
89
    IBOutlet id o_mi_preparse;
90 91
    IBOutlet id o_mi_revealInFinder;
    IBOutlet id o_mm_mi_revealInFinder;
92
    IBOutlet id o_mi_dl_cover_art;
93
    IBOutlet id o_mi_selectall;
94 95
    IBOutlet id o_mi_sort_name;
    IBOutlet id o_mi_sort_author;
96
    IBOutlet id o_mi_recursive_expand;
97

98
    /* "services discovery" menu in the playlist menu */
99 100
    IBOutlet id o_mi_services;
    IBOutlet id o_mu_services;
101

102 103 104
    /* "services discovery" menu in the main menu */
    IBOutlet id o_mm_mi_services;
    IBOutlet id o_mm_mu_services;
105

106 107 108 109 110
    IBOutlet id o_save_accessory_view;
    IBOutlet id o_save_accessory_popup;
    IBOutlet id o_save_accessory_text;


111 112
    NSImage *o_descendingSortingImage;
    NSImage *o_ascendingSortingImage;
113

Benjamin Pracht's avatar
Benjamin Pracht committed
114 115
    NSMutableArray *o_nodes_array;
    NSMutableArray *o_items_array;
116

Derk-Jan Hartman's avatar
Derk-Jan Hartman committed
117 118
    BOOL b_selected_item_met;
    BOOL b_isSortDescending;
119
    id o_tc_sortColumn;
120 121
}

122
- (void)searchfieldChanged:(NSNotification *)o_notification;
Benjamin Pracht's avatar
Benjamin Pracht committed
123
- (NSMenu *)menuForEvent:(NSEvent *)o_event;
Derk-Jan Hartman's avatar
Derk-Jan Hartman committed
124 125

- (IBAction)searchItem:(id)sender;
Jon Lech Johansen's avatar
Jon Lech Johansen committed
126

127
- (void)playlistUpdated;
128
- (void)outlineViewSelectionDidChange:(NSNotification *)notification;
129
- (void)sortNode:(int)i_mode;
130
- (void)updateRowSelection;
Benjamin Pracht's avatar
Benjamin Pracht committed
131

132 133
- (BOOL)isSelectionEmpty;

134
- (IBAction)servicesChange:(id)sender;
Benjamin Pracht's avatar
Benjamin Pracht committed
135
- (IBAction)playItem:(id)sender;
136
- (IBAction)revealItemInFinder:(id)sender;
137
- (IBAction)preparseItem:(id)sender;
138
- (IBAction)downloadCoverArt:(id)sender;
139
- (IBAction)savePlaylist:(id)sender;
Benjamin Pracht's avatar
Benjamin Pracht committed
140
- (IBAction)deleteItem:(id)sender;
Benjamin Pracht's avatar
Benjamin Pracht committed
141
- (IBAction)selectAll:(id)sender;
142 143
- (IBAction)sortNodeByName:(id)sender;
- (IBAction)sortNodeByAuthor:(id)sender;
144
- (IBAction)recursiveExpandNode:(id)sender;
145

146 147
- (id)playingItem;

148
- (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
149
- (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position enqueue:(BOOL)b_enqueue;
150

151
@end