test

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

This section is empty.

Variables

View Source
var Shcore = shcore{}
View Source
var User32 = user32{}

Functions

func EnumDisplayMonitors

func EnumDisplayMonitors(t *testing.T)

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
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL