sys

package
v0.0.0-...-75f61f4 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	VER_MINORVERSION = 1 << iota
	VER_MAJORVERSION
	VER_BUILDNUMBER
	VER_PLATFORMID
	VER_SERVICEPACKMINOR
	VER_SERVICEPACKMAJOR
	VER_SUITENAME
	VER_PRODUCT_TYPE
)
View Source
const (
	VER_EQUAL = 1 + iota
	VER_GREATER
	VER_GREATER_EQUAL
	VER_LESS
	VER_LESS_EQUAL
	VER_AND
	VER_OR
)
View Source
const (
	IMAGE_BITMAP = iota
	IMAGE_ICON
	IMAGE_CURSOR
)
View Source
const (
	LR_DEFAULTSIZE = 0x00000040
	LR_SHARED      = 0x00008000
)
View Source
const (
	MF_STRING    = 0x00000000
	MF_POPUP     = 0x00000010
	MF_SEPARATOR = 0x00000800
)
View Source
const (
	WM_CLOSE       = 0x0010
	WM_COMMAND     = 0x0111
	WM_CONTEXTMENU = 0x007b
	WM_CREATE      = 0x0001
	WM_DESTROY     = 0x0002
	WM_NULL        = 0x0000
	WM_RBUTTONUP   = 0x0205
	WM_SYSKEYDOWN  = 0x0104
	WM_USER        = 0x0400
)
View Source
const (
	DLLVER_PLATFORM_WINDOWS = 1 + iota
	DLLVER_PLATFORM_NT
)
View Source
const (
	NIM_ADD = iota
	NIM_MODIFY
	NIM_DELETE
	NIM_SETFOCUS
	NIM_SETVERSION
)
View Source
const (
	NOTIFYICONDATA_V3_SIZE = uint32(unsafe.Offsetof(NotifyIconData{}.BalloonIcon))
	NOTIFYICONDATA_V2_SIZE = uint32(unsafe.Offsetof(NotifyIconData{}.GuidItem))
	NOTIFYICONDATA_V1_SIZE = uint32(unsafe.Offsetof(NotifyIconData{}.Tip) + unsafe.Sizeof([64]uint16{}))
)
View Source
const (
	NIF_MESSAGE = 1 << iota
	NIF_ICON
	NIF_TIP
	NIF_STATE
	NIF_INFO
	NIF_GUID
	NIF_REALTIME
	NIF_SHOWTIP
)
View Source
const (
	NIN_BALLOONSHOW = WM_USER + 2 + iota
	NIN_BALLOONHIDE
	NIN_BALLOONTIMEOUT
	NIN_BALLOONUSERCLICK
)
View Source
const (
	NIS_HIDDEN = 1 << iota
	NIS_SHAREDICON
)
View Source
const (
	NOTIFY_VERSION   = 3
	NOTIFY_VERSION_4 = 4
)
View Source
const (
	NIIF_NONE = iota
	NIIF_INFO
	NIIF_WARNING
	NIIF_ERROR
	NIIF_USER
	NIIF_NOSOUND = 1 << (iota - 1)
	NIIF_LARGE_ICON

	NIIF_RESPECT_QUIET_TIME

	NIIF_ICON_MASK = 0xf
)
View Source
const GWL_USERDATA = -21
View Source
const TPM_RIGHTALIGN = 0x0008
View Source
const WS_POPUP = 0x80000000

Variables

View Source
var (
	GetWindowLongPtr = getWindowLongPtr
	SetWindowLongPtr = setWindowLongPtr
)

Functions

func AppendMenu

func AppendMenu(menu windows.Handle, flags uint32, id uintptr, item *uint16) (err error)

func CreateCompatibleBitmap

func CreateCompatibleBitmap(dc windows.Handle, w int32, h int32) (bm windows.Handle, err error)

func CreateCompatibleDC

func CreateCompatibleDC(dc windows.Handle) (mdc windows.Handle, err error)

func CreateIconIndirect

func CreateIconIndirect(ii *IconInfo) (icon windows.Handle, err error)

func CreatePopupMenu

func CreatePopupMenu() (menu windows.Handle, err error)

func CreateWindowEx

func CreateWindowEx(exStyle uint32, className *uint16, windowName *uint16, style uint32, x int32, y int32, w int32, h int32, parent windows.Handle, menu windows.Handle, inst windows.Handle, param unsafe.Pointer) (wnd windows.Handle, err error)

func DefWindowProc

func DefWindowProc(wnd windows.Handle, msg uint32, wParam uintptr, lParam uintptr) (res uintptr)

func DeleteDC

func DeleteDC(dc windows.Handle) (err error)

func DeleteObject

func DeleteObject(obj windows.Handle) (err error)

func DestroyIcon

func DestroyIcon(icon windows.Handle) (err error)

func DestroyMenu

func DestroyMenu(menu windows.Handle) (err error)

func DestroyWindow

func DestroyWindow(wnd windows.Handle) (err error)

func DispatchMessage

