bool MainScreen::WantsToBeClosed() { SPADES_MARK_FUNCTION(); if(!ui){ return false; } static ScriptFunction func("MainScreenUI", "bool WantsToBeClosed()"); ScriptContextHandle c = func.Prepare(); c->SetObject(&*ui); c.ExecuteChecked(); return c->GetReturnByte() != 0; }
bool ClientUI::NeedsInput() { SPADES_MARK_FUNCTION(); if(!ui){ return false; } static ScriptFunction func("ClientUI", "bool NeedsInput()"); ScriptContextHandle c = func.Prepare(); c->SetObject(&*ui); c.ExecuteChecked(); return c->GetReturnByte() != 0; }
bool StartupScreen::WantsToBeClosed() { SPADES_MARK_FUNCTION(); if (!ui) { return false; } ScopedPrivilegeEscalation privilege; static ScriptFunction func("StartupScreenUI", "bool WantsToBeClosed()"); ScriptContextHandle c = func.Prepare(); c->SetObject(&*ui); c.ExecuteChecked(); return c->GetReturnByte() != 0; }
bool MainScreen::AcceptsTextInput() { SPADES_MARK_FUNCTION(); if(subview){ return subview->AcceptsTextInput(); } if(!ui){ return false; } static ScriptFunction func("MainScreenUI", "bool AcceptsTextInput()"); ScriptContextHandle c = func.Prepare(); c->SetObject(&*ui); c.ExecuteChecked(); return c->GetReturnByte() != 0; }