/*****************************************************************************
* MainWindow.h: MacOS X interface module
*****************************************************************************
- * Copyright (C) 2002-2011 VideoLAN
+ * Copyright (C) 2002-2014 VLC authors and VideoLAN
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
* Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
* Derk-Jan Hartman <hartman at videolan.org>
+ * David Fuhrmann <david dot fuhrmann at googlemail dot com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#import <Cocoa/Cocoa.h>
#import "PXSourceList.h"
+#import "PXSourceListDataSource.h"
+
#import <vlc_input.h>
+#import <vlc_vout_window.h>
+
+#import "Windows.h"
+#import "misc.h"
+#import "fspanel.h"
+#import "MainWindowTitle.h"
+
+@class VLCDetachedVideoWindow;
+@class VLCMainWindowControlsBar;
+@class VLCVoutView;
+
+typedef enum {
+ psUserEvent,
+ psUserMenuEvent,
+ psVideoStartedOrStoppedEvent,
+ psPlaylistItemChangedEvent
+} VLCPlaylistStateEvent;
+
+@interface VLCMainWindow : VLCVideoWindowCommon <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
-#ifndef MAC_OS_X_VERSION_10_6
-@protocol NSWindowDelegate <NSObject> @end
-#endif
-
-@interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate> {
- IBOutlet id o_play_btn;
- IBOutlet id o_bwd_btn;
- IBOutlet id o_fwd_btn;
- IBOutlet id o_stop_btn;
- IBOutlet id o_playlist_btn;
- IBOutlet id o_repeat_btn;
- IBOutlet id o_shuffle_btn;
- IBOutlet id o_effects_btn;
- IBOutlet id o_fullscreen_btn;
IBOutlet id o_search_fld;
- IBOutlet id o_volume_sld;
- IBOutlet id o_volume_track_view;
- IBOutlet id o_volume_down_btn;
- IBOutlet id o_volume_up_btn;
- IBOutlet id o_time_sld;
- IBOutlet id o_time_sld_fancygradient_view;
- IBOutlet id o_time_fld;
- IBOutlet id o_progress_bar;
- IBOutlet id o_bottombar_view;
- IBOutlet id o_time_sld_left_view;
- IBOutlet id o_time_sld_middle_view;
- IBOutlet id o_time_sld_right_view;
- // TODO Playlist table, additional ui stuff at the top of the window
+
IBOutlet id o_playlist_table;
- IBOutlet id o_video_view;
IBOutlet id o_split_view;
+ IBOutlet id o_left_split_view;
+ IBOutlet id o_right_split_view;
IBOutlet id o_sidebar_view;
+ IBOutlet id o_sidebar_scrollview;
IBOutlet id o_chosen_category_lbl;
- BOOL b_dark_interface;
+ IBOutlet id o_dropzone_view;
+ IBOutlet id o_dropzone_btn;
+ IBOutlet id o_dropzone_lbl;
+ IBOutlet id o_dropzone_box;
+ IBOutlet id o_dropzone_img;
+
+ VLCFSPanel *o_fspanel;
+
+ IBOutlet id o_podcast_view;
+ IBOutlet id o_podcast_add_btn;
+ IBOutlet id o_podcast_remove_btn;
+ IBOutlet id o_podcast_subscribe_window;
+ IBOutlet id o_podcast_subscribe_title_lbl;
+ IBOutlet id o_podcast_subscribe_subtitle_lbl;
+ IBOutlet id o_podcast_subscribe_url_fld;
+ IBOutlet id o_podcast_subscribe_cancel_btn;
+ IBOutlet id o_podcast_subscribe_ok_btn;
+ IBOutlet id o_podcast_unsubscribe_window;
+ IBOutlet id o_podcast_unsubscribe_title_lbl;
+ IBOutlet id o_podcast_unsubscribe_subtitle_lbl;
+ IBOutlet id o_podcast_unsubscribe_pop;
+ IBOutlet id o_podcast_unsubscribe_ok_btn;
+ IBOutlet id o_podcast_unsubscribe_cancel_btn;
+
+ BOOL b_nativeFullscreenMode;
BOOL b_video_playback_enabled;
- int i_lastShownVolume;
- BOOL b_mute;
- input_state_e cachedInputState;
-
- NSImage * o_pause_img;
- NSImage * o_pause_pressed_img;
- NSImage * o_play_img;
- NSImage * o_play_pressed_img;
- NSImage * o_repeat_img;
- NSImage * o_repeat_pressed_img;
- NSImage * o_repeat_all_img;
- NSImage * o_repeat_all_pressed_img;
- NSImage * o_repeat_one_img;
- NSImage * o_repeat_one_pressed_img;
- NSImage * o_shuffle_img;
- NSImage * o_shuffle_pressed_img;
- NSImage * o_shuffle_on_img;
- NSImage * o_shuffle_on_pressed_img;
-
- NSTimeInterval last_fwd_event;
- NSTimeInterval last_bwd_event;
- BOOL just_triggered_next;
- BOOL just_triggered_previous;
+ BOOL b_dropzone_active;
+ BOOL b_splitview_removed;
+ BOOL b_minimized_view;
+
+ CGFloat f_lastSplitViewHeight;
+ CGFloat f_lastLeftSplitViewWidth;
+
NSMutableArray *o_sidebaritems;
+
+ /* this is only true, when we have NO video playing inside the main window */
+ BOOL b_nonembedded;
+
+ BOOL b_podcastView_displayed;
+
+ VLCColorView * o_color_backdrop;
+
+ NSRect frameBeforePlayback;
}
+ (VLCMainWindow *)sharedInstance;
+@property (readonly) BOOL nativeFullscreenMode;
+@property (readwrite) BOOL nonembedded;
-- (IBAction)play:(id)sender;
-- (IBAction)bwd:(id)sender;
-- (IBAction)fwd:(id)sender;
-- (IBAction)stop:(id)sender;
-- (IBAction)togglePlaylist:(id)sender;
-- (IBAction)repeat:(id)sender;
-- (IBAction)shuffle:(id)sender;
-- (IBAction)timeSliderAction:(id)sender;
-- (IBAction)volumeAction:(id)sender;
-- (IBAction)effects:(id)sender;
-- (IBAction)fullscreen:(id)sender;
-
-- (id)videoView;
-- (void)setVideoplayEnabled;
+@property (readonly) VLCFSPanel* fsPanel;
+
+- (VLCMainWindowControlsBar *)controlsBar;
+
+- (void)changePlaylistState:(VLCPlaylistStateEvent)event;
+
+- (IBAction)dropzoneButtonAction:(id)sender;
+
+- (IBAction)addPodcast:(id)sender;
+- (IBAction)addPodcastWindowAction:(id)sender;
+- (IBAction)removePodcast:(id)sender;
+- (IBAction)removePodcastWindowAction:(id)sender;
+
+- (void)windowResizedOrMoved:(NSNotification *)notification;
+
+- (void)reloadSidebar;
+
+- (void)toggleLeftSubSplitView;
+- (void)showDropZone;
+- (void)hideDropZone;
- (void)updateTimeSlider;
-- (void)updateVolumeSlider;
- (void)updateWindow;
- (void)updateName;
- (void)setPause;
- (void)setPlay;
-- (void)setRepeatOne;
-- (void)setRepeatAll;
-- (void)setRepeatOff;
-- (void)setShuffle;
+- (void)updateVolumeSlider;
-- (void)drawFancyGradientEffectForTimeSlider;
+- (void)showFullscreenController;
+
+- (void)videoplayWillBeStarted;
+- (void)setVideoplayEnabled;
@end
-@interface VLCProgressBarGradientEffect : NSView {
- NSImage * o_time_sld_gradient_left_img;
- NSImage * o_time_sld_gradient_middle_img;
- NSImage * o_time_sld_gradient_right_img;
+@interface VLCDetachedVideoWindow : VLCVideoWindowCommon
+{
+ VLCColorView * o_color_backdrop;
}
-- (void)loadImagesInDarkStyle:(BOOL)b_value;
-@end
\ No newline at end of file
+
+@end