2009/6/20 Michael <mi...@netspark.org>: > Anselm R Garbe wrote: >> Afterwards the next item will be the interface integration to enable >> different drawing backends, which will ease porting to cairo/pango or >> xft as well. The advantage is, that the same interface will be used in >> st and dmenu as well. This is basically the remainder of my >> unpublished libtg efforts. > > Please, clarify about porting to cairo/pango - I remember discussion > about this not long ago, and there were a lot of "don't do it", mainly > because of the size of those libraries.
The conclusion was to define a common interface that abstracts the drawing routines out, in a way that there is no platform-specific (Xlib, Xft, pango or whatever) drawing code in dwm.c (eg DC currently uses Xlib data types and might become an opaque type in the future instead). This step is definitive and will be achieved rather soon, perhaps after a 5.6 release. A bigger goal is to emerge these efforts into something I call libtg (lib text GUI), which is the common code for the drawing stuff -- years ago I did a similiar thing for wmii called liblitz, but it has been abandoned. The plan is to use this not only in dwm, but also in dmenu and st. This step is senseful, because it'll reduce dmenu and st considerably and form a common base, this will happen potentially after the 5.7 release. Another big goal is to do the same for the X11/Xlib specific portions and to emerge that into a libwm, in order to provide a way that the core of dwm can be written on top of libwm and libtg. libwm would need to encapsulate all the Xlib stuff, thus the event handling etc. and could form a nice base library to write your own window manager easily, though it will be kept minimalist as dwm. This step is uncertain yet. The overall code complexity should not increase considerably due to these ideas, more the opposite. The separation of concerns should be very welcome and having a dwm core that can be adopted onto other underlying systems like XCB, Cocoa or Windows 7 doesn't sound too bad to me ;) As said, don't miss that all these efforts will be kept at its most minimalist solution. Speaking for dwm, the official version of dwm will be as is from a user perspective, code wise it might look a little bit different. I can't forsee it if and when there will appear a pango/cairo libtg version, but that might be something interesting, if you consider that dwm itself won't change for that to happen. Kind regards, Anselm