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.
		
		
		
		
		
			
		
			
				
	
	
		
			55 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Objective-C
		
	
			
		
		
	
	
			55 lines
		
	
	
		
			1.6 KiB
		
	
	
	
		
			Objective-C
		
	
| //
 | |
| //  Copyright (c) 2019 Open Whisper Systems. All rights reserved.
 | |
| //
 | |
| 
 | |
| #import <SignalUtilitiesKit/OWSViewController.h>
 | |
| 
 | |
| NS_ASSUME_NONNULL_BEGIN
 | |
| 
 | |
| @protocol ConversationViewItem;
 | |
| 
 | |
| @class GalleryItemBox;
 | |
| @class MediaDetailViewController;
 | |
| @class TSAttachment;
 | |
| 
 | |
| typedef NS_OPTIONS(NSInteger, MediaGalleryOption) {
 | |
|     MediaGalleryOptionSliderEnabled = 1 << 0,
 | |
|     MediaGalleryOptionShowAllMediaButton = 1 << 1
 | |
| };
 | |
| 
 | |
| @protocol MediaDetailViewControllerDelegate <NSObject>
 | |
| 
 | |
| - (void)mediaDetailViewController:(MediaDetailViewController *)mediaDetailViewController
 | |
|           requestDeleteAttachment:(TSAttachment *)attachment;
 | |
| 
 | |
| - (void)mediaDetailViewController:(MediaDetailViewController *)mediaDetailViewController
 | |
|                    isPlayingVideo:(BOOL)isPlayingVideo;
 | |
| 
 | |
| - (void)mediaDetailViewControllerDidTapMedia:(MediaDetailViewController *)mediaDetailViewController;
 | |
| 
 | |
| @end
 | |
| 
 | |
| @interface MediaDetailViewController : OWSViewController
 | |
| 
 | |
| @property (nonatomic, weak) id<MediaDetailViewControllerDelegate> delegate;
 | |
| @property (nonatomic, readonly) GalleryItemBox *galleryItemBox;
 | |
| 
 | |
| // If viewItem is non-null, long press will show a menu controller.
 | |
| - (instancetype)initWithGalleryItemBox:(GalleryItemBox *)galleryItemBox
 | |
|                               viewItem:(nullable id<ConversationViewItem>)viewItem;
 | |
| #pragma mark - Actions
 | |
| 
 | |
| - (void)didPressPlayBarButton:(id)sender;
 | |
| - (void)didPressPauseBarButton:(id)sender;
 | |
| - (void)playVideo;
 | |
| 
 | |
| // Stops playback and rewinds
 | |
| - (void)stopAnyVideo;
 | |
| 
 | |
| - (void)setShouldHideToolbars:(BOOL)shouldHideToolbars;
 | |
| - (void)zoomOutAnimated:(BOOL)isAnimated;
 | |
| 
 | |
| @end
 | |
| 
 | |
| NS_ASSUME_NONNULL_END
 |