summaryrefslogtreecommitdiff
path: root/src/fruits/cmc/ui/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'src/fruits/cmc/ui/widgets')
-rw-r--r--src/fruits/cmc/ui/widgets/now_playing.c7
-rw-r--r--src/fruits/cmc/ui/widgets/now_playing.h1
-rw-r--r--src/fruits/cmc/ui/widgets/tile.h11
3 files changed, 18 insertions, 1 deletions
diff --git a/src/fruits/cmc/ui/widgets/now_playing.c b/src/fruits/cmc/ui/widgets/now_playing.c
index 845a572..ebb8361 100644
--- a/src/fruits/cmc/ui/widgets/now_playing.c
+++ b/src/fruits/cmc/ui/widgets/now_playing.c
@@ -80,6 +80,13 @@ void cmc_now_playing_erase(struct cmc_now_playing *np)
ncplane_erase(np->n);
}
+void cmc_now_playing_clear(struct cmc_now_playing *np)
+{
+ cmc_now_playing_erase(np);
+ ncplane_erase(np->wave);
+ np->blitted = NULL;
+}
+
void cmc_now_playing_render(struct cmc_now_playing *np, struct cmc_list_entry *entry)
{
u64 duration = 0, pos = 0;
diff --git a/src/fruits/cmc/ui/widgets/now_playing.h b/src/fruits/cmc/ui/widgets/now_playing.h
index 5993c59..5c89940 100644
--- a/src/fruits/cmc/ui/widgets/now_playing.h
+++ b/src/fruits/cmc/ui/widgets/now_playing.h
@@ -22,4 +22,5 @@ void cmc_now_playing_init(struct cmc_now_playing *np);
bool cmc_now_playing_layout(struct cmc_now_playing *np, struct ncplane *parent, u32 y);
bool cmc_now_playing_tick(struct cmc_now_playing *np, struct cmc_list_entry *entry);
void cmc_now_playing_erase(struct cmc_now_playing *np);
+void cmc_now_playing_clear(struct cmc_now_playing *np);
void cmc_now_playing_render(struct cmc_now_playing *np, struct cmc_list_entry *entry);
diff --git a/src/fruits/cmc/ui/widgets/tile.h b/src/fruits/cmc/ui/widgets/tile.h
index 6f15c7d..a410207 100644
--- a/src/fruits/cmc/ui/widgets/tile.h
+++ b/src/fruits/cmc/ui/widgets/tile.h
@@ -1,5 +1,14 @@
#pragma once
-struct cmc_tile {
+/*
+ Use-case examples:
+ - Twitter timeline type.
+ - Image grid (static/dynamic size, with or without title).
+
+ Implementation:
+ - Tile sets it's own size.
+ - Reel.
+*/
+struct cmc_tile {
};