mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-06 07:15:30 -04:00
sixel: add local function sixel_insert()
Replace all tll_push_*() calls with calls to this function.
This commit is contained in:
parent
deb61d20d8
commit
247e0c42d3
1 changed files with 8 additions and 2 deletions
10
sixel.c
10
sixel.c
|
|
@ -87,6 +87,12 @@ sixel_erase(struct terminal *term, struct sixel *sixel)
|
||||||
sixel_destroy(sixel);
|
sixel_destroy(sixel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
sixel_insert(struct terminal *term, struct sixel sixel)
|
||||||
|
{
|
||||||
|
tll_push_back(term->grid->sixel_images, sixel);
|
||||||
|
}
|
||||||
|
|
||||||
/* Row numbers are absolute */
|
/* Row numbers are absolute */
|
||||||
static void
|
static void
|
||||||
sixel_delete_at_point(struct terminal *term, int row, int col)
|
sixel_delete_at_point(struct terminal *term, int row, int col)
|
||||||
|
|
@ -284,7 +290,7 @@ sixel_overwrite(struct terminal *term, struct sixel *six,
|
||||||
PIXMAN_a8r8g8b8,
|
PIXMAN_a8r8g8b8,
|
||||||
imgs[i].width, imgs[i].height,
|
imgs[i].width, imgs[i].height,
|
||||||
imgs[i].data, imgs[i].width * sizeof(uint32_t));
|
imgs[i].data, imgs[i].width * sizeof(uint32_t));
|
||||||
tll_push_front(term->grid->sixel_images, imgs[i]);
|
sixel_insert(term, imgs[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -464,7 +470,7 @@ sixel_unhook(struct terminal *term)
|
||||||
term_formfeed(term);
|
term_formfeed(term);
|
||||||
render_refresh(term);
|
render_refresh(term);
|
||||||
|
|
||||||
tll_push_back(term->grid->sixel_images, image);
|
sixel_insert(term, image);
|
||||||
|
|
||||||
pixel_row_idx += height;
|
pixel_row_idx += height;
|
||||||
pixel_rows_left -= height;
|
pixel_rows_left -= height;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue