Revert "holy fuck this fixes it in the most ridiculous way possible"
This reverts commit 4475bdf86f
.
I want to leave MouseButtonState declared in ControlCore
This commit is contained in:
parent
4475bdf86f
commit
5af0255cf1
|
@ -90,8 +90,8 @@
|
|||
<Reference Include="Microsoft.Terminal.Core">
|
||||
<HintPath>$(OpenConsoleCommonOutDir)TerminalCore\Microsoft.Terminal.Core.winmd</HintPath>
|
||||
<IsWinMDFile>true</IsWinMDFile>
|
||||
<Private>true</Private>
|
||||
<CopyLocalSatelliteAssemblies>true</CopyLocalSatelliteAssemblies>
|
||||
<Private>false</Private>
|
||||
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Terminal.TerminalConnection">
|
||||
<HintPath>$(OpenConsoleCommonOutDir)TerminalConnection\Microsoft.Terminal.TerminalConnection.winmd</HintPath>
|
||||
|
|
|
@ -8,6 +8,16 @@ import "EventArgs.idl";
|
|||
namespace Microsoft.Terminal.Control
|
||||
{
|
||||
|
||||
// This is a mirror of
|
||||
// ::Microsoft::Console::VirtualTerminal::TerminalInput::MouseButtonState,
|
||||
// but projectable.
|
||||
struct MouseButtonState
|
||||
{
|
||||
Boolean IsLeftButtonDown;
|
||||
Boolean IsMiddleButtonDown;
|
||||
Boolean IsRightButtonDown;
|
||||
};
|
||||
|
||||
[default_interface] runtimeclass ControlCore : ICoreState
|
||||
{
|
||||
ControlCore(IControlSettings settings,
|
||||
|
|
|
@ -29,10 +29,10 @@ static constexpr unsigned int MAX_CLICK_COUNT = 3;
|
|||
|
||||
namespace winrt::Microsoft::Terminal::Control::implementation
|
||||
{
|
||||
TerminalInput::MouseButtonState toInternalMouseState(const Core::MouseButtonState& state)
|
||||
TerminalInput::MouseButtonState toInternalMouseState(const Control::MouseButtonState& state)
|
||||
{
|
||||
return TerminalInput::MouseButtonState{
|
||||
state.IsLeftButtonDown != 0, state.IsMiddleButtonDown != 0, state.IsRightButtonDown != 0
|
||||
state.IsLeftButtonDown, state.IsMiddleButtonDown, state.IsRightButtonDown
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -184,7 +184,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
_core->PasteText(winrt::hstring{ wstr });
|
||||
}
|
||||
|
||||
void ControlInteractivity::PointerPressed(Core::MouseButtonState buttonState,
|
||||
void ControlInteractivity::PointerPressed(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const uint64_t timestamp,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
|
@ -266,7 +266,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
_touchAnchor = contactPoint;
|
||||
}
|
||||
|
||||
void ControlInteractivity::PointerMoved(Core::MouseButtonState buttonState,
|
||||
void ControlInteractivity::PointerMoved(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const bool focused,
|
||||
|
@ -347,7 +347,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
}
|
||||
}
|
||||
|
||||
void ControlInteractivity::PointerReleased(Core::MouseButtonState buttonState,
|
||||
void ControlInteractivity::PointerReleased(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const til::point pixelPosition)
|
||||
|
@ -394,7 +394,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
bool ControlInteractivity::MouseWheel(const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const int32_t delta,
|
||||
const til::point pixelPosition,
|
||||
const Core::MouseButtonState buttonState)
|
||||
const Control::MouseButtonState buttonState)
|
||||
{
|
||||
const til::point terminalPosition = _getTerminalPosition(pixelPosition);
|
||||
|
||||
|
|
|
@ -49,14 +49,14 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
til::rectangle GetPadding() const;
|
||||
|
||||
#pragma region Input Methods
|
||||
void PointerPressed(Core::MouseButtonState buttonState,
|
||||
void PointerPressed(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const uint64_t timestamp,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const til::point pixelPosition);
|
||||
void TouchPressed(const til::point contactPoint);
|
||||
|
||||
void PointerMoved(Core::MouseButtonState buttonState,
|
||||
void PointerMoved(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const bool focused,
|
||||
|
@ -64,7 +64,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
void TouchMoved(const til::point newTouchPoint,
|
||||
const bool focused);
|
||||
|
||||
void PointerReleased(Core::MouseButtonState buttonState,
|
||||
void PointerReleased(Control::MouseButtonState buttonState,
|
||||
const unsigned int pointerUpdateKind,
|
||||
const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const til::point pixelPosition);
|
||||
|
@ -73,7 +73,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
bool MouseWheel(const ::Microsoft::Terminal::Core::ControlKeyStates modifiers,
|
||||
const int32_t delta,
|
||||
const til::point pixelPosition,
|
||||
const Core::MouseButtonState state);
|
||||
const Control::MouseButtonState state);
|
||||
|
||||
void UpdateScrollbar(const double newValue);
|
||||
|
||||
|
|
|
@ -28,14 +28,14 @@ namespace Microsoft.Terminal.Control
|
|||
void RequestPasteTextFromClipboard();
|
||||
void SetEndSelectionPoint(Microsoft.Terminal.Core.Point point);
|
||||
|
||||
void PointerPressed(Microsoft.Terminal.Core.MouseButtonState buttonState,
|
||||
void PointerPressed(MouseButtonState buttonState,
|
||||
UInt32 pointerUpdateKind,
|
||||
UInt64 timestamp,
|
||||
Microsoft.Terminal.Core.ControlKeyStates modifiers,
|
||||
Microsoft.Terminal.Core.Point pixelPosition);
|
||||
void TouchPressed(Microsoft.Terminal.Core.Point contactPoint);
|
||||
|
||||
void PointerMoved(Microsoft.Terminal.Core.MouseButtonState buttonState,
|
||||
void PointerMoved(MouseButtonState buttonState,
|
||||
UInt32 pointerUpdateKind,
|
||||
Microsoft.Terminal.Core.ControlKeyStates modifiers,
|
||||
Boolean focused,
|
||||
|
@ -43,7 +43,7 @@ namespace Microsoft.Terminal.Control
|
|||
void TouchMoved(Microsoft.Terminal.Core.Point newTouchPoint,
|
||||
Boolean focused);
|
||||
|
||||
void PointerReleased(Microsoft.Terminal.Core.MouseButtonState buttonState,
|
||||
void PointerReleased(MouseButtonState buttonState,
|
||||
UInt32 pointerUpdateKind,
|
||||
Microsoft.Terminal.Core.ControlKeyStates modifiers,
|
||||
Microsoft.Terminal.Core.Point pixelPosition);
|
||||
|
@ -52,7 +52,7 @@ namespace Microsoft.Terminal.Control
|
|||
Boolean MouseWheel(Microsoft.Terminal.Core.ControlKeyStates modifiers,
|
||||
Int32 delta,
|
||||
Microsoft.Terminal.Core.Point pixelPosition,
|
||||
Microsoft.Terminal.Core.MouseButtonState state);
|
||||
MouseButtonState state);
|
||||
|
||||
void UpdateScrollbar(Double newValue);
|
||||
|
||||
|
|
|
@ -1239,9 +1239,9 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
const bool rightButtonDown)
|
||||
{
|
||||
const auto modifiers = _GetPressedModifierKeys();
|
||||
Core::MouseButtonState state{ leftButtonDown,
|
||||
midButtonDown,
|
||||
rightButtonDown };
|
||||
Control::MouseButtonState state{ leftButtonDown,
|
||||
midButtonDown,
|
||||
rightButtonDown };
|
||||
return _interactivity.MouseWheel(modifiers, delta, _toTerminalOrigin(location), state);
|
||||
}
|
||||
|
||||
|
@ -2455,11 +2455,11 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
_RaiseNoticeHandlers(*this, eventArgs);
|
||||
}
|
||||
|
||||
Core::MouseButtonState TermControl::GetPressedMouseButtons(const winrt::Windows::UI::Input::PointerPoint point)
|
||||
Control::MouseButtonState TermControl::GetPressedMouseButtons(const winrt::Windows::UI::Input::PointerPoint point)
|
||||
{
|
||||
return Core::MouseButtonState{ point.Properties().IsLeftButtonPressed(),
|
||||
point.Properties().IsMiddleButtonPressed(),
|
||||
point.Properties().IsRightButtonPressed() };
|
||||
return Control::MouseButtonState{ point.Properties().IsLeftButtonPressed(),
|
||||
point.Properties().IsMiddleButtonPressed(),
|
||||
point.Properties().IsRightButtonPressed() };
|
||||
}
|
||||
|
||||
unsigned int TermControl::GetPointerUpdateKind(const winrt::Windows::UI::Input::PointerPoint point)
|
||||
|
|
|
@ -102,7 +102,7 @@ namespace winrt::Microsoft::Terminal::Control::implementation
|
|||
bool ReadOnly() const noexcept;
|
||||
void ToggleReadOnly();
|
||||
|
||||
static Core::MouseButtonState GetPressedMouseButtons(const winrt::Windows::UI::Input::PointerPoint point);
|
||||
static Control::MouseButtonState GetPressedMouseButtons(const winrt::Windows::UI::Input::PointerPoint point);
|
||||
static unsigned int GetPointerUpdateKind(const winrt::Windows::UI::Input::PointerPoint point);
|
||||
static Windows::UI::Xaml::Thickness ParseThicknessFromPadding(const hstring padding);
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
#endif
|
||||
|
||||
#ifdef WINRT_Microsoft_Terminal_Core_H
|
||||
constexpr ControlKeyStates(winrt::Microsoft::Terminal::Core::ControlKeyStates projKeyStates) :
|
||||
constexpr ControlKeyStates(const winrt::Microsoft::Terminal::Core::ControlKeyStates& projKeyStates) :
|
||||
ControlKeyStates(projKeyStates.Value)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -43,16 +43,6 @@ namespace Microsoft.Terminal.Core
|
|||
Double Bottom;
|
||||
};
|
||||
|
||||
// This is a mirror of
|
||||
// ::Microsoft::Console::VirtualTerminal::TerminalInput::MouseButtonState,
|
||||
// but projectable.
|
||||
struct MouseButtonState
|
||||
{
|
||||
Int32 IsLeftButtonDown;
|
||||
Int32 IsMiddleButtonDown;
|
||||
Int32 IsRightButtonDown;
|
||||
};
|
||||
|
||||
declare
|
||||
{
|
||||
// Forward declare this parameterized specialization so that it lives
|
||||
|
|
Loading…
Reference in a new issue