JubeatPlus 3.9.11
Loading...
Searching...
No Matches
StorePromotionView.h
Go to the documentation of this file.
1
21
22#import <UIKit/UIKit.h>
23
24#import "StorePackInfo.h"
25
26@class StorePromotion;
28
29NS_ASSUME_NONNULL_BEGIN
30
37@protocol StorePromotionViewDelegate <NSObject>
38
39@optional
40
46- (void)storePromotionView:(StorePromotionView *)view packSelected:(StorePackInfo *)packInfo;
47
53- (void)storePromotionView:(StorePromotionView *)view genreSelected:(NSUInteger)genreIndex;
54
55@end
56
60@interface StorePromotionView : UIView <UIScrollViewDelegate>
61
66@property(nonatomic, weak, nullable) id<StorePromotionViewDelegate> delegate;
67
75- (instancetype)initWithFrame:(CGRect)frame promotions:(nullable NSArray *)promotions;
76
82
90- (nullable UIView *)hitTest:(CGPoint)point withEvent:(nullable UIEvent *)event;
91
96- (void)beginLoop;
97
102- (void)start;
103
108- (void)pause;
109
114- (void)resume;
115
120- (void)stop;
121
126- (void)nextBanner;
127
133- (void)bannerTapped:(nonnull UITapGestureRecognizer *)recognizer;
134
140- (void)tapSampleBtn:(nullable id)sender;
141
147- (void)scrollViewWillBeginDragging:(nonnull UIScrollView *)scrollView;
148
154- (void)scrollViewDidScroll:(nonnull UIScrollView *)scrollView;
155
162- (void)scrollViewDidEndDragging:(nonnull UIScrollView *)scrollView willDecelerate:(BOOL)decelerate;
163
169- (void)scrollViewWillBeginDecelerating:(nonnull UIScrollView *)scrollView;
170
176- (void)scrollViewDidEndDecelerating:(nonnull UIScrollView *)scrollView;
177
183- (void)playBannerThumbnail:(int)index;
184
190- (void)thumbnailMute:(BOOL)mute;
191
198- (nullable NSData *)getThumbnailData:(nullable StorePromotion *)promotion;
199
204- (void)clearThumbnailCache;
205
211- (void)downloadImageSync:(nonnull NSArray *)args;
212
219- (void)playThumbnail:(nullable NSString *)name data:(nullable NSData *)data;
220
225- (void)stopThumbnail;
226
227@end
228
229NS_ASSUME_NONNULL_END
230
231// code: language=Objective-C
232// kate: hl Objective-C;
233// vim: set ft=objc :
One purchasable pack in the store.
A pack's identity, name, price, store flags, and track list.
Definition StorePackInfo.h:18
A paging carousel of promotion banners with auto-advance and per-banner sample playback.
Definition StorePromotionView.h:60
id< StorePromotionViewDelegate > delegate
The tap-selection delegate.
Definition StorePromotionView.h:66
void beginLoop()
Arms the auto-advance timer and plays the centred banner's thumbnail.
Definition StorePromotionView.m:260
void nextBanner()
Scrolls to the next banner and plays its thumbnail.
Definition StorePromotionView.m:308
void stop()
Stops the carousel: invalidates the timer and mutes the thumbnail.
Definition StorePromotionView.m:301
void clearThumbnailCache()
Empties the thumbnail cache and cancels all pending downloads.
Definition StorePromotionView.m:460
void resume()
Resumes a paused carousel.
Definition StorePromotionView.m:293
void pause()
Pauses the carousel: stops the timer and the thumbnail playback.
Definition StorePromotionView.m:281
void setSampleButtonImage()
Updates the sample button's image and the track label's opacity for the current mode.
Definition StorePromotionView.m:343
void stopThumbnail()
Fades out and clears the currently-playing thumbnail clip.
Definition StorePromotionView.m:516
void start()
Starts fetching every banner's artwork, then begins the auto-advance loop.
Definition StorePromotionView.m:273
A promoted pack or genre, with its banner artwork and, for a pack, its sample list.
Definition StorePromotion.h:24