pub trait UIUpdate:
Send
+ Sync
+ 'static {
// Required methods
fn update_navbar_ui(&self, appid: String) -> Result<(), PlatformError>;
fn update_tabbar_ui(&self, appid: String) -> Result<(), PlatformError>;
// Provided methods
fn update_tabbar_ui_async(
&self,
appid: String,
) -> impl Future<Output = Result<(), PlatformError>> + Send { ... }
fn update_orientation_ui(&self, _appid: String) -> Result<(), PlatformError> { ... }
fn host_appearance_dark(&self) -> bool { ... }
fn apply_lxapp_appearance(
&self,
_appid: &str,
_dark: bool,
) -> Result<(), PlatformError> { ... }
fn clear_lxapp_appearance(&self, _appid: &str) { ... }
fn notify_home_first_ready(&self) { ... }
fn measure_page_chrome_capsule(
&self,
_appid: String,
) -> impl Future<Output = Result<Option<String>, PlatformError>> + Send { ... }
fn apply_page_chrome_revision(
&self,
appid: String,
_revision: u64,
) -> impl Future<Output = Result<(), PlatformError>> + Send { ... }
}Required Methods§
fn update_tabbar_ui(&self, appid: String) -> Result<(), PlatformError>
Provided Methods§
fn update_tabbar_ui_async( &self, appid: String, ) -> impl Future<Output = Result<(), PlatformError>> + Send
fn update_orientation_ui(&self, _appid: String) -> Result<(), PlatformError>
Sourcefn host_appearance_dark(&self) -> bool
fn host_appearance_dark(&self) -> bool
Effective host/Runner scheme used when an lxapp preference is auto.
Sourcefn apply_lxapp_appearance(
&self,
_appid: &str,
_dark: bool,
) -> Result<(), PlatformError>
fn apply_lxapp_appearance( &self, _appid: &str, _dark: bool, ) -> Result<(), PlatformError>
Apply an lxapp-scoped scheme to native Page Chrome and every matching WebView. Shared shell and unrelated browser/lxapp WebViews are excluded.
Sourcefn clear_lxapp_appearance(&self, _appid: &str)
fn clear_lxapp_appearance(&self, _appid: &str)
Clear platform state retained for a closed lxapp session.
Sourcefn notify_home_first_ready(&self)
fn notify_home_first_ready(&self)
The home lxapp’s entry page finished its first render (fired at most once per process). Hosts dismiss the startup splash overlay on it.
Sourcefn measure_page_chrome_capsule(
&self,
_appid: String,
) -> impl Future<Output = Result<Option<String>, PlatformError>> + Send
fn measure_page_chrome_capsule( &self, _appid: String, ) -> impl Future<Output = Result<Option<String>, PlatformError>> + Send
Measure the visible capsule after native Page Chrome has laid out.
The JSON payload is an internal transport; app code only sees the
revisioned View snapshot assembled by lingxia-lxapp.
Sourcefn apply_page_chrome_revision(
&self,
appid: String,
_revision: u64,
) -> impl Future<Output = Result<(), PlatformError>> + Send
fn apply_page_chrome_revision( &self, appid: String, _revision: u64, ) -> impl Future<Output = Result<(), PlatformError>> + Send
Acknowledge one Page Chrome revision after native layout and visuals have been applied. Platforms with an asynchronous UI thread override this; the default preserves the existing synchronous update path.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".