windows; add functions to determine DPI scaling

master
Benjamin Pollack 2017-01-07 20:52:01 -05:00 committed by Doug Coleman
parent 8df1d1fbe6
commit bafb101b7a
7 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1 @@
Benjamin Pollack

View File

@ -0,0 +1 @@
windows

View File

@ -0,0 +1,14 @@
! Copyright (C) 2017 Benjamin Pollack.
! See http://factorcode.org/license.txt for BSD license.
USING: alien.syntax windows.types ;
IN: windows.shcore
LIBRARY: shcore
ENUM: MONITOR_DPI_TYPE
MDT_EFFECTIVE_DPI
MDT_ANGULAR_DPI
MDT_RAW_DPI
{ MDT_DEFAULT 0 } ;
FUNCTION: HRESULT GetDpiForMonitor ( HMONITOR hMonitor, MONITOR_DPI_TYPE dpiType, UINT* dpiX, UINT *dpiY )

View File

@ -0,0 +1 @@
bindings

View File

@ -1898,7 +1898,7 @@ ALIAS: MessageBoxEx MessageBoxExW
! FUNCTION: ModifyMenuA
! FUNCTION: ModifyMenuW
! FUNCTION: MonitorFromPoint
FUNCTION: HMONITOR MonitorFromPoint ( POINT pt, DWORD dwFlags )
! FUNCTION: MonitorFromRect
FUNCTION: HMONITOR MonitorFromWindow ( HWND hWnd, DWORD dwFlags )
! FUNCTION: mouse_event

View File

@ -20,6 +20,7 @@ CONSTANT: MAX_UNICODE_PATH 32768
{ "gl" "opengl32.dll" stdcall }
{ "glu" "glu32.dll" stdcall }
{ "ole32" "ole32.dll" stdcall }
{ "shcore" "shcore.dll" stdcall }
{ "usp10" "usp10.dll" stdcall }
{ "psapi" "psapi.dll" stdcall }
{ "winmm" "winmm.dll" stdcall }

12
factor.exe.manifest Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32"
name="factor"
version="0.9.8.0"
/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">True/PM</dpiAware>
</windowsSettings>
</application>
</assembly>