sys/windows: add GetMonitorInfoW

This commit is contained in:
hikari
2022-12-13 10:25:18 +02:00
parent 1c4e75e83f
commit 1ddbe16d28
2 changed files with 20 additions and 0 deletions

View File

@@ -1554,6 +1554,25 @@ WA_INACTIVE :: 0
WA_ACTIVE :: 1
WA_CLICKACTIVE :: 2
// Struct pointed to by WM_GETMINMAXINFO lParam
MINMAXINFO :: struct {
ptReserved: POINT,
ptMaxSize: POINT,
ptMaxPosition: POINT,
ptMinTrackSize: POINT,
ptMaxTrackSize: POINT,
}
PMINMAXINFO :: ^MINMAXINFO
LPMINMAXINFO :: PMINMAXINFO
MONITORINFO :: struct {
cbSize: DWORD,
rcMonitor: RECT,
rcWork: RECT,
dwFlags: DWORD,
}
LPMONITORINFO :: ^MONITORINFO
// SetWindowsHook() codes
WH_MIN :: -1
WH_MSGFILTER :: -1

View File

@@ -100,6 +100,7 @@ foreign user32 {
AdjustWindowRectExForDpi :: proc(lpRect: LPRECT, dwStyle: DWORD, bMenu: BOOL, dwExStyle: DWORD, dpi: UINT) -> BOOL ---
SystemParametersInfoW :: proc(uiAction, uiParam: UINT, pvParam: PVOID, fWinIni: UINT) -> BOOL ---
GetMonitorInfoW :: proc(hMonitor: HMONITOR, lpmi: LPMONITORINFO) -> BOOL ---
GetWindowDC :: proc(hWnd: HWND) -> HDC ---
GetDC :: proc(hWnd: HWND) -> HDC ---