MiniQuake

src/miniquake/sys_win.ml

Package
miniquake.sys_win
Reachable
Yes

Imports

Declarations

argumentIndex

function argumentIndex(arguments, name)

Return argument index derived from the active module state.

ParameterTypeDefaultDescription
argumentsdynamic—Command-line arguments to inspect or execute.
namedynamic—Stable name that identifies the requested object or option.

View source

CONSOLE_ERROR_TIMEOUT

const CONSOLE_ERROR_TIMEOUT = 60.

Defines the console error timeout value used by `miniquake.sys_win`.

View source

CreateDirectoryW

extern function CreateDirectoryW(path as wstr, security as ptr) from "kernel32.dll" returns bool

Create a directory through the Win32 wide-character filesystem API.

ParameterTypeDefaultDescription
pathwstr—Filesystem path to create.
securityptr—Optional Win32 security attributes pointer.

Returns: True when Windows creates the directory.

View source

emptyHandles

function emptyHandles()

Implements the `emptyHandles` operation for `miniquake.sys_win` (empty handles).

View source

FILE_BEGIN

const FILE_BEGIN = 0

Defines the file begin value used by `miniquake.sys_win`.

View source

filelength

function filelength(handle)

Implements the `filelength` operation for `miniquake.sys_win` (filelength).

ParameterTypeDefaultDescription
handledynamic—The handle input consumed by `filelength`.

View source

findhandle

function findhandle()

Finds handle for `miniquake.sys_win`.

View source

handleArgument

function handleArgument(arguments, name)

Handle argument and update the associated state.

ParameterTypeDefaultDescription
argumentsdynamic—Command-line arguments to inspect or execute.
namedynamic—Stable name that identifies the requested object or option.

View source

INVALID_SET_FILE_POINTER

const INVALID_SET_FILE_POINTER = 4294967295

Defines the invalid set file pointer value used by `miniquake.sys_win`.

View source

listTail

function listTail(values)

Implements the `listTail` operation for `miniquake.sys_win` (list tail).

ParameterTypeDefaultDescription
valuesdynamic—The values input consumed by `listTail`.

View source

MaskExceptions

function MaskExceptions()

Implements the `MaskExceptions` operation for `miniquake.sys_win` (mask exceptions).

View source

MAX_HANDLES

const MAX_HANDLES = 10

Defines the max handles value used by `miniquake.sys_win`.

View source

MAXIMUM_WIN_MEMORY

const MAXIMUM_WIN_MEMORY = 16777216

Defines the maximum win memory value used by `miniquake.sys_win`.

View source

MINIMUM_WIN_MEMORY

const MINIMUM_WIN_MEMORY = 8912896

Defines the minimum win memory value used by `miniquake.sys_win`.

View source

nextCounter

function nextCounter()

Return next counter for the active module state.

View source

NOT_FOCUS_SLEEP

const NOT_FOCUS_SLEEP = 20

Defines the not focus sleep value used by `miniquake.sys_win`.

View source

PAUSE_SLEEP

const PAUSE_SLEEP = 50

Defines the pause sleep value used by `miniquake.sys_win`.

View source

popConsoleEvent

function popConsoleEvent()

Consume pending state for pop console event.

View source

readI32

function readI32(data, offset)

Read and validate i32.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.
offsetdynamic—Zero-based offset of the requested data.

View source

readU32

inline function readU32(data)

Read and validate u32.

ParameterTypeDefaultDescription
datadynamic—Input data consumed by the operation.

View source

SetFilePointer

extern function SetFilePointer(handle as ptr, distance as i32, distanceHigh as ptr, moveMethod as u32) from "kernel32.dll" returns u32

Move a file pointer through the Win32 filesystem API.

ParameterTypeDefaultDescription
handleptr—Open Win32 file handle.
distancei32—Signed low-order seek distance.
distanceHighptr—Optional high-order seek-distance pointer.
moveMethodu32—Win32 seek-origin selector.

Returns: The resulting low-order file position or the Win32 failure value.

