Skip to content

Architecture

Andrew Williams edited this page Sep 17, 2018 · 6 revisions

The Fyne toolkit is split into 2 projects - "fyne" (the main developer API) and "fyne/desktop" (the operating system specific code and renderer for desktop environments).

fyne

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.

fyne/desktop

Within the "desktop" sub-project (refactored from fyne-app) is the main rendering code, event handling and operating system specific details such as menu window management, canvas setup and app management. The Enlightenment Foundation Libraries are used for the rendering (though we may look at other Drivers in the future) - they provide modules for various operating systems and driver combinations such as 3D acceleration. This has been renamed "desktop" as it is specific to running applications in a desktop environment - in the future it may be possible to invoke an application on a different type of platform which would require a different driver package.

Code in this area 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.

Welcome to the Fyne wiki.

Project documentation

Getting involved

Platform details

Clone this wiki locally