It's true that https://github.com/nkanaev/tipsy/blob/master/src/tigr.c is 5500 lines of C but, as far as I can tell, it's just being used to load texture images, draw lines, get double-buffered pixel buffers onto the screen, and get keyboard and mouse events. It wouldn't be difficult to port it to something like https://gitlab.com/kragen/bubbleos/blob/master/yeso. yeso.h yeso-pic.c yeso-xlib.c png.c total 560 lines of C, and all you're missing then is a line-drawing function.