user32 library

Classes

HardwareInput
HHook
HHook type
Hwnd
Handle type.
Immutable
Used to annotate a class. [...]
Input
KeyboardInput
MouseInput
Msg
Msg struct
Point
Point struct
Required
Used to annotate a named parameter p in a method or function f. [...]

Constants

alwaysThrows → const _AlwaysThrows
Used to annotate a function f. Indicates that f always throws an exception. Any functions that override f, in class inheritence, are also expected to conform to this contract. [...]
const _AlwaysThrows()
checked → const _Checked
Used to annotate a parameter of an instance method that overrides another method. [...]
const _Checked()
experimental → const _Experimental
Used to annotate a library, or any declaration that is part of the public interface of a library (such as top-level members, class members, and function parameters) to indicate that the annotated API is experimental and may be removed or changed at any-time without updating the version of the containing package, despite the fact that it would otherwise be a breaking change. [...]
const _Experimental()
factory → const _Factory
Used to annotate an instance or static method m. Indicates that m must either be abstract or must return a newly allocated object or null. In addition, every method that either implements or overrides m is implicitly annotated with this same annotation. [...]
const _Factory()
immutable → const Immutable
Used to annotate a class C. Indicates that C and all subtypes of C must be immutable. [...]
const Immutable()
isTest → const _IsTest
Used to annotate a test framework function that runs a single test. [...]
const _IsTest()
isTestGroup → const _IsTestGroup
Used to annotate a test framework function that runs a group of tests. [...]
const _IsTestGroup()
KeyBoardEvent → const void Function({int bScan, int bVk, int dwExtraInfo, int dwFlags})
Alias to KeybdEvent
KeybdEvent
literal → const _Literal
Used to annotate a const constructor c. Indicates that any invocation of the constructor must use the keyword const unless one or more of the arguments to the constructor is not a compile-time constant. [...]
const _Literal()
MOUSEEVENTF_ABSOLUTE → const int
absolute move
0x8000
MOUSEEVENTF_LEFTDOWN → const int
left button down
0x0002
MOUSEEVENTF_LEFTUP → const int
left button up
0x0004
MOUSEEVENTF_MIDDLEDOWN → const int
middle button down
0x0020
MOUSEEVENTF_MIDDLEUP → const int
middle button up
0x0040
MOUSEEVENTF_MOVE → const int
mouse move
0x0001
MOUSEEVENTF_RIGHTDOWN → const int
right button down
0x0008
MOUSEEVENTF_RIGHTUP → const int
right button up
0x0010
MOUSEEVENTF_VIRTUALDESK → const int
map to entire virtual desktop
0x4000
MOUSEEVENTF_WHEEL → const int
wheel button rolled
0x0800
MOUSEEVENTF_XDOWN → const int
x button down
0x0080
MOUSEEVENTF_XUP → const int
x button up
0x0100
mustCallSuper → const _MustCallSuper
Used to annotate an instance method m. Indicates that every invocation of a method that overrides m must also invoke m. In addition, every method that overrides m is implicitly annotated with this same annotation. [...]
const _MustCallSuper()
nonVirtual → const _NonVirtual
Used to annotate an instance member (method, getter, setter, operator, or field) m in a class C or mixin M. Indicates that m should not be overridden in any classes that extend or mixin C or M. [...]
const _NonVirtual()
optionalTypeArgs → const _OptionalTypeArgs
Used to annotate a class, mixin, or extension declaration C. Indicates that any type arguments declared on C are to be treated as optional. Tools such as the analyzer and linter can use this information to suppress warnings that would otherwise require type arguments on C to be provided.
const _OptionalTypeArgs()
protected → const _Protected
Used to annotate an instance member (method, getter, setter, operator, or field) m in a class C. If the annotation is on a field it applies to the getter, and setter if appropriate, that are induced by the field. Indicates that m should only be invoked from instance methods of C or classes that extend, implement or mix in C, either directly or indirectly. Additionally indicates that m should only be invoked on this, whether explicitly or implicitly. [...]
const _Protected()
required → const Required
Used to annotate a named parameter p in a method or function f. Indicates that every invocation of f must include an argument corresponding to p, despite the fact that p would otherwise be an optional parameter. [...]
const Required()
sealed → const _Sealed
Annotation marking a class as not allowed as a super-type. [...]
const _Sealed()
virtual → const _Virtual
Used to annotate a field that is allowed to be overridden in Strong Mode. [...]
const _Virtual()
visibleForOverriding → const _VisibleForOverriding
Used to annotate an instance member that was made public so that it could be overridden but that is not intended to be referenced from outside the defining library. [...]
const _VisibleForOverriding()
visibleForTesting → const _VisibleForTesting
Used to annotate a declaration was made public, so that it is more visible than otherwise necessary, to make code testable. [...]
const _VisibleForTesting()

