aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2023-03-02 13:21:38 +0000
committerGitHub <noreply@github.com>2023-03-02 13:21:38 +0000
commit99e2f0c91ed4f6cc26c0ebf8a9c904f2b7c65894 (patch)
tree761a2217c044a8764960398a426ec91f10492fb5 /core
parent553f338f6ffa60ead4931ce83b302c822caf8f0a (diff)
parentffc592c7cfd61425b3377ea0ac544c8117732046 (diff)
Merge pull request #2357 from JeppeSS/sys-windows-additions
Added missing Windows functions for console manipulation
Diffstat (limited to 'core')
-rw-r--r--core/sys/windows/kernel32.odin3
-rw-r--r--core/sys/windows/types.odin18
2 files changed, 21 insertions, 0 deletions
diff --git a/core/sys/windows/kernel32.odin b/core/sys/windows/kernel32.odin
index f736696e1..5f09dda3c 100644
--- a/core/sys/windows/kernel32.odin
+++ b/core/sys/windows/kernel32.odin
@@ -370,6 +370,9 @@ foreign kernel32 {
GenerateConsoleCtrlEvent :: proc(dwCtrlEvent: DWORD, dwProcessGroupId: DWORD) -> BOOL ---
FreeConsole :: proc() -> BOOL ---
GetConsoleWindow :: proc() -> HWND ---
+ GetConsoleScreenBufferInfo :: proc(hConsoleOutput: HANDLE, lpConsoleScreenBufferInfo: PCONSOLE_SCREEN_BUFFER_INFO) -> BOOL ---
+ SetConsoleScreenBufferSize :: proc(hConsoleOutput: HANDLE, dwSize: COORD) -> BOOL ---
+ SetConsoleWindowInfo :: proc(hConsoleOutput: HANDLE, bAbsolute : BOOL, lpConsoleWindow: ^SMALL_RECT) -> BOOL ---
GetDiskFreeSpaceExW :: proc(
lpDirectoryName: LPCWSTR,
diff --git a/core/sys/windows/types.odin b/core/sys/windows/types.odin
index 1d5bdaf04..10a2e20a7 100644
--- a/core/sys/windows/types.odin
+++ b/core/sys/windows/types.odin
@@ -3884,3 +3884,21 @@ COORD :: struct {
X: SHORT,
Y: SHORT,
}
+
+SMALL_RECT :: struct {
+ Left: SHORT,
+ Top: SHORT,
+ Right: SHORT,
+ Bottom: SHORT,
+}
+
+CONSOLE_SCREEN_BUFFER_INFO :: struct {
+ dwSize: COORD,
+ dwCursorPosition: COORD,
+ wAttributes: WORD,
+ srWindow: SMALL_RECT,
+ dwMaximumWindowSize: COORD,
+}
+
+
+PCONSOLE_SCREEN_BUFFER_INFO :: ^CONSOLE_SCREEN_BUFFER_INFO \ No newline at end of file