From 63beaebe55259dc9fad50e93c773bc40e74426ce Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 1 Nov 2020 10:30:39 -0600 Subject: [PATCH] Stub AbsoluteTouchHandler --- Limelight/Input/AbsoluteTouchHandler.h | 19 +++++++++++++++ Limelight/Input/AbsoluteTouchHandler.m | 33 ++++++++++++++++++++++++++ Limelight/Input/RelativeTouchHandler.h | 4 ++-- Limelight/Input/RelativeTouchHandler.m | 2 +- Limelight/Input/StreamView.h | 4 ++++ Moonlight.xcodeproj/project.pbxproj | 6 +++++ 6 files changed, 65 insertions(+), 3 deletions(-) create mode 100644 Limelight/Input/AbsoluteTouchHandler.h create mode 100644 Limelight/Input/AbsoluteTouchHandler.m diff --git a/Limelight/Input/AbsoluteTouchHandler.h b/Limelight/Input/AbsoluteTouchHandler.h new file mode 100644 index 0000000..cbdb455 --- /dev/null +++ b/Limelight/Input/AbsoluteTouchHandler.h @@ -0,0 +1,19 @@ +// +// AbsoluteTouchHandler.h +// Moonlight +// +// Created by Cameron Gutman on 11/1/20. +// Copyright © 2020 Moonlight Game Streaming Project. All rights reserved. +// + +#import "StreamView.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface AbsoluteTouchHandler : UIResponder + +-(id)initWithView:(StreamView*)view; + +@end + +NS_ASSUME_NONNULL_END diff --git a/Limelight/Input/AbsoluteTouchHandler.m b/Limelight/Input/AbsoluteTouchHandler.m new file mode 100644 index 0000000..a2735a8 --- /dev/null +++ b/Limelight/Input/AbsoluteTouchHandler.m @@ -0,0 +1,33 @@ +// +// AbsoluteTouchHandler.m +// Moonlight +// +// Created by Cameron Gutman on 11/1/20. +// Copyright © 2020 Moonlight Game Streaming Project. All rights reserved. +// + +#import "AbsoluteTouchHandler.h" + +@implementation AbsoluteTouchHandler { + StreamView* view; +} + +- (id)initWithView:(StreamView*)view { + self = [self init]; + self->view = view; + return self; +} + +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { +} + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { +} + +- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { +} + +- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event { +} + +@end diff --git a/Limelight/Input/RelativeTouchHandler.h b/Limelight/Input/RelativeTouchHandler.h index 545cb3f..2f8d9db 100644 --- a/Limelight/Input/RelativeTouchHandler.h +++ b/Limelight/Input/RelativeTouchHandler.h @@ -6,13 +6,13 @@ // Copyright © 2020 Moonlight Game Streaming Project. All rights reserved. // -#import +#import "StreamView.h" NS_ASSUME_NONNULL_BEGIN @interface RelativeTouchHandler : UIResponder --(id)initWithView:(UIView*)view; +-(id)initWithView:(StreamView*)view; @end diff --git a/Limelight/Input/RelativeTouchHandler.m b/Limelight/Input/RelativeTouchHandler.m index 2b0576c..7ac4ab8 100644 --- a/Limelight/Input/RelativeTouchHandler.m +++ b/Limelight/Input/RelativeTouchHandler.m @@ -27,7 +27,7 @@ static const int REFERENCE_HEIGHT = 720; UIView* view; } -- (id)initWithView:(UIView*)view { +- (id)initWithView:(StreamView*)view { self = [self init]; self->view = view; diff --git a/Limelight/Input/StreamView.h b/Limelight/Input/StreamView.h index 60b4a03..426d50a 100644 --- a/Limelight/Input/StreamView.h +++ b/Limelight/Input/StreamView.h @@ -39,4 +39,8 @@ - (void) showOnScreenControls; - (OnScreenControlsLevel) getCurrentOscState; +#if !TARGET_OS_TV +- (void) updateCursorLocation:(CGPoint)location; +#endif + @end diff --git a/Moonlight.xcodeproj/project.pbxproj b/Moonlight.xcodeproj/project.pbxproj index 2ea93ce..5b960c6 100644 --- a/Moonlight.xcodeproj/project.pbxproj +++ b/Moonlight.xcodeproj/project.pbxproj @@ -10,6 +10,7 @@ 693B3A9B218638CD00982F7B /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 693B3A9A218638CD00982F7B /* Settings.bundle */; }; 9819CC14254F107A008A7C8E /* RelativeTouchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9819CC13254F107A008A7C8E /* RelativeTouchHandler.m */; }; 9819CC1D254F1730008A7C8E /* RelativeTouchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9819CC13254F107A008A7C8E /* RelativeTouchHandler.m */; }; + 9819CC22254F180F008A7C8E /* AbsoluteTouchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9819CC21254F180F008A7C8E /* AbsoluteTouchHandler.m */; }; 9827E7A32514366900F25707 /* HapticContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 9827E7A22514366900F25707 /* HapticContext.m */; }; 9827E7A42514366900F25707 /* HapticContext.m in Sources */ = {isa = PBXBuildFile; fileRef = 9827E7A22514366900F25707 /* HapticContext.m */; }; 9832D1361BBCD5C50036EF48 /* TemporaryApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9832D1351BBCD5C50036EF48 /* TemporaryApp.m */; }; @@ -163,6 +164,8 @@ 98132E8C20BC9A62007A053F /* Moonlight v1.1.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "Moonlight v1.1.xcdatamodel"; sourceTree = ""; }; 9819CC12254F107A008A7C8E /* RelativeTouchHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RelativeTouchHandler.h; sourceTree = ""; }; 9819CC13254F107A008A7C8E /* RelativeTouchHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = RelativeTouchHandler.m; sourceTree = ""; }; + 9819CC20254F180F008A7C8E /* AbsoluteTouchHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AbsoluteTouchHandler.h; sourceTree = ""; }; + 9819CC21254F180F008A7C8E /* AbsoluteTouchHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AbsoluteTouchHandler.m; sourceTree = ""; }; 9827E7A22514366900F25707 /* HapticContext.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HapticContext.m; sourceTree = ""; }; 9827E7A7251436EA00F25707 /* HapticContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HapticContext.h; sourceTree = ""; }; 9832D1341BBCD5C50036EF48 /* TemporaryApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TemporaryApp.h; path = Database/TemporaryApp.h; sourceTree = ""; }; @@ -545,6 +548,8 @@ 9827E7A7251436EA00F25707 /* HapticContext.h */, 9819CC12254F107A008A7C8E /* RelativeTouchHandler.h */, 9819CC13254F107A008A7C8E /* RelativeTouchHandler.m */, + 9819CC20254F180F008A7C8E /* AbsoluteTouchHandler.h */, + 9819CC21254F180F008A7C8E /* AbsoluteTouchHandler.m */, ); path = Input; sourceTree = ""; @@ -1010,6 +1015,7 @@ buildActionMask = 2147483647; files = ( FB290D0719B2C406004C83CF /* Limelight.xcdatamodeld in Sources */, + 9819CC22254F180F008A7C8E /* AbsoluteTouchHandler.m in Sources */, 9819CC14254F107A008A7C8E /* RelativeTouchHandler.m in Sources */, FB1A674D2131E65900507771 /* KeyboardSupport.m in Sources */, FB89463219F646E200339C8A /* VideoDecoderRenderer.m in Sources */,