1 /*****************************************************************************
2 * MainWindow.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2002-2013 VLC authors and VideoLAN
7 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
8 * Jon Lech Johansen <jon-vl@nanocrew.net>
9 * Christophe Massiot <massiot@via.ecp.fr>
10 * Derk-Jan Hartman <hartman at videolan.org>
11 * David Fuhrmann <david dot fuhrmann at googlemail dot com>
13 * This program is free software; you can redistribute it and/or modify
14 * it under the terms of the GNU General Public License as published by
15 * the Free Software Foundation; either version 2 of the License, or
16 * (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
26 *****************************************************************************/
28 #import <Cocoa/Cocoa.h>
29 #import "CompatibilityFixes.h"
30 #import "PXSourceList.h"
31 #import "PXSourceListDataSource.h"
34 #import <vlc_vout_window.h>
39 #import "MainWindowTitle.h"
41 @class VLCDetachedVideoWindow;
42 @class VLCMainWindowControlsBar;
45 @interface VLCMainWindow : VLCVideoWindowCommon <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
47 IBOutlet id o_search_fld;
49 IBOutlet id o_playlist_table;
50 IBOutlet id o_split_view;
51 IBOutlet id o_left_split_view;
52 IBOutlet id o_right_split_view;
53 IBOutlet id o_sidebar_view;
54 IBOutlet id o_sidebar_scrollview;
55 IBOutlet id o_chosen_category_lbl;
57 IBOutlet id o_dropzone_view;
58 IBOutlet id o_dropzone_btn;
59 IBOutlet id o_dropzone_lbl;
60 IBOutlet id o_dropzone_box;
62 IBOutlet VLCFSPanel *o_fspanel;
64 IBOutlet id o_podcast_view;
65 IBOutlet id o_podcast_add_btn;
66 IBOutlet id o_podcast_remove_btn;
67 IBOutlet id o_podcast_subscribe_window;
68 IBOutlet id o_podcast_subscribe_title_lbl;
69 IBOutlet id o_podcast_subscribe_subtitle_lbl;
70 IBOutlet id o_podcast_subscribe_url_fld;
71 IBOutlet id o_podcast_subscribe_cancel_btn;
72 IBOutlet id o_podcast_subscribe_ok_btn;
73 IBOutlet id o_podcast_unsubscribe_window;
74 IBOutlet id o_podcast_unsubscribe_title_lbl;
75 IBOutlet id o_podcast_unsubscribe_subtitle_lbl;
76 IBOutlet id o_podcast_unsubscribe_pop;
77 IBOutlet id o_podcast_unsubscribe_ok_btn;
78 IBOutlet id o_podcast_unsubscribe_cancel_btn;
80 BOOL b_nativeFullscreenMode;
81 BOOL b_video_playback_enabled;
82 BOOL b_dropzone_active;
83 BOOL b_splitview_removed;
84 BOOL b_minimized_view;
86 NSUInteger i_lastSplitViewHeight;
87 NSUInteger i_lastLeftSplitViewWidth;
89 NSMutableArray *o_sidebaritems;
91 /* this is only true, when we have NO video playing inside the main window */
94 BOOL b_podcastView_displayed;
96 VLCColorView * o_color_backdrop;
98 NSRect frameBeforePlayback;
100 + (VLCMainWindow *)sharedInstance;
101 @property (readonly) BOOL nativeFullscreenMode;
102 @property (readwrite) BOOL nonembedded;
104 @property (readonly) VLCFSPanel* fsPanel;
106 - (VLCMainWindowControlsBar *)controlsBar;
108 - (IBAction)togglePlaylist:(id)sender;
110 - (IBAction)dropzoneButtonAction:(id)sender;
112 - (IBAction)addPodcast:(id)sender;
113 - (IBAction)addPodcastWindowAction:(id)sender;
114 - (IBAction)removePodcast:(id)sender;
115 - (IBAction)removePodcastWindowAction:(id)sender;
117 - (void)windowResizedOrMoved:(NSNotification *)notification;
119 - (void)toggleLeftSubSplitView;
120 - (void)showDropZone;
121 - (void)hideDropZone;
122 - (void)updateTimeSlider;
123 - (void)updateWindow;
127 - (void)updateVolumeSlider;
129 - (void)showFullscreenController;
131 - (void)videoplayWillBeStarted;
132 - (void)setVideoplayEnabled;
136 @interface VLCDetachedVideoWindow : VLCVideoWindowCommon
138 VLCColorView * o_color_backdrop;