quickwin 2.3.1 → 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/README.en.md +1 -2
- package/README.md +1 -2
- package/constants.ts +15 -0
- package/enum_map.d.ts +3 -0
- package/examples/PdfCanvas.js +1 -1
- package/examples/PdfCanvas.tsx +2 -2
- package/examples/execd/main.js +334 -188
- package/examples/pdf_preview2.js +76 -67
- package/examples/pdf_preview2.ts +84 -64
- package/examples/pdf_viewer.js +4932 -1029
- package/examples/pdf_viewer.tsx +11 -22
- package/examples/test_gallery.js +308 -143
- package/examples/test_gallery.tsx +12 -7
- package/examples/test_react_lazy.js +295 -133
- package/examples/test_react_lazy.tsx +4 -3
- package/examples/test_react_listbox.js +293 -132
- package/examples/test_react_listbox.tsx +3 -2
- package/examples/test_root_window.js +283 -126
- package/examples/test_tab.js +295 -133
- package/examples/test_tab.tsx +4 -3
- package/examples/tray_demo.js +37 -30
- package/examples/tray_demo.tsx +39 -32
- package/lib/abort.d.ts +21 -0
- package/lib/assert.d.ts +2 -0
- package/lib/bitmap.d.ts +7 -0
- package/lib/bitmap.js +40 -0
- package/lib/cache-utils.d.ts +6 -0
- package/lib/certs.d.ts +1 -0
- package/lib/certs.js +31 -3
- package/lib/dpi.d.ts +9 -0
- package/lib/dpi.js +30 -0
- package/lib/dumpRects.d.ts +2 -0
- package/lib/dumpRects.js +14 -7
- 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/bind.js +5 -4
- 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/DateTimePicker.js +6 -7
- package/lib/react-qw/components/Input.d.ts +15 -0
- package/lib/react-qw/components/Input.js +5 -1
- 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/ListView.js +8 -6
- 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/ScrollView.js +28 -22
- 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/index.js +7 -5
- 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/props.js +3 -3
- package/lib/react-qw/reconciler.d.ts +21 -0
- package/lib/react-qw/reconciler.js +12 -17
- 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/text-measure.js +9 -6
- 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/comctl32.js +3 -2
- package/lib/windows/comdlg32.d.ts +4 -0
- package/lib/windows/{gdi32.ts → gdi32.d.ts} +184 -97
- package/lib/windows/gdi32.js +28 -6
- package/lib/windows/{kernel32.ts → kernel32.d.ts} +145 -113
- package/lib/windows/kernel32.js +9 -0
- 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.d.ts +51 -0
- package/lib/windows/shell32.js +11 -2
- package/lib/windows/structs.d.ts +3141 -0
- package/lib/windows/structs.js +51 -0
- package/lib/windows/user32.d.ts +623 -0
- package/lib/windows/user32.js +6 -5
- package/lib/windows/version.d.ts +27 -0
- package/lib/windows/{winspool.ts → winspool.d.ts} +18 -32
- package/main.js +13 -5
- package/package.json +16 -7
- package/quickwin.d.ts +13 -115
- 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/test/bench_ffi_callraw.js +3 -4
- package/test/bench_ffi_callraw.ts +3 -4
- package/test/debug/mupdf_debug.js +4 -22
- package/test/debug/wasm_export_debug.js +2 -12
- package/test/debug/wasm_names.js +3 -13
- package/test/example.pdf +0 -0
- package/test/mupdf-cdn.js +40 -0
- package/test/mupdf-cdn.ts +43 -0
- package/test/test_ffi.js +8 -9
- package/test/test_ffi.ts +8 -9
- package/test/test_ffi_abi.js +6 -6
- package/test/test_ffi_abi.ts +8 -8
- package/test/test_ffi_windows.js +82 -11
- package/test/test_ffi_windows.ts +85 -11
- package/test/test_gdi_draw.js +3 -3
- package/test/test_gdi_draw.ts +4 -4
- package/test/test_mupdf_render.js +4 -22
- package/test/test_mupdf_render.ts +4 -23
- package/test/test_mupdf_twice.js +4 -19
- package/test/test_mupdf_twice.ts +4 -20
- package/test/test_mupdf_wasm.js +10 -4
- package/test/test_mupdf_wasm.ts +6 -4
- package/test/test_react_complex.js +316 -140
- package/test/test_react_counter.js +295 -133
- package/test/test_react_flex.js +297 -138
- package/test/test_react_hidden.js +296 -134
- package/test/test_react_listview_link.js +288 -131
- package/test/test_react_notify.js +290 -133
- package/test/test_react_render.js +295 -133
- package/lib/abort.ts +0 -69
- package/lib/assert.ts +0 -7
- package/lib/cache-utils.ts +0 -40
- package/lib/certs.ts +0 -229
- package/lib/dumpRects.ts +0 -26
- package/lib/exec-log.ts +0 -30
- package/lib/fetch.ts +0 -589
- package/lib/ffi/bind.ts +0 -539
- 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 -383
- package/lib/stream.ts +0 -22
- package/lib/text-codec.ts +0 -171
- package/lib/text-measure.ts +0 -41
- package/lib/url.ts +0 -201
- package/lib/websocket.ts +0 -600
- package/lib/windows/comctl32.ts +0 -19
- package/lib/windows/comdlg32.ts +0 -10
- package/lib/windows/ntdll.ts +0 -11
- package/lib/windows/ole32.ts +0 -9
- package/lib/windows/shell32.ts +0 -39
- package/lib/windows/structs.ts +0 -752
- package/lib/windows/user32.ts +0 -619
- package/lib/windows/version.ts +0 -35
- package/vendor/mupdf-wasm/mupdf-wasm.d.ts +0 -571
- package/vendor/mupdf-wasm/mupdf-wasm.js +0 -2749
- package/vendor/mupdf-wasm/mupdf-wasm.wasm +0 -0
- package/vendor/mupdf-wasm/mupdf.d.ts +0 -939
- package/vendor/mupdf-wasm/mupdf.js +0 -3317
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/** 文件夹浏览对话框;PIDL 用 ole32.CoTaskMemFree 释放
|
|
2
|
+
* @returns PIDL,取消 → 0
|
|
3
|
+
* @param args_0 pbi BROWSEINFOW.encode(...).ptr(见 structs.ts) */
|
|
4
|
+
export declare const SHBrowseForFolder: (args_0: import("../ffi/ctype.js").MaybePtr<"BROWSEINFOW">) => import("../ffi/ctype.js").MaybePtr<"">;
|
|
5
|
+
/** PIDL → 文件系统全路径
|
|
6
|
+
* @returns PIDL 在文件系统中 → 非 0,否则 0(缓冲内容未定义)
|
|
7
|
+
* @param args_0 pidl SHBrowseForFolder 等返回的 PIDL
|
|
8
|
+
* @param args_1 pszPath 出参缓冲,WCHAR.alloc(260)(MAX_PATH=260)、WCHAR.decode 读回 */
|
|
9
|
+
export declare const SHGetPathFromIDList: (args_0: import("../ffi/ctype.js").MaybePtr<"">, args_1: import("../ffi/ctype.js").PtrArrayBuffer<any> | import("../ffi/ctype.js").MaybePtr<"BYTE">) => number;
|
|
10
|
+
/** 取托盘通知图标的屏幕矩形(Shell_NotifyIconGetRect;**Win7+**——XP 无此导出,
|
|
11
|
+
* 故为**可选绑定**:老系统上本常量为 null(bind() 是模块顶层立即解析,缺符号 throw
|
|
12
|
+
* 会拖垮整个脚本启动),调用方必须判空)
|
|
13
|
+
* @returns HRESULT,实测语义:0 = 图标在通知区内,iconLocation = 其容器(可见区 /
|
|
14
|
+
* 溢出面板)内位置——**溢出面板未展开时该 rect 不是屏幕可点位**;1 = 按文档为
|
|
15
|
+
* 不可见态(隐藏/溢出;本机未复现——实测 Win7 溢出图标亦返 0);0x80004005 E_FAIL
|
|
16
|
+
* = 图标不存在,或该图标未按 {hWnd,uID} 注册(系统 GUID 图标实测 not_found)
|
|
17
|
+
* @param args_0 identifier NOTIFYICONIDENTIFIER 对象直传(encoder 已注册;cbSize 填
|
|
18
|
+
* NOTIFYICONIDENTIFIER.size,guidItem 缺省 = GUID_NULL 走 hWnd+uID)
|
|
19
|
+
* @param args_1 iconLocation 出参槽,RECT.alloc().ptr(出参位不注册,方向约定同
|
|
20
|
+
* user32),RECT.decode 读回 */
|
|
21
|
+
export declare const Shell_NotifyIconGetRect: ((args_0: {
|
|
22
|
+
cbSize?: number | undefined;
|
|
23
|
+
guidItem?: [number, number, number, number] | undefined;
|
|
24
|
+
hWnd?: import("../ffi/ctype.js").MaybePtr<"HWND"> | undefined;
|
|
25
|
+
uID?: number | undefined;
|
|
26
|
+
} | import("../ffi/ctype.js").MaybePtr<"NOTIFYICONIDENTIFIER">, args_1: import("../ffi/ctype.js").MaybePtr<"RECT">) => number) | null;
|
|
27
|
+
/** 托盘通知图标增删改(Shell_NotifyIconW;XP 起即有)
|
|
28
|
+
* @returns 成功 → 非 0,失败 → 0
|
|
29
|
+
* @param args_0 dwMessage NotifyIconCmd(ADD / MODIFY / DELETE / SETVERSION…;DELETE 只需
|
|
30
|
+
* hWnd+uID)
|
|
31
|
+
* @param args_1 lpData NOTIFYICONDATAW 对象直传(encoder 已注册,缺省字段跳过);cbSize 填
|
|
32
|
+
* NOTIFYICONDATAW.size、uFlags 取 NotifyIconFlag.*(ICON/MESSAGE/TIP…,决定下面哪些字段
|
|
33
|
+
* 生效)、uCallbackMessage 常填自定义消息号、hIcon 接 LoadImage/LoadAppIcon 的结果、
|
|
34
|
+
* szTip 直接给 string(宽字符串糖,最长 127 字符) */
|
|
35
|
+
export declare const ShellNotifyIcon: (args_0: number, args_1: {
|
|
36
|
+
cbSize?: number | undefined;
|
|
37
|
+
dwInfoFlags?: number | undefined;
|
|
38
|
+
dwState?: number | undefined;
|
|
39
|
+
dwStateMask?: number | undefined;
|
|
40
|
+
guidItem?: [number, number, number, number] | undefined;
|
|
41
|
+
hBalloonIcon?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
42
|
+
hIcon?: import("../ffi/ctype.js").MaybePtr<""> | undefined;
|
|
43
|
+
hWnd?: import("../ffi/ctype.js").MaybePtr<"HWND"> | undefined;
|
|
44
|
+
szInfo?: string | undefined;
|
|
45
|
+
szInfoTitle?: string | undefined;
|
|
46
|
+
szTip?: string | undefined;
|
|
47
|
+
uCallbackMessage?: number | undefined;
|
|
48
|
+
uFlags?: number | undefined;
|
|
49
|
+
uID?: number | undefined;
|
|
50
|
+
uTimeout?: number | undefined;
|
|
51
|
+
} | import("../ffi/ctype.js").MaybePtr<"NOTIFYICONDATAW">) => number;
|
package/lib/windows/shell32.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// shell32 绑定(shell 对话框 / PIDL→路径 /
|
|
1
|
+
// shell32 绑定(shell 对话框 / PIDL→路径 / 托盘图标增删与定位)
|
|
2
2
|
import { bind } from '../ffi/bind.js';
|
|
3
|
-
import { NOTIFYICONIDENTIFIER } from './structs.js';
|
|
3
|
+
import { NOTIFYICONIDENTIFIER, NOTIFYICONDATAW } from './structs.js';
|
|
4
4
|
// dll 名部分应用(工厂转调保泛型 infer,见 lib/windows/user32.ts 头注释);第三参透传
|
|
5
5
|
// encoders(结构入参位注册,方向约定见 lib/windows/user32.ts 头注释)
|
|
6
6
|
const b = (name, sig, encoders) => bind('shell32.dll', name, sig, encoders);
|
|
@@ -32,3 +32,12 @@ export const Shell_NotifyIconGetRect = (() => {
|
|
|
32
32
|
return null; // XP 等老系统无此导出(可选 API);探测走 examples/execd/tray.ts
|
|
33
33
|
}
|
|
34
34
|
})();
|
|
35
|
+
/** 托盘通知图标增删改(Shell_NotifyIconW;XP 起即有)
|
|
36
|
+
* @returns 成功 → 非 0,失败 → 0
|
|
37
|
+
* @param args_0 dwMessage NotifyIconCmd(ADD / MODIFY / DELETE / SETVERSION…;DELETE 只需
|
|
38
|
+
* hWnd+uID)
|
|
39
|
+
* @param args_1 lpData NOTIFYICONDATAW 对象直传(encoder 已注册,缺省字段跳过);cbSize 填
|
|
40
|
+
* NOTIFYICONDATAW.size、uFlags 取 NotifyIconFlag.*(ICON/MESSAGE/TIP…,决定下面哪些字段
|
|
41
|
+
* 生效)、uCallbackMessage 常填自定义消息号、hIcon 接 LoadImage/LoadAppIcon 的结果、
|
|
42
|
+
* szTip 直接给 string(宽字符串糖,最长 127 字符) */
|
|
43
|
+
export const ShellNotifyIcon = /*@__PURE__*/ b('Shell_NotifyIconW', 'u32 <NOTIFYICONDATAW>ptr -> i32', { NOTIFYICONDATAW });
|