user32

package
v0.0.0-...-078ca72 Latest Latest
Warning

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

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

Documentation

Rendered for windows/amd64

Index

Constants

View Source
const (
	HWND_MESSAGE          uintptr = ^uintptr(2)
	INPUT_MOUSE           uint32  = 0
	INPUT_KEYBOARD        uint32  = 1
	INPUT_HARDWARE        uint32  = 2
	MAPVK_VK_TO_VSC       uint32  = 0
	MAPVK_VSC_TO_VK       uint32  = 1
	MAPVK_VK_TO_CHAR      uint32  = 2
	MAPVK_VSC_TO_VK_EX    uint32  = 3
	KEYEVENTF_EXTENDEDKEY uint32  = 0x1
	KEYEVENTF_KEYUP       uint32  = 0x2
	KEYEVENTF_UNICODE     uint32  = 0x4
	KEYEVENTF_SCANCODE    uint32  = 0x8
	VK_SHIFT              uint16  = 0x10
	VK_CONTROL            uint16  = 0x11
	VK_MENU               uint16  = 0x12
	MOD_ALT               uint16  = 0x0001
	MOD_CONTROL           uint16  = 0x0002
	MOD_NOREPEAT          uint16  = 0x4000
	MOD_SHIFT             uint16  = 0x0004
	WM_QUIT               uint32  = 0x0012
	WM_HOTKEY             uint32  = 0x0312
)

Variables

This section is empty.

Functions

func CreateWindowEx

func CreateWindowEx(dwExStyle uint32, lpClassName uintptr, lpWindowName string, dwStyle uint32, x, y, nWidth, nHeight int32, hWndParent, hMenu, hInstance uintptr, lpParam unsafe.Pointer) (hWnd uintptr, err error)

func DefWindowProc

func DefWindowProc(hWnd uintptr, uMsg uint32, wParam, lParam uintptr) (lResult uintptr)

func DispatchMessage

func DispatchMessage(lpMsg *MSG) (lResult uintptr)

func MapVirtualKey

func MapVirtualKey(uCode, uMapType uint32) (uResult uint32)

func PostMessage

func PostMessage(hWnd uintptr, Msg uint32, wParam, lParam uintptr) (bResult bool, err error)

func RegisterClassEx

func RegisterClassEx(style uint32, lpfnWndProc WindowProc, cbClsExtra, cbWndExtra int32, hInstance, hIcon, hCursor, hbrBackground, lpszMenuName uintptr, lpszClassName string, hIconSm uintptr) (hClass uint16, err error)

func RegisterHotKey

func RegisterHotKey(hWnd uintptr, id int32, fsModifiers, vk uint32) (bResult bool, err error)

func SendInput

func SendInput(pInputs []INPUT_KEYBDINPUT) (nResult uint32, err error)

func TranslateMessage

func TranslateMessage(lpMsg *MSG) (bResult bool)

Types

type INPUT_KEYBDINPUT

type INPUT_KEYBDINPUT struct {
	Type    uint32
	Ki      KEYBDINPUT
	Padding [2]uint32
}

type KEYBDINPUT

type KEYBDINPUT struct {
	WVk         uint16
	WScan       uint16
	DwFlags     uint32
	Time        uint32
	DwExtraInfo uintptr
}

type MSG

type MSG struct {
	Hwnd    uintptr
	Message uint32
	WParam  uintptr
	LParam  uintptr
	Time    uint32
	Pt      struct {
		X int32
		Y int32
	}
}

func GetMessage

func GetMessage(hWnd uintptr, wMsgFilterMin, wMsgFilterMax uint32) (bResult int32, lpMsg *MSG, err error)

type WNDCLASSEX

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

type WindowProc

type WindowProc func(hWnd uintptr, uMsg uint32, wParam, lParam uintptr) uintptr

Jump to

Keyboard shortcuts

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