Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Shcore = shcore{}
var User32 = user32{}
Functions ¶
func EnumDisplayMonitors ¶
func MonitorEnumProcCallback ¶
func MonitorEnumProcCallback(hMonitor C.uintptr_t, hDC C.uintptr_t, lpRect C.uintptr_t, dwData C.uintptr_t) C.bool
MonitorEnumProcCallback is our callback function which will be called from the DLL. Cgo note: Using //export in a file places a restriction on the preamble: since it is copied into two different C output files, it must not contain any definitions, only declarations. If a file contains both definitions and declarations, then the two output files will produce duplicate symbols and the linker will fail. To avoid this, definitions must be placed in preambles in other files, or in C source files. References: - https://groups.google.com/g/golang-nuts/c/yaP27124ly8/m/qiajGsLEBAAJ - https://pkg.go.dev/cmd/cgo#hdr-C_references_to_Go
func SetProcessDpiAwareness ¶
func SetProcessDpiAwareness() bool
SetProcessDpiAwareness enables per-monitor DPI awareness V2. If successful, returns true; otherwise returns false. References: - https://stackoverflow.com/a/43537991 - https://github.com/anaisbetts/PerMonitorDpi/blob/63570f78d9a3ff032bcd0d8a50169af1a57c2090/SafeNativeMethods.cs
Types ¶
type DPIAwarenessContext ¶
type DPIAwarenessContext uintptr
const ( DPIAwarenessContextUnaware DPIAwarenessContext = 16 DPIAwarenessContextSystemAware DPIAwarenessContext = 17 DPIAwarenessContextPerMonitorAware DPIAwarenessContext = 18 DPIAwarenessContextPerMonitorAwareV2 DPIAwarenessContext = 34 )
type ProcessDPIAwareness ¶
type ProcessDPIAwareness uintptr
const ( ProcessDPIUnaware ProcessDPIAwareness = 0 ProcessSystemDPIAware ProcessDPIAwareness = 1 ProcessPerMonitorDPIAware ProcessDPIAwareness = 2 )