Eigenmath/config.h

37 lines
573 B
C

#ifndef CONFIG_H
#define CONFIG_H
#ifdef __cplusplus
extern "C"{
#endif
typedef enum {
CHECK_BOX, FUNCTION_CALL,
} Menu_Item_Type;
typedef struct {
char* str;
Menu_Item_Type type;
union { //The item can act on a variable or call a function
int* value;
void (*function)(void);
} action;
} Menu_Item;
typedef struct {
Menu_Item** items;
int items_number;
} Menu;
void draw_menu(Menu* menu);
void menu_setup();
void menu_about();
Menu_Item* menu_create_item(const char* str, Menu_Item_Type type, void* other);
#ifdef __cplusplus
}
#endif
#endif // CONFIG_H