win32utils

package module
v0.0.0-...-48ed3a3 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const CF_LOCALE uintptr = 16
View Source
const CF_TEXT uintptr = 1
View Source
const CF_UNICODETEXT uintptr = 13
View Source
const GMEM_MOVEABLE uintptr = 0x0002

Variables

View Source
var Kernel32 = windows.NewLazySystemDLL("kernel32.dll")
View Source
var User32 = windows.NewLazySystemDLL("user32.dll")

Functions

func CloseClipboard

func CloseClipboard() error

func EmptyClipboard

func EmptyClipboard() error

func GetClipboardDataText

func GetClipboardDataText() (string, error)

func GetConsoleWindows

func GetConsoleWindows() (hwnd uintptr)

GetConsoleWindows retrieves the window handle used by the console associated with the calling process.

func GlobalAlloc

func GlobalAlloc(flags uint, size uint) (handle windows.Handle, err error)

func GlobalLock

func GlobalLock(hMem windows.Handle) (pointer uintptr, err error)

func GlobalUnlock

func GlobalUnlock(hMem windows.Handle) (err error)

func MessageBoxW

func MessageBoxW(hwnd uintptr, caption, title string, flags uint) int

MessageBoxW of Win32 API. Check https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-messageboxw for more detail.

func OpenClipboard

func OpenClipboard(hwnd windows.HWND) error

func RunningByDoubleClick

func RunningByDoubleClick() bool

RunningByDoubleClick Check if run directly by double-clicking

func SetClipboardText

func SetClipboardText(text string) (handle windows.Handle, err error)

func SetText

func SetText(text string) error

func ToHighDPI

func ToHighDPI()

ToHighDPI tries to raise DPI awareness context to DPI_AWARENESS_CONTEXT_UNAWARE_GDISCALED

Types

This section is empty.

Jump to

Keyboard shortcuts

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