]> gitweb.factorcode.org Git - factor.git/commitdiff
windows; add functions to determine DPI scaling
authorBenjamin Pollack <benjamin@bitquabit.com>
Sun, 8 Jan 2017 01:52:01 +0000 (20:52 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 7 Mar 2020 05:21:02 +0000 (23:21 -0600)
basis/windows/shcore/authors.txt [new file with mode: 0644]
basis/windows/shcore/platforms.txt [new file with mode: 0644]
basis/windows/shcore/shcore.factor [new file with mode: 0644]
basis/windows/shcore/tags.txt [new file with mode: 0644]
basis/windows/user32/user32.factor
basis/windows/windows.factor
factor.exe.manifest [new file with mode: 0644]

diff --git a/basis/windows/shcore/authors.txt b/basis/windows/shcore/authors.txt
new file mode 100644 (file)
index 0000000..156fc82
--- /dev/null
@@ -0,0 +1 @@
+Benjamin Pollack
diff --git a/basis/windows/shcore/platforms.txt b/basis/windows/shcore/platforms.txt
new file mode 100644 (file)
index 0000000..8e1a559
--- /dev/null
@@ -0,0 +1 @@
+windows
diff --git a/basis/windows/shcore/shcore.factor b/basis/windows/shcore/shcore.factor
new file mode 100644 (file)
index 0000000..63f58ae
--- /dev/null
@@ -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 )
diff --git a/basis/windows/shcore/tags.txt b/basis/windows/shcore/tags.txt
new file mode 100644 (file)
index 0000000..bb863cf
--- /dev/null
@@ -0,0 +1 @@
+bindings
index e57d9a566c3b250d1544ea0f9e58fb8145ddd2a7..1b8a133687c8c02a01d49bf6eaf5ec6ffc99c211 100644 (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
index 47123f60a4553342c7c671c593d8d014c94ad950..938ceae37058af2b32cb8ed76940e4f574417623 100644 (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 }
diff --git a/factor.exe.manifest b/factor.exe.manifest
new file mode 100644 (file)
index 0000000..42ade3e
--- /dev/null
@@ -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>