1 /*****************************************************************************
2 * playlist.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2002-2005 the VideoLAN team
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8 * Derk-Jan Hartman <hartman at videolan dot org>
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.
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.
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 *****************************************************************************/
25 /*****************************************************************************
26 * VLCPlaylistView interface
27 *****************************************************************************/
28 @interface VLCPlaylistView : NSOutlineView
34 /*****************************************************************************
35 * VLCPlaylistCommon interface
36 *****************************************************************************/
37 @interface VLCPlaylistCommon : NSObject
39 IBOutlet id o_tc_name;
40 IBOutlet id o_tc_author;
41 IBOutlet id o_tc_duration;
42 IBOutlet id o_outline_view;
44 NSMutableDictionary *o_outline_dict;
48 - (playlist_item_t *)selectedPlaylistItem;
49 - (NSOutlineView *)outlineView;
53 /*****************************************************************************
54 * VLCPlaylistWizard interface
55 *****************************************************************************/
56 @interface VLCPlaylistWizard : VLCPlaylistCommon
60 - (IBAction)reloadOutlineView;
64 /*****************************************************************************
65 * VLCPlaylist interface
66 *****************************************************************************/
67 @interface VLCPlaylist : VLCPlaylistCommon
69 IBOutlet id o_controller;
70 IBOutlet id o_playlist_wizard;
72 IBOutlet id o_btn_playlist;
73 IBOutlet id o_playlist_view;
74 IBOutlet id o_status_field;
75 IBOutlet id o_search_field;
76 IBOutlet id o_random_ckb;
77 IBOutlet id o_loop_popup;
78 IBOutlet id o_mi_save_playlist;
79 IBOutlet id o_ctx_menu;
81 IBOutlet id o_mi_play;
82 IBOutlet id o_mi_delete;
83 IBOutlet id o_mi_info;
84 IBOutlet id o_mi_preparse;
85 IBOutlet id o_mi_selectall;
86 IBOutlet id o_mi_sort_name;
87 IBOutlet id o_mi_sort_author;
88 IBOutlet id o_mi_recursive_expand;
90 /* "services discovery" menu in the playlist menu */
91 IBOutlet id o_mi_services;
92 IBOutlet id o_mu_services;
94 /* "services discovery" menu in the main menu */
95 IBOutlet id o_mm_mi_services;
96 IBOutlet id o_mm_mu_services;
98 IBOutlet id o_save_accessory_view;
99 IBOutlet id o_save_accessory_popup;
100 IBOutlet id o_save_accessory_text;
103 NSImage *o_descendingSortingImage;
104 NSImage *o_ascendingSortingImage;
106 NSMutableArray *o_nodes_array;
107 NSMutableArray *o_items_array;
109 BOOL b_selected_item_met;
110 BOOL b_isSortDescending;
113 /* "add node" button and menu entry */
114 IBOutlet id o_mi_addNode;
115 IBOutlet id o_btn_addNode;
118 - (void)searchfieldChanged:(NSNotification *)o_notification;
119 - (NSMenu *)menuForEvent:(NSEvent *)o_event;
121 - (IBAction)handlePopUp:(id)sender;
122 - (IBAction)searchItem:(id)sender;
124 - (void)playlistUpdated;
125 - (void)playModeUpdated;
126 - (void)sortNode:(int)i_mode;
127 - (void)updateRowSelection;
129 - (IBAction)servicesChange:(id)sender;
130 - (IBAction)playItem:(id)sender;
131 - (IBAction)preparseItem:(id)sender;
132 - (IBAction)savePlaylist:(id)sender;
133 - (IBAction)deleteItem:(id)sender;
134 - (IBAction)selectAll:(id)sender;
135 - (IBAction)sortNodeByName:(id)sender;
136 - (IBAction)sortNodeByAuthor:(id)sender;
137 - (IBAction)recursiveExpandNode:(id)sender;
139 - (IBAction)addNode:(id)sender;
141 - (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
142 - (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position enqueue:(BOOL)b_enqueue;