(mostly a copy of the mail to the tickit-dev mailing list)
A lot of stuff happening lately. And also I haven't written one of these for ages. I won't go into every detail, but here's a rundown of the most interesting parts:
-
Rect/RectSet are now C library based (0.26)
Fairly simple, no surprises here. C implementation means it's available in C and other languages, and probably a bit faster in actual use.
-
New Term event binding API (0.26)
Rather than a single on_key/on_mouse/etc..., there is now just a list of possible event handlers. Event handling subs don't have to be restricted to a single event; each is registered with a bitmask. This is done to more closely match the C API.
The existing Perl API of having a single on_* handler for each event type is still supported, by wrapping the newer API.
-
All windows are now FLOAT windows (0.28)
As was first suggested in 0.23, all the windows now use the new float logic. The previous environment variable has now been removed. This hopefully shouldn't actually affect anything as it's been the default for a while now, but does simplify the code internals.
-
$win->close and no more weak references (0.28)
Using weak references and relying on DESTROY works OK in some circumstances in Perl, but won't scale to C and other languages, and still makes for tricky logic. To this end, I've removed all the weaken()ing and replaced it with an explicit ->close method to remove a window. This also makes it much more robust in nontrivial cases.
This change is mostly of interest to container widget developers, or in more dynamic long-lived programs.
-
Tickit::Style (0.29)
This one's the big main one of the list; in fact so bit I'll probably write another mail. In summary; we now have something of a first attempt at being able to separate out style from widget implementations, in a way that's easy to add to application- or user-specific style files. More on this later.
-
Tickit::Pen now comes in mutable and immutable forms (0.30)
Since most pens don't get mutated, and Tickit::Style performs better with cached pens, I've split the idea of a Pen into mutable and immutable types. Tickit::Style returns immutable pens, so widgets shouldn't attempt to mutate them.
Tickit::Pen->new itself still returns a mutable pen for now, but in the future this may change; code that specifically wants a mutable or immutable pen should use the appropriate subclass.
-
Tickit::Pen changes to support upcoming Tickit::RenderContext (0.31)
A few small changes that allow the new Tickit::RenderContext to work better.
Also some changes in the underlying libtickit C library:
-
Generic string/integer value termctl operations
Primarily provided to let the xterm driver set the window title, etc..., but the general idea is something similar to ioctl(), so we don't have to extend the API a thousand times just to add lots of little options for specific terminals.
-
Split xterm/TI-based driver model
To support more specific options in future, and also to give a better (or more accurate) terminfo-based driver. There are now two drivers, selected by the $TERM environment variable, so the xterm-specific things can be done nicely, and still arrange for the generic terminfo driver to work.
This also allows for other terminal-specific drivers in future, in case we find those useful. Perhaps a Win32 console one too.
No comments:
Post a Comment