JubeatPlus 3.9.11
Loading...
Searching...
No Matches
ArtworkLoader.h
Go to the documentation of this file.
1
14
15#import <CoreGraphics/CoreGraphics.h>
16#import <Foundation/Foundation.h>
17#import <UIKit/UIKit.h>
18
19NS_ASSUME_NONNULL_BEGIN
20
21@class ArtworkLoader;
22
29@protocol ArtworkLoaderDelegate <NSObject>
30@optional
35- (void)imageDataLoaded:(ArtworkLoader *)loader;
36@end
37
41@interface ArtworkLoader : NSObject
42
47@property(nonatomic, strong, nullable) UIImage *image;
48
52@property(nonatomic, weak, nullable) id<ArtworkLoaderDelegate> delegate;
53
58@property(nonatomic, readonly) unsigned int tuneID;
59
64@property(nonatomic, readonly) int indexRow;
65
77- (instancetype)initWithPath:(nullable NSString *)path
78 tuneID:(unsigned int)tuneID
79 indexRow:(int)indexRow
80 size:(CGSize)size
81 bigArtwork:(BOOL)bigArtwork;
82
96- (instancetype)initWithPath:(nullable NSString *)path
97 tuneID:(unsigned int)tuneID
98 size:(CGSize)size
99 bigArtwork:(BOOL)bigArtwork;
100
111- (nullable UIImage *)shrinkImage:(nullable UIImage *)image;
112
122- (void)loadArtwork;
123
124@end
125
126NS_ASSUME_NONNULL_END
127
128// code: language=Objective-C
129// kate: hl Objective-C;
130// vim: set ft=objc :
A one-shot loader for a single tune's artwork.
Definition ArtworkLoader.h:42
id< ArtworkLoaderDelegate > delegate
The object told when the artwork is ready.
Definition ArtworkLoader.h:52
void loadArtwork()
Unzips, deciphers and decodes the artwork, then tells the delegate.
Definition ArtworkLoader.m:78
unsigned int tuneID
Which tune this artwork belongs to.
Definition ArtworkLoader.h:58
int indexRow
Which row asked for it.
Definition ArtworkLoader.h:64
UIImage * image
The decoded artwork, once -loadArtwork has run.
Definition ArtworkLoader.h:47