PICTURE
PICTURE is a declarative language for building user interfaces for PinkOS, an experimental OS built by us.
Links
About
PICTURE (PinkOS Interface Construction Terminology for UI Representation & Events) is a declarative language based on indentation for building user interfaces for PinkOS, an experimental OS built by us.
This is a demo of the homescreen of PinkOS, built with PICTURE:

The reason for building this project is that making GUIs for PinkOS in C was kind of a pain in the ass, because our graphics lib was just exposing functions to draw primitives without components or any tree structure, and without any way of aligning, styling or adding interaction to elements. So the idea was to create a better graphics lib/runtime for PinkOS, with support for components with a tree structure, text, basic styling and callbacks for input and events like on-select or on-press; and also to build a custom language so you can have a more high-level way of defining elements and styling. That is PICTURE, a language for building UIs and a runtime in PinkOS for doing the rendering and interaction. You write your GUI on a PICTURE schema file and your app logic in C, and then you use the compiler to convert the schema to a C file compatible with the PICTURE runtime. The logic of your app can reference and modify the graphical elements, and also your components in the schema can call C functions as callbacks to define the behaivior.
The compiler is written in C using Flex and Bison.
Roadmap
- Too many things… I’ll write it later if I feel like it.