context state control and wall selection
This commit is contained in:
parent
f768cff6d2
commit
10d243055d
6 changed files with 152 additions and 32 deletions
|
|
@ -29,26 +29,33 @@
|
|||
KUBO_DYNARRAY_REGISTER(kubo_wall_arr, struct kubo_wall *);
|
||||
|
||||
enum kubo_context_state {
|
||||
KUBO_CONTEXT_STATE_WALL_NEW,
|
||||
KUBO_CONTEXT_STATE_WALL_SELECT,
|
||||
KUBO_CONTEXT_WALL_NEW,
|
||||
KUBO_CONTEXT_WALL_SELECT,
|
||||
};
|
||||
|
||||
static const char *kubo_context_labels[] = {
|
||||
"Wall New",
|
||||
"Wall Select"
|
||||
};
|
||||
static const char *kubo_context_labels[] = {"Wall New", "Wall Select"};
|
||||
|
||||
struct kubo_context {
|
||||
bool exit_pending;
|
||||
struct kubo_wall_arr walls;
|
||||
enum kubo_context_state state;
|
||||
|
||||
// KUBO_CONTEXT_WALL_SELECT
|
||||
size_t wall_select_index;
|
||||
};
|
||||
|
||||
struct kubo_context *kubo_context_init();
|
||||
void kubo_context_cleanup(struct kubo_context *context);
|
||||
|
||||
struct kubo_wall *kubo_context_get_pending_wall(struct kubo_context *context);
|
||||
|
||||
void kubo_context_set_state(struct kubo_context *context,
|
||||
enum kubo_context_state state);
|
||||
const char *kubo_context_get_label(enum kubo_context_state state);
|
||||
|
||||
struct kubo_wall *kubo_context_get_pending_wall(struct kubo_context *context);
|
||||
|
||||
void kubo_context_select_next_wall(struct kubo_context *context);
|
||||
void kubo_context_select_prev_wall(struct kubo_context *context);
|
||||
|
||||
static inline void wall_select_refresh(struct kubo_context *context);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue