Crate nw_sys

Crate nw_sys 

Source
Expand description

github crates.io docs.rs license

§Overview

nw-sys provides wasm_bindgen bindings for Node Webkit JavaScript APIs offered by the NWJS project, allowing development of interactive desktop applications based on Node Webkit in Rust using WASM.

Various helper structures that simplify this API and provide the Rust builder pattern are available via the workflow-nw crate.

Interactive installers for applications created using this crate targeting Windows, MacOS and Linux operating systems can be built using cargo-nw packaging tool.

An example application demonstrating use of these APIs can be found here: https://github.com/aspectron/nw-sys-example


This framework is maintained by ASPECTRON. If you find this crate useful, please consider supporting us. For more information, please visit https://aspectron.org.


Modules§

app
App bindings providing application control, access to command-line arguments, working directory, paths for the browser data folders, cache control, origin control, global keyboard hotkey registration, proxy control, underlaying browser control and package.json manifest access.
clipboard
Access to the system clipboard allowing to copy and paste images from and to other applications.
error
Errors produced by the nw_sys crate.
global
menu
Functionality for building application, popup and tray menus.
menu_item
Menu item control used in conjunction with the Menu interface.
notifications
Chrome system notification API, allows creation of desktop / system notifications.
options
Helper trait for managing options struct which extends Object
prelude
nw-sys prelude
result
Result type used by nw_sys crate encapsulating internal Error enum.
screen
Access to system display information, including system resolution, display layout and display layout change notification events.
shell
Access to the system shell. Allows running external programs, open Shell (File Explorer / Finder) windows at different locations as well as launching external applications based on file type associations.
shortcut
Register keyboard shurtcuts that will be received by your application.
tray
Creation and management of the System Tray Icons and Menus.
utils
Helper utilities for the browser Window, Document and DOM element access
window
Creation and management of application windows. Provides control such as maximizing, minimizing and restoring application windows, changing the title, size and position, window transparency, control over kiosk and full-screen modes, window image capture, iframe control and print options control including print header, footer and other options.

Structs§

Clipboard
Interface for interacting with the system clipboard. For usage example please refer to nw_sys::clipboard
Menu
Menu interface. For usage example please refer to nw_sys::menu
MenuItem
Interface for controlling menu items. For usage example please refer to nw_sys::menu
Nw
Access to the global nw namespace.
Shortcut
Interface for registering keyboard shortcuts. For usage example please refer to nw_sys::shortcut
Tray
Interface for creating system tray icons and menus. For usage example please refer to nw_sys::tray
Window
Interface for managing application windows. For usage example please refer to nw_sys::window

Functions§

is_nw
Helper to test whether the application is running under Node Webkit or in a regular browser environment.
try_nw
Getter for the global nw namespace object