/*****************************************************************************
* Windows.h: MacOS X interface module
*****************************************************************************
- * Copyright (C) 2012 VLC authors and VideoLAN
+ * Copyright (C) 2012-2013 VLC authors and VideoLAN
* $Id$
*
* Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
* Missing extension to NSWindow
*****************************************************************************/
+@class VLCVoutView;
+
@interface VLCWindow : NSWindow
{
BOOL b_canBecomeKeyWindow;
BOOL b_canBecomeMainWindow;
BOOL b_isset_canBecomeMainWindow;
NSViewAnimation *o_current_animation;
+
+ BOOL b_has_active_video;
+
+ /*
+ * YES when all animations are over
+ * for fullscreen window: always YES
+ */
+ BOOL b_fullscreen;
}
@property (readwrite) BOOL canBecomeKeyWindow;
@property (readwrite) BOOL canBecomeMainWindow;
+@property (nonatomic, readwrite) BOOL hasActiveVideo;
+@property (nonatomic, readwrite) BOOL fullscreen;
+
/* animate mode is only supported in >=10.4 */
- (void)orderFront: (id)sender animate: (BOOL)animate;
/* animate mode is only supported in >=10.4 */
- (void)closeAndAnimate: (BOOL)animate;
+- (VLCVoutView *)videoView;
+
@end
+static const float f_min_video_height = 70.0;
+
+@class VLCControlsBarCommon;
+
/*****************************************************************************
* VLCVideoWindowCommon
*
* Common code for main window, detached window and extra video window
*****************************************************************************/
-@interface VLCVideoWindowCommon : VLCWindow
+@interface VLCVideoWindowCommon : VLCWindow <NSWindowDelegate, NSAnimationDelegate>
{
NSRect previousSavedFrame;
BOOL b_dark_interface;
IBOutlet id o_titlebar_view; // only set in main or detached window
+ IBOutlet VLCVoutView *o_video_view;
+
+ IBOutlet VLCControlsBarCommon *o_controls_bar;
+
+ NSSize nativeVideoSize;
+
+ // variables for fullscreen handling
+ VLCVideoWindowCommon *o_current_video_window;
+ VLCWindow * o_fullscreen_window;
+ NSViewAnimation * o_fullscreen_anim1;
+ NSViewAnimation * o_fullscreen_anim2;
+ NSViewAnimation * o_makekey_anim;
+ NSView * o_temp_view;
+
+ BOOL b_window_is_invisible;
+ NSRecursiveLock * o_animation_lock;
+ NSInteger i_originalLevel;
+
+ NSTimer *t_hide_mouse_timer;
+
+ // true when the window is in transition for entering lion fullscreen
+ BOOL b_entering_fullscreen_transition;
}
+@property (nonatomic, assign) VLCVoutView* videoView;
+@property (readonly) VLCControlsBarCommon* controlsBar;
+@property (readonly) BOOL enteringFullscreenTransition;
+
+- (void)setWindowLevel:(NSInteger)i_state;
+
+- (void)resizeWindow;
+- (void)setNativeVideoSize:(NSSize)size;
+- (NSRect)getWindowRectForProposedVideoViewSize:(NSSize)size;
+
+
- (void)setTitle:(NSString *)title;
-@end
\ No newline at end of file
+/* fullscreen handling */
+- (void)enterFullscreen;
+- (void)leaveFullscreen;
+
+/* lion fullscreen handling */
+- (void)windowWillEnterFullScreen:(NSNotification *)notification;
+- (void)windowDidEnterFullScreen:(NSNotification *)notification;
+- (void)windowWillExitFullScreen:(NSNotification *)notification;
+
+@end