1 /*****************************************************************************
2 * MainWindow.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2002-2012 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>
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 #import <Cocoa/Cocoa.h>
28 #import "CompatibilityFixes.h"
29 #import "PXSourceList.h"
30 #import "PXSourceListDataSource.h"
33 #import <vlc_vout_window.h>
38 #import "MainWindowTitle.h"
40 @class VLCDetachedVideoWindow;
41 @class VLCMainWindowControlsBar;
44 @interface VLCMainWindow : VLCVideoWindowCommon <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
46 IBOutlet id o_search_fld;
48 IBOutlet id o_playlist_table;
49 IBOutlet id o_split_view;
50 IBOutlet id o_left_split_view;
51 IBOutlet id o_right_split_view;
52 IBOutlet id o_sidebar_view;
53 IBOutlet id o_sidebar_scrollview;
54 IBOutlet id o_chosen_category_lbl;
56 IBOutlet id o_dropzone_view;
57 IBOutlet id o_dropzone_btn;
58 IBOutlet id o_dropzone_lbl;
59 IBOutlet id o_dropzone_box;
61 IBOutlet VLCFSPanel *o_fspanel;
63 IBOutlet id o_podcast_view;
64 IBOutlet id o_podcast_add_btn;
65 IBOutlet id o_podcast_remove_btn;
66 IBOutlet id o_podcast_subscribe_window;
67 IBOutlet id o_podcast_subscribe_title_lbl;
68 IBOutlet id o_podcast_subscribe_subtitle_lbl;
69 IBOutlet id o_podcast_subscribe_url_fld;
70 IBOutlet id o_podcast_subscribe_cancel_btn;
71 IBOutlet id o_podcast_subscribe_ok_btn;
72 IBOutlet id o_podcast_unsubscribe_window;
73 IBOutlet id o_podcast_unsubscribe_title_lbl;
74 IBOutlet id o_podcast_unsubscribe_subtitle_lbl;
75 IBOutlet id o_podcast_unsubscribe_pop;
76 IBOutlet id o_podcast_unsubscribe_ok_btn;
77 IBOutlet id o_podcast_unsubscribe_cancel_btn;
79 BOOL b_nativeFullscreenMode;
80 BOOL b_video_playback_enabled;
81 BOOL b_dropzone_active;
82 BOOL b_splitview_removed;
83 BOOL b_minimized_view;
85 int i_lastSplitViewHeight;
87 NSMutableArray *o_sidebaritems;
90 BOOL b_podcastView_displayed;
92 /* set to yes if we are fullscreen and all animations are over */
95 NSTimer *t_hide_mouse_timer;
97 VLCColorView * o_color_backdrop;
99 NSRect frameBeforePlayback;
101 + (VLCMainWindow *)sharedInstance;
102 @property (readwrite) BOOL fullscreen;
103 @property (readonly) BOOL nativeFullscreenMode;
105 @property (readonly) VLCFSPanel* fsPanel;
107 - (VLCMainWindowControlsBar *)controlsBar;
109 - (IBAction)togglePlaylist:(id)sender;
111 - (IBAction)dropzoneButtonAction:(id)sender;
113 - (IBAction)addPodcast:(id)sender;
114 - (IBAction)addPodcastWindowAction:(id)sender;
115 - (IBAction)removePodcast:(id)sender;
116 - (IBAction)removePodcastWindowAction:(id)sender;
118 - (void)windowResizedOrMoved:(NSNotification *)notification;
120 - (void)showDropZone;
121 - (void)hideDropZone;
122 - (void)showSplitView;
123 - (void)hideSplitView;
124 - (void)updateTimeSlider;
125 - (void)updateWindow;
129 - (void)updateVolumeSlider;
131 - (void)showFullscreenController;
133 - (VLCVoutView *)setupVout:(vout_window_t *)p_wnd;
134 - (void)setVideoplayEnabled;
136 - (void)hideMouseCursor:(NSTimer *)timer;
137 - (void)recreateHideMouseTimer;
139 /* lion's native fullscreen handling */
140 - (void)windowWillEnterFullScreen:(NSNotification *)notification;
141 - (void)windowDidEnterFullScreen:(NSNotification *)notification;
142 - (void)windowWillExitFullScreen:(NSNotification *)notification;
146 @interface VLCDetachedVideoWindow : VLCVideoWindowCommon
148 VLCColorView * o_color_backdrop;