[Dillo-dev]Porting dillo to another UI toolkit
Hi, I intended to post this a bit later, not before some usable code is available, but I changed my opinion, it may be useful to outline, how porting will happen. The most complex part is certainly Dw, since it is tightly bound to Gtk+. By all means, I want to prevent, that there exist different versions of Dw, with different features (e.g., when the development of the Gtk+ version continues, while the FLTK version is developed), which are hard to integrate. For this reason (and others), I'm currently working on a redesign of Dw, which will make Dw toolkit independant. This is not the single goal of this redesign, it will also make some other features possible, e.g. a preview window, in which the whole page may be seen with reduced size, also, it will make reusage of Dw within graphical plugins possibel, and some more. (Actually, the idea for this design is already older, except the platform independency, but this was simple to add.) I'll soon (within a week or so) post the first usable version of it, which will only include a small program to test Dw, not dillo itself, the integration into dillo will be done later. However, it will already make it possible to start with the porting work. A documentation, which changes should remain small, is already attached. As for the actual port, the following steps should be done: 1. Realize the test program, but for another UI toolkit. This will still have to include Gtk+, because of the Gtk+ object model, but the new toolkit should be in control over the event processing. (Furthermore, GLib will, in this phase, still be needed.) What is needed for this step: (i) an implementation of DwRenderPlatform and DwRenderView, and (ii) ports of the modules Dw_style and Dw_tooltip. These will perhaps also be abstracted, see DwRender.txt for details. The rest should not be touched, if this should become necessary, this is a bug. The changes in Dw_style and Dw_tooltip should not be too hard, and these modules will not change much in the near future, so this simple approach for porting is reasonable in this case. The experiences made on this should be interesting, if the design of Dw_style and Dw_tooltip should be enhanced, as described as an idea in the attached document. 2. The second step (regarding Dw) should be to get rid of Gtk+ and GLib. Since a port to FLTK is planned, it makes sense to port the C code to C++, this would also make the code cleaner, since dealing with classes and interfaces in C (with the Gtk+ model) is quite fiddly. Details of this step have still to be clarified, but the features, GLib and Gtk+ provides, should be relatively easily replaced. Notice also, that I plan to make an own library of Dw (at least the core of it), most of it has already been finished, but the release has been delayed, because I assign a greater priority to the dillo project. For the rest of the port, I do not have any plans, but AFAIS, I see far less problems as for Dw. Sebastian
Hi, a prototype of the rendering abstraction can be downlaoded from <http://www.dillo.org/misc_files/dillo-0.8.3-pre-dw-redesign-1.tar.gz>. There are some notes in README-port in the tarball, which should describe anything you need for a port. This is very incomplete and buggy, but some may already take a look at it, and start writing an equally incomplete and buggy ported version. Of course, it may change, there will be additional methods to implement, but the existing part of the platform-specific definitions should be pretty stable. Sebastian
participants (1)
-
Sebastian Geerken