X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fgui%2Fmacosx%2FMainWindow.h;h=8c934187ef238b8d7bf7a494af331ad2555e00ab;hb=028d21434fc906d94caa4a2b3eb0e1a4a40cdabc;hp=9bc63b23eba3396ddad0569be1fc65b6eb2f7522;hpb=fa9bc462bf156c7760dc78f64e270e13129287f3;p=vlc diff --git a/modules/gui/macosx/MainWindow.h b/modules/gui/macosx/MainWindow.h index 9bc63b23eb..8c934187ef 100644 --- a/modules/gui/macosx/MainWindow.h +++ b/modules/gui/macosx/MainWindow.h @@ -1,13 +1,14 @@ /***************************************************************************** * MainWindow.h: MacOS X interface module ***************************************************************************** - * Copyright (C) 2002-2012 VLC authors and VideoLAN + * Copyright (C) 2002-2014 VLC authors and VideoLAN * $Id$ * * Authors: Felix Paul Kühne * Jon Lech Johansen * Christophe Massiot * Derk-Jan Hartman + * David Fuhrmann * * 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 @@ -25,37 +26,33 @@ *****************************************************************************/ #import -#import "CompatibilityFixes.h" #import "PXSourceList.h" +#import "PXSourceListDataSource.h" + #import +#import + +#import "Windows.h" #import "misc.h" #import "fspanel.h" #import "MainWindowTitle.h" -@interface VLCMainWindow : NSWindow { - 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; +@class VLCDetachedVideoWindow; +@class VLCMainWindowControlsBar; +@class VLCVoutView; + +typedef enum { + psUserEvent, + psUserMenuEvent, + psVideoStartedOrStoppedEvent, + psPlaylistItemChangedEvent +} VLCPlaylistStateEvent; + +@interface VLCMainWindow : VLCVideoWindowCommon { + IBOutlet id o_search_fld; - IBOutlet id o_topbar_view; - 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_background; + 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; @@ -66,119 +63,88 @@ 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; - IBOutlet VLCFSPanel *o_fspanel; - IBOutlet id o_titlebar_view; - IBOutlet id o_resize_view; - - BOOL b_dark_interface; BOOL b_nativeFullscreenMode; BOOL b_video_playback_enabled; BOOL b_dropzone_active; BOOL b_splitview_removed; - int i_lastSplitViewHeight; - int i_lastShownVolume; - 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; - NSMutableArray *o_sidebaritems; + BOOL b_minimized_view; + + CGFloat f_lastSplitViewHeight; + CGFloat f_lastLeftSplitViewWidth; - VLCWindow * o_nonembedded_window; - BOOL b_nonembedded; + NSMutableArray *o_sidebaritems; - VLCWindow * o_fullscreen_window; - NSViewAnimation * o_fullscreen_anim1; - NSViewAnimation * o_fullscreen_anim2; - NSViewAnimation * o_makekey_anim; - NSView * o_temp_view; - /* set to yes if we are fullscreen and all animations are over */ - BOOL b_fullscreen; - BOOL b_window_is_invisible; - NSRecursiveLock * o_animation_lock; - NSSize nativeVideoSize; + /* this is only true, when we have NO video playing inside the main window */ + BOOL b_nonembedded; - NSTimer *t_hide_mouse_timer; + BOOL b_podcastView_displayed; VLCColorView * o_color_backdrop; - NSInteger i_originalLevel; - NSRect previousSavedFrame; + + NSRect frameBeforePlayback; } + (VLCMainWindow *)sharedInstance; +@property (readonly) BOOL nativeFullscreenMode; +@property (readwrite) BOOL nonembedded; + +@property (readonly) VLCFSPanel* fsPanel; + +- (VLCMainWindowControlsBar *)controlsBar; + +- (void)changePlaylistState:(VLCPlaylistStateEvent)event; -- (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; - (IBAction)dropzoneButtonAction:(id)sender; -- (void)setTitle:(NSString *)title; -- (void) customZoom: (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)showSplitView; -- (void)hideSplitView; - (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; -- (id)videoView; +- (void)videoplayWillBeStarted; - (void)setVideoplayEnabled; -- (void)resizeWindow; -- (void)setNativeVideoSize:(NSSize)size; -- (void)hideMouseCursor:(NSTimer *)timer; -- (void)recreateHideMouseTimer; +@end -/* fullscreen handling */ -- (void)showFullscreenController; -- (BOOL)isFullscreen; -- (void)lockFullscreenAnimation; -- (void)unlockFullscreenAnimation; -- (void)enterFullscreen; -- (void)leaveFullscreen; -- (void)leaveFullscreenAndFadeOut: (BOOL)fadeout; -- (void)hasEndedFullscreen; -- (void)hasBecomeFullscreen; -- (void)setFrameOnMainThread:(NSData*)packedargs; - -/* lion's native fullscreen handling */ -- (void)windowWillEnterFullScreen:(NSNotification *)notification; -- (void)windowWillExitFullScreen:(NSNotification *)notification; +@interface VLCDetachedVideoWindow : VLCVideoWindowCommon +{ + VLCColorView * o_color_backdrop; +} @end