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
		
	
	
	
		
			Objective-C
		
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Objective-C
		
	
| //
 | |
| //  Copyright (c) 2018 Open Whisper Systems. All rights reserved.
 | |
| //
 | |
| 
 | |
| NS_ASSUME_NONNULL_BEGIN
 | |
| 
 | |
| extern const CGFloat kOWSMessageCellCornerRadius_Large;
 | |
| extern const CGFloat kOWSMessageCellCornerRadius_Small;
 | |
| 
 | |
| typedef NS_OPTIONS(NSUInteger, OWSDirectionalRectCorner) {
 | |
|     OWSDirectionalRectCornerTopLeading = 1 << 0,
 | |
|     OWSDirectionalRectCornerTopTrailing = 1 << 1,
 | |
|     OWSDirectionalRectCornerBottomLeading = 1 << 2,
 | |
|     OWSDirectionalRectCornerBottomTrailing = 1 << 3,
 | |
|     OWSDirectionalRectCornerAllCorners = ~0UL
 | |
| };
 | |
| 
 | |
| @class OWSBubbleView;
 | |
| 
 | |
| @protocol OWSBubbleViewPartner <NSObject>
 | |
| 
 | |
| - (void)updateLayers;
 | |
| 
 | |
| - (void)setBubbleView:(nullable OWSBubbleView *)bubbleView;
 | |
| 
 | |
| @end
 | |
| 
 | |
| #pragma mark -
 | |
| 
 | |
| @interface OWSBubbleView : UIView
 | |
| 
 | |
| + (UIBezierPath *)roundedBezierRectWithBubbleTop:(CGFloat)bubbleTop
 | |
|                                       bubbleLeft:(CGFloat)bubbleLeft
 | |
|                                     bubbleBottom:(CGFloat)bubbleBottom
 | |
|                                      bubbleRight:(CGFloat)bubbleRight
 | |
|                                sharpCornerRadius:(CGFloat)sharpCornerRadius
 | |
|                                 wideCornerRadius:(CGFloat)wideCornerRadius
 | |
|                                     sharpCorners:(OWSDirectionalRectCorner)sharpCorners;
 | |
| 
 | |
| @property (nonatomic, nullable) UIColor *bubbleColor;
 | |
| 
 | |
| @property (nonatomic) OWSDirectionalRectCorner sharpCorners;
 | |
| 
 | |
| - (UIBezierPath *)maskPath;
 | |
| 
 | |
| #pragma mark - Coordination
 | |
| 
 | |
| - (void)addPartnerView:(id<OWSBubbleViewPartner>)view;
 | |
| 
 | |
| - (void)clearPartnerViews;
 | |
| 
 | |
| - (void)updatePartnerViews;
 | |
| 
 | |
| - (CGFloat)minWidth;
 | |
| 
 | |
| - (CGFloat)minHeight;
 | |
| 
 | |
| @end
 | |
| 
 | |
| NS_ASSUME_NONNULL_END
 |