]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/MainWindow.h
macosx gui: use vlc_path2uri.
[vlc] / modules / gui / macosx / MainWindow.h
index 396f2425b3178dfa409b969923ae0f01faeac52c..d379ca11921700b27651f88683d53f70f603347b 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * MainWindow.h: MacOS X interface module
  *****************************************************************************
- * Copyright (C) 2002-2011 VideoLAN
+ * Copyright (C) 2002-2012 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
 #import <Cocoa/Cocoa.h>
 #import "CompatibilityFixes.h"
 #import "PXSourceList.h"
+#import "PXSourceListDataSource.h"
 #import <vlc_input.h>
 #import "misc.h"
 #import "fspanel.h"
+#import "MainWindowTitle.h"
 
-@interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate> {
+@interface VLCMainWindow : NSWindow <PXSourceListDataSource, PXSourceListDelegate, NSWindowDelegate, NSAnimationDelegate, NSSplitViewDelegate> {
     IBOutlet id o_play_btn;
     IBOutlet id o_bwd_btn;
     IBOutlet id o_fwd_btn;
@@ -42,6 +44,7 @@
     IBOutlet id o_effects_btn;
     IBOutlet id o_fullscreen_btn;
     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_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_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;
     IBOutlet id o_sidebar_view;
+    IBOutlet id o_sidebar_scrollview;
     IBOutlet id o_chosen_category_lbl;
 
     IBOutlet id o_dropzone_view;
     IBOutlet id o_dropzone_btn;
     IBOutlet id o_dropzone_lbl;
+    IBOutlet id o_dropzone_box;
 
     IBOutlet VLCFSPanel *o_fspanel;
+    IBOutlet id o_titlebar_view;
+    IBOutlet id o_resize_view;
+    IBOutlet id o_detached_resize_view;
+
+    IBOutlet id o_detached_play_btn;
+    IBOutlet id o_detached_fwd_btn;
+    IBOutlet id o_detached_bwd_btn;
+    IBOutlet id o_detached_fullscreen_btn;
+    IBOutlet id o_detached_time_fld;
+    IBOutlet id o_detached_time_sld;
+    IBOutlet id o_detached_time_sld_background;
+    IBOutlet id o_detached_progress_bar;
+    IBOutlet id o_detached_time_sld_fancygradient_view;
+    IBOutlet id o_detached_bottombar_view;
+    IBOutlet id o_detached_titlebar_view;
+    IBOutlet id o_detached_video_window;
 
     BOOL b_dark_interface;
     BOOL b_nativeFullscreenMode;
     BOOL b_video_playback_enabled;
-    int i_lastShownVolume;
-    BOOL b_mute;
+    BOOL b_dropzone_active;
+    BOOL b_splitview_removed;
+    BOOL b_minimized_view;
+    BOOL b_video_deco;
+    BOOL b_show_jump_buttons;
+    BOOL b_show_playmode_buttons;
+    int i_lastSplitViewHeight;
     input_state_e cachedInputState;
 
     NSImage * o_pause_img;
     NSTimeInterval last_bwd_event;
     BOOL just_triggered_next;
     BOOL just_triggered_previous;
+    NSButton * o_prev_btn;
+    NSButton * o_next_btn;
+
     NSMutableArray *o_sidebaritems;
 
-    VLCWindow       * o_nonembedded_window;
     BOOL              b_nonembedded;
 
     VLCWindow       * o_fullscreen_window;
     NSRecursiveLock * o_animation_lock;
     NSSize nativeVideoSize;
 
+    NSTimer *t_hide_mouse_timer;
+
+    VLCColorView * o_color_backdrop;
     NSInteger i_originalLevel;
+    NSRect previousSavedFrame;
+
+    VLCWindow *o_extra_video_window;
+    id o_current_video_window;
 }
 + (VLCMainWindow *)sharedInstance;
 
 - (IBAction)fullscreen:(id)sender;
 - (IBAction)dropzoneButtonAction:(id)sender;
 
+- (void)setTitle:(NSString *)title;
+- (void) customZoom:(id)sender;
+- (void)windowResizedOrMoved:(NSNotification *)notification;
+
 - (void)showDropZone;
 - (void)hideDropZone;
+- (void)showSplitView;
+- (void)hideSplitView;
 - (void)updateTimeSlider;
 - (void)updateVolumeSlider;
 - (void)updateWindow;
 - (void)setRepeatAll;
 - (void)setRepeatOff;
 - (void)setShuffle;
+- (void)toggleJumpButtons;
+- (void)togglePlaymodeButtons;
 
 - (void)drawFancyGradientEffectForTimeSlider;
 
 - (id)videoView;
+- (id)setupVideoView;
 - (void)setVideoplayEnabled;
 - (void)resizeWindow;
 - (void)setNativeVideoSize:(NSSize)size;
 
+- (void)hideMouseCursor:(NSTimer *)timer;
+- (void)recreateHideMouseTimer;
+
 /* fullscreen handling */
 - (void)showFullscreenController;
 - (BOOL)isFullscreen;
 - (void)leaveFullscreenAndFadeOut: (BOOL)fadeout;
 - (void)hasEndedFullscreen;
 - (void)hasBecomeFullscreen;
-- (void)setFrameOnMainThread:(NSData*)packedargs;
 
+/* lion's native fullscreen handling */
+- (void)windowWillEnterFullScreen:(NSNotification *)notification;
+- (void)windowDidEnterFullScreen:(NSNotification *)notification;
+- (void)windowWillExitFullScreen:(NSNotification *)notification;
+
+- (id)detachedTitlebarView;
 @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 : NSWindow
+{
+    BOOL b_dark_interface;
+    BOOL b_video_deco;
+    NSRect previousSavedFrame;
 }
-- (void)loadImagesInDarkStyle:(BOOL)b_value;
-@end
 
+- (void)customZoom:(id)sender;
+
+@end