]> git.sesse.net Git - vlc/blob - modules/gui/macosx/MainWindow.h
macosx/CAS: implement basic error checking for the stream-out settings
[vlc] / modules / gui / macosx / MainWindow.h
1 /*****************************************************************************
2  * MainWindow.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2012 VLC authors and VideoLAN
5  * $Id$
6  *
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  *
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.
16  *
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.
21  *
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  *****************************************************************************/
26
27 #import <Cocoa/Cocoa.h>
28 #import "CompatibilityFixes.h"
29 #import "PXSourceList.h"
30 #import "PXSourceListDataSource.h"
31
32 #import <vlc_input.h>
33 #import <vlc_vout_window.h>
34
35 #import "Windows.h"
36 #import "misc.h"
37 #import "fspanel.h"
38 #import "MainWindowTitle.h"
39
40 @class VLCDetachedVideoWindow;
41 @class VLCMainWindowControlsBar;
42 @class VLCVoutView;
43
44 @interface VLCMainWindow : VLCVideoWindowCommon <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
45
46     IBOutlet id o_search_fld;
47
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;
55
56     IBOutlet id o_dropzone_view;
57     IBOutlet id o_dropzone_btn;
58     IBOutlet id o_dropzone_lbl;
59     IBOutlet id o_dropzone_box;
60
61     IBOutlet VLCFSPanel *o_fspanel;
62
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;
78
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;
84
85     NSUInteger i_lastSplitViewHeight;
86     NSUInteger i_lastLeftSplitViewWidth;
87
88     NSMutableArray *o_sidebaritems;
89
90     /* this is only true, when we have NO video playing inside the main window */
91     BOOL b_nonembedded;
92
93     BOOL b_podcastView_displayed;
94
95     /* set to yes if we are fullscreen and all animations are over */
96     BOOL b_fullscreen;
97
98     NSTimer *t_hide_mouse_timer;
99
100     VLCColorView * o_color_backdrop;
101
102     NSRect frameBeforePlayback;
103 }
104 + (VLCMainWindow *)sharedInstance;
105 @property (readwrite) BOOL fullscreen;
106 @property (readonly) BOOL nativeFullscreenMode;
107 @property (readwrite) BOOL nonembedded;
108
109 @property (readonly) VLCFSPanel* fsPanel;
110
111 - (VLCMainWindowControlsBar *)controlsBar;
112
113 - (IBAction)togglePlaylist:(id)sender;
114
115 - (IBAction)dropzoneButtonAction:(id)sender;
116
117 - (IBAction)addPodcast:(id)sender;
118 - (IBAction)addPodcastWindowAction:(id)sender;
119 - (IBAction)removePodcast:(id)sender;
120 - (IBAction)removePodcastWindowAction:(id)sender;
121
122 - (void)windowResizedOrMoved:(NSNotification *)notification;
123
124 - (void)toggleLeftSubSplitView;
125 - (void)showDropZone;
126 - (void)hideDropZone;
127 - (void)showSplitView;
128 - (void)hideSplitView;
129 - (void)updateTimeSlider;
130 - (void)updateWindow;
131 - (void)updateName;
132 - (void)setPause;
133 - (void)setPlay;
134 - (void)updateVolumeSlider;
135
136 - (void)showFullscreenController;
137
138 - (void)setVideoplayEnabled;
139
140 - (void)hideMouseCursor:(NSTimer *)timer;
141 - (void)recreateHideMouseTimer;
142
143 /* lion's native fullscreen handling */
144 - (void)windowWillEnterFullScreen:(NSNotification *)notification;
145 - (void)windowDidEnterFullScreen:(NSNotification *)notification;
146 - (void)windowWillExitFullScreen:(NSNotification *)notification;
147
148 @end
149
150 @interface VLCDetachedVideoWindow : VLCVideoWindowCommon
151 {
152     VLCColorView * o_color_backdrop;
153 }
154
155 @end