[FL-2937] Remove resources from API to prevent frequent API version increase (#1935)

* Remove all icons from API
* Music player: icons
* Signal generator: icons
* Bt hid: icons
* Weather station: icons
* Picopass: icons
* File browser test: icons
* Example images: documentation
* Remove global assets header
* Fix picopass

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Sergey Gavrilov
2022-10-29 00:08:50 +10:00
committed by GitHub
parent 492f147568
commit 3434305630
73 changed files with 74 additions and 195 deletions

View File

@@ -8,4 +8,5 @@ App(
stack_size=2 * 1024,
order=150,
fap_category="Debug",
fap_icon_assets="icons",
)

View File

@@ -1,4 +1,4 @@
#include "assets_icons.h"
#include <file_browser_test_icons.h>
#include "file_browser_app_i.h"
#include "gui/modules/file_browser.h"
#include <furi.h>

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

View File

@@ -0,0 +1,24 @@
# Application icons
To use icons, do the following:
* add a line to the application manifest: `fap_icon_assets="folder"`, where `folder` points to the folder where your icons are located
* add `#include "application_id_icons.h"` to the application code, where `application_id` is the appid from the manifest
* every icon in the folder will be available as a `I_icon_name` variable, where `icon_name` is the name of the icon file without the extension
## Example
We have an application with the following manifest:
```
App(
appid="example_images",
...
fap_icon_assets="images",
)
```
So the icons are in the `images` folder and will be available in the generated `example_images_icons.h` file.
The example code is located in `example_images_main.c` and contains the following line:
```
#include "example_images_icons.h"
```
Image `dolphin_71x25.png` is available as `I_dolphin_71x25`.

View File

@@ -5,6 +5,7 @@
#include "bad_usb_script.h"
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/submenu.h>

View File

@@ -1,6 +1,7 @@
#include "bad_usb_view.h"
#include "../bad_usb_script.h"
#include <gui/elements.h>
#include <assets_icons.h>
#define MAX_NAME_LEN 64

View File

@@ -1,5 +1,6 @@
#include <furi.h>
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <storage/storage.h>
#include <gui/modules/loading.h>

View File

@@ -15,6 +15,7 @@
#include <gui/modules/widget.h>
#include "views/gpio_test.h"
#include "views/gpio_usb_uart.h"
#include <assets_icons.h>
struct GpioApp {
Gui* gui;

View File

@@ -4,6 +4,7 @@
#include <gui/gui.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <notification/notification_messages.h>

View File

@@ -2,6 +2,7 @@
#include <gui/gui.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <gui/view_stack.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>

View File

@@ -5,6 +5,7 @@
#include <gui/gui.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <cli/cli.h>

View File

@@ -1,5 +1,6 @@
#include "lfrfid_view_read.h"
#include <gui/elements.h>
#include <assets_icons.h>
#define TEMP_STR_LEN 128

View File

@@ -7,6 +7,7 @@
#include <gui/gui.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <cli/cli.h>

View File

@@ -1,5 +1,5 @@
#include "detect_reader.h"
#include <assets_icons.h>
#include <gui/elements.h>
struct DetectReader {

View File

@@ -13,6 +13,7 @@
#include "views/subghz_test_packet.h"
#include <gui/gui.h>
#include <assets_icons.h>
#include <dialogs/dialogs.h>
#include <gui/scene_manager.h>
#include <notification/notification_messages.h>

View File

@@ -4,6 +4,7 @@
#include "scenes/u2f_scene.h"
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <gui/modules/submenu.h>

View File

@@ -1,5 +1,6 @@
#include "u2f_view.h"
#include <gui/elements.h>
#include <assets_icons.h>
struct U2fView {
View* view;

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View File

@@ -11,8 +11,9 @@ App(
provides=["music_player_start"],
stack_size=2 * 1024,
order=20,
fap_icon="../../../assets/icons/Archive/music_10px.png",
fap_icon="icons/music_10px.png",
fap_category="Misc",
fap_icon_assets="icons",
)
App(

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

View File

@@ -3,7 +3,7 @@
#include <furi.h>
#include <furi_hal.h>
#include <assets_icons.h>
#include <music_player_icons.h>
#include <gui/gui.h>
#include <dialogs/dialogs.h>
#include <storage/storage.h>

View File

@@ -17,4 +17,5 @@ App(
name="loclass",
),
],
fap_icon_assets="icons",
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -2,6 +2,7 @@
#include <toolbox/path.h>
#include <flipper_format/flipper_format.h>
#include <picopass_icons.h>
#define TAG "PicopassDevice"

View File

@@ -24,6 +24,7 @@
#include <storage/storage.h>
#include <lib/toolbox/path.h>
#include <picopass_icons.h>
#define PICOPASS_TEXT_STORE_SIZE 128

View File

@@ -9,4 +9,5 @@ App(
order=50,
fap_icon="signal_gen_10px.png",
fap_category="Tools",
fap_icon_assets="icons",
)

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

View File

@@ -1,6 +1,7 @@
#include "../signal_gen_app_i.h"
#include "furi_hal.h"
#include <gui/elements.h>
#include <signal_generator_icons.h>
typedef enum {
LineIndexChannel,

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,11 +1,10 @@
#include "weather_station_receiver.h"
#include "../weather_station_app_i.h"
#include "weather_station_icons.h"
#include <weather_station_icons.h>
#include <math.h>
#include <input/input.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include <m-array.h>
#define FRAME_HEIGHT 12

View File

@@ -4,6 +4,7 @@
#include <notification/notification_messages.h>
#include <gui/elements.h>
#include <assets_icons.h>
#define TAG "BtSrv"

View File

@@ -1,5 +1,6 @@
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include "../desktop_i.h"
#include "desktop_view_lock_menu.h"

View File

@@ -4,6 +4,7 @@
#include <gui/elements.h>
#include <gui/icon.h>
#include <gui/view.h>
#include <assets_icons.h>
#include <portmacro.h>
#include <desktop/desktop_settings.h>

View File

@@ -2,6 +2,7 @@
#include <furi.h>
#include <gui/view.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include <stdint.h>
#include <portmacro.h>

View File

@@ -1,6 +1,7 @@
#include "dialogs/dialogs_message.h"
#include "dialogs_i.h"
#include "dialogs_api_lock.h"
#include <assets_icons.h>
/****************** File browser ******************/

View File

@@ -7,7 +7,7 @@
#include <stdint.h>
#include <gui/icon_animation.h>
#include <assets_icons.h>
#include <gui/icon.h>
#ifdef __cplusplus
extern "C" {

View File

@@ -1,5 +1,6 @@
#include "gui/canvas.h"
#include "gui_i.h"
#include <assets_icons.h>
#define TAG "GuiSrv"

View File

@@ -7,7 +7,7 @@
#include <stdint.h>
#include <stdbool.h>
#include <assets_icons.h>
#include <gui/icon.h>
#ifdef __cplusplus
extern "C" {

View File

@@ -5,6 +5,7 @@
#include <m-array.h>
#include <furi.h>
#include <stdint.h>
#include <assets_icons.h>
#define ITEM_FIRST_OFFSET 17
#define ITEM_NEXT_OFFSET 4

View File

@@ -1,6 +1,7 @@
#include "byte_input.h"
#include <gui/elements.h>
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include "byte_input.h"
struct ByteInput {
View* view;

View File

@@ -2,6 +2,7 @@
#include <m-array.h>
#include <gui/elements.h>
#include <assets_icons.h>
#include <furi.h>
struct Menu {

View File

@@ -1,5 +1,6 @@
#include "text_input.h"
#include <gui/elements.h>
#include <assets_icons.h>
#include <furi.h>
struct TextInput {

View File

@@ -5,6 +5,7 @@
#include <stdint.h>
#include <gui/view_dispatcher.h>
#include <gui/gui.h>
#include <assets_icons.h>
#include <gui/modules/popup.h>
#include "views/power_off.h"

View File

@@ -1,6 +1,7 @@
#include "power_off.h"
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
struct PowerOff {
View* view;

View File

@@ -1,6 +1,7 @@
#include "power_unplug_usb.h"
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
struct PowerUnplugUsb {
View* view;

View File

@@ -5,6 +5,7 @@
#include "storage/storage_glue.h"
#include "storages/storage_int.h"
#include "storages/storage_ext.h"
#include <assets_icons.h>
#define STORAGE_TICK 1000

View File

@@ -3,6 +3,7 @@
#include <gui/gui.h>
#include <gui/view_dispatcher.h>
#include <gui/modules/empty_screen.h>
#include <assets_icons.h>
#include <furi_hal_version.h>
#include <furi_hal_region.h>
#include <furi_hal_bt.h>

View File

@@ -6,6 +6,7 @@
#include <gui/view.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <assets_icons.h>
#include <gui/modules/variable_item_list.h>
#include <gui/modules/dialog_ex.h>

View File

@@ -7,6 +7,7 @@
#include <gui/modules/submenu.h>
#include <gui/modules/variable_item_list.h>
#include <dialogs/dialogs.h>
#include <assets_icons.h>
#include <desktop/desktop_settings.h>
#include <desktop/views/desktop_view_pin_input.h>

View File

@@ -6,6 +6,7 @@
#include <gui/view.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <assets_icons.h>
#include "views/battery_info.h"
#include <gui/modules/submenu.h>

View File

@@ -1,6 +1,7 @@
#include "battery_info.h"
#include <furi.h>
#include <gui/elements.h>
#include <assets_icons.h>
struct BatteryInfo {
View* view;

View File

@@ -4,6 +4,7 @@
#include <gui/view.h>
#include <gui/view_dispatcher.h>
#include <gui/scene_manager.h>
#include <assets_icons.h>
#include <notification/notification_messages.h>
#include <gui/modules/submenu.h>

View File

@@ -2,6 +2,7 @@
#include <gui/view.h>
#include <gui/elements.h>
#include <gui/canvas.h>
#include <assets_icons.h>
#include <furi.h>
#include <input/input.h>