@ahmic/autoit-js
Version:
Node.js bindings for AutoItX3.dll
64 lines (63 loc) • 3.23 kB
TypeScript
import { IKoffiCType } from 'koffi';
export type Nominal<T, U> = T & {
[Symbol.species]?: U;
__jsType?: T;
};
export type Win32Type<T extends Nominal<unknown, unknown> | null> = IKoffiCType & {
__jsType?: NonNullable<T>['__jsType'];
[Symbol.species]?: NonNullable<T>[typeof Symbol.species];
};
export declare const AU3_INTDEFAULT = -2147483647;
export declare const SW_SHOWNORMAL = 1;
export declare const BOOL: Win32Type<Bool>;
export declare const BYTE: Win32Type<Byte>;
export declare const CHAR: Win32Type<Char>;
export declare const DWORD: Win32Type<DoubleWord>;
export declare const INT: Win32Type<Int>;
export declare const UINT: Win32Type<UnsignedInt>;
export declare const UINT_PTR: Win32Type<UnsignedIntPointer>;
export declare const WCHAR: Win32Type<WideChar>;
export declare const LONG: Win32Type<Long>;
export declare const LONG_PTR: Win32Type<LongPointer>;
export declare const VOID: Win32Type<Void>;
export declare const WORD: Win32Type<Word>;
export declare const PVOID: Win32Type<PointerToVoid>;
export declare const LPARAM: Win32Type<LongParam>;
export declare const LRESULT: Win32Type<LongResult>;
export declare const WPARAM: Win32Type<WordParam>;
export declare const LPCSTR: Win32Type<LongPointerToConstantString>;
export declare const LPWSTR: Win32Type<LongPointerToWideString>;
export declare const LPCWSTR: Win32Type<LongPointerToConstantWideString>;
export declare const LPVOID: Win32Type<LongPointerToVoid>;
export declare const HANDLE: Win32Type<Handle>;
export declare const HBITMAP: Win32Type<BitmapHandle>;
export declare const HDC: Win32Type<DeviceContextHandle>;
export declare const HINSTANCE: Win32Type<InstanceHandle>;
export declare const HMENU: Win32Type<MenuHandle>;
export declare const HWND: Win32Type<WindowHandle>;
export type Bool = Nominal<boolean, 'BOOL'>;
export type Byte = Nominal<number, 'BYTE'>;
export type Char = Nominal<string, 'CHAR'>;
export type DoubleWord = Nominal<number, 'DWORD'>;
export type Int = Nominal<number, 'INT'>;
export type UnsignedInt = Nominal<number, 'UINT'>;
export type UnsignedIntPointer = Nominal<number, 'UINT_PTR'>;
export type WideChar = Nominal<string, 'WCHAR'>;
export type Long = Nominal<number, 'LONG'>;
export type LongPointer = Nominal<number, 'LONG_PTR'>;
export type Void = Nominal<void, 'VOID'>;
export type Word = Nominal<number, 'WORD'>;
export type PointerToVoid = Nominal<IKoffiCType, 'PVOID'>;
export type LongParam = Nominal<number | bigint, 'LPARAM'>;
export type LongResult = Nominal<number, 'LRESULT'>;
export type WordParam = Nominal<number, 'WPARAM'>;
export type LongPointerToConstantString = Nominal<string, 'LPCSTR'>;
export type LongPointerToWideString = Nominal<string, 'LPWSTR'>;
export type LongPointerToConstantWideString = Nominal<string, 'LPCWSTR'>;
export type LongPointerToVoid = Nominal<IKoffiCType, 'LPVOID'>;
export type Handle = Nominal<bigint, 'HANDLE'>;
export type BitmapHandle = Nominal<Handle['__jsType'], 'HBITMAP'>;
export type DeviceContextHandle = Nominal<Handle['__jsType'], 'HDC'>;
export type InstanceHandle = Nominal<Handle['__jsType'], 'HINSTANCE'>;
export type MenuHandle = Nominal<Handle['__jsType'], 'HMENU'>;
export type WindowHandle = Nominal<Handle['__jsType'], 'HWND'>;