Documentation ¶
Index ¶
- Constants
- func AttachThreadInput(idAttach, idAttachTo *uint32, fAttach bool) (isBrought bool, err error)
- func BringWindowToTop(hwnd syscall.Handle) (isBrought bool, err error)
- func EnumChildWindows(hWndParent syscall.Handle, lpEnumFunc, lParam uintptr) (err error)
- func EnumWindows(enumFunc uintptr, lparam uintptr) (success bool, err error)
- func FindWindowEx(hwndParent, hwndChildAfter syscall.Handle, lpszClass, lpszWindow *uint16) (hwnd syscall.Handle, err error)
- func FindWindowW(lpClassName, lpWindowName *uint16) (hwnd syscall.Handle, err error)
- func GetActiveWindow() (hwnd syscall.Handle, err error)
- func GetClassName(hWnd syscall.Handle) (name string, err error)
- func GetDesktopWindow() (hwnd syscall.Handle, err error)
- func GetDlgItem(hDlg syscall.Handle, nIDDlgItem int32) (hwnd syscall.Handle, err error)
- func GetForegroundWindow() (hwnd syscall.Handle, err error)
- func GetSystemMetrics(nIndex int32) (metric int32, err error)
- func GetWindowRect(hWnd syscall.Handle, rect *RECT) (success bool, err error)
- func GetWindowText(hWnd syscall.Handle, str *uint16, maxCount int32) (len int32, err error)
- func GetWindowThreadProcessId(hWnd syscall.Handle, lpdwProcessId *uint32) (windowCreatorThreadId int32, err error)
- func IsWindowUnicode(hWnd syscall.Handle) (isUnicode bool, err error)
- func SendInput(cInputs uint32, pInputs unsafe.Pointer, cbSize int32) (successedEventsNumber int32, err error)
- func SendMessage(hWnd syscall.Handle, msg uint32, wParam, lParam uintptr) (lResult uintptr, err error)
- func SetForegroundWindow(hwnd syscall.Handle) (isBrought bool, err error)
- func ShowWindow(hWnd syscall.Handle, nCmdShow int32) (hidden bool, err error)
- type RECT
Constants ¶
const ( WM_USER uint32 = 1024 TB_BUTTONCOUNT uint32 = WM_USER + 24 TB_COMMANDTOINDEX uint32 = WM_USER + 25 TB_GETBUTTONINFOW uint32 = WM_USER + 63 TB_GETBUTTONINFOA uint32 = WM_USER + 65 TB_GETBUTTONTEXT uint32 = WM_USER + 75 )
SendMessage
const ( SM_CXSCREEN = 0 SM_CYSCREEN = 1 )
GetSystemMetrics constants
const ( MOUSEEVENTF_ABSOLUTE = 0x8000 MOUSEEVENTF_MOVE = 0x0001 MOUSEEVENTF_MOVE_NOCOALESCE = 0x2000 MOUSEEVENTF_LEFTDOWN = 0x0002 MOUSEEVENTF_LEFTUP = 0x0004 )
MOUSEINPUT DwFlags
const ( SW_HIDE = 0 SW_NORMAL = 1 SW_SHOWNORMAL = 1 SW_SHOWMINIMIZED = 2 SW_MAXIMIZE = 3 SW_SHOWMAXIMIZED = 3 SW_SHOWNOACTIVATE = 4 SW_SHOW = 5 SW_MINIMIZE = 6 SW_SHOWMINNOACTIVE = 7 SW_SHOWNA = 8 SW_RESTORE = 9 SW_SHOWDEFAULT = 10 SW_FORCEMINIMIZE = 11 )
ShowWindow constants
const (
INPUT_MOUSE = 0
)
INPUT Type
const (
PROCESS_ALL_ACCESS = 0x1F0FFF
)
Process
Variables ¶
This section is empty.
Functions ¶
func AttachThreadInput ¶
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-attachthreadinput BOOL AttachThreadInput(
[in] DWORD idAttach, [in] DWORD idAttachTo, [in] BOOL fAttach );
func BringWindowToTop ¶
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-bringwindowtotop BOOL BringWindowToTop(
[in] HWND hWnd );
func EnumChildWindows ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumchildwindows BOOL EnumChildWindows(
HWND hWndParent, WNDENUMPROC lpEnumFunc, LPARAM lParam
);
func EnumWindows ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumwindows BOOL EnumWindows(
WNDENUMPROC lpEnumFunc, LPARAM lParam
);
func FindWindowEx ¶
func FindWindowEx(hwndParent, hwndChildAfter syscall.Handle, lpszClass, lpszWindow *uint16) (hwnd syscall.Handle, err error)
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindowexw HWND FindWindowExW(
HWND hWndParent, HWND hWndChildAfter, LPCWSTR lpszClass, LPCWSTR lpszWindow
);
func FindWindowW ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindoww HWND FindWindowW(
LPCWSTR lpClassName, LPCWSTR lpWindowName
);
func GetActiveWindow ¶
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getactivewindow HWND GetActiveWindow();
func GetClassName ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getclassnamew int GetClassNameW(
HWND hWnd, LPWSTR lpClassName, int nMaxCount
);
func GetDesktopWindow ¶
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdesktopwindow HWND GetDesktopWindow();
func GetDlgItem ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdlgitem HWND GetDlgItem(
HWND hDlg, int nIDDlgItem
);
func GetForegroundWindow ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow HWND GetForegroundWindow();
func GetSystemMetrics ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getsystemmetrics int GetSystemMetrics(
int nIndex
);
func GetWindowRect ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowrect BOOL GetWindowRect(
HWND hWnd, LPRECT lpRect
);
func GetWindowText ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowtextw https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowtexta int GetWindowText(
HWND hWnd, LPWSTR lpString, int nMaxCount
);
func GetWindowThreadProcessId ¶
func GetWindowThreadProcessId(hWnd syscall.Handle, lpdwProcessId *uint32) (windowCreatorThreadId int32, err error)
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowthreadprocessid DWORD GetWindowThreadProcessId(
HWND hWnd, LPDWORD lpdwProcessId
);
func IsWindowUnicode ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-iswindowunicode BOOL IsWindowUnicode(
HWND hWnd
);
func SendInput ¶
func SendInput(cInputs uint32, pInputs unsafe.Pointer, cbSize int32) (successedEventsNumber int32, err error)
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput UINT SendInput(
UINT cInputs, LPINPUT pInputs, int cbSize
);
func SendMessage ¶
func SendMessage(hWnd syscall.Handle, msg uint32, wParam, lParam uintptr) (lResult uintptr, err error)
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagew https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagea LRESULT SendMessageW(
HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam
);
func SetForegroundWindow ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow HWND SetForegroundWindow();
func ShowWindow ¶
https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow BOOL ShowWindow(
HWND hWnd, int nCmdShow
);
Types ¶
type RECT ¶
type RECT struct {
Left, Top, Right, Bottom int32
}
https://docs.microsoft.com/en-us/windows/win32/api/windef/ns-windef-rect
typedef struct tagRECT { LONG left; LONG top; LONG right; LONG bottom; } RECT, *PRECT, *NPRECT, *LPRECT;