win

package
v0.0.0-...-294300f Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NULL = 0

	TRUE  = BOOL(1)
	FALSE = BOOL(0)
)
View Source
const (
	CS_HREDRAW = 0x0002
	CS_VREDRAW = 0x0001
)

Window class styles

View Source
const (
	ICON_BIG   = 1
	ICON_SMALL = 0
)

WM_SETICON constants

View Source
const (
	IMAGE_BITMAP = 0
	IMAGE_CURSOR = 2
	IMAGE_ICON   = 1

	LR_CREATEDIBSECTION = 0x00002000
	LR_DEFAULTCOLOR     = 0x00000000
	LR_DEFAULTSIZE      = 0x00000040
	LR_LOADFROMFILE     = 0x00000010
	LR_LOADMAP3DCOLORS  = 0x00001000
	LR_LOADTRANSPARENT  = 0x00000020
	LR_MONOCHROME       = 0x00000001
	LR_SHARED           = 0x00008000
	LR_VGACOLOR         = 0x00000080
)

LoadImage constants

View Source
const (
	NIM_ADD        = 0x00000000
	NIM_MODIFY     = 0x00000001
	NIM_DELETE     = 0x00000002
	NIM_SETFOCUS   = 0x00000003
	NIM_SETVERSION = 0x00000004

	NIF_MESSAGE  = 0x00000001
	NIF_ICON     = 0x00000002
	NIF_TIP      = 0x00000004
	NIF_STATE    = 0x00000008
	NIF_INFO     = 0x00000010
	NIF_GUID     = 0x00000020
	NIF_REALTIME = 0x00000040
	NIF_SHOWTIP  = 0x00000080

	NIS_HIDDEN     = 0x00000001
	NIS_SHAREDICON = 0x00000002

	NIIF_NONE               = 0x00000000
	NIIF_INFO               = 0x00000001
	NIIF_WARNING            = 0x00000002
	NIIF_ERROR              = 0x00000003
	NIIF_USER               = 0x00000004
	NIIF_NOSOUND            = 0x00000010
	NIIF_LARGE_ICON         = 0x00000020
	NIIF_RESPECT_QUIET_TIME = 0x00000080
	NIIF_ICON_MASK          = 0x0000000F

	NIN_BALLOONSHOW      = 0x0402
	NIN_BALLOONTIMEOUT   = 0x0404
	NIN_BALLOONUSERCLICK = 0x0405
)

NotifyIcon constants

View Source
const (
	SW_HIDE        = 0
	SW_SHOW        = 5
	SW_SHOWDEFAULT = 10
	SW_SHOWNORMAL  = 1
)

ShowWindow constants

View Source
const (
	WM_DESTROY       = 0x0002
	WM_SETICON       = 0x0080
	WM_MOUSEMOVE     = 0x0200
	WM_LBUTTONDOWN   = 0x0201
	WM_LBUTTONUP     = 0x0202
	WM_LBUTTONDBLCLK = 0x0203
	WM_RBUTTONDOWN   = 0x0204
	WM_RBUTTONUP     = 0x0205
	WM_RBUTTONDBLCLK = 0x0206
	WM_APP           = 0x8000
)

Window messages

View Source
const (
	WS_CAPTION          = 0x00c00000
	WS_MAXIMIZEBOX      = 0x00010000
	WS_MINIMIZEBOX      = 0x00020000
	WS_OVERLAPPED       = 0x00000000
	WS_SYSMENU          = 0x00080000
	WS_THICKFRAME       = 0x00040000
	WS_OVERLAPPEDWINDOW = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
)

Window styles

View Source
const (
	COLOR_WINDOW = 5
)

GetSysColor constants

View Source
const (
	CW_USEDEFAULT = ^0x7fffffff
)
View Source
const (
	IDC_ARROW = 32512
)

LoadCursor constants

View Source
const (
	IDI_APPLICATION = 32512
)

LoadIcon constants

View Source
const (
	WTS_CURRENT_SERVER_HANDLE = 0
)

WTS API constants

Variables

This section is empty.

Functions

func CreateWindowEx

func CreateWindowEx(
	dwExStyle uint32,
	lpClassName, lpWindowName *uint16,
	dwStyle uint32,
	X, Y, nWidth, nHeight int32,
	hWndParent, hMenu, hInstance uintptr,
	lpParam unsafe.Pointer) uintptr

