terminal/src/terminal/adapter/IInteractDispatch.hpp
Michael Niksa 322989d017 Apply audit mode to TerminalInput/Adapter/Parser libraries (#4005)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request
- Enables auditing of Virtual Terminal libraries (input, adapter, parser)

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [x] Rolls audit out to more things
* [x] I work here
* [x] Tests should still pass
* [x] Am core contributor
* [x] Closes #3957

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
This is turning on the auditing of these projects (as enabled by the heavier lifting in the other refactor) and then cleaning up the remaining warnings.

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
- [x] Built it
- [x] Ran the tests
2020-01-03 14:25:21 +00:00

44 lines
1.3 KiB
C++

/*++
Copyright (c) Microsoft Corporation
Licensed under the MIT license.
Module Name:
- InteractDispatch.hpp
Abstract:
- Base class for Input State Machine callbacks. When actions occur, they will
be dispatched to the methods on this interface which must be implemented by
a child class and passed into the state machine on creation.
Author(s):
- Mike Griese (migrie) 11 Oct 2017
--*/
#pragma once
#include "DispatchTypes.hpp"
#include "../../types/inc/IInputEvent.hpp"
namespace Microsoft::Console::VirtualTerminal
{
class IInteractDispatch
{
public:
#pragma warning(push)
#pragma warning(disable : 26432) // suppress rule of 5 violation on interface because tampering with this is fraught with peril
virtual ~IInteractDispatch() = default;
#pragma warning(pop)
virtual bool WriteInput(std::deque<std::unique_ptr<IInputEvent>>& inputEvents) = 0;
virtual bool WriteCtrlC() = 0;
virtual bool WriteString(const std::wstring_view string) = 0;
virtual bool WindowManipulation(const DispatchTypes::WindowManipulationType function,
const std::basic_string_view<size_t> parameters) = 0;
virtual bool MoveCursor(const size_t row,
const size_t col) = 0;
};
}