]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/Windows.h
macosx: avoid possible index out of range problem in bookmarks table view
[vlc] / modules / gui / macosx / Windows.h
index e15eadba37a33df5009d4530d4233d06815945b4..d3dec6b9b5090c5e99cc5988b3d147d750480d69 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * Windows.h: MacOS X interface module
  *****************************************************************************
- * Copyright (C) 2012 VLC authors and VideoLAN
+ * Copyright (C) 2012-2014 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
@@ -23,7 +23,6 @@
  *****************************************************************************/
 
 #import <Cocoa/Cocoa.h>
-#import "CompatibilityFixes.h"
 
 /*****************************************************************************
  * VLCWindow
@@ -33,7 +32,7 @@
 
 @class VLCVoutView;
 
-@interface VLCWindow : NSWindow
+@interface VLCWindow : NSWindow <NSAnimationDelegate>
 {
     BOOL b_canBecomeKeyWindow;
     BOOL b_isset_canBecomeKeyWindow;
@@ -44,8 +43,7 @@
     BOOL              b_has_active_video;
 
     /* 
-     * normal fullscreen: YES when all animations are over
-     * lion fullscreen:   toggled when fs animation starts
+     * YES when all animations are over
      * for fullscreen window: always YES
      */
     BOOL              b_fullscreen;
@@ -100,18 +98,26 @@ static const float f_min_video_height = 70.0;
     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;
 
+    BOOL              b_video_view_was_hidden;
+
     NSTimer *t_hide_mouse_timer;
+
+    // true when the window is in transition for entering or exiting fullscreen
+    BOOL b_in_fullscreen_transition;
+
+    NSRect frameBeforeLionFullscreen;
+
+    BOOL b_windowShouldExitFullscreenWhenFinished;
 }
 
 @property (nonatomic, assign) VLCVoutView* videoView;
 @property (readonly) VLCControlsBarCommon* controlsBar;
+@property (readonly) BOOL inFullscreenTransition;
+@property (readonly) BOOL windowShouldExitFullscreenWhenFinished;
 
 - (void)setWindowLevel:(NSInteger)i_state;
 
@@ -123,8 +129,8 @@ static const float f_min_video_height = 70.0;
 - (void)setTitle:(NSString *)title;
 
 /* fullscreen handling */
-- (void)enterFullscreen;
-- (void)leaveFullscreen;
+- (void)enterFullscreenWithAnimation:(BOOL)b_animation;
+- (void)leaveFullscreenWithAnimation:(BOOL)b_animation;
 
 /* lion fullscreen handling */
 - (void)windowWillEnterFullScreen:(NSNotification *)notification;