[Tickit-dev] Thoughts on renderbuffer scrolling
Paul "LeoNerd" Evans
leonerd at leonerd.org.uk
Wed Mar 4 23:16:21 GMT 2015
We have a blueprint to discuss the idea of a scrolling operation on
renderbuffers.
https://blueprints.launchpad.net/libtickit/+spec/rb-scroll
This isn't so much a feature in its own right, but more one that allows
other things to take place; once we have windows in the C library also,
the combination of these two will allow a (subclass?) of window whose
content is a long-lived renderbuffer, which can be automatically
rendered by the RB blit operation by the window's expose event handler.
We need some thoughts about the API for what the scroll operation would
look like. For existing precedent there's only really one, being
bool tickit_term_scrollrect(TickitTerm *tt, TickitRect rect,
int downward, int rightward);
This might suggest a function of:
void tickit_renderbuffer_scrollrect(TickitRenderBuffer *rb,
TickitRect rect, int downward, int rightward);
(it doesn't need to return bool as it can't fail)
Internally, that would decompose in the standard way ((see libvterm
et.al.)) into an internal rect->rect copy operation, followed by an
erase (or two, in the case of a diagonal scroll).
This leads to two problems. First, an erase operation might want an
overridden pen, so do we pass an optional pen argument? Secondly, I'm
not sure I like the name "scroll", as it suggests to the end-user that
it might apply a scrolling operation to the underlying terminal,
whereas it won't do that. Maybe it should be written as "copyrect",
taking a source and destination rect. But that itself at least suggests
it might interact differently with clipping/holes, as perhaps it should.
In summary; something of a mess of ideas currently - does anyone have
any suggestions?
--
Paul "LeoNerd" Evans
leonerd at leonerd.org.uk
http://www.leonerd.org.uk/ | https://metacpan.org/author/PEVANS
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 213 bytes
Desc: OpenPGP digital signature
URL: <http://mail.leonerd.org.uk/pipermail/tickit-dev/attachments/20150304/08bf827d/attachment.sig>
More information about the Tickit-dev
mailing list