Commit Graph

72 Commits

Author SHA1 Message Date
hikari 1b06f809de [core:sys/windows] Added SuspendThread 2023-09-08 00:02:27 +03:00
hikari 19fe508fb2 [core:sys/windows] Added couple of procedures 2023-09-07 23:58:19 +03:00
gingerBill 2cc22d118d Require parentheses for #align(N) 2023-08-15 14:55:02 +01:00
gingerBill 89c50bbd82 Adhere to -vet-style 2023-08-08 16:01:22 +01:00
ryuukk bc43a8d38d Add CopyFileW 2023-07-10 06:02:38 +02:00
gingerBill 3108752a0c Fix #2518 2023-05-18 11:55:37 +01:00
Jon Lipstate 0f1c5b3891 correct errors 2023-04-05 22:22:16 -07:00
Jeroen van Rijn fb0b9de7a9 Merge pull request #2423 from jon-lipstate/wsapoll
Winsock updates, iocp calls
2023-04-05 09:08:07 +02:00
Jon Lipstate 2c9156e2c1 repaired autoformatter 2023-04-04 23:57:52 -07:00
Jon Lipstate bf75fd9d34 Revert "remove keyedevent"
This reverts commit 219343f3c0.
2023-04-04 22:02:37 -07:00
Jon Lipstate 9a8c69d1c0 remove duplicate 2023-04-04 22:01:44 -07:00
Jon Lipstate 6c943722f3 add non Ex variant 2023-04-04 22:00:22 -07:00
Jon Lipstate 219343f3c0 remove keyedevent 2023-04-04 11:47:26 -07:00
Jon Lipstate 6cba4d3483 iocp support 2023-04-04 00:42:38 -07:00
Elusive Porpoise aa5a222c6d Add creation, thread priority, and copy file flags. 2023-04-03 22:33:40 -07:00
Elusive Porpoise 2795f09fa8 Add GetStartupInfoW. Rename StartupInfo to StartupInfoW. 2023-04-03 22:27:47 -07:00
Christian Seibold 852c8b533c Add SetConsoleCursorInfo and GetConsoleCursorInfo to sys/windows package 2023-03-18 15:43:31 -05:00
Elusive Porpoise 4210aa9ab9 add SetConsoleOuputCP 2023-03-15 17:15:25 -07:00
gingerBill 0674b1b6ee Merge pull request #2314 from SentientCoffee/pr/win32_console_text_attributes
Add win32 SetConsoleTextAttribute for setting cmd prompt colors
2023-03-04 15:19:34 +00:00
Jeppe Skov ffc592c7cf Added missing Windows functions for console manipulation
This commit adds several missing types and functions to the Windows implementation to enable manipulation of console windows. The types added include 'SMALL_RECT', 'CONSOLE_SCREEN_BUFFER_INFO', and 'PCONSOLE_SCREEN_BUFFER_INFO'. The functions added include 'GetConsoleScreenBufferInfo', 'SetConsoleScreenBufferSize', and 'SetConsoleWindowInfo'. These functions were necessary to properly manage the console window.
2023-02-28 23:18:10 +01:00
Elusive Porpoise 8738695bd8 FindFirstChangeNotification series of calls 2023-02-27 18:43:43 -08:00
Daniel 34cb558279 Add win32 SetConsoleTextAttributes for setting cmd prompt colors 2023-01-25 14:17:20 -05:00
Colin Davidson 171d5b4012 more windows kerfuffle 2023-01-06 13:45:21 -08:00
Colin Davidson b455ccd261 fix more things? 2023-01-05 01:37:50 -08:00
Colin Davidson b22ddb1453 fix windows structs 2023-01-05 01:25:18 -08:00
Colin Davidson cb7dd12222 name raw union 2023-01-05 01:18:44 -08:00
Colin Davidson 8f39c45e9b use raw_union? 2023-01-05 01:11:46 -08:00
Colin Davidson 944396128b add get core count 2023-01-05 01:06:55 -08:00
hikari 7ed28e8a84 sys/windows: add CreateWaitableTimerExW 2022-12-02 05:24:30 +02:00
gingerBill 7bcde35651 Heavily improve time handling on Windows for time.now() and os.File_Info 2022-10-26 16:05:49 +01:00
gingerBill 7743e34596 Fix typo 2022-10-26 15:01:35 +01:00
gingerBill 4003b76fd3 Add GetSystemTimePreciseAsFileTime 2022-10-26 15:00:25 +01:00
hikari fa6cfde4b0 sys/windows: add free disk space function binding 2022-10-10 07:26:32 +03:00
matias d13dc7eca7 Add a few Fiber functions to kernel32.odin
This is not the complete set, but a start.
2022-10-03 11:35:27 -04:00
Tetralux 37a2356485 [sys/windows] Add DCB structure, SetCommState, GetCommState
These are the procedures for configuring a serial port.

You simply open the port with CreateFile (os.open), followed by a call to GetCommState,
setting the DCB as desired, followed by a SetCommState call.

The DCB structure uses C bitfields, so a configuration struct is provided along with a helper procedure to make it easier
to initialize in Odin code.
This makes it possible to initialize a DCB structure with one call to the helper:
```
dcb: DCB
windows.init_dcb_with_config(&dcb, {
	BaudRate = 115200,
	ByteSize = 8,
	Parity = .None,
	StopBits = .One,
})
```
(The parity and the stopbits are actually optional in this example, as their zero-values are None and One, respectively.)
2022-09-22 15:14:14 +00:00
Jeroen van Rijn 01e8668357 Merge branch 'master' into sysinfo 2022-09-01 18:30:26 +02:00
Lucas Perlind f3f51bd643 Kernel32: Add more window bindings and improve consistency 2022-09-01 22:57:27 +10:00
Jeroen van Rijn d5f94d73ad [sys/info] Initial version. 2022-09-01 00:43:47 +02:00
gingerBill 7fe36de069 Correct Try SRWLock related procedures to return BOOLEAN rather than BOOL 2022-08-22 22:24:51 +01:00
Jimmy "Keeba" Lefevre 9e288b7ce8 Change LPCSTR to LPCWSTR in windows _W procedures 2022-06-27 21:48:02 +02:00
hikari a2e0373934 sys/windows: add registry functions and create winerror.odin 2022-06-03 06:44:42 +03:00
jason 43432f92ec fix git dummy move 2022-05-16 15:21:36 -04:00
jason fff23e2bbb merge from upstream and convert to ^File types 2022-05-16 13:49:57 -04:00
gingerBill 0c45a46aab Remove A calls in favour of W calls 2022-05-12 14:21:25 +01:00
gingerBill d1fc9d3073 Add more libraries 2022-05-12 13:54:40 +01:00
gingerBill 2fb351bf04 Update sys/windows to be closer to the soon to be deleted sys/win32 2022-05-12 13:45:17 +01:00
gingerBill eef44b11f3 Make the utf16 conversion procedures in core:sys/windows safer by checking for memory leaks 2022-05-12 13:17:58 +01:00
gingerBill 8b4b81fdeb Fill in most of os2/file_windows.odin 2022-05-12 11:33:01 +01:00
Aaron Glazer c9e31dc90d Adding some proc bindings, struct definitions, and constant values. 2022-05-08 02:34:10 -07:00
Jeroen van Rijn 85e6efdf16 Ctrl-C handler on Windows. 2022-05-08 10:39:03 +02:00