GUI Functions
dev.gui - wire path g - generated from fwMenuGUI.
set_led_color
Set Board LED. Sets a led to a specific color
Set Board LED
Sets the color of one of the seven on-board RGB status LEDs. The new color is applied immediately — no separate refresh/commit call is required.
Arguments
| Name | Type | Range | Description |
|---|---|---|---|
ledindex | decU8 | 0–6 | Which on-board RGB LED to set |
red | decU8 | 0–255 | Red channel intensity |
green | decU8 | 0–255 | Green channel intensity |
blue | decU8 | 0–255 | Blue channel intensity |
Returns
success=basic—1if the LED was updated,0if the arguments could not be parsed orledindexis out of range.
Examples
Set LED 0 to full green:
0 0 255 0
Set LED 6 to white:
6 255 255 255
Turn LED 3 off:
3 0 0 0
Notes
- Indices outside
0–6are rejected. - Each channel is 8-bit (
0–255); higher values are clamped/rejected by thedecU8parser. - To turn an LED off, set all three channels to
0.
Wire command: g\s
| Arg | Wire type |
|---|---|
| ledindex | decU8 |
| red | decU8 |
| green | decU8 |
| blue | decU8 |
| duration | decS32 |
| mode | owLEDManagerLEDMode |
Returns: none (Ok/Err only)
dev.gui.set_led_color(ledindex: int, red: int, green: int, blue: int, duration: int, mode: enums.owLEDManagerLEDMode | int) -> Result
ow_status ow_gui_set_led_color(ow_device* dev, int32_t ledindex, int32_t red, int32_t green, int32_t blue, int32_t duration, ow_ow_led_manager_led_mode mode);
dev.gui().set_led_color(ledindex: i32, red: i32, green: i32, blue: i32, duration: i32, mode: owLEDManagerLEDMode) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.set_led_color(ledindex, red, green, blue, duration, mode) # check dev.ok
show_fwi_image
Show FWI Image. Shows an freewili image (fwi) file from the file system.
Show FWI Image
Loads and displays a FreeWili Image (.fwi) file from the on-device filesystem on the 3.5" touchscreen display.
Arguments
| Name | Type | Description |
|---|---|---|
filename | string | Path to the .fwi file to display |
Path resolution
- If
filenamebegins with\, it is treated as an absolute path on the filesystem (e.g.\images\logo.fwi). - Otherwise, it is resolved relative to
\images\—logo.fwiis loaded as\images\logo.fwi. - Include the
.fwiextension explicitly; it is not appended automatically. - The file must already exist on the filesystem.
Returns
success=basic—1if the file was found and displayed,0if the path could not be resolved, the file does not exist, or the image failed to load.
Examples
Show an image stored in the default \images\ folder:
logo.fwi
Show an image using an absolute path:
\images\subdir\splash.fwi
Notes
.fwiis the FreeWili native image format. Use the FreeWili GUI tools to convert PNG/JPEG assets into.fwifiles and copy them to the device's SD card or internal filesystem.- To display an image bundled as a built-in asset (by ID) rather than a file, use Show Asset Image (
a) instead. - To clear the screen after viewing, use Reset Display (
t).
Wire command: g\l
| Arg | Wire type |
|---|---|
| filename | string |
Returns: none (Ok/Err only)
dev.gui.show_fwi_image(filename: str) -> Result
ow_status ow_gui_show_fwi_image(ow_device* dev, const char* filename);
dev.gui().show_fwi_image(filename: &str) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.show_fwi_image(filename) # check dev.ok
clear_display
Reset Display. Clears any GUI menu actions done to the display such as show image or show text
Reset Display
Clears the 3.5" touchscreen of any content drawn by menu commands such as Show FWI Image (l), Show Asset Image (a), or Show Text Display (p), returning the display to its default state.
Arguments
None.
Returns
success=basic—1if the display was reset,0otherwise.
Examples
Reset the display after viewing an image or text:
t
Notes
- Use this after any of the following to restore the default UI:
- Show FWI Image (
l) - Show Asset Image (
a) - Show Text Display (
p)
- Show FWI Image (
- This command takes no arguments — any input is ignored.
- It only affects the display contents; it does not change LED state, button state, or any other peripheral.
Wire command: g\t
Returns: none (Ok/Err only)
dev.gui.clear_display() -> Result
ow_status ow_gui_clear_display(ow_device* dev);
dev.gui().clear_display() -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.clear_display() # check dev.ok
show_text
Show Text Display. Show text on the free wili display
Show Text Display
Draws a text overlay on top of the current GUI window on the 3.5" touchscreen display. The underlying GUI is not modified — the text is rendered over it until cleared.
Arguments
| Name | Type | Description |
|---|---|---|
texttodisplay | string | The text to render as an overlay |
Returns
success=basic—1if the text was accepted and drawn,0if the argument could not be parsed.
Examples
Show a simple greeting:
Hello Wili
Show a status message:
Ready
Show a multi-word string (spaces are part of the text):
Battery OK
Notes
- The text is drawn as an overlay above the current GUI window; the GUI underneath is preserved.
- Calling Show Text Display again replaces the previous overlay text.
- Text longer than the available screen area is truncated to fit — it is not scrolled or wrapped onto additional screens.
- To remove the overlay and restore the default display, use Reset Display (
t). - To show an image instead of text, use Show FWI Image (
l) or Show Asset Image (a).
Wire command: g\p
| Arg | Wire type |
|---|---|
| texttodisplay | string |
Returns: none (Ok/Err only)
dev.gui.show_text(texttodisplay: str) -> Result
ow_status ow_gui_show_text(ow_device* dev, const char* texttodisplay);
dev.gui().show_text(texttodisplay: &str) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.show_text(texttodisplay) # check dev.ok
read_all
Read All Buttons. Sets the baud rate for I2C in Hz
Wire command: g\u
Returns: none (Ok/Err only)
dev.gui.read_all() -> Result
ow_status ow_gui_read_all(ow_device* dev);
dev.gui().read_all() -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.read_all() # check dev.ok
stream_io
Stream Buttons. Sends GPIO values as a specific rate to host
Wire command: g\o
| Arg | Wire type |
|---|---|
| pin | dec |
Returns: none (Ok/Err only)
dev.gui.stream_io(pin: int) -> Result
ow_status ow_gui_stream_io(ow_device* dev, int32_t pin);
dev.gui().stream_io(pin: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.stream_io(pin) # check dev.ok
show_image_asset_by_id
Show Asset Image. Reads the number from the address
Wire command: g\a
| Arg | Wire type |
|---|---|
| image_id | decS32 |
Returns: none (Ok/Err only)
dev.gui.show_image_asset_by_id(image_id: int) -> Result
ow_status ow_gui_show_image_asset_by_id(ow_device* dev, int32_t image_id);
dev.gui().show_image_asset_by_id(image_id: i32) -> Result<(), OwError>
The C and Rust signatures above are also the WASM guest signatures - the device API surface is identical; only the transport differs (ow_open_wasm(&dev) in C, OneWili::open() in Rust).
dev.gui.show_image_asset_by_id(image_id) # check dev.ok
Sub-menus
- GUI Panels -
dev.gui.panels - GUI Controls -
dev.gui.controls - GUI Control Properties -
dev.gui.control_properties - Dialogs -
dev.gui.dialogs