summaryrefslogtreecommitdiff
path: root/src/libs/lvgl/docs
diff options
context:
space:
mode:
authorJean-François Milants <jf@codingfield.com>2021-02-23 21:21:29 +0100
committerJean-François Milants <jf@codingfield.com>2021-02-23 21:21:29 +0100
commitb11b20b0ac5c0adfbd1397cf42c322c873a736a8 (patch)
tree0bcb047f3e9d5c41c6d79b4dac6cbcdd3929136b /src/libs/lvgl/docs
parentf864330d355172046fab0923fd9015ec52884f00 (diff)
Remove LVGL folder (it's now a submodule)
Diffstat (limited to 'src/libs/lvgl/docs')
-rw-r--r--src/libs/lvgl/docs/CODING_STYLE.md43
-rw-r--r--src/libs/lvgl/docs/CONTRIBUTING.md112
-rw-r--r--src/libs/lvgl/docs/ROADMAP.md63
3 files changed, 85 insertions, 133 deletions
diff --git a/src/libs/lvgl/docs/CODING_STYLE.md b/src/libs/lvgl/docs/CODING_STYLE.md
index 31071e94..46bc6375 100644
--- a/src/libs/lvgl/docs/CODING_STYLE.md
+++ b/src/libs/lvgl/docs/CODING_STYLE.md
@@ -1,6 +1,7 @@
+# Coding style
## File format
-Use [lv_misc/lv_templ.c](https://github.com/littlevgl/lvgl/blob/master/src/lv_misc/lv_templ.c) and [lv_misc/lv_templ.h](https://github.com/littlevgl/lvgl/blob/master/src/lv_misc/lv_templ.h)
+Use [lv_misc/lv_templ.c](https://github.com/lvgl/lvgl/blob/master/src/lv_misc/lv_templ.c) and [lv_misc/lv_templ.h](https://github.com/lvgl/lvgl/blob/master/src/lv_misc/lv_templ.h)
## Naming conventions
* Words are separated by '_'
@@ -10,22 +11,23 @@ Use [lv_misc/lv_templ.c](https://github.com/littlevgl/lvgl/blob/master/src/lv_mi
* starts with *lv*
* followed by module name: *btn*, *label*, *style* etc.
* followed by the action (for functions): *set*, *get*, *refr* etc.
- * closed with the subject: *name*, *size*, *state* etc.
+ * closed with the subject: *name*, *size*, *state* etc.
* Typedefs
* prefer `typedef struct` and `typedef enum` instead of `struct name` and `enum name`
* always end `typedef struct` and `typedef enum` type names with `_t`
* Abbreviations:
- * Use abbreviations on public names only if they become longer than 32 characters
- * Use only very straightforward (e.g. pos: position) or well-established (e.g. pr: press) abbreviations
+ * Only words longer or equal than 6 characters can be abbreviated.
+ * Abbreviate only if it makes the word at least half as long
+ * Use only very straightforward and well-known abbreviations (e.g. pos: position, def: default, btn: button)
## Coding guide
* Functions:
- * Try to write function shorter than is 50 lines
- * Always shorter than 100 lines (except very straightforwards)
+ * Try to write function shorter than is 50 lines
+ * Always shorter than 200 lines (except very straightforwards)
* Variables:
* One line, one declaration (BAD: char x, y;)
* Use `<stdint.h>` (*uint8_t*, *int32_t* etc)
- * Declare variables when needed (not all at function start)
+ * Declare variables where needed (not all at function start)
* Use the smallest required scope
* Variables in a file (outside functions) are always *static*
* Do not use global variables (use functions to set/get static variables)
@@ -39,16 +41,16 @@ Before every function have a comment like this:
* @param obj pointer to an object
* @return pointer to a screen
*/
-lv_obj_t * lv_obj_get_scr(lv_obj_t * obj);
+lv_obj_t * lv_obj_get_scr(lv_obj_t * obj);
```
Always use `/* Something */` format and NOT `//Something`
-Write readable code to avoid descriptive comments like:
-`x++; /* Add 1 to x */`.
+Write readable code to avoid descriptive comments like:
+`x++; /* Add 1 to x */`.
The code should show clearly what you are doing.
-You should write **why** have you done this:
+You should write **why** have you done this:
`x++; /*Because of closing '\0' of the string */`
Short "code summaries" of a few lines are accepted. E.g. `/*Calculate the new coordinates*/`
@@ -65,30 +67,23 @@ Here is example to show bracket placing and using of white spaces:
*/
void lv_label_set_text(lv_obj_t * label, const char * text)
{ /* Main brackets of functions in new line*/
-
+
if(label == NULL) return; /*No bracket only if the command is inline with the if statement*/
-
+
lv_obj_inv(label);
-
+
lv_label_ext_t * ext = lv_obj_get_ext(label);
/*Comment before a section */
if(text == ext->txt || text == NULL) { /*Bracket of statements start inline*/
lv_label_refr_text(label);
- return;
+ return;
}
-
+
...
}
```
Use 4 spaces indentation instead of tab.
-You can use **astyle** to format the code. The required config flies are: `docs/astyle_c` and `docs/astyle_h`.
-To format the source files:
- `$ find . -type f -name "*.c" | xargs astyle --options=docs/astyle_c`
-
-To format the header files:
- `$ find . -type f -name "*.h" | xargs astyle --options=docs/astyle_h`
-
-Append `-n` to the end to skip creation of backup file OR use `$ find . -type f -name "*.bak" -delete` (for source file's backups) and `find . -type f -name "*.orig" -delete` (for header file's backups)
+You can use **astyle** to format the code. Run `code-formatter.sh` from the `scrips` folder.
diff --git a/src/libs/lvgl/docs/CONTRIBUTING.md b/src/libs/lvgl/docs/CONTRIBUTING.md
index aa31870e..553cfa51 100644
--- a/src/libs/lvgl/docs/CONTRIBUTING.md
+++ b/src/libs/lvgl/docs/CONTRIBUTING.md
@@ -1,111 +1,5 @@
-# Contributing to Littlev Graphics Library
+# Contributing to LVGL
-**Do you have some free time to spend with programming?
-Are you working on an Embedded GUI project with LittlevGL?
-See how can you help to improve the graphics library!**
+Thank you for considering contributing to LVGL.
-There are many ways to join the community. If you have some time to work with us I'm sure you will find something that fits you! You can:
-- help others in the [Forum](https://forum.littlevgl.com/)
-- improve and/or translate the documentation
-- write a blog post about your experiences
-- report and/or fix bugs
-- suggest and/or implement new features
-
-But first, start with the most Frequently Asked Questions.
-
-# FAQ about contributing
-
-## Where can I write my question and remarks?
-
-We use the [Forum](https://forum.littlevgl.com/) to ask and answer questions and [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues) for development-related discussion.
-
-But there are some simple rules:
-- Be kind and friendly.
-- Speak about one thing in one issue/topic.
-- Give feedback and close the issue or mark the topic as solved if your question is answered.
-- Tell what you experience or expect. _"The button is not working"_ is not enough info to get help.
-- If possible send an absolute minimal code example in order to reproduce the issue
-- Use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format your post.
-
-## How can I send fixes and improvements?
-
-Merging new code happens via Pull Requests. If you are still not familiar with the Pull Requests (PR for short) here is a quick guide:
-1. **Fork** the [lvgl repository](https://github.com/littlevgl/lvgl). To do this click the "Fork" button in the top right corner. It will "copy" the `lvgl` repository to your GitHub account (`https://github.com/your_name?tab=repositories`)
-2. **Clone** the forked repository and add your changes
-3. **Create a PR** on GitHub from the page of your `lvgl` repository (`https://github.com/your_name/lvgl`) by hitting the "New pull request" button
-4. **Set the base branch**. It means where you want to merge your update. Fixes go to `master`, new features to the actual `dev-x.y` branch.
-5. **Describe** what is in the update. An example code is welcome if applicable.
-
-Some advice:
-- If you are not sure about your fix or feature it's better to open an issue first and discuss the details there.
-- Maybe your fix or update won't be perfect at first. Don't be afraid, just improve it and push the new commits. The PR will be updated accordingly.
-- If your update needs some extra work it's okay to say: _"I'm busy now and I will improve it soon"_ or _"Sorry, I don't have time to improve it, I hope it helps in this form too"_.
-So it's better to say don't have time to continue than saying nothing.
-- Please read and follow this [guide about the coding style](https://github.com/littlevgl/lvgl/blob/master/docs/CODING_STYLE.md)
-
-
-## Where is the documentation?
-
-You can read the documentation here: <https://docs.littlevgl.com/>
-You can edit the documentation here: <https://github.com/littlevgl/doc>
-
-## Where is the blog?
-
-You can read the blog here: <https://blog.littlevgl.com/>
-You can edit the blog here: <https://github.com/littlevgl/blog>
-
-# So how and where can you contribute?
-
-## Help others in the Forum
-
-It's a great way to contribute to the library if you already use it.
-Just go to [https://forum.littlevgl.com/](https://forum.littlevgl.com/) a register (Google and GitHub login also works).
-Log in, read the titles and if you are already familiar with a topic, don't be shy, and write your suggestion.
-
-## Improving and/or translating the documentation
-
-If you would like to contribute to LittlevGL the documentation is the best place to start.
-
-### Fix typos, add missing parts
-
-If you find a typo, an obscure sentence or something which is not explained well enough in the [English documentation](https://docs.littlevgl.com/en/html/index.html)
-click the *"Edit on GitHub"* button in the top right corner and fix the issue by sending a Pull Request.
-
-### Translate the documentation
-
-If you have time and interest you can translate the documentation to your native language or any language you speak.
-You can join others to work on an already existing language or you can start a new one.
-
-To translate the documentation we use [Zanata](https://zanata.org) which is an online translation platform.
-You will find the LittlevGL project here: [LittlevGL on Zanata](https://translate.zanata.org/iteration/view/littlevgl-docs/v6.0-doc1?dswid=3430)
-
-To get started you need to:
-- register at [Zanata](https://zanata.org) which is an online translation platform.
-- comment to [this post](https://forum.littlevgl.com/t/translate-the-documentation/238?u=kisvegabor)
-- tell your username at *Zanata* and your selected language(s) to get permission the edit the translations
-
-Note that a translation will be added to the documentation only if at least the [Porting section](https://docs.littlevgl.com/en/html/porting/index.html) is translated.
-
-
-## Writing a blog post about your experiences
-
-Have you ported LittlevGL to a new platform? Have you created a fancy GUI? Do you know a great trick?
-You can share your knowledge on LittlevGL's blog! It's super easy to add your own post:
-- Fork and clone the [blog repository](https://github.com/littlevgl/blog)
-- Add your post in Markdown to the `_posts` folder.
-- Store the images and other resources in a dedicated folder in `assets`
-- Create a Pull Request
-
-The blog uses [Jekyll](https://jekyllrb.com/) to convert the `.md` files to a webpage. You can easily [run Jekyll offline](https://jekyllrb.com/docs/) to check your post before creating the Pull request
-
-## Reporting and/or fixing bugs
-For simple bugfixes (typos, missing error handling, fixing a warning) is fine to send a Pull request directly. However, for more complex bugs it's better to open an issue first. In the issue, you should describe how to reproduce the bug and even add the minimal code snippet.
-
-## Suggesting and/or implementing new features
-If you have a good idea don't hesitate to share with us. It's even better if you have time to deal with its implementation. Don't be afraid if you still don't know LittlevGL well enough. We will help you to get started.
-
-During the implementation don't forget the [Code style guide](https://github.com/littlevgl/lvgl/blob/master/docs/CODING_STYLE.md).
-
-# Summary
-
-I hope you have taken a liking to contribute to LittlevGL. A helpful and friendly community is waiting for you! :)
+For a detailed description of contribution opportunities, please visit the [Contributing](https://docs.lvgl.io/latest/en/html/contributing/index.html) section of the documentation.
diff --git a/src/libs/lvgl/docs/ROADMAP.md b/src/libs/lvgl/docs/ROADMAP.md
new file mode 100644
index 00000000..a606894f
--- /dev/null
+++ b/src/libs/lvgl/docs/ROADMAP.md
@@ -0,0 +1,63 @@
+# Roadmap
+
+This is a summary for thenew fatures of the major releases and a collection of ideas.
+
+This list indicates only the current intention and can be changed.
+
+## v8
+Planned to November/December 2020
+- Create an `lv_components` repository for compley widgets
+ - It makes the core LVGL leaner
+ - In `lv_components` we can have a lot and specific widgets
+ - Good place for contribution
+- New scrolling:
+ - See [feat/new-scroll](https://github.com/lvgl/lvgl/tree/feat/new-scroll) branch and [#1614](https://github.com/lvgl/lvgl/issues/1614)) issue.
+ - Remove `lv_page` and support scrolling on `lv_obj`
+ - Support "elastic" scrolling when scrolled in
+ - Support scroll chaining among any objects types (not only `lv_pages`s)
+ - Remove `lv_drag`. Similar effect can be achieved by setting the position in `LV_EVENT_PRESSING`
+ - Add snapping
+ - Add snap stop to scroll max 1 snap point
+ - Already working
+- New layouts:
+ - See [#1615](https://github.com/lvgl/lvgl/issues/1615) issue
+ - [CSS Grid](https://css-tricks.com/snippets/css/a-guide-to-grid/)-like layout support
+ - [CSS Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)-like layout support
+ - Remove `lv_cont` and support layouts on `lv_obj`
+- Simplified File system interface ([feat/new_fs_api](https://github.com/lvgl/lvgl/tree/feat/new-fs-api) branch) to make porting easier
+ - Work in progress
+- Remove the align parameter from `lv_canvas_draw_text`
+- Make the copy parameter obsolate in create functions
+- Optimize and simplifie styles [#1832](https://github.com/lvgl/lvgl/issues/1832)
+- Use a more generic inheritenace [#1919](https://github.com/lvgl/lvgl/issues/1919)
+
+## v8.x
+- Add radio button widget
+- Unit testing (gtest?). See [#1658](https://github.com/lvgl/lvgl/issues/1658)
+- Benchmarking (gem5?). See [#1660](https://github.com/lvgl/lvgl/issues/1660)
+- chart: pre-delete `X` pint after the lastly set
+- chart: autoscroll to the right
+
+## v9
+- Simplify `group`s. Discussion is [here](https://forum.lvgl.io/t/lv-group-tabindex/2927/3).
+- Consider direct binary font format support
+- Optimize line and circle drawing and masking
+- Reconsider color format management for run time color format setting, and custom color format usage. (Also [RGB888](https://github.com/lvgl/lvgl/issues/1722))
+- 9-patch support for `lv_imgbtn`.
+- Handle stride. See [#1858](https://github.com/lvgl/lvgl/issues/1858)
+- Make gradients more versatile
+- Make image transformations more versatile
+- Allow snapshoting object to tranfrom them to images
+
+## Ideas
+- Use [generate-changelog](https://github.com/lob/generate-changelog) to automatically generate changelog
+- lv_mem_alloc_aligned(size, align)
+- Text node. See [#1701](https://github.com/lvgl/lvgl/issues/1701#issuecomment-699479408)
+- CPP binding. See [Forum](https://forum.lvgl.io/t/is-it-possible-to-officially-support-optional-cpp-api/2736)
+- Optimize font decompression
+- Switch to RGBA colors in styles
+- Need coverage report for tests
+- Need static analyze (via coverity.io or somehing else)
+- Support dot_begin and dot_middle long modes for labels
+- Add new label alignment modes. [#1656](https://github.com/lvgl/lvgl/issues/1656)
+- Support larger images: [#1892](https://github.com/lvgl/lvgl/issues/1892)