mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-10-17 02:45:05 +00:00
Graphics & rendering - Implement `binfont-module` to generate bitmap fonts on the device itself - Remove lodepng support from LVGL library and create `Modules/lodepng-module` to make the feature re-usable in non-LVGL apps too. Add binding functions for LVGL support. - Implement large icons for boot screen (Tactility and USB logos) - Remove unused asset files in `Data/` Boot - Split up `Tactility.cpp` and its `run()` function into various `Init*.cpp` files. - Re-implement `Boot.cpp` app as non-LVGL app - Boot app now has a `BootSequence.cpp` for the init code. - LVGL is now started when the Boot app finishes - Move more init logic into Boot app BLE - Don't allocate scan result buffers unless BLE is on - Allocate scan results in external memory if possible UX & UI - USB Settings app: remove border from the button container
48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
// SPDX-License-Identifier: Apache-2.0
|
|
#pragma once
|
|
|
|
#include <lvgl.h>
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
enum LvglFontSize {
|
|
FONT_SIZE_SMALL,
|
|
FONT_SIZE_DEFAULT,
|
|
FONT_SIZE_LARGE,
|
|
};
|
|
|
|
enum LvglIconFont {
|
|
LVGL_ICON_FONT_STATUSBAR,
|
|
LVGL_ICON_FONT_LAUNCHER,
|
|
LVGL_ICON_FONT_SHARED,
|
|
LVGL_ICON_FONT_SHARED_2X,
|
|
};
|
|
|
|
/**
|
|
* @brief Sets the font that is returned by the getter of an icon font.
|
|
* Until an icon font is set, its getter returns the default text font.
|
|
*/
|
|
void lvgl_set_icon_font(enum LvglIconFont icon_font, const lv_font_t* font);
|
|
|
|
const lv_font_t* lvgl_get_shared_icon_font(void);
|
|
uint32_t lvgl_get_shared_icon_font_height(void);
|
|
|
|
const lv_font_t* lvgl_get_shared_icon_font_2x(void);
|
|
uint32_t lvgl_get_shared_icon_font_2x_height(void);
|
|
|
|
const lv_font_t* lvgl_get_text_font(enum LvglFontSize font_size);
|
|
uint32_t lvgl_get_text_font_height(enum LvglFontSize font_size);
|
|
|
|
const lv_font_t* lvgl_get_launcher_icon_font(void);
|
|
uint32_t lvgl_get_launcher_icon_font_height(void);
|
|
|
|
const lv_font_t* lvgl_get_statusbar_icon_font(void);
|
|
uint32_t lvgl_get_statusbar_icon_font_height(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|