This version of the module is deprecated: This package is deprecated. moonbit-community/proton should be preferred.

    proton

    MoonBit bindings for webview, a tiny library for creating web-based desktop GUIs.

    webview
    webui
    gui
    web
    desktop-app
    Download zip
    Author
    Version
    0.1.5
    License
    MIT
    Last updated
    5 months ago
    Downloads
    335

    justjavac/proton does not have a README file

    App

    type App

    High-level application facade for ordinary apps.

    App::debug

    fn App::debug(self : App, enabled? : Bool) -> App

    Enables debug mode for inline apps.

    App::debug_level

    fn App::debug_level(self : App, debug : Int) -> App

    Sets the debug level for inline apps.

    App::entry_asset

    fn App::entry_asset(self : App, path : String) -> App

    Overrides the primary app entry with an asset path.

    App::entry_file

    fn App::entry_file(self : App, path : String) -> App

    Overrides the primary app entry with a file path.

    App::entry_html

    fn App::entry_html(self : App, html : String) -> App

    Overrides the primary app entry with inline HTML.

    App::entry_url

    fn App::entry_url(self : App, url : String) -> App

    Overrides the primary app entry with a URL.

    App::extension

    fn App::extension(self : App, extension :
    Extension
    , options? : Json) -> App

    Links and enables one extension.

    App::extensions

    fn App::extensions(self : App, extensions :
    Extensions
    ) -> App

    Links and enables a set of extensions.

    App::run

    async fn App::run(self : App) -> Result[Unit, String]

    Runs the configured app. Command extensions, when present, stay in this process.

    App::run_or_abort

    async fn App::run_or_abort(self : App) -> Unit

    Runs the configured app and aborts with the error message on failure.

    App::size

    fn App::size(self : App, width~ : Int, height~ : Int) -> App

    Sets the primary window size.

    App::title

    fn App::title(self : App, title : String) -> App

    Sets the primary window title.

    ExtensionRegistry

    type ExtensionRegistry

    Registry of extension specs available to one application build.

    ExtensionRegistry::get

    Returns one registered extension spec by id, if present.

    ExtensionRegistry::new

    Creates an empty extension registry. Registration order is preserved so later planning and generated registry output stay deterministic.

    ExtensionRegistry::register

    Registers one extension spec and returns the same registry for chaining.

    ExtensionRegistry::registered_ids

    fn ExtensionRegistry::registered_ids(self : ExtensionRegistry) -> Array[String]

    Returns the registered extension ids in deterministic registration order.

    asset

    fn asset(title : String, path : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> App

    Creates an inline asset application.

    config

    fn config(path : String) -> App

    Creates an application backed by a config file.

    create_app

    fn create_app(manifest :
    AppManifest
    , registry : ExtensionRegistry, base_dir? : String?) -> Result[
    App
    , String]

    Creates a runtime app from an already parsed manifest and extension registry. This resolves declarative extensions, prepares the runtime config, and then builds the final @wvrt.App in one step.

    create_app_from_file

    fn create_app_from_file(path : String, registry : ExtensionRegistry) -> Result[
    App
    , String]

    Loads a manifest document from disk and creates a runtime app. Relative file entries and extension base directories are resolved from the manifest file's parent directory before the runtime app is constructed.

    file

    fn file(title : String, path : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> App

    Creates an inline file application.

    html

    fn html(title : String, html : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> App

    Creates an inline HTML application.

    url

    fn url(title : String, url : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> App

    Creates an inline URL application.