Skip to content

Commit 0160671

Browse files
committed
fix: Use enum for constants instead of const enums
1 parent 5522198 commit 0160671

File tree

7 files changed

+20
-20
lines changed

7 files changed

+20
-20
lines changed

source/win32/user32/class.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ export const UnregisterClass: koffi.KoffiFunc<(
194194
*
195195
* https://learn.microsoft.com/en-us/windows/win32/winmsg/window-class-styles
196196
*/
197-
export const enum CS {
197+
export enum CS {
198198
NULL,
199199
BYTEALIGNCLIENT = 0x00001000,
200200
BYTEALIGNWINDOW = 0x00002000,

source/win32/user32/cursor.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const LoadCursor: koffi.KoffiFunc<(
4343
*
4444
* https://learn.microsoft.com/en-us/windows/win32/menurc/about-cursors
4545
*/
46-
export const enum IDC {
46+
export enum IDC {
4747
ARROW = 32512,
4848
IBEAM = 32513,
4949
WAIT = 32514,

source/win32/user32/icon.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export const LoadIcon: koffi.KoffiFunc<(
4343
*
4444
* https://learn.microsoft.com/en-us/windows/win32/menurc/about-icons
4545
*/
46-
export const enum IDI {
46+
export enum IDI {
4747
APPLICATION = 32512,
4848
ERROR = 32513,
4949
QUESTION = 32514,

source/win32/user32/image.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ export const LoadImage: koffi.KoffiFunc<(
3131
// #region Constants
3232

3333
/** Values for the `type` parameter of `LoadImage`. */
34-
export const enum IMAGE {
34+
export enum IMAGE {
3535
BITMAP = 0,
3636
ICON = 1,
3737
CURSOR = 2,
3838
ENHMETAFILE = 3,
3939
}
4040

4141
/** Values for the `fuLoad` parameter of `LoadImage`. */
42-
export const enum LR {
42+
export enum LR {
4343
DEFAULTCOLOR = 0x00000000,
4444
MONOCHROME = 0x00000001,
4545
COLOR = 0x00000002,
@@ -56,7 +56,7 @@ export const enum LR {
5656
}
5757

5858
/** OBM_xxx - OEM Resource Ordinal Numbers */
59-
export const enum OBM {
59+
export enum OBM {
6060
CLOSE = 32754,
6161
UPARROW = 32753,
6262
DNARROW = 32752,
@@ -94,7 +94,7 @@ export const enum OBM {
9494
}
9595

9696
/** OCR_xxx - OEM Resource Ordinal Numbers */
97-
export const enum OCR {
97+
export enum OCR {
9898
NORMAL = 32512,
9999
IBEAM = 32513,
100100
WAIT = 32514,
@@ -114,7 +114,7 @@ export const enum OCR {
114114
}
115115

116116
/** OIC_xxx - OEM Resource Ordinal Numbers */
117-
export const enum OIC {
117+
export enum OIC {
118118
SAMPLE = 32512,
119119
HAND = 32513,
120120
QUES = 32514,

source/win32/user32/message.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ export const TranslateMessageEx: koffi.KoffiFunc<(
156156
// #region Constants
157157

158158
/** Broadcast Special Message Recipient list */
159-
export const enum BSM {
159+
export enum BSM {
160160
ALLCOMPONENTS = 0x00000000,
161161
VXDS = 0x00000001,
162162
NETDRIVER = 0x00000002,
@@ -166,7 +166,7 @@ export const enum BSM {
166166
}
167167

168168
/** Broadcast Special Message Flags */
169-
export const enum BSF {
169+
export enum BSF {
170170
QUERY = 0x00000001,
171171
IGNORECURRENTTASK = 0x00000002,
172172
FLUSHDISK = 0x00000004,

source/win32/user32/messagebox.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const MessageBox: koffi.KoffiFunc<(
2525
// #region Constants
2626

2727
/** MB_xxx - MessageBox() Flags */
28-
export const enum MB {
28+
export enum MB {
2929
OK = 0x00000000,
3030
OKCANCEL = 0x00000001,
3131
ABORTRETRYIGNORE = 0x00000002,

source/win32/user32/window.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ export const UpdateWindow: koffi.KoffiFunc<(
222222
// #region Constants
223223

224224
/** SW_xxx - ShowWindow() Commands (nCmdShow) & identifiers for the WM_SHOWWINDOW message */
225-
export const enum SW {
225+
export enum SW {
226226
HIDE = 0,
227227
SHOWNORMAL = 1,
228228
NORMAL = 1,
@@ -250,7 +250,7 @@ export const enum SW {
250250
*
251251
* https://learn.microsoft.com/en-us/windows/win32/winmsg/window-notifications
252252
*/
253-
export const enum WM {
253+
export enum WM {
254254
ACTIVATE = 0x0006,
255255
ACTIVATEAPP = 0x001c,
256256
AFXFIRST = 0x0360,
@@ -519,7 +519,7 @@ export const enum WM {
519519
}
520520

521521
/** WM_ACTIVATE state values. */
522-
export const enum WM_ACTIVATE {
522+
export enum WM_ACTIVATE {
523523
INACTIVE = 0,
524524
ACTIVE = 1,
525525
CLICKACTIVE = 2,
@@ -530,7 +530,7 @@ export const enum WM_ACTIVATE {
530530
*
531531
* https://learn.microsoft.com/en-us/windows/win32/winmsg/window-styles
532532
*/
533-
export const enum WS {
533+
export enum WS {
534534
BORDER = 0x00800000,
535535
CAPTION = 0x00c00000, /* WS_BORDER | WS_DLGFRAME */
536536
CHILD = 0x40000000,
@@ -565,7 +565,7 @@ export const enum WS {
565565
*
566566
* https://learn.microsoft.com/en-us/windows/win32/winmsg/extended-window-styles
567567
*/
568-
export const enum WS_EX {
568+
export enum WS_EX {
569569
ACCEPTFILES = 0x00000010,
570570
APPWINDOW = 0x00040000,
571571
CLIENTEDGE = 0x00000200,
@@ -596,12 +596,12 @@ export const enum WS_EX {
596596
}
597597

598598
/** Special value for X and Y parameters of CreateWindow/CreateWindowEx */
599-
export const enum CW {
599+
export enum CW {
600600
USEDEFAULT = 0x80000000
601601
}
602602

603603
/** AnimateWindow() Commands */
604-
export const enum AW {
604+
export enum AW {
605605
AW_HOR_POSITIVE = 0x00000001,
606606
AW_HOR_NEGATIVE = 0x00000002,
607607
AW_VER_POSITIVE = 0x00000004,
@@ -614,7 +614,7 @@ export const enum AW {
614614
}
615615

616616
/** Special HWND values. */
617-
export const enum HWND_ {
617+
export enum HWND_ {
618618
// PostMessage() and SendMessage()
619619
BROADCAST = 0xffff,
620620
MESSAGE = -3,
@@ -627,7 +627,7 @@ export const enum HWND_ {
627627
NOTOPMOST = -2,
628628
}
629629

630-
export const enum GA_ {
630+
export enum GA_ {
631631
PARENT = 1,
632632
ROOT = 2,
633633
ROOTOWNER = 3,

0 commit comments

Comments
 (0)