mirror of
https://github.com/microsoft/terminal.git
synced 2025-12-25 02:01:28 -05:00
Previously this project used a great variety of types to present text buffer coordinates: `short`, `unsigned short`, `int`, `unsigned int`, `size_t`, `ptrdiff_t`, `COORD`/`SMALL_RECT` (aka `short`), and more. This massive commit migrates almost all use of those types over to the centralized types `til::point`/`size`/`rect`/`inclusive_rect` and their underlying type `til::CoordType` (aka `int32_t`). Due to the size of the changeset and statistics I expect it to contain bugs. The biggest risk I see is that some code potentially, maybe implicitly, expected arithmetic to be mod 2^16 and that this code now allows it to be mod 2^32. Any narrowing into `short` later on would then throw exceptions. ## PR Checklist * [x] Closes #4015 * [x] I work here * [x] Tests added/passed ## Validation Steps Performed Casual usage of OpenConsole and Windows Terminal. ✅
30 lines
886 B
C
30 lines
886 B
C
/*++
|
|
Copyright (c) Microsoft Corporation
|
|
Licensed under the MIT license.
|
|
|
|
Module Name:
|
|
- conv.h
|
|
|
|
Abstract:
|
|
- This module contains the internal structures and definitions used by the conversion area.
|
|
- "Conversion area" refers to either the in-line area where the text color changes and suggests options in IME-based languages
|
|
or to the reserved line at the bottom of the screen offering suggestions and the current IME mode.
|
|
|
|
Author:
|
|
- KazuM March 8, 1993
|
|
|
|
Revision History:
|
|
--*/
|
|
|
|
#pragma once
|
|
|
|
#include "server.h"
|
|
|
|
#include "../types/inc/Viewport.hpp"
|
|
|
|
void WriteConvRegionToScreen(const SCREEN_INFORMATION& ScreenInfo,
|
|
const Microsoft::Console::Types::Viewport& convRegion);
|
|
|
|
[[nodiscard]] HRESULT ConsoleImeResizeCompStrView();
|
|
[[nodiscard]] HRESULT ConsoleImeResizeCompStrScreenBuffer(const til::size coordNewScreenSize);
|