This version of the module is deprecated: This package is deprecated. moonbit-community/proton should be preferred.
MoonBit bindings for the Proton native desktop runtime.
justjavac/proton does not have a README file
pub(all) suberror AppCleanupError {
CommandExtension(CommandExtensionLifecycleError)
LifecycleHook(LifecycleHookError)
WindowDestroy(NativeError)
RuntimeDestroy(NativeError)
} derive(Debug)pub(all) suberror AppConfigurationError {
InvalidSetting(name~ : String, message~ : String)
Bootstrap(BootstrapError)
ExtensionDependencyCycle(extension_id~ : String)
ExtensionUnavailable(extension_id~ : String, requested_by~ : String?, state~ : String)
ExtensionAdaptationFailed(extension_id~ : String, error~ : ExtensionAdapterError)
InvalidJavaScriptNamespace(js_namespace~ : String)
InvalidJavaScriptApi(js_namespace~ : String, api_name~ : String)
InvalidDevelopmentUrl(url~ : String, reason~ : String)
} derive(Debug)pub(all) suberror AppEntryError {
ReadFailed(path~ : String, detail~ : String)
NativeLoad(action~ : String, error~ : NativeError)
ClosedDuringStartup
} derive(Debug)pub(all) suberror AppPathError {
InvalidIdentifier(identifier~ : String)
MissingHomeDirectory(platform~ : String)
PlatformProbe(NativeError)
} derive(Eq, Debug)pub(all) suberror AppRunError {
RunnerError(String)
ConfigurationError(AppConfigurationError)
NativeRuntimeError(action~ : String, error~ : NativeError)
RuntimeWakeupError(RuntimeWakeupError)
CommandExtensionLifecycleError(CommandExtensionLifecycleError)
LifecycleHookError(LifecycleHookError)
EntryLoadError(AppEntryError)
BridgeStartupError(BridgeDiagnostic)
BridgeRuntimeError(BridgeDiagnostic)
CleanupFailed(primary~ : String?, failures~ : Array[AppCleanupError])
UnexpectedTaskFailure(detail~ : String)
} derive(Debug)pub(all) suberror CommandExtensionLifecycleError {
ApplicationRegistrationFailed(detail~ : String)
RegistrationFailed(extension_id~ : String, detail~ : String)
DestroyFailed(extension_id~ : String, detail~ : String)
} derive(Debug)pub(all) suberror LifecycleHookError {
ApplicationStart(index~ : Int, detail~ : String)
ApplicationShutdown(index~ : Int, detail~ : String)
WindowReady(index~ : Int, detail~ : String)
WindowClose(index~ : Int, detail~ : String)
} derive(Debug)pub(all) suberror NotificationDeliveryError {
Native(NativeError)
WaitInterrupted(detail~ : String)
} derive(Eq, Debug)pub(all) suberror RuntimeWakeupError {
UnsupportedFeature(feature~ : String)
PipeCreateFailed(detail~ : String)
SourceOpenFailed(source~ : String, detail~ : String)
SourceClosed
MissingNotification
} derive(Debug)type Appfn App::add_window(self : App, id : String, title : String, entry : AppEntry, width? : Int, height? : Int, size_hint? : WindowSizeHint, titlebar_style? : TitlebarStyle) -> Appfn[State] App::app_lifecycle(self : App, on_start~ : async (ApplicationContext) -> State, on_shutdown~ : async (State) -> Unit) -> Appfn[State] App::window_lifecycle(self : App, on_ready~ : async (WindowContext) -> State, on_close~ : async (State) -> Unit) -> Apppub struct WindowContext {
id : String
window : WindowRef
tasks : TaskGroup[Unit]
events : WindowEventEmitter
}async fn[Payload : ToJson] WindowEventEmitter::emit(self : WindowEventEmitter, event : Event[Payload], payload : Payload) -> Unitfn asset(title : String, path : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> Appfn file(title : String, path : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> Appfn html(title : String, html : String, width? : Int, height? : Int, debug? : Bool, resizable? : Bool) -> Appfn run(main : async () -> Unit) -> Unit