win32-api
Version:
FFI definitions of windows win32 api for node-ffi
46 lines (45 loc) • 2.18 kB
JavaScript
import { DTypes as W } from 'win32-def'
export const apiDef = {
BringWindowToTop: [W.BOOL, [W.HWND]],
/** url: https://docs.microsoft.com/en-us/windows/desktop/api/winuser/nf-winuser-clienttoscreen */
ClientToScreen: [W.BOOL, [W.HWND, W.LPPOINT]],
CloseWindow: [W.BOOL, [W.HWND]],
CreateWindowExW: [W.HWND, [
W.DWORD, W.LPCTSTR, W.LPCTSTR, W.DWORD,
W.INT, W.INT, W.INT, W.INT,
W.HWND, W.HMENU, W.HINSTANCE, W.LPVOID,
]],
DefWindowProcW: [W.LRESULT, [W.HWND, W.UINT, W.WPARAM, W.LPARAM]],
DestroyWindow: [W.BOOL, [W.HWND]],
DispatchMessageW: [W.LRESULT, [W.LPMSG]],
EnumThreadWindows: [W.BOOL, [W.DWORD, W.WNDENUMPROC, W.LPARAM]],
EnumWindows: [W.BOOL, [W.WNDENUMPROC, W.LPARAM]],
FindWindowExW: [W.HWND, [W.HWND, W.HWND, W.LPCTSTR, W.LPCTSTR]],
GetAncestor: [W.HWND, [W.HWND, W.UINT]],
GetClassInfoExW: [W.BOOL, [W.HINSTANCE, W.LPCTSTR, W.LPWNDCLASSEX]],
GetForegroundWindow: [W.HWND, []],
GetMessageW: [W.BOOL, [W.LPMSG, W.HWND, W.UINT, W.UINT]],
GetParent: [W.HWND, [W.HWND]],
GetTopWindow: [W.HWND, [W.HWND]],
GetWindow: [W.HWND, [W.HWND, W.UINT]],
GetWindowInfo: [W.BOOL, [W.HWND, W.PWINDOWINFO]],
GetWindowLongW: [W.LONG, [W.HWND, W.INT]],
GetWindowTextW: [W.INT, [W.HWND, W.LPTSTR, W.INT]],
GetWindowThreadProcessId: [W.DWORD, [W.HWND, W.LPDWORD]],
IsWindowVisible: [W.BOOL, [W.HWND]],
PeekMessageW: [W.BOOL, [W.LPMSG, W.HWND, W.UINT, W.UINT, W.UINT]],
PostMessageW: [W.BOOL, [W.HWND, W.UINT, W.WPARAM, W.LPARAM]],
RegisterClassExW: [W.ATOM, [W.WNDCLASSEX]],
SendMessageW: [W.LRESULT, [W.HWND, W.UINT, W.WPARAM, W.LPARAM]],
SetWindowTextW: [W.BOOL, [W.HWND, W.LPCTSTR]],
SetWinEventHook: [W.HWINEVENTHOOK, [W.UINT, W.UINT, W.HMODULE, W.WINEVENTPROC, W.DWORD, W.DWORD, W.UINT]],
ShowWindow: [W.BOOL, [W.HWND, W.INT]],
TranslateMessage: [W.BOOL, [W.LPMSG]],
TranslateMessageEx: [W.BOOL, [W.LPMSG]],
UnhookWinEvent: [W.BOOL, [W.HWINEVENTHOOK]],
UpdateWindow: [W.BOOL, [W.HWND]],
}
/* istanbul ignore next */
if (process.arch === 'x64') {
apiDef.GetWindowLongPtrW = [W.LONG_PTR, [W.HWND, W.INT]]
}