]> git.sesse.net Git - vlc/blob - modules/gui/macosx/simple_prefs.h
macosx: simple prefs: Only show font family and subtype in the font panel
[vlc] / modules / gui / macosx / simple_prefs.h
1 /*****************************************************************************
2 * simple_prefs.h: Simple Preferences for Mac OS X
3 *****************************************************************************
4 * Copyright (C) 2008-2014 VLC authors and VideoLAN
5 * $Id$
6 *
7 * Authors: Felix Paul Kühne <fkuehne at videolan dot org>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
23
24 #import <Cocoa/Cocoa.h>
25 #import "intf.h"
26 #import <vlc_common.h>
27
28 @interface VLCSimplePrefs : NSObject <NSToolbarDelegate, NSWindowDelegate>
29 {
30     IBOutlet id o_audio_dolby_pop;
31     IBOutlet id o_audio_dolby_txt;
32     IBOutlet id o_audio_effects_box;
33     IBOutlet id o_audio_enable_ckb;
34     IBOutlet id o_audio_general_box;
35     IBOutlet id o_audio_lang_fld;
36     IBOutlet id o_audio_lang_txt;
37     IBOutlet id o_audio_last_box;
38     IBOutlet id o_audio_last_ckb;
39     IBOutlet id o_audio_lastpwd_sfld;
40     IBOutlet id o_audio_lastpwd_txt;
41     IBOutlet id o_audio_lastuser_fld;
42     IBOutlet id o_audio_lastuser_txt;
43     IBOutlet id o_audio_spdif_ckb;
44     IBOutlet id o_audio_view;
45     IBOutlet id o_audio_visual_pop;
46     IBOutlet id o_audio_visual_txt;
47     IBOutlet id o_audio_vol_fld;
48     IBOutlet id o_audio_vol_sld;
49     IBOutlet id o_audio_autosavevol_matrix;
50     IBOutlet id o_audio_autosavevol_yes_bcell;
51     IBOutlet id o_audio_autosavevol_no_bcell;
52
53     IBOutlet id o_hotkeys_change_btn;
54     IBOutlet id o_hotkeys_change_lbl;
55     IBOutlet id o_hotkeys_change_keys_lbl;
56     IBOutlet id o_hotkeys_change_taken_lbl;
57     IBOutlet id o_hotkeys_change_win;
58     IBOutlet id o_hotkeys_change_cancel_btn;
59     IBOutlet id o_hotkeys_change_ok_btn;
60     IBOutlet id o_hotkeys_clear_btn;
61     IBOutlet id o_hotkeys_lbl;
62     IBOutlet id o_hotkeys_listbox;
63     IBOutlet id o_hotkeys_view;
64
65     IBOutlet id o_input_record_box;
66     IBOutlet id o_input_record_fld;
67     IBOutlet id o_input_record_btn;
68     IBOutlet id o_input_avi_pop;
69     IBOutlet id o_input_avi_txt;
70     IBOutlet id o_input_cachelevel_pop;
71     IBOutlet id o_input_cachelevel_txt;
72     IBOutlet id o_input_cachelevel_custom_txt;
73     IBOutlet id o_input_caching_box;
74     IBOutlet id o_input_mux_box;
75     IBOutlet id o_input_net_box;
76     IBOutlet id o_input_avcodec_hw_txt;
77     IBOutlet id o_input_avcodec_hw_pop;
78     IBOutlet id o_input_postproc_fld;
79     IBOutlet id o_input_postproc_txt;
80     IBOutlet id o_input_rtsp_ckb;
81     IBOutlet id o_input_skipLoop_txt;
82     IBOutlet id o_input_skipLoop_pop;
83     IBOutlet id o_input_mkv_preload_dir_ckb;
84     IBOutlet id o_input_urlhandler_btn;
85     IBOutlet id o_input_view;
86
87     IBOutlet id o_intf_language_pop;
88     IBOutlet id o_intf_language_txt;
89     IBOutlet id o_intf_style_txt;
90     IBOutlet id o_intf_style_dark_bcell;
91     IBOutlet id o_intf_style_bright_bcell;
92     IBOutlet id o_intf_art_pop;
93     IBOutlet id o_intf_art_txt;
94     IBOutlet id o_intf_embedded_ckb;
95     IBOutlet id o_intf_fspanel_ckb;
96     IBOutlet id o_intf_appleremote_ckb;
97     IBOutlet id o_intf_appleremote_sysvol_ckb;
98     IBOutlet id o_intf_mediakeys_ckb;
99     IBOutlet id o_intf_network_box;
100     IBOutlet id o_intf_view;
101     IBOutlet id o_intf_update_ckb;
102     IBOutlet id o_intf_last_update_lbl;
103     IBOutlet id o_intf_enableGrowl_ckb;
104     IBOutlet id o_intf_nativefullscreen_ckb;
105     IBOutlet id o_intf_autoresize_ckb;
106     IBOutlet id o_intf_pauseminimized_ckb;
107     IBOutlet id o_intf_luahttp_box;
108     IBOutlet id o_intf_luahttppwd_lbl;
109     IBOutlet id o_intf_luahttppwd_fld;
110     IBOutlet id o_intf_pauseitunes_lbl;
111     IBOutlet id o_intf_pauseitunes_pop;
112     IBOutlet id o_intf_continueplayback_lbl;
113     IBOutlet id o_intf_continueplayback_pop;
114
115     IBOutlet id o_osd_encoding_pop;
116     IBOutlet id o_osd_encoding_txt;
117     IBOutlet id o_osd_font_box;
118     IBOutlet id o_osd_font_btn;
119     IBOutlet id o_osd_font_color_pop;
120     IBOutlet id o_osd_font_color_txt;
121     IBOutlet id o_osd_font_fld;
122     IBOutlet id o_osd_font_size_pop;
123     IBOutlet id o_osd_font_size_txt;
124     IBOutlet id o_osd_font_txt;
125     IBOutlet id o_osd_lang_box;
126     IBOutlet id o_osd_lang_fld;
127     IBOutlet id o_osd_lang_txt;
128     IBOutlet id o_osd_opacity_txt;
129     IBOutlet id o_osd_opacity_fld;
130     IBOutlet id o_osd_opacity_sld;
131     IBOutlet id o_osd_outline_color_pop;
132     IBOutlet id o_osd_outline_color_txt;
133     IBOutlet id o_osd_outline_thickness_pop;
134     IBOutlet id o_osd_outline_thickness_txt;
135     IBOutlet id o_osd_forcebold_ckb;
136     IBOutlet id o_osd_osd_box;
137     IBOutlet id o_osd_osd_ckb;
138     IBOutlet id o_osd_view;
139
140     IBOutlet id o_sprefs_showAll_btn;
141     IBOutlet id o_sprefs_cancel_btn;
142     IBOutlet id o_sprefs_controls_box;
143     IBOutlet id o_sprefs_reset_btn;
144     IBOutlet id o_sprefs_save_btn;
145     IBOutlet id o_sprefs_win;
146
147     IBOutlet id o_video_black_ckb;
148     IBOutlet id o_video_device_pop;
149     IBOutlet id o_video_device_txt;
150     IBOutlet id o_video_display_box;
151     IBOutlet id o_video_enable_ckb;
152     IBOutlet id o_video_fullscreen_ckb;
153     IBOutlet id o_video_videodeco_ckb;
154     IBOutlet id o_video_onTop_ckb;
155     IBOutlet id o_video_skipFrames_ckb;
156     IBOutlet id o_video_snap_box;
157     IBOutlet id o_video_snap_folder_btn;
158     IBOutlet id o_video_snap_folder_fld;
159     IBOutlet id o_video_snap_folder_txt;
160     IBOutlet id o_video_snap_format_pop;
161     IBOutlet id o_video_snap_format_txt;
162     IBOutlet id o_video_snap_prefix_fld;
163     IBOutlet id o_video_snap_prefix_txt;
164     IBOutlet id o_video_snap_seqnum_ckb;
165     IBOutlet id o_video_deinterlace_txt;
166     IBOutlet id o_video_deinterlace_pop;
167     IBOutlet id o_video_deinterlace_mode_txt;
168     IBOutlet id o_video_deinterlace_mode_pop;
169     IBOutlet id o_video_video_box;
170     IBOutlet id o_video_view;
171
172     IBOutlet id o_urlhandler_title_txt;
173     IBOutlet id o_urlhandler_subtitle_txt;
174     IBOutlet id o_urlhandler_save_btn;
175     IBOutlet id o_urlhandler_cancel_btn;
176     IBOutlet id o_urlhandler_ftp_pop;
177     IBOutlet id o_urlhandler_mms_pop;
178     IBOutlet id o_urlhandler_rtmp_pop;
179     IBOutlet id o_urlhandler_rtp_pop;
180     IBOutlet id o_urlhandler_rtsp_pop;
181     IBOutlet id o_urlhandler_sftp_pop;
182     IBOutlet id o_urlhandler_smb_pop;
183     IBOutlet id o_urlhandler_udp_pop;
184     IBOutlet id o_urlhandler_win;
185
186     BOOL b_audioSettingChanged;
187     BOOL b_intfSettingChanged;
188     BOOL b_videoSettingChanged;
189     BOOL b_osdSettingChanged;
190     BOOL b_inputSettingChanged;
191     BOOL b_hotkeyChanged;
192     id o_currentlyShownCategoryView;
193
194     NSOpenPanel *o_selectFolderPanel;
195     NSArray *o_hotkeyDescriptions;
196     NSArray *o_hotkeyNames;
197     NSArray *o_hotkeysNonUseableKeys;
198     NSMutableArray *o_hotkeySettings;
199     NSString *o_keyInTransition;
200
201     intf_thread_t *p_intf;
202 }
203 + (VLCSimplePrefs *)sharedInstance;
204
205 /* toolbar */
206 - (NSToolbarItem *) toolbar: (NSToolbar *)o_toolbar
207       itemForItemIdentifier: (NSString *)o_itemIdent
208   willBeInsertedIntoToolbar: (BOOL)b_willBeInserted;
209 - (NSArray *)toolbarDefaultItemIdentifiers: (NSToolbar *)toolbar;
210 - (NSArray *)toolbarAllowedItemIdentifiers: (NSToolbar *)toolbar;
211
212 - (void)initStrings;
213 - (void)resetControls;
214 - (void)showSimplePrefs;
215 - (void)showSimplePrefsWithLevel:(NSInteger)i_window_level;
216
217 - (IBAction)buttonAction:(id)sender;
218 - (IBAction)resetPreferences:(id)sender;
219 - (void)sheetDidEnd:(NSWindow *)o_sheet
220          returnCode:(int)i_return
221         contextInfo:(void *)o_context;
222
223 - (void)saveChangedSettings;
224
225 /* interface */
226 - (IBAction)interfaceSettingChanged:(id)sender;
227 - (void)showInterfaceSettings;
228
229 /* audio */
230 - (IBAction)audioSettingChanged:(id)sender;
231 - (void)showAudioSettings;
232
233 /* video */
234 - (IBAction)videoSettingChanged:(id)sender;
235 - (void)showVideoSettings;
236
237 /* OSD / subtitles */
238 - (IBAction)osdSettingChanged:(id)sender;
239 - (IBAction)showFontPicker:(id)sender;
240 - (void)showOSDSettings;
241 - (void)changeFont:(id)sender;
242
243 /* input & codecs */
244 - (IBAction)inputSettingChanged:(id)sender;
245 - (void)showInputSettings;
246 - (IBAction)urlHandlerAction:(id)sender;
247
248 /* hotkeys */
249 - (IBAction)hotkeySettingChanged:(id)sender;
250 - (void)showHotkeySettings;
251 - (int)numberOfRowsInTableView:(NSTableView *)aTableView;
252 - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex;
253 - (BOOL)changeHotkeyTo: (NSString *)theKey;
254
255 @end
256
257 @interface VLCHotkeyChangeWindow : NSWindow
258
259 @end
260
261 @interface VLCSimplePrefsWindow : NSWindow
262
263 @end