1 /*****************************************************************************
2 * open.h: Open dialogues for VLC's MacOS X port
3 *****************************************************************************
4 * Copyright (C) 2002-2011 the VideoLAN team
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 /*****************************************************************************
29 *****************************************************************************/
30 @interface VLCOpen : NSObject
32 IBOutlet id o_playlist;
36 IBOutlet id o_mrl_fld;
37 IBOutlet id o_mrl_lbl;
38 IBOutlet id o_mrl_view;
39 IBOutlet id o_mrl_btn;
40 IBOutlet id o_tabview;
43 IBOutlet id o_btn_cancel;
45 /* bottom-line items */
46 IBOutlet id o_output_ckbox;
47 IBOutlet id o_sout_options;
50 IBOutlet id o_file_name;
51 IBOutlet id o_file_name_stub;
52 IBOutlet id o_file_icon_well;
53 IBOutlet id o_file_btn_browse;
54 IBOutlet id o_file_stream;
55 IBOutlet id o_file_slave_ckbox;
56 IBOutlet id o_file_slave_select_btn;
57 IBOutlet id o_file_slave_filename_lbl;
58 IBOutlet id o_file_slave_icon_well;
59 IBOutlet id o_file_subtitles_filename_lbl;
60 IBOutlet id o_file_subtitles_icon_well;
63 IBOutlet id o_disc_icon_well;
64 IBOutlet id o_disc_selector_pop;
66 IBOutlet id o_disc_nodisc_view;
67 IBOutlet id o_disc_nodisc_lbl;
68 IBOutlet id o_disc_nodisc_videots_btn;
69 IBOutlet id o_disc_nodisc_bdmv_btn;
71 IBOutlet id o_disc_audiocd_view;
72 IBOutlet id o_disc_audiocd_lbl;
73 IBOutlet id o_disc_audiocd_trackcount_lbl;
74 IBOutlet id o_disc_audiocd_videots_btn;
75 IBOutlet id o_disc_audiocd_bdmv_btn;
77 IBOutlet id o_disc_dvd_view;
78 IBOutlet id o_disc_dvd_lbl;
79 IBOutlet id o_disc_dvd_disablemenus_btn;
80 IBOutlet id o_disc_dvd_videots_btn;
81 IBOutlet id o_disc_dvd_bdmv_btn;
83 IBOutlet id o_disc_dvdwomenus_view;
84 IBOutlet id o_disc_dvdwomenus_lbl;
85 IBOutlet id o_disc_dvdwomenus_enablemenus_btn;
86 IBOutlet id o_disc_dvdwomenus_videots_btn;
87 IBOutlet id o_disc_dvdwomenus_bdmv_btn;
88 IBOutlet id o_disc_dvdwomenus_title;
89 IBOutlet id o_disc_dvdwomenus_title_lbl;
90 IBOutlet id o_disc_dvdwomenus_title_stp;
91 IBOutlet id o_disc_dvdwomenus_chapter;
92 IBOutlet id o_disc_dvdwomenus_chapter_lbl;
93 IBOutlet id o_disc_dvdwomenus_chapter_stp;
95 IBOutlet id o_disc_vcd_view;
96 IBOutlet id o_disc_vcd_lbl;
97 IBOutlet id o_disc_vcd_videots_btn;
98 IBOutlet id o_disc_vcd_bdmv_btn;
99 IBOutlet id o_disc_vcd_title;
100 IBOutlet id o_disc_vcd_title_lbl;
101 IBOutlet id o_disc_vcd_title_stp;
102 IBOutlet id o_disc_vcd_chapter;
103 IBOutlet id o_disc_vcd_chapter_lbl;
104 IBOutlet id o_disc_vcd_chapter_stp;
106 IBOutlet id o_disc_bd_view;
107 IBOutlet id o_disc_bd_lbl;
108 IBOutlet id o_disc_bd_videots_btn;
109 IBOutlet id o_disc_bd_bdmv_btn;
112 IBOutlet id o_net_http_url;
113 IBOutlet id o_net_http_url_lbl;
114 IBOutlet id o_net_help_lbl;
116 /* open UDP stuff panel */
117 IBOutlet id o_net_help_udp_lbl;
118 IBOutlet id o_net_udp_protocol_mat;
119 IBOutlet id o_net_udp_protocol_lbl;
120 IBOutlet id o_net_udp_address_lbl;
121 IBOutlet id o_net_udp_mode_lbl;
122 IBOutlet id o_net_mode;
123 IBOutlet id o_net_openUDP_btn;
124 IBOutlet id o_net_udp_cancel_btn;
125 IBOutlet id o_net_udp_ok_btn;
126 IBOutlet id o_net_udp_panel;
127 IBOutlet id o_net_udp_port;
128 IBOutlet id o_net_udp_port_lbl;
129 IBOutlet id o_net_udp_port_stp;
130 IBOutlet id o_net_udpm_addr;
131 IBOutlet id o_net_udpm_addr_lbl;
132 IBOutlet id o_net_udpm_port;
133 IBOutlet id o_net_udpm_port_lbl;
134 IBOutlet id o_net_udpm_port_stp;
136 /* open subtitle file */
137 IBOutlet id o_file_sub_ckbox;
138 IBOutlet id o_file_sub_btn_settings;
139 IBOutlet id o_file_sub_sheet;
140 IBOutlet id o_file_sub_path;
141 IBOutlet id o_file_sub_btn_browse;
142 IBOutlet id o_file_sub_override;
143 IBOutlet id o_file_sub_delay;
144 IBOutlet id o_file_sub_delay_lbl;
145 IBOutlet id o_file_sub_delay_stp;
146 IBOutlet id o_file_sub_fps;
147 IBOutlet id o_file_sub_fps_lbl;
148 IBOutlet id o_file_sub_fps_stp;
149 IBOutlet id o_file_sub_encoding_pop;
150 IBOutlet id o_file_sub_encoding_lbl;
151 IBOutlet id o_file_sub_size_pop;
152 IBOutlet id o_file_sub_size_lbl;
153 IBOutlet id o_file_sub_align_pop;
154 IBOutlet id o_file_sub_align_lbl;
155 IBOutlet id o_file_sub_ok_btn;
156 IBOutlet id o_file_sub_font_box;
157 IBOutlet id o_file_sub_file_box;
159 /* generic capturing stuff */
160 IBOutlet id o_capture_lbl;
161 IBOutlet id o_capture_long_lbl;
162 IBOutlet id o_capture_mode_pop;
163 IBOutlet id o_capture_label_view;
166 IBOutlet id o_eyetv_notLaunched_view;
167 IBOutlet id o_eyetv_running_view;
168 IBOutlet id o_eyetv_channels_pop;
169 IBOutlet id o_eyetv_currentChannel_lbl;
170 IBOutlet id o_eyetv_chn_status_txt;
171 IBOutlet id o_eyetv_chn_bgbar;
172 IBOutlet id o_eyetv_launchEyeTV_btn;
173 IBOutlet id o_eyetv_getPlugin_btn;
174 IBOutlet id o_eyetv_nextProgram_btn;
175 IBOutlet id o_eyetv_noInstance_lbl;
176 IBOutlet id o_eyetv_noInstanceLong_lbl;
177 IBOutlet id o_eyetv_previousProgram_btn;
180 IBOutlet id o_screen_view;
181 IBOutlet id o_screen_long_lbl;
182 IBOutlet id o_screen_fps_fld;
183 IBOutlet id o_screen_fps_lbl;
184 IBOutlet id o_screen_fps_stp;
185 IBOutlet id o_screen_left_fld;
186 IBOutlet id o_screen_left_lbl;
187 IBOutlet id o_screen_left_stp;
188 IBOutlet id o_screen_top_fld;
189 IBOutlet id o_screen_top_lbl;
190 IBOutlet id o_screen_top_stp;
191 IBOutlet id o_screen_width_fld;
192 IBOutlet id o_screen_width_lbl;
193 IBOutlet id o_screen_width_stp;
194 IBOutlet id o_screen_height_fld;
195 IBOutlet id o_screen_height_lbl;
196 IBOutlet id o_screen_height_stp;
197 IBOutlet id o_screen_follow_mouse_ckb;
200 IBOutlet id o_qtk_view;
201 IBOutlet id o_qtk_long_lbl;
202 IBOutlet id o_qtk_device_pop;
203 IBOutlet id o_qtk_label_view;
204 IBOutlet id o_capture_width_lbl;
205 IBOutlet id o_capture_width_fld;
206 IBOutlet id o_capture_width_stp;
207 IBOutlet id o_capture_height_lbl;
208 IBOutlet id o_capture_height_fld;
209 IBOutlet id o_capture_height_stp;
211 NSArray *qtkvideoDevices;
212 NSString *qtk_currdevice_uid;
216 id o_currentOpticalMediaView;
217 NSMutableArray *o_opticalDevices;
218 NSMutableArray *o_specialMediaFolders;
219 NSString *o_file_path;
220 id o_currentCaptureView;
221 NSString *o_file_slave_path;
223 intf_thread_t * p_intf;
226 + (VLCOpen *)sharedInstance;
228 - (void)setMRL:(NSString *)mrl;
231 - (NSArray *)qtkvideoDevices;
232 - (void)qtkrefreshDevices;
235 - (void)openTarget:(int)i_type;
236 - (void)tabView:(NSTabView *)o_tv didSelectTabViewItem:(NSTabViewItem *)o_tvi;
237 - (void)textFieldWasClicked:(NSNotification *)o_notification;
238 - (IBAction)expandMRLfieldAction:(id)sender;
239 - (IBAction)inputSlaveAction:(id)sender;
241 - (void)openFileGeneric;
242 - (void)openFilePathChanged:(NSNotification *)o_notification;
243 - (IBAction)openFileBrowse:(id)sender;
244 - (void)pathChosenInPanel: (NSOpenPanel *)sheet withReturn:(int)returnCode contextInfo:(void *)contextInfo;
245 - (IBAction)openFileStreamChanged:(id)sender;
248 - (void)scanOpticalMedia:(NSNotification *)o_notification;
249 - (IBAction)discSelectorChanged:(id)sender;
250 - (IBAction)openSpecialMediaFolder:(id)sender;
251 - (IBAction)dvdreadOptionChanged:(id)sender;
252 - (IBAction)vcdOptionChanged:(id)sender;
255 - (IBAction)openNetModeChanged:(id)sender;
256 - (IBAction)openNetStepperChanged:(id)sender;
257 - (void)openNetInfoChanged:(NSNotification *)o_notification;
258 - (IBAction)openNetUDPButtonAction:(id)sender;
261 - (void)showCaptureView: theView;
262 - (IBAction)openCaptureModeChanged:(id)sender;
263 - (IBAction)qtkChanged:(id)sender;
264 - (IBAction)eyetvSwitchChannel:(id)sender;
265 - (IBAction)eyetvLaunch:(id)sender;
266 - (IBAction)eyetvGetPlugin:(id)sender;
267 - (void)eyetvChanged:(NSNotification *)o_notification;
268 - (void)setupChannelInfo;
269 - (IBAction)screenStepperChanged:(id)sender;
270 - (void)screenFPSfieldChanged:(NSNotification *)o_notification;
272 - (IBAction)subsChanged:(id)sender;
273 - (IBAction)subSettings:(id)sender;
274 - (IBAction)subFileBrowse:(id)sender;
275 - (IBAction)subOverride:(id)sender;
276 - (IBAction)subDelayStepperChanged:(id)sender;
277 - (IBAction)subFpsStepperChanged:(id)sender;
278 - (IBAction)subCloseSheet:(id)sender;
280 - (IBAction)panelCancel:(id)sender;
281 - (IBAction)panelOk:(id)sender;
286 @interface VLCOpenTextField : NSTextField
289 - (void)mouseDown:(NSEvent *)theEvent;