quickwin 2.2.0 → 2.3.0
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 +7 -7
- package/README.md +7 -7
- package/constants.ts +1063 -0
- package/enum_map.d.ts +129 -0
- package/examples/PdfCanvas.js +2 -2
- package/examples/PdfCanvas.tsx +3 -2
- package/examples/{execd.js → execd/main.js} +563 -122
- package/examples/execd/tray.js +192 -0
- package/examples/{execd_worker.js → execd/worker.js} +7 -7
- package/examples/pdf_preview2.js +46 -46
- package/examples/pdf_preview2.ts +55 -54
- package/examples/pdf_viewer.js +34 -19
- package/examples/pdf_viewer.tsx +6 -5
- package/examples/test_gallery.js +35 -20
- package/examples/test_gallery.tsx +9 -8
- package/examples/test_react_lazy.js +34 -19
- package/examples/test_react_lazy.tsx +7 -6
- package/examples/test_react_listbox.js +34 -19
- package/examples/test_react_listbox.tsx +8 -7
- package/examples/test_root_window.js +34 -19
- package/examples/test_root_window.tsx +5 -5
- package/examples/test_tab.js +34 -19
- package/examples/test_tab.tsx +7 -6
- package/examples/tray_demo.js +8 -8
- package/examples/tray_demo.tsx +9 -8
- package/lib/dumpRects.js +2 -2
- package/lib/dumpRects.ts +3 -2
- package/lib/fetch.js +15 -15
- package/lib/fetch.ts +16 -15
- package/lib/ffi/bind.js +3 -3
- package/lib/ffi/bind.ts +3 -3
- package/lib/http-server.js +4 -4
- package/lib/http-server.ts +5 -4
- package/lib/react-qw/components/Button.js +2 -2
- package/lib/react-qw/components/CheckBox.js +4 -4
- package/lib/react-qw/components/ComboBox.js +10 -10
- package/lib/react-qw/components/DateTimePicker.js +12 -12
- package/lib/react-qw/components/Input.js +7 -7
- package/lib/react-qw/components/Link.js +4 -4
- package/lib/react-qw/components/ListBox.js +12 -12
- package/lib/react-qw/components/ListView.js +35 -35
- package/lib/react-qw/components/PathPicker.js +3 -3
- package/lib/react-qw/components/ProgressBar.js +4 -4
- package/lib/react-qw/components/RadioButton.js +4 -4
- package/lib/react-qw/components/ScrollView.js +28 -28
- package/lib/react-qw/components/Slider.js +11 -11
- package/lib/react-qw/components/Tab.js +10 -10
- package/lib/react-qw/components/Tooltip.js +8 -8
- package/lib/react-qw/components/TreeView.js +20 -20
- package/lib/react-qw/index.js +5 -5
- package/lib/react-qw/index.ts +6 -5
- package/lib/react-qw/props.js +4 -4
- package/lib/react-qw/props.ts +5 -4
- package/lib/react-qw/reconciler.js +10 -10
- package/lib/react-qw/reconciler.ts +11 -10
- package/lib/text-measure.js +3 -3
- package/lib/text-measure.ts +4 -3
- package/lib/websocket.js +17 -17
- package/lib/websocket.ts +18 -17
- package/lib/windows/advapi32.js +7 -7
- package/lib/windows/advapi32.ts +7 -7
- package/lib/windows/gdi32.js +16 -16
- package/lib/windows/gdi32.ts +16 -16
- package/lib/windows/kernel32.js +41 -2
- package/lib/windows/kernel32.ts +45 -2
- package/lib/windows/shell32.js +24 -3
- package/lib/windows/shell32.ts +27 -4
- package/lib/windows/structs.js +54 -0
- package/lib/windows/structs.ts +63 -1
- package/lib/windows/user32.js +18 -6
- package/lib/windows/user32.ts +18 -6
- package/lib/windows/winspool.js +3 -3
- package/lib/windows/winspool.ts +3 -3
- package/package.json +4 -3
- package/quickwin.d.ts +32 -10
- 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/test_ffi_bind.js +7 -7
- package/test/test_ffi_bind.ts +8 -8
- package/test/test_ffi_struct.js +2 -2
- package/test/test_ffi_struct.ts +3 -3
- package/test/test_ffi_windows.js +1 -1
- package/test/test_ffi_windows.ts +1 -1
- package/test/test_files.js +7 -7
- package/test/test_files.ts +8 -8
- package/test/test_gdi_draw.js +51 -51
- package/test/test_gdi_draw.ts +57 -57
- package/test/test_http_server.js +3 -3
- package/test/test_http_server.ts +4 -3
- package/test/test_ipv6.js +3 -3
- package/test/test_ipv6.ts +4 -3
- package/test/test_net_event.js +3 -3
- package/test/test_net_event.ts +4 -3
- package/test/test_printer.js +4 -4
- package/test/test_printer.ts +5 -5
- package/test/test_react_complex.js +36 -21
- package/test/test_react_counter.js +34 -19
- package/test/test_react_flex.js +36 -21
- package/test/test_react_hidden.js +34 -19
- package/test/test_react_listview_link.js +35 -20
- package/test/test_react_notify.js +52 -37
- package/test/test_react_render.js +34 -19
- package/test/test_registry.js +6 -6
- package/test/test_registry.ts +8 -8
- package/test/test_wolfssl_read.js +8 -8
- package/test/test_wolfssl_read.ts +9 -8
- package/examples/execd.tsx +0 -798
- package/examples/execd_worker.ts +0 -127
- package/quickwin_const.d.ts +0 -1063
|
@@ -3,6 +3,7 @@ import * as wolfssl from 'wolfssl'
|
|
|
3
3
|
import * as os from 'os'
|
|
4
4
|
import * as std from 'std'
|
|
5
5
|
import { Tester } from './test_helper.js'
|
|
6
|
+
import { FdEvent, ReturnCode, SniType, VerifyMode } from '../constants'
|
|
6
7
|
|
|
7
8
|
const HTTPS_PORT = 18924
|
|
8
9
|
const WANT_READ = 2
|
|
@@ -110,7 +111,7 @@ export const suite = {
|
|
|
110
111
|
sock.set_on_event(s, (event: { lNetworkEvents: number; iErrorCode: number[] }) => {
|
|
111
112
|
if (done) return
|
|
112
113
|
|
|
113
|
-
if (event.lNetworkEvents &
|
|
114
|
+
if (event.lNetworkEvents & FdEvent.FD_CONNECT) {
|
|
114
115
|
if (event.iErrorCode[0] !== 0) {
|
|
115
116
|
assert('connect error code 0', false)
|
|
116
117
|
finish()
|
|
@@ -120,15 +121,15 @@ export const suite = {
|
|
|
120
121
|
const method = wolfssl.wolfTLSv1_2_client_method()
|
|
121
122
|
ctx = wolfssl.wolfSSL_CTX_new(method)
|
|
122
123
|
if (!ctx) { assert('CTX_new', false); finish(); return }
|
|
123
|
-
wolfssl.wolfSSL_CTX_set_verify(ctx,
|
|
124
|
+
wolfssl.wolfSSL_CTX_set_verify(ctx, VerifyMode.SSL_VERIFY_NONE)
|
|
124
125
|
ssl = wolfssl.wolfSSL_new(ctx)
|
|
125
126
|
if (!ssl) { assert('SSL_new', false); finish(); return }
|
|
126
127
|
wolfssl.wolfSSL_set_fd(ssl, sock.get_fd(s))
|
|
127
|
-
wolfssl.wolfSSL_UseSNI(ssl,
|
|
128
|
+
wolfssl.wolfSSL_UseSNI(ssl, SniType.WOLFSSL_SNI_HOST_NAME, 'localhost')
|
|
128
129
|
// kick handshake immediately (FD_WRITE may not re-fire)
|
|
129
130
|
{
|
|
130
131
|
const ret = wolfssl.wolfSSL_connect(ssl)
|
|
131
|
-
if (ret ===
|
|
132
|
+
if (ret === ReturnCode.SSL_SUCCESS) {
|
|
132
133
|
handshakeDone = true
|
|
133
134
|
sendReq()
|
|
134
135
|
} else {
|
|
@@ -141,12 +142,12 @@ export const suite = {
|
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
144
|
|
|
144
|
-
if ((event.lNetworkEvents &
|
|
145
|
-
(event.lNetworkEvents &
|
|
145
|
+
if ((event.lNetworkEvents & FdEvent.FD_READ) ||
|
|
146
|
+
(event.lNetworkEvents & FdEvent.FD_WRITE)) {
|
|
146
147
|
if (!ssl) return
|
|
147
148
|
if (!handshakeDone) {
|
|
148
149
|
const ret = wolfssl.wolfSSL_connect(ssl)
|
|
149
|
-
if (ret ===
|
|
150
|
+
if (ret === ReturnCode.SSL_SUCCESS) {
|
|
150
151
|
handshakeDone = true
|
|
151
152
|
sendReq()
|
|
152
153
|
} else {
|
|
@@ -161,7 +162,7 @@ export const suite = {
|
|
|
161
162
|
if (sentRequest) onReadable()
|
|
162
163
|
}
|
|
163
164
|
|
|
164
|
-
if (event.lNetworkEvents &
|
|
165
|
+
if (event.lNetworkEvents & FdEvent.FD_CLOSE) {
|
|
165
166
|
// drain remaining then finish
|
|
166
167
|
if (ssl && sentRequest && !sawNonNumber) {
|
|
167
168
|
onReadable()
|