mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
1d95cd6977
// FREEBIE
54 lines
1.6 KiB
Objective-C
54 lines
1.6 KiB
Objective-C
//
|
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import <SignalMessaging/OWSViewController.h>
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@class ConversationViewItem;
|
|
@class GalleryItemBox;
|
|
@class MediaDetailViewController;
|
|
|
|
typedef NS_OPTIONS(NSInteger, MediaGalleryOption) {
|
|
MediaGalleryOptionSliderEnabled = 1 << 0,
|
|
MediaGalleryOptionShowAllMediaButton = 1 << 1
|
|
};
|
|
|
|
@protocol MediaDetailViewControllerDelegate <NSObject>
|
|
|
|
- (void)mediaDetailViewController:(MediaDetailViewController *)mediaDetailViewController
|
|
requestDeleteConversationViewItem:(ConversationViewItem *)conversationViewItem;
|
|
|
|
- (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:(ConversationViewItem *_Nullable)viewItem;
|
|
#pragma mark - Actions
|
|
|
|
- (void)didPressShare:(id)sender;
|
|
- (void)didPressDelete:(id)sender;
|
|
- (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
|