The Shiny project has been designed to ensure good separation between the widget code and the lower-level rendering code that widgets utilize. It is also built with the understanding that graphical drivers may be useful on more than a single platform and could potentially be changed or added to over time.
The Shiny API is split into two layers, a lower layer that handles graphical buffers and rendering, and a higher layer where the widget and layout code is located. Each layer has clear responsibilities and their separation helps to maintain a clean API.
The lower layer of the Shiny API is responsible for creating a render context for each platform supported. It is also responsible for handling input from keyboard and other peripheral devices. The main concepts of the graphical presentation are Buffers, Textures, and Windows: