OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
ui.ui_dispatcher_if.UiDispatcherIf Class Reference

Schedule callbacks without exposing a concrete frontend event loop. More...

Inheritance diagram for ui.ui_dispatcher_if.UiDispatcherIf:
apps.carUi.car_ui_frontend_if.CarUiFrontendIf

Public Member Functions

None dispatch_ui (self, Callable[[], None] callback)
 Arrange for work to run on the frontend thread.
 
object schedule_ui_callback (self, int delay_ms, Callable[[], None] callback)
 Run work after a delay and return a cancellation token.
 
None cancel_ui_callback (self, object callback_id)
 Cancel a previously scheduled callback when it is still pending.
 

Detailed Description

Schedule callbacks without exposing a concrete frontend event loop.

Member Function Documentation

◆ cancel_ui_callback()

None ui.ui_dispatcher_if.UiDispatcherIf.cancel_ui_callback (   self,
object  callback_id 
)

Cancel a previously scheduled callback when it is still pending.

Parameters
callback_idToken returned by schedule_ui_callback().

◆ dispatch_ui()

None ui.ui_dispatcher_if.UiDispatcherIf.dispatch_ui (   self,
Callable[[], None]  callback 
)

Arrange for work to run on the frontend thread.

Parameters
callbackWork to invoke on the frontend thread.

◆ schedule_ui_callback()

object ui.ui_dispatcher_if.UiDispatcherIf.schedule_ui_callback (   self,
int  delay_ms,
Callable[[], None]   callback 
)

Run work after a delay and return a cancellation token.

Parameters
delay_msNon-negative scheduling delay in milliseconds.
callbackWork to invoke after the delay.
Returns
Opaque token identifying the pending callback.

The documentation for this class was generated from the following file: