Swiftgram/submodules/LegacyComponents/LegacyComponents/TGModernConversationInputMicButton.h
Peter d153fe0f21 Add 'submodules/LegacyComponents/' from commit 'd5594346161c1b7f203d1e87068bbe77bcaac019'
git-subtree-dir: submodules/LegacyComponents
git-subtree-mainline: 608630530451e02e5aec48389d144dbf7a3625b9
git-subtree-split: d5594346161c1b7f203d1e87068bbe77bcaac019
2019-06-11 18:51:15 +01:00

72 lines
2.2 KiB
Objective-C

#import <UIKit/UIKit.h>
@class TGModernConversationInputMicButton;
@protocol TGModernConversationInputMicButtonPresentation <NSObject>
- (UIView *)view;
- (void)setUserInteractionEnabled:(bool)enabled;
- (void)present;
- (void)dismiss;
@end
@protocol TGModernConversationInputMicButtonDelegate <NSObject>
@optional
- (void)micButtonInteractionBegan;
- (void)micButtonInteractionCancelled:(CGPoint)velocity;
- (void)micButtonInteractionCompleted:(CGPoint)velocity;
- (void)micButtonInteractionUpdate:(CGPoint)value;
- (void)micButtonInteractionLocked;
- (void)micButtonInteractionRequestedLockedAction;
- (void)micButtonInteractionStopped;
- (bool)micButtonShouldLock;
- (id<TGModernConversationInputMicButtonPresentation>)micButtonPresenter;
@end
@interface TGModernConversationInputMicPallete : NSObject
@property (nonatomic, readonly) bool isDark;
@property (nonatomic, readonly) UIColor *buttonColor;
@property (nonatomic, readonly) UIColor *iconColor;
@property (nonatomic, readonly) UIColor *backgroundColor;
@property (nonatomic, readonly) UIColor *borderColor;
@property (nonatomic, readonly) UIColor *lockColor;
@property (nonatomic, readonly) UIColor *textColor;
@property (nonatomic, readonly) UIColor *secondaryTextColor;
@property (nonatomic, readonly) UIColor *recordingColor;
+ (instancetype)palleteWithDark:(bool)dark buttonColor:(UIColor *)buttonColor iconColor:(UIColor *)iconColor backgroundColor:(UIColor *)backgroundColor borderColor:(UIColor *)borderColor lockColor:(UIColor *)lockColor textColor:(UIColor *)textColor secondaryTextColor:(UIColor *)secondaryTextColor recordingColor:(UIColor *)recordingColor;
@end
@interface TGModernConversationInputMicButton : UIButton
@property (nonatomic, weak) id<TGModernConversationInputMicButtonDelegate> delegate;
@property (nonatomic, strong) TGModernConversationInputMicPallete *pallete;
@property (nonatomic) CGPoint centerOffset;
@property (nonatomic, strong) UIImage *icon;
@property (nonatomic, strong) UIImageView *iconView;
@property (nonatomic, assign) bool blocking;
@property (nonatomic, readonly) bool locked;
@property (nonatomic) bool fadeDisabled;
- (void)animateIn;
- (void)animateOut;
- (void)addMicLevel:(CGFloat)level;
- (void)dismiss;
- (void)updateOverlay;
- (void)_commitLocked;
@end