View source

signed32

function signed32(value)

Implements the `signed32` operation for `miniquake.sys_win` (signed32).

ParameterTypeDefaultDescription
valuedynamic—Value consumed by `signed32`.

View source

SleepUntilInput

function SleepUntilInput(time)

Implements the `SleepUntilInput` operation for `miniquake.sys_win` (sleep until input).

ParameterTypeDefaultDescription
timedynamic—Simulation or presentation time for the operation.

View source

Sys_ConsoleInject

function Sys_ConsoleInject(character, keyDown)

Mirror Quake's Sys_ConsoleInject routine and its observable state changes.

ParameterTypeDefaultDescription
characterdynamic—The character input consumed by `Sys_ConsoleInject`.
keyDowndynamic—The key down input consumed by `Sys_ConsoleInject`.

View source

Sys_ConsoleInput

function Sys_ConsoleInput()

Mirror Quake's Sys_ConsoleInput routine and its observable state changes.

View source

Sys_CreateState

function Sys_CreateState(useNative)

Mirror Quake's Sys_CreateState routine and its observable state changes.

ParameterTypeDefaultDescription
useNativedynamic—The use native input consumed by `Sys_CreateState`.

View source

Sys_Error

function Sys_Error(text)

Mirror Quake's Sys_Error routine and its observable state changes.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

Sys_FileClose

function Sys_FileClose(handle)

Mirror Quake's Sys_FileClose routine and its observable state changes.

ParameterTypeDefaultDescription
handledynamic—The handle input consumed by `Sys_FileClose`.

View source

Sys_FileOpenRead

function Sys_FileOpenRead(path)

Mirror Quake's Sys_FileOpenRead routine and its observable state changes.

ParameterTypeDefaultDescription
pathdynamic—Filesystem path to process.

View source

Sys_FileOpenWrite

function Sys_FileOpenWrite(path)

Mirror Quake's Sys_FileOpenWrite routine and its observable state changes.

ParameterTypeDefaultDescription
pathdynamic—Filesystem path to process.

View source

Sys_FileRead

function Sys_FileRead(handle, destination, count)

Mirror Quake's Sys_FileRead routine and its observable state changes.

ParameterTypeDefaultDescription
handledynamic—The handle input consumed by `Sys_FileRead`.
destinationdynamic—Destination value or collection to update.
countdynamic—Number of entries or units to process.

View source

Sys_FileSeek

function Sys_FileSeek(handle, position)

Mirror Quake's Sys_FileSeek routine and its observable state changes.

ParameterTypeDefaultDescription
handledynamic—The handle input consumed by `Sys_FileSeek`.
positiondynamic—Position used by the operation.

View source

Sys_FileTime

function Sys_FileTime(path)

Mirror Quake's Sys_FileTime routine and its observable state changes.

ParameterTypeDefaultDescription
pathdynamic—Filesystem path to process.

View source

Sys_FileWrite

function Sys_FileWrite(handle, data, count)

Mirror Quake's Sys_FileWrite routine and its observable state changes.

ParameterTypeDefaultDescription
handledynamic—The handle input consumed by `Sys_FileWrite`.
datadynamic—Input data consumed by the operation.
countdynamic—Number of entries or units to process.

View source

Sys_FloatTime

function Sys_FloatTime()

Mirror Quake's Sys_FloatTime routine and its observable state changes.

View source

Sys_HighFPPrecision

function Sys_HighFPPrecision()

Mirror Quake's Sys_HighFPPrecision routine and its observable state changes.

View source

Sys_Init

function Sys_Init()

Mirror Quake's Sys_Init routine and its observable state changes.

View source

Sys_InitFloatTime

function Sys_InitFloatTime()

Mirror Quake's Sys_InitFloatTime routine and its observable state changes.

View source

Sys_LowFPPrecision

function Sys_LowFPPrecision()

Mirror Quake's Sys_LowFPPrecision routine and its observable state changes.

View source

Sys_MakeCodeWriteable

