Skip to main content

QuickAppPlatform

Struct QuickAppPlatform 

Source
pub struct QuickAppPlatform { /* private fields */ }
Expand description

Unified QuickApp runtime host adapter abstracting QuickApp Alliance (@system.*) and Huawei QuickApp.

Implementations§

Source§

impl QuickAppPlatform

Vendor constructors, touch/IME/lifecycle handlers, and @system.* command queue helpers for QuickAppPlatform.

Source

pub fn for_vendor(vendor: QuickAppVendor) -> Self

Creates a QuickAppPlatform configured for vendor.

§Arguments
  • QuickAppVendor - QuickApp runtime vendor (Alliance or Huawei).
§Returns
  • Self - Configured QuickApp backend.
Source

pub fn from_metrics(device_metrics: QuickAppDeviceMetrics) -> Self

Creates a QuickAppPlatform from explicit @system.device screen metrics.

§Arguments
  • QuickAppDeviceMetrics - Reported device screen metrics.
§Returns
  • Self - Configured QuickApp backend.
Source

pub fn primary_window_id(&self) -> Option<WindowId>

Returns the primary QuickApp canvas WindowId, if created.

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • Option<WindowId> - Primary window handle.
Source

pub fn drain_host_commands(&mut self) -> Vec<QuickAppHostCommand>

Drains all queued outbound @system.* host commands for execution by the UX shell.

§Arguments
  • &Self - Mutable QuickApp platform.
§Returns
  • Vec<QuickAppHostCommand> - Ordered host commands.
Source

pub fn handle_design_touch( &mut self, action: i32, design_touches: &[(i32, f32, f32)], ) -> Vec<WindowEvent>

Translates QuickApp <canvas> touch coordinates (in 750px design space) into EUV logical dp pointer events.

§Arguments
  • &Self - Mutable QuickApp platform.
  • i32 - Normalized touch action (ANDROID_ACTION_DOWN..ANDROID_ACTION_CANCEL).
  • &[(i32, f32, f32)] - Touch tuples (pointer_id, design_x, design_y).
§Returns
  • Vec<WindowEvent> - Normalized pointer events also enqueued for poll_events().
Source

pub fn handle_ime_commit(&mut self, text: String)

Dispatches UTF-8 text received from a QuickApp <input> bridge into EUV TextInput / Ime events.

§Arguments
  • &Self - Mutable QuickApp platform.
  • String - Committed UTF-8 text.
Source

pub fn handle_lifecycle_hook( &mut self, hook: QuickAppLifecycleHook, ) -> Vec<WindowEvent>

Translates a QuickApp app.ux / page.ux lifecycle callback into canonical EUV SystemEvents.

§Arguments
  • &Self - Mutable QuickApp platform.
  • QuickAppLifecycleHook - QuickApp lifecycle hook payload.
§Returns
  • Vec<WindowEvent> - Normalized events also enqueued for poll_events().
Source§

impl QuickAppPlatform

Unified host-channel capability and visual-equivalence queries for QuickAppPlatform.

Source

pub fn host_channel_capabilities(&self) -> HostChannelCapabilities

Returns the truthful HostChannelCapabilities declared by this QuickApp runtime.

QuickApp hosts expose a single <canvas> 2D channel by default (supported_channels.len() == 1, zero probing), and simulated/off-device profiles ALWAYS set simulated_profile = true and direct_gpu_verified_on_device = false.

§Returns
  • HostChannelCapabilities - Declared QuickApp channels, visual gate, and honesty flags.
Source

pub fn select_render_channel( &self, requested: Option<HostRenderChannel>, ) -> HostChannelSelection

Resolves the QuickApp rendering channel under unified visual-equivalence and single-channel non-probing rules.

§Arguments
  • Option<HostRenderChannel> - Optional requested channel.
§Returns
  • HostChannelSelection - Resolved channel decision.
Source§

impl QuickAppPlatform

Source

pub fn get_device_metrics(&self) -> QuickAppDeviceMetrics

Source

pub fn get_mut_device_metrics(&mut self) -> &mut QuickAppDeviceMetrics

Source

pub fn set_device_metrics(&mut self, val: QuickAppDeviceMetrics) -> &mut Self

Source

pub fn get_safe_area(&self) -> SafeAreaInsets

Source

pub fn get_mut_safe_area(&mut self) -> &mut SafeAreaInsets

Source

pub fn set_safe_area(&mut self, val: SafeAreaInsets) -> &mut Self

Source

pub fn get_mut_primary_window(&mut self) -> &mut Option<WindowId>

Source

pub fn set_primary_window(&mut self, val: Option<WindowId>) -> &mut Self

Source

pub fn get_windows(&self) -> &HashMap<WindowId, QuickAppWindowRecord>

Source

pub fn get_mut_windows( &mut self, ) -> &mut HashMap<WindowId, QuickAppWindowRecord>

Source

pub fn set_windows( &mut self, val: HashMap<WindowId, QuickAppWindowRecord>, ) -> &mut Self

Source

