import { type HWND, type LRESULT, type WPARAM, type LPARAM } from '../ctypes.js'; import { BSMINFO, type MSG } from '../structs.js'; import type { BSM_, BSF_, PM_ } from '../consts.js'; /** * Sends a message to the specified recipients. The recipients can be applications, installable drivers, * network drivers, system-level device drivers, or any combination of these system components. * * Returns `true` if the function succeeds or `false` if there was an error or the dwFlags parameter is `BSF_QUERY` * and at least one recipient returned `BROADCAST_QUERY_DENY` to the corresponding message. * * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-broadcastsystemmessagew */ export declare function BroadcastSystemMessage(flags: BSF_, info: BSM_, msg: number, wParam: WPARAM, lParam: LPARAM): boolean; /** * Sends a message to the specified recipients. This function is similar to BroadcastSystemMessage * except that this function can return more information from the recipients. * * Returns `true` if the function succeeds, `false` if there was an error, or a BSMINFO structure if the dwFlags parameter * is `BSF_QUERY` and at least one recipient returned `BROADCAST_QUERY_DENY` to the corresponding message. * * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-broadcastsystemmessageexw * */ export declare function BroadcastSystemMessageEx(flags: BSF_, info: BSM_, msg: number, wParam: WPARAM, lParam: LPARAM): BSMINFO | boolean; /** * Dispatches a message to a window procedure. * * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-dispatchmessagew */ export declare function DispatchMessage(msg: MSG): LRESULT; /** * Retrieves a message from the calling thread's message queue. * * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessagew */ export declare function GetMessage(hWnd: HWND | null | -1, msgFilterMin?: number, msgFilterMax?: number): MSG | null; /** * Checks the thread message queue for a posted message. * * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-peekmessagew */ export declare function PeekMessage(hWnd: HWND | null | -1, msgFilterMin: number, msgFilterMax: number, removeMsg: PM_): MSG | null; /** * Indicates to the system that a thread has made a request to terminate (quit). * * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-postquitmessage */ export declare function PostQuitMessage(exitCode: number): void; /** * Sends a message to the specified window. * * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessagew */ export declare function SendMessage(hWnd: HWND, msg: number, wParam: WPARAM, lParam: LPARAM): LRESULT; /** * Translates virtual-key messages into character messages. * * https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-translatemessage */ export declare function TranslateMessage(msg: MSG): boolean; /** * Translates virtual-key messages into character messages. * * https://learn.microsoft.com/en-us/windows/win32/winmsg/translatemessageex */ export declare function TranslateMessageEx(msg: MSG, flags: number): boolean;