blob: 67c0bf75f3f5ecf7a2eff1a89686535340a22ef4 [file] [log] [blame]
// Copyright 2013 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import <Foundation/Foundation.h>
#if TARGET_OS_OSX
#import <FlutterMacOS/FlutterMacOS.h>
#else
#import <Flutter/Flutter.h>
#endif
// A cross-platform display link abstraction.
@interface FVPDisplayLink : NSObject
/**
* Whether the display link is currently running (i.e., firing events).
*
* Defaults to NO.
*/
@property(nonatomic, assign) BOOL running;
/**
* Initializes a display link that calls the given callback when fired.
*
* The display link starts paused, so must be started, by setting 'running' to YES, before the
* callback will fire.
*/
- (instancetype)initWithRegistrar:(id<FlutterPluginRegistrar>)registrar
callback:(void (^)(void))callback NS_DESIGNATED_INITIALIZER;
- (instancetype)init NS_UNAVAILABLE;
@end