func DefWindowProc

func DefWindowProc(hWnd uintptr, Msg uint32, wParam, lParam uintptr) uintptr

func DispatchMessage

func DispatchMessage(lpMsg *MSG) uintptr

func GetLastError

func GetLastError() error

func GetModuleHandle

func GetModuleHandle(lpModuleName *uint16) uintptr

func HIWORD

func HIWORD(dwValue uint32) uint16

func LOWORD

func LOWORD(dwValue uint32) uint16

func LoadCursor

func LoadCursor(hInstance uintptr, lpCursorName *uint16) uintptr

func LoadIcon

func LoadIcon(hInstance uintptr, lpIconName *uint16) uintptr

func LoadImage

func LoadImage(hInst uintptr, name *uint16, type_ uint32, cx, cy int32, fuLoad uint32) uintptr

func MAKEINTRESOURCE

func MAKEINTRESOURCE(i uintptr) *uint16

func PostQuitMessage

func PostQuitMessage(nExitCode int32)

func RegisterClassEx

func RegisterClassEx(Arg1 *WNDCLASSEX) uint16

func SendMessage

func SendMessage(hWnd uintptr, Msg uint32, wParam, lParam uintptr) uintptr

func UTF16PtrToString

func UTF16PtrToString(p *uint16) string

func WTSFreeMemory

func WTSFreeMemory(pMemory unsafe.Pointer)

Types

type BOOL

type BOOL int32

func DestroyIcon

func DestroyIcon(hIcon uintptr) BOOL

func GetMessage

func GetMessage(lpMsg *MSG, hWnd uintptr, uMsgFilterMin, uMsgFilterMax uint32) BOOL

func Shell_NotifyIcon

func Shell_NotifyIcon(dwMessage uint32, lpData *NOTIFYICONDATA) BOOL

func ShowWindow

func ShowWindow(hWnd uintptr, nCmdShow int32) BOOL

func TranslateMessage

func TranslateMessage(lpMsg *MSG) BOOL

func UpdateWindow

func UpdateWindow(hWnd uintptr) BOOL

func WTSEnumerateProcesses

func WTSEnumerateProcesses(
	hServer uintptr,
	Reserved, Version uint32,
	ppProcessInfo **WTS_PROCESS_INFO,
	pCount *uint32) BOOL

type GUID

type GUID struct {
	Data1 uint32
	Data2 uint16
	Data3 uint16
	Data4 [8]byte
}

type MSG

type MSG struct {
	Hwnd     uintptr
	Message  uint32
	WParam   uintptr
	LParam   uintptr
	Time     uint32
	Pt       POINT
	LPrivate uint32
}

type NOTIFYICONDATA

type NOTIFYICONDATA struct {
	CbSize           uint32
	HWnd             uintptr
	UID              uint32
	UFlags           uint32
	UCallbackMessage uint32
	HIcon            uintptr
	SzTip            [128]uint16
	DwState          uint32
	DwStateMask      uint32
	SzInfo           [256]uint16
	UVersion         uint32
	SzInfoTitle      [64]uint16
	DwInfoFlags      uint32
	GuidItem         GUID
	HBalloonIcon     uintptr
}

type POINT

type POINT struct {
	X int32
	Y int32
}

type SID

type SID struct {
	Revision            byte
	SubAuthorityCount   byte
	IdentifierAuthority SID_IDENTIFIER_AUTHORITY
}

type SID_IDENTIFIER_AUTHORITY

type SID_IDENTIFIER_AUTHORITY struct {
	Value [6]byte
}

type WNDCLASSEX

type WNDCLASSEX struct {
	CbSize        uint32
	Style         uint32
	LpfnWndProc   uintptr
	CbClsExtra    int32
	CbWndExtra    int32
	HInstance     uintptr
	HIcon         uintptr
	HCursor       uintptr
	HbrBackground uintptr
	LpszMenuName  *uint16
	LpszClassName *uint16
	HIconSm       uintptr
}

type WTS_PROCESS_INFO

type WTS_PROCESS_INFO struct {
	SessionId    uint32
	ProcessId    uint32
	PProcessName *uint16
	PUserSid     *SID
}

Jump to

Keyboard shortcuts

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