Skip to content

Commit 3e8e72a

Browse files
committed
fix(def): type WNDPROC, WNDCLASSEXW_Type
1 parent 1358319 commit 3e8e72a

4 files changed

Lines changed: 8 additions & 5 deletions

File tree

packages/win32-def/src/lib/common.def.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export const USN: Def.longlong = LONGLONG
201201
// export const WINAPI;
202202
export const WINEVENTPROC: Def.uint32Ptr | Def.uint64Ptr = ptr
203203
export const WNDENUMPROC: Def.uint32Ptr | Def.uint64Ptr = ptr
204-
export const WNDPROC: Def.uint32Ptr | Def.uint64Ptr = ptr
204+
export const WNDPROC: Def.voidPtr = Def.voidPtr
205205

206206
/**
207207
* Note: original be typedef UINT_PTR WPARAM;

packages/win32-def/src/lib/common.types.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,11 @@
55

66
import type { BigIntStr } from '@waiting/shared-types'
77

8+
import type { IKoffiRegisteredCallback } from './types.js'
9+
810

911
export type _POINTER = Buffer
10-
export type WNDPROC = Buffer
12+
export type WNDPROC = IKoffiRegisteredCallback
1113
/** number: 32bit, bigint: 64bit */
1214
export type PTR_Addr = number | BigIntStr
1315

packages/win32-def/src/lib/struct/winuser/WNDCLASSEXW.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ const ptr = `${key}*` as const
1010
const init: StructInitType = {
1111
cbSize: D.UINT,
1212
style: D.UINT,
13-
// 'lpfnWndProc': ffi.Function('int32', ['pointer', 'uint32', 'int32', 'uint32']) ,
1413
lpfnWndProc: D.WNDPROC,
1514
cbClsExtra: D.INT,
1615
cbWndExtra: D.INT,
@@ -42,7 +41,6 @@ export function WNDCLASSEXW_Factory(): StructFactoryResult<WNDCLASSEXW_Type> {
4241
export interface WNDCLASSEXW_Type {
4342
cbSize: T.UINT
4443
style: T.UINT
45-
// 'lpfnWndProc': ffi.Function('int32', ['pointer', 'uint32', 'int32', 'uint32']) ,
4644
lpfnWndProc: T.WNDPROC
4745
cbClsExtra: T.INT
4846
cbWndExtra: T.INT

packages/win32-def/src/lib/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ import type {
1111
} from './ffi.types.js'
1212

1313

14-
export type { KoffiFunction } from 'koffi'
14+
export type {
15+
IKoffiRegisteredCallback,
16+
KoffiFunction,
17+
} from 'koffi'
1518
export type { IKoffiLib }
1619

1720

0 commit comments

Comments
 (0)