quickwin 3.0.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/abort.d.ts +21 -0
- package/lib/assert.d.ts +2 -0
- package/lib/bitmap.d.ts +7 -0
- package/lib/cache-utils.d.ts +6 -0
- package/lib/certs.d.ts +1 -0
- package/lib/dpi.d.ts +9 -0
- package/lib/dumpRects.d.ts +2 -0
- package/lib/exec-log.d.ts +23 -0
- package/lib/fetch.d.ts +4 -0
- package/lib/ffi/bind.d.ts +70 -0
- package/lib/ffi/ctype.d.ts +117 -0
- package/lib/ffi/index.d.ts +2 -0
- package/lib/ffi/struct.d.ts +174 -0
- package/lib/http-common.d.ts +143 -0
- package/lib/http-server.d.ts +59 -0
- package/lib/polyfill.d.ts +22 -0
- package/lib/react-qw/components/Button.d.ts +9 -0
- package/lib/react-qw/components/CheckBox.d.ts +11 -0
- package/lib/react-qw/components/ComboBox.d.ts +11 -0
- package/lib/react-qw/components/DateTimePicker.d.ts +15 -0
- package/lib/react-qw/components/Input.d.ts +15 -0
- package/lib/react-qw/components/Link.d.ts +12 -0
- package/lib/react-qw/components/ListBox.d.ts +13 -0
- package/lib/react-qw/components/ListView.d.ts +37 -0
- package/lib/react-qw/components/PathPicker.d.ts +23 -0
- package/lib/react-qw/components/ProgressBar.d.ts +9 -0
- package/lib/react-qw/components/RadioButton.d.ts +11 -0
- package/lib/react-qw/components/ScrollView.d.ts +9 -0
- package/lib/react-qw/components/Slider.d.ts +12 -0
- package/lib/react-qw/components/Tab.d.ts +14 -0
- package/lib/react-qw/components/Tooltip.d.ts +7 -0
- package/lib/react-qw/components/TreeView.d.ts +18 -0
- package/lib/react-qw/components/index.d.ts +16 -0
- package/lib/react-qw/index.d.ts +24 -0
- package/lib/react-qw/layout.d.ts +29 -0
- package/lib/react-qw/nmhdr.d.ts +1 -0
- package/lib/react-qw/props.d.ts +2 -0
- package/lib/react-qw/reconciler.d.ts +21 -0
- package/lib/stream.d.ts +20 -0
- package/lib/text-codec.d.ts +39 -0
- package/lib/text-measure.d.ts +14 -0
- package/lib/url.d.ts +54 -0
- package/lib/websocket.d.ts +73 -0
- package/lib/windows/{advapi32.ts → advapi32.d.ts} +6 -21
- package/lib/windows/comctl32.d.ts +14 -0
- package/lib/windows/comdlg32.d.ts +4 -0
- package/lib/windows/{gdi32.ts → gdi32.d.ts} +161 -98
- package/lib/windows/{kernel32.ts → kernel32.d.ts} +138 -115
- package/lib/windows/{msimg32.ts → msimg32.d.ts} +11 -14
- package/lib/windows/ntdll.d.ts +5 -0
- package/lib/windows/ole32.d.ts +3 -0
- package/lib/windows/{psapi.ts → psapi.d.ts} +9 -18
- package/lib/windows/{shell32.ts → shell32.d.ts} +25 -24
- package/lib/windows/structs.d.ts +3141 -0
- package/lib/windows/{user32.ts → user32.d.ts} +196 -193
- package/lib/windows/version.d.ts +27 -0
- package/lib/windows/{winspool.ts → winspool.d.ts} +18 -32
- package/package.json +15 -6
- package/qwin-nowasm-x86.exe +0 -0
- package/qwin-nowasm.exe +0 -0
- package/qwin-x86.exe +0 -0
- package/qwin.exe +0 -0
- package/lib/abort.ts +0 -69
- package/lib/assert.ts +0 -7
- package/lib/bitmap.ts +0 -39
- package/lib/cache-utils.ts +0 -40
- package/lib/certs.ts +0 -258
- package/lib/dpi.ts +0 -31
- package/lib/dumpRects.ts +0 -34
- package/lib/exec-log.ts +0 -30
- package/lib/fetch.ts +0 -589
- package/lib/ffi/bind.ts +0 -540
- package/lib/ffi/ctype.ts +0 -371
- package/lib/ffi/index.ts +0 -6
- package/lib/ffi/struct.ts +0 -780
- package/lib/http-common.ts +0 -441
- package/lib/http-server.ts +0 -604
- package/lib/polyfill.ts +0 -171
- package/lib/react-qw/components/index.ts +0 -17
- package/lib/react-qw/index.ts +0 -96
- package/lib/react-qw/layout.ts +0 -111
- package/lib/react-qw/nmhdr.ts +0 -7
- package/lib/react-qw/props.ts +0 -41
- package/lib/react-qw/reconciler.ts +0 -379
- package/lib/stream.ts +0 -22
- package/lib/text-codec.ts +0 -171
- package/lib/text-measure.ts +0 -44
- package/lib/url.ts +0 -201
- package/lib/websocket.ts +0 -600
- package/lib/windows/comctl32.ts +0 -20
- package/lib/windows/comdlg32.ts +0 -10
- package/lib/windows/ntdll.ts +0 -11
- package/lib/windows/ole32.ts +0 -9
- package/lib/windows/structs.ts +0 -807
- package/lib/windows/version.ts +0 -35
|
@@ -1,49 +1,3 @@
|
|
|
1
|
-
// user32.dll 精选高频 API(99 个),逐函数独立导出:
|
|
2
|
-
// - 签名对照 mingw winuser.h 原型手写;未被 import 的绑定经 esbuild 摇树不进产物
|
|
3
|
-
// - WPARAM / LPARAM / LRESULT / UINT_PTR / LONG_PTR 及句柄混合值一律 <>ptr(指针宽度跨
|
|
4
|
-
// 架构正确;返回值 0 保真(C→JS 不做 0→null)、有符号读对齐 C 版 JS_NewInt64——-1 哨兵等负值保真)
|
|
5
|
-
// - 入参字符串用 <WCHAR>ptr(string 编码为 UTF-16 + NUL,无字符串传 NULL);文本出参缓冲
|
|
6
|
-
// 用 <BYTE>ptr(宽字符串出参配 WCHAR.alloc(n) 当 buffer、WCHAR.decode(buf) 读回);
|
|
7
|
-
// 回调参数用 <>ptr 接 closure() 的 ptr
|
|
8
|
-
// - 结构位按方向分流(结构定义见 ./structs.ts):
|
|
9
|
-
// 纯入参位 <N>ptr + 注册 encoder → DeepPartial 对象直传(缺省字段 doEncode 跳过)、
|
|
10
|
-
// alloc().ptr、NULL 三形态;
|
|
11
|
-
// 出参/就地位 <N>ptr 不注册 encoder → 位只收 def 分配的 .ptr(对象 encode 进调用方拿不到
|
|
12
|
-
// 的临时 buffer 会丢结果;ArrayBuffer 由 unknown layout fail-fast 拦下),
|
|
13
|
-
// 读回走 N.decode(buf|ptr)。统一流程:encode → call → decode
|
|
14
|
-
// - 签名里的 <WCHAR>ptr 若语义是 MAKEINTRESOURCE 整数(如 LoadCursorW 光标名),该位用 <>ptr
|
|
15
|
-
// - HDC 借出/归还与消费位统一 <HDC>ptr(品牌指针 Ptr<'HDC'>):ReleaseDC 等归还位由 tsc
|
|
16
|
-
// 校验配对拦住误传 HWND,DrawText/FillRect 等消费位同收品牌、拦住裸 number 误传
|
|
17
|
-
// - 返回/入参句柄位品牌化:HWND(窗口句柄形参与返回)、HMENU(菜单组出入参)、
|
|
18
|
-
// HCURSOR(LoadCursor/SetCursor)一律 <N>ptr → Ptr<'N'> | NULL;gui.HWND 与
|
|
19
|
-
// Ptr<"HWND"> 结构同型(quickwin.d.ts 字符串键 brand),react-qw 直传零桥接。
|
|
20
|
-
// 异种句柄互传(如 GetDesktopWindow() → DestroyMenu)由 tsc 拦下。混合值位保持
|
|
21
|
-
// <>ptr:SetWindowPos 的 hWndInsertAfter(HWND_TOP 等常量)、AppendMenu.uIDNewItem
|
|
22
|
-
// (命令 ID 或子菜单句柄)、MAKEINTRESOURCE 光标名,以及 HBRUSH / 回调等非清单
|
|
23
|
-
// 句柄(HINSTANCE 即 HMODULE:走 <HMODULE>ptr 与 win 模块同型;剪贴板句柄走
|
|
24
|
-
// <HGLOBAL>ptr 自产自收)
|
|
25
|
-
import * as os from 'os'
|
|
26
|
-
import { bind, type CodecMap } from '../ffi/bind.js'
|
|
27
|
-
import { structArray } from '../ffi/struct.js'
|
|
28
|
-
// 只 import 注册了 encoder 的结构(纯入参位);POINT 等出/就地位不注册,运行时无需引用
|
|
29
|
-
import { INPUT, MSG, RECT, SCROLLINFO, WNDCLASSEXW } from './structs.js'
|
|
30
|
-
|
|
31
|
-
// dll 名部分应用:85 个绑定共用,签名字符串不再重复 'user32.dll'。
|
|
32
|
-
// 不能用 bind.bind(null, dll)——泛型在部分应用点坍缩(返回 never);工厂转调让
|
|
33
|
-
// S/LE/LD 在调用点正常 infer。第三参透传 encoders(结构入参位注册,见头注释方向约定)。
|
|
34
|
-
const b = <const S extends string, const LE extends CodecMap = {}>(name: string, sig: S, encoders?: LE) =>
|
|
35
|
-
bind('user32.dll', name, sig, encoders)
|
|
36
|
-
// 推导保真探针:若返回类型退化(any/never 可赋给 string),本行不报错 → expect-error unused 反向暴露
|
|
37
|
-
// @ts-expect-error 函数返回值不能赋给 string
|
|
38
|
-
const _bProbe: string = b('GetDesktopWindow', ' -> <HWND>ptr')
|
|
39
|
-
void _bProbe
|
|
40
|
-
|
|
41
|
-
// ia32 的 user32.dll 不导出 *LongPtrW(32 位下它们是 Get/SetWindowLongW 的宏,mingw
|
|
42
|
-
// 仅 x64 提供真实符号)——按架构选真实导出名,导出名保持统一。
|
|
43
|
-
const LONG_PTR_SYM = os.arch === 'x64' ? 'PtrW' : 'W'
|
|
44
|
-
|
|
45
|
-
// ============ 窗口 / 基本 ============
|
|
46
|
-
|
|
47
1
|
/** 创建窗口
|
|
48
2
|
* @returns 窗口句柄;失败 → NULL
|
|
49
3
|
* @param args_0 dwExStyle WS_EX_*
|
|
@@ -58,17 +12,16 @@ const LONG_PTR_SYM = os.arch === 'x64' ? 'PtrW' : 'W'
|
|
|
58
12
|
* @param args_9 hMenu 菜单句柄或子窗口 ID(可 NULL)
|
|
59
13
|
* @param args_10 hInstance 模块句柄(可 NULL)
|
|
60
14
|
* @param args_11 lpParam 窗口创建参数,传 NULL */
|
|
61
|
-
export const CreateWindowEx
|
|
62
|
-
'u32 <WCHAR>ptr <WCHAR>ptr u32 i32 i32 i32 i32 <HWND>ptr <HMENU>ptr <HMODULE>ptr <>ptr -> <HWND>ptr')
|
|
15
|
+
export declare const CreateWindowEx: (args_0: number, args_1: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_2: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_3: number, args_4: number, args_5: number, args_6: number, args_7: number, args_8: import("../ffi/ctype.js").MaybePtr<"HWND">, args_9: import("../ffi/ctype.js").MaybePtr<"HMENU">, args_10: import("../ffi/ctype.js").MaybePtr<"HMODULE">, args_11: import("../ffi/ctype.js").MaybePtr<"">) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
63
16
|
/** 销毁窗口
|
|
64
17
|
* @returns 成功 → 非 0
|
|
65
18
|
* @param args_0 hWnd */
|
|
66
|
-
export const DestroyWindow
|
|
19
|
+
export declare const DestroyWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
67
20
|
/** 显示/隐藏窗口(nCmdShow = WindowStyle 类常量)
|
|
68
21
|
* @returns 先前可见性
|
|
69
22
|
* @param args_0 hWnd
|
|
70
23
|
* @param args_1 nCmdShow 显示命令(SW_SHOW/SW_HIDE 等) */
|
|
71
|
-
export const ShowWindow
|
|
24
|
+
export declare const ShowWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../../constants.js").ShowWindowCmd) => number;
|
|
72
25
|
/** 移动/缩放窗口
|
|
73
26
|
* @returns 成功 → 非 0;失败 → 0(原因见 GetLastError)
|
|
74
27
|
* @param args_0 hWnd
|
|
@@ -77,7 +30,7 @@ export const ShowWindow = /*@__PURE__*/ b('ShowWindow', '<HWND>ptr i32@ShowWindo
|
|
|
77
30
|
* @param args_3 nWidth 新宽度
|
|
78
31
|
* @param args_4 nHeight 新高度
|
|
79
32
|
* @param args_5 bRepaint 非 0 立即重绘 */
|
|
80
|
-
export const MoveWindow
|
|
33
|
+
export declare const MoveWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: number, args_2: number, args_3: number, args_4: number, args_5: number) => number;
|
|
81
34
|
/** 设窗口位置/层级
|
|
82
35
|
* @returns 成功 → 非 0;失败 → 0(原因见 GetLastError)
|
|
83
36
|
* @param args_0 hWnd
|
|
@@ -87,46 +40,44 @@ export const MoveWindow = /*@__PURE__*/ b('MoveWindow', '<HWND>ptr i32 i32 i32 i
|
|
|
87
40
|
* @param args_4 cx 新宽度
|
|
88
41
|
* @param args_5 cy 新高度
|
|
89
42
|
* @param args_6 uFlags SWP_* 标志(SWP_NOMOVE=0x2/SWP_NOSIZE=0x1 等) */
|
|
90
|
-
|
|
91
|
-
// 值域是枚举而非句柄 —— 指针位 @ 标注试点。
|
|
92
|
-
export const SetWindowPos = /*@__PURE__*/ b('SetWindowPos', '<HWND>ptr <>ptr@SetWindowPosHwnd i32 i32 i32 i32 u32 -> i32')
|
|
43
|
+
export declare const SetWindowPos: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../../constants.js").SetWindowPosHwnd, args_2: number, args_3: number, args_4: number, args_5: number, args_6: number) => number;
|
|
93
44
|
/** 取窗口外框矩形(屏幕坐标)
|
|
94
45
|
* @returns 成功 → 非 0;失败 → 0(原因见 GetLastError)
|
|
95
46
|
* @param args_0 hWnd
|
|
96
47
|
* @param args_1 lpRect 出参槽,传 RECT.alloc().ptr、RECT.decode 读回 */
|
|
97
|
-
export const GetWindowRect
|
|
48
|
+
export declare const GetWindowRect: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"RECT">) => number;
|
|
98
49
|
/** 取窗口客户区矩形
|
|
99
50
|
* @returns 成功 → 非 0;失败 → 0(原因见 GetLastError)
|
|
100
51
|
* @param args_0 hWnd
|
|
101
52
|
* @param args_1 lpRect 出参槽,传 RECT.alloc().ptr、RECT.decode 读回 */
|
|
102
|
-
export const GetClientRect
|
|
53
|
+
export declare const GetClientRect: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"RECT">) => number;
|
|
103
54
|
/** 是否有效窗口句柄
|
|
104
55
|
* @returns 是 → 非 0
|
|
105
56
|
* @param args_0 hWnd */
|
|
106
|
-
export const IsWindow
|
|
57
|
+
export declare const IsWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
107
58
|
/** 窗口是否可见
|
|
108
59
|
* @returns 是 → 非 0
|
|
109
60
|
* @param args_0 hWnd */
|
|
110
|
-
export const IsWindowVisible
|
|
61
|
+
export declare const IsWindowVisible: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
111
62
|
/** 窗口是否最小化
|
|
112
63
|
* @returns 是 → 非 0
|
|
113
64
|
* @param args_0 hWnd */
|
|
114
|
-
export const IsIconic
|
|
65
|
+
export declare const IsIconic: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
115
66
|
/** 取前台窗口
|
|
116
67
|
* @returns 前台窗口句柄;无 → NULL */
|
|
117
|
-
export const GetForegroundWindow
|
|
68
|
+
export declare const GetForegroundWindow: () => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
118
69
|
/** 请求设前台窗口
|
|
119
70
|
* @returns 成功 → 非 0
|
|
120
71
|
* @param args_0 hWnd 目标窗口 */
|
|
121
|
-
export const SetForegroundWindow
|
|
72
|
+
export declare const SetForegroundWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
122
73
|
/** 取桌面窗口
|
|
123
74
|
* @returns 桌面窗口句柄(恒非 NULL) */
|
|
124
|
-
export const GetDesktopWindow
|
|
75
|
+
export declare const GetDesktopWindow: () => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
125
76
|
/** 按类名+标题查找顶层窗口
|
|
126
77
|
* @returns 窗口句柄;无 → NULL
|
|
127
78
|
* @param args_0 lpClassName 窗口类名 string 或 NULL
|
|
128
79
|
* @param args_1 lpWindowName 窗口标题 string 或 NULL */
|
|
129
|
-
export const FindWindow
|
|
80
|
+
export declare const FindWindow: (args_0: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_1: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
130
81
|
/** 在 hWndParent 的子窗口链里按类名+标题查找,从 hWndChildAfter 之后开始;
|
|
131
82
|
* 链式遍历:FindWindowEx(NULL, prev, NULL, NULL)
|
|
132
83
|
* @returns 窗口句柄;无更多窗口 → NULL
|
|
@@ -134,95 +85,101 @@ export const FindWindow = /*@__PURE__*/ b('FindWindowW', '<WCHAR>ptr <WCHAR>ptr
|
|
|
134
85
|
* @param args_1 hWndChildAfter 起始子窗口,NULL = 从头
|
|
135
86
|
* @param args_2 lpszClass 类名 string 或 NULL = 不过滤
|
|
136
87
|
* @param args_3 lpszWindow 标题 string 或 NULL = 不过滤 */
|
|
137
|
-
export const FindWindowEx
|
|
138
|
-
'<HWND>ptr <HWND>ptr <WCHAR>ptr <WCHAR>ptr -> <HWND>ptr')
|
|
88
|
+
export declare const FindWindowEx: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"HWND">, args_2: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_3: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
139
89
|
/** 取窗口标题
|
|
140
90
|
* @returns 写入字符数,不含 NUL
|
|
141
91
|
* @param args_0 hWnd
|
|
142
92
|
* @param args_1 lpString 出参缓冲,传 WCHAR.alloc(n)、WCHAR.decode(buf) 读回
|
|
143
93
|
* @param args_2 nMaxCount 缓冲容量(字符数,含 NUL 余量) */
|
|
144
|
-
export const GetWindowText
|
|
94
|
+
export declare const GetWindowText: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").PtrArrayBuffer<any> | import("../ffi/ctype.js").MaybePtr<"BYTE">, args_2: number) => number;
|
|
145
95
|
/** 设窗口标题(传 string 或 NULL 清空)
|
|
146
96
|
* @returns 成功 → 非 0
|
|
147
97
|
* @param args_0 hWnd
|
|
148
98
|
* @param args_1 lpString 新标题 string 或 NULL */
|
|
149
|
-
export const SetWindowText
|
|
99
|
+
export declare const SetWindowText: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">) => number;
|
|
150
100
|
/** 取窗口标题长度
|
|
151
101
|
* @returns 标题长度(字符数,不含 NUL)
|
|
152
102
|
* @param args_0 hWnd */
|
|
153
|
-
export const GetWindowTextLength
|
|
103
|
+
export declare const GetWindowTextLength: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
154
104
|
/** 取窗口类名
|
|
155
105
|
* @returns 写入字符数
|
|
156
106
|
* @param args_0 hWnd
|
|
157
107
|
* @param args_1 lpClassName 出参缓冲,传 WCHAR.alloc(n)、WCHAR.decode(buf) 读回
|
|
158
108
|
* @param args_2 nMaxCount 缓冲容量(字符数) */
|
|
159
|
-
export const GetClassName
|
|
109
|
+
export declare const GetClassName: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").PtrArrayBuffer<any> | import("../ffi/ctype.js").MaybePtr<"BYTE">, args_2: number) => number;
|
|
160
110
|
/** 取窗口附加数据(ia32 走 GetWindowLongW)
|
|
161
111
|
* @returns 附加数据值;0 保真(值有符号读)
|
|
162
112
|
* @param args_0 hWnd
|
|
163
113
|
* @param args_1 nIndex 索引(GWLP_WNDPROC/GWLP_USERDATA/GWL_STYLE 等) */
|
|
164
|
-
export const GetWindowLongPtr
|
|
114
|
+
export declare const GetWindowLongPtr: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../../constants.js").Gwlp) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
165
115
|
/** 设窗口附加数据
|
|
166
116
|
* @returns 先前值(0 保真,值有符号读)
|
|
167
117
|
* @param args_0 hWnd
|
|
168
118
|
* @param args_1 nIndex 索引(GWLP_* / GWL_*)
|
|
169
119
|
* @param args_2 dwNewLong 新值(整数或指针混合值) */
|
|
170
|
-
export const SetWindowLongPtr
|
|
120
|
+
export declare const SetWindowLongPtr: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../../constants.js").Gwlp, args_2: import("../ffi/ctype.js").MaybePtr<"">) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
171
121
|
/** 取窗口所属线程(第二参可传 NULL 不取进程 ID)
|
|
172
122
|
* @returns 线程 ID
|
|
173
123
|
* @param args_0 hWnd
|
|
174
124
|
* @param args_1 lpdwProcessId 出参槽,传 Uint32Array(1).buffer 或 NULL */
|
|
175
|
-
export const GetWindowThreadProcessId
|
|
125
|
+
export declare const GetWindowThreadProcessId: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").PtrArrayBuffer<any> | import("../ffi/ctype.js").MaybePtr<"BYTE">) => number;
|
|
176
126
|
/** 启用/禁用窗口输入
|
|
177
127
|
* @returns 先前状态
|
|
178
128
|
* @param args_0 hWnd
|
|
179
129
|
* @param args_1 bEnable 非 0 启用 */
|
|
180
|
-
export const EnableWindow
|
|
130
|
+
export declare const EnableWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: number) => number;
|
|
181
131
|
/** 取父窗口
|
|
182
132
|
* @returns 父窗口句柄;无 → NULL
|
|
183
133
|
* @param args_0 hWnd */
|
|
184
|
-
export const GetParent
|
|
134
|
+
export declare const GetParent: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
185
135
|
/** 设父窗口
|
|
186
136
|
* @returns 先前父窗口
|
|
187
137
|
* @param args_0 hWndChild 子窗口
|
|
188
138
|
* @param args_1 hWndNewParent 新父窗口 */
|
|
189
|
-
export const SetParent
|
|
139
|
+
export declare const SetParent: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"HWND">) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
190
140
|
/** 按关系取相邻窗口
|
|
191
141
|
* @returns 窗口句柄;无 → NULL
|
|
192
142
|
* @param args_0 hWnd
|
|
193
143
|
* @param args_1 uCmd 关系(GW_CHILD=4/GW_HWNDNEXT=2/GW_OWNER=4 等 GW_*) */
|
|
194
|
-
export const GetWindow
|
|
144
|
+
export declare const GetWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../../constants.js").GetWindowCmd) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
195
145
|
/** 注册窗口类
|
|
196
146
|
* @returns 类 ATOM;失败 → 0
|
|
197
147
|
* @param args_0 lpwcx WNDCLASSEXW.encode({ cbSize: WNDCLASSEXW.size, ... }).ptr(见 structs.ts) */
|
|
198
|
-
export const RegisterClassEx
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
148
|
+
export declare const RegisterClassEx: (args_0: {
|
|
149
|
+
cbClsExtra?: number | undefined;
|
|
150
|
+
cbSize?: number | undefined;
|
|
151
|
+
cbWndExtra?: number | undefined;
|
|
152
|
+
hCursor?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
153
|
+
hIcon?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
154
|
+
hIconSm?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
155
|
+
hInstance?: import("../ffi/ctype.js").MaybePtr<"HMODULE"> | undefined;
|
|
156
|
+
hbrBackground?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
157
|
+
lpfnWndProc?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
158
|
+
lpszClassName?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
159
|
+
lpszMenuName?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
160
|
+
style?: number | undefined;
|
|
161
|
+
} | import("../ffi/ctype.js").MaybePtr<"WNDCLASSEXW">) => number;
|
|
202
162
|
/** 设输入焦点
|
|
203
163
|
* @returns 先前焦点窗口
|
|
204
164
|
* @param args_0 hWnd 接收焦点的窗口 */
|
|
205
|
-
export const SetFocus
|
|
165
|
+
export declare const SetFocus: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
206
166
|
/** 取调用线程输入焦点
|
|
207
167
|
* @returns 焦点窗口句柄;无 → NULL */
|
|
208
|
-
export const GetFocus
|
|
168
|
+
export declare const GetFocus: () => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
209
169
|
/** 取调用线程激活窗口
|
|
210
170
|
* @returns 激活窗口句柄;无 → NULL */
|
|
211
|
-
export const GetActiveWindow
|
|
171
|
+
export declare const GetActiveWindow: () => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
212
172
|
/** 设调用线程激活窗口
|
|
213
173
|
* @returns 先前窗口
|
|
214
174
|
* @param args_0 hWnd */
|
|
215
|
-
export const SetActiveWindow
|
|
216
|
-
|
|
217
|
-
// ============ 消息循环 ============
|
|
218
|
-
|
|
175
|
+
export declare const SetActiveWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
219
176
|
/** 取消息(阻塞式);分发前先 TranslateMessage
|
|
220
177
|
* @returns -1 = 出错、0 = WM_QUIT、>0 = 有消息
|
|
221
178
|
* @param args_0 lpMsg MSG 出参缓冲(MSG.alloc().ptr,品牌位不收裸 PAB)
|
|
222
179
|
* @param args_1 hWndFilter 窗口过滤,可 NULL
|
|
223
180
|
* @param args_2 wMsgFilterMin 消息下限,0 = 不过滤
|
|
224
181
|
* @param args_3 wMsgFilterMax 消息上限,0 = 不过滤 */
|
|
225
|
-
export const GetMessage
|
|
182
|
+
export declare const GetMessage: (args_0: import("../ffi/ctype.js").MaybePtr<"MSG">, args_1: import("../ffi/ctype.js").MaybePtr<"HWND">, args_2: number, args_3: number) => number;
|
|
226
183
|
/** 非阻塞查消息
|
|
227
184
|
* @returns 有消息 → 非 0
|
|
228
185
|
* @param args_0 lpMsg MSG 出参缓冲
|
|
@@ -230,39 +187,59 @@ export const GetMessage = /*@__PURE__*/ b('GetMessageW', '<MSG>ptr <HWND>ptr u32
|
|
|
230
187
|
* @param args_2 wMsgFilterMin 消息下限,0 = 不过滤
|
|
231
188
|
* @param args_3 wMsgFilterMax 消息上限,0 = 不过滤
|
|
232
189
|
* @param args_4 wRemoveMsg PM_NOREMOVE(0) / PM_REMOVE(1) */
|
|
233
|
-
export const PeekMessage
|
|
190
|
+
export declare const PeekMessage: (args_0: import("../ffi/ctype.js").MaybePtr<"MSG">, args_1: import("../ffi/ctype.js").MaybePtr<"HWND">, args_2: number, args_3: number, args_4: number) => number;
|
|
234
191
|
/** 把 WM_KEYDOWN/UP 转成字符消息(翻译结果留在队列)
|
|
235
192
|
* @returns 可翻译 → 非 0
|
|
236
193
|
* @param args_0 lpMsg 取到的 MSG 缓冲(GetMessage/PeekMessage 的出参) */
|
|
237
|
-
export const TranslateMessage
|
|
194
|
+
export declare const TranslateMessage: (args_0: {
|
|
195
|
+
hwnd?: import("../ffi/ctype.js").MaybePtr<"HWND"> | undefined;
|
|
196
|
+
lParam?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
197
|
+
message?: number | undefined;
|
|
198
|
+
pt?: {
|
|
199
|
+
x?: number | undefined;
|
|
200
|
+
y?: number | undefined;
|
|
201
|
+
} | undefined;
|
|
202
|
+
time?: number | undefined;
|
|
203
|
+
wParam?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
204
|
+
} | import("../ffi/ctype.js").MaybePtr<"MSG">) => number;
|
|
238
205
|
/** 分发 MSG 给窗口过程
|
|
239
206
|
* @returns 处理结果(0 保真,有符号读)
|
|
240
207
|
* @param args_0 lpMsg MSG 缓冲(GetMessage/PeekMessage 的出参) */
|
|
241
|
-
export const DispatchMessage
|
|
208
|
+
export declare const DispatchMessage: (args_0: {
|
|
209
|
+
hwnd?: import("../ffi/ctype.js").MaybePtr<"HWND"> | undefined;
|
|
210
|
+
lParam?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
211
|
+
message?: number | undefined;
|
|
212
|
+
pt?: {
|
|
213
|
+
x?: number | undefined;
|
|
214
|
+
y?: number | undefined;
|
|
215
|
+
} | undefined;
|
|
216
|
+
time?: number | undefined;
|
|
217
|
+
wParam?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
218
|
+
} | import("../ffi/ctype.js").MaybePtr<"MSG">) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
242
219
|
/** 异步投递消息到窗口线程队列
|
|
243
220
|
* @returns 成功 → 非 0
|
|
244
221
|
* @param args_0 hWnd 目标窗口
|
|
245
222
|
* @param args_1 Msg 消息号(WM_*)
|
|
246
223
|
* @param args_2 wParam 消息参数(混合位)
|
|
247
224
|
* @param args_3 lParam 消息参数(混合位) */
|
|
248
|
-
export const PostMessage
|
|
225
|
+
export declare const PostMessage: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../../constants.js").HdmMsg | import("../../constants.js").ButtonExtMsg | import("../../constants.js").ButtonMsg | import("../../constants.js").ComboBoxMsg | import("../../constants.js").DtMsg | import("../../constants.js").EditMsg | import("../../constants.js").LbMsg | import("../../constants.js").LvMsg | import("../../constants.js").ProgressMsg | import("../../constants.js").StaticMsg | import("../../constants.js").SysLinkMsg | import("../../constants.js").TbMsg | import("../../constants.js").TcMsg | import("../../constants.js").TtMsg | import("../../constants.js").TvMsg | import("../../constants.js").WmMsg, args_2: import("../ffi/ctype.js").MaybePtr<"">, args_3: import("../ffi/ctype.js").MaybePtr<"">) => number;
|
|
249
226
|
/** 同步发送消息并等窗口过程处理
|
|
250
227
|
* @returns 处理结果(0 保真,有符号读)
|
|
251
228
|
* @param args_0 hWnd 目标窗口
|
|
252
229
|
* @param args_1 Msg 消息号(WM_*)
|
|
253
230
|
* @param args_2 wParam 消息参数(整数或缓冲指针)
|
|
254
231
|
* @param args_3 lParam 消息参数(整数或缓冲指针) */
|
|
255
|
-
export const SendMessage
|
|
232
|
+
export declare const SendMessage: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../../constants.js").HdmMsg | import("../../constants.js").ButtonExtMsg | import("../../constants.js").ButtonMsg | import("../../constants.js").ComboBoxMsg | import("../../constants.js").DtMsg | import("../../constants.js").EditMsg | import("../../constants.js").LbMsg | import("../../constants.js").LvMsg | import("../../constants.js").ProgressMsg | import("../../constants.js").StaticMsg | import("../../constants.js").SysLinkMsg | import("../../constants.js").TbMsg | import("../../constants.js").TcMsg | import("../../constants.js").TtMsg | import("../../constants.js").TvMsg | import("../../constants.js").WmMsg, args_2: import("../ffi/ctype.js").MaybePtr<"">, args_3: import("../ffi/ctype.js").MaybePtr<"">) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
256
233
|
/** 退出消息循环(投递 WM_QUIT,wParam = 退出码)
|
|
257
234
|
* @param args_0 nExitCode 退出码 */
|
|
258
|
-
export const PostQuitMessage
|
|
235
|
+
export declare const PostQuitMessage: (args_0: number) => void;
|
|
259
236
|
/** 默认窗口过程(未处理消息的兜底)
|
|
260
237
|
* @returns 处理结果(0 保真,有符号读)
|
|
261
238
|
* @param args_0 hWnd
|
|
262
239
|
* @param args_1 Msg 消息号
|
|
263
240
|
* @param args_2 wParam 消息参数
|
|
264
241
|
* @param args_3 lParam 消息参数 */
|
|
265
|
-
export const DefWindowProc
|
|
242
|
+
export declare const DefWindowProc: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../../constants.js").HdmMsg | import("../../constants.js").ButtonExtMsg | import("../../constants.js").ButtonMsg | import("../../constants.js").ComboBoxMsg | import("../../constants.js").DtMsg | import("../../constants.js").EditMsg | import("../../constants.js").LbMsg | import("../../constants.js").LvMsg | import("../../constants.js").ProgressMsg | import("../../constants.js").StaticMsg | import("../../constants.js").SysLinkMsg | import("../../constants.js").TbMsg | import("../../constants.js").TcMsg | import("../../constants.js").TtMsg | import("../../constants.js").TvMsg | import("../../constants.js").WmMsg, args_2: import("../ffi/ctype.js").MaybePtr<"">, args_3: import("../ffi/ctype.js").MaybePtr<"">) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
266
243
|
/** 调用窗口过程(wndProc = GetWindowLongPtr(GWLP_WNDPROC) 读回的过程指针——无品牌混合位,
|
|
267
244
|
* 仅对本线程窗口调用)
|
|
268
245
|
* @returns 处理结果(0 保真,有符号读)
|
|
@@ -271,43 +248,44 @@ export const DefWindowProc = /*@__PURE__*/ b('DefWindowProcW', '<HWND>ptr u32@An
|
|
|
271
248
|
* @param args_2 Msg 消息号
|
|
272
249
|
* @param args_3 wParam 消息参数
|
|
273
250
|
* @param args_4 lParam 消息参数 */
|
|
274
|
-
export const CallWindowProc
|
|
251
|
+
export declare const CallWindowProc: (args_0: import("../ffi/ctype.js").MaybePtr<"">, args_1: import("../ffi/ctype.js").MaybePtr<"HWND">, args_2: import("../../constants.js").HdmMsg | import("../../constants.js").ButtonExtMsg | import("../../constants.js").ButtonMsg | import("../../constants.js").ComboBoxMsg | import("../../constants.js").DtMsg | import("../../constants.js").EditMsg | import("../../constants.js").LbMsg | import("../../constants.js").LvMsg | import("../../constants.js").ProgressMsg | import("../../constants.js").StaticMsg | import("../../constants.js").SysLinkMsg | import("../../constants.js").TbMsg | import("../../constants.js").TcMsg | import("../../constants.js").TtMsg | import("../../constants.js").TvMsg | import("../../constants.js").WmMsg, args_3: import("../ffi/ctype.js").MaybePtr<"">, args_4: import("../ffi/ctype.js").MaybePtr<"">) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
275
252
|
/** 注册系统级唯一消息 ID(按字符串比较)
|
|
276
253
|
* @returns 消息 ID;失败 → 0
|
|
277
254
|
* @param args_0 lpString 消息名 string */
|
|
278
|
-
export const RegisterWindowMessage
|
|
279
|
-
|
|
280
|
-
// ============ 绘制 / DC ============
|
|
281
|
-
|
|
255
|
+
export declare const RegisterWindowMessage: (args_0: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">) => number;
|
|
282
256
|
/** 取窗口 DC(hWnd 传 NULL → 桌面窗口);用完必须 ReleaseDC 配对
|
|
283
257
|
* @returns DC;失败 → NULL
|
|
284
258
|
* @param args_0 hWnd NULL = 桌面窗口 */
|
|
285
|
-
export const GetDC
|
|
259
|
+
export declare const GetDC: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => import("../ffi/ctype.js").MaybePtr<"HDC">;
|
|
286
260
|
/** 归还 GetDC/GetWindowDC 取的 DC(首参窗口句柄、第二参 DC,误传编译不过)
|
|
287
261
|
* @returns 成功 → 非 0
|
|
288
262
|
* @param args_0 hWnd 取 DC 时的窗口句柄
|
|
289
263
|
* @param args_1 hdc 要归还的 DC */
|
|
290
|
-
export const ReleaseDC
|
|
264
|
+
export declare const ReleaseDC: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: number & {
|
|
265
|
+
readonly ptrBrand: "HDC";
|
|
266
|
+
}) => number;
|
|
291
267
|
/** 让窗口把自己画进 hdcBlt(可截被遮挡 / 最小化的窗口;位图须按整窗尺寸建,从 (0,0) 填满)
|
|
292
268
|
* @returns 成功 → 非 0
|
|
293
269
|
* @param args_0 hWnd 被截窗口
|
|
294
270
|
* @param args_1 hdcBlt 目标 DC
|
|
295
271
|
* @param args_2 nFlags PW_* 标志(PW_CLIENTONLY=1/PW_RENDERFULLCONTENT=2,Win8.1+),XP/Win7 传 0 */
|
|
296
|
-
export const PrintWindow
|
|
272
|
+
export declare const PrintWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: number & {
|
|
273
|
+
readonly ptrBrand: "HDC";
|
|
274
|
+
}, args_2: number) => number;
|
|
297
275
|
/** 取整个窗口(含边框标题)DC;配对 ReleaseDC
|
|
298
276
|
* @returns DC;失败 → NULL
|
|
299
277
|
* @param args_0 hWnd */
|
|
300
|
-
export const GetWindowDC
|
|
278
|
+
export declare const GetWindowDC: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => import("../ffi/ctype.js").MaybePtr<"HDC">;
|
|
301
279
|
/** 开始重绘;配对 EndPaint
|
|
302
280
|
* @returns DC
|
|
303
281
|
* @param args_0 hWnd 重绘窗口
|
|
304
282
|
* @param args_1 lpPaint 出参槽,PAINTSTRUCT.alloc().ptr(见 structs.ts) */
|
|
305
|
-
export const BeginPaint
|
|
283
|
+
export declare const BeginPaint: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"PAINTSTRUCT">) => import("../ffi/ctype.js").MaybePtr<"HDC">;
|
|
306
284
|
/** 结束重绘(传 BeginPaint 同一 buffer)
|
|
307
285
|
* @returns 成功 → 非 0
|
|
308
286
|
* @param args_0 hWnd 重绘窗口
|
|
309
287
|
* @param args_1 lpPaint BeginPaint 同一 PAINTSTRUCT 缓冲 */
|
|
310
|
-
export const EndPaint
|
|
288
|
+
export declare const EndPaint: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"PAINTSTRUCT">) => number;
|
|
311
289
|
/** 文本排版绘制
|
|
312
290
|
* @returns 文本行高
|
|
313
291
|
* @param args_0 hdc 目标 DC
|
|
@@ -315,108 +293,125 @@ export const EndPaint = /*@__PURE__*/ b('EndPaint', '<HWND>ptr <PAINTSTRUCT>ptr
|
|
|
315
293
|
* @param args_2 cchText 字符数(-1 = 自动算到 NUL)
|
|
316
294
|
* @param args_3 lpRect 矩形(双向不注册 encoder;CALCRECT 就地写回:RECT.encode(初值) 传 .ptr、decode 读回)
|
|
317
295
|
* @param args_4 uFormat DT_* 排版标志(DrawTextFlag) */
|
|
318
|
-
export const DrawText
|
|
296
|
+
export declare const DrawText: (args_0: number & {
|
|
297
|
+
readonly ptrBrand: "HDC";
|
|
298
|
+
}, args_1: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_2: number, args_3: import("../ffi/ctype.js").MaybePtr<"RECT">, args_4: number) => number;
|
|
319
299
|
/** 用画刷填充矩形
|
|
320
300
|
* @returns 填充高度
|
|
321
301
|
* @param args_0 hdc 目标 DC
|
|
322
302
|
* @param args_1 lprc 矩形(DeepPartial RECT 对象或 RECT.alloc().ptr)
|
|
323
303
|
* @param args_2 hbr 画刷句柄(无品牌 <>ptr) */
|
|
324
|
-
export const FillRect
|
|
325
|
-
|
|
304
|
+
export declare const FillRect: (args_0: number & {
|
|
305
|
+
readonly ptrBrand: "HDC";
|
|
306
|
+
}, args_1: {
|
|
307
|
+
bottom?: number | undefined;
|
|
308
|
+
left?: number | undefined;
|
|
309
|
+
right?: number | undefined;
|
|
310
|
+
top?: number | undefined;
|
|
311
|
+
} | import("../ffi/ctype.js").MaybePtr<"RECT">, args_2: import("../ffi/ctype.js").MaybePtr<"">) => number;
|
|
326
312
|
/** 用画刷画 1px 空心矩形边框(只描边不填充);成功与否请以像素/后续状态断言
|
|
327
313
|
* @returns 返回值 Windows 版本间不可靠
|
|
328
314
|
* @param args_1 lprc 矩形(DeepPartial RECT 对象或 RECT.alloc().ptr)
|
|
329
315
|
* @param args_2 hbr 画刷句柄(CreateSolidBrush 等返回的 <>ptr 族内互传) */
|
|
330
|
-
export const FrameRect
|
|
331
|
-
|
|
316
|
+
export declare const FrameRect: (args_0: number & {
|
|
317
|
+
readonly ptrBrand: "HDC";
|
|
318
|
+
}, args_1: {
|
|
319
|
+
bottom?: number | undefined;
|
|
320
|
+
left?: number | undefined;
|
|
321
|
+
right?: number | undefined;
|
|
322
|
+
top?: number | undefined;
|
|
323
|
+
} | import("../ffi/ctype.js").MaybePtr<"RECT">, args_2: import("../ffi/ctype.js").MaybePtr<"">) => number;
|
|
332
324
|
/** 矩形区域逐像素按位取反(白→黑、红→青;再反一次可逆还原)
|
|
333
325
|
* @returns 成功 → 非 0
|
|
334
326
|
* @param args_1 lprc 矩形(DeepPartial RECT 对象或 RECT.alloc().ptr) */
|
|
335
|
-
export const InvertRect
|
|
327
|
+
export declare const InvertRect: (args_0: number & {
|
|
328
|
+
readonly ptrBrand: "HDC";
|
|
329
|
+
}, args_1: {
|
|
330
|
+
bottom?: number | undefined;
|
|
331
|
+
left?: number | undefined;
|
|
332
|
+
right?: number | undefined;
|
|
333
|
+
top?: number | undefined;
|
|
334
|
+
} | import("../ffi/ctype.js").MaybePtr<"RECT">) => number;
|
|
336
335
|
/** 标记窗口区域失效(触发重绘)
|
|
337
336
|
* @returns 成功 → 非 0
|
|
338
337
|
* @param args_0 hWnd
|
|
339
338
|
* @param args_1 lpRect 失效区域(DeepPartial RECT / .ptr / NULL = 全窗)
|
|
340
339
|
* @param args_2 bErase 非 0 先擦背景 */
|
|
341
|
-
export const InvalidateRect
|
|
340
|
+
export declare const InvalidateRect: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: {
|
|
341
|
+
bottom?: number | undefined;
|
|
342
|
+
left?: number | undefined;
|
|
343
|
+
right?: number | undefined;
|
|
344
|
+
top?: number | undefined;
|
|
345
|
+
} | import("../ffi/ctype.js").MaybePtr<"RECT">, args_2: number) => number;
|
|
342
346
|
/** 立即重绘失效区域
|
|
343
347
|
* @returns 成功 → 非 0
|
|
344
348
|
* @param args_0 hWnd */
|
|
345
|
-
export const UpdateWindow
|
|
346
|
-
|
|
347
|
-
// ============ 光标 / 坐标 / 捕获 ============
|
|
348
|
-
|
|
349
|
+
export declare const UpdateWindow: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
349
350
|
/** 设光标形状(误传 HWND 编译不过)
|
|
350
351
|
* @returns 先前光标
|
|
351
352
|
* @param args_0 hCursor 光标句柄 */
|
|
352
|
-
export const SetCursor
|
|
353
|
+
export declare const SetCursor: (args_0: import("../ffi/ctype.js").MaybePtr<"HCURSOR">) => import("../ffi/ctype.js").MaybePtr<"HCURSOR">;
|
|
353
354
|
/** 加载光标资源
|
|
354
355
|
* @returns 光标句柄;失败 → NULL
|
|
355
356
|
* @param args_0 hInstance 模块句柄,NULL = 系统光标
|
|
356
357
|
* @param args_1 lpCursorName MAKEINTRESOURCE 整数(如 32512 = IDC_ARROW)直传 */
|
|
357
|
-
export const LoadCursor
|
|
358
|
+
export declare const LoadCursor: (args_0: import("../ffi/ctype.js").MaybePtr<"HMODULE">, args_1: import("../ffi/ctype.js").MaybePtr<"">) => import("../ffi/ctype.js").MaybePtr<"HCURSOR">;
|
|
358
359
|
/** 取光标屏幕坐标
|
|
359
360
|
* @returns 成功 → 非 0
|
|
360
361
|
* @param args_0 lpPoint 出参槽,传 POINT.alloc().ptr、POINT.decode 读回 */
|
|
361
|
-
export const GetCursorPos
|
|
362
|
+
export declare const GetCursorPos: (args_0: import("../ffi/ctype.js").MaybePtr<"POINT">) => number;
|
|
362
363
|
/** 设光标屏幕坐标
|
|
363
364
|
* @returns 成功 → 非 0
|
|
364
365
|
* @param args_0 x 屏幕 x
|
|
365
366
|
* @param args_1 y 屏幕 y */
|
|
366
|
-
export const SetCursorPos
|
|
367
|
+
export declare const SetCursorPos: (args_0: number, args_1: number) => number;
|
|
367
368
|
/** 显示/隐藏光标(计数式)
|
|
368
369
|
* @returns 新计数
|
|
369
370
|
* @param args_0 bShow >0 显示(内部计数),<0 隐藏 */
|
|
370
|
-
export const ShowCursor
|
|
371
|
+
export declare const ShowCursor: (args_0: number) => number;
|
|
371
372
|
/** 屏幕坐标 → 客户区坐标(就地更新,双向不注册 encoder)
|
|
372
373
|
* @returns 成功 → 非 0
|
|
373
374
|
* @param args_0 hWnd 目标窗口
|
|
374
375
|
* @param args_1 lpPoint 就地更新的 POINT(encode(初值) 传 .ptr、decode 读回) */
|
|
375
|
-
export const ScreenToClient
|
|
376
|
+
export declare const ScreenToClient: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"POINT">) => number;
|
|
376
377
|
/** 客户区坐标 → 屏幕坐标(就地更新,同上)
|
|
377
378
|
* @returns 成功 → 非 0
|
|
378
379
|
* @param args_0 hWnd 源窗口
|
|
379
380
|
* @param args_1 lpPoint 就地更新的 POINT(同 ScreenToClient) */
|
|
380
|
-
export const ClientToScreen
|
|
381
|
+
export declare const ClientToScreen: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"POINT">) => number;
|
|
381
382
|
/** 批量坐标系转换
|
|
382
383
|
* @returns 偏移差的低/高 16 位打包值
|
|
383
384
|
* @param args_0 hWndFrom 源窗口
|
|
384
385
|
* @param args_1 hWndTo 目标窗口
|
|
385
386
|
* @param args_2 lpPoints POINT 数组缓冲
|
|
386
387
|
* @param args_3 cPoints 点数 */
|
|
387
|
-
export const MapWindowPoints
|
|
388
|
+
export declare const MapWindowPoints: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"HWND">, args_2: import("../ffi/ctype.js").PtrArrayBuffer<any> | import("../ffi/ctype.js").MaybePtr<"BYTE">, args_3: number) => number;
|
|
388
389
|
/** 取当前捕获鼠标的窗口
|
|
389
390
|
* @returns 窗口句柄;无 → NULL */
|
|
390
|
-
export const GetCapture
|
|
391
|
+
export declare const GetCapture: () => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
391
392
|
/** 捕获鼠标输入到窗口
|
|
392
393
|
* @returns 先前捕获窗口
|
|
393
394
|
* @param args_0 hWnd 接收捕获的窗口 */
|
|
394
|
-
export const SetCapture
|
|
395
|
+
export declare const SetCapture: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => import("../ffi/ctype.js").MaybePtr<"HWND">;
|
|
395
396
|
/** 释放鼠标捕获
|
|
396
397
|
* @returns 成功 → 非 0 */
|
|
397
|
-
export const ReleaseCapture
|
|
398
|
-
|
|
399
|
-
// ============ 键盘 / 输入 ============
|
|
400
|
-
|
|
398
|
+
export declare const ReleaseCapture: () => number;
|
|
401
399
|
/** 取虚拟键状态
|
|
402
400
|
* @returns SHORT:高位 0x8000 = 按下、低位 = 自上次调用的切换
|
|
403
401
|
* @param args_0 nVirtKey 虚拟键码(VK_*) */
|
|
404
|
-
export const GetKeyState
|
|
402
|
+
export declare const GetKeyState: (args_0: number) => number;
|
|
405
403
|
/** 取虚拟键全局按下状态
|
|
406
404
|
* @returns 高位 0x8000 = 当前按下
|
|
407
405
|
* @param args_0 nVirtKey 虚拟键码(VK_*) */
|
|
408
|
-
export const GetAsyncKeyState
|
|
406
|
+
export declare const GetAsyncKeyState: (args_0: number) => number;
|
|
409
407
|
/** 取全部 256 键状态
|
|
410
408
|
* @returns 成功 → 非 0
|
|
411
409
|
* @param args_0 lpKeyState 出参槽,自备 256 字节 buffer */
|
|
412
|
-
export const GetKeyboardState
|
|
410
|
+
export declare const GetKeyboardState: (args_0: import("../ffi/ctype.js").PtrArrayBuffer<any> | import("../ffi/ctype.js").MaybePtr<"BYTE">) => number;
|
|
413
411
|
/** 字符 → 虚拟键+修饰键
|
|
414
412
|
* @returns SHORT(低字节 VK、高位 shift/ctrl/alt 掩码),无 → -1
|
|
415
413
|
* @param args_0 ch 字符码(如 65 = 'A') */
|
|
416
|
-
export const VkKeyScan
|
|
417
|
-
// INPUT 数组 encoder(SendInput 的 <INPUT>ptr 位注册后值域即元素数组——与 gdi32
|
|
418
|
-
// POINTArr 同机制,token/引擎层零数组概念)
|
|
419
|
-
const INPUTArr = /*@__PURE__*/ structArray(INPUT)
|
|
414
|
+
export declare const VkKeyScan: (args_0: number) => number;
|
|
420
415
|
/** 批量注入输入事件(一次调用 = cInputs 个 INPUT 紧密数组 = 一个原子输入块)
|
|
421
416
|
* @returns 成功注入的事件数;0 = 全部失败(UIPI:目标进程完整性更高),< cInputs = 部分成功
|
|
422
417
|
* @param args_0 events INPUT 元素数组(structArray(INPUT) encoder 直传
|
|
@@ -424,96 +419,106 @@ const INPUTArr = /*@__PURE__*/ structArray(INPUT)
|
|
|
424
419
|
* SetProcessDPIAware,GetSystemMetrics/GetWindowRect 同空间,换算 x*65535/(SM_CXSCREEN-1))
|
|
425
420
|
* @param args_1 cbSize 传 INPUT.size(MSDN 要求 = sizeof(INPUT),x86 28 / x64 40,
|
|
426
421
|
* 传错整体静默失败) */
|
|
427
|
-
export const SendInput
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
422
|
+
export declare const SendInput: (args_0: number, args_1: readonly {
|
|
423
|
+
data?: {
|
|
424
|
+
ki?: {
|
|
425
|
+
dwExtraInfo?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
426
|
+
dwFlags?: number | undefined;
|
|
427
|
+
time?: number | undefined;
|
|
428
|
+
wScan?: number | undefined;
|
|
429
|
+
wVk?: number | undefined;
|
|
430
|
+
} | undefined;
|
|
431
|
+
mi?: {
|
|
432
|
+
dwExtraInfo?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
433
|
+
dwFlags?: number | undefined;
|
|
434
|
+
dx?: number | undefined;
|
|
435
|
+
dy?: number | undefined;
|
|
436
|
+
mouseData?: number | undefined;
|
|
437
|
+
time?: number | undefined;
|
|
438
|
+
} | undefined;
|
|
439
|
+
} | undefined;
|
|
440
|
+
type?: number | undefined;
|
|
441
|
+
}[] | import("../ffi/ctype.js").MaybePtr<"INPUT">, args_2: number) => number;
|
|
431
442
|
/** 设定时器(hWnd/id 传 NULL/0 = 自动分配 id;lpTimerFunc 传 NULL 用 WM_TIMER)
|
|
432
443
|
* @returns 定时器 ID(自动分配时从返回值读回);失败 → 0
|
|
433
444
|
* @param args_0 hWnd 关联窗口,可 NULL
|
|
434
445
|
* @param args_1 id 定时器 ID(0 = 自动分配)
|
|
435
446
|
* @param args_2 uElapse 间隔毫秒
|
|
436
447
|
* @param args_3 lpTimerFunc 回调指针(closure().ptr),NULL = WM_TIMER 消息 */
|
|
437
|
-
export const SetTimer
|
|
448
|
+
export declare const SetTimer: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"">, args_2: number, args_3: import("../ffi/ctype.js").MaybePtr<"">) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
438
449
|
/** 杀定时器(id 用 SetTimer 返回值)
|
|
439
450
|
* @returns 成功 → 非 0
|
|
440
451
|
* @param args_0 hWnd 关联窗口,可 NULL
|
|
441
452
|
* @param args_1 id 定时器 ID(SetTimer 返回值) */
|
|
442
|
-
export const KillTimer
|
|
443
|
-
|
|
444
|
-
// ============ 剪贴板 ============
|
|
445
|
-
|
|
453
|
+
export declare const KillTimer: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"">) => number;
|
|
446
454
|
/** 打开剪贴板;配对 CloseClipboard
|
|
447
455
|
* @returns 成功 → 非 0
|
|
448
456
|
* @param args_0 hWnd 拥有窗口,可 NULL */
|
|
449
|
-
export const OpenClipboard
|
|
457
|
+
export declare const OpenClipboard: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
450
458
|
/** 关闭剪贴板
|
|
451
459
|
* @returns 成功 → 非 0 */
|
|
452
|
-
export const CloseClipboard
|
|
460
|
+
export declare const CloseClipboard: () => number;
|
|
453
461
|
/** 清空剪贴板(须先 OpenClipboard)
|
|
454
462
|
* @returns 成功 → 非 0 */
|
|
455
|
-
export const EmptyClipboard
|
|
463
|
+
export declare const EmptyClipboard: () => number;
|
|
456
464
|
/** 取剪贴板数据(须先 OpenClipboard + 有数据)
|
|
457
465
|
* @returns 数据句柄;无 → NULL
|
|
458
466
|
* @param args_0 uFormat 剪贴板格式(CF_* 或 RegisterClipboardFormat 返回值) */
|
|
459
|
-
export const GetClipboardData
|
|
467
|
+
export declare const GetClipboardData: (args_0: number) => import("../ffi/ctype.js").MaybePtr<"HGLOBAL">;
|
|
460
468
|
/** 放数据进剪贴板
|
|
461
469
|
* @returns 成功 → 非 0
|
|
462
470
|
* @param args_0 uFormat 剪贴板格式
|
|
463
471
|
* @param args_1 hMem 全局内存句柄(所有权移交系统后勿再用) */
|
|
464
|
-
export const SetClipboardData
|
|
472
|
+
export declare const SetClipboardData: (args_0: number, args_1: import("../ffi/ctype.js").MaybePtr<"HGLOBAL">) => import("../ffi/ctype.js").MaybePtr<"HGLOBAL">;
|
|
465
473
|
/** 注册自定义剪贴板格式 ID
|
|
466
474
|
* @returns 格式 ID;失败 → 0
|
|
467
475
|
* @param args_0 lpszFormat 格式名 string */
|
|
468
|
-
export const RegisterClipboardFormat
|
|
476
|
+
export declare const RegisterClipboardFormat: (args_0: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">) => number;
|
|
469
477
|
/** 剪贴板是否有指定格式数据
|
|
470
478
|
* @returns 有 → 非 0
|
|
471
479
|
* @param args_0 format 剪贴板格式(CF_*) */
|
|
472
|
-
export const IsClipboardFormatAvailable
|
|
473
|
-
|
|
474
|
-
// ============ 菜单 ============
|
|
475
|
-
|
|
480
|
+
export declare const IsClipboardFormatAvailable: (args_0: number) => number;
|
|
476
481
|
/** 取窗口菜单
|
|
477
482
|
* @returns 菜单句柄;无菜单 → NULL
|
|
478
483
|
* @param args_0 hWnd */
|
|
479
|
-
export const GetMenu
|
|
484
|
+
export declare const GetMenu: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => import("../ffi/ctype.js").MaybePtr<"HMENU">;
|
|
480
485
|
/** 设/清窗口菜单;改后需 DrawMenuBar
|
|
481
486
|
* @returns 成功 → 非 0
|
|
482
487
|
* @param args_0 hWnd
|
|
483
488
|
* @param args_1 hMenu 新菜单,NULL 清除 */
|
|
484
|
-
export const SetMenu
|
|
489
|
+
export declare const SetMenu: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: import("../ffi/ctype.js").MaybePtr<"HMENU">) => number;
|
|
485
490
|
/** 重画菜单栏
|
|
486
491
|
* @returns 成功 → 非 0
|
|
487
492
|
* @param args_0 hWnd */
|
|
488
|
-
export const DrawMenuBar
|
|
493
|
+
export declare const DrawMenuBar: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">) => number;
|
|
489
494
|
/** 追加菜单项
|
|
490
495
|
* @returns 成功 → 非 0
|
|
491
496
|
* @param args_0 hMenu 目标菜单
|
|
492
497
|
* @param args_1 uFlags MF_* 标志(MF_STRING/MF_SEPARATOR/MF_POPUP 等)
|
|
493
498
|
* @param args_2 uIDNewItem 命令 ID 或子菜单句柄(混合位)
|
|
494
499
|
* @param args_3 lpNewItem 菜单项文本 string 或 NULL */
|
|
495
|
-
export const AppendMenu
|
|
500
|
+
export declare const AppendMenu: (args_0: import("../ffi/ctype.js").MaybePtr<"HMENU">, args_1: number, args_2: import("../ffi/ctype.js").MaybePtr<"">, args_3: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">) => number;
|
|
496
501
|
/** 销毁菜单(误传 HWND 编译不过)
|
|
497
502
|
* @returns 成功 → 非 0
|
|
498
503
|
* @param args_0 hMenu */
|
|
499
|
-
export const DestroyMenu
|
|
504
|
+
export declare const DestroyMenu: (args_0: import("../ffi/ctype.js").MaybePtr<"HMENU">) => number;
|
|
500
505
|
/** 设菜单项勾选状态
|
|
501
506
|
* @returns 先前状态(0xFFFFFFFF = 失败)
|
|
502
507
|
* @param args_0 hMenu
|
|
503
508
|
* @param args_1 uIDItem 菜单项 ID 或位置(依 uFlags MF_BYPOSITION)
|
|
504
509
|
* @param args_2 uCheck MF_CHECKED/MF_UNCHECKED 等 */
|
|
505
|
-
export const CheckMenuItem
|
|
510
|
+
export declare const CheckMenuItem: (args_0: import("../ffi/ctype.js").MaybePtr<"HMENU">, args_1: number, args_2: number) => number;
|
|
506
511
|
/** 启用/禁用/灰化菜单项
|
|
507
512
|
* @returns 先前状态
|
|
508
513
|
* @param args_0 hMenu
|
|
509
514
|
* @param args_1 uIDItem 菜单项 ID 或位置
|
|
510
515
|
* @param args_2 uEnable MF_ENABLED/MF_GRAYED/MF_DISABLED 等 */
|
|
511
|
-
export const EnableMenuItem
|
|
516
|
+
export declare const EnableMenuItem: (args_0: import("../ffi/ctype.js").MaybePtr<"HMENU">, args_1: number, args_2: number) => number;
|
|
512
517
|
/** 取子菜单(按位置)
|
|
513
518
|
* @returns 子菜单句柄;无 → NULL(出入参同型)
|
|
514
519
|
* @param args_0 hMenu 父菜单
|
|
515
520
|
* @param args_1 nPos 子菜单位置索引 */
|
|
516
|
-
export const GetSubMenu
|
|
521
|
+
export declare const GetSubMenu: (args_0: import("../ffi/ctype.js").MaybePtr<"HMENU">, args_1: number) => import("../ffi/ctype.js").MaybePtr<"HMENU">;
|
|
517
522
|
/** 弹出跟踪菜单
|
|
518
523
|
* @returns 菜单项命令 ID 或 0
|
|
519
524
|
* @param args_0 hMenu 弹出菜单
|
|
@@ -523,13 +528,15 @@ export const GetSubMenu = /*@__PURE__*/ b('GetSubMenu', '<HMENU>ptr i32 -> <HMEN
|
|
|
523
528
|
* @param args_4 nReserved 保留,传 0(TrackPopupMenuEx 才用)
|
|
524
529
|
* @param args_5 hWnd 拥有者窗口(TPM_RETURNCMD 时命令 ID 回到该窗口所属线程队列)
|
|
525
530
|
* @param args_6 prcRect 保留位,传 NULL(Win32 文档标注本 API 忽略此参数) */
|
|
526
|
-
export const TrackPopupMenu
|
|
531
|
+
export declare const TrackPopupMenu: (args_0: import("../ffi/ctype.js").MaybePtr<"HMENU">, args_1: number, args_2: number, args_3: number, args_4: number, args_5: import("../ffi/ctype.js").MaybePtr<"HWND">, args_6: {
|
|
532
|
+
bottom?: number | undefined;
|
|
533
|
+
left?: number | undefined;
|
|
534
|
+
right?: number | undefined;
|
|
535
|
+
top?: number | undefined;
|
|
536
|
+
} | import("../ffi/ctype.js").MaybePtr<"RECT">) => number;
|
|
527
537
|
/** 创建弹出菜单;配对 DestroyMenu
|
|
528
538
|
* @returns 菜单句柄;失败 → NULL */
|
|
529
|
-
export const CreatePopupMenu
|
|
530
|
-
|
|
531
|
-
// ============ 滚动条 ============
|
|
532
|
-
|
|
539
|
+
export declare const CreatePopupMenu: () => import("../ffi/ctype.js").MaybePtr<"HMENU">;
|
|
533
540
|
/** 设滚动参数
|
|
534
541
|
* @returns 滑块位置
|
|
535
542
|
* @param args_0 hWnd
|
|
@@ -537,32 +544,34 @@ export const CreatePopupMenu = /*@__PURE__*/ b('CreatePopupMenu', ' -> <HMENU>pt
|
|
|
537
544
|
* @param args_2 lpScrollInfo DeepPartial SCROLLINFO(cbSize 必须显式给 SCROLLINFO.size——Win32
|
|
538
545
|
* 结构自描述要求,缺省跳过帮不了;fMask = SIF_* 决定写哪些项)
|
|
539
546
|
* @param args_3 redraw 非 0 立即重画 */
|
|
540
|
-
export const SetScrollInfo
|
|
547
|
+
export declare const SetScrollInfo: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: number, args_2: {
|
|
548
|
+
cbSize?: number | undefined;
|
|
549
|
+
fMask?: number | undefined;
|
|
550
|
+
nMax?: number | undefined;
|
|
551
|
+
nMin?: number | undefined;
|
|
552
|
+
nPage?: number | undefined;
|
|
553
|
+
nPos?: number | undefined;
|
|
554
|
+
nTrackPos?: number | undefined;
|
|
555
|
+
} | import("../ffi/ctype.js").MaybePtr<"SCROLLINFO">, args_3: number) => number;
|
|
541
556
|
/** 取滚动参数(双向不注册 encoder)
|
|
542
557
|
* @returns 成功 → 非 0
|
|
543
558
|
* @param args_0 hWnd
|
|
544
559
|
* @param args_1 nBar 滚动条(SB_*)
|
|
545
560
|
* @param args_2 lpScrollInfo SCROLLINFO.encode({cbSize, fMask}) 传 .ptr、decode 读回 */
|
|
546
|
-
export const GetScrollInfo
|
|
561
|
+
export declare const GetScrollInfo: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: number, args_2: import("../ffi/ctype.js").MaybePtr<"SCROLLINFO">) => number;
|
|
547
562
|
/** 显示/隐藏滚动条
|
|
548
563
|
* @returns 成功 → 非 0
|
|
549
564
|
* @param args_0 hWnd
|
|
550
565
|
* @param args_1 bar 滚动条(0=HORZ 1=VERT 3=BOTH)
|
|
551
566
|
* @param args_2 show 非 0 显示 */
|
|
552
|
-
export const ShowScrollBar
|
|
553
|
-
|
|
554
|
-
// ============ 对话框 ============
|
|
555
|
-
|
|
567
|
+
export declare const ShowScrollBar: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: number, args_2: number) => number;
|
|
556
568
|
/** 消息框(仅在确实要弹窗时调用;MB_* 常量见 MSDN)
|
|
557
569
|
* @returns 按钮 ID
|
|
558
570
|
* @param args_0 hWnd 父窗口,可 NULL
|
|
559
571
|
* @param args_1 lpText 正文 string
|
|
560
572
|
* @param args_2 lpCaption 标题 string
|
|
561
573
|
* @param args_3 uType MB_* 样式(MB_OK/MB_YESNO 等) */
|
|
562
|
-
export const MessageBox
|
|
563
|
-
|
|
564
|
-
// ============ 图像 ============
|
|
565
|
-
|
|
574
|
+
export declare const MessageBox: (args_0: import("../ffi/ctype.js").MaybePtr<"HWND">, args_1: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_2: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_3: number) => number;
|
|
566
575
|
/** 按名加载图像(string 自动编码;uType/fuLoad 用 Win32 真值——与 ImageType 枚举当前值
|
|
567
576
|
* 不同)
|
|
568
577
|
* @returns 图像句柄——类型随 uType(IMAGE_ICON→HICON / CURSOR→HCURSOR / BITMAP→HBITMAP),
|
|
@@ -573,7 +582,7 @@ export const MessageBox = /*@__PURE__*/ b('MessageBoxW', '<HWND>ptr <WCHAR>ptr <
|
|
|
573
582
|
* @param args_3 cx 期望宽度(0 = 原始)
|
|
574
583
|
* @param args_4 cy 期望高度(0 = 原始)
|
|
575
584
|
* @param args_5 fuLoad LR_* 标志(LR_LOADFROMFILE=0x10/LR_SHARED=0x8000,系统 IDI 需 SHARED) */
|
|
576
|
-
export const LoadImage
|
|
585
|
+
export declare const LoadImage: (args_0: import("../ffi/ctype.js").MaybePtr<"HMODULE">, args_1: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_2: number, args_3: number, args_4: number, args_5: number) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
577
586
|
/** 按资源 ID 序数加载图像(name 直传 MAKEINTRESOURCE 整数);其余同 LoadImage
|
|
578
587
|
* @returns 图像句柄;失败 → 0
|
|
579
588
|
* @param args_0 hinst 模块句柄
|
|
@@ -582,39 +591,33 @@ export const LoadImage = /*@__PURE__*/ b('LoadImageW', '<HMODULE>ptr <WCHAR>ptr
|
|
|
582
591
|
* @param args_3 cx 期望宽度(0 = 原始)
|
|
583
592
|
* @param args_4 cy 期望高度(0 = 原始)
|
|
584
593
|
* @param args_5 fuLoad LR_* 标志 */
|
|
585
|
-
export const LoadImageOrdinal
|
|
586
|
-
|
|
587
|
-
// ============ 杂项高频 ============
|
|
588
|
-
|
|
594
|
+
export declare const LoadImageOrdinal: (args_0: import("../ffi/ctype.js").MaybePtr<"HMODULE">, args_1: import("../ffi/ctype.js").MaybePtr<"">, args_2: number, args_3: number, args_4: number, args_5: number) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
589
595
|
/** 取系统度量
|
|
590
596
|
* @returns 度量值
|
|
591
597
|
* @param args_0 nIndex 度量索引(SM_CXSCREEN=0/SM_CYSCREEN=1 等 SM_*) */
|
|
592
|
-
export const GetSystemMetrics
|
|
598
|
+
export declare const GetSystemMetrics: (args_0: number) => number;
|
|
593
599
|
/** 读/写系统参数
|
|
594
600
|
* @returns 成功 → 非 0
|
|
595
601
|
* @param args_0 uiAction SPI_* 操作码
|
|
596
602
|
* @param args_1 uiParam 参数(随操作而定,常为缓冲大小或 0)
|
|
597
603
|
* @param args_2 pvParam 数据 buffer(如 SPI_GETNONCLIENTMETRICS 的缓冲)
|
|
598
604
|
* @param args_3 fWinIni SPIF_* 写入标志(0 = 仅当前会话) */
|
|
599
|
-
export const SystemParametersInfo
|
|
605
|
+
export declare const SystemParametersInfo: (args_0: number, args_1: number, args_2: import("../ffi/ctype.js").PtrArrayBuffer<any> | import("../ffi/ctype.js").MaybePtr<"BYTE">, args_3: number) => number;
|
|
600
606
|
/** 枚举顶层窗口
|
|
601
607
|
* @returns 全枚举完 → 非 0
|
|
602
608
|
* @param args_0 lpEnumFunc 回调指针(closure(stdcall)().ptr),回调返 0 停止
|
|
603
609
|
* @param args_1 lParam 透传给回调的附加值(常传 0) */
|
|
604
|
-
export const EnumWindows
|
|
605
|
-
|
|
606
|
-
// ============ 显示模式(分辨率/刷新率)============
|
|
607
|
-
|
|
610
|
+
export declare const EnumWindows: (args_0: import("../ffi/ctype.js").MaybePtr<"">, args_1: import("../ffi/ctype.js").MaybePtr<"">) => number;
|
|
608
611
|
/** 枚举显示模式(iDevNum 从 0 起逐个枚举)
|
|
609
612
|
* @returns 找到 → 非 0;枚举尽 → 0
|
|
610
613
|
* @param args_0 lpszDeviceName 设备名,NULL = 主显示设备
|
|
611
614
|
* @param args_1 iDevNum 模式序号(0 起递增;-1 = 当前设置)
|
|
612
615
|
* @param args_2 lpDevMode DEVMODEW 出参缓冲(双向不注册 encoder,只收 def 的 .ptr;
|
|
613
616
|
* encode({ dmSize: DEVMODEW.size }).ptr 传入、decode 读回) */
|
|
614
|
-
export const EnumDisplaySettings
|
|
617
|
+
export declare const EnumDisplaySettings: (args_0: string | import("../ffi/ctype.js").MaybePtr<"WCHAR">, args_1: number, args_2: import("../ffi/ctype.js").MaybePtr<"DEVMODEW">) => number;
|
|
615
618
|
/** 改显示模式
|
|
616
619
|
* @returns DISP_CHANGE_*(0 = DISP_CHANGE_SUCCESSFUL)
|
|
617
620
|
* @param args_0 lpDevMode DEVMODEW 缓冲(须先枚举/预置 dmSize+dmFields,
|
|
618
621
|
* DM_PELSWIDTH|DM_PELSHEIGHT 等决定生效项;收 encode(...).ptr)
|
|
619
622
|
* @param args_1 dwFlags CDS_* 标志(0 = 仅当前会话、CDS_UPDATEREGISTRY = 写注册表持久化) */
|
|
620
|
-
export const ChangeDisplaySettings
|
|
623
|
+
export declare const ChangeDisplaySettings: (args_0: import("../ffi/ctype.js").MaybePtr<"DEVMODEW">, args_1: number) => number;
|