1 /*****************************************************************************
2 * open.h: Open dialogues for VLC's MacOS X port
3 *****************************************************************************
4 * Copyright (C) 2002-2012 VLC authors and VideoLAN
7 * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
8 * Christophe Massiot <massiot@via.ecp.fr>
9 * Derk-Jan Hartman <thedj@users.sourceforge.net>
10 * Felix Paul Kühne <fkuehne at videolan dot org>
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
25 *****************************************************************************/
27 #define kVLCMediaAudioCD @"AudioCD"
28 #define kVLCMediaDVD @"DVD"
29 #define kVLCMediaVCD @"VCD"
30 #define kVLCMediaSVCD @"SVCD"
31 #define kVLCMediaBD @"Bluray"
32 #define kVLCMediaVideoTSFolder @"VIDEO_TS"
33 #define kVLCMediaBDMVFolder @"BDMV"
34 #define kVLCMediaUnknown @"Unknown"
36 /*****************************************************************************
38 *****************************************************************************/
39 @interface VLCOpen : NSObject
43 IBOutlet id o_mrl_fld;
44 IBOutlet id o_mrl_lbl;
45 IBOutlet id o_mrl_view;
46 IBOutlet id o_mrl_btn;
47 IBOutlet id o_tabview;
50 IBOutlet id o_btn_cancel;
52 /* bottom-line items */
53 IBOutlet id o_output_ckbox;
54 IBOutlet id o_sout_options;
57 IBOutlet id o_file_name;
58 IBOutlet id o_file_name_stub;
59 IBOutlet id o_file_icon_well;
60 IBOutlet id o_file_btn_browse;
61 IBOutlet id o_file_stream;
62 IBOutlet id o_file_slave_ckbox;
63 IBOutlet id o_file_slave_select_btn;
64 IBOutlet id o_file_slave_filename_lbl;
65 IBOutlet id o_file_slave_icon_well;
66 IBOutlet id o_file_subtitles_filename_lbl;
67 IBOutlet id o_file_subtitles_icon_well;
68 IBOutlet id o_file_custom_timing_ckb;
69 IBOutlet id o_file_starttime_fld;
70 IBOutlet id o_file_starttime_lbl;
71 IBOutlet id o_file_stoptime_fld;
72 IBOutlet id o_file_stoptime_lbl;
75 IBOutlet id o_disc_selector_pop;
77 IBOutlet id o_disc_nodisc_view;
78 IBOutlet id o_disc_nodisc_lbl;
79 IBOutlet id o_disc_nodisc_videots_btn;
80 IBOutlet id o_disc_nodisc_bdmv_btn;
82 IBOutlet id o_disc_audiocd_view;
83 IBOutlet id o_disc_audiocd_lbl;
84 IBOutlet id o_disc_audiocd_trackcount_lbl;
85 IBOutlet id o_disc_audiocd_videots_btn;
86 IBOutlet id o_disc_audiocd_bdmv_btn;
88 IBOutlet id o_disc_dvd_view;
89 IBOutlet id o_disc_dvd_lbl;
90 IBOutlet id o_disc_dvd_disablemenus_btn;
91 IBOutlet id o_disc_dvd_videots_btn;
92 IBOutlet id o_disc_dvd_bdmv_btn;
94 IBOutlet id o_disc_dvdwomenus_view;
95 IBOutlet id o_disc_dvdwomenus_lbl;
96 IBOutlet id o_disc_dvdwomenus_enablemenus_btn;
97 IBOutlet id o_disc_dvdwomenus_videots_btn;
98 IBOutlet id o_disc_dvdwomenus_bdmv_btn;
99 IBOutlet id o_disc_dvdwomenus_title;
100 IBOutlet id o_disc_dvdwomenus_title_lbl;
101 IBOutlet id o_disc_dvdwomenus_title_stp;
102 IBOutlet id o_disc_dvdwomenus_chapter;
103 IBOutlet id o_disc_dvdwomenus_chapter_lbl;
104 IBOutlet id o_disc_dvdwomenus_chapter_stp;
106 IBOutlet id o_disc_vcd_view;
107 IBOutlet id o_disc_vcd_lbl;
108 IBOutlet id o_disc_vcd_videots_btn;
109 IBOutlet id o_disc_vcd_bdmv_btn;
110 IBOutlet id o_disc_vcd_title;
111 IBOutlet id o_disc_vcd_title_lbl;
112 IBOutlet id o_disc_vcd_title_stp;
113 IBOutlet id o_disc_vcd_chapter;
114 IBOutlet id o_disc_vcd_chapter_lbl;
115 IBOutlet id o_disc_vcd_chapter_stp;
117 IBOutlet id o_disc_bd_view;
118 IBOutlet id o_disc_bd_lbl;
119 IBOutlet id o_disc_bd_videots_btn;
120 IBOutlet id o_disc_bd_bdmv_btn;
123 IBOutlet id o_net_http_url;
124 IBOutlet id o_net_http_url_lbl;
125 IBOutlet id o_net_help_lbl;
127 /* open UDP stuff panel */
128 IBOutlet id o_net_help_udp_lbl;
129 IBOutlet id o_net_udp_protocol_mat;
130 IBOutlet id o_net_udp_protocol_lbl;
131 IBOutlet id o_net_udp_address_lbl;
132 IBOutlet id o_net_udp_mode_lbl;
133 IBOutlet id o_net_mode;
134 IBOutlet id o_net_openUDP_btn;
135 IBOutlet id o_net_udp_cancel_btn;
136 IBOutlet id o_net_udp_ok_btn;
137 IBOutlet id o_net_udp_panel;
138 IBOutlet id o_net_udp_port;
139 IBOutlet id o_net_udp_port_lbl;
140 IBOutlet id o_net_udp_port_stp;
141 IBOutlet id o_net_udpm_addr;
142 IBOutlet id o_net_udpm_addr_lbl;
143 IBOutlet id o_net_udpm_port;
144 IBOutlet id o_net_udpm_port_lbl;
145 IBOutlet id o_net_udpm_port_stp;
147 /* open subtitle file */
148 IBOutlet id o_file_sub_ckbox;
149 IBOutlet id o_file_sub_btn_settings;
150 IBOutlet id o_file_sub_sheet;
151 IBOutlet id o_file_sub_path_lbl;
152 IBOutlet id o_file_sub_path_fld;
153 IBOutlet id o_file_sub_icon_view;
154 IBOutlet id o_file_sub_btn_browse;
155 IBOutlet id o_file_sub_override;
156 IBOutlet id o_file_sub_delay;
157 IBOutlet id o_file_sub_delay_lbl;
158 IBOutlet id o_file_sub_delay_stp;
159 IBOutlet id o_file_sub_fps;
160 IBOutlet id o_file_sub_fps_lbl;
161 IBOutlet id o_file_sub_fps_stp;
162 IBOutlet id o_file_sub_encoding_pop;
163 IBOutlet id o_file_sub_encoding_lbl;
164 IBOutlet id o_file_sub_size_pop;
165 IBOutlet id o_file_sub_size_lbl;
166 IBOutlet id o_file_sub_align_pop;
167 IBOutlet id o_file_sub_align_lbl;
168 IBOutlet id o_file_sub_ok_btn;
169 IBOutlet id o_file_sub_font_box;
170 IBOutlet id o_file_sub_file_box;
172 /* generic capturing stuff */
173 IBOutlet id o_capture_lbl;
174 IBOutlet id o_capture_long_lbl;
175 IBOutlet id o_capture_mode_pop;
176 IBOutlet id o_capture_label_view;
179 IBOutlet id o_eyetv_notLaunched_view;
180 IBOutlet id o_eyetv_running_view;
181 IBOutlet id o_eyetv_channels_pop;
182 IBOutlet id o_eyetv_currentChannel_lbl;
183 IBOutlet id o_eyetv_chn_status_txt;
184 IBOutlet id o_eyetv_chn_bgbar;
185 IBOutlet id o_eyetv_launchEyeTV_btn;
186 IBOutlet id o_eyetv_getPlugin_btn;
187 IBOutlet id o_eyetv_nextProgram_btn;
188 IBOutlet id o_eyetv_noInstance_lbl;
189 IBOutlet id o_eyetv_noInstanceLong_lbl;
190 IBOutlet id o_eyetv_previousProgram_btn;
193 IBOutlet id o_screen_view;
194 IBOutlet id o_screen_long_lbl;
195 IBOutlet id o_screen_fps_fld;
196 IBOutlet id o_screen_fps_lbl;
197 IBOutlet id o_screen_fps_stp;
198 IBOutlet id o_screen_screen_lbl;
199 IBOutlet id o_screen_screen_pop;
200 IBOutlet id o_screen_left_fld;
201 IBOutlet id o_screen_left_lbl;
202 IBOutlet id o_screen_left_stp;
203 IBOutlet id o_screen_top_fld;
204 IBOutlet id o_screen_top_lbl;
205 IBOutlet id o_screen_top_stp;
206 IBOutlet id o_screen_width_fld;
207 IBOutlet id o_screen_width_lbl;
208 IBOutlet id o_screen_width_stp;
209 IBOutlet id o_screen_height_fld;
210 IBOutlet id o_screen_height_lbl;
211 IBOutlet id o_screen_height_stp;
212 IBOutlet id o_screen_follow_mouse_ckb;
213 IBOutlet id o_screen_qtk_audio_pop;
214 IBOutlet id o_screen_qtk_audio_ckb;
217 IBOutlet id o_qtk_view;
218 IBOutlet id o_qtk_video_device_pop;
219 IBOutlet id o_qtk_video_ckb;
220 IBOutlet id o_qtk_audio_device_pop;
221 IBOutlet id o_qtk_audio_ckb;
222 IBOutlet id o_capture_width_lbl;
223 IBOutlet id o_capture_width_fld;
224 IBOutlet id o_capture_width_stp;
225 IBOutlet id o_capture_height_lbl;
226 IBOutlet id o_capture_height_fld;
227 IBOutlet id o_capture_height_stp;
229 NSArray *qtkvideoDevices;
230 NSArray *qtkaudioDevices;
231 NSString *qtk_currdevice_uid;
232 NSString *qtkaudio_currdevice_uid;
236 id o_currentOpticalMediaView;
237 id o_currentOpticalMediaIconView;
238 NSMutableArray *o_allMediaDevices;
239 NSArray *o_opticalDevices;
240 NSMutableArray *o_specialMediaFolders;
241 NSString *o_file_path;
242 id o_currentCaptureView;
243 NSString *o_file_slave_path;
244 NSString *o_sub_path;
246 NSMutableArray *o_displayInfos;
249 + (VLCOpen *)sharedInstance;
251 @property (readwrite, assign) NSString *MRL;
252 @property (readonly) NSArray *qtkvideoDevices;
253 @property (readonly) NSArray *qtkaudioDevices;
255 - (void)qtkrefreshVideoDevices;
256 - (void)qtkrefreshAudioDevices;
259 - (void)openTarget:(int)i_type;
260 - (void)tabView:(NSTabView *)o_tv didSelectTabViewItem:(NSTabViewItem *)o_tvi;
261 - (void)textFieldWasClicked:(NSNotification *)o_notification;
262 - (IBAction)expandMRLfieldAction:(id)sender;
263 - (IBAction)inputSlaveAction:(id)sender;
264 - (IBAction)fileTimeCustomization:(id)sender;
266 - (void)openFileGeneric;
267 - (void)openFilePathChanged:(NSNotification *)o_notification;
268 - (IBAction)openFileBrowse:(id)sender;
269 - (IBAction)openFileStreamChanged:(id)sender;
272 - (void)scanOpticalMedia:(NSNotification *)o_notification;
273 - (IBAction)discSelectorChanged:(id)sender;
274 - (IBAction)openSpecialMediaFolder:(id)sender;
275 - (IBAction)dvdreadOptionChanged:(id)sender;
276 - (IBAction)vcdOptionChanged:(id)sender;
277 - (NSString *)getVolumeTypeFromMountPath:(NSString *)mountPath;
278 - (NSString *)getBSDNodeFromMountPath:(NSString *)mountPath;
281 - (IBAction)openNetModeChanged:(id)sender;
282 - (IBAction)openNetStepperChanged:(id)sender;
283 - (void)openNetInfoChanged:(NSNotification *)o_notification;
284 - (IBAction)openNetUDPButtonAction:(id)sender;
287 - (void)showCaptureView: theView;
288 - (IBAction)openCaptureModeChanged:(id)sender;
289 - (IBAction)qtkChanged:(id)sender;
290 - (IBAction)qtkAudioChanged:(id)sender;
291 - (IBAction)qtkToggleUIElements:(id)sender;
292 - (IBAction)screenChanged:(id)sender;
293 - (IBAction)eyetvSwitchChannel:(id)sender;
294 - (IBAction)eyetvLaunch:(id)sender;
295 - (IBAction)eyetvGetPlugin:(id)sender;
296 - (void)eyetvChanged:(NSNotification *)o_notification;
297 - (void)setupChannelInfo;
298 - (void)screenFPSfieldChanged:(NSNotification *)o_notification;
300 - (IBAction)subsChanged:(id)sender;
301 - (IBAction)subSettings:(id)sender;
302 - (IBAction)subFileBrowse:(id)sender;
303 - (IBAction)subOverride:(id)sender;
304 - (IBAction)subDelayStepperChanged:(id)sender;
305 - (IBAction)subFpsStepperChanged:(id)sender;
306 - (IBAction)subCloseSheet:(id)sender;
308 - (IBAction)panelCancel:(id)sender;
309 - (IBAction)panelOk:(id)sender;
314 @interface VLCOpenTextField : NSTextField
315 - (void)mouseDown:(NSEvent *)theEvent;