win32

package
v0.0.0-...-97b9f3f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	WS_MAXIMIZE = 0x01000000
	WS_MINIMIZE = 0x20000000

	GWL_STYLE = -16

	MONITOR_DEFAULTTOPRIMARY = 0x00000001
)
View Source
const (
	SW_HIDE            = 0
	SW_NORMAL          = 1
	SW_SHOWNORMAL      = 1
	SW_SHOWMINIMIZED   = 2
	SW_MAXIMIZE        = 3
	SW_SHOWMAXIMIZED   = 3
	SW_SHOWNOACTIVATE  = 4
	SW_SHOW            = 5
	SW_MINIMIZE        = 6
	SW_SHOWMINNOACTIVE = 7
	SW_SHOWNA          = 8
	SW_RESTORE         = 9
	SW_SHOWDEFAULT     = 10
	SW_FORCEMINIMIZE   = 11
)
View Source
const (
	// WM_POWERBROADCAST - Notifies applications that a power-management event has occurred.
	WM_POWERBROADCAST = 536

	// PBT_APMPOWERSTATUSCHANGE - Power status has changed.
	PBT_APMPOWERSTATUSCHANGE = 10

	// PBT_APMRESUMEAUTOMATIC -Operation is resuming automatically from a low-power state. This message is sent every time the system resumes.
	PBT_APMRESUMEAUTOMATIC = 18

	// PBT_APMRESUMESUSPEND - Operation is resuming from a low-power state. This message is sent after PBT_APMRESUMEAUTOMATIC if the resume is triggered by user input, such as pressing a key.
	PBT_APMRESUMESUSPEND = 7

	// PBT_APMSUSPEND - System is suspending operation.
	PBT_APMSUSPEND = 4

	// PBT_POWERSETTINGCHANGE - A power setting change event has been received.
	PBT_POWERSETTINGCHANGE = 32787
)

Power

View Source
const (
	GCLP_HBRBACKGROUND int32 = -10
)
View Source
const HCF_HIGHCONTRASTON = 0x00000001
View Source
const SPI_GETHIGHCONTRAST = 0x0042

Variables

This section is empty.

Functions

func EnableTranslucency

func EnableTranslucency(hwnd uintptr, backdrop BackdropType)

func ExtendFrameIntoClientArea

func ExtendFrameIntoClientArea(hwnd uintptr, extend bool)

func GetClipboardText

func GetClipboardText() (string, error)

func GetMonitorInfo

func GetMonitorInfo(hMonitor HMONITOR, lmpi *MONITORINFO) bool

func IsCurrentlyDarkMode

func IsCurrentlyDarkMode() bool

func IsCurrentlyHighContrastMode

func IsCurrentlyHighContrastMode() bool

func IsVisible

func IsVisible(hwnd uintptr) bool

func IsWindowFullScreen

func IsWindowFullScreen(hwnd uintptr) bool

func IsWindowMaximised

func IsWindowMaximised(hwnd uintptr) bool

func IsWindowMinimised

func IsWindowMinimised(hwnd uintptr) bool

func IsWindowNormal

func IsWindowNormal(hwnd uintptr) bool

func IsWindowsVersionAtLeast

func IsWindowsVersionAtLeast(major, minor, buildNumber int) bool

func RestoreWindow

func RestoreWindow(hwnd uintptr)

func SetBackgroundColour

func SetBackgroundColour(hwnd uintptr, r, g, b uint8)

func SetBorderColour

func SetBorderColour(hwnd uintptr, titleBorderColour int32)

func SetClipboardText

func SetClipboardText(text string) error

func SetTheme

func SetTheme(hwnd uintptr, useDarkMode bool)

func SetTitleBarColour

func SetTitleBarColour(hwnd uintptr, titleBarColour int32)

func SetTitleTextColour

func SetTitleTextColour(hwnd uintptr, titleTextColour int32)

func ShowWindow

func ShowWindow(hwnd uintptr)

func ShowWindowMaximised

func ShowWindowMaximised(hwnd uintptr)

func ShowWindowMinimised

func ShowWindowMinimised(hwnd uintptr)

func SupportsBackdropTypes

func SupportsBackdropTypes() bool

func SupportsCustomThemes

func SupportsCustomThemes() bool

func SupportsImmersiveDarkMode

func SupportsImmersiveDarkMode() bool

func SupportsThemes

func SupportsThemes() bool

Types

type BackdropType

type BackdropType int32

BackdropType defines the type of translucency we wish to use

type DWMWINDOWATTRIBUTE

type DWMWINDOWATTRIBUTE int32
const DwmwaBorderColor DWMWINDOWATTRIBUTE = 34
const DwmwaCaptionColor DWMWINDOWATTRIBUTE = 35
const DwmwaSystemBackdropType DWMWINDOWATTRIBUTE = 38
const DwmwaTextColor DWMWINDOWATTRIBUTE = 36
const DwmwaUseImmersiveDarkMode DWMWINDOWATTRIBUTE = 20
const DwmwaUseImmersiveDarkModeBefore20h1 DWMWINDOWATTRIBUTE = 19

type HANDLE

type HANDLE uintptr

type HMONITOR

type HMONITOR HANDLE

func MonitorFromWindow

func MonitorFromWindow(hwnd uintptr, dwFlags uint32) HMONITOR

type HRESULT

type HRESULT int32

type MARGINS

type MARGINS struct {
	CxLeftWidth, CxRightWidth, CyTopHeight, CyBottomHeight int32
}

http://msdn.microsoft.com/en-us/library/windows/desktop/bb773244.aspx

type MONITORINFO

type MONITORINFO struct {
	CbSize    uint32
	RcMonitor RECT
	RcWork    RECT
	DwFlags   uint32
}

http://msdn.microsoft.com/en-us/library/windows/desktop/dd145065.aspx

type RECT

type RECT struct {
	Left, Top, Right, Bottom int32
}

http://msdn.microsoft.com/en-us/library/windows/desktop/dd162897.aspx

func GetWindowRect

func GetWindowRect(hwnd uintptr) *RECT

Jump to

Keyboard shortcuts

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