97 lines
2.1 KiB
Objective-C
97 lines
2.1 KiB
Objective-C
//
|
|
// Copyright (c) 2019 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class ConversationStyle;
|
|
@class OWSLinkPreviewDraft;
|
|
@class OWSQuotedReplyModel;
|
|
@class SignalAttachment;
|
|
@class StickerInfo;
|
|
|
|
@protocol ConversationInputToolbarDelegate <NSObject>
|
|
|
|
- (void)sendButtonPressed;
|
|
|
|
- (void)attachmentButtonPressed;
|
|
|
|
- (void)cameraButtonPressed;
|
|
|
|
- (void)sendSticker:(StickerInfo *)stickerInfo;
|
|
|
|
- (void)presentManageStickersView;
|
|
|
|
- (CGSize)rootViewSize;
|
|
|
|
#pragma mark - Voice Memo
|
|
|
|
- (void)voiceMemoGestureDidStart;
|
|
|
|
- (void)voiceMemoGestureDidLock;
|
|
|
|
- (void)voiceMemoGestureDidComplete;
|
|
|
|
- (void)voiceMemoGestureDidCancel;
|
|
|
|
- (void)voiceMemoGestureDidUpdateCancelWithRatioComplete:(CGFloat)cancelAlpha;
|
|
|
|
@end
|
|
|
|
#pragma mark -
|
|
|
|
@class ConversationInputTextView;
|
|
|
|
@protocol ConversationInputTextViewDelegate;
|
|
|
|
@interface ConversationInputToolbar : UIView
|
|
|
|
- (instancetype)initWithConversationStyle:(ConversationStyle *)conversationStyle NS_DESIGNATED_INITIALIZER;
|
|
- (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE;
|
|
- (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE;
|
|
|
|
@property (nonatomic, weak) id<ConversationInputToolbarDelegate> inputToolbarDelegate;
|
|
|
|
- (void)beginEditingMessage;
|
|
- (void)endEditingMessage;
|
|
- (BOOL)isInputViewFirstResponder;
|
|
|
|
- (void)setInputTextViewDelegate:(id<ConversationInputTextViewDelegate>)value;
|
|
|
|
- (NSString *)messageText;
|
|
- (void)setMessageText:(NSString *_Nullable)value animated:(BOOL)isAnimated;
|
|
- (void)clearTextMessageAnimated:(BOOL)isAnimated;
|
|
- (void)clearStickerKeyboard;
|
|
- (void)toggleDefaultKeyboard;
|
|
|
|
- (void)updateFontSizes;
|
|
|
|
- (void)updateLayoutWithSafeAreaInsets:(UIEdgeInsets)safeAreaInsets;
|
|
- (void)ensureTextViewHeight;
|
|
|
|
- (void)viewDidAppear;
|
|
|
|
- (void)ensureFirstResponderState;
|
|
|
|
#pragma mark - Voice Memo
|
|
|
|
- (void)lockVoiceMemoUI;
|
|
|
|
- (void)showVoiceMemoUI;
|
|
|
|
- (void)hideVoiceMemoUI:(BOOL)animated;
|
|
|
|
- (void)setVoiceMemoUICancelAlpha:(CGFloat)cancelAlpha;
|
|
|
|
- (void)cancelVoiceMemoIfNecessary;
|
|
|
|
#pragma mark -
|
|
|
|
@property (nonatomic, nullable) OWSQuotedReplyModel *quotedReply;
|
|
|
|
@property (nonatomic, nullable, readonly) OWSLinkPreviewDraft *linkPreviewDraft;
|
|
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|