-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Architecture
The Fyne toolkit is split into 2 projects - "fyne" (the main developer API) and "fyne-app" (the operating system specific code and renderer).
The high level API for the Fyne UI and App toolkit. This project defines the main API that developers will interact with, it defines the interaction for windows, widgets and canvases. Layouts, user interaction and themes are all defined within this API.
The application UI is defined by way of various Widgets or CanvasObjects. Containers exist to hold multiple widgets or objects and the arrangement of these sub-objects is controlled by various Layouts. The tree of objects could be serialised in and out of static files such as json if developers or tool creators find that easier to work with than the main API.
The core API is pure Go which makes it very fast for development, testing and highly portable.
Within the fyne-app project is the main rendering code and any operating system specific details such as menu window management, canvas setup and app management. The Enlightenment Foundation Libraries are used for the rendering - they provide modules for various operating systems and driver combinations such as 3D acceleration.
Code in this library is a mix of Go, CGo and C which means that it is less portable. Any feature additions need to support, at least, Fyne's Supported Platforms.
Remember that with all of the APIs and developer facing code we aim to make it easy and fast to build great looking applications. Some of the complexity internally is necessary to make that happen. Nonetheless this core code is well tested and must be maintainable and extensible by any new developers who would like to join the project.