cf9fb9b73e865f5fa5f892802bc730a21af41b3e
[vlc.git] / modules / gui / macosx / menus / VLCMainMenu.h
1 /*****************************************************************************
2  *MainMenu.h: MacOS X interface module
3  *****************************************************************************
4  *Copyright (C) 2011-2018 Felix Paul Kühne
5  *
6  *Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
7  *
8  *This program is free software; you can redistribute it and/or modify
9  *it under the terms of the GNU General Public License as published by
10  *the Free Software Foundation; either version 2 of the License, or
11  *(at your option) any later version.
12  *
13  *This program is distributed in the hope that it will be useful,
14  *but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *GNU General Public License for more details.
17  *
18  *You should have received a copy of the GNU General Public License
19  *along with this program; if not, write to the Free Software
20  *Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
21  *****************************************************************************/
22
23 #import <Cocoa/Cocoa.h>
24
25 #import <vlc_common.h>
26 #import <vlc_interface.h>
27
28 @interface VLCMainMenu : NSObject
29
30 /* main menu */
31 @property (readwrite, weak) IBOutlet NSMenuItem *about;
32 @property (readwrite, weak) IBOutlet NSMenuItem *prefs;
33 @property (readwrite, weak) IBOutlet NSMenuItem *checkForUpdate;
34 @property (readwrite, weak) IBOutlet NSMenuItem *extensions;
35 @property (readwrite, weak) IBOutlet NSMenu *extensionsMenu;
36 @property (readwrite, weak) IBOutlet NSMenuItem *addonManager;
37 @property (readwrite, weak) IBOutlet NSMenuItem *add_intf;
38 @property (readwrite, weak) IBOutlet NSMenu *add_intfMenu;
39 @property (readwrite, weak) IBOutlet NSMenuItem *services;
40 @property (readwrite, weak) IBOutlet NSMenuItem *hide;
41 @property (readwrite, weak) IBOutlet NSMenuItem *hide_others;
42 @property (readwrite, weak) IBOutlet NSMenuItem *show_all;
43 @property (readwrite, weak) IBOutlet NSMenuItem *quit;
44
45 @property (readwrite, weak) IBOutlet NSMenu *fileMenu;
46 @property (readwrite, weak) IBOutlet NSMenuItem *open_file;
47 @property (readwrite, weak) IBOutlet NSMenuItem *open_generic;
48 @property (readwrite, weak) IBOutlet NSMenuItem *open_disc;
49 @property (readwrite, weak) IBOutlet NSMenuItem *open_net;
50 @property (readwrite, weak) IBOutlet NSMenuItem *open_capture;
51 @property (readwrite, weak) IBOutlet NSMenuItem *open_recent;
52 @property (readwrite, weak) IBOutlet NSMenuItem *close_window;
53 @property (readwrite, weak) IBOutlet NSMenuItem *convertandsave;
54 @property (readwrite, weak) IBOutlet NSMenuItem *save_playlist;
55 @property (readwrite, weak) IBOutlet NSMenuItem *revealInFinder;
56
57 @property (readwrite, weak) IBOutlet NSMenu *editMenu;
58 @property (readwrite, weak) IBOutlet NSMenuItem *cutItem;
59 @property (readwrite, weak) IBOutlet NSMenuItem *mcopyItem;
60 @property (readwrite, weak) IBOutlet NSMenuItem *pasteItem;
61 @property (readwrite, weak) IBOutlet NSMenuItem *clearItem;
62 @property (readwrite, weak) IBOutlet NSMenuItem *select_all;
63 @property (readwrite, weak) IBOutlet NSMenuItem *findItem;
64
65 @property (readwrite, weak) IBOutlet NSMenu *viewMenu;
66 @property (readwrite, weak) IBOutlet NSMenuItem *toggleJumpButtons;
67 @property (readwrite, weak) IBOutlet NSMenuItem *togglePlaymodeButtons;
68 @property (readwrite, weak) IBOutlet NSMenuItem *toggleEffectsButton;
69 @property (readwrite, weak) IBOutlet NSMenuItem *toggleSidebar;
70 @property (readwrite, weak) IBOutlet NSMenu *playlistTableColumnsMenu;
71 @property (readwrite, weak) IBOutlet NSMenuItem *playlistTableColumns;
72
73 @property (readwrite, weak) IBOutlet NSMenu *controlsMenu;
74 @property (readwrite, weak) IBOutlet NSMenuItem *play;
75 @property (readwrite, weak) IBOutlet NSMenuItem *stop;
76 @property (readwrite, weak) IBOutlet NSMenuItem *record;
77 @property (readwrite, weak) IBOutlet NSMenuItem *rate;
78 @property (readwrite, weak) IBOutlet NSView *rate_view;
79 @property (readwrite, weak) IBOutlet NSTextField *rateLabel;
80 @property (readwrite, weak) IBOutlet NSTextField *rate_slowerLabel;
81 @property (readwrite, weak) IBOutlet NSTextField *rate_normalLabel;
82 @property (readwrite, weak) IBOutlet NSTextField *rate_fasterLabel;
83 @property (readwrite, weak) IBOutlet NSSlider *rate_sld;
84 @property (readwrite, weak) IBOutlet NSTextField *rateTextField;
85 @property (readwrite, weak) IBOutlet NSMenuItem *trackSynchronization;
86 @property (readwrite, weak) IBOutlet NSMenuItem *previous;
87 @property (readwrite, weak) IBOutlet NSMenuItem *next;
88 @property (readwrite, weak) IBOutlet NSMenuItem *random;
89 @property (readwrite, weak) IBOutlet NSMenuItem *repeat;
90 @property (readwrite, weak) IBOutlet NSMenuItem *loop;
91 @property (readwrite, weak) IBOutlet NSMenuItem *AtoBloop;
92 @property (readwrite, weak) IBOutlet NSMenuItem *quitAfterPB;
93 @property (readwrite, weak) IBOutlet NSMenuItem *fwd;
94 @property (readwrite, weak) IBOutlet NSMenuItem *bwd;
95 @property (readwrite, weak) IBOutlet NSMenuItem *jumpToTime;
96 @property (readwrite, weak) IBOutlet NSMenu *rendererMenu;
97 @property (readwrite, weak) IBOutlet NSMenuItem *rendererMenuItem;
98 @property (readwrite, weak) IBOutlet NSMenuItem *rendererNoneItem;
99 @property (readwrite, weak) IBOutlet NSMenuItem *program;
100 @property (readwrite, weak) IBOutlet NSMenu *programMenu;
101 @property (readwrite, weak) IBOutlet NSMenuItem *title;
102 @property (readwrite, weak) IBOutlet NSMenu *titleMenu;
103 @property (readwrite, weak) IBOutlet NSMenuItem *chapter;
104 @property (readwrite, weak) IBOutlet NSMenu *chapterMenu;
105
106 @property (readwrite, weak) IBOutlet NSMenu *audioMenu;
107 @property (readwrite, weak) IBOutlet NSMenuItem *vol_up;
108 @property (readwrite, weak) IBOutlet NSMenuItem *vol_down;
109 @property (readwrite, weak) IBOutlet NSMenuItem *mute;
110 @property (readwrite, weak) IBOutlet NSMenuItem *audiotrack;
111 @property (readwrite, weak) IBOutlet NSMenu *audiotrackMenu;
112 @property (readwrite, weak) IBOutlet NSMenuItem *channels;
113 @property (readwrite, weak) IBOutlet NSMenu *channelsMenu;
114 @property (readwrite, weak) IBOutlet NSMenuItem *audioDevice;
115 @property (readwrite, weak) IBOutlet NSMenu *audioDeviceMenu;
116 @property (readwrite, weak) IBOutlet NSMenuItem *visual;
117 @property (readwrite, weak) IBOutlet NSMenu *visualMenu;
118
119 @property (readwrite, weak) IBOutlet NSMenu *videoMenu;
120 @property (readwrite, weak) IBOutlet NSMenuItem *half_window;
121 @property (readwrite, weak) IBOutlet NSMenuItem *normal_window;
122 @property (readwrite, weak) IBOutlet NSMenuItem *double_window;
123 @property (readwrite, weak) IBOutlet NSMenuItem *fittoscreen;
124 @property (readwrite, weak) IBOutlet NSMenuItem *fullscreenItem;
125 @property (readwrite, weak) IBOutlet NSMenuItem *floatontop;
126 @property (readwrite, weak) IBOutlet NSMenuItem *snapshot;
127 @property (readwrite, weak) IBOutlet NSMenuItem *videotrack;
128 @property (readwrite, weak) IBOutlet NSMenu *videotrackMenu;
129 @property (readwrite, weak) IBOutlet NSMenuItem *screen;
130 @property (readwrite, weak) IBOutlet NSMenu *screenMenu;
131 @property (readwrite, weak) IBOutlet NSMenuItem *aspect_ratio;
132 @property (readwrite, weak) IBOutlet NSMenu *aspect_ratioMenu;
133 @property (readwrite, weak) IBOutlet NSMenuItem *crop;
134 @property (readwrite, weak) IBOutlet NSMenu *cropMenu;
135 @property (readwrite, weak) IBOutlet NSMenuItem *deinterlace;
136 @property (readwrite, weak) IBOutlet NSMenu *deinterlaceMenu;
137 @property (readwrite, weak) IBOutlet NSMenuItem *deinterlace_mode;
138 @property (readwrite, weak) IBOutlet NSMenu *deinterlace_modeMenu;
139 @property (readwrite, weak) IBOutlet NSMenuItem *postprocessing;
140 @property (readwrite, weak) IBOutlet NSMenu *postprocessingMenu;
141
142 @property (readwrite, weak) IBOutlet NSMenu *subtitlesMenu;
143 @property (readwrite, weak) IBOutlet NSMenuItem *subtitle_track;
144 @property (readwrite, weak) IBOutlet NSMenu *subtitle_tracksMenu;
145 @property (readwrite, weak) IBOutlet NSMenuItem *openSubtitleFile;
146 @property (readwrite, weak) IBOutlet NSMenu *subtitle_sizeMenu;
147 @property (readwrite, weak) IBOutlet NSMenuItem *subtitle_size;
148 @property (readwrite, weak) IBOutlet NSMenu *subtitle_textcolorMenu;
149 @property (readwrite, weak) IBOutlet NSMenuItem *subtitle_textcolor;
150 @property (readwrite, weak) IBOutlet NSMenu *subtitle_bgcolorMenu;
151 @property (readwrite, weak) IBOutlet NSMenuItem *subtitle_bgcolor;
152 @property (readwrite, weak) IBOutlet NSMenuItem *subtitle_bgopacity;
153 @property (readwrite, weak) IBOutlet NSView *subtitle_bgopacity_view;
154 @property (readwrite, weak) IBOutlet NSTextField *subtitle_bgopacityLabel;
155 @property (readwrite, weak) IBOutlet NSTextField *subtitle_bgopacityLabel_gray;
156 @property (readwrite, weak) IBOutlet NSSlider *subtitle_bgopacity_sld;
157 @property (readwrite, weak) IBOutlet NSMenu *subtitle_outlinethicknessMenu;
158 @property (readwrite, weak) IBOutlet NSMenuItem *subtitle_outlinethickness;
159 @property (readwrite, weak) IBOutlet NSMenuItem *teletext;
160 @property (readwrite, weak) IBOutlet NSMenuItem *teletext_transparent;
161 @property (readwrite, weak) IBOutlet NSMenuItem *teletext_index;
162 @property (readwrite, weak) IBOutlet NSMenuItem *teletext_red;
163 @property (readwrite, weak) IBOutlet NSMenuItem *teletext_green;
164 @property (readwrite, weak) IBOutlet NSMenuItem *teletext_yellow;
165 @property (readwrite, weak) IBOutlet NSMenuItem *teletext_blue;
166
167 @property (readwrite, weak) IBOutlet NSMenu *windowMenu;
168 @property (readwrite, weak) IBOutlet NSMenuItem *minimize;
169 @property (readwrite, weak) IBOutlet NSMenuItem *zoom_window;
170 @property (readwrite, weak) IBOutlet NSMenuItem *player;
171 @property (readwrite, weak) IBOutlet NSMenuItem *controller;
172 @property (readwrite, weak) IBOutlet NSMenuItem *audioeffects;
173 @property (readwrite, weak) IBOutlet NSMenuItem *videoeffects;
174 @property (readwrite, weak) IBOutlet NSMenuItem *bookmarks;
175 @property (readwrite, weak) IBOutlet NSMenuItem *playlist;
176 @property (readwrite, weak) IBOutlet NSMenuItem *info;
177 @property (readwrite, weak) IBOutlet NSMenuItem *errorsAndWarnings;
178 @property (readwrite, weak) IBOutlet NSMenuItem *messages;
179 @property (readwrite, weak) IBOutlet NSMenuItem *bring_atf;
180
181 @property (readwrite, weak) IBOutlet NSMenu *helpMenu;
182 @property (readwrite, weak) IBOutlet NSMenuItem *help;
183 @property (readwrite, weak) IBOutlet NSMenuItem *documentation;
184 @property (readwrite, weak) IBOutlet NSMenuItem *license;
185 @property (readwrite, weak) IBOutlet NSMenuItem *website;
186 @property (readwrite, weak) IBOutlet NSMenuItem *donation;
187 @property (readwrite, weak) IBOutlet NSMenuItem *forum;
188
189 /* dock menu */
190 @property (readwrite, weak) IBOutlet NSMenuItem *dockMenuplay;
191 @property (readwrite, weak) IBOutlet NSMenuItem *dockMenustop;
192 @property (readwrite, weak) IBOutlet NSMenuItem *dockMenunext;
193 @property (readwrite, weak) IBOutlet NSMenuItem *dockMenuprevious;
194 @property (readwrite, weak) IBOutlet NSMenuItem *dockMenumute;
195
196 /* vout menu */
197 @property (readwrite, strong) IBOutlet NSMenu *voutMenu;
198 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenuplay;
199 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenustop;
200 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenuprev;
201 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenunext;
202 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenuvolup;
203 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenuvoldown;
204 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenumute;
205 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenufullscreen;
206 @property (readwrite, strong) IBOutlet NSMenuItem *voutMenusnapshot;
207
208 @property (readwrite, strong) IBOutlet NSView *playlistSaveAccessoryView;
209 @property (readwrite, weak) IBOutlet NSPopUpButton *playlistSaveAccessoryPopup;
210 @property (readwrite, weak) IBOutlet NSTextField *playlistSaveAccessoryText;
211
212 - (void)releaseRepresentedObjects:(NSMenu *)the_menu;
213
214 - (void)setRateControlsEnabled:(BOOL)b_enabled;
215 - (void)updateSidebarMenuItem:(BOOL)show;
216
217 - (IBAction)openAddonManager:(id)sender;
218
219 - (IBAction)intfOpenFile:(id)sender;
220 - (IBAction)intfOpenFileGeneric:(id)sender;
221 - (IBAction)intfOpenDisc:(id)sender;
222 - (IBAction)intfOpenNet:(id)sender;
223 - (IBAction)intfOpenCapture:(id)sender;
224 - (IBAction)savePlaylist:(id)sender;
225
226 - (IBAction)toggleEffectsButton:(id)sender;
227 - (IBAction)toggleJumpButtons:(id)sender;
228 - (IBAction)togglePlaymodeButtons:(id)sender;
229 - (IBAction)toggleSidebar:(id)sender;
230
231 - (IBAction)play:(id)sender;
232 - (IBAction)stop:(id)sender;
233
234 - (IBAction)prev:(id)sender;
235 - (IBAction)next:(id)sender;
236 - (IBAction)random:(id)sender;
237 - (IBAction)repeat:(id)sender;
238 - (IBAction)loop:(id)sender;
239
240 - (IBAction)forward:(id)sender;
241 - (IBAction)backward:(id)sender;
242
243 - (IBAction)volumeUp:(id)sender;
244 - (IBAction)volumeDown:(id)sender;
245 - (IBAction)mute:(id)sender;
246
247 - (IBAction)goToSpecificTime:(id)sender;
248
249 - (IBAction)quitAfterPlayback:(id)sender;
250 - (IBAction)toggleRecord:(id)sender;
251 - (IBAction)setPlaybackRate:(id)sender;
252 - (IBAction)toggleAtoBloop:(id)sender;
253 - (IBAction)selectRenderer:(id)sender;
254
255 - (IBAction)toggleFullscreen:(id)sender;
256 - (IBAction)resizeVideoWindow:(id)sender;
257 - (IBAction)floatOnTop:(id)sender;
258 - (IBAction)createVideoSnapshot:(id)sender;
259
260 - (IBAction)addSubtitleFile:(id)sender;
261 - (IBAction)switchSubtitleBackgroundOpacity:(id)sender;
262 - (IBAction)telxTransparent:(id)sender;
263 - (IBAction)telxNavLink:(id)sender;
264
265 - (IBAction)showConvertAndSave:(id)sender;
266 - (IBAction)showVideoEffects:(id)sender;
267 - (IBAction)showAudioEffects:(id)sender;
268 - (IBAction)showTrackSynchronization:(id)sender;
269 - (IBAction)showBookmarks:(id)sender;
270 - (IBAction)showInformationPanel:(id)sender;
271
272 - (IBAction)showAbout:(id)sender;
273 - (IBAction)showLicense:(id)sender;
274 - (IBAction)showPreferences:(id)sender;
275 - (IBAction)showHelp:(id)sender;
276 - (IBAction)openDocumentation:(id)sender;
277 - (IBAction)openWebsite:(id)sender;
278 - (IBAction)openForum:(id)sender;
279 - (IBAction)openDonate:(id)sender;
280 - (IBAction)showErrorsAndWarnings:(id)sender;
281 - (IBAction)showMessagesPanel:(id)showMessagesPanel;
282 - (IBAction)showMainWindow:(id)sender;
283 - (IBAction)showPlaylist:(id)sender;
284
285 @end
286
287 /*****************************************************************************
288  *VLCAutoGeneratedMenuContent interface
289  *****************************************************************************
290  *This holds our data for autogenerated menus
291  *****************************************************************************/
292 @interface VLCAutoGeneratedMenuContent : NSObject
293
294 - (id)initWithVariableName: (const char *)name
295                   ofObject: (vlc_object_t *)object
296                   andValue: (vlc_value_t)value
297                     ofType: (int)type;
298 - (const char *)name;
299 - (vlc_value_t)value;
300 - (vlc_object_t *)vlcObject;
301 - (int)type;
302
303 @end