From 879f241576c42e80579837dd1cc050949519e334 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Thu, 15 Jun 2023 16:47:12 +0900 Subject: [PATCH] Add back KnownType to handle non-partial leafs --- .../g_AcceptsFocusProperty_HandleInput.txt | 1 + ..._osu.Framework.Graphics.Drawable_HandleInput.txt | 1 + .../ISourceGeneratedHandleInputCache.txt | 9 +++++++++ .../CommonSources/ISourceGeneratedInputCache.txt | 8 -------- .../Generated/g_HandleMethod_HandleInput.txt | 1 + ...HandleNonPositionalInputProperty_HandleInput.txt | 1 + .../g_HandlePositionalInputProperty_HandleInput.txt | 1 + .../g_IHasContextMenuInterface_HandleInput.txt | 1 + .../g_IHasCustomTooltipInterface_HandleInput.txt | 1 + .../g_IHasPopoverInterface_HandleInput.txt | 1 + .../g_IHasTooltipInterface_HandleInput.txt | 1 + .../g_IKeyBindingHandlerInterface_HandleInput.txt | 1 + .../Generated/g_PartialClass_HandleInput.txt | 1 + .../Generated/g_OnClickMethod_HandleInput.txt | 1 + .../Generated/g_OnDoubleClickMethod_HandleInput.txt | 1 + .../Generated/g_OnDragEndMethod_HandleInput.txt | 1 + .../Generated/g_OnDragMethod_HandleInput.txt | 1 + .../Generated/g_OnDragStartMethod_HandleInput.txt | 1 + .../Generated/g_OnFocusLostMethod_HandleInput.txt | 1 + .../Generated/g_OnFocusMethod_HandleInput.txt | 1 + .../Generated/g_OnHoverLostMethod_HandleInput.txt | 1 + .../Generated/g_OnHoverMethod_HandleInput.txt | 1 + .../g_OnJoystickAxisMoveMethod_HandleInput.txt | 1 + .../g_OnJoystickPressMethod_HandleInput.txt | 1 + .../g_OnJoystickReleaseMethod_HandleInput.txt | 1 + .../Generated/g_OnKeyDownMethod_HandleInput.txt | 1 + .../Generated/g_OnKeyUpMethod_HandleInput.txt | 1 + .../Generated/g_OnMidiDownMethod_HandleInput.txt | 1 + .../Generated/g_OnMidiUpMethod_HandleInput.txt | 1 + .../Generated/g_OnMouseDownMethod_HandleInput.txt | 1 + .../Generated/g_OnMouseMoveMethod_HandleInput.txt | 1 + .../Generated/g_OnMouseUpMethod_HandleInput.txt | 1 + .../Generated/g_OnScrollMethod_HandleInput.txt | 1 + ...TabletAuxiliaryButtonPressMethod_HandleInput.txt | 1 + ...bletAuxiliaryButtonReleaseMethod_HandleInput.txt | 1 + .../g_OnTabletPenButtonPressMethod_HandleInput.txt | 1 + ...g_OnTabletPenButtonReleaseMethod_HandleInput.txt | 1 + .../Generated/g_OnTouchDownMethod_HandleInput.txt | 1 + .../Generated/g_OnTouchMoveMethod_HandleInput.txt | 1 + .../Generated/g_OnTouchUpMethod_HandleInput.txt | 1 + .../HandleInput/HandleInputSourceEmitter.cs | 13 +++++++++++++ osu.Framework/Graphics/Drawable_HandleInputCache.cs | 4 ++-- .../Input/ISourceGeneratedHandleInputCache.cs | 7 +++++-- 43 files changed, 67 insertions(+), 12 deletions(-) create mode 100644 osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonSources/ISourceGeneratedHandleInputCache.txt delete mode 100644 osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonSources/ISourceGeneratedInputCache.txt diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/AcceptsFocusProperty/Generated/g_AcceptsFocusProperty_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/AcceptsFocusProperty/Generated/g_AcceptsFocusProperty_HandleInput.txt index df3341d53..0e2e16b27 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/AcceptsFocusProperty/Generated/g_AcceptsFocusProperty_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/AcceptsFocusProperty/Generated/g_AcceptsFocusProperty_HandleInput.txt @@ -4,5 +4,6 @@ partial class AcceptsFocusProperty : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::AcceptsFocusProperty); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonGenerated/g_osu.Framework.Graphics.Drawable_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonGenerated/g_osu.Framework.Graphics.Drawable_HandleInput.txt index d07a96175..5d641826e 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonGenerated/g_osu.Framework.Graphics.Drawable_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonGenerated/g_osu.Framework.Graphics.Drawable_HandleInput.txt @@ -6,6 +6,7 @@ namespace osu.Framework.Graphics { partial class Drawable : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::osu.Framework.Graphics.Drawable); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => false; bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => false; } diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonSources/ISourceGeneratedHandleInputCache.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonSources/ISourceGeneratedHandleInputCache.txt new file mode 100644 index 000000000..c6510b27c --- /dev/null +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonSources/ISourceGeneratedHandleInputCache.txt @@ -0,0 +1,9 @@ +namespace osu.Framework.Input +{ + public interface ISourceGeneratedHandleInputCache + { + protected internal System.Type KnownType => typeof(object); + protected internal bool RequestsPositionalInput => false; + protected internal bool RequestsNonPositionalInput => false; + } +} \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonSources/ISourceGeneratedInputCache.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonSources/ISourceGeneratedInputCache.txt deleted file mode 100644 index 1be0461f0..000000000 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/CommonSources/ISourceGeneratedInputCache.txt +++ /dev/null @@ -1,8 +0,0 @@ -namespace osu.Framework.Input -{ - public interface ISourceGeneratedHandleInputCache - { - protected internal bool RequestsPositionalInput { get; } - protected internal bool RequestsNonPositionalInput { get; } - } -} \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleMethod/Generated/g_HandleMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleMethod/Generated/g_HandleMethod_HandleInput.txt index 12ffcd2ad..9a867cecf 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleMethod/Generated/g_HandleMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleMethod/Generated/g_HandleMethod_HandleInput.txt @@ -4,6 +4,7 @@ partial class HandleMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::HandleMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleNonPositionalInputProperty/Generated/g_HandleNonPositionalInputProperty_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleNonPositionalInputProperty/Generated/g_HandleNonPositionalInputProperty_HandleInput.txt index 4581b1ea0..2fec5a4f6 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleNonPositionalInputProperty/Generated/g_HandleNonPositionalInputProperty_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandleNonPositionalInputProperty/Generated/g_HandleNonPositionalInputProperty_HandleInput.txt @@ -4,5 +4,6 @@ partial class HandleNonPositionalInputProperty : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::HandleNonPositionalInputProperty); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandlePositionalInputProperty/Generated/g_HandlePositionalInputProperty_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandlePositionalInputProperty/Generated/g_HandlePositionalInputProperty_HandleInput.txt index 6d69f29bf..e6140fbf9 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandlePositionalInputProperty/Generated/g_HandlePositionalInputProperty_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/HandlePositionalInputProperty/Generated/g_HandlePositionalInputProperty_HandleInput.txt @@ -4,5 +4,6 @@ partial class HandlePositionalInputProperty : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::HandlePositionalInputProperty); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasContextMenuInterface/Generated/g_IHasContextMenuInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasContextMenuInterface/Generated/g_IHasContextMenuInterface_HandleInput.txt index 76b305235..b34773253 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasContextMenuInterface/Generated/g_IHasContextMenuInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasContextMenuInterface/Generated/g_IHasContextMenuInterface_HandleInput.txt @@ -4,5 +4,6 @@ partial class IHasContextMenuInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IHasContextMenuInterface); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasCustomTooltipInterface/Generated/g_IHasCustomTooltipInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasCustomTooltipInterface/Generated/g_IHasCustomTooltipInterface_HandleInput.txt index 605d9049d..d312abdc0 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasCustomTooltipInterface/Generated/g_IHasCustomTooltipInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasCustomTooltipInterface/Generated/g_IHasCustomTooltipInterface_HandleInput.txt @@ -4,5 +4,6 @@ partial class IHasCustomTooltipInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IHasCustomTooltipInterface); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasPopoverInterface/Generated/g_IHasPopoverInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasPopoverInterface/Generated/g_IHasPopoverInterface_HandleInput.txt index 15284ad24..f529f436d 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasPopoverInterface/Generated/g_IHasPopoverInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasPopoverInterface/Generated/g_IHasPopoverInterface_HandleInput.txt @@ -4,5 +4,6 @@ partial class IHasPopoverInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IHasPopoverInterface); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasTooltipInterface/Generated/g_IHasTooltipInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasTooltipInterface/Generated/g_IHasTooltipInterface_HandleInput.txt index a1844b23c..452c05959 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasTooltipInterface/Generated/g_IHasTooltipInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IHasTooltipInterface/Generated/g_IHasTooltipInterface_HandleInput.txt @@ -4,5 +4,6 @@ partial class IHasTooltipInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IHasTooltipInterface); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IKeyBindingHandlerInterface/Generated/g_IKeyBindingHandlerInterface_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IKeyBindingHandlerInterface/Generated/g_IKeyBindingHandlerInterface_HandleInput.txt index 57069bc32..72c5d7de7 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IKeyBindingHandlerInterface/Generated/g_IKeyBindingHandlerInterface_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IKeyBindingHandlerInterface/Generated/g_IKeyBindingHandlerInterface_HandleInput.txt @@ -4,5 +4,6 @@ partial class IKeyBindingHandlerInterface : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::IKeyBindingHandlerInterface); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IntermediateNonPartial/Generated/g_PartialClass_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IntermediateNonPartial/Generated/g_PartialClass_HandleInput.txt index 405bda484..dab954aec 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IntermediateNonPartial/Generated/g_PartialClass_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/IntermediateNonPartial/Generated/g_PartialClass_HandleInput.txt @@ -4,6 +4,7 @@ partial class PartialClass : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::PartialClass); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnClickMethod/Generated/g_OnClickMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnClickMethod/Generated/g_OnClickMethod_HandleInput.txt index a5b3cd701..3ffb370ae 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnClickMethod/Generated/g_OnClickMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnClickMethod/Generated/g_OnClickMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnClickMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnClickMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDoubleClickMethod/Generated/g_OnDoubleClickMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDoubleClickMethod/Generated/g_OnDoubleClickMethod_HandleInput.txt index 7869edfa1..cd9602e9a 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDoubleClickMethod/Generated/g_OnDoubleClickMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDoubleClickMethod/Generated/g_OnDoubleClickMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnDoubleClickMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnDoubleClickMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragEndMethod/Generated/g_OnDragEndMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragEndMethod/Generated/g_OnDragEndMethod_HandleInput.txt index e8d69f033..c5ec73547 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragEndMethod/Generated/g_OnDragEndMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragEndMethod/Generated/g_OnDragEndMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnDragEndMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnDragEndMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragMethod/Generated/g_OnDragMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragMethod/Generated/g_OnDragMethod_HandleInput.txt index c99855ac2..0215339f9 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragMethod/Generated/g_OnDragMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragMethod/Generated/g_OnDragMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnDragMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnDragMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragStartMethod/Generated/g_OnDragStartMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragStartMethod/Generated/g_OnDragStartMethod_HandleInput.txt index 561d23e58..cc10baafc 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragStartMethod/Generated/g_OnDragStartMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnDragStartMethod/Generated/g_OnDragStartMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnDragStartMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnDragStartMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusLostMethod/Generated/g_OnFocusLostMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusLostMethod/Generated/g_OnFocusLostMethod_HandleInput.txt index b9c88ded1..4aa301a6d 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusLostMethod/Generated/g_OnFocusLostMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusLostMethod/Generated/g_OnFocusLostMethod_HandleInput.txt @@ -4,6 +4,7 @@ partial class OnFocusLostMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnFocusLostMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusMethod/Generated/g_OnFocusMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusMethod/Generated/g_OnFocusMethod_HandleInput.txt index 7a11a6019..8e48c314f 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusMethod/Generated/g_OnFocusMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnFocusMethod/Generated/g_OnFocusMethod_HandleInput.txt @@ -4,6 +4,7 @@ partial class OnFocusMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnFocusMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverLostMethod/Generated/g_OnHoverLostMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverLostMethod/Generated/g_OnHoverLostMethod_HandleInput.txt index 65169f4dc..bbbe7585c 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverLostMethod/Generated/g_OnHoverLostMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverLostMethod/Generated/g_OnHoverLostMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnHoverLostMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnHoverLostMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverMethod/Generated/g_OnHoverMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverMethod/Generated/g_OnHoverMethod_HandleInput.txt index 9cb1ede81..7dc5351d6 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverMethod/Generated/g_OnHoverMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnHoverMethod/Generated/g_OnHoverMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnHoverMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnHoverMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickAxisMoveMethod/Generated/g_OnJoystickAxisMoveMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickAxisMoveMethod/Generated/g_OnJoystickAxisMoveMethod_HandleInput.txt index b80e91a8a..b3251e113 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickAxisMoveMethod/Generated/g_OnJoystickAxisMoveMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickAxisMoveMethod/Generated/g_OnJoystickAxisMoveMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnJoystickAxisMoveMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnJoystickAxisMoveMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickPressMethod/Generated/g_OnJoystickPressMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickPressMethod/Generated/g_OnJoystickPressMethod_HandleInput.txt index a6e65d749..be8a54303 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickPressMethod/Generated/g_OnJoystickPressMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickPressMethod/Generated/g_OnJoystickPressMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnJoystickPressMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnJoystickPressMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickReleaseMethod/Generated/g_OnJoystickReleaseMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickReleaseMethod/Generated/g_OnJoystickReleaseMethod_HandleInput.txt index b0aa628ee..82767a3d4 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickReleaseMethod/Generated/g_OnJoystickReleaseMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnJoystickReleaseMethod/Generated/g_OnJoystickReleaseMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnJoystickReleaseMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnJoystickReleaseMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyDownMethod/Generated/g_OnKeyDownMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyDownMethod/Generated/g_OnKeyDownMethod_HandleInput.txt index eb19a68ca..ab892cc0a 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyDownMethod/Generated/g_OnKeyDownMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyDownMethod/Generated/g_OnKeyDownMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnKeyDownMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnKeyDownMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyUpMethod/Generated/g_OnKeyUpMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyUpMethod/Generated/g_OnKeyUpMethod_HandleInput.txt index f8a9780e9..c59b62cbe 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyUpMethod/Generated/g_OnKeyUpMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnKeyUpMethod/Generated/g_OnKeyUpMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnKeyUpMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnKeyUpMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiDownMethod/Generated/g_OnMidiDownMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiDownMethod/Generated/g_OnMidiDownMethod_HandleInput.txt index 63317f373..1d891b2c0 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiDownMethod/Generated/g_OnMidiDownMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiDownMethod/Generated/g_OnMidiDownMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnMidiDownMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMidiDownMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiUpMethod/Generated/g_OnMidiUpMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiUpMethod/Generated/g_OnMidiUpMethod_HandleInput.txt index cb3f76752..e03a548ca 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiUpMethod/Generated/g_OnMidiUpMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMidiUpMethod/Generated/g_OnMidiUpMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnMidiUpMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMidiUpMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseDownMethod/Generated/g_OnMouseDownMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseDownMethod/Generated/g_OnMouseDownMethod_HandleInput.txt index ed949899a..01a8f10e4 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseDownMethod/Generated/g_OnMouseDownMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseDownMethod/Generated/g_OnMouseDownMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnMouseDownMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMouseDownMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseMoveMethod/Generated/g_OnMouseMoveMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseMoveMethod/Generated/g_OnMouseMoveMethod_HandleInput.txt index 4a69cebca..0c0c5984f 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseMoveMethod/Generated/g_OnMouseMoveMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseMoveMethod/Generated/g_OnMouseMoveMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnMouseMoveMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMouseMoveMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseUpMethod/Generated/g_OnMouseUpMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseUpMethod/Generated/g_OnMouseUpMethod_HandleInput.txt index 51226faf3..aa3c2e7a0 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseUpMethod/Generated/g_OnMouseUpMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnMouseUpMethod/Generated/g_OnMouseUpMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnMouseUpMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnMouseUpMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnScrollMethod/Generated/g_OnScrollMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnScrollMethod/Generated/g_OnScrollMethod_HandleInput.txt index 3eac86c4f..d32f8ebf5 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnScrollMethod/Generated/g_OnScrollMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnScrollMethod/Generated/g_OnScrollMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnScrollMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnScrollMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonPressMethod/Generated/g_OnTabletAuxiliaryButtonPressMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonPressMethod/Generated/g_OnTabletAuxiliaryButtonPressMethod_HandleInput.txt index 93683a4f3..fc01beb60 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonPressMethod/Generated/g_OnTabletAuxiliaryButtonPressMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonPressMethod/Generated/g_OnTabletAuxiliaryButtonPressMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnTabletAuxiliaryButtonPressMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTabletAuxiliaryButtonPressMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonReleaseMethod/Generated/g_OnTabletAuxiliaryButtonReleaseMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonReleaseMethod/Generated/g_OnTabletAuxiliaryButtonReleaseMethod_HandleInput.txt index e2f7cd0cd..6844d6195 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonReleaseMethod/Generated/g_OnTabletAuxiliaryButtonReleaseMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletAuxiliaryButtonReleaseMethod/Generated/g_OnTabletAuxiliaryButtonReleaseMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnTabletAuxiliaryButtonReleaseMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTabletAuxiliaryButtonReleaseMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsNonPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonPressMethod/Generated/g_OnTabletPenButtonPressMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonPressMethod/Generated/g_OnTabletPenButtonPressMethod_HandleInput.txt index a38d70894..84c24b4c1 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonPressMethod/Generated/g_OnTabletPenButtonPressMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonPressMethod/Generated/g_OnTabletPenButtonPressMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnTabletPenButtonPressMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTabletPenButtonPressMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonReleaseMethod/Generated/g_OnTabletPenButtonReleaseMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonReleaseMethod/Generated/g_OnTabletPenButtonReleaseMethod_HandleInput.txt index 2a0816527..27e232ed8 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonReleaseMethod/Generated/g_OnTabletPenButtonReleaseMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTabletPenButtonReleaseMethod/Generated/g_OnTabletPenButtonReleaseMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnTabletPenButtonReleaseMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTabletPenButtonReleaseMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchDownMethod/Generated/g_OnTouchDownMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchDownMethod/Generated/g_OnTouchDownMethod_HandleInput.txt index 7ee0e407e..208a411a9 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchDownMethod/Generated/g_OnTouchDownMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchDownMethod/Generated/g_OnTouchDownMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnTouchDownMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTouchDownMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchMoveMethod/Generated/g_OnTouchMoveMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchMoveMethod/Generated/g_OnTouchMoveMethod_HandleInput.txt index e0e659427..eab84c556 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchMoveMethod/Generated/g_OnTouchMoveMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchMoveMethod/Generated/g_OnTouchMoveMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnTouchMoveMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTouchMoveMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchUpMethod/Generated/g_OnTouchUpMethod_HandleInput.txt b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchUpMethod/Generated/g_OnTouchUpMethod_HandleInput.txt index 22726552c..d2317c800 100644 --- a/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchUpMethod/Generated/g_OnTouchUpMethod_HandleInput.txt +++ b/osu.Framework.SourceGeneration.Tests/Resources/HandleInput/OnTouchUpMethod/Generated/g_OnTouchUpMethod_HandleInput.txt @@ -4,5 +4,6 @@ partial class OnTouchUpMethod : global::osu.Framework.Input.ISourceGeneratedHandleInputCache { + global::System.Type global::osu.Framework.Input.ISourceGeneratedHandleInputCache.KnownType => typeof(global::OnTouchUpMethod); bool global::osu.Framework.Input.ISourceGeneratedHandleInputCache.RequestsPositionalInput => true; } \ No newline at end of file diff --git a/osu.Framework.SourceGeneration/Generators/HandleInput/HandleInputSourceEmitter.cs b/osu.Framework.SourceGeneration/Generators/HandleInput/HandleInputSourceEmitter.cs index 368b54981..8095d21a5 100644 --- a/osu.Framework.SourceGeneration/Generators/HandleInput/HandleInputSourceEmitter.cs +++ b/osu.Framework.SourceGeneration/Generators/HandleInput/HandleInputSourceEmitter.cs @@ -36,6 +36,19 @@ namespace osu.Framework.SourceGeneration.Generators.HandleInput // Drawable is the base type which always needs to have the members defined. bool isDrawable = Target.FullyQualifiedTypeName == "osu.Framework.Graphics.Drawable"; + yield return SyntaxFactory.PropertyDeclaration( + SyntaxFactory.ParseTypeName("global::System.Type"), + SyntaxFactory.Identifier("KnownType")) + .WithExplicitInterfaceSpecifier( + SyntaxFactory.ExplicitInterfaceSpecifier( + SyntaxFactory.IdentifierName(interface_name))) + .WithExpressionBody( + SyntaxFactory.ArrowExpressionClause( + SyntaxFactory.TypeOfExpression( + SyntaxFactory.ParseTypeName(Target.GlobalPrefixedTypeName)))) + .WithSemicolonToken( + SyntaxFactory.Token(SyntaxKind.SemicolonToken)); + if (Target.RequestsPositionalInput || isDrawable) yield return createInputMember("RequestsPositionalInput", Target.RequestsPositionalInput); diff --git a/osu.Framework/Graphics/Drawable_HandleInputCache.cs b/osu.Framework/Graphics/Drawable_HandleInputCache.cs index 19414007c..4c849d781 100644 --- a/osu.Framework/Graphics/Drawable_HandleInputCache.cs +++ b/osu.Framework/Graphics/Drawable_HandleInputCache.cs @@ -86,7 +86,7 @@ namespace osu.Framework.Graphics public static bool RequestsPositionalInput(Drawable drawable) { - if (drawable is ISourceGeneratedHandleInputCache sgInput) + if (drawable is ISourceGeneratedHandleInputCache sgInput && sgInput.KnownType == drawable.GetType()) return sgInput.RequestsPositionalInput; return getViaReflection(drawable, positional_cached_values, true); @@ -94,7 +94,7 @@ namespace osu.Framework.Graphics public static bool RequestsNonPositionalInput(Drawable drawable) { - if (drawable is ISourceGeneratedHandleInputCache sgInput) + if (drawable is ISourceGeneratedHandleInputCache sgInput && sgInput.KnownType == drawable.GetType()) return sgInput.RequestsNonPositionalInput; return getViaReflection(drawable, non_positional_cached_values, false); diff --git a/osu.Framework/Input/ISourceGeneratedHandleInputCache.cs b/osu.Framework/Input/ISourceGeneratedHandleInputCache.cs index 2b497071b..093d1a5cc 100644 --- a/osu.Framework/Input/ISourceGeneratedHandleInputCache.cs +++ b/osu.Framework/Input/ISourceGeneratedHandleInputCache.cs @@ -1,11 +1,14 @@ // Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. +using System; + namespace osu.Framework.Input { public interface ISourceGeneratedHandleInputCache { - protected internal bool RequestsPositionalInput { get; } - protected internal bool RequestsNonPositionalInput { get; } + protected internal Type KnownType => typeof(object); + protected internal bool RequestsPositionalInput => false; + protected internal bool RequestsNonPositionalInput => false; } }