1 /*
2 * This file is part of the SDWebImage package.
3 * (c) Olivier Poitrey <rs@dailymotion.com>
4 *
5 * For the full copyright and license information, please view the LICENSE
6 * file that was distributed with this source code.
7 */
8 
9 #import <Foundation/Foundation.h>
10 #import "SDWebImageCompat.h"
11 
12 /// Cross-platform display link wrapper. Do not retain the target
13 /// Use `CADisplayLink` on iOS/tvOS, `CVDisplayLink` on macOS, `NSTimer` on watchOS
14 @interface SDDisplayLink : NSObject
15 
16 @property (readonly, nonatomic, weak, nullable) id target;
17 @property (readonly, nonatomic, assign, nonnull) SEL selector;
18 @property (readonly, nonatomic) CFTimeInterval duration;
19 @property (readonly, nonatomic) BOOL isRunning;
20 
21 + (nonnull instancetype)displayLinkWithTarget:(nonnull id)target selector:(nonnull SEL)sel;
22 
23 - (void)addToRunLoop:(nonnull NSRunLoop *)runloop forMode:(nonnull NSRunLoopMode)mode;
24 - (void)removeFromRunLoop:(nonnull NSRunLoop *)runloop forMode:(nonnull NSRunLoopMode)mode;
25 
26 - (void)start;
27 - (void)stop;
28 
29 @end
30