初始化版本

This commit is contained in:
冯佳
2025-12-23 08:29:44 +08:00
parent 0ec8a5b380
commit cc9f363ff8
22 changed files with 1370 additions and 50 deletions

21
src/core/menu_stack.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef MENU_STACK_H
#define MENU_STACK_H
#include "menu_types.h"
#ifdef __cplusplus
extern "C" {
#endif
MenuErrCode menu_stack_init(MenuStack* stack);
MenuErrCode menu_stack_push(MenuStack* stack, MenuNodeId id);
MenuErrCode menu_stack_pop(MenuStack* stack, MenuNodeId* id);
MenuErrCode menu_stack_peek(const MenuStack* stack, MenuNodeId* id);
bool menu_stack_is_empty(const MenuStack* stack);
void menu_stack_clear(MenuStack* stack);
#ifdef __cplusplus
}
#endif
#endif // MENU_STACK_H