1
mirror of https://github.com/flipperdevices/flipperzero-firmware.git synced 2025-12-12 04:41:26 +04:00
Files
flipperzero-firmware/applications/system/js_app/packages/fz-sdk/gui/icon.d.ts
Anna Antonenko d0360625d6 [FL-3925] JS views finished (#4155)
* js: value destructuring and tests

* js: temporary fix to see size impact

* js_val: reduce code size 1

* i may be stupid.

* test: js_value args

* Revert "js: temporary fix to see size impact"

This reverts commit f51d726dba.

* pvs: silence warnings

* style: formatting

* pvs: silence warnings?

* pvs: silence warnings??

* js_value: redesign declaration types for less code

* js: temporary fix to see size impact

* style: formatting

* pvs: fix helpful warnings

* js_value: reduce .rodata size

* pvs: fix helpful warning

* js_value: reduce code size 1

* fix build error

* style: format

* Revert "js: temporary fix to see size impact"

This reverts commit d6a46f0179.

* style: format

* js: move to new arg parser

* style: format

* feat: all js views done

* js, toolbox: generalize string owning

* toolbox: silence pvs warning

---------

Co-authored-by: hedger <hedger@nanode.su>
Co-authored-by: hedger <hedger@users.noreply.github.com>
2025-09-24 23:24:28 +04:00

24 lines
867 B
TypeScript

export type BuiltinIcon = "DolphinWait_59x54" | "js_script_10px"
| "off_19x20" | "off_hover_19x20"
| "power_19x20" | "power_hover_19x20"
| "Settings_14";
export type IconData = symbol & { "__tag__": "icon" };
// introducing a nominal type in a hacky way; the `__tag__` property doesn't really exist.
/**
* Gets a built-in firmware icon for use in GUI
* @param icon Name of the icon
* @version Added in JS SDK 0.2, extra feature `"gui-widget"`
* @version Baseline since JS SDK 1.0
*/
export declare function getBuiltin(icon: BuiltinIcon): IconData;
/**
* Loads a .fxbm icon (XBM Flipper sprite, from flipperzero-game-engine) for use in GUI
* @param path Path to the .fxbm file
* @version Added in JS SDK 0.3, extra feature `"gui-widget-extras"`
* @version Baseline since JS SDK 1.0
*/
export declare function loadFxbm(path: string): IconData;