mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-22 10:43:11 +00:00
b2a12d091a
* Menu app. Lib: add mlib submodule. * Menu: new startup lib dependency definition * Menu: hierarchy in menu. Cube: fix heap1/4 inconsistency, stack protection. * GUI: rendering pipeline initial version. * GUI: layered widget composing, FURI record. Menu: FURI record, api. * GUI: input dispatching. Menu: switch to input from GUI. * GUI, MENU: code style cleanup, fix type conversion warnings. * GUI, Menu: syntax check. * Makefile: check and reinit submodules, format. * Menu: lock on event processing. Makefile: proper submodule initialization. * Menu: fix stack corruption by queue. * GUI: refactor. * Makefile: format rule fix, st-util pid. * GUI, Menu, FURI: format with clang-format. * GUI, MENU: locks in critical sections, fix stack corruption, ready signaling. * Makefile: clang format rule cleanup. * GUI,MENU: migrate to new API. * Applications: PRODUCTION_HW variable, skip drivers build on local target. * refactor production build * add git to dockerfile * GUI: uncomment lock block Co-authored-by: Aleksandr Kutuzov <aku@plooks.com>
36 lines
817 B
C
36 lines
817 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <input/input.h>
|
|
|
|
typedef enum {
|
|
MenuMessageTypeUp = 0x00,
|
|
MenuMessageTypeDown = 0x01,
|
|
MenuMessageTypeLeft = 0x02,
|
|
MenuMessageTypeRight = 0x03,
|
|
MenuMessageTypeOk = 0x04,
|
|
MenuMessageTypeBack = 0x05,
|
|
MenuMessageTypeIdle = 0x06,
|
|
MenuMessageTypeUnknown = 0xFF,
|
|
} MenuMessageType;
|
|
|
|
typedef struct {
|
|
MenuMessageType type;
|
|
void* data;
|
|
} MenuMessage;
|
|
|
|
typedef struct MenuEvent MenuEvent;
|
|
|
|
MenuEvent* menu_event_alloc();
|
|
|
|
void menu_event_free(MenuEvent* menu_event);
|
|
|
|
void menu_event_lock(MenuEvent* menu_event);
|
|
|
|
void menu_event_unlock(MenuEvent* menu_event);
|
|
|
|
void menu_event_activity_notify(MenuEvent* menu_event);
|
|
|
|
MenuMessage menu_event_next(MenuEvent* menu_event);
|
|
|
|
void menu_event_input_callback(InputEvent* input_event, void* context);
|