Sign in

    wzzc-dev/moui/backend/common/image does not have a README file

    WindowImageTaskStarter

    pub struct WindowImageTaskStarter {
    // private fields
    }

    WindowImageTaskStarter::deferred

    fn WindowImageTaskStarter::deferred(fetch~ : (String) -> Bytes?, spawn~ : (() -> Unit) -> () -> Unit?, post~ : (() -> Unit) -> Unit) -> WindowImageTaskStarter

    A starter that resolves remote sources on a worker and everything else synchronously.

    The completion callback must never run on a worker thread: it mutates WindowImageTasks bookkeeping and the renderer's image lifecycle, both of which belong to the UI thread. deferred therefore takes two host hooks and keeps the ordering explicit:

    • spawn runs a closure off the caller's thread and returns an optional cancel handle — an OS thread, a thread pool, a GCD queue.
    • post marshals a closure back onto the UI thread — a main-queue dispatch. The worker only ever touches post.

    Non-remote sources complete inline, so a local file never leaves the UI thread. Without host hooks a platform can keep using immediate, which makes this a purely additive seam.

    WindowImageTaskStarter::immediate

    WindowImageTaskStates

    pub struct WindowImageTaskStates {
    // private fields
    }

    WindowImageTaskStates::attach

    fn WindowImageTaskStates::attach(self : WindowImageTaskStates, id :
    WindowId
    , starter? : WindowImageTaskStarter, request_redraw~ : () -> Unit) -> Bool

    WindowImageTaskStates::count

    WindowImageTaskStates::dispose_window

    WindowImageTaskStates::new

    WindowImageTasks

    pub struct WindowImageTasks {
    // private fields
    }

    Per-window owner for cancellable image I/O only. Resource state, cache residency, staleness, and repaint decisions remain in RendererSession.

    WindowImageTasks::cancel

    fn WindowImageTasks::cancel(self : WindowImageTasks) -> Int

    WindowImageTasks::dispose

    fn WindowImageTasks::dispose(self : WindowImageTasks) -> Unit

    WindowImageTasks::new

    fn WindowImageTasks::new(starter? : WindowImageTaskStarter, request_redraw~ : () -> Unit) -> WindowImageTasks

    WindowImageTasks::pending_count

    fn WindowImageTasks::pending_count(self : WindowImageTasks) -> Int

    WindowImageTasks::take_scheduled_count

    fn WindowImageTasks::take_scheduled_count(self : WindowImageTasks) -> Int

    window_image_source_is_remote

    fn window_image_source_is_remote(source : String) -> Bool

    True for sources a platform must reach over the network rather than through the filesystem.

    window_image_task_starter_default

    fn window_image_task_starter_default() -> WindowImageTaskStarter

    The starter a backend should use when it has none of its own: the installed starter when present, otherwise the synchronous immediate starter.

    window_image_task_starter_install

    fn window_image_task_starter_install(starter : WindowImageTaskStarter) -> Unit

    Install the starter used by backends that were not given one explicitly.

    window_image_task_starter_reset

    fn window_image_task_starter_reset() -> Unit

    Drop the installed starter, restoring the synchronous default.