Files
VoidLink/VoidLink/ViewControllers/StreamFrameViewController.h
T
2026-07-28 17:56:12 +08:00

68 lines
2.7 KiB
Objective-C

//
// StreamFrameViewController.h
// Moonlight
//
// Created by Diego Waxemberg on 1/18/14.
// Copyright (c) 2015 Moonlight Stream. All rights reserved.
//
// Modified by True砖家 since 2024.6.26
// Copyright © 2024 True砖家 @ Bilibili. All rights reserved.
//
#import "Connection.h"
#import "FloatBuffer.h"
#import "ImGuiRenderer.h"
#import "MetalViewController.h"
#import "StreamConfiguration.h"
#import "StreamView.h"
#import "MainFrameViewController.h"
#import "StreamManager.h"
#import <AVKit/AVKit.h>
#import <UIKit/UIKit.h>
@class LayoutOnScreenControlsViewController;
#if TARGET_OS_TV
@import GameController;
@interface StreamFrameViewController : GCEventViewController <ConnectionCallbacks, ControllerSupportDelegate, UserInteractionDelegate, UIScrollViewDelegate, AVPictureInPictureControllerDelegate>
#else
@interface StreamFrameViewController : UIViewController <ConnectionCallbacks, ControllerSupportDelegate, UserInteractionDelegate, UIScrollViewDelegate, AVPictureInPictureControllerDelegate>
#endif
@property (nonatomic, strong) StreamManager* streamMan;
@property (nonatomic) StreamConfiguration* streamConfig;
@property (nonatomic, strong) AVPictureInPictureController *pipController API_AVAILABLE(ios(9.0));
@property (nonatomic, strong) AVPictureInPictureControllerContentSource *pipContentSource API_AVAILABLE(ios(15.0)); // Needed for iOS 15+ layer-based PiP
@property (nonatomic, weak) MainFrameViewController *mainFrameViewcontroller;
@property (nonatomic, assign) bool micStreamInitialized;
@property (nonatomic, assign) bool viewJustLoaded;
@property (nonatomic, strong) MetalViewController *metalViewController;
@property (nonatomic, strong) ImGuiRenderer *imguiView;
@property (nonatomic, strong) UIView* virtualGamepadOverlay;
@property (nonatomic, strong) UIScrollView* scrollView;
@property (nonatomic, assign) CGPoint streamViewMagnifierContentOffset;
@property (nonatomic, assign) CGFloat streamViewMagnifierZoomScale;
+ (StreamFrameViewController *)sharedInstance;
- (void)updatePreferredDisplayMode:(BOOL)streamActive;
- (void)setUserInteractionEnabledForStreamView:(bool)enabled;
- (bool)shallDisableGyroHotSwitch;
- (void)loadGameProfileConfigs:(OSCProfile* )profile;
- (void)openWidgetProfileTableWithPickProfile:(BOOL)pickProfile;
- (void)toggleGamepadOverlayWithOverlayEnabled:(BOOL)overlayEnabled API_AVAILABLE(ios(13.0));
- (void)loadAbstractGamepadOverlayIfNeeded API_AVAILABLE(ios(13.0));
- (void)restorePersistedStreamViewOffsetAndScaleWithProfile:(OSCProfile* )profile;
- (void)updateMagnifierViewportMetrics;
- (void)setMagnifierViewportInteractionEnabled:(BOOL)enabled;
- (void)resetMagnifierStreamViewWithAnimated:(BOOL)animated;
- (void)returnToMainFrame;
- (void)bringUpToolboxMenu;
@end