]> git.sesse.net Git - vlc/blob - modules/gui/macosx/open.h
macosx/Open: merge the QTCapture and QTSound views
[vlc] / modules / gui / macosx / open.h
1 /*****************************************************************************
2  * open.h: Open dialogues for VLC's MacOS X port
3  *****************************************************************************
4  * Copyright (C) 2002-2012 VLC authors and VideoLAN
5  * $Id$
6  *
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>
11  *
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.
16  *
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.
21  *
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  *****************************************************************************/
26
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"
35
36 /*****************************************************************************
37  * Intf_Open interface
38  *****************************************************************************/
39 @interface VLCOpen : NSObject
40 {
41     IBOutlet id o_panel;
42
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;
48
49     IBOutlet id o_btn_ok;
50     IBOutlet id o_btn_cancel;
51
52     /* bottom-line items */
53     IBOutlet id o_output_ckbox;
54     IBOutlet id o_sout_options;
55
56     /* open file */
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;
73
74     /* open disc */
75     IBOutlet id o_disc_selector_pop;
76
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;
81
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;
87
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;
93
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;
105
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;
116
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;
121
122     /* open network */
123     IBOutlet id o_net_http_url;
124     IBOutlet id o_net_http_url_lbl;
125     IBOutlet id o_net_help_lbl;
126
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;
146
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;
171
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;
177
178     /* eyetv support */
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;
191
192     /* screen support */
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
214     /* QTK support */
215     IBOutlet id o_qtk_view;
216     IBOutlet id o_qtk_video_device_pop;
217     IBOutlet id o_qtk_video_ckb;
218     IBOutlet id o_qtk_audio_device_pop;
219     IBOutlet id o_qtk_audio_ckb;
220     IBOutlet id o_capture_width_lbl;
221     IBOutlet id o_capture_width_fld;
222     IBOutlet id o_capture_width_stp;
223     IBOutlet id o_capture_height_lbl;
224     IBOutlet id o_capture_height_fld;
225     IBOutlet id o_capture_height_stp;
226
227     NSArray         *qtkvideoDevices;
228     NSArray         *qtkaudioDevices;
229     NSString        *qtk_currdevice_uid;
230     NSString        *qtkaudio_currdevice_uid;
231
232     BOOL b_autoplay;
233     BOOL b_nodvdmenus;
234     id o_currentOpticalMediaView;
235     id o_currentOpticalMediaIconView;
236     NSMutableArray *o_opticalDevices;
237     NSMutableArray *o_specialMediaFolders;
238     NSString *o_file_path;
239     id o_currentCaptureView;
240     NSString *o_file_slave_path;
241     NSString *o_sub_path;
242     NSString *o_mrl;
243     intf_thread_t * p_intf;
244     NSMutableArray *o_displayInfos;
245 }
246
247 + (VLCOpen *)sharedInstance;
248
249 - (void)setMRL:(NSString *)mrl;
250 - (NSString *)MRL;
251
252 - (NSArray *)qtkvideoDevices;
253 - (void)qtkrefreshVideoDevices;
254
255 - (NSArray *)qtkaudioDevices;
256 - (void)qtkrefreshAudioDevices;
257
258 - (void)setSubPanel;
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;
265
266 - (void)openFileGeneric;
267 - (void)openFilePathChanged:(NSNotification *)o_notification;
268 - (IBAction)openFileBrowse:(id)sender;
269 - (void)pathChosenInPanel: (NSOpenPanel *)sheet withReturn:(int)returnCode contextInfo:(void *)contextInfo;
270 - (IBAction)openFileStreamChanged:(id)sender;
271
272 - (void)openDisc;
273 - (void)scanOpticalMedia:(NSNotification *)o_notification;
274 - (IBAction)discSelectorChanged:(id)sender;
275 - (IBAction)openSpecialMediaFolder:(id)sender;
276 - (IBAction)dvdreadOptionChanged:(id)sender;
277 - (IBAction)vcdOptionChanged:(id)sender;
278 - (char *)getVolumeTypeFromMountPath:(NSString *)mountPath;
279 - (NSString *)getBSDNodeFromMountPath:(NSString *)mountPath;
280
281 - (void)openNet;
282 - (IBAction)openNetModeChanged:(id)sender;
283 - (IBAction)openNetStepperChanged:(id)sender;
284 - (void)openNetInfoChanged:(NSNotification *)o_notification;
285 - (IBAction)openNetUDPButtonAction:(id)sender;
286
287 - (void)openCapture;
288 - (void)showCaptureView: theView;
289 - (IBAction)openCaptureModeChanged:(id)sender;
290 - (IBAction)qtkChanged:(id)sender;
291 - (IBAction)qtkAudioChanged:(id)sender;
292 - (IBAction)qtkToggleUIElements:(id)sender;
293 - (IBAction)screenChanged:(id)sender;
294 - (IBAction)eyetvSwitchChannel:(id)sender;
295 - (IBAction)eyetvLaunch:(id)sender;
296 - (IBAction)eyetvGetPlugin:(id)sender;
297 - (void)eyetvChanged:(NSNotification *)o_notification;
298 - (void)setupChannelInfo;
299 - (void)screenFPSfieldChanged:(NSNotification *)o_notification;
300
301 - (IBAction)subsChanged:(id)sender;
302 - (IBAction)subSettings:(id)sender;
303 - (IBAction)subFileBrowse:(id)sender;
304 - (IBAction)subOverride:(id)sender;
305 - (IBAction)subDelayStepperChanged:(id)sender;
306 - (IBAction)subFpsStepperChanged:(id)sender;
307 - (IBAction)subCloseSheet:(id)sender;
308
309 - (IBAction)panelCancel:(id)sender;
310 - (IBAction)panelOk:(id)sender;
311
312 - (void)openFile;
313 @end
314
315 @interface VLCOpenTextField : NSTextField
316 {
317 }
318 - (void)mouseDown:(NSEvent *)theEvent;
319 @end