]> git.sesse.net Git - vlc/blob - modules/gui/macosx/MainWindow.h
Qt: use DIR_SEP for BDMV and VIDEO_TS detection
[vlc] / modules / gui / macosx / MainWindow.h
1 /*****************************************************************************
2  * MainWindow.h: MacOS X interface module
3  *****************************************************************************
4  * Copyright (C) 2002-2013 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 "CompatibilityFixes.h"
30 #import "PXSourceList.h"
31 #import "PXSourceListDataSource.h"
32
33 #import <vlc_input.h>
34 #import <vlc_vout_window.h>
35
36 #import "Windows.h"
37 #import "misc.h"
38 #import "fspanel.h"
39 #import "MainWindowTitle.h"
40
41 @class VLCDetachedVideoWindow;
42 @class VLCMainWindowControlsBar;
43 @class VLCVoutView;
44
45 typedef enum {
46     psUserEvent,
47     psUserMenuEvent,
48     psVideoStartedOrStoppedEvent,
49     psPlaylistItemChangedEvent
50 } VLCPlaylistStateEvent;
51
52 @interface VLCMainWindow : VLCVideoWindowCommon <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
53
54     IBOutlet id o_search_fld;
55
56     IBOutlet id o_playlist_table;
57     IBOutlet id o_split_view;
58     IBOutlet id o_left_split_view;
59     IBOutlet id o_right_split_view;
60     IBOutlet id o_sidebar_view;
61     IBOutlet id o_sidebar_scrollview;
62     IBOutlet id o_chosen_category_lbl;
63
64     IBOutlet id o_dropzone_view;
65     IBOutlet id o_dropzone_btn;
66     IBOutlet id o_dropzone_lbl;
67     IBOutlet id o_dropzone_box;
68
69     VLCFSPanel *o_fspanel;
70
71     IBOutlet id o_podcast_view;
72     IBOutlet id o_podcast_add_btn;
73     IBOutlet id o_podcast_remove_btn;
74     IBOutlet id o_podcast_subscribe_window;
75     IBOutlet id o_podcast_subscribe_title_lbl;
76     IBOutlet id o_podcast_subscribe_subtitle_lbl;
77     IBOutlet id o_podcast_subscribe_url_fld;
78     IBOutlet id o_podcast_subscribe_cancel_btn;
79     IBOutlet id o_podcast_subscribe_ok_btn;
80     IBOutlet id o_podcast_unsubscribe_window;
81     IBOutlet id o_podcast_unsubscribe_title_lbl;
82     IBOutlet id o_podcast_unsubscribe_subtitle_lbl;
83     IBOutlet id o_podcast_unsubscribe_pop;
84     IBOutlet id o_podcast_unsubscribe_ok_btn;
85     IBOutlet id o_podcast_unsubscribe_cancel_btn;
86
87     BOOL b_nativeFullscreenMode;
88     BOOL b_video_playback_enabled;
89     BOOL b_dropzone_active;
90     BOOL b_splitview_removed;
91     BOOL b_minimized_view;
92
93     NSUInteger i_lastSplitViewHeight;
94     NSUInteger i_lastLeftSplitViewWidth;
95
96     NSMutableArray *o_sidebaritems;
97
98     /* this is only true, when we have NO video playing inside the main window */
99     BOOL b_nonembedded;
100
101     BOOL b_podcastView_displayed;
102
103     VLCColorView * o_color_backdrop;
104
105     NSRect frameBeforePlayback;
106 }
107 + (VLCMainWindow *)sharedInstance;
108 @property (readonly) BOOL nativeFullscreenMode;
109 @property (readwrite) BOOL nonembedded;
110
111 @property (readonly) VLCFSPanel* fsPanel;
112
113 - (VLCMainWindowControlsBar *)controlsBar;
114
115 - (void)changePlaylistState:(VLCPlaylistStateEvent)event;
116
117 - (IBAction)dropzoneButtonAction:(id)sender;
118
119 - (IBAction)addPodcast:(id)sender;
120 - (IBAction)addPodcastWindowAction:(id)sender;
121 - (IBAction)removePodcast:(id)sender;
122 - (IBAction)removePodcastWindowAction:(id)sender;
123
124 - (void)windowResizedOrMoved:(NSNotification *)notification;
125
126 - (void)toggleLeftSubSplitView;
127 - (void)showDropZone;
128 - (void)hideDropZone;
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)videoplayWillBeStarted;
139 - (void)setVideoplayEnabled;
140
141 @end
142
143 @interface VLCDetachedVideoWindow : VLCVideoWindowCommon
144 {
145     VLCColorView * o_color_backdrop;
146 }
147
148 @end