UNPKG

win32-def

Version:
927 lines (884 loc) 35.4 kB
import * as T from '##/lib/common.types.js'; import { StructInitType, StructFactoryResult, StructDetail, StructInitPlainType } from '##/lib/types.js'; import { PRINTER_STATUS } from '##/lib/consts/index.consts.js'; import { IKoffiCType } from 'koffi'; declare const init$A: StructInitType; declare const LPINITCOMMONCONTROLSEX: "INITCOMMONCONTROLSEX*"; declare const INITCOMMONCONTROLSEX_Name = "INITCOMMONCONTROLSEX"; declare const INITCOMMONCONTROLSEX_Init: typeof init$A; /** * INITCOMMONCONTROLSEX structure * @link https://learn.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-initcommoncontrolsex */ declare function INITCOMMONCONTROLSEX_Factory(): StructFactoryResult<INITCOMMONCONTROLSEX_Type>; /** * INITCOMMONCONTROLSEX structure * @link https://learn.microsoft.com/en-us/windows/win32/api/commctrl/nf-commctrl-initcommoncontrolsex */ interface INITCOMMONCONTROLSEX_Type { dwSize: T.DWORD; dwICC: T.DWORD; } declare const init$z: StructInitType; declare const LPFILETIME: "FILETIME*"; declare const LPFILETIME_Name = "FILETIME"; declare const FILETIME_Init: typeof init$z; /** * FILETIME structure * @link https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime */ declare function FILETIME_Factory(): StructFactoryResult<FILETIME_Type>; /** * FILETIME structure * @link https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-filetime */ interface FILETIME_Type { dwLowDateTime: T.DWORD; dwHighDateTime: T.DWORD; } declare const init$y: StructInitType; declare const LPSYSTEMTIME: "SYSTEMTIME*"; declare const SYSTEMTIME_Name = "SYSTEMTIME"; declare const SYSTEMTIME_Init: typeof init$y; /** * SYSTEMTIME structure * @link https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-systemtime */ declare function SYSTEMTIME_Factory(): StructFactoryResult<SYSTEMTIME_Type>; /** * SYSTEMTIME structure * @link https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-systemtime */ interface SYSTEMTIME_Type { wYear: T.WORD; wMonth: T.WORD; wDayOfWeek: T.WORD; wDay: T.WORD; wHour: T.WORD; wMinute: T.WORD; wSecond: T.WORD; wMilliseconds: T.WORD; } declare const init$x: StructInitType; declare const LPPOINT: "POINT*"; declare const POINT_Name = "POINT"; declare const POINT_Init: typeof init$x; /** * POINT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/windef/ns-windef-point */ declare function POINT_Factory(): StructFactoryResult<POINT_Type>; /** * POINT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/windef/ns-windef-point */ interface POINT_Type { x: T.LONG; y: T.LONG; } declare const init$w: StructInitType; declare const LPRECT: "RECT*"; declare const RECT_Name = "RECT"; declare const RECT_Init: typeof init$w; /** * RECT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/windef/ns-windef-RECT */ declare function RECT_Factory(): StructFactoryResult<RECT_Type>; /** * RECT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/windef/ns-windef-RECT */ interface RECT_Type { left: T.LONG; top: T.LONG; right: T.LONG; bottom: T.LONG; } declare const init$v: StructInitType; declare const LPDEVMODEW: "DEVMODEW*"; declare const DEVMODEW_Name = "DEVMODEW"; declare const DEVMODEW_Init: typeof init$v; /** * DEVMODEW structure * @link https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-devmodew */ declare function DEVMODEW_Factory(): StructFactoryResult<DEVMODEW_Type>; /** * DEVMODEW structure * @link https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-devmodew */ interface DEVMODEW_Type { dmDeviceName: T.WCHAR; dmSpecVersion: T.WORD; dmDriverVersion: T.WORD; dmSize: T.WORD; dmDriverExtra: T.WORD; dmFields: T.DWORD; u1: { s1: { dmOrientation: T.SHORT; dmPaperSize: T.SHORT; dmPaperLength: T.SHORT; dmPaperWidth: T.SHORT; dmScale: T.SHORT; dmCopies: T.SHORT; dmDefaultSource: T.SHORT; dmPrintQuality: T.SHORT; }; dmPosition: POINT_Type; s2: { dmPosition: POINT_Type; dmDisplayOrientation: T.DWORD; dmDisplayFixedOutput: T.DWORD; }; }; dmColor: T.SHORT; dmDuplex: T.SHORT; dmYResolution: T.SHORT; dmTTOption: T.SHORT; dmCollate: T.SHORT; dmFormName: T.WCHAR; dmLogPixels: T.WORD; dmBitsPerPel: T.DWORD; dmPelsWidth: T.DWORD; dmPelsHeight: T.DWORD; u2: { dmDisplayFlags: T.DWORD; dmNup: T.DWORD; }; dmDisplayFrequency: T.DWORD; dmICMMethod: T.DWORD; dmICMIntent: T.DWORD; dmMediaType: T.DWORD; dmDitherType: T.DWORD; dmReserved1: T.DWORD; dmReserved2: T.DWORD; dmPanningWidth: T.DWORD; dmPanningHeight: T.DWORD; } declare const init$u: StructInitType; declare const LPDISPLAY_DEVICEW: "DISPLAY_DEVICEW*"; declare const DISPLAY_DEVICEW_Name = "DISPLAY_DEVICEW"; declare const DISPLAY_DEVICEW_Init: typeof init$u; /** * DISPLAY_DEVICEW structure * @link https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-display_devicew */ declare function DISPLAY_DEVICEW_Factory(): StructFactoryResult<DISPLAY_DEVICEW_Type>; /** * DISPLAY_DEVICEW structure * @link https://learn.microsoft.com/en-us/windows/win32/api/wingdi/ns-wingdi-display_devicew */ interface DISPLAY_DEVICEW_Type { cb: T.DWORD; DeviceName: T.WCHAR_Array; DeviceString: T.WCHAR_Array; StateFlags: T.DWORD; DeviceID: T.WCHAR_Array; DeviceKey: T.WCHAR_Array; } declare const init$t: StructInitType; declare const LPDOC_INFO_1: "DOC_INFO_1*"; declare const DOC_INFO_1_Name = "DOC_INFO_1"; declare const DOC_INFO_1_Init: typeof init$t; /** * DOC_INFO_1 structure, * Describes a document that will be printed. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/doc-info-1 */ declare function DOC_INFO_1_Factory(): StructFactoryResult<DOC_INFO_1_Type>; /** * DOC_INFO_1 structure, * Describes a document that will be printed. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/doc-info-1 */ interface DOC_INFO_1_Type { pDocName: T.WString; pOutputFile: T.WString | null; pDatatype: T.WString; } declare const init$s: StructInitType; declare const PJOB_INFO_1: "JOB_INFO_1*"; declare const JOB_INFO_1_Name = "JOB_INFO_1"; declare const JOB_INFO_1_Init: typeof init$s; /** * JOB_INFO_1 structure, * The JOB_INFO_1 structure specifies print-job information such as the job-identifier value * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/job-info-1 */ declare function JOB_INFO_1_Factory(): StructFactoryResult<JOB_INFO_1_Type>; /** * JOB_INFO_1 structure, * The JOB_INFO_1 structure specifies print-job information such as the job-identifier value * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/job-info-1 */ interface JOB_INFO_1_Type { JobId: T.DWORD; pPrinterName: T.LPTSTR; pMachineName: T.LPTSTR; pUserName: T.LPTSTR; pDocument: T.LPTSTR; pDatatype: T.LPTSTR; pStatus: T.LPTSTR; Status: T.DWORD; Priority: T.DWORD; Position: T.DWORD; TotalPages: T.DWORD; PagesPrinted: T.DWORD; Submitted: SYSTEMTIME_Type; } declare const init$r: StructInitType; declare const PPRINTER_DEFAULTS: "PRINTER_DEFAULTS*"; declare const PRINTER_DEFAULTS_Name = "PRINTER_DEFAULTS"; declare const PRINTER_DEFAULTS_Init: typeof init$r; /** * PRINTER_DEFAULTS structure, * Specifies the default data type, environment, initialization data, and access rights for a printer. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/printer-defaults */ declare function PRINTER_DEFAULTS_Factory(): StructFactoryResult<PRINTER_DEFAULTS_Type>; /** * PRINTER_DEFAULTS structure, * Specifies the default data type, environment, initialization data, and access rights for a printer. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/printer-defaults */ interface PRINTER_DEFAULTS_Type { /** * Pointer to a null-terminated string that specifies the default data type for a printer. */ pDatatype: T.LPTSTR; /** * Pointer to a DEVMODE structure that identifies the default environment and initialization data for a printer. */ pDevMode: DEVMODEW_Type; DesiredAccess: T.ACCESS_MASK; } declare const init$q: StructInitType; declare const PPRINTER_INFO_1: "PRINTER_INFO_1*"; declare const PRINTER_INFO_1_Name = "PRINTER_INFO_1"; declare const PRINTER_INFO_1_Init: typeof init$q; /** * PRINTER_INFO_1 structure, * Specifies general printer information * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-1 */ declare function PRINTER_INFO_1_Factory(): StructFactoryResult<PRINTER_INFO_1_Type>; /** * PRINTER_INFO_1 structure, * Specifies general printer information * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-1 */ interface PRINTER_INFO_1_Type { Flags: T.DWORD; pDescription: T.WString; pName: T.WString; pComment: T.WString; } declare const init$p: StructInitType; declare const PPRINTER_INFO_4: "PRINTER_INFO_4*"; declare const PRINTER_INFO_4_Name = "PRINTER_INFO_4"; declare const PRINTER_INFO_4_Init: typeof init$p; /** * PRINTER_INFO_4 structure, * Specifies general printer information * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-4 * @description The structure can be used to retrieve minimal printer information on a call to EnumPrinters. * Such a call is a fast and easy way to retrieve the names and attributes of all locally installed printers * on a system and all remote printer connections that a user has established. */ declare function PRINTER_INFO_4_Factory(): StructFactoryResult<PRINTER_INFO_4_Type>; /** * PRINTER_INFO_4 structure, * Specifies general printer information * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-4 * @description The structure can be used to retrieve minimal printer information on a call to EnumPrinters. * Such a call is a fast and easy way to retrieve the names and attributes of all locally installed printers * on a system and all remote printer connections that a user has established. */ interface PRINTER_INFO_4_Type { pPrinterName: T.WString; pServerName: T.WString | null; Attributes: T.DWORD; } declare const init$o: StructInitType; declare const PPRINTER_INFO_5: "PRINTER_INFO_5*"; declare const PRINTER_INFO_5_Name = "PRINTER_INFO_5"; declare const PRINTER_INFO_5_Init: typeof init$o; /** * PRINTER_INFO_5 structure, * structure specifies detailed printer information. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-5 */ declare function PRINTER_INFO_5_Factory(): StructFactoryResult<PRINTER_INFO_5_Type>; /** * PRINTER_INFO_5 structure, * structure specifies detailed printer information. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-5 */ interface PRINTER_INFO_5_Type { pPrinterName: T.WString; pPortName: T.WString; Attributes: T.DWORD; DeviceNotSelectedTimeout: T.DWORD; TransmissionRetryTimeout: T.DWORD; } declare const init$n: StructInitType; declare const PPRINTER_INFO_8: "PRINTER_INFO_8*"; declare const PRINTER_INFO_8_Name = "PRINTER_INFO_8"; declare const PRINTER_INFO_8_Init: typeof init$n; /** * PRINTER_INFO_8 structure, * specifies the global default printer settings. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-8 */ declare function PRINTER_INFO_8_Factory(): StructFactoryResult<PRINTER_INFO_8_Type>; /** * PRINTER_INFO_8 structure, * specifies the global default printer settings. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-8 */ interface PRINTER_INFO_8_Type { pDevMode: DEVMODEW_Type; } declare const init$m: StructInitType; declare const PPRINTER_INFO_9: "PRINTER_INFO_9*"; declare const PRINTER_INFO_9_Name = "PRINTER_INFO_9"; declare const PRINTER_INFO_9_Init: typeof init$m; /** * PRINTER_INFO_9 structure, * structure specifies the per-user default printer settings. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-9 */ declare function PRINTER_INFO_9_Factory(): StructFactoryResult<PRINTER_INFO_9_Type>; /** * PRINTER_INFO_9 structure, * structure specifies the per-user default printer settings. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-9 */ interface PRINTER_INFO_9_Type { pDevMode: DEVMODEW_Type; } declare const init$l: StructInitType; declare const PPRINTPROCESSOR_INFO_1: "PRINTPROCESSOR_INFO_1*"; declare const PRINTPROCESSOR_INFO_1_Name = "PRINTPROCESSOR_INFO_1"; declare const PRINTPROCESSOR_INFO_1_Init: typeof init$l; /** * PRINTPROCESSOR_INFO_1 structure, * Specifies the name of an installed print processor. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/printprocessor-info-1 */ declare function PRINTPROCESSOR_INFO_1_Factory(): StructFactoryResult<PRINTPROCESSOR_INFO_1_Type>; /** * PRINTPROCESSOR_INFO_1 structure, * Specifies the name of an installed print processor. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/printprocessor-info-1 */ interface PRINTPROCESSOR_INFO_1_Type { pName: T.LPTSTR; } declare const init$k: StructInitType; declare const PPRINTER_INFO_6: "PRINTER_INFO_6*"; declare const PRINTER_INFO_6_Name = "PRINTER_INFO_6"; declare const PRINTER_INFO_6_Init: typeof init$k; /** * PRINTER_INFO_6 structure, * structure specifies detailed printer information. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-6 */ declare function PRINTER_INFO_6_Factory(): StructFactoryResult<PRINTER_INFO_6_Type>; /** * PRINTER_INFO_6 structure, * structure specifies detailed printer information. * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/PRINTER-INFO-6 */ interface PRINTER_INFO_6_Type { dwStatus: PRINTER_STATUS; } /** * For GetPrinter() * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/getprinter#parameters * @todo 2, 3, 6, 7 */ type PRINTER_INFO_LEVEL = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9; /** * For GetPrinter() * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/getprinter#parameters * @todo 2, 3, 6, 7 */ type PRINTER_INFO_Type = PRINTER_INFO_1_Type | PRINTER_INFO_4_Type | PRINTER_INFO_5_Type | PRINTER_INFO_8_Type | PRINTER_INFO_9_Type; /** * For GetPrinter() * @link https://learn.microsoft.com/en-us/windows/win32/printdocs/getprinter#parameters * @todo 2, 3, 7 */ type PRINTER_INFO_X_Type<X extends PRINTER_INFO_LEVEL = PRINTER_INFO_LEVEL> = X extends 1 ? PRINTER_INFO_1_Type : X extends 4 ? PRINTER_INFO_4_Type : X extends 5 ? PRINTER_INFO_5_Type : X extends 6 ? PRINTER_INFO_6_Type : X extends 8 ? PRINTER_INFO_8_Type : X extends 9 ? PRINTER_INFO_9_Type : never; /** * For EnumPrinters() * @link https://learn.microsoft.com/zh-cn/windows/win32/printdocs/enumprinters * @todo 2 */ type EnumPrinters_Level = 1 | 4 | 5; /** * For EnumPrinters() * @link https://learn.microsoft.com/zh-cn/windows/win32/printdocs/enumprinters * @todo 2 */ type EnumPrinters_Level_Type = PRINTER_INFO_1_Type | PRINTER_INFO_4_Type | PRINTER_INFO_5_Type; /** * For EnumPrinters() * @link https://learn.microsoft.com/zh-cn/windows/win32/printdocs/enumprinters * @todo 2 */ type EnumPrinters_Level_X_Type<X extends EnumPrinters_Level = EnumPrinters_Level> = X extends 1 ? PRINTER_INFO_1_Type : X extends 4 ? PRINTER_INFO_4_Type : X extends 5 ? PRINTER_INFO_5_Type : never; declare const init$j: StructInitType; declare const LPALTTABINFO: "ALTTABINFO*"; declare const ALTTABINFO_Name = "ALTTABINFO"; declare const ALTTABINFO_Init: typeof init$j; /** * ALTTABINFO structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-alttabinfo */ declare function ALTTABINFO_Factory(): StructFactoryResult<ALTTABINFO_Type>; /** * ALTTABINFO structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-alttabinfo */ interface ALTTABINFO_Type { cbSize: T.DWORD; cItems: T.INT; cColumns: T.INT; cRows: T.INT; iColFocus: T.INT; iRowFocus: T.INT; cxItem: T.INT; cyItem: T.INT; ptStart: POINT_Type; } declare const init$i: StructInitType; declare const LPCOPYDATASTRUCT: "COPYDATASTRUCT*"; declare const COPYDATASTRUCT_Name = "COPYDATASTRUCT"; declare const COPYDATASTRUCT_Init: typeof init$i; /** * COPYDATASTRUCT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-copydatastruct */ declare function COPYDATASTRUCT_Factory(): StructFactoryResult<COPYDATASTRUCT_Type>; /** * POINT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-copydatastruct */ interface COPYDATASTRUCT_Type { dwData: T.ULONG_PTR; cbData: T.DWORD; lpData: T.PVOID; } declare const init$h: StructInitType; declare const PFLASHWINFO: "FLASHWINFO*"; declare const FLASHWINFO_Name = "FLASHWINFO"; declare const FLASHWINFO_Init: typeof init$h; /** * FLASHWINFO structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-FLASHWINFO */ declare function FLASHWINFO_Factory(): StructFactoryResult<FLASHWINFO_Type>; /** * FLASHWINFO structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-FLASHWINFO */ interface FLASHWINFO_Type { cbSize: T.UINT; hwnd: T.HWND; dwFlags: T.DWORD; uCount: T.UINT; dwTimeout: T.DWORD; } declare const init$g: StructInitType; declare const LPHARDWAREINPUT: "HARDWAREINPUT*"; declare const HARDWAREINPUT_Name = "HARDWAREINPUT"; declare const HARDWAREINPUT_Init: typeof init$g; /** * HARDWAREINPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-hardwareinput */ declare function HARDWAREINPUT_Factory(): StructFactoryResult<HARDWAREINPUT_TYPE>; /** * HARDWAREINPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-hardwareinput */ interface HARDWAREINPUT_TYPE { uMsg: T.UINT32; wParamL: T.UINT16; wParamH: T.UINT16; } declare const init$f: StructInitType; declare const LPKEYBDINPUT: "KEYBDINPUT*"; declare const KEYBDINPUT_Name = "KEYBDINPUT"; declare const KEYBDINPUT_Init: typeof init$f; /** * KEYBDINPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-keybdinput */ declare function KEYBDINPUT_Factory(): StructFactoryResult<KEYBDINPUT_Type>; /** * KEYBDINPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-keybdinput */ interface KEYBDINPUT_Type { wVk: T.WORD; wScan: T.WORD; dwFlags: T.DWORD; time: T.DWORD; dwExtraInfo: T.ULONG_PTR; } declare const init$e: StructInitType; declare const LPMOUSEINPUT: "MOUSEINPUT*"; declare const MOUSEINPUT_Name = "MOUSEINPUT"; declare const MOUSEINPUT_Init: typeof init$e; /** * MOUSEINPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-mouseinput */ declare function MOUSEINPUT_Factory(): StructFactoryResult<MOUSEINPUT_Type>; /** * MOUSEINPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-mouseinput */ interface MOUSEINPUT_Type { dx: T.LONG; dy: T.LONG; mouseData: T.UINT32; dwFlags: T.UINT32; time: T.UINT32; dwExtraInfo: T.PUINT; } declare const init$d: StructInitType; declare const LPINPUT: "INPUT*"; declare const INPUT_Name = "INPUT"; declare const INPUT_Init: typeof init$d; /** * INPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-input */ declare function INPUT_Factory(): StructFactoryResult<HARDWAREINPUT_TYPE>; /** * INPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-input */ interface INPUT_Type { type: T.UINT32; u: { mi?: MOUSEINPUT_Type; ki?: KEYBDINPUT_Type; hi?: HARDWAREINPUT_TYPE; }; } declare const init$c: StructInitType; declare const LPMSG: "MSG*"; declare const MSG_Name = "MSG"; declare const MSG_Init: typeof init$c; /** * MSG structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg */ declare function MSG_Factory(): StructFactoryResult<MSG_Type>; /** * MSG structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg */ interface MSG_Type { hwnd: T.HWND; message: T.UINT; wParam: T.WPARAM; lParam: T.LPARAM; time: T.DWORD; pt: POINT_Type; lPrivate: T.DWORD; } declare const init$b: StructInitType; declare const LPRAWHID: "RAWHID*"; declare const RAWHID_Name = "RAWHID"; declare const RAWHID_Init: typeof init$b; /** * RAWHID structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawhid */ declare function RAWHID_Factory(): StructFactoryResult<RAWHID_Type>; /** * RAWHID structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawhid */ interface RAWHID_Type { dwSizeHid: T.DWORD; dwCount: T.DWORD; /** bRawData[1] */ bRawData: T.BYTE; } declare const init$a: StructInitType; declare const LPRAWINPUT: "RAWINPUT*"; declare const RAWINPUT_Name = "RAWINPUT"; declare const RAWINPUT_Init: typeof init$a; /** * RAWINPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinput */ declare function RAWINPUT_Factory(): StructFactoryResult<RAWINPUT_Type>; /** * RAWINPUT structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-rawinput */ interface RAWINPUT_Type { dwSizeHid: T.DWORD; dwCount: T.DWORD; /** bRawData[1] */ bRawData: T.BYTE; } declare const init$9: StructInitType; declare const LPRAWINPUTDEVICELIST: "RAWINPUTDEVICELIST*"; declare const RAWINPUTDEVICELIST_Name = "RAWINPUTDEVICELIST"; declare const RAWINPUTDEVICELIST_Init: typeof init$9; /** * RAWINPUTDEVICELIST structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RAWINPUTDEVICELIST */ declare function RAWINPUTDEVICELIST_Factory(): StructFactoryResult<RAWINPUTDEVICELIST_Type>; /** * RAWINPUTDEVICELIST structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RAWINPUTDEVICELIST */ interface RAWINPUTDEVICELIST_Type { hDevice: T.HANDLE; dwType: T.DWORD; } declare const init$8: StructInitType; declare const LPRAWINPUTHEADER: "RAWINPUTHEADER*"; declare const RAWINPUTHEADER_Name = "RAWINPUTHEADER"; declare const RAWINPUTHEADER_Init: typeof init$8; /** * RAWINPUTHEADER structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RAWINPUTHEADER */ declare function RAWINPUTHEADER_Factory(): StructFactoryResult<RAWINPUTHEADER_Type>; /** * RAWINPUTHEADER structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RAWINPUTHEADER */ interface RAWINPUTHEADER_Type { dwType: T.DWORD; dwSize: T.DWORD; hDevice: T.HANDLE; wParam: T.WPARAM; } declare const init$7: StructInitType; declare const LPRAWKEYBOARD: "RAWKEYBOARD*"; declare const RAWKEYBOARD_Name = "RAWKEYBOARD"; declare const RAWKEYBOARD_Init: typeof init$7; /** * RAWKEYBOARD structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RAWKEYBOARD */ declare function RAWKEYBOARD_Factory(): StructFactoryResult<RAWKEYBOARD_Type>; /** * RAWKEYBOARD structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RAWKEYBOARD */ interface RAWKEYBOARD_Type { MakeCode: T.USHORT; Flags: T.USHORT; Reserved: T.USHORT; VKey: T.USHORT; Message: T.UINT; ExtraInformation: T.ULONG; } declare const init$6: StructInitType; /** * RAWMOUSE structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RAWMOUSE */ declare function RAWMOUSE_Factory(): StructFactoryResult<RAWMOUSE_Type>; declare const LPRAWMOUSE: "RAWMOUSE*"; declare const RAWMOUSE_Name = "RAWMOUSE"; declare const RAWMOUSE_Init: typeof init$6; /** * RAWHID structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RAWMOUSE */ interface RAWMOUSE_Type { usFlags: T.USHORT; u: { ulButtons: T.ULONG; s: { usButtonFlags: T.USHORT; usButtonData: T.USHORT; }; }; ulRawButtons: T.ULONG; lLastX: T.LONG; lLastY: T.LONG; ulExtraInformation: T.ULONG; } declare const init$5: StructInitType; declare const PRID_DEVICE_INFO_HID: "RID_DEVICE_INFO_HID*"; declare const RID_DEVICE_INFO_HID_Name = "RID_DEVICE_INFO_HID"; declare const RID_DEVICE_INFO_HID_Init: typeof init$5; /** * RID_DEVICE_INFO_HID structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RID_DEVICE_INFO_HID */ declare function RID_DEVICE_INFO_HID_Factory(): StructFactoryResult<RID_DEVICE_INFO_HID_Type>; /** * RID_DEVICE_INFO_HID structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RID_DEVICE_INFO_HID */ interface RID_DEVICE_INFO_HID_Type { dwVendorId: T.DWORD; dwProductId: T.DWORD; dwVersionNumber: T.DWORD; usUsagePage: T.USHORT; usUsage: T.USHORT; } declare const init$4: StructInitType; declare const PRID_DEVICE_INFO_KEYBOARD: "RID_DEVICE_INFO_KEYBOARD*"; declare const RID_DEVICE_INFO_KEYBOARD_Name = "RID_DEVICE_INFO_KEYBOARD"; declare const RID_DEVICE_INFO_KEYBOARD_Init: typeof init$4; /** * RID_DEVICE_INFO_KEYBOARD structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RID_DEVICE_INFO_KEYBOARD */ declare function RID_DEVICE_INFO_KEYBOARD_Factory(): StructFactoryResult<RID_DEVICE_INFO_KEYBOARD_Type>; /** * RID_DEVICE_INFO_KEYBOARD structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RID_DEVICE_INFO_KEYBOARD */ interface RID_DEVICE_INFO_KEYBOARD_Type { dwType: T.DWORD; dwSubType: T.DWORD; dwKeyboardMode: T.DWORD; dwNumberOfFunctionKeys: T.DWORD; dwNumberOfIndicators: T.DWORD; dwNumberOfKeysTotal: T.DWORD; } declare const init$3: StructInitType; declare const PRID_DEVICE_INFO_MOUSE: "RID_DEVICE_INFO_MOUSE*"; declare const RID_DEVICE_INFO_MOUSE_Name = "RID_DEVICE_INFO_MOUSE"; declare const RID_DEVICE_INFO_MOUSE_Init: typeof init$3; /** * RID_DEVICE_INFO_MOUSE structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RID_DEVICE_INFO_MOUSE */ declare function RID_DEVICE_INFO_MOUSE_Factory(): StructFactoryResult<RID_DEVICE_INFO_MOUSE_Type>; /** * RID_DEVICE_INFO_MOUSE structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RID_DEVICE_INFO_MOUSE */ interface RID_DEVICE_INFO_MOUSE_Type { dwId: T.DWORD; dwNumberOfButtons: T.DWORD; dwSampleRate: T.DWORD; fHasHorizontalWheel: T.BOOL; } declare const init$2: StructInitType; declare const LPRID_DEVICE_INFO: "RID_DEVICE_INFO*"; declare const RID_DEVICE_INFO_Name = "RID_DEVICE_INFO"; declare const RID_DEVICE_INFO_Init: typeof init$2; /** * RID_DEVICE_INFO structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RID_DEVICE_INFO */ declare function RID_DEVICE_INFO_Factory(): StructFactoryResult<RID_DEVICE_INFO_Type>; /** * RID_DEVICE_INFO structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-RID_DEVICE_INFO */ interface RID_DEVICE_INFO_Type { cbSize: T.DWORD; dwType: T.DWORD; u: { mouse: RID_DEVICE_INFO_MOUSE_Type; keyboard: RID_DEVICE_INFO_KEYBOARD_Type; hid: RID_DEVICE_INFO_HID_Type; }; } declare const init$1: StructInitType; declare const LPWNDCLASSEXW: "WNDCLASSEXW*"; declare const WNDCLASSEXW_Name = "WNDCLASSEXW"; declare const WNDCLASSEXW_Init: typeof init$1; /** * WNDCLASSEXW structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-wndclassexw */ declare function WNDCLASSEXW_Factory(): StructFactoryResult<WNDCLASSEXW_Type>; /** * WNDCLASSEXW structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-wndclassexw */ interface WNDCLASSEXW_Type { cbSize: T.UINT; style: T.UINT; lpfnWndProc: T.WNDPROC; cbClsExtra: T.INT; cbWndExtra: T.INT; hInstance: T.HINSTANCE; hIcon: T.HICON; hCursor: T.HCURSOR; hbrBackground: T.HBRUSH; lpszMenuName: T.WCHAR_String; lpszClassName: T.WCHAR_String; hIconSm: T.HICON; } declare const init: StructInitType; declare const LPWINDOWINFO: "WINDOWINFO*"; declare const WINDOWINFO_Name = "WINDOWINFO"; declare const WINDOWINFO_Init: typeof init; /** * WINDOWINFO structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-WINDOWINFO */ declare function WINDOWINFO_Factory(): StructFactoryResult<WINDOWINFO_Type>; /** * WINDOWINFO structure * @link https://learn.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-WINDOWINFO */ interface WINDOWINFO_Type { cbSize: T.DWORD; rcWindow: RECT_Type; rcClient: RECT_Type; dwStyle: T.DWORD; dwExStyle: T.DWORD; dwWindowStatus: T.DWORD; cxWindowBorders: T.UINT; cyWindowBorders: T.UINT; atomWindowType: T.ATOM; wCreatorVersion: T.WORD; } type PRINTER_INFO_X_Ptr_Type<X extends PRINTER_INFO_LEVEL> = X extends 1 ? typeof PPRINTER_INFO_1 : X extends 4 ? typeof PPRINTER_INFO_4 : X extends 5 ? typeof PPRINTER_INFO_5 : X extends 8 ? typeof PPRINTER_INFO_8 : X extends 9 ? typeof PPRINTER_INFO_9 : never; declare function getPRINTER_INFO_X_Ptr<X extends PRINTER_INFO_LEVEL>(level: X): PRINTER_INFO_X_Ptr_Type<X>; declare function PRINTER_INFO_X_Factory<X extends PRINTER_INFO_LEVEL>(level: X): StructFactoryResult<PRINTER_INFO_X_Type<X>>; /** * Generate a complex struct, * def can have nested struct or union * - key s{number} means struct * - key u{number} means union */ declare function genStruct<T extends object = object>(def: StructInitType, name?: string, pointer?: string, sizeColumns?: (keyof T)[]): StructFactoryResult<T>; /** * Generate a complex struct, * def can have nested struct or union * - key s{number} means struct * - key u{number} means union */ declare function genComplexStruct(def: StructInitType, name?: string, pointer?: string): StructDetail; declare function genUnion(def: StructInitType, name?: string, pointer?: string): StructDetail; /** * Generate a fixed int16_t array. * convert it back to string through decodeInt16Array() */ declare function genFixedInt16Array(length: number): IKoffiCType; declare function genFixedArray(length: number): IKoffiCType; /** * Generate a simple struct * - def must has no nested struct or union */ declare function genSimpleStruct(def: StructInitPlainType, name?: string, pointer?: string): StructDetail; declare function genSimpleUnion(def: StructInitPlainType, name?: string, pointer?: string): StructDetail; export { ALTTABINFO_Factory, ALTTABINFO_Init, ALTTABINFO_Name, type ALTTABINFO_Type, COPYDATASTRUCT_Factory, COPYDATASTRUCT_Init, COPYDATASTRUCT_Name, type COPYDATASTRUCT_Type, DEVMODEW_Factory, DEVMODEW_Init, DEVMODEW_Name, type DEVMODEW_Type, DISPLAY_DEVICEW_Factory, DISPLAY_DEVICEW_Init, DISPLAY_DEVICEW_Name, type DISPLAY_DEVICEW_Type, DOC_INFO_1_Factory, DOC_INFO_1_Init, DOC_INFO_1_Name, type DOC_INFO_1_Type, type EnumPrinters_Level, type EnumPrinters_Level_Type, type EnumPrinters_Level_X_Type, FILETIME_Factory, FILETIME_Init, type FILETIME_Type, FLASHWINFO_Factory, FLASHWINFO_Init, FLASHWINFO_Name, type FLASHWINFO_Type, HARDWAREINPUT_Factory, HARDWAREINPUT_Init, HARDWAREINPUT_Name, type HARDWAREINPUT_TYPE, INITCOMMONCONTROLSEX_Factory, INITCOMMONCONTROLSEX_Init, INITCOMMONCONTROLSEX_Name, type INITCOMMONCONTROLSEX_Type, INPUT_Factory, INPUT_Init, INPUT_Name, type INPUT_Type, JOB_INFO_1_Factory, JOB_INFO_1_Init, JOB_INFO_1_Name, type JOB_INFO_1_Type, KEYBDINPUT_Factory, KEYBDINPUT_Init, KEYBDINPUT_Name, type KEYBDINPUT_Type, LPALTTABINFO, LPCOPYDATASTRUCT, LPDEVMODEW, LPDISPLAY_DEVICEW, LPDOC_INFO_1, LPFILETIME, LPFILETIME_Name, LPHARDWAREINPUT, LPINITCOMMONCONTROLSEX, LPINPUT, LPKEYBDINPUT, LPMOUSEINPUT, LPMSG, LPPOINT, LPRAWHID, LPRAWINPUT, LPRAWINPUTDEVICELIST, LPRAWINPUTHEADER, LPRAWKEYBOARD, LPRAWMOUSE, LPRECT, LPRID_DEVICE_INFO, LPSYSTEMTIME, LPWINDOWINFO, LPWNDCLASSEXW, MOUSEINPUT_Factory, MOUSEINPUT_Init, MOUSEINPUT_Name, type MOUSEINPUT_Type, MSG_Factory, MSG_Init, MSG_Name, type MSG_Type, PFLASHWINFO, PJOB_INFO_1, POINT_Factory, POINT_Init, POINT_Name, type POINT_Type, PPRINTER_DEFAULTS, PPRINTER_INFO_1, PPRINTER_INFO_4, PPRINTER_INFO_5, PPRINTER_INFO_6, PPRINTER_INFO_8, PPRINTER_INFO_9, PPRINTPROCESSOR_INFO_1, PRID_DEVICE_INFO_HID, PRID_DEVICE_INFO_KEYBOARD, PRID_DEVICE_INFO_MOUSE, PRINTER_DEFAULTS_Factory, PRINTER_DEFAULTS_Init, PRINTER_DEFAULTS_Name, type PRINTER_DEFAULTS_Type, PRINTER_INFO_1_Factory, PRINTER_INFO_1_Init, PRINTER_INFO_1_Name, type PRINTER_INFO_1_Type, PRINTER_INFO_4_Factory, PRINTER_INFO_4_Init, PRINTER_INFO_4_Name, type PRINTER_INFO_4_Type, PRINTER_INFO_5_Factory, PRINTER_INFO_5_Init, PRINTER_INFO_5_Name, type PRINTER_INFO_5_Type, PRINTER_INFO_6_Factory, PRINTER_INFO_6_Init, PRINTER_INFO_6_Name, type PRINTER_INFO_6_Type, PRINTER_INFO_8_Factory, PRINTER_INFO_8_Init, PRINTER_INFO_8_Name, type PRINTER_INFO_8_Type, PRINTER_INFO_9_Factory, PRINTER_INFO_9_Init, PRINTER_INFO_9_Name, type PRINTER_INFO_9_Type, type PRINTER_INFO_LEVEL, type PRINTER_INFO_Type, PRINTER_INFO_X_Factory, type PRINTER_INFO_X_Ptr_Type, type PRINTER_INFO_X_Type, PRINTPROCESSOR_INFO_1_Factory, PRINTPROCESSOR_INFO_1_Init, PRINTPROCESSOR_INFO_1_Name, type PRINTPROCESSOR_INFO_1_Type, RAWHID_Factory, RAWHID_Init, RAWHID_Name, type RAWHID_Type, RAWINPUTDEVICELIST_Factory, RAWINPUTDEVICELIST_Init, RAWINPUTDEVICELIST_Name, type RAWINPUTDEVICELIST_Type, RAWINPUTHEADER_Factory, RAWINPUTHEADER_Init, RAWINPUTHEADER_Name, type RAWINPUTHEADER_Type, RAWINPUT_Factory, RAWINPUT_Init, RAWINPUT_Name, type RAWINPUT_Type, RAWKEYBOARD_Factory, RAWKEYBOARD_Init, RAWKEYBOARD_Name, type RAWKEYBOARD_Type, RAWMOUSE_Factory, RAWMOUSE_Init, RAWMOUSE_Name, type RAWMOUSE_Type, RECT_Factory, RECT_Init, RECT_Name, type RECT_Type, RID_DEVICE_INFO_Factory, RID_DEVICE_INFO_HID_Factory, RID_DEVICE_INFO_HID_Init, RID_DEVICE_INFO_HID_Name, type RID_DEVICE_INFO_HID_Type, RID_DEVICE_INFO_Init, RID_DEVICE_INFO_KEYBOARD_Factory, RID_DEVICE_INFO_KEYBOARD_Init, RID_DEVICE_INFO_KEYBOARD_Name, type RID_DEVICE_INFO_KEYBOARD_Type, RID_DEVICE_INFO_MOUSE_Factory, RID_DEVICE_INFO_MOUSE_Init, RID_DEVICE_INFO_MOUSE_Name, type RID_DEVICE_INFO_MOUSE_Type, RID_DEVICE_INFO_Name, type RID_DEVICE_INFO_Type, SYSTEMTIME_Factory, SYSTEMTIME_Init, SYSTEMTIME_Name, type SYSTEMTIME_Type, WINDOWINFO_Factory, WINDOWINFO_Init, WINDOWINFO_Name, type WINDOWINFO_Type, WNDCLASSEXW_Factory, WNDCLASSEXW_Init, WNDCLASSEXW_Name, type WNDCLASSEXW_Type, genComplexStruct, genFixedArray, genFixedInt16Array, genSimpleStruct, genSimpleUnion, genStruct, genUnion, getPRINTER_INFO_X_Ptr };