Saturday, October 17, 2020

Some Updates Regarding My Flexible, Composable, Libre Desktop Environment Project

Back in April I posted a proposal for a flexible, composable, libre desktop environment that will run on top of Linux and various BSDs.  Since April I have been fleshing out some of the design decisions, though I haven't started writing code yet, partly because there are other design decisions I want to make before coding, and also because there are some technologies that I still need to learn; I have experience building GUI applications (particularly using GTK and Glade), but I'm not as familiar with the lower levels of the graphics stack, and thus I need to gain more familiarity with 2D graphics programming in order to carry out this project.

Here are some key decisions I have made:
  • The desktop environment will be written in Common Lisp in order to take advantage of the Common Lisp Object System, a dynamic object system that supports multiple dispatch.  I feel that using a dynamic object system will make it easier for me to implement a component-based desktop environment.  I plan to write demo programs that are also written in Common Lisp.
  • The desktop environment will be for Wayland, which is expected to replace X for new GUI development in the future.
  • This desktop will be written using its own BSD-licensed GUI toolkit, written for Wayland (although support for non-Wayland backends may be possible) and also written in Common Lisp.  There seems to be few options for BSD-licensed GUI toolkits; GTK+, Qt, and GNUstep are under the LGPL.  Having a BSD-licensed toolkit will maximize its adoption.
  • This new GUI toolkit will be fully themable; programmers will be able to describe windows using an S-expression syntax.  For example, we could describe a window that contains the label "I'm a window!" and two buttons (one to change the color of the label and the other to close the window) using two S-expressions: one for describing the contents of the window, and one for describing its format:
; Content definition file
(window main
  (label i-m-a-window)
  (button change-color)
  (button close))


; Layout definition file
(window (main)
  :size (300 400))


(label (i-m-a-window)
  :text "I'm a window"
  :font "Helvetica"
  :font-size 20
  :position (20 5)
  :align left)


(button (change-color)
  :text "Change Color"
  :size (50 150)
  :position (100 100))


(button (close)
  :text "Close"
  :size (50 150)
  :position (260 100))


  • Underneath the GUI toolkit will be a 2D graphics system that renders directly to a Wayland pixel buffer.  I am still exploring possible design options, but I've always been intrigued by the Display PostScript system used by NeXTSTEP and Sun NeWS, and I personally love macOS's Quartz 2D graphics system, which uses the same graphics model as PDF.  I am leaning toward also using PDF as the 2D graphics model of this desktop environment.
As I mentioned before, I haven't started coding yet.  Because there are still many technologies I need to learn, as well as other responsibilities that I have, I anticipate development of my side project to be slow.  Nevertheless, I hope to have a working prototype of the desktop environment completed sometime in either late 2021 or early 2022.

No comments:

Post a Comment