This class provides handling for Windows API-related functions.

Static methods

@:native("WINAPI_DisableErrorReporting")staticdisableErrorReporting():Void

Disables the "Report to Microsoft" dialog that appears when the application crashes.

@:native("WINAPI_DisableWindowsGhosting")staticdisableWindowsGhosting():Void

Disables Windows ghosting, which prevents the system from marking unresponsive windows as "Not Responding."

@:native("WINAPI_GetProcessMemoryWorkingSetSize")staticgetProcessMemoryWorkingSetSize():SizeT

Retrieves the current working set size (in bytes) of the process.

Returns:

The size of the working set memory used by the process.

@:native("WINAPI_IsSystemDarkMode")staticisSystemDarkMode():Bool

Checks if the system is using dark mode.

Returns:

True if system is in dark mode, false otherwise.

@:native("WINAPI_SetDarkMode")staticsetDarkMode(handle:RawPointer<Void>, enable:Bool):Void

Sets the dark mode for the active window.

Parameters:

handle

A handle to the parent window.

enable

Whether to enable or disable dark mode.

@:native("WINAPI_ShowError")staticshowError(handle:RawPointer<Void>, message:ConstCharStar, title:ConstCharStar):Void

Shows a message box with an error icon.

Parameters:

handle

A handle to the parent window.

message

The message to display.

title

The title of the message box.

@:native("WINAPI_ShowInformation")staticshowInformation(handle:RawPointer<Void>, message:ConstCharStar, title:ConstCharStar):Void

Shows a message box with an information icon.

Parameters:

handle

A handle to the parent window.

message

The message to display.

title

The title of the message box.

@:native("WINAPI_ShowWarning")staticshowWarning(handle:RawPointer<Void>, message:ConstCharStar, title:ConstCharStar):Void

Shows a message box with a warning icon.

Parameters:

handle

A handle to the parent window.

message

The message to display.

title

The title of the message box.