mirror of
https://github.com/danog/Telegram.git
synced 2024-12-02 09:27:55 +01:00
48 lines
1.4 KiB
Objective-C
48 lines
1.4 KiB
Objective-C
#import <SSignalKit/SSignalKit.h>
|
|
|
|
@protocol TGMediaSelectableItem
|
|
|
|
@property (nonatomic, readonly) NSString *uniqueIdentifier;
|
|
|
|
@end
|
|
|
|
@interface TGMediaSelectionContext : NSObject
|
|
|
|
@property (nonatomic, copy) SSignal *(^updatedItemsSignal)(NSArray *items);
|
|
- (void)setItemSourceUpdatedSignal:(SSignal *)signal;
|
|
|
|
- (void)setItem:(id<TGMediaSelectableItem>)item selected:(bool)selected;
|
|
- (void)setItem:(id<TGMediaSelectableItem>)item selected:(bool)selected animated:(bool)animated sender:(id)sender;
|
|
|
|
- (bool)toggleItemSelection:(id<TGMediaSelectableItem>)item;
|
|
- (bool)toggleItemSelection:(id<TGMediaSelectableItem>)item animated:(bool)animated sender:(id)sender;
|
|
|
|
- (void)clear;
|
|
|
|
- (bool)isItemSelected:(id<TGMediaSelectableItem>)item;
|
|
|
|
- (SSignal *)itemSelectedSignal:(id<TGMediaSelectableItem>)item;
|
|
- (SSignal *)itemInformativeSelectedSignal:(id<TGMediaSelectableItem>)item;
|
|
- (SSignal *)selectionChangedSignal;
|
|
|
|
- (void)enumerateSelectedItems:(void (^)(id<TGMediaSelectableItem>))enumerationBlock;
|
|
|
|
- (NSOrderedSet *)selectedItemsIdentifiers;
|
|
- (NSArray *)selectedItems;
|
|
|
|
- (NSUInteger)count;
|
|
|
|
+ (SSignal *)combinedSelectionChangedSignalForContexts:(NSArray *)contexts;
|
|
|
|
@end
|
|
|
|
|
|
@interface TGMediaSelectionChange : NSObject
|
|
|
|
@property (nonatomic, readonly) id<TGMediaSelectableItem> item;
|
|
@property (nonatomic, readonly) bool selected;
|
|
@property (nonatomic, readonly) bool animated;
|
|
@property (nonatomic, readonly, strong) id sender;
|
|
|
|
@end
|