]> git.sesse.net Git - vlc/blob - modules/gui/macosx/playlist.h
* added a button to create an empty node at the top level of the playlist. Thanks...
[vlc] / modules / gui / macosx / playlist.h
1 /*****************************************************************************
2  * playlist.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2005 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     NSMutableDictionary *o_outline_dict;
45     int i_current_view;
46 }
47
48 - (void)initStrings;
49 - (playlist_item_t *)selectedPlaylistItem;
50 - (NSOutlineView *)outlineView;
51
52 @end
53
54 /*****************************************************************************
55  * VLCPlaylistWizard interface
56  *****************************************************************************/
57 @interface VLCPlaylistWizard : VLCPlaylistCommon
58 {
59 }
60
61 - (IBAction)reloadOutlineView;
62
63 @end
64
65 /*****************************************************************************
66  * VLCPlaylist interface
67  *****************************************************************************/
68 @interface VLCPlaylist : VLCPlaylistCommon
69 {
70     IBOutlet id o_controller;
71     IBOutlet id o_playlist_wizard;
72
73     IBOutlet id o_btn_playlist;
74     IBOutlet id o_playlist_view;
75     IBOutlet id o_status_field;
76     IBOutlet id o_search_field;
77     IBOutlet id o_random_ckb;
78     IBOutlet id o_loop_popup;
79     IBOutlet id o_mi_save_playlist;
80     IBOutlet id o_ctx_menu;
81
82     IBOutlet id o_mi_play;
83     IBOutlet id o_mi_delete;
84     IBOutlet id o_mi_info;
85     IBOutlet id o_mi_preparse;
86     IBOutlet id o_mi_selectall;
87     IBOutlet id o_mi_sort_name;
88     IBOutlet id o_mi_sort_author;
89     IBOutlet id o_mi_recursive_expand;
90
91     /* "services discovery" menu in the playlist menu */
92     IBOutlet id o_mi_services;
93     IBOutlet id o_mu_services;
94
95     /* "services discovery" menu in the main menu */
96     IBOutlet id o_mm_mi_services;
97     IBOutlet id o_mm_mu_services;
98
99     NSImage *o_descendingSortingImage;
100     NSImage *o_ascendingSortingImage;
101
102     NSMutableArray *o_nodes_array;
103     NSMutableArray *o_items_array;
104
105     BOOL b_selected_item_met;
106     BOOL b_isSortDescending;
107     id o_tc_sortColumn;
108     
109     /* "add node" button and menu entry */
110     IBOutlet id o_mi_addNode;
111     IBOutlet id o_btn_addNode;
112 }
113
114 - (void)searchfieldChanged:(NSNotification *)o_notification;
115 - (NSMenu *)menuForEvent:(NSEvent *)o_event;
116
117 - (IBAction)handlePopUp:(id)sender;
118 - (IBAction)searchItem:(id)sender;
119
120 - (void)playlistUpdated;
121 - (void)playModeUpdated;
122 - (void)sortNode:(int)i_mode;
123 - (void)updateRowSelection;
124
125 - (IBAction)servicesChange:(id)sender;
126 - (IBAction)playItem:(id)sender;
127 - (IBAction)preparseItem:(id)sender;
128 - (IBAction)savePlaylist:(id)sender;
129 - (IBAction)deleteItem:(id)sender;
130 - (IBAction)selectAll:(id)sender;
131 - (IBAction)sortNodeByName:(id)sender;
132 - (IBAction)sortNodeByAuthor:(id)sender;
133 - (IBAction)recursiveExpandNode:(id)sender;
134
135 - (IBAction)addNode:(id)sender;
136
137 - (void)appendArray:(NSArray*)o_array atPos:(int)i_position enqueue:(BOOL)b_enqueue;
138 - (void)appendNodeArray:(NSArray*)o_array inNode:(playlist_item_t *)p_node atPos:(int)i_position inView:(int)i_view enqueue:(BOOL)b_enqueue;
139
140
141 @end
142