]> git.sesse.net Git - vlc/blob - modules/gui/macosx/MainWindow.h
macosx: set a proper main window frame on termination
[vlc] / modules / gui / macosx / MainWindow.h
1 /*****************************************************************************
2  * MainWindow.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2014 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  *          David Fuhrmann <david dot fuhrmann at googlemail dot com>
12  *
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.
17  *
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.
22  *
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  *****************************************************************************/
27
28 #import <Cocoa/Cocoa.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 typedef enum {
45     psUserEvent,
46     psUserMenuEvent,
47     psVideoStartedOrStoppedEvent,
48     psPlaylistItemChangedEvent
49 } VLCPlaylistStateEvent;
50
51 @interface VLCMainWindow : VLCVideoWindowCommon <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
52
53     IBOutlet id o_search_fld;
54
55     IBOutlet id o_playlist_table;
56     IBOutlet id o_split_view;
57     IBOutlet id o_left_split_view;
58     IBOutlet id o_right_split_view;
59     IBOutlet id o_sidebar_view;
60     IBOutlet id o_sidebar_scrollview;
61     IBOutlet id o_chosen_category_lbl;
62
63     IBOutlet id o_dropzone_view;
64     IBOutlet id o_dropzone_btn;
65     IBOutlet id o_dropzone_lbl;
66     IBOutlet id o_dropzone_box;
67
68     VLCFSPanel *o_fspanel;
69
70     IBOutlet id o_podcast_view;
71     IBOutlet id o_podcast_add_btn;
72     IBOutlet id o_podcast_remove_btn;
73     IBOutlet id o_podcast_subscribe_window;
74     IBOutlet id o_podcast_subscribe_title_lbl;
75     IBOutlet id o_podcast_subscribe_subtitle_lbl;
76     IBOutlet id o_podcast_subscribe_url_fld;
77     IBOutlet id o_podcast_subscribe_cancel_btn;
78     IBOutlet id o_podcast_subscribe_ok_btn;
79     IBOutlet id o_podcast_unsubscribe_window;
80     IBOutlet id o_podcast_unsubscribe_title_lbl;
81     IBOutlet id o_podcast_unsubscribe_subtitle_lbl;
82     IBOutlet id o_podcast_unsubscribe_pop;
83     IBOutlet id o_podcast_unsubscribe_ok_btn;
84     IBOutlet id o_podcast_unsubscribe_cancel_btn;
85
86     BOOL b_nativeFullscreenMode;
87     BOOL b_video_playback_enabled;
88     BOOL b_dropzone_active;
89     BOOL b_splitview_removed;
90     BOOL b_minimized_view;
91
92     CGFloat f_lastSplitViewHeight;
93     CGFloat f_lastLeftSplitViewWidth;
94
95     NSMutableArray *o_sidebaritems;
96
97     /* this is only true, when we have NO video playing inside the main window */
98     BOOL b_nonembedded;
99
100     BOOL b_podcastView_displayed;
101
102     VLCColorView * o_color_backdrop;
103
104     NSRect frameBeforePlayback;
105 }
106 + (VLCMainWindow *)sharedInstance;
107 @property (readonly) BOOL nativeFullscreenMode;
108 @property (readwrite) BOOL nonembedded;
109
110 @property (readonly) VLCFSPanel* fsPanel;
111
112 - (VLCMainWindowControlsBar *)controlsBar;
113
114 - (void)changePlaylistState:(VLCPlaylistStateEvent)event;
115
116 - (IBAction)dropzoneButtonAction:(id)sender;
117
118 - (IBAction)addPodcast:(id)sender;
119 - (IBAction)addPodcastWindowAction:(id)sender;
120 - (IBAction)removePodcast:(id)sender;
121 - (IBAction)removePodcastWindowAction:(id)sender;
122
123 - (void)windowResizedOrMoved:(NSNotification *)notification;
124
125 - (void)toggleLeftSubSplitView;
126 - (void)showDropZone;
127 - (void)hideDropZone;
128 - (void)updateTimeSlider;
129 - (void)updateWindow;
130 - (void)updateName;
131 - (void)setPause;
132 - (void)setPlay;
133 - (void)updateVolumeSlider;
134
135 - (void)showFullscreenController;
136
137 - (void)videoplayWillBeStarted;
138 - (void)setVideoplayEnabled;
139
140 @end
141
142 @interface VLCDetachedVideoWindow : VLCVideoWindowCommon
143 {
144     VLCColorView * o_color_backdrop;
145 }
146
147 @end