ADTF  3.18.3
adtf::ui::testing::lucky Namespace Reference

Namespace for all functionality of the ADTF UI SDK provided since v3.11. More...

Functions

void schedule_in_gui_thread (std::function< void()> fnFunction)
 Schedules the given function to be executed from within the GUI thread some time in the future. More...
 
tResult execute_in_gui_thread (std::function< tResult()> fnFunction, std::chrono::milliseconds tmTimeout=std::chrono::milliseconds{0})
 Execute the given function from within the GUI thread and wait until it has finished. More...
 

Detailed Description

Namespace for all functionality of the ADTF UI SDK provided since v3.11.

Function Documentation

◆ execute_in_gui_thread()

tResult adtf::ui::testing::lucky::execute_in_gui_thread ( std::function< tResult()>  fnFunction,
std::chrono::milliseconds  tmTimeout = std::chrono::milliseconds{0} 
)

Execute the given function from within the GUI thread and wait until it has finished.

Parameters
[in]fnFunctionThe function that should be executed.
[in]tmTimeoutA timeout, 0 => no timeout.
Return values
ERR_TIMEOUTThe function has not been executed within the specified timeout.
tResultThe return value of the function.

◆ schedule_in_gui_thread()

void adtf::ui::testing::lucky::schedule_in_gui_thread ( std::function< void()>  fnFunction)

Schedules the given function to be executed from within the GUI thread some time in the future.

Parameters
[in]fnFunctionThe function that should be executed.