macOS: Use dark appearance for panel modals
[vlc.git] / modules / gui / macosx / Windows.h
blobe228188765f48ac414a51b9d4e002a2a98832cd8
1 /*****************************************************************************
2 * Windows.h: MacOS X interface module
3 *****************************************************************************
4 * Copyright (C) 2012-2014 VLC authors and VideoLAN
5 * $Id$
7 * Authors: Felix Paul Kühne <fkuehne -at- videolan -dot- org>
8 * David Fuhrmann <david dot fuhrmann at googlemail dot com>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #import <Cocoa/Cocoa.h>
27 /*****************************************************************************
28 * VLCWindow
30 * Missing extension to NSWindow
31 *****************************************************************************/
33 @class VLCVoutView;
35 @interface VLCWindow : NSWindow <NSAnimationDelegate>
37 @property (readwrite) BOOL canBecomeKeyWindow;
38 @property (readwrite) BOOL canBecomeMainWindow;
40 @property (nonatomic, readwrite) BOOL hasActiveVideo;
41 @property (nonatomic, readwrite) BOOL fullscreen;
43 - (void)closeAndAnimate:(BOOL)animate;
44 - (void)orderFront:(id)sender animate:(BOOL)animate;
45 - (void)orderOut:(id)sender animate:(BOOL)animate;
47 - (VLCVoutView *)videoView;
49 @end
52 static const float f_min_video_height = 70.0;
54 @class VLCControlsBarCommon;
55 @class VLCMainWindowTitleView;
57 /*****************************************************************************
58 * VLCVideoWindowCommon
60 * Common code for main window, detached window and extra video window
61 *****************************************************************************/
63 @interface VLCVideoWindowCommon : VLCWindow <NSWindowDelegate, NSAnimationDelegate>
65 @property (nonatomic, weak) IBOutlet VLCMainWindowTitleView *titlebarView; // only set in main or detached window
66 @property (weak) IBOutlet NSLayoutConstraint *videoViewTopConstraint;
67 @property (weak) IBOutlet NSLayoutConstraint *videoViewBottomConstraint;
69 @property (nonatomic, weak) IBOutlet VLCVoutView* videoView;
70 @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;
77 - (void)setWindowLevel:(NSInteger)i_state;
78 - (void)resizeWindow;
80 - (NSRect)getWindowRectForProposedVideoViewSize:(NSSize)size;
82 - (void)setTitle:(NSString *)title;
84 /* fullscreen handling */
85 - (void)enterFullscreenWithAnimation:(BOOL)b_animation;
86 - (void)leaveFullscreenWithAnimation:(BOOL)b_animation;
88 /* lion fullscreen handling */
89 - (void)hideControlsBar;
90 - (void)showControlsBar;
92 - (void)windowWillEnterFullScreen:(NSNotification *)notification;
93 - (void)windowDidEnterFullScreen:(NSNotification *)notification;
94 - (void)windowWillExitFullScreen:(NSNotification *)notification;
96 @end