5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERVIEW_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_MACOS_FRAMEWORK_SOURCE_FLUTTERVIEW_H_
8 #import <Cocoa/Cocoa.h>
18 @protocol FlutterViewContentDelegate <NSObject>
24 - (void)viewDidUpdateContents:(nonnull
FlutterView*)view withSize:(NSSize)newSize;
34 @protocol FlutterViewSizingDelegate <NSObject>
41 - (std::optional<NSSize>)minimumViewSize:(nonnull
FlutterView*)view;
48 - (std::optional<NSSize>)maximumViewSize:(nonnull
FlutterView*)view;
59 - (void)viewDidReshape:(nonnull NSView*)view;
64 - (BOOL)viewShouldAcceptFirstResponder:(nonnull NSView*)view;
77 - (nullable instancetype)initWithMTLDevice:(nonnull
id<MTLDevice>)device
78 commandQueue:(nonnull
id<MTLCommandQueue>)commandQueue
81 enableWideGamut:(BOOL)enableWideGamut NS_DESIGNATED_INITIALIZER;
83 - (nullable instancetype)initWithFrame:(NSRect)frameRect
84 pixelFormat:(nullable NSOpenGLPixelFormat*)format NS_UNAVAILABLE;
85 - (nonnull instancetype)initWithFrame:(NSRect)frameRect NS_UNAVAILABLE;
86 - (nullable instancetype)initWithCoder:(nonnull NSCoder*)coder NS_UNAVAILABLE;
98 @property(readwrite, nonatomic, weak, nullable) id<FlutterViewContentDelegate>
contentDelegate;
103 @property(readwrite, nonatomic, weak, nullable) id<FlutterViewSizingDelegate>
sizingDelegate;
112 - (void)setBackgroundColor:(nonnull NSColor*)color;
119 - (void)didUpdateMouseCursor:(nonnull NSCursor*)cursor;
int64_t FlutterViewIdentifier
CGSize maximumContentSize
FlutterSurfaceManager * surfaceManager
void constraintsDidChange()
id< FlutterViewContentDelegate > contentDelegate
nonnull instancetype NS_UNAVAILABLE()
CGSize minimumContentSize
id< FlutterViewSizingDelegate > sizingDelegate