aboutsummaryrefslogtreecommitdiff
path: root/sixel.c (follow)
Commit message (Collapse)AuthorAgeLines
* util.h: new header file defining commonly used macrosDaniel Eklöf2020-05-01-5/+1
|
* grid: move 'cursor' state from terminal to gridDaniel Eklöf2020-04-16-3/+3
| | | | | This way, the 'normal' and 'alt' grids have their own cursor state, and we don't need to switch between them.
* sixel: improve handling of images when reflowing the gridsDaniel Eklöf2020-03-13-14/+7
| | | | | | | | | | | Update the sixels' 'row' attribute when re-flowing a grid, to ensure it is rendered at the correct place. This should work in most cases, but will break when the cell size has changed (e.g. font size increase/decrease, or a DPI change). This patch also moves the sixel image list from the terminal struct into the grid struct. The sixels are per-grid after all.
* sixel: don't try to dirty an un-allocated rowDaniel Eklöf2020-03-06-0/+5
| | | | This may happen e.g. when resizing a grid
* sixel: CSI setters also write a reply to the clientDaniel Eklöf2020-02-24-5/+9
|
* term: term_erase(): call sixel_delete_*()Daniel Eklöf2020-02-24-2/+2
| | | | | This ensures sixel images are removed, regardless of _how_ the screen was erased.
* sixel: ensure 'start' row is not outside the grid row rangeDaniel Eklöf2020-02-24-1/+3
|
* sixel: add sixel_delete_at_row and sixel_delete_in_rangeDaniel Eklöf2020-02-24-7/+65
| | | | | These are utility functions to erase sixel images that are at the specified row, or in a row range.
* sixel: destroy_at_cursor(): skip images on 'other' gridDaniel Eklöf2020-02-22-0/+3
|
* sixel: track which grid image was created onDaniel Eklöf2020-02-22-0/+1
|
* sixel: rename: purge_at_cursor() -> delete_at_cursor()Daniel Eklöf2020-02-22-2/+2
|
* sixel: purge images in unhook, rather than in initDaniel Eklöf2020-02-22-2/+2
| | | | | This fixes an issue where the cursor was seen blinking in animated GIFs.
* sixel: purge images at current cursor rowDaniel Eklöf2020-02-22-7/+18
| | | | | When printing a character, or starting a new sixel image, purge all images that cover the cursor's current row.
* sixel: oopsDaniel Eklöf2020-02-22-2/+2
|
* sixel: don't ever shrink the imageDaniel Eklöf2020-02-22-3/+9
|
* sixel: add HLS color format supportDaniel Eklöf2020-02-22-2/+5
|
* sixel: add comments to max_width()/max_height()Daniel Eklöf2020-02-22-0/+2
|
* sixel: application configurable image max width/heightDaniel Eklöf2020-02-22-3/+72
|
* sixel: application configurable palette size (color count)Daniel Eklöf2020-02-22-6/+35
| | | | | This implements the CSI escapes for retrieving and (re)setting the palette size.
* sixel: use terminal's background color, not palette[0]Daniel Eklöf2020-02-22-3/+3
|
* sixel: finalize: use width/height from image, not row/col posDaniel Eklöf2020-02-22-10/+4
|
* sixel: resize: initialize new rows/columns with the background colorDaniel Eklöf2020-02-22-9/+15
|
* sixel: mention why we add oneDaniel Eklöf2020-02-22-1/+3
|
* sixel: clean up state machineDaniel Eklöf2020-02-22-91/+97
| | | | | Use proper state names, and implement the state machine using switch statements.
* sixel: use a struct coord for current sixel positionDaniel Eklöf2020-02-22-24/+22
|
* sixel: rename state SIXEL_SIXEL -> SIXEL_GROUNDDaniel Eklöf2020-02-22-6/+6
|
* sixel: raster: only resize image buffer if necessaryDaniel Eklöf2020-02-22-1/+3
|
* sixel: resize image buffer after receiving a "raster" commandDaniel Eklöf2020-02-22-0/+1
|
* sixel: resize image buffer dynamicallyDaniel Eklöf2020-02-22-23/+80
|
* sixel: add sixel_destroy()Daniel Eklöf2020-02-21-4/+13
|
* sixel: always bump row on unhookDaniel Eklöf2020-02-21-6/+4
|
* sixel: ugly hack to remove over-written sixel imagesDaniel Eklöf2020-02-21-0/+8
|
* sixel: calculate image height in (cell) rowsDaniel Eklöf2020-02-21-0/+1
|
* sixel: wip: maintain a list of finished, and "active" sixel imagesDaniel Eklöf2020-02-21-24/+20
| | | | | | | | | | | | | | | | | | | In unhook, add the generated image to a list of finished sixel images, along with positioning and size information. When rendering, loop this list of images, and render the images (or parts of) that are visible. When scrolling, check if any part of the images cover the re-cycled lines, and if so, remove the *entire* image from the list. This means we have the following limitations: * The renderer always renders the whole (visible area of) the image(s). There are times when this isn't necessary - for example, when the image is scrolled inside the visible area. * It would be nice if we could crop the image when parts of it is scrolled out.
* sixel: initial supportDaniel Eklöf2020-02-21-0/+284
This implements basic parsing of sixel data. Lots of limitations and temporary solutions as this is still work-in-progress: * Maximum image size hardcoded to 800x800 * No HLS color format support * Image is always rendered at 0x0 in the terminal