Skip to content

Commit

Permalink
feat(def): change definitions
Browse files Browse the repository at this point in the history
- BOOL
- BOOLEAN
- LPBOOL
- LPBYTE
- PBYTE
- Def.bool
- def.boolean
- def.byte
- def.boolPtr
- def.bytePtr
- def.intPtr
- def.uintPtr
  • Loading branch information
waitingsong committed Jul 2, 2024
1 parent 141156d commit dd2117d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions packages/win32-def/src/lib/common.def.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ export const VOID: Def.void = Def.void
export const WCHAR: Def.uint16 = Def.uint16
export const WORD: Def.int16 = Def.int16

export const BOOL: Def.int32 = Def.int32
export const BOOLEAN: Def.bool = Def.bool
export const BOOL: Def.bool = Def.bool
export const BOOLEAN: Def.boolean = Def.boolean
export const BYTE: Def.byte = Def.byte
export const CALLBACK: Def.uint32Ptr | Def.uint64Ptr = ptr // https://msdn.microsoft.com/en-us/library/windows/desktop/ms633573(v=vs.85).aspx
export const CCHAR: Def.uint8 = Def.uint8
Expand Down Expand Up @@ -97,8 +97,8 @@ export const LONGLONG: Def.longlong = Def.longlong
export const LONG32: Def.int32 = Def.int32
export const LONG64: Def.int64 = Def.int64
export const LPARAM: Def.int32 | Def.int64 = LONG_PTR
export const LPBOOL: Def.int32 = BOOL
export const LPBYTE: Def.byte = Def.bytePtr
export const LPBOOL: Def.boolPtr = Def.boolPtr
export const LPBYTE: Def.bytePtr = Def.bytePtr
export const LPCOLORREF: Def.uint32 = DWORD
export const LPCSTR: Def.int8Ptr = Def.int8Ptr
export const LPCWSTR: Def.int16Ptr = Def.int16Ptr
Expand All @@ -117,7 +117,7 @@ export const LRESULT: Def.int32 | Def.int64 = LONG_PTR
export const NTSTATUS: Def.uint32 = Def.uint32
export const PBOOL: Def.uint32Ptr | Def.uint64Ptr = ptr
export const PBOOLEAN: Def.boolPtr = Def.boolPtr
export const PBYTE: Def.byte = Def.bytePtr
export const PBYTE: Def.bytePtr = Def.bytePtr
export const PCHAR: Def.charPtr = Def.charPtr
export const PCSTR: Def.uint8Ptr = Def.uint8Ptr
export const PCTSTR: Def.int8Ptr | Def.int16Ptr = _WIN64 ? Def.int16Ptr : Def.int8Ptr
Expand Down
13 changes: 7 additions & 6 deletions packages/win32-def/src/lib/def.enum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
* @link https://tootallnate.github.io/ref/
*/
export enum Def {
bool = 'bool',
byte = 'int*',
bool = 'int',
boolean = 'int8_t',
byte = 'uint8_t',
int = 'int',
int8 = 'int8_t',
int16 = 'int16_t',
Expand All @@ -27,17 +28,17 @@ export enum Def {
ushort = 'ushort',
void = 'void',

boolPtr = 'bool*',
bytePtr = 'int*',
boolPtr = 'int*',
bytePtr = 'uint8_t*',
charPtr = 'char*',
intPtr = 'int',
intPtr = 'intptr_t*',
int8Ptr = 'int8_t*',
int16Ptr = 'int16_t*',
int32Ptr = 'int32_t*',
int64Ptr = 'int64_t*',
floatPtr = 'float*',
longPtr = 'long*',
uintPtr = 'uint*',
uintPtr = 'uintptr_t*',
uint8Ptr = 'uint8_t*',

intPtrPtr = 'int**',
Expand Down

0 comments on commit dd2117d

Please sign in to comment.