LVGL Documentation 8.0
Total Page:16
File Type:pdf, Size:1020Kb
LVGL Documentation 8.0 LVGL community Aug 21, 2021 CONTENTS 1 Introduction 2 1.1 Key features ............................................... 2 1.2 Requirements ............................................... 3 1.3 License .................................................. 3 1.4 Repository layout ............................................. 3 1.5 Release policy ............................................... 3 1.6 FAQ ................................................... 4 2 Get started 7 2.1 Quick overview .............................................. 7 2.2 Simulator on PC ............................................. 15 2.3 STM32 .................................................. 18 2.4 NXP ................................................... 18 2.5 Espressif (ESP32) ............................................ 20 2.6 Arduino .................................................. 21 2.7 Micropython ............................................... 23 2.8 NuttX RTOS ............................................... 25 3 Porting 29 3.1 Set-up a project .............................................. 29 3.2 Display interface ............................................. 30 3.3 Input device interface ........................................... 40 3.4 Tick interface ............................................... 48 3.5 Task Handler ............................................... 49 3.6 Sleep management ............................................ 49 3.7 Operating system and interrupts ..................................... 50 3.8 Logging .................................................. 51 4 Overview 53 4.1 Objects .................................................. 53 4.2 Positions, sizes, and layouts ........................................ 59 4.3 Styles ................................................... 67 4.4 Style properties .............................................. 106 4.5 Scroll ................................................... 116 4.6 Layers ................................................... 126 4.7 Events ................................................... 128 4.8 Input devices ............................................... 135 4.9 Displays .................................................. 143 4.10 Colors ................................................... 149 4.11 Fonts ................................................... 156 i 4.12 Images .................................................. 164 4.13 File system ................................................ 178 4.14 Animations ................................................ 185 4.15 Timers .................................................. 195 4.16 Drawing .................................................. 200 4.17 New widget ................................................ 205 5 Widgets 206 5.1 Base object (lv_obj) ............................................ 206 5.2 Core widgets ............................................... 218 5.3 Extra widgets ............................................... 324 6 Layouts 409 6.1 Flex .................................................... 409 6.2 Grid .................................................... 418 7 Contributing 431 7.1 Introduction ................................................ 431 7.2 Pull request ................................................ 432 7.3 Developer Certification of Origin (DCO) ................................. 433 7.4 Ways to contribute ............................................ 434 8 Changelog 438 8.1 v8.0.2 (16.07.2021) ............................................ 438 8.2 v8.0.1 (14.06.2021) ............................................ 439 8.3 v8.0.0 (01.06.2021) ............................................ 441 8.4 v7.11.0 (16.03.2021) ........................................... 443 8.5 v7.10.1 (16.02.2021) ........................................... 443 8.6 v7.10.0 (02.02.2021) ........................................... 444 8.7 v7.9.1 (19.01.2021) ............................................ 444 8.8 v7.9.0 (05.01.2021) ............................................ 444 8.9 v7.8.1 (15.12.2020) ............................................ 445 8.10 v7.8.0 (01.12.2020) ............................................ 445 8.11 v7.7.2 (17.11.2020) ............................................ 446 8.12 v7.7.1 (03.11.2020) ............................................ 446 8.13 v7.7.0 (20.10.2020) ............................................ 446 8.14 v7.6.1 (06.10.2020) ............................................ 447 8.15 v7.6.0 (22.09.2020) ............................................ 447 8.16 v7.5.0 (15.09.2020) ............................................ 448 8.17 v7.4.0 (01.09.2020) ............................................ 448 8.18 v7.3.1 (18.08.2020) ............................................ 449 8.19 v7.3.0 (04.08.2020) ............................................ 449 8.20 v7.2.0 (21.07.2020) ............................................ 450 8.21 v7.1.0 (07.07.2020) ............................................ 451 8.22 v7.0.2 (16.06.2020) ............................................ 452 8.23 v7.0.1 (01.06.2020) ............................................ 452 8.24 v7.0.0 (18.05.2020) ............................................ 453 9 Roadmap 457 9.1 v8.X ................................................... 457 9.2 Ideas ................................................... 457 9.3 v8 ..................................................... 458 Index 459 ii LVGL Documentation 8.0 PDF version: LVGL.pdf CONTENTS 1 CHAPTER ONE INTRODUCTION LVGL (Light and Versatile Graphics Library) is a free and open-source graphics library providing everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and a low memory footprint. 1.1 Key features • Powerful building blocks such as buttons, charts, lists, sliders, images, etc. • Advanced graphics with animations, anti-aliasing, opacity, smooth scrolling • Various input devices such as touchpad, mouse, keyboard, encoder, etc. • Multi-language support with UTF-8 encoding • Multi-display support, i.e. use multiple TFT, monochrome displays simultaneously • Fully customizable graphic elements with CSS-like styles • Hardware independent: use with any microcontroller or display • Scalable: able to operate with little memory (64 kB Flash, 16 kB RAM) • OS, external memory and GPU supported but not required • Single frame buffer operation even with advanced graphic effects • Written in C for maximal compatibility (C++ compatible) • Simulator to start embedded GUI design on a PC without embedded hardware • Binding to MicroPython • Tutorials, examples, themes for rapid GUI design • Documentation is available online and PDF • Free and open-source under MIT license 2 LVGL Documentation 8.0 1.2 Requirements Basically, every modern controller (which is able to drive a display) is suitable to run LVGL. The minimal requirements are: 1.3 License The LVGL project (including all repositories) is licensed under MIT license. It means you can use it even in commercial projects. It's not mandatory but we highly appreciate it if you write a few words about your project in the My projects category of the forum or a private message to lvgl.io. Although you can get LVGL for free there is a massive amount of work behind it. It's created by a group of volunteers who made it available for you in their free time. To make the LVGL project sustainable, please consider contributing to the project. You can choose from many different ways of contributing such as simply writing a tweet about you are using LVGL, fixing bugs, translating the documentation, or even becoming a maintainer. 1.4 Repository layout All repositories of the LVGL project are hosted on GitHub: https://github.com/lvgl You will find these repositories there: • lvgl The library itself with many examples. • lv_demos Demos created with LVGL. • lv_drivers Display and input device drivers • blog Source of the blog's site (https://blog.lvgl.io) • sim Source of the online simulator's site (https://sim.lvgl.io) • lv_sim_... Simulator projects for various IDEs and platforms • lv_port_... LVGL ports to development boards • lv_binding_.. Bindings to other languages • lv_... Ports to other platforms 1.5 Release policy The core repositories follow the rules of Semantic versioning: • Major versions for incompatible API changes. E.g. v5.0.0, v6.0.0 • Minor version for new but backward-compatible functionalities. E.g. v6.1.0, v6.2.0 • Patch version for backward-compatible bug fixes. E.g. v6.1.1, v6.1.2 Tags like vX.Y.Z are created for every release. 1.2. Requirements 3 LVGL Documentation 8.0 1.5.1 Release cycle • Bugfixes: Released on demand even weekly • Minor releases: Every 3-4 months • Major releases: Approximatelly yearly 1.5.2 Branches The core repositories have at least the following branches: • master latest version, patches are merged directly here. • release/vX.Y stable versions of the minor releases • fix/some-description temporal branches for bug fixes • feat/some-description temporal branches for features 1.5.3 Changelog The changes are recorded in CHANGELOG.md. 1.5.4 Version support Before v8 every minor release of major releases is supported for 1 year. From v8 every minor release is supported for 1 year. 1.6 FAQ 1.6.1 Where can I ask questions? You can ask questions in the forum: https://forum.lvgl.io/. We use GitHub issues for development related discussion. So you should use them only if your question or issue is tightly related to the development of the library. 1.6.2 Is my MCU/hardware