Functions

CallNextHookEx({int nCode, int wParam, int lParam, Pointer<HHook> hhk}) int
Passes the hook information to the next hook procedure in the current hook chain. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-callnexthookex
FindWindowEx({Pointer<Hwnd> hWndParent, Pointer<Hwnd> hWndChildAfter, Pointer<Utf8> lpszClass, Pointer<Utf8> lpszWindow, TextFormat textFormat: TextFormat.utf16}) Pointer<Hwnd>
Retrieves a handle to a window whose class name and window name match the specified strings. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-findwindowexa
GetActiveWindow() Pointer<Hwnd>
Retrieves the window handle to the active window attached to the calling thread's message queue. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getactivewindow
GetCursorPos({Point point}) bool
Get the current cursor position. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getcursorpos
GetDesktopWindow() Pointer<Hwnd>
Retrieves a handle to the desktop window. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdesktopwindow
GetForegroundWindow() Pointer<Hwnd>
Retrieves a handle to the foreground window (the window with which the user is currently working). See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getforegroundwindow
GetKeyState({int nVirtKey}) int
Retrieves the status of the specified virtual key. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getkeystate
GetMessage({Pointer<Msg> lpMsg, Pointer<Hwnd> hwnd, int wMsgFilterMin: 0, int wMsgFilterMax: 0, TextFormat textFormat: TextFormat.utf16}) bool
Retrieves a message from the calling thread's message queue. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessage
GetWindowText({Pointer<Hwnd> hWnd, Pointer<Utf8> lpString, int nMaxCount, TextFormat textFormat: TextFormat.utf16}) int
Copies the text of the specified window's title bar (if it has one) into a buffer. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowtexta
GetWindowTextLength({Pointer<Hwnd> hWnd, TextFormat textFormat: TextFormat.utf16}) int
Retrieves the length, in characters, of the specified window's title bar text (if the window has a title bar). See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getwindowtextlengtha
KeybdEvent({int bVk, int bScan: 0, int dwFlags: 0, int dwExtraInfo: 0}) → void
Synthesises a keystore. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-keybd_event
MouseEvent({int dwFlags, int dx: 0, int dy: 0, int dwData: 0, int dwExtraData: 0, int dwExtraInfo: 0}) → void
Synthesizes mouse motion and button clicks. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mouse_event
RegisterHotKey({int vk, Pointer<Hwnd> hWnd, int id: 1, int fsModifiers: 0}) bool
Defines a system-wide hot key. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerhotkey
SendInput({int type, MouseInput mi, KeyboardInput ki, HardwareInput hi}) int
Synthesizes keystrokes, mouse motions, and button clicks. Not working. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendinput
@experimental
SetCursorPos({int x, int y}) bool
Set the cursor position See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setcursorpos
SetCursorPosFromPoint({Point point}) bool
Set the cursor position given a point structure. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setcursorpos
SetWindowsHookEx({int idHook, HookprocDart callback, Pointer<NativeType> hmod, int dwThreadId: 0, TextFormat textFormat: TextFormat.utf16}) Pointer<HHook>
Installs an application-defined hook procedure into a hook chain. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowshookexa
@alwaysThrows, @experimental
ShowWindow({Pointer<Hwnd> hWnd, int nCmdShow}) bool
Sets the specified window's show state. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showwindow
UnregisterHotKey({int id, Pointer<Hwnd> hWnd}) bool
Frees a hot key previously registered by the calling thread. See https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-unregisterhotkey