pub fn get_touch_tracker(&self) -> &TouchPointerTracker

Source

pub fn get_mut_touch_tracker(&mut self) -> &mut TouchPointerTracker

Source

pub fn set_touch_tracker(&mut self, val: TouchPointerTracker) -> &mut Self

Source

pub fn get_pending_events(&self) -> &Vec<WindowEvent>

Source

pub fn get_mut_pending_events(&mut self) -> &mut Vec<WindowEvent>

Source

pub fn set_pending_events(&mut self, val: Vec<WindowEvent>) -> &mut Self

Source

pub fn get_outbound_commands(&self) -> &Vec<QuickAppHostCommand>

Source

pub fn get_mut_outbound_commands(&mut self) -> &mut Vec<QuickAppHostCommand>

Source

pub fn set_outbound_commands( &mut self, val: Vec<QuickAppHostCommand>, ) -> &mut Self

Source

pub fn get_storage(&self) -> &HashMap<String, String>

Source

pub fn get_mut_storage(&mut self) -> &mut HashMap<String, String>

Source

pub fn set_storage(&mut self, val: HashMap<String, String>) -> &mut Self

Source

pub fn get_route_stack(&self) -> &Vec<String>

Source

pub fn get_mut_route_stack(&mut self) -> &mut Vec<String>

Source

pub fn set_route_stack(&mut self, val: Vec<String>) -> &mut Self

Source

pub fn get_mut_clipboard(&mut self) -> &mut Option<String>

Source

pub fn set_clipboard(&mut self, val: Option<String>) -> &mut Self

Source

pub fn get_pump_paused(&self) -> bool

Source

pub fn get_mut_pump_paused(&mut self) -> &mut bool

Source

pub fn set_pump_paused(&mut self, val: bool) -> &mut Self

Trait Implementations§

Source§

impl Clone for QuickAppPlatform

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for QuickAppPlatform

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for QuickAppPlatform

Default QuickAppPlatform configured for QuickApp Alliance (QuickAppVendor::Alliance).

Source§

fn default() -> Self

Creates a default QuickApp Alliance host adapter.

§Returns
  • Self - Default QuickAppPlatform.
Source§

impl PlatformBackend for QuickAppPlatform

PlatformBackend implementation for QuickAppPlatform.

Source§

fn kind(&self) -> PlatformKind

Returns PlatformKind::QuickApp.

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • PlatformKind - PlatformKind::QuickApp.
Source§

fn capabilities(&self) -> PlatformCapabilities

Returns QuickApp capability flags.

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • PlatformCapabilities - QuickApp capability matrix.
Source§

fn create_window( &mut self, config: &WindowConfig, ) -> Result<WindowState, PlatformError>

Creates a QuickApp <canvas> window sized to the normalized logical screen dimensions.

§Arguments
  • &Self - Mutable QuickApp platform.
  • &WindowConfig - Declarative window config.
§Returns
  • Result<WindowState, PlatformError> - Created QuickApp window state.
Source§

fn window_state(&self, id: WindowId) -> Option<WindowState>

Queries live WindowState for id.

§Arguments
  • &Self - QuickApp platform reference.
  • WindowId - Window identifier.
§Returns
  • Option<WindowState> - Window state if alive.
Source§

fn raw_window_handle(&self, id: WindowId) -> RawWindowHandle

Returns RawWindowHandle::MiniAppCanvas tagged with the active QuickAppVendor.

§Arguments
  • &Self - QuickApp platform reference.
  • WindowId - Window identifier.
§Returns
  • RawWindowHandle - QuickApp canvas handle.
Source§

fn poll_events(&mut self) -> Vec<WindowEvent>

Drains queued QuickApp touch, IME, back-press, and lifecycle events.

§Arguments
  • &Self - Mutable QuickApp platform.
§Returns
  • Vec<WindowEvent> - Pending events.
Source§

fn set_frame_pump_paused(&mut self, paused: bool)

Pauses or resumes the QuickApp canvas frame pump flag.

§Arguments
  • &Self - Mutable QuickApp platform.
  • bool - true to pause for background freeze.
Source§

fn is_frame_pump_paused(&self) -> bool

Returns whether the QuickApp frame pump is paused.

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • bool - Pause state.
Source§

fn present_framebuffer( &mut self, id: WindowId, framebuffer: &Framebuffer, ) -> Result<(), PlatformError>

Stores framebuffer and queues QuickAppHostCommand::PresentCanvas.

§Arguments
  • &Self - Mutable QuickApp platform.
  • WindowId - Window identifier.
  • &Framebuffer - Rendered RGBA8 framebuffer.
§Returns
  • Result<(), PlatformError> - Presentation status.
Source§

fn read_clipboard(&self) -> Option<String>

Reads mirrored @system.clipboard text.

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • Option<String> - Cached clipboard string.
Source§

fn write_clipboard(&mut self, text: &str) -> Result<(), PlatformError>

Writes text to clipboard cache and queues QuickAppHostCommand::ClipboardSet.

§Arguments
  • &Self - Mutable QuickApp platform.
  • &str - Clipboard text.
