mirror of
https://github.com/microsoft/terminal.git
synced 2026-10-06 21:40:53 +00:00
Initial release of the Windows Terminal source code
This commit introduces all of the Windows Terminal and Console Host source, under the MIT license.
This commit is contained in:
27
src/types/FocusEvent.cpp
Normal file
27
src/types/FocusEvent.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
// Copyright (c) Microsoft Corporation.
|
||||
// Licensed under the MIT license.
|
||||
|
||||
#include "precomp.h"
|
||||
#include "inc/IInputEvent.hpp"
|
||||
|
||||
FocusEvent::~FocusEvent()
|
||||
{
|
||||
}
|
||||
|
||||
INPUT_RECORD FocusEvent::ToInputRecord() const noexcept
|
||||
{
|
||||
INPUT_RECORD record{ 0 };
|
||||
record.EventType = FOCUS_EVENT;
|
||||
record.Event.FocusEvent.bSetFocus = !!_focus;
|
||||
return record;
|
||||
}
|
||||
|
||||
InputEventType FocusEvent::EventType() const noexcept
|
||||
{
|
||||
return InputEventType::FocusEvent;
|
||||
}
|
||||
|
||||
void FocusEvent::SetFocus(const bool focus) noexcept
|
||||
{
|
||||
_focus = focus;
|
||||
}
|
||||
Reference in New Issue
Block a user