mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
61 lines
1.6 KiB
C
61 lines
1.6 KiB
C
7 years ago
|
//
|
||
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||
|
//
|
||
|
|
||
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
||
7 years ago
|
extern const CGFloat kOWSMessageCellCornerRadius_Large;
|
||
|
extern const CGFloat kOWSMessageCellCornerRadius_Small;
|
||
7 years ago
|
|
||
7 years ago
|
typedef NS_OPTIONS(NSUInteger, OWSDirectionalRectCorner) {
|
||
|
OWSDirectionalRectCornerTopLeading = 1 << 0,
|
||
|
OWSDirectionalRectCornerTopTrailing = 1 << 1,
|
||
|
OWSDirectionalRectCornerBottomLeading = 1 << 2,
|
||
|
OWSDirectionalRectCornerBottomTrailing = 1 << 3,
|
||
|
OWSDirectionalRectCornerAllCorners = ~0UL
|
||
|
};
|
||
|
|
||
7 years ago
|
@class OWSBubbleView;
|
||
7 years ago
|
|
||
7 years ago
|
@protocol OWSBubbleViewPartner <NSObject>
|
||
|
|
||
|
- (void)updateLayers;
|
||
|
|
||
7 years ago
|
- (void)setBubbleView:(nullable OWSBubbleView *)bubbleView;
|
||
7 years ago
|
|
||
|
@end
|
||
7 years ago
|
|
||
7 years ago
|
#pragma mark -
|
||
|
|
||
|
@interface OWSBubbleView : UIView
|
||
7 years ago
|
|
||
7 years ago
|
+ (UIBezierPath *)roundedBezierRectWithBubbleTop:(CGFloat)bubbleTop
|
||
|
bubbleLeft:(CGFloat)bubbleLeft
|
||
|
bubbleBottom:(CGFloat)bubbleBottom
|
||
|
bubbleRight:(CGFloat)bubbleRight
|
||
|
sharpCornerRadius:(CGFloat)sharpCornerRadius
|
||
|
wideCornerRadius:(CGFloat)wideCornerRadius
|
||
7 years ago
|
sharpCorners:(OWSDirectionalRectCorner)sharpCorners;
|
||
7 years ago
|
|
||
7 years ago
|
@property (nonatomic, nullable) UIColor *bubbleColor;
|
||
|
|
||
7 years ago
|
@property (nonatomic) OWSDirectionalRectCorner sharpCorners;
|
||
7 years ago
|
|
||
7 years ago
|
- (UIBezierPath *)maskPath;
|
||
|
|
||
7 years ago
|
#pragma mark - Coordination
|
||
|
|
||
|
- (void)addPartnerView:(id<OWSBubbleViewPartner>)view;
|
||
|
|
||
|
- (void)clearPartnerViews;
|
||
|
|
||
|
- (void)updatePartnerViews;
|
||
|
|
||
7 years ago
|
- (CGFloat)minWidth;
|
||
7 years ago
|
|
||
7 years ago
|
- (CGFloat)minHeight;
|
||
|
|
||
7 years ago
|
@end
|
||
|
|
||
|
NS_ASSUME_NONNULL_END
|