]> git.sesse.net Git - vlc/blob - modules/gui/macosx/playlist.h
b356ddaab4e583e7ec425ea50f9cca4e6c5bf9f0
[vlc] / modules / gui / macosx / playlist.h
1 /*****************************************************************************
2  * playlist.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2006 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8  *          Derk-Jan Hartman <hartman at videolan dot org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 /*****************************************************************************
26  * VLCPlaylistView interface
27  *****************************************************************************/
28 @interface VLCPlaylistView : NSOutlineView
29 {
30 }
31
32 @end
33
34 /*****************************************************************************
35  * VLCPlaylistCommon interface
36  *****************************************************************************/
37 #ifndef MAC_OS_X_VERSION_10_6
38 @protocol NSOutlineViewDataSource <NSObject> @end
39 #endif
40 @interface VLCPlaylistCommon : NSObject <NSOutlineViewDataSource, NSOutlineViewDelegate>
41 {
42     IBOutlet id o_tc_name;
43     IBOutlet id o_tc_author;
44     IBOutlet id o_tc_duration;
45     IBOutlet VLCPlaylistView* o_outline_view;
46
47     IBOutlet id o_tc_name_other;
48     IBOutlet id o_tc_author_other;
49     IBOutlet id o_tc_duration_other;
50     IBOutlet VLCPlaylistView* o_outline_view_other;
51
52     NSMutableDictionary *o_outline_dict;
53 }
54
55 - (void)initStrings;
56 - (playlist_item_t *)selectedPlaylistItem;
57 - (NSOutlineView *)outlineView;
58 - (void)swapPlaylists:(id)newList;
59 @end
60
61 /*****************************************************************************
62  * VLCPlaylistWizard interface
63  *****************************************************************************/
64 @interface VLCPlaylistWizard : VLCPlaylistCommon
65 {
66 }
67
68 - (IBAction)reloadOutlineView;
69
70 @end
71
72 /*****************************************************************************
73  * VLCPlaylist interface
74  *****************************************************************************/
75 @interface VLCPlaylist : VLCPlaylistCommon
76 {
77     IBOutlet id o_controller;
78     IBOutlet id o_playlist_wizard;
79
80     IBOutlet id o_btn_playlist;
81     IBOutlet id o_playlist_view;
82     IBOutlet id o_search_field;
83     IBOutlet id o_search_field_other;
84     IBOutlet id o_mi_save_playlist;
85     IBOutlet id o_ctx_menu;
86
87     IBOutlet id o_mi_play;
88     IBOutlet id o_mi_delete;
89     IBOutlet id o_mi_info;
90     IBOutlet id o_mi_preparse;
91     IBOutlet id o_mi_revealInFinder;
92     IBOutlet id o_mm_mi_revealInFinder;
93     IBOutlet id o_mi_dl_cover_art;
94     IBOutlet id o_mi_selectall;
95     IBOutlet id o_mi_sort_name;
96     IBOutlet id o_mi_sort_author;
97     IBOutlet id o_mi_recursive_expand;
98
99     /* "services discovery" menu in the playlist menu */
100     IBOutlet id o_mi_services;
101     IBOutlet id o_mu_services;
102
103     /* "services discovery" menu in the main menu */
104     IBOutlet id o_mm_mi_services;
105     IBOutlet id o_mm_mu_services;
106
107     IBOutlet id o_save_accessory_view;
108     IBOutlet id o_save_accessory_popup;
109     IBOutlet id o_save_accessory_text;
110
111
112     NSImage *o_descendingSortingImage;
113     NSImage *o_ascendingSortingImage;
114
115     NSMutableArray *o_nodes_array;
116     NSMutableArray *o_items_array;
117
118     BOOL b_selected_item_met;
119     BOOL b_isSortDescending;
120     id o_tc_sortColumn;
121 }
122
123 - (void)searchfieldChanged:(NSNotification *)o_notification;
124 - (NSMenu *)menuForEvent:(NSEvent *)o_event;
125
126 - (IBAction)searchItem:(id)sender;
127
128 - (void)playlistUpdated;
129 - (void)outlineViewSelectionDidChange:(NSNotification *)notification;
130 - (void)sortNode:(int)i_mode;
131 - (void)updateRowSelection;
132
133 - (BOOL)isSelectionEmpty;
134
135 - (IBAction)servicesChange:(id)sender;
136 - (IBAction)playItem:(id)sender;
137 - (IBAction)revealItemInFinder:(id)sender;
138 - (IBAction)preparseItem:(id)sender;
139 - (IBAction)downloadCoverArt:(id)sender;
140 - (IBAction)savePlaylist:(id)sender;
141 - (IBAction)deleteItem:(id)sender;
142 - (IBAction)selectAll:(id)sender;
143 - (IBAction)sortNodeByName:(id)sender;
144 - (IBAction)sortNodeByAuthor:(id)sender;
145 - (IBAction)recursiveExpandNode:(id)sender;
146
147 - (id)playingItem;
148
149 - (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
150 - (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position enqueue:(BOOL)b_enqueue;
151
152 @end