blob: 3fb10f93750c9c74704f1401bd33976d69769341 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
#pragma once
#include <al/array.h>
#include <notcurses/notcurses.h>
#include "../widgets/now_playing.h"
struct cmc_list;
struct cmc_list_tab {
struct cmc_list *list;
s32 selected;
bool leader_pressed;
struct {
bool active;
s32 selected;
s32 offset;
} move;
};
struct cmc_list_pane {
struct ncplane *n;
array(struct cmc_list_tab) tabs;
s32 selected;
s32 page_length;
struct cmc_now_playing np;
struct cmc_ui *ui;
};
void cmc_list_pane_init(struct cmc_list_pane *lp, struct cmc_ui *ui);
bool cmc_list_pane_layout(struct cmc_list_pane *lp, struct ncplane *parent);
void cmc_list_pane_add_list(struct cmc_list_pane *lp, struct cmc_list *list);
bool cmc_list_pane_handle_input(struct cmc_list_pane *lp, struct ncinput *input);
bool cmc_list_pane_tick(struct cmc_list_pane *lp);
void cmc_list_pane_clear(struct cmc_list_pane *lp);
void cmc_list_pane_render(struct cmc_list_pane *lp);
|