function Sys_MakeCodeWriteable(startAddress, length)

Mirror Quake's Sys_MakeCodeWriteable routine and its observable state changes.

ParameterTypeDefaultDescription
startAddressdynamic—The start address input consumed by `Sys_MakeCodeWriteable`.
lengthdynamic—Length of the requested data in units appropriate to the operation.

View source

Sys_mkdir

function Sys_mkdir(path)

Mirror Quake's Sys_mkdir routine and its observable state changes.

ParameterTypeDefaultDescription
pathdynamic—Filesystem path to process.

View source

Sys_PageIn

function Sys_PageIn(memory, size)

Mirror Quake's Sys_PageIn routine and its observable state changes.

ParameterTypeDefaultDescription
memorydynamic—The memory input consumed by `Sys_PageIn`.
sizedynamic—Size of the requested data or resource.

View source

Sys_ParseCommandLine

function Sys_ParseCommandLine(commandLine)

Mirror Quake's Sys_ParseCommandLine routine and its observable state changes.

ParameterTypeDefaultDescription
commandLinedynamic—The command line input consumed by `Sys_ParseCommandLine`.

View source

Sys_PopFPCW

inline function Sys_PopFPCW()

Mirror Quake's Sys_PopFPCW routine and its observable state changes.

View source

Sys_Printf

function Sys_Printf(text)

Mirror Quake's Sys_Printf routine and its observable state changes.

ParameterTypeDefaultDescription
textdynamic—Text to parse or process.

View source

Sys_PushFPCW_SetHigh

inline function Sys_PushFPCW_SetHigh()

Mirror Quake's Sys_PushFPCW_SetHigh routine and its observable state changes.

View source

Sys_Quit

function Sys_Quit()

Mirror Quake's Sys_Quit routine and its observable state changes.

View source

Sys_SelectMemorySize

function Sys_SelectMemorySize(available, total, arguments)

Mirror Quake's Sys_SelectMemorySize routine and its observable state changes.

ParameterTypeDefaultDescription
availabledynamic—The available input consumed by `Sys_SelectMemorySize`.
totaldynamic—The total input consumed by `Sys_SelectMemorySize`.
argumentsdynamic—Command-line arguments to inspect or execute.

View source

Sys_SendKeyEvents

function Sys_SendKeyEvents()

Mirror Quake's Sys_SendKeyEvents routine and its observable state changes.

View source

Sys_SetCounterFixture

function Sys_SetCounterFixture(frequency, counters)

Mirror Quake's Sys_SetCounterFixture routine and its observable state changes.

ParameterTypeDefaultDescription
frequencydynamic—The frequency input consumed by `Sys_SetCounterFixture`.
countersdynamic—The counters input consumed by `Sys_SetCounterFixture`.

View source

Sys_SetFPCW

function Sys_SetFPCW()

Mirror Quake's Sys_SetFPCW routine and its observable state changes.

View source

Sys_Sleep

function Sys_Sleep()

Mirror Quake's Sys_Sleep routine and its observable state changes.

View source

Sys_State

function Sys_State()

Mirror Quake's Sys_State routine and its observable state changes.

View source

Sys_UseState

function Sys_UseState(state)

Mirror Quake's Sys_UseState routine and its observable state changes.

ParameterTypeDefaultDescription
statedynamic—Mutable `miniquake.sys_win` state used by `Sys_UseState`.

View source

sysWinState

sysWinState

Tracks the module-level Windows system state owned by `miniquake.sys_win`.

View source

miniquake.sys_win.SysWinState struct

validHandle

function validHandle(index)

Report whether valid handle.

ParameterTypeDefaultDescription
indexdynamic—Zero-based index of the requested entry.

View source

WinMain

function WinMain(arguments, runner)

Implements the `WinMain` operation for `miniquake.sys_win` (win main).

ParameterTypeDefaultDescription
argumentsdynamic—Command-line arguments to inspect or execute.
runnerdynamic—The runner input consumed by `WinMain`.

View source