func DispatchMessage(msg *Msg) (res uintptr)

func GetCursorPos

func GetCursorPos(pt *Point) (err error)

func GetDC

func GetDC(wnd windows.Handle) (dc windows.Handle, err error)

func GetMessage

func GetMessage(msg *Msg, wnd windows.Handle, msgFilterMin uint32, msgFilterMax uint32) (ret int32, err error)

func GetModuleHandle

func GetModuleHandle(name *uint16) (h windows.Handle, err error)

func IsShellDLLVersionOrGreater

func IsShellDLLVersionOrGreater(major, minor, build uint32) bool

func IsWindows7OrGreater

func IsWindows7OrGreater() bool

func IsWindowsVersionOrGreater

func IsWindowsVersionOrGreater(major, minor uint32, sp uint16) bool

func IsWindowsXPSP2OrGreater

func IsWindowsXPSP2OrGreater() bool

func LoWord

func LoWord(v uint32) uint16

func LoadImage

func LoadImage(inst windows.Handle, name *uint16, typ uint32, cxDesired int32, cyDesired int32, load uint32) (h windows.Handle, err error)

func MakeIntResource

func MakeIntResource(i uint16) *uint16

func PostMessage

func PostMessage(wnd windows.Handle, msg uint32, wParam uintptr, lParam uintptr) (err error)

func PostQuitMessage

func PostQuitMessage(exitCode int32)

func RGB

func RGB(r, g, b uint8) uint32

func RegisterClassEx

func RegisterClassEx(wcx *WndClassEx) (atom uint16, err error)

func RegisterWindowMessage

func RegisterWindowMessage(s *uint16) (msg uint32, err error)

func ReleaseDC

func ReleaseDC(wnd windows.Handle, dc windows.Handle) (err error)

func SelectObject

func SelectObject(dc windows.Handle, obj windows.Handle) (oldobj windows.Handle, err error)

func SetForegroundWindow

func SetForegroundWindow(wnd windows.Handle) (err error)

func SetPixel

func SetPixel(dc windows.Handle, x int32, y int32, color uint32) (err error)

func Shell_NotifyIcon

func Shell_NotifyIcon(message uint32, data *NotifyIconData) (err error)

func TrackPopupMenu

func TrackPopupMenu(menu windows.Handle, flags uint32, x int32, y int32, reserved int32, wnd windows.Handle) (ret int32, err error)

func TranslateMessage

func TranslateMessage(msg *Msg) (err error)

func VerSetConditionMask

func VerSetConditionMask(lConditionMask uint64, typeBitMask uint32, conditionMask uint8) (mask uint64)

func VerifyVersionInfo

func VerifyVersionInfo(vi *OSVersionInfoEx, typeMask uint32, conditionMask uint64) (ok bool)

Types

type CreateStruct

type CreateStruct struct {
	CreateParams unsafe.Pointer
	Instance     windows.Handle
	Menu         windows.Handle
	Parent       windows.Handle
	Cy           int32
	Cx           int32
	Y            int32
	X            int32
	Style        int32
	Name         *uint16
	Class        *uint16
	ExStyle      uint32
}

type DLLVersionInfo

type DLLVersionInfo struct {
	Size         uint32
	MajorVersion uint32
	MinorVersion uint32
	BuildNumber  uint32
	PlatformID   uint32
}

type IconInfo

type IconInfo struct {
	Icon     int32
	XHotspot uint32
	YHotspot uint32
	Mask     windows.Handle
	Color    windows.Handle
}

type Msg

type Msg struct {
	Wnd     windows.Handle
	Message uint32
	WParam  uintptr
	LParam  uintptr
	Time    uint32
	Pt      Point
}

type NotifyIconData

type NotifyIconData struct {
	Size            uint32
	Wnd             windows.Handle
	ID              uint32
	Flags           uint32
	CallbackMessage uint32
	Icon            windows.Handle
	Tip             [128]uint16
	State           uint32
	StateMask       uint32
	Info            [256]uint16
	Version         uint32
	InfoTitle       [64]uint16
	InfoFlags       uint32
	GuidItem        windows.GUID
	BalloonIcon     windows.Handle
}

type OSVersionInfoEx

type OSVersionInfoEx struct {
	OSVersionInfoSize uint32
	MajorVersion      uint32
	MinorVersion      uint32
	BuildNumber       uint32
	PlatformId        uint32
	CSDVersion        [128]uint16
	ServicePackMajor  uint16
	ServicePackMinor  uint16
	SuiteMask         uint16
	ProductType       uint8
	Reserved          uint8
}

type Point

type Point struct {
	X, Y int32
}

type WndClassEx

type WndClassEx struct {
	Size       uint32
	Style      uint32
	WndProc    uintptr
	ClsExtra   int32
	WndExtra   int32
	Instance   windows.Handle
	Icon       windows.Handle
	Cursor     windows.Handle
	Background windows.Handle
	MenuName   *uint16
	ClassName  *uint16
	IconSm     windows.Handle
}

Jump to

Keyboard shortcuts

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