]> git.sesse.net Git - vlc/blob - modules/gui/macosx/playlist.h
macosx: don't use NSNotifcations to handle VLC's dialog callbacks, always perform...
[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 @interface VLCPlaylistCommon : NSObject
38 {
39     IBOutlet id o_tc_name;
40     IBOutlet id o_tc_author;
41     IBOutlet id o_tc_duration;
42     IBOutlet id o_outline_view;
43
44     IBOutlet id o_tc_name_other;
45     IBOutlet id o_tc_author_other;
46     IBOutlet id o_tc_duration_other;
47     IBOutlet id o_outline_view_other;
48
49     NSMutableDictionary *o_outline_dict;
50 }
51
52 - (void)initStrings;
53 - (playlist_item_t *)selectedPlaylistItem;
54 - (NSOutlineView *)outlineView;
55 - (void)swapPlaylists:(id)newList;
56 @end
57
58 /*****************************************************************************
59  * VLCPlaylistWizard interface
60  *****************************************************************************/
61 @interface VLCPlaylistWizard : VLCPlaylistCommon
62 {
63 }
64
65 - (IBAction)reloadOutlineView;
66
67 @end
68
69 /*****************************************************************************
70  * VLCPlaylist interface
71  *****************************************************************************/
72 @interface VLCPlaylist : VLCPlaylistCommon
73 {
74     IBOutlet id o_controller;
75     IBOutlet id o_playlist_wizard;
76
77     IBOutlet id o_btn_playlist;
78     IBOutlet id o_playlist_view;
79     IBOutlet id o_sidebar;
80     IBOutlet id o_search_field;
81     IBOutlet id o_search_field_other;
82     IBOutlet id o_mi_save_playlist;
83     IBOutlet id o_ctx_menu;
84
85     IBOutlet id o_mi_play;
86     IBOutlet id o_mi_delete;
87     IBOutlet id o_mi_info;
88     IBOutlet id o_mi_preparse;
89     IBOutlet id o_mi_revealInFinder;
90     IBOutlet id o_mm_mi_revealInFinder;
91     IBOutlet id o_mi_dl_cover_art;
92     IBOutlet id o_mi_selectall;
93     IBOutlet id o_mi_sort_name;
94     IBOutlet id o_mi_sort_author;
95     IBOutlet id o_mi_recursive_expand;
96
97     /* "services discovery" menu in the playlist menu */
98     IBOutlet id o_mi_services;
99     IBOutlet id o_mu_services;
100
101     /* "services discovery" menu in the main menu */
102     IBOutlet id o_mm_mi_services;
103     IBOutlet id o_mm_mu_services;
104
105     IBOutlet id o_save_accessory_view;
106     IBOutlet id o_save_accessory_popup;
107     IBOutlet id o_save_accessory_text;
108
109
110     NSImage *o_descendingSortingImage;
111     NSImage *o_ascendingSortingImage;
112
113     NSMutableArray *o_nodes_array;
114     NSMutableArray *o_items_array;
115
116     BOOL b_selected_item_met;
117     BOOL b_isSortDescending;
118     id o_tc_sortColumn;
119 }
120
121 - (void)searchfieldChanged:(NSNotification *)o_notification;
122 - (NSMenu *)menuForEvent:(NSEvent *)o_event;
123
124 - (IBAction)searchItem:(id)sender;
125
126 - (void)playlistUpdated;
127 - (void)playModeUpdated;
128 - (void)sortNode:(int)i_mode;
129 - (void)updateRowSelection;
130
131 - (BOOL)isSelectionEmpty;
132
133 - (IBAction)servicesChange:(id)sender;
134 - (IBAction)playItem:(id)sender;
135 - (IBAction)revealItemInFinder:(id)sender;
136 - (IBAction)preparseItem:(id)sender;
137 - (IBAction)downloadCoverArt:(id)sender;
138 - (IBAction)savePlaylist:(id)sender;
139 - (IBAction)deleteItem:(id)sender;
140 - (IBAction)selectAll:(id)sender;
141 - (IBAction)sortNodeByName:(id)sender;
142 - (IBAction)sortNodeByAuthor:(id)sender;
143 - (IBAction)recursiveExpandNode:(id)sender;
144
145 - (void)playSidebarItem:(id)item;
146 - (id)playingItem;
147
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