{ "reference": "EterLib/Input.cpp", "reference_sha256": "c913c73d5146584cfb358a73eacca3cb372da1de25b130c72f134422c96682be", "priority": "P4", "contracts": [], "functions": { "CInputDevice::CInputDevice": { "status": "PORTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputDevice::CInputDevice" ], "test": [ "tests/port/port_input_test.cpp" ] }, "CInputDevice::~CInputDevice": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputDevice::~CInputDevice" ], "test": [ "tests/port/port_input_test.cpp" ], "note": "40250: SAFE_RELEASE(ms_lpDI). Port: no DirectInput object. Invariant: nothing to release." }, "CInputDevice::CreateDevice": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputDevice::CreateDevice" ], "test": [ "tests/port/port_input_test.cpp" ], "note": "40250: DirectInput8Create (or AddRef) the shared object, S_OK unless it fails. Port: S_OK. Invariant: keyboard init succeeds." }, "CInputKeyboard::CInputKeyboard": { "status": "PORTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputKeyboard::CInputKeyboard" ], "test": [ "tests/port/port_input_test.cpp" ] }, "CInputKeyboard::~CInputKeyboard": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputKeyboard::~CInputKeyboard" ], "test": [ "tests/port/port_input_test.cpp" ], "note": "40250: Unacquire + release the keyboard device. Port: no device. Invariant: nothing to release." }, "CInputKeyboard::ResetKeyboard": { "status": "PORTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputKeyboard::ResetKeyboard" ], "test": [ "tests/port/port_input_test.cpp" ] }, "CInputKeyboard::InitializeKeyboard": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputKeyboard::InitializeKeyboard" ], "test": [ "tests/port/port_input_test.cpp" ], "note": "40250: create/SetDataFormat/SetCooperativeLevel(FOREGROUND|NONEXCLUSIVE)/Acquire the system keyboard, false on failure. Port: only CreateDevice. Invariant: true, state untouched." }, "CInputKeyboard::UpdateKeyboard": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputKeyboard::UpdateKeyboard" ], "test": [ "tests/port/port_input_test.cpp" ], "note": "40250: per-frame GetDeviceState diff -> KeyDown/KeyUp. Port: empty; the host delivers key events (PythonBoot::UIKey) which call KeyDown/KeyUp at event time. Invariant: IsPressed reflects the host's key state." }, "CInputKeyboard::KeyDown": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputKeyboard::KeyDown" ], "test": [ "tests/port/port_input_test.cpp" ], "note": "40250: ms_bPressedKey=true; virtual OnKeyDown. Port: records the key (+ ms_diks mirror), range-checked; PythonBoot::UIKey runs OnKeyDown's body (no constructed CPythonApplication to dispatch the virtual). Invariant: IsPressed true, then ESC/RunKeyDown as OnKeyDown." }, "CInputKeyboard::KeyUp": { "status": "ADAPTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputKeyboard::KeyUp" ], "test": [ "tests/port/port_input_test.cpp" ], "note": "40250: ms_bPressedKey=false; virtual OnKeyUp. Port: as KeyDown, UIKey runs RunKeyUp. Invariant: IsPressed false." }, "CInputKeyboard::IsPressed": { "status": "PORTED", "impl": [ "src/platform/EterLib/Input.cpp:CInputKeyboard::IsPressed" ], "test": [ "tests/port/port_input_test.cpp" ] } } }