diff --git a/basis/windows/screens/authors.txt b/basis/windows/screens/authors.txt new file mode 100644 index 0000000000..7c1b2f2279 --- /dev/null +++ b/basis/windows/screens/authors.txt @@ -0,0 +1 @@ +Doug Coleman diff --git a/basis/windows/screens/platforms.txt b/basis/windows/screens/platforms.txt new file mode 100644 index 0000000000..d493d3459b --- /dev/null +++ b/basis/windows/screens/platforms.txt @@ -0,0 +1 @@ +windows \ No newline at end of file diff --git a/basis/windows/screens/screens.factor b/basis/windows/screens/screens.factor new file mode 100644 index 0000000000..9cb13cb687 --- /dev/null +++ b/basis/windows/screens/screens.factor @@ -0,0 +1,11 @@ +! Copyright (C) 2018 Doug Coleman. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.c-types alien.data arrays classes.struct kernel +windows.errors windows.shcore windows.types windows.user32 ; +IN: windows.screens + +: get-dpi ( -- dpi ) + 0 0 POINT 0 MonitorFromPoint + MDT_EFFECTIVE_DPI + 0 uint 0 uint [ GetDpiForMonitor win32-error=0/f ] 2keep + [ uint deref ] bi@ 2array ;