win

package
v0.0.0-...-f0dacce Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MsgBoxBtnOk                uint = 0x000000
	MsgBoxBtnOkCancel          uint = 0x000001
	MsgBoxBtnAbortRetryIgnore  uint = 0x000002
	MsgBoxBtnYesNoCancel       uint = 0x000003
	MsgBoxBtnYesNo             uint = 0x000004
	MsgBoxBtnRetryCancel       uint = 0x000005
	MsgBoxBtnCancelTryContinue uint = 0x000006
	MsgBoxIconNone             uint = 0x000000
	MsgBoxIconError            uint = 0x000010
	MsgBoxIconQuestion         uint = 0x000020
	MsgBoxIconWarning          uint = 0x000030
	MsgBoxIconInformation      uint = 0x000040
	MsgBoxDefaultButton1       uint = 0x000000
	MsgBoxDefaultButton2       uint = 0x000100
	MsgBoxDefaultButton3       uint = 0x000200
	MsgBoxDefaultButton4       uint = 0x000300
	MsgBoxTopMost              uint = 0x041000
	MsgBoxService              uint = 0x200000

	MsgBoxSelectOk       = 1
	MsgBoxSelectCancel   = 2
	MsgBoxSelectAbort    = 3
	MsgBoxSelectRetry    = 4
	MsgBoxSelectIgnore   = 5
	MsgBoxSelectYes      = 6
	MsgBoxSelectNo       = 7
	MsgBoxSelectTry      = 10
	MsgBoxSelectContinue = 11
)

MsgBox items types

Functions

func DeletePermEnv

func DeletePermEnv(env registry.Key, name string) error

DeletePermEnv deletes an environment variable permanently on Windows

func GetConsoleTitle

func GetConsoleTitle() (string, error)

GetConsoleTitle sets windows console title

func GetPermEnv

func GetPermEnv(env registry.Key, name string) (string, error)

GetPermEnv gets an environment variable value on Windows

func Is64Arch

func Is64Arch() bool

Is64Arch detects if program running on 64bits architecture

func Locale

func Locale() string

Locale returns the locale set for the user and falls back to the locale set for the system if unset. Returns "en-US" if all of them are unset.

func MsgBox

func MsgBox(title string, msg string, flag uint) (int, error)

MsgBox create message box

func SetConsoleTitle

func SetConsoleTitle(title string) error

SetConsoleTitle sets windows console title

func SetPermEnv

func SetPermEnv(env registry.Key, name string, value string) error

SetPermEnv set an environment variable permanently on Windows

Types

type Version

type Version struct {
	Major int
	Minor int
	Build int
}

Version identifies a Windows version by major, minor, and build number.

func GetVersion

func GetVersion() (Version, error)

GetVersion returns the Windows version information. Applications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2). For a table of version numbers see: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724833(v=vs.85).aspx

Jump to

Keyboard shortcuts

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