Windows.h 3.51 KB
Newer Older
1 2 3
/*****************************************************************************
 * Windows.h: MacOS X interface module
 *****************************************************************************
4
 * Copyright (C) 2012-2014 VLC authors and VideoLAN
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
 * $Id$
 *
 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- 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
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
 *****************************************************************************/

#import <Cocoa/Cocoa.h>

/*****************************************************************************
 * VLCWindow
 *
 *  Missing extension to NSWindow
 *****************************************************************************/

33 34
@class VLCVoutView;

35
@interface VLCWindow : NSWindow <NSAnimationDelegate>
36

37 38 39
@property (readwrite) BOOL canBecomeKeyWindow;
@property (readwrite) BOOL canBecomeMainWindow;

40 41 42
@property (nonatomic, readwrite) BOOL hasActiveVideo;
@property (nonatomic, readwrite) BOOL fullscreen;

43 44 45
- (void)closeAndAnimate:(BOOL)animate;
- (void)orderFront:(id)sender animate:(BOOL)animate;
- (void)orderOut:(id)sender animate:(BOOL)animate;
46

47 48
- (VLCVoutView *)videoView;

49 50
@end

51 52 53

static const float f_min_video_height = 70.0;

54
@class VLCControlsBarCommon;
55
@class VLCMainWindowTitleView;
56 57 58 59 60 61 62

/*****************************************************************************
 * VLCVideoWindowCommon
 *
 *  Common code for main window, detached window and extra video window
 *****************************************************************************/

63
@interface VLCVideoWindowCommon : VLCWindow <NSWindowDelegate, NSAnimationDelegate>
64 65

@property (nonatomic, weak) IBOutlet VLCMainWindowTitleView *titlebarView; // only set in main or detached window
66 67 68
@property (weak) IBOutlet NSLayoutConstraint *videoViewTopConstraint;
@property (weak) IBOutlet NSLayoutConstraint *videoViewBottomConstraint;

69 70
@property (nonatomic, weak) IBOutlet VLCVoutView* videoView;
@property (nonatomic, weak) IBOutlet VLCControlsBarCommon* controlsBar;
71
@property (readonly) BOOL inFullscreenTransition;
72
@property (readonly) BOOL darkInterface;
73
@property (readonly) BOOL windowShouldExitFullscreenWhenFinished;
74
@property (readwrite, assign) NSRect previousSavedFrame;
75
@property (nonatomic, readwrite, assign) NSSize nativeVideoSize;
76

77
- (void)setWindowLevel:(NSInteger)i_state;
78
- (void)resizeWindow;
79

80
- (NSRect)getWindowRectForProposedVideoViewSize:(NSSize)size;
81

82 83
- (void)setTitle:(NSString *)title;

84
/* fullscreen handling */
85
- (void)enterFullscreenWithAnimation:(BOOL)b_animation;
86
- (void)leaveFullscreenWithAnimation:(BOOL)b_animation;
87

88
/* lion fullscreen handling */
89 90 91
- (void)hideControlsBar;
- (void)showControlsBar;

92 93 94 95
- (void)windowWillEnterFullScreen:(NSNotification *)notification;
- (void)windowDidEnterFullScreen:(NSNotification *)notification;
- (void)windowWillExitFullScreen:(NSNotification *)notification;

96
@end