]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/windows/shcore/shcore.factor
windows; add functions to determine DPI scaling
[factor.git] / basis / windows / shcore / shcore.factor
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 )