Module windows
Expand description
Windows API abstraction layer for console and system operations.
This module provides a trait-based abstraction over Windows APIs to enable mocking in tests and centralize Windows-specific functionality.
Structs§
- Default
Windows Api - Default implementation of WindowsApi that calls actual Windows APIs.
Constants§
Traits§
- Windows
Api - Trait for Windows API operations to enable mocking in tests.
Functions§
- arrange_
console - Changes size and position of the current console window using the provided API.
- build_
command_ line - Build command line string for Windows process creation
- clear_
screen - Empties the console screen output buffer of the current console window using the provided API.
- get_
console_ input_ buffer - Returns a [HANDLE] to the [STD_INPUT_HANDLE] of the current process.
- get_
console_ output_ buffer - Returns a [HANDLE] to the [STD_OUTPUT_HANDLE] of the current process.
- get_
console_ title - Returns the title of the current console window using the provided API.
- get_
std_ 🔒handle - Returns a [HANDLE] to the requested [STD_HANDLE] of the current process.
- is_
windows_ 10 - Detects if the current windows installation is Windows 10 or not using the provided API.
- read_
console_ input - Returns a single [INPUT_RECORD] read from the current process stdinput using the provided API.
- read_
keyboard_ input - Returns a single [INPUT_RECORD_0] where
EventType==KEY_EVENTusing the provided API. - set_
console_ border_ color - Sets the border color of the current console window using the provided APIs.
- set_
console_ color - Sets the back- and foreground color of the current console window using the provided API.
- utf16_
buffer_ to_ string - Converts a UTF-16 buffer to a Rust String, filtering out null characters.