Crates.io | sixtyfps-viewer |
lib.rs | sixtyfps-viewer |
version | 0.1.6 |
source | src |
created_at | 2021-06-30 16:08:04.769997 |
updated_at | 2022-01-21 09:51:25.289405 |
description | Viewer binary for SixtyFPS |
homepage | https://sixtyfps.io |
repository | https://github.com/sixtyfpsui/sixtyfps |
max_upload_size | |
id | 416958 |
size | 140,267 |
This program is a viewer for .60
files from the SixtyFPS Project.
The viewer can be installed from crates.io:
cargo install sixtyfps-viewer
Alternatively, you can download one of our pre-built binaries for Linux or Windows:
sixtyfps-viewer-linux.tar.gz
for a Linux x86-64 binary
or sixtyfps-viewer-windows.zip
for a Windows x86-64 binary.sixtyfps-viewer
/sixtyfps-viewer.exe
.You can open .60 files by just passing it as an argument:
sixtyfps-viewer path/to/myfile.60
--auto-reload
: Automatically watch the file system, and reload when it changes--save-data <file>
: When exiting, write the value of public properties to a json file.
Only property whose types can be serialized to json will be written.
This option is incompatible with --auto-reload
--load-data <file>
: Load the values of public properties from a json file.-I <path>
: Add an include path to look for imported .60 files or images.--style <style>
: Set the style. Defaults to native
if the Qt backend is compiled, otherwise fluent
--backend <backend>
: Override the SixtyFPS rendering backend--on <callback> <handler>
: Set a callback handler, see callback handlerInstead of a path to a file, one can use -
for the standard input or the standard output.
It is possible to tell the viewer to execute some shell commands when a callback is recieved.
You can use the --on
command line argument, followed by the callback name, followed by the command.
Within the command arguments, $1
, $2
, ... will be replaced by the first, second, ... argument of the
callback. These will be shell escaped.
Example: Imagine we have a myfile.60 looking like this:
MyApp := Window {
callback open-url(string);
//...
}
It is possible to make the open-url
callback to execute a command by doing
sixtyfps-viewer --on open-url 'xdg-open $1' myfile.60
Be carefull to use single quote or to escape the $
so that the shell don't expand the $1
If the root element of the .60 file is a Dialog
, the different StandardButton might close
the dialog if no callback was set on the button.
ok
, yes
, or close
buttons accepts the dialogcancel
, no
buttons reject the dialogThe program returns with the following error code:
sixtyfps-viewer
can be used to display an GUI from a shell script. For examples check out the
examples/bash folder in our repository.