§Returns
  • Result<(), PlatformError> - Write status.
Source§

fn system_theme(&self) -> ThemeMode

Returns active QuickApp appearance mode.

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • ThemeMode - Active appearance mode.
Source§

fn wait_for_events(&mut self) -> Vec<WindowEvent>

Blocks with zero CPU usage until at least one OS or lifecycle event arrives, then drains all pending events. Read more
Source§

fn present_framebuffer_region( &mut self, id: WindowId, framebuffer: &Framebuffer, _damage: DamageRegion, ) -> Result<(), PlatformError>

Presents a damaged sub-region of a CPU-rendered RGBA8 Framebuffer when supported by the backend. Read more
Source§

fn display_refresh_rate_hz(&self) -> f32

Queries the active display’s native hardware refresh rate in Hertz (60.0 fallback). Read more
Source§

impl PlatformHostAdapter for QuickAppPlatform

PlatformHostAdapter implementation for QuickAppPlatform.

Source§

fn device_form_factor(&self) -> DeviceFormFactor

Returns DeviceFormFactor::MiniProgram.

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • DeviceFormFactor - DeviceFormFactor::MiniProgram.
Source§

fn host_vendor_name(&self) -> &'static str

Returns "quickapp-alliance" or "quickapp-huawei".

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • &'static str - Canonical QuickApp vendor identifier.
Source§

impl PlatformLifecycleBridge for QuickAppPlatform

PlatformLifecycleBridge implementation for QuickAppPlatform.

Source§

fn freeze_surface(&mut self) -> Vec<WindowEvent>

Maps QuickApp onHide into unified freeze semantics.

§Arguments
  • &Self - Mutable QuickApp platform.
§Returns
  • Vec<WindowEvent> - Normalized freeze events.
Source§

fn resume_surface(&mut self) -> Vec<WindowEvent>

Maps QuickApp onShow into unified resume semantics.

§Arguments
  • &Self - Mutable QuickApp platform.
§Returns
  • Vec<WindowEvent> - Normalized resume events.
Source§

fn destroy_surface(&mut self) -> Vec<WindowEvent>

Maps QuickApp onDestroy into unified destroy semantics.

§Arguments
  • &Self - Mutable QuickApp platform.
§Returns
  • Vec<WindowEvent> - Normalized destroy events.
Source§

impl PlatformNavigation for QuickAppPlatform

PlatformNavigation implementation backed by @system.router commands.

Source§

fn navigate_to(&mut self, route: &str) -> Result<(), PlatformError>

Pushes route and emits QuickAppHostCommand::RouterPush.

§Arguments
  • &Self - Mutable QuickApp platform.
  • &str - Target page route URI.
§Returns
  • Result<(), PlatformError> - Navigation status.
Source§

fn navigate_back(&mut self, delta: u32) -> Result<(), PlatformError>

Pops delta entries and emits QuickAppHostCommand::RouterBack.

§Arguments
  • &Self - Mutable QuickApp platform.
  • u32 - Pages to navigate back.
§Returns
  • Result<(), PlatformError> - Navigation status.
Source§

fn current_route(&self) -> &str

Returns the currently active QuickApp page route URI.

§Arguments
  • &Self - QuickApp platform reference.
§Returns
  • &str - Active page route.
Source§

impl PlatformStorage for QuickAppPlatform

PlatformStorage implementation backed by @system.storage commands.

Source§

fn storage_get(&self, key: &str) -> Option<String>

Reads key from mirrored @system.storage.

§Arguments
  • &Self - QuickApp platform reference.
  • &str - Storage key.
§Returns
  • Option<String> - Stored value, if present.
Source§

fn storage_set(&mut self, key: &str, value: &str) -> Result<(), PlatformError>

Persists (key, value) and emits QuickAppHostCommand::StorageSet.

§Arguments
  • &Self - Mutable QuickApp platform.
  • &str - Storage key.
  • &str - Value to store.
§Returns
  • Result<(), PlatformError> - Storage status.
Source§

fn storage_remove(&mut self, key: &str) -> Result<(), PlatformError>

Removes key and emits QuickAppHostCommand::StorageDelete.

§Arguments
  • &Self - Mutable QuickApp platform.
  • &str - Storage key.
§Returns
  • Result<(), PlatformError> - Removal status.
Source§

fn storage_clear(&mut self) -> Result<(), PlatformError>

Clears storage and emits QuickAppHostCommand::StorageClear.

§Arguments
  • &Self - Mutable QuickApp platform.
§Returns
  • Result<(), PlatformError> - Clear status.
Source§

impl WindowController for QuickAppPlatform

WindowController implementation for QuickAppPlatform.

Source§

fn apply_command(&mut self, command: WindowCommand) -> Result<(), PlatformError>

Applies a WindowCommand against the QuickApp <canvas> window record.

§Arguments
  • &Self - Mutable QuickApp platform.
  • WindowCommand - Command to apply.
§Returns
  • Result<(), PlatformError> - Execution status.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.