summaryrefslogtreecommitdiffstats
path: root/video/out/cocoa
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/cocoa')
-rw-r--r--video/out/cocoa/window.h14
-rw-r--r--video/out/cocoa/window.m5
2 files changed, 14 insertions, 5 deletions
diff --git a/video/out/cocoa/window.h b/video/out/cocoa/window.h
index 88c054ac8d..e325be343e 100644
--- a/video/out/cocoa/window.h
+++ b/video/out/cocoa/window.h
@@ -18,13 +18,17 @@
#import <Cocoa/Cocoa.h>
#import "video/out/cocoa/mpvadapter.h"
-@interface MpvVideoWindow : NSWindow <NSWindowDelegate>
-@property(nonatomic, retain) MpvCocoaAdapter *adapter;
+@protocol MpvSizing
+- (void)queueNewVideoSize:(NSSize)newSize;
+@end
+
+@protocol MpvFullscreen
- (void)setFullScreen:(BOOL)willBeFullscreen;
+@end
+
+@interface MpvVideoWindow : NSWindow <NSWindowDelegate, MpvSizing, MpvFullscreen>
+@property(nonatomic, retain) MpvCocoaAdapter *adapter;
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
- (void)mulSize:(float)multiplier;
-- (NSRect)frameRect:(NSRect)frameRect forCenteredContentSize:(NSSize)newSize;
-- (void)setCenteredContentSize:(NSSize)newSize;
-- (void)queueNewVideoSize:(NSSize)newSize;
@end
diff --git a/video/out/cocoa/window.m b/video/out/cocoa/window.m
index ebd3eaf957..597fa35d58 100644
--- a/video/out/cocoa/window.m
+++ b/video/out/cocoa/window.m
@@ -27,6 +27,11 @@
#include "window.h"
+@interface MpvVideoWindow()
+- (NSRect)frameRect:(NSRect)frameRect forCenteredContentSize:(NSSize)newSize;
+- (void)setCenteredContentSize:(NSSize)newSize;
+@end
+
@implementation MpvVideoWindow {
NSSize _queued_video_size;
}