Enums

TextFormat
TextFormat, ansi will use *A functions and utf18 *W functions.

Typedefs

CallNextHookExC(Pointer<NativeType> hhk, Uint32 nCode, Uint32 wParam, Uint32 lParam) Uint32
CallNextHookExDart(Pointer<HHook> hhk, int nCode, int wParam, int lParam) int
FindWindowExC(Pointer<Hwnd> hWndParent, Pointer<Hwnd> hWndChildAfter, Pointer<Utf8> lpszClass, Pointer<Utf8> lpszWindow) Pointer<Hwnd>
FindWindowExDart(Pointer<Hwnd> hWndParent, Pointer<Hwnd> hWndChildAfter, Pointer<Utf8> lpszClass, Pointer<Utf8> lpszWindow) Pointer<Hwnd>
GetActiveWindowC() Pointer<Hwnd>
GetActiveWindowDart() Pointer<Hwnd>
GetCursorC(Pointer<Point> point) Uint8
GetCursorDart(Pointer<Point> point) int
GetDesktopWindowC() Pointer<Hwnd>
GetDesktopWindowDart() Pointer<Hwnd>
GetForegroundWindowC() Pointer<Hwnd>
GetForegroundWindowDart() Pointer<Hwnd>
GetKeyStateC(Uint32 nVirtKey) Int16
GetKeyStateDart(int nVirtKey) int
GetMessageC(Pointer<Msg> lpMsg, Pointer<Hwnd> hwnd, Uint32 wMsgFilterMin, Uint64 wMsgFilterMax) Uint8
GetMessageDart(Pointer<Msg> lpMsg, Pointer<Hwnd> hwnd, int wMsgFilterMin, int wMsgFilterMax) int
GetWindowTextC(Pointer<Hwnd> hWnd, Pointer<Utf8> lpString, Uint32 nMaxCount) Uint32
GetWindowTextDart(Pointer<Hwnd> hWnd, Pointer<Utf8> lpString, int nMaxCount) int
GetWindowTextLengthC(Pointer<Hwnd> hWnd) Uint32
GetWindowTextLengthDart(Pointer<Hwnd> hWnd) int
HookprocC(Int32 code, Uint32 wParam, Uint32 lParam) Uint32
HookprocDart(int code, int wParam, int lParam) int
KeybdEventC(Uint8 bVk, Uint8 bScan, Uint32 dwFlags, Uint32 dwExtraInfo) Void
KeybdEventDart(int bVk, int bScan, int dwFlags, int dwExtraInfo) → void
MouseEventC(Uint32 dwFlags, Uint32 dx, Uint32 dy, Uint32 dwData, Uint32 dwExtraData, Uint32 dwExtraInfo) Void
MouseEventDart(int dwFlags, int dx, int dy, int dwData, int dwExtraData, int dwExtraInfo) → void
RegisterHotKeyC(Pointer<Hwnd> hWnd, Int32 id, Uint32 fsModifiers, Uint32 vk) Uint8
RegisterHotKeyDart(Pointer<Hwnd> point, int id, int fsModifiers, int vk) int
SendInputC(Uint32 cInputs, Pointer<NativeType> pInputs, Int32 cbSize) Uint32
SendInputDart(int inputCount, Pointer<NativeType> inputs, int size) int
SetCursorPosC(Uint32 x, Int32 y) Uint8
SetCursorPosDart(int x, int y) int
SetWindowsHookExAC(Uint32 code, Pointer<NativeFunction<HookprocC>> lpfn, Pointer<NativeType> hmod, Uint32 dwThreadId) Pointer<HHook>
SetWindowsHookExADart(int code, Pointer<NativeFunction<HookprocC>> lpfn, Pointer<NativeType> hmod, int dwThreadId) Pointer<HHook>
ShowWindowC(Pointer<Hwnd> hWnd, Int32 nCmdShow) Uint8
ShowWindowDart(Pointer<Hwnd> hWnd, int nCmdShow) int
UnregisterHotKeyC(Pointer<Hwnd> hWnd, Int32 id) Uint8
UnregisterHotKeyDart(Pointer<Hwnd> point, int id) int