[FL-2119] BT HID App (#888)
* view_dispatcher: add default back processing for Long events * assets: add ble connected and disconnected assets * bt keyboard: introduce new application * bt keyboard: add logic to keyboard mode * bt: remove debug ble hid application * bt hid: introduce media controller * gui canvas: rename CanvasFontDirection -> CanvasDirection * gui canvas: add arrow element * assets: update finilized assets * bt hid: finalise keynote GUI * bt hid: finalise media player GUI * bt: add media key buttons support * bt: add exit confirm view * bt: change Clicker -> Remote * bt: support f6 target * bt: hopefully final bt hid design * bt hid: add blue led notification when device is connected * bt: leave only bt clicker for now * bt: add display notification on pin code show event
This commit is contained in:
29
applications/gui/canvas.h
Normal file → Executable file
29
applications/gui/canvas.h
Normal file → Executable file
@@ -47,11 +47,11 @@ typedef enum {
|
||||
|
||||
/** Font Direction */
|
||||
typedef enum {
|
||||
CanvasFontDirectionLeftToRight,
|
||||
CanvasFontDirectionTopToDown,
|
||||
CanvasFontDirectionRightToLeft,
|
||||
CanvasFontDirectionDownToTop,
|
||||
} CanvasFontDirection;
|
||||
CanvasDirectionLeftToRight,
|
||||
CanvasDirectionTopToBottom,
|
||||
CanvasDirectionRightToLeft,
|
||||
CanvasDirectionBottomToTop,
|
||||
} CanvasDirection;
|
||||
|
||||
/** Font parameters */
|
||||
typedef struct {
|
||||
@@ -116,7 +116,7 @@ void canvas_set_color(Canvas* canvas, Color color);
|
||||
* @param canvas Canvas instance
|
||||
* @param dir Direction font
|
||||
*/
|
||||
void canvas_set_font_direction(Canvas* canvas, CanvasFontDirection dir);
|
||||
void canvas_set_font_direction(Canvas* canvas, CanvasDirection dir);
|
||||
|
||||
/** Invert drawing color
|
||||
*
|
||||
@@ -273,6 +273,23 @@ void canvas_draw_circle(Canvas* canvas, uint8_t x, uint8_t y, uint8_t r);
|
||||
*/
|
||||
void canvas_draw_disc(Canvas* canvas, uint8_t x, uint8_t y, uint8_t r);
|
||||
|
||||
/** Draw triangle with given base and height lengths and their intersection coordinate
|
||||
*
|
||||
* @param canvas Canvas instance
|
||||
* @param x x coordinate of base and height intersection
|
||||
* @param y y coordinate of base and height intersection
|
||||
* @param base length of triangle side
|
||||
* @param height length of triangle height
|
||||
* @param dir CanvasDirection triangle orientaion
|
||||
*/
|
||||
void canvas_draw_triangle(
|
||||
Canvas* canvas,
|
||||
uint8_t x,
|
||||
uint8_t y,
|
||||
uint8_t base,
|
||||
uint8_t height,
|
||||
CanvasDirection dir);
|
||||
|
||||
/** Draw glyph
|
||||
*
|
||||
* @param canvas Canvas instance
|
||||
|
Reference in New Issue
Block a user