Compare commits

..

3509 Commits

Author SHA1 Message Date
Gabor Kiss-Vamosi
5035c0c780 Release v7.7.1 2020-11-03 09:23:29 +01:00
Gabor Kiss-Vamosi
f915b4cfb6 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-11-02 16:03:37 +01:00
Gabor Kiss-Vamosi
b62ddf8f64 push test 2020-11-02 16:02:47 +01:00
Gabor Kiss-Vamosi
b05aaaeb6b Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-11-02 15:55:10 +01:00
Gabor Kiss-Vamosi
47687fc252 Update changelog 2020-11-02 15:54:54 +01:00
Gabor Kiss-Vamosi
929d9f7a57 Update release.yml 2020-11-02 13:13:01 +01:00
Gabor Kiss-Vamosi
23aec1e1ce Update release.yml 2020-11-02 12:52:03 +01:00
Gabor Kiss-Vamosi
d487acd7cc Create release.yml 2020-11-02 12:51:12 +01:00
Gabor Kiss-Vamosi
6d92d084f7 group: fix in lv_group_remove_obj to handle deleting hidden obejcts correctly 2020-11-02 12:24:12 +01:00
Gabor Kiss-Vamosi
a2b4bbcd2a add missing #include <stdarg.h> 2020-10-29 23:05:16 +01:00
Gabor Kiss-Vamosi
85c8014880 gauge: make the needle images to use the styles from LV_GAUGE_PART_PART 2020-10-28 11:14:05 +01:00
Ali Rostami
b3cca917df create the fmt version of setting text for msgbox. (#1851)
* create the fmt version of setting text for msgbox.

* define _lv_txt_set_text_vfmt and change the body of lv_msgbox_set_text_fmt.

* make lv_label_refr_text out of static.

* fix a bug in _lv_txt_set_text_vfmt
2020-10-28 10:14:18 +01:00
Gabor Kiss-Vamosi
4dafa10017 fix messed up function introduced in 6e9714c5 2020-10-27 13:49:47 +01:00
Gabor Kiss-Vamosi
6e9714c545 respect btnmatrix's one_check in lv_btnmatrix_set_btn_ctrl
Related to https://forum.lvgl.io/t/expand-lv-btnmatrix-set-one-check-to-allow-radio-button-functionality/2962
2020-10-27 13:42:01 +01:00
Gabor Kiss-Vamosi
8788317bb1 chart: remove LV_CHART_SCATTER option which was only an accidental leftover 2020-10-26 15:18:41 +01:00
Gabor Kiss-Vamosi
cc921dae17 Fix infinite loop in lv_imgbtn
Fixes: #1867
2020-10-26 12:45:51 +01:00
Gabor Kiss-Vamosi
18ae2fe7fb Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-10-26 12:40:15 +01:00
Gabor Kiss-Vamosi
c19a4ad568 lv_conf_checker.py: add auto incude of lv_conf.h if available 2020-10-26 12:40:05 +01:00
iDalink
b3bfa3c58b lv_label effect area clip line space (#1866)
Co-authored-by: Dalink <Dalink@gitee.com>
2020-10-26 12:01:32 +01:00
Gabor Kiss-Vamosi
b44ddb5b64 lv_gpu_nxp_pxp_osa.h include lv_conf_internal.h instead of lv_conf.h
Related to #1860
2020-10-26 09:13:48 +01:00
Chris Mumford
d6c87cb753 Initialize lv_color_t::green_l when LV_COLOR_16_SWAP==1 (#1865) 2020-10-24 14:49:55 -04:00
Chris Mumford
51a522c8d3 Fixed a few dangling references to lv_conf_templ.h. (#1863) 2020-10-24 14:07:19 -04:00
Gabor Kiss-Vamosi
200d3aa26d fix build with out lv_conf.h
Fixes: #1860
2020-10-22 13:57:25 +02:00
Gabor Kiss-Vamosi
c03160abc2 add lv_conf_kvoncfig.h to handle special Kconfig options 2020-10-22 13:55:12 +02:00
Gabor Kiss-Vamosi
757df9eb89 Update version to 7.7.1-dev 2020-10-21 14:10:24 +02:00
Gabor Kiss-Vamosi
aec831d277 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-10-21 14:08:29 +02:00
Gabor Kiss-Vamosi
d3cafedb65 remove pycache files 2020-10-21 14:08:16 +02:00
Gabor Kiss-Vamosi
16a4023abf reorganize release script 2020-10-21 14:06:48 +02:00
Gabor Kiss-Vamosi
6fb4235c66 prepare to release v7.7.0 2020-10-20 13:32:57 +02:00
Gabor Kiss-Vamosi
64c68ec25b release.py: add lv_sim_emscripten 2020-10-20 13:27:14 +02:00
Gabor Kiss-Vamosi
62a21e912c Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-10-19 12:33:42 +02:00
Gabor Kiss-Vamosi
df49f8656d fix image transformation
Fixes: #1854
2020-10-19 12:33:34 +02:00
Themba Dube
3d4284b02c stm32: use DSB to ensure GPU clock gets enabled 2020-10-18 12:32:22 -04:00
Gabor Kiss-Vamosi
4ca5d4e86d Update ROADMAP.md 2020-10-16 13:12:46 +02:00
Gabor Kiss-Vamosi
55d78e1f92 Update ROADMAP.md 2020-10-16 13:06:21 +02:00
Gabor Kiss-Vamosi
cf8e40fcbe Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-10-16 11:27:35 +02:00
Gabor Kiss-Vamosi
8d9c0bd9b2 fix define_set to check define name end too 2020-10-16 11:27:24 +02:00
Gabor Kiss-Vamosi
8c0ab944af Update ROADMAP.md 2020-10-15 15:21:55 +02:00
Gabor Kiss-Vamosi
79433deeb8 Update ROADMAP.md 2020-10-13 12:55:43 +02:00
Gabor Kiss-Vamosi
ddb4ae8685 fix lv_win_clean() 2020-10-13 11:53:03 +02:00
Gabor Kiss-Vamosi
489f426b27 fix rectangle border drawing with large width 2020-10-12 15:48:43 +02:00
Gabor Kiss-Vamosi
b1b233d249 fix warning 2020-10-12 13:15:48 +02:00
Gabor Kiss-Vamosi
c4f8959e65 remove version control text
Fixes #1846
2020-10-12 12:58:04 +02:00
Gabor Kiss-Vamosi
68629c725a add missing fonts
fixes: #1845
2020-10-12 12:43:51 +02:00
Gabor Kiss-Vamosi
20363b09e6 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-10-12 12:09:08 +02:00
Gabor Kiss-Vamosi
4d620d3771 fix dropdown selection with RTL basedirection
Related to: #1842
2020-10-12 12:08:49 +02:00
Sergei Kolotovchenkov
e1f222d04f Improve compatibility with C++14 (#1843) 2020-10-09 09:11:34 -04:00
Gabor Kiss-Vamosi
56c4cab228 skip objects in groups if they are in disabled state 2020-10-09 10:34:02 +02:00
Gabor Kiss-Vamosi
5d91c24723 support RTL in pretty layout (draw columns right to left)
Related to #1833
2020-10-08 15:18:30 +02:00
embeddedt
6e48cde2f1 Fix #1837: remove last designated initializer in lv_color.h 2020-10-08 08:30:29 -04:00
robekras
9ec4b61417 Fix #1798: Use AHB3 enable register for STM32H7 (#1840) 2020-10-07 14:17:38 -04:00
Gabor Kiss-Vamosi
6c426aa855 fix warnings 2020-10-07 14:03:06 +02:00
Gabor Kiss-Vamosi
c804fadf40 remove the internal usage of LV_HOR/VER_RES_MAX 2020-10-07 13:55:06 +02:00
Gabor Kiss-Vamosi
1ee9c13a1d revert debug changes in material theme 2020-10-07 13:48:31 +02:00
Gabor Kiss-Vamosi
0266244c58 support RTL in table (draw columns right to left)
Related to #1833
2020-10-07 13:47:49 +02:00
Gabor Kiss-Vamosi
f1a198bd93 fix imgbtn state change 2020-10-07 12:44:54 +02:00
Gabor Kiss-Vamosi
1d50bc962d theme update to support text selection background
Fixes #1820
2020-10-07 12:23:24 +02:00
Gabor Kiss-Vamosi
fff3a00de2 fix lv_disp_get_inactive_time if the disp==NULL
Fixes #1836
2020-10-06 11:25:37 +02:00
Gabor Kiss-Vamosi
faf50714a1 update release script 2020-10-06 11:23:40 +02:00
Gabor Kiss-Vamosi
e41bc28817 Merge branch 'master' into dev 2020-10-06 09:33:59 +02:00
Gabor Kiss-Vamosi
8b6bb63795 prepare to release v7.6.1 2020-10-06 09:30:37 +02:00
Gabor Kiss-Vamosi
0de2cc9a8e fix conflicts 2020-10-06 09:30:00 +02:00
Gabor Kiss-Vamosi
3d8a19a0ca fix version number 2020-10-06 09:29:13 +02:00
Gabor Kiss-Vamosi
bc626dc9d0 update CHANGELOG 2020-10-06 08:59:07 +02:00
github-actions[bot]
38a9426135 Merge 6b24c949f1 into dev 2020-10-05 18:46:45 +00:00
Gabor Kiss-Vamosi
6b24c949f1 fix lv_img offset usage
Fixes: https://forum.lvgl.io/t/problem-with-lv-img-set-offset-y-in-ver-7/3330
2020-10-05 20:46:09 +02:00
github-actions[bot]
44709caf6f Merge e557b0fbac into dev 2020-10-05 12:31:49 +00:00
embeddedt
e557b0fbac Only check __STDC_VERSION__ if __cplusplus is not defined 2020-10-05 08:31:20 -04:00
github-actions[bot]
b124f4d7e0 Merge 3dabec4cae into dev 2020-10-05 08:53:33 +00:00
Amir Gonnen
3dabec4cae Run test on dev branch as well (#1835) 2020-10-05 10:53:02 +02:00
github-actions[bot]
4092c71a45 Merge 78ecdd1f1d into dev 2020-10-05 07:44:20 +00:00
Gabor Kiss-Vamosi
78ecdd1f1d Update ROADMAP.md 2020-10-05 09:43:52 +02:00
Gabor Kiss-Vamosi
4c2c1dd8bd fix conflicts 2020-10-05 09:42:59 +02:00
Gabor Kiss-Vamosi
e33e1df4af Merge branch 'feature/vg-lite-support-dev-7-7' of https://github.com/NXPmicro/lvgl into NXPmicro-feature/vg-lite-support-dev-7-7 2020-10-05 09:23:53 +02:00
github-actions[bot]
4c7a2ae0b7 Merge 96478a0c3e into dev 2020-10-03 12:38:29 +00:00
C47D
96478a0c3e lv_conf_internal: Check for LV_CONF_INCLUDE_SIMPLE before defining it. 2020-10-03 08:37:49 -04:00
github-actions[bot]
61437e793a Merge 86ddaf90a7 into dev 2020-10-02 19:46:11 +00:00
Gabor Kiss-Vamosi
86ddaf90a7 material theme: do not set the text font to allow easy global font change 2020-10-02 21:45:32 +02:00
Ali Rostami
8394d92fac Cursor (#1789)
* update lv_obj_refresh_style describtion.

* cursor added.

* refresh chart after setting the cursor

* add new direction and a bug fixed.

* fixed the wrong changes for header file.

* rename lv_cursor_direction_t enum members.

* add lv_chart_get_x_from_index and lv_chart_get_y_from_index

* lv_chart_get_x_from_index supports column chart type too.

* fix the error of no lv_coord_t value return.

* fix a bug based on the coord is with respect to the series area.

* make get_series_area function global.

* fix the name of get_series_area function.

* add the description of the added functions.

* chart cursor minor fixes

Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2020-10-02 13:59:05 +02:00
jozba
fc2206105b Fixed include paths (#1823)
Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>
2020-10-02 13:12:41 +02:00
jozba
b049b7e1f6 Bugfix/mgg 562 lvgl pxp symbol prefix missing include path update blit limit (#1830)
* PXP: Updated area threshold, fixed symbol names, minor fixes

- Area threshold of 1 left from debugging, changed to 32 for performance
reasons.
- Fixed naming convention of symbols (prefix LV_GPU_)
- Fixed include paths (no need to add src folder into include paths)
- Comments changed to doxygen

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: Code formatting

Applied code-format.sh script.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>
2020-10-02 13:10:09 +02:00
github-actions[bot]
cf1ca20750 Merge 34e0fefeb3 into dev 2020-10-02 10:26:54 +00:00
Gabor Kiss-Vamosi
34e0fefeb3 fix imgbtn image switching with empty style 2020-10-02 12:26:12 +02:00
Gabor Kiss-Vamosi
a12d54855f Update CHANGELOG.md 2020-10-02 11:35:15 +02:00
ryanpowers
6d1a72b522 Text selection enhancement (#1829)
* Corrected bug in styles of labels with selections

Text selection color (text_selection_color) property was incorrectly
being applied to the text color if there was a selection. The sel_color
property in the label descriptor was initialized to blue. This property
was intended to be the label background color under a selection.

* Add new property for the color of selected text

New property for labels: text_sel_font_color
This property will change the color of the font within selected text.

* Rename text selection color properties

Per feedback from issue #1820, sel_color is now sel_bg_color and
sel_font_color is now sel_color. This results in clearer naming.

Co-authored-by: Ryan Powers <ryan.powers@envision-tek.com>
2020-10-02 11:34:28 +02:00
github-actions[bot]
f37cbafad6 Merge 79d72f9286 into dev 2020-10-02 08:55:42 +00:00
Gabor Kiss-Vamosi
79d72f9286 Fix click focus 2020-10-02 10:54:53 +02:00
Themba Dube
e7bb0382c4 Merge remote-tracking branch 'origin/master' into dev 2020-10-01 10:34:08 -04:00
Gabor Kiss-Vamosi
0b1590d9ac Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-10-01 16:24:01 +02:00
Gabor Kiss-Vamosi
d14e642fc7 fix style transitions with style caching
related to #1825
2020-10-01 16:23:54 +02:00
Martino Facchin
535c3d506f Allow inclusion of local lv_conf_internal.h (#1822)
* Allow inclusion of local lv_conf_internal.h

A wrapper library cna contain an lv_conf.h file and it would be automatically picked up by the buildsystem

* Guard __has_include and simplify code

* Make number sign indentation consistent

Co-authored-by: embeddedt <42941056+embeddedt@users.noreply.github.com>
2020-10-01 13:51:33 +02:00
Gabor Kiss-Vamosi
8bed30db34 handle sub pixel rendering in font loader 2020-10-01 13:28:22 +02:00
Gabor Kiss-Vamosi
f6df9b490e Update CHANGELOG.md 2020-10-01 13:18:00 +02:00
Gabor Kiss-Vamosi
5770a09e73 Update CHANGELOG.md 2020-10-01 13:16:52 +02:00
Ali Rostami
c2c130889d use margin in the header part of calendar. (#1817)
* use margin in the header part of calendar.

* make calendar_init same as before based on new changes of pad and margin in calendar_header.
2020-10-01 13:16:00 +02:00
Jozef Bastek
ed90f36984 VG-Lite: Added support for fill and BLIT
VG-Lite accelerated features:
  - fill (+ transparency)
  - BLIT (+ transparency)

Limitation:
  Image width must be aligned to 16 for VG-Lite to process the buffer.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>
2020-09-30 17:38:25 +02:00
github-actions[bot]
540856a8bc Merge 8c824b265e into dev 2020-09-30 04:55:39 +00:00
Gabor Kiss-Vamosi
8c824b265e style cahce: add margin 2020-09-30 06:55:05 +02:00
github-actions[bot]
f1690be7fc Merge 5a0006cd3c into dev 2020-09-29 07:34:27 +00:00
Gabor Kiss-Vamosi
5a0006cd3c Update ROADMAP.md 2020-09-29 09:33:57 +02:00
github-actions[bot]
25bd804724 Merge 07746a78d5 into dev 2020-09-28 13:32:34 +00:00
Gabor Kiss-Vamosi
07746a78d5 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-09-28 15:31:55 +02:00
Gabor Kiss-Vamosi
a24e3f619f dropdown list fixes with Bidi == RTL 2020-09-28 11:48:27 +02:00
Gabor Kiss-Vamosi
5be1fcadca fix copying base dir in lv_obj_craete 2020-09-28 11:48:06 +02:00
github-actions[bot]
03c526514d Merge 8ff5e23378 into dev 2020-09-28 09:08:17 +00:00
Gabor Kiss-Vamosi
8ff5e23378 Update ROADMAP.md 2020-09-28 11:07:49 +02:00
github-actions[bot]
ef0c8690e4 Merge ce11b4c71c into dev 2020-09-28 08:51:58 +00:00
Gabor Kiss-Vamosi
ce11b4c71c fix build error 2020-09-28 10:51:26 +02:00
github-actions[bot]
0d62025e2c Merge f0fc45eb52 into dev 2020-09-28 08:43:39 +00:00
Gabor Kiss-Vamosi
f0fc45eb52 checkbox: do not play transition on manual state change 2020-09-28 10:43:05 +02:00
github-actions[bot]
115314b140 Merge ffd9b872d9 into dev 2020-09-27 12:47:45 +00:00
Gabor Kiss-Vamosi
ffd9b872d9 fix BIDI support in dropdown list 2020-09-27 14:47:11 +02:00
github-actions[bot]
22fbde4501 Merge 71669c252c into dev 2020-09-23 17:59:22 +00:00
Gabor Kiss-Vamosi
71669c252c Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-09-23 19:58:45 +02:00
Gabor Kiss-Vamosi
672537dcc2 propogate checkbox state change to bullet and label too 2020-09-23 19:26:22 +02:00
github-actions[bot]
a45ff2c574 Merge 6b06ac4b72 into dev 2020-09-23 17:24:37 +00:00
embeddedt
6b06ac4b72 Fix grammar error in README.md 2020-09-23 13:24:00 -04:00
github-actions[bot]
2f7369e771 Merge b2d201dba7 into dev 2020-09-23 10:42:07 +00:00
embeddedt
b2d201dba7 Fix #1795: ensure switch/bar visual state matches logical state (#1805) 2020-09-23 06:41:37 -04:00
github-actions[bot]
695d8e5462 Merge 2b49a7eb28 into dev 2020-09-23 09:00:53 +00:00
Gabor Kiss-Vamosi
2b49a7eb28 add missing style cache invalidation on state change 2020-09-23 11:00:15 +02:00
Gabor Kiss-Vamosi
0b3759201f Update CHANGELOG.md 2020-09-23 10:23:45 +02:00
Ali Rostami
23f5a11340 Table fmt (#1803)
* update lv_obj_refresh_style describtion.

* fmt version of lv_table_set_cell_value added.

* fix a bug.

* add include lv_printf.h

* fix a bug for LV_USE_BIDI in lv_table_set_cell_value_fmt

* fix a missed part for arabic_persian chars in lv_table_set_cell_value
2020-09-23 10:23:37 +02:00
github-actions[bot]
a590f91fd0 Merge 686a3b5271 into dev 2020-09-23 08:14:44 +00:00
Gabor Kiss-Vamosi
686a3b5271 Update ROADMAP.md 2020-09-23 10:14:06 +02:00
Gabor Kiss-Vamosi
27eb84667f Update CHANGELOG.md 2020-09-23 09:59:09 +02:00
jozba
1508320aa8 PXP support for NXP RTxxx MCUs (#1702)
* PXP: Added basic PXP acceleration

PXP accelerated features:
 - fill (+ opacity)
 - BLIT (+ opacity)
 - recoloring (+ opacity)
 - color keying (+ opacity)

Recoloring + color keying simultaneously not supported.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: Added abstraction for interrupt handling

Previous imlpementation used IRQ polling on PXP, which doesn't allow
real CPU offload. Therefore added set of callbacks for interrupt
handling that should be implemented by user, with possible RTOS
integration.

Default/example implementation of callbacks for bare metal and FreeRTOS
provided (lv_gpu_nxp_pxp_osa.c), enabled by
LV_USE_GPU_NXP_PXP_DEFAULT_OSA switch, accesible via pxp_default_cfg
structure.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: Optimized cache flushing

Previous implementation flushed areas of (LCD width * object height)
size. Cache flush is expensive operation and flushing line by line,
smallest possible area, boost performance by shortening time spent on
cache flushes.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: Added documentation for NXP PXP accelerator

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: added missing extern c in header files

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: Fixed ifdefs - Removed LV_USE_GPU, fixed internal config

LV_USE_GPU is not intended as a global GPU enable switch. It's used only
for gpu_blend_cb and gpu_fill_cb callbacks, which are obsolete. This
patch removes LV_USE_GPU dependency for PXP code, so it's enabled only
with LV_USE_GPU_NXP_PXP symbol.

Added missing symbols to internal conf, so automatic testd can pass
build step.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: Default OSA changed to PXP auto-initialization

Auto init feature added so if user run FreeRTOS or bare-metal, no PXP
Init code is required. Renamed symbol to be more clear.

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: Documentation moved to docs repo

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>

* PXP: Fixed alpha configuration

- Coverity issue: AS blend config used uninitialized structure. No
impact on functionality, as blend module is not used (porter-duff blends
in this case)
- Alpha config fixed - swapped alpha values produced different result
from SW render

Signed-off-by: Jozef Bastek <jozef.bastek@nxp.com>
2020-09-23 09:57:38 +02:00
github-actions[bot]
ea16ce5dd0 Merge eb056315c3 into dev 2020-09-22 13:54:10 +00:00
xennex22
eb056315c3 Changed non-debug macro expansion (#1808) 2020-09-22 09:53:36 -04:00
github-actions[bot]
64a4fff635 Merge ddf33b2fd9 into dev 2020-09-22 09:24:13 +00:00
Gabor Kiss-Vamosi
ddf33b2fd9 release.py: update docs only in the end 2020-09-22 11:23:34 +02:00
Gabor Kiss-Vamosi
e9476f4767 Merge branch 'dev' of https://github.com/lvgl/lvgl into dev 2020-09-22 10:51:09 +02:00
Gabor Kiss-Vamosi
04e2b94c06 Merge branch 'master' into dev 2020-09-22 10:46:38 +02:00
Gabor Kiss-Vamosi
f2bd86ed7c prepare to release v7.6.0 2020-09-22 10:39:15 +02:00
github-actions[bot]
39f4c15876 Merge 783dc6be9a into dev 2020-09-22 08:37:22 +00:00
Gabor Kiss-Vamosi
783dc6be9a update release script 2020-09-22 10:36:48 +02:00
github-actions[bot]
39f1b363fd Merge 18db4d83bc into dev 2020-09-22 07:27:24 +00:00
Michael Simon
18db4d83bc Highlight selected option if show_selected is false (#1810) 2020-09-22 09:26:56 +02:00
Gabor Kiss-Vamosi
458046b9b0 add v7.7 to changelog 2020-09-22 09:24:59 +02:00
github-actions[bot]
23ba19d068 Merge 4d87007c95 into dev 2020-09-22 04:21:17 +00:00
github-actions[bot]
0576300981 Merge 2415f99a20 into dev 2020-09-22 04:21:00 +00:00
Gabor Kiss-Vamosi
4d87007c95 Delete a.patch 2020-09-22 06:20:45 +02:00
Gabor Kiss-Vamosi
2415f99a20 Delete r.patch 2020-09-22 06:20:34 +02:00
github-actions[bot]
77fd862b3f Merge 1c930dc8fb into dev 2020-09-22 04:20:10 +00:00
Gabor Kiss-Vamosi
1c930dc8fb Update CHANGELOG.md 2020-09-22 06:19:45 +02:00
github-actions[bot]
259907b788 Merge 83c9145072 into dev 2020-09-22 04:18:24 +00:00
incity
83c9145072 Update CHANGELOG.md (#1809) 2020-09-22 06:17:51 +02:00
github-actions[bot]
02afe7f82c Merge 94a6dc08d8 into dev 2020-09-21 22:05:35 +00:00
embeddedt
94a6dc08d8 Check for a Cortex-M7 before calling cache functions (#1806) 2020-09-21 18:05:06 -04:00
tosriram
5ef1df9357 Extend maximum number of table cell styles from 4 to 16 (#1800) 2020-09-21 11:50:54 -04:00
github-actions[bot]
a81574543b Merge cbd3393d7c into dev 2020-09-21 09:58:26 +00:00
Gabor Kiss-Vamosi
cbd3393d7c Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-09-21 11:57:47 +02:00
Gabor Kiss-Vamosi
7def9a9bb2 add Arduino example 2020-09-21 11:57:37 +02:00
Gabor Kiss-Vamosi
1067d04c03 fix font laoder supprt LV_FONT_FMT_TXT_LARGE 2020-09-21 11:57:20 +02:00
github-actions[bot]
b09d5a846c Merge 2820cf897f into dev 2020-09-17 13:09:42 +00:00
github-actions[bot]
33dbc82a0c Merge 18a4869e62 into dev 2020-09-17 13:09:41 +00:00
Gabor Kiss-Vamosi
2820cf897f Update ROADMAP.md 2020-09-17 15:09:11 +02:00
Gabor Kiss-Vamosi
18a4869e62 Update ROADMAP.md 2020-09-17 15:08:59 +02:00
github-actions[bot]
adce9d72fc Merge d90f5d0144 into dev 2020-09-17 11:26:04 +00:00
Gabor Kiss-Vamosi
d90f5d0144 Update CHANGELOG.md 2020-09-17 13:25:33 +02:00
github-actions[bot]
9461e48998 Merge 565643e883 into dev 2020-09-16 17:55:03 +00:00
Themba Dube
565643e883 lv_gauge: fix invalidation with angle offset 2020-09-16 13:54:23 -04:00
github-actions[bot]
132e6d11b4 Merge 7756d70705 into dev 2020-09-16 13:23:52 +00:00
Gabor Kiss-Vamosi
7756d70705 Update ROADMAP.md 2020-09-16 15:23:21 +02:00
github-actions[bot]
dbbf4a406f Merge be4f7a76d4 into dev 2020-09-16 13:22:05 +00:00
embeddedt
be4f7a76d4 Fix gauge end arc segment not being rendered (#1796) 2020-09-16 15:21:33 +02:00
github-actions[bot]
537456cea5 Merge d547d8afe1 into dev 2020-09-16 09:51:23 +00:00
Gabor Kiss-Vamosi
d547d8afe1 cleant the Arduino example folders 2020-09-16 11:50:41 +02:00
github-actions[bot]
fb6e3518ea Merge 2614d1342e into dev 2020-09-15 10:30:09 +00:00
Gabor Kiss-Vamosi
2614d1342e update relaese script 2020-09-15 12:29:37 +02:00
github-actions[bot]
0287b759ac Merge 3c6741b11c into dev 2020-09-15 10:20:27 +00:00
Amir Gonnen
3c6741b11c Update build_micropython.yml (#1794)
Fetch both head and merge commits of "pull" refs. This would allow the CI script to first try checkout the merge commit (which is `github.sha` on PR) and only if that fails, default to checking out the PR head.
2020-09-15 12:19:56 +02:00
Gabor Kiss-Vamosi
9b953abbd2 Update dev version 2020-09-15 11:56:57 +02:00
Gabor Kiss-Vamosi
ac52762c20 update lv_cnf_internal.h 2020-09-15 11:44:13 +02:00
Gabor Kiss-Vamosi
9093395478 fix version number 2020-09-15 11:35:50 +02:00
Gabor Kiss-Vamosi
dc0f9253d4 Merge branch 'master' into dev 2020-09-15 11:19:33 +02:00
Gabor Kiss-Vamosi
c5bacff2fa prepare to release v7.5.0 2020-09-15 11:14:32 +02:00
github-actions[bot]
b60714a710 Merge 5a6da9a2ef into dev 2020-09-14 19:49:32 +00:00
Gabor Kiss-Vamosi
5a6da9a2ef fix selectiion of options with non-ASCII letters in dropdown list 2020-09-14 21:48:57 +02:00
github-actions[bot]
38e4e5d385 Merge d99ea10213 into dev 2020-09-14 19:17:19 +00:00
Gabor Kiss-Vamosi
d99ea10213 fix drawing images with 1 px height or width 2020-09-14 21:16:43 +02:00
Gabor Kiss-Vamosi
59791a8e2f perform style change check in lv_obj_set_state() with LV_USE_ANIMATION == 0 too 2020-09-14 20:42:03 +02:00
github-actions[bot]
f4cdea6a0d Merge 5566935a5d into dev 2020-09-14 18:28:03 +00:00
Gabor Kiss-Vamosi
5566935a5d Update CHANGELOG.md 2020-09-14 20:27:35 +02:00
github-actions[bot]
f874b61bd3 Merge b947465da1 into dev 2020-09-14 18:15:08 +00:00
Gabor Kiss-Vamosi
b947465da1 fix divisioin by zero in draw_pattern (lv_draw_rect.c) if the image or letter is not found 2020-09-14 20:14:33 +02:00
github-actions[bot]
efb0ca04a0 Merge d44b8d47d3 into dev 2020-09-14 10:46:20 +00:00
Sergei Kolotovchenkov
d44b8d47d3 Improve compatibility with ARM Compiler V6 with C++98 mode (#1788)
* Fixed infinite loop during calculation size of lv_list

* Fixed msvc 2019 compiler error C4576 when using the LVGL inside C++ code

* Refactoring to make autocomplete less noisy

* Improve compatibility with ARM Compiler V6 with C++98 mode

* Replaced non-ascii symbol

* Fixed CI build error

* Refactoring, added ability to override _LV_COLOR_HAS_MODERN_CPP
2020-09-14 12:45:53 +02:00
github-actions[bot]
eb79d9263c Merge 96e0de063a into dev 2020-09-14 10:45:00 +00:00
liebman
96e0de063a fix lv_align_y/mid_y to align y and not x (#1792) 2020-09-14 12:44:28 +02:00
github-actions[bot]
3994a5425d Merge 81ec2d1b10 into dev 2020-09-14 08:46:57 +00:00
Gabor Kiss-Vamosi
81ec2d1b10 add LV_GC_ROOT prefix to _lv_font_decompr_buf 2020-09-14 10:46:20 +02:00
Gabor Kiss-Vamosi
de1d6b2581 add 8px an 10 px built in fonts 2020-09-14 10:43:26 +02:00
github-actions[bot]
e4a1a800d1 Merge 55d05c2eb3 into dev 2020-09-12 23:15:47 +00:00
embeddedt
55d05c2eb3 Fix #1791: add NULL check for group->obj_focus 2020-09-12 19:15:21 -04:00
github-actions[bot]
160d92ba69 Merge e236cf7f73 into dev 2020-09-11 12:26:03 +00:00
Michael Simon
e236cf7f73 Do not use an anim if pwd_show_time is 0 (#1786) 2020-09-11 14:25:33 +02:00
Gabor Kiss-Vamosi
17fd875f4b merge master 2020-09-11 14:19:43 +02:00
Gabor Kiss-Vamosi
38cf5c0b3e remove code accidentally merged from dev branch 2020-09-11 14:07:56 +02:00
Gabor Kiss-Vamosi
3d0c5f7207 Merge branch 'master' into dev 2020-09-11 13:46:08 +02:00
Gabor Kiss-Vamosi
e2183750f2 fix warnings 2020-09-11 13:42:57 +02:00
Gabor Kiss-Vamosi
c55b165150 add font decompr_buf to GC roots 2020-09-11 13:39:05 +02:00
Gabor Kiss-Vamosi
50b5e3c477 add rounding to btnmatrix line height calculation
Fixes #1776
2020-09-11 13:28:34 +02:00
Amir Gonnen
1b3e1c4331 Fix submodule checkout in both push and PR (#1783) 2020-09-10 19:20:59 -04:00
Gabor Kiss-Vamosi
3f36139469 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-09-10 16:08:03 +02:00
Gabor Kiss-Vamosi
125e6e95f6 fix color bleeding on corner clipping
Fixes #1777
2020-09-10 16:07:42 +02:00
Gabor Kiss-Vamosi
1f8450b453 lv_conf_internal fixes 2020-09-10 09:16:42 +02:00
github-actions[bot]
1c96215db9 Merge c683a3612d into dev 2020-09-08 13:57:22 +00:00
梁永祥
c683a3612d group fix calling lv_obj_invalidate() when focuse is NULL (#1774) 2020-09-08 15:56:51 +02:00
github-actions[bot]
42cdab2e98 Merge 50594851f6 into dev 2020-09-08 12:58:06 +00:00
Gabor Kiss-Vamosi
50594851f6 Update ROADMAP.md 2020-09-08 14:57:38 +02:00
github-actions[bot]
6f8f293241 Merge a2685363e8 into dev 2020-09-08 12:48:24 +00:00
Gabor Kiss-Vamosi
a2685363e8 Update ROADMAP.md 2020-09-08 14:47:56 +02:00
Gabor Kiss-Vamosi
893c53476c fix define name in lv_conf_internal.h 2020-09-08 14:47:00 +02:00
Gabor Kiss-Vamosi
a8e3fc594e add Kconfig support to lv_conf_internal.h 2020-09-08 14:39:19 +02:00
github-actions[bot]
3247a10f2c Merge 8b7ffccd64 into dev 2020-09-08 11:45:50 +00:00
Gabor Kiss-Vamosi
8b7ffccd64 Update ROADMAP.md 2020-09-08 13:45:22 +02:00
Gabor Kiss-Vamosi
b87ca71824 fix warnings 2020-09-08 13:44:03 +02:00
Gabor Kiss-Vamosi
c94f9358d1 style change check fixes 2020-09-08 13:41:57 +02:00
Gabor Kiss-Vamosi
49052a7f06 Merge branch 'dev' of https://github.com/littlevgl/lvgl into dev 2020-09-08 13:39:24 +02:00
Gabor Kiss-Vamosi
966ff9d186 Merge branch 'master' into dev 2020-09-08 13:39:04 +02:00
Gabor Kiss-Vamosi
81884401d2 style change check 2020-09-08 13:20:29 +02:00
github-actions[bot]
715b40fb3f Merge b87d16fc6e into dev 2020-09-07 08:19:11 +00:00
Gabor Kiss-Vamosi
b87d16fc6e fix textra focus event sending 2020-09-07 10:18:37 +02:00
github-actions[bot]
75ca0e6e2e Merge b1c43d329d into dev 2020-09-07 08:13:53 +00:00
Gabor Kiss-Vamosi
b1c43d329d update comments in lv_port_disp_template 2020-09-07 10:13:17 +02:00
github-actions[bot]
4073e43e34 Merge 710ec7d417 into dev 2020-09-07 07:21:14 +00:00
Gabor Kiss-Vamosi
710ec7d417 Update ROADMAP.md 2020-09-07 09:20:41 +02:00
github-actions[bot]
c73004caef Merge 176eb9fd46 into dev 2020-09-06 10:50:36 +00:00
Gabor Kiss-Vamosi
176eb9fd46 Update ROADMAP.md 2020-09-06 12:50:08 +02:00
github-actions[bot]
dc500aa19e Merge a6150ea78f into dev 2020-09-05 11:46:33 +00:00
Amir Gonnen
a6150ea78f CI - Build Micropython with LVGL submodule (#1771) 2020-09-05 13:46:07 +02:00
github-actions[bot]
366c3abdff Merge 35c7197d1c into dev 2020-09-04 11:31:09 +00:00
tgillbe
35c7197d1c Fix button matrix button width (#1768) 2020-09-04 07:30:39 -04:00
github-actions[bot]
2074146b30 Merge 15e692d596 into dev 2020-09-04 11:11:22 +00:00
Gabor Kiss-Vamosi
15e692d596 fix conflicts 2020-09-04 13:10:44 +02:00
Gabor Kiss-Vamosi
1ab87eda09 update CHANGELOG 2020-09-04 13:07:29 +02:00
Gabor Kiss-Vamosi
804c3c7994 fix unexpeted DEFOCUS on lv_page
Fixes #1762
2020-09-04 13:06:19 +02:00
Michael Simon
1b638565b0 lv_textarea: send event when Enter is pressed in one-line mode (#1769) 2020-09-03 08:08:04 -04:00
github-actions[bot]
61fa7eed6b Merge 0596088544 into dev 2020-09-01 17:19:58 +00:00
Gabor Kiss-Vamosi
0596088544 remove unused variable 2020-09-01 19:19:25 +02:00
github-actions[bot]
1cc17f7888 Merge 85bd12a794 into dev 2020-09-01 17:15:14 +00:00
Gabor Kiss-Vamosi
85bd12a794 fix lv_obj_del and lv_obj_clean if the children list changed during deletion
https://forum.lvgl.io/t/lv-obj-del-and-kin-wrongly-assume-that-child-ll-wont-change-while-deleting/3091
2020-09-01 19:14:39 +02:00
Gabor Kiss-Vamosi
4613811c45 lmeter: fix uninitialized 'mirror' property 2020-09-01 19:14:34 +02:00
github-actions[bot]
9ce57485ab Merge 03c3838605 into dev 2020-09-01 14:46:11 +00:00
Gabor Kiss-Vamosi
03c3838605 arc: use value_update in lv_arc_set_value
it was overwritten on merge
2020-09-01 16:45:36 +02:00
Gabor Kiss-Vamosi
1d875eaa22 fix conflicts 2020-09-01 16:43:05 +02:00
Gabor Kiss-Vamosi
b4a8a21d26 update changelog 2020-09-01 13:01:21 +02:00
github-actions[bot]
6bfba0e02a Merge fb6e7deadf into dev 2020-09-01 10:24:43 +00:00
Gabor Kiss-Vamosi
fb6e7deadf Update CHANGELOG.md 2020-09-01 12:24:18 +02:00
github-actions[bot]
bc80633a0d Merge d941461052 into dev 2020-09-01 10:21:03 +00:00
Gabor Kiss-Vamosi
d941461052 release script fixes 2020-09-01 12:20:28 +02:00
Gabor Kiss-Vamosi
0104d436e9 Update dev version 2020-09-01 12:06:21 +02:00
Gabor Kiss-Vamosi
3d32290ee4 fix version number 2020-09-01 11:59:50 +02:00
Gabor Kiss-Vamosi
6932b6c1da Merge branch 'master' into dev 2020-09-01 11:42:11 +02:00
Gabor Kiss-Vamosi
6d7bd355ed fix version lv_conf_template.h 2020-09-01 11:39:54 +02:00
Gabor Kiss-Vamosi
343605ebac prepare to release v7.4.0 2020-09-01 11:34:10 +02:00
Gabor Kiss-Vamosi
beec11565c update changelog 2020-09-01 11:29:08 +02:00
Gabor Kiss-Vamosi
beb3d40d24 fix conflicts 2020-09-01 10:47:39 +02:00
Gabor Kiss-Vamosi
26b36dfea1 release.py minor update to run in debugger 2020-09-01 10:45:27 +02:00
Gabor Kiss-Vamosi
289fd95c3d release.py: remove debug statements 2020-09-01 10:42:58 +02:00
Gabor Kiss-Vamosi
2f79133685 release.py: remove debug statements 2020-09-01 10:42:32 +02:00
Gabor Kiss-Vamosi
e42128e937 minor release related fixes 2020-09-01 10:18:35 +02:00
Gabor Kiss-Vamosi
de38ee4a21 fix typo 2020-09-01 09:40:16 +02:00
Gabor Kiss-Vamosi
612308f281 lv_img: check blend modes in cover check 2020-09-01 09:38:25 +02:00
Gabor Kiss-Vamosi
f545a24bbd gauge: allow not recoling the image needle 2020-09-01 09:38:25 +02:00
Gabor Kiss-Vamosi
1102cfdf82 lv_arc_set_value: be sure the 'fixed' angle is corerct 2020-09-01 09:38:25 +02:00
Gabor Kiss-Vamosi
775f1a59df lv_refr: take opa_scale into account in cover check 2020-09-01 09:38:25 +02:00
github-actions[bot]
1906a623fb Merge 35ae1a28d4 into dev 2020-09-01 07:27:19 +00:00
Gabor Kiss-Vamosi
35ae1a28d4 fixes in release.py 2020-09-01 09:26:41 +02:00
Gabor Kiss-Vamosi
842eb11448 release.py: add projec update 2020-08-31 19:48:59 +02:00
github-actions[bot]
ca9c36e081 Merge 5976973111 into dev 2020-08-31 12:18:35 +00:00
Alex-I-B
5976973111 Proposed fix for roller widget crash when LV_USE_GROUP=0 (#1761)
Removed LV_USE_GROUP guard macro for signals != LV_SIGNAL_CONTROL in signal functions of roller and spinbox to allow signal propagating to ancestors
2020-08-31 14:18:07 +02:00
github-actions[bot]
b7baa01bc1 Merge 91cfb70856 into dev 2020-08-31 12:10:04 +00:00
Gabor Kiss-Vamosi
91cfb70856 fix ci 2020-08-31 14:04:23 +02:00
github-actions[bot]
5ee4d14788 Merge 09ce595239 into dev 2020-08-31 12:03:15 +00:00
Gabor Kiss-Vamosi
09ce595239 fix ci 2020-08-31 14:02:43 +02:00
github-actions[bot]
5d02b27b1f Merge d4c3567f84 into dev 2020-08-31 12:01:26 +00:00
Gabor Kiss-Vamosi
d4c3567f84 install libpng for test 2020-08-31 14:00:49 +02:00
Gabor Kiss-Vamosi
39bf116e07 fix screenshot testing 2020-08-31 13:58:51 +02:00
Gabor Kiss-Vamosi
10eeeb2490 image cover check: minor reordering for better performance 2020-08-31 13:58:51 +02:00
github-actions[bot]
eb7f0d8eeb Merge 694d9eff19 into dev 2020-08-31 09:06:49 +00:00
Gabor Kiss-Vamosi
694d9eff19 Update ROADMAP.md 2020-08-31 11:06:04 +02:00
tgillbe
d4e40fce63 Fix position of 0 in special keyboard (#1758) 2020-08-31 10:15:16 +02:00
github-actions[bot]
6e000c97f8 Merge 9b9cd36dc9 into dev 2020-08-28 14:00:44 +00:00
Gabor Kiss-Vamosi
9b9cd36dc9 fix roller width if selected text is larger than the normal 2020-08-28 16:00:04 +02:00
rabbitsaviola
8df8700bed Add async gpu wait interface (#1736)
Add async gpu wait interface
Closes #1708
2020-08-28 15:31:30 +02:00
Gabor Kiss-Vamosi
c17f2f7e84 fix conflicts 2020-08-28 10:25:34 +02:00
Gabor Kiss-Vamosi
c3953f478f fix conflicts 2020-08-28 10:20:34 +02:00
Gabor Kiss-Vamosi
adf65b6761 Fix _lv_txt_ins with zero length insert text
Closes #1754
2020-08-28 09:53:56 +02:00
Adam Martini
cb5faa64ac Add update_value private function to lv_arc to prevent set_value return checks in the event of… (#1748)
Add update_value to lv_arc to update the value on range change.
2020-08-27 09:51:11 +02:00
Gabor Kiss-Vamosi
832000ad34 Merge pull request #1743 from lvgl/dcache_cb
lv_disp: add `clean_dcache_cb` callback
2020-08-27 09:48:56 +02:00
Gabor Kiss-Vamosi
037d3d9090 run code formatter 2020-08-26 15:21:24 +02:00
github-actions[bot]
6772ceb7e2 Merge e7364f321d into dev 2020-08-25 13:22:04 +00:00
Gabor Kiss-Vamosi
e7364f321d update CHANGELOG 2020-08-25 15:21:25 +02:00
github-actions[bot]
d9afdb5316 Merge 14a2a60bf9 into dev 2020-08-25 13:19:24 +00:00
Gabor Kiss-Vamosi
14a2a60bf9 Fix btnmatrix to not send event when CLICK_TRIG = true and the cursor slid from a pressed button
Fixes: https://forum.lvgl.io/t/v7-3-register-button-in-button-matrix-only-after-touch-release-not-button-release/3117
2020-08-25 15:18:45 +02:00
Themba Dube
350269c3d4 Update CHANGELOG.md 2020-08-25 07:38:08 -04:00
Gabor Kiss-Vamosi
52c61b115f minor image zoom fixes 2020-08-25 11:54:12 +02:00
Themba Dube
7ca806ddff Use CMSIS cache functions if custom callback is not registered 2020-08-24 10:51:09 -04:00
github-actions[bot]
c8be0df768 Merge 78f2451b2a into dev 2020-08-24 14:01:31 +00:00
Gabor Kiss-Vamosi
78f2451b2a imporve image zoom precision 2020-08-24 16:00:53 +02:00
Themba Dube
36433c2144 Rename function to lv_disp_clean_dcache and use currently refreshing display 2020-08-24 07:36:44 -04:00
github-actions[bot]
2224ce95cb Merge 54b3ba39fb into dev 2020-08-24 08:53:19 +00:00
Gabor Kiss-Vamosi
54b3ba39fb Fix deleting tabview with LEFT/RIGHT tab position 2020-08-24 10:52:48 +02:00
github-actions[bot]
9a2d2b5392 Merge ede6085429 into dev 2020-08-24 08:14:36 +00:00
Gabor Kiss-Vamosi
ede6085429 img: imporve zoom precision 2020-08-24 10:14:01 +02:00
github-actions[bot]
3ea4418727 Merge 961f295b94 into dev 2020-08-24 07:51:36 +00:00
Gabor Kiss-Vamosi
961f295b94 img: fix zooming and rotateing mosaic images 2020-08-24 09:50:52 +02:00
github-actions[bot]
12b1f1f590 Merge 848c468b06 into dev 2020-08-24 04:40:41 +00:00
Gabor Kiss-Vamosi
848c468b06 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-08-24 06:40:08 +02:00
Gabor Kiss-Vamosi
ba94b9cc94 fix croping of last column/row if an image is zoomed
Fixes #1742
2020-08-24 06:39:57 +02:00
Themba Dube
a1f47e9051 Add lv_arc_set_adjustable and lv_arc_get_adjustable 2020-08-23 07:46:00 -04:00
Themba Dube
ff357db938 Merge branch 'dev' into dcache_cb 2020-08-23 07:43:49 -04:00
github-actions[bot]
2f26d0a511 Merge 851493a188 into dev 2020-08-23 11:20:37 +00:00
Ali Rostami
851493a188 Update lv_obj_refresh_style description (#1746) 2020-08-23 07:20:07 -04:00
github-actions[bot]
5f35e46be8 Merge 7e4769e319 into dev 2020-08-23 06:50:03 +00:00
Gabor Kiss-Vamosi
7e4769e319 fix using LV_SCROLLBAR_UNHIDE after LV_SCROLLBAR_ON
Fixes https://forum.lvgl.io/t/lv-sb-mode-unhide-has-an-unsuitable-value/3081
2020-08-23 08:49:27 +02:00
github-actions[bot]
75a0a5e6d6 Merge c0f6ff4d42 into dev 2020-08-23 05:45:08 +00:00
Gabor Kiss-Vamosi
c0f6ff4d42 fix color bleeding on border drawing
Fixes https://forum.lvgl.io/t/border-dont-cover-calendar/3029/4
2020-08-23 07:44:34 +02:00
github-actions[bot]
fef3a069d6 Merge 35e09885fb into dev 2020-08-22 21:38:06 +00:00
Themba Dube
35e09885fb lv_arc: use rotation when calculating drag angle
fixes #1745
2020-08-22 17:37:29 -04:00
Themba Dube
24c2921c21 lv_disp: add clean_dcache_cb callback 2020-08-21 09:53:13 -04:00
github-actions[bot]
001fabbb18 Merge f4b4df8a17 into dev 2020-08-20 21:53:52 +00:00
Amir Gonnen
f4b4df8a17 lv_arc_set_reverse: remove prototype with no implementation (#1741)
Required for Micropython
2020-08-20 17:53:23 -04:00
github-actions[bot]
41d093ea76 Merge 953753263c into dev 2020-08-20 05:07:01 +00:00
Gabor Kiss-Vamosi
953753263c fix warning 2020-08-20 07:06:23 +02:00
github-actions[bot]
8990544b42 Merge 809497f707 into dev 2020-08-19 21:31:30 +00:00
Gabor Kiss-Vamosi
809497f707 release.py: fix blog post name 2020-08-19 23:30:57 +02:00
github-actions[bot]
148e6d12fd Merge 45cc51d48c into dev 2020-08-19 21:29:09 +00:00
Gabor Kiss-Vamosi
45cc51d48c release.py: publish blog post 2020-08-19 23:28:34 +02:00
github-actions[bot]
187f4be2ee Merge 677ce48bea into dev 2020-08-18 15:03:21 +00:00
Gabor Kiss-Vamosi
677ce48bea tabview: fix press state style update
fixes: #1728
2020-08-18 17:02:42 +02:00
github-actions[bot]
6023bb4372 Merge d0cc9283e7 into dev 2020-08-18 09:58:04 +00:00
Gabor Kiss-Vamosi
d0cc9283e7 merge dev 2020-08-18 11:57:26 +02:00
Gabor Kiss-Vamosi
71e5618380 upadte release.py 2020-08-18 11:32:43 +02:00
Gabor Kiss-Vamosi
bcb6d02acf fix version 2020-08-18 10:54:43 +02:00
Gabor Kiss-Vamosi
f116073baf fix version 2020-08-18 10:54:10 +02:00
Gabor Kiss-Vamosi
6e884615d8 fix version 2020-08-18 10:53:37 +02:00
Gabor Kiss-Vamosi
d665294669 fix release script 2020-08-18 10:53:08 +02:00
Gabor Kiss-Vamosi
cc43762030 Update dev version 2020-08-18 10:45:41 +02:00
Gabor Kiss-Vamosi
9c7c395cc7 Merge branch 'dev' of https://github.com/lvgl/lvgl into dev 2020-08-18 10:45:36 +02:00
Gabor Kiss-Vamosi
9680d5bbb2 Update dev version 2020-08-18 10:43:47 +02:00
Gabor Kiss-Vamosi
96534d58e5 Merge branch 'master' into dev 2020-08-18 10:40:39 +02:00
Gabor Kiss-Vamosi
1088492449 prepare to release v7.3.1 2020-08-18 10:28:35 +02:00
github-actions[bot]
9b154d12c1 Merge e9ee46f302 into dev 2020-08-18 08:26:00 +00:00
Gabor Kiss-Vamosi
e9ee46f302 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-08-18 10:25:28 +02:00
Gabor Kiss-Vamosi
c0714d9c6b fix release script 2020-08-18 10:25:19 +02:00
Gabor Kiss-Vamosi
e728ba1928 remove debug statements from release.py 2020-08-18 10:22:02 +02:00
github-actions[bot]
b94ca2bf80 Merge 74aae39e4e into dev 2020-08-18 08:13:00 +00:00
Gabor Kiss-Vamosi
74aae39e4e Update CHANGELOG.md 2020-08-18 10:12:32 +02:00
github-actions[bot]
b9bd436b89 Merge 6eab2adfc1 into dev 2020-08-18 08:12:25 +00:00
Gabor Kiss-Vamosi
6eab2adfc1 Merge pull request #1732 from ali-rostami/gray_day_calendar
init disabled days to gray color in calendar
2020-08-18 10:11:56 +02:00
Gabor Kiss-Vamosi
209e1c4d38 fix conflicts 2020-08-18 08:50:31 +02:00
Gabor Kiss-Vamosi
056da0f922 fix color picker invalidation in rectangle mode 2020-08-18 08:47:08 +02:00
Gabor Kiss-Vamosi
e1a84f2cfe Merge pull request #1734 from daiyinger/dev
Reduced animation callback interface calls
2020-08-18 06:41:24 +02:00
Gabor Kiss-Vamosi
b77bd763c0 merge master 2020-08-18 06:36:42 +02:00
xiaobo
437e6d35eb Reduced animation callback interface calls 2020-08-18 11:25:40 +08:00
Gabor Kiss-Vamosi
3b06d4ab84 rewrite the release script 2020-08-17 23:51:23 +02:00
Ali Rostami
3a5ad7712e init disabled days to gray color in calendar
In ver6 we saw that disabled days in `calendar` were gray, which was a good thing and seemed was missed in new versions.
2020-08-17 16:10:44 +04:30
Gabor Kiss-Vamosi
28eb766904 comment updates 2020-08-17 09:20:35 +02:00
Gabor Kiss-Vamosi
4af6c62146 Merge pull request #1726 from upbeat27/lv_btnmatrix_set_one_check_fix
Fix `lv_btnmatrix_set_one_check` not forcing one button to be checked
2020-08-17 09:11:12 +02:00
Josh McAtee
96eba8e0ff Fix lv_btnmatrix_set_one_check not forcing one button to be checked 2020-08-14 09:06:44 -07:00
github-actions[bot]
95ccd877a8 Merge 1815ff4b99 into dev 2020-08-14 04:58:44 +00:00
Gabor Kiss-Vamosi
1815ff4b99 Limit extra button click area of button matrix's buttons. Fixes #1712 2020-08-14 06:58:00 +02:00
Gabor Kiss-Vamosi
c8cc9db7f0 table: fix typo 2020-08-14 06:58:00 +02:00
Gabor Kiss-Vamosi
b8ebca8d6c update CHANGELOG 2020-08-14 00:03:14 +02:00
Gabor Kiss-Vamosi
245a47a848 Merge branch 'dev' of https://github.com/littlevgl/lvgl into dev 2020-08-13 23:56:40 +02:00
Gabor Kiss-Vamosi
c46f12b97a fix conflicts 2020-08-13 23:55:48 +02:00
github-actions[bot]
db2ddd6033 Merge de1ccc269c into dev 2020-08-13 21:28:29 +00:00
Gabor Kiss-Vamosi
de1ccc269c Update README.md 2020-08-13 23:28:03 +02:00
Gabor Kiss-Vamosi
cd9f53c4b4 Merge pull request #1717 from fabiowguerra/feat/dynamic-font-loading
Feat/dynamic font loading
2020-08-13 22:46:23 +02:00
github-actions[bot]
25afed1d58 Merge f3e91634f8 into dev 2020-08-13 19:09:24 +00:00
Gabor Kiss-Vamosi
f3e91634f8 fix crash if 'lv_table_set_col_cnt' is called before 'lv_table_set_row_cnt' for the first time
Fixes #1716
2020-08-13 21:08:50 +02:00
Gabor Kiss-Vamosi
6980277aca Update CHANGELOG 2020-08-13 20:09:43 +02:00
Gabor Kiss-Vamosi
f59a206ab0 send gesture with dragging too.
User can test dragging manually with  lv_indev_is_dragging
2020-08-13 20:07:18 +02:00
Gabor Kiss-Vamosi
4eb3283342 Merge pull request #1592 from acumartini/feature/1568_lv_rotary
Feature/1568 lv rotary
2020-08-13 20:05:13 +02:00
Gabor Kiss-Vamosi
c2b5979e91 arc: fix event sending 2020-08-13 12:00:57 +02:00
Gabor Kiss-Vamosi
cfee7e8b8a arc knob invalidation fix 2020-08-13 11:03:04 +02:00
Fabio Guerra
6fcca7dd44 Better comments, explaining memory allocation strategy when parsing fonts. 2020-08-12 11:02:43 -03:00
Fabio Guerra
f1edd3a1ea Removing #ifdef for LVGL version 6 on binary font parser. 2020-08-12 11:02:43 -03:00
Gabor Kiss-Vamosi
d321e0e4fc fix tests 2020-08-12 14:29:50 +02:00
Gabor Kiss-Vamosi
8d89bf9ed0 fix CHANGELOG 2020-08-12 14:23:53 +02:00
Gabor Kiss-Vamosi
f8b991731f Merge branch 'dev' into feat/dynamic-font-loading 2020-08-12 14:20:47 +02:00
github-actions[bot]
77b57ba035 Merge 08684b31ee into dev 2020-08-12 04:58:43 +00:00
Ali Rostami
08684b31ee Patch 1 (#1714)
update comments
2020-08-12 06:58:15 +02:00
Gabor Kiss-Vamosi
977f6d210d Merge pull request #1715 from lvgl/checkbox_anim
Fade in checkmark for material theme
2020-08-12 06:22:21 +02:00
Fabio Guerra
e399b7a085 Code format with astyle. 2020-08-12 00:45:06 -03:00
Fabio Guerra
b3634790cd Implementing missing formats for font loading. 2020-08-12 00:11:02 -03:00
Themba Dube
3dad4c724e Fade in checkmark for material theme 2020-08-11 10:49:57 -04:00
Gabor Kiss-Vamosi
d95cf0a3d6 arc: rework knob to indicate the current positoin 2020-08-11 15:03:57 +02:00
Gabor Kiss-Vamosi
14a4c190c9 merge rotary to arc 2020-08-11 14:17:05 +02:00
Gabor Kiss-Vamosi
461619411d Merge branch 'dev' into acumartini-feature/1568_lv_rotary 2020-08-11 12:31:32 +02:00
Gabor Kiss-Vamosi
c36c8e11f7 Merge branch 'master' into acumartini-feature/1568_lv_rotary 2020-08-11 12:31:24 +02:00
github-actions[bot]
11a9dedbaa Merge 2068ab3211 into dev 2020-08-11 08:38:47 +00:00
Gabor Kiss-Vamosi
2068ab3211 bar, switch, slider: fix drawing background's 'value_str' twice 2020-08-11 10:38:16 +02:00
github-actions[bot]
d94bbd4f91 Merge 28807b6a77 into dev 2020-08-11 08:34:41 +00:00
Gabor Kiss-Vamosi
28807b6a77 lv_img_design: fix cover check if angle != 0 2020-08-11 10:34:04 +02:00
github-actions[bot]
d71f664fbb Merge f066f0b8d8 into dev 2020-08-11 08:10:17 +00:00
Gabor Kiss-Vamosi
f066f0b8d8 fix overflow in large image transformations 2020-08-11 10:09:41 +02:00
github-actions[bot]
e30055674d Merge d2e1094159 into dev 2020-08-10 18:14:00 +00:00
Sergei Kolotovchenkov
d2e1094159 Fix Visual Studio 2019 compile errors (#1711)
Fixed msvc 2019 compiler error C4576 when using the LVGL inside C++ code
2020-08-10 14:13:26 -04:00
github-actions[bot]
73a918ce13 Merge 6fd7bcf172 into dev 2020-08-10 09:37:17 +00:00
Gabor Kiss-Vamosi
6fd7bcf172 allow adding extra label to list buttons 2020-08-10 11:36:43 +02:00
github-actions[bot]
b88ee8e430 Merge ebaeb1bf7c into dev 2020-08-10 04:18:01 +00:00
Gabor Kiss-Vamosi
ebaeb1bf7c Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-08-10 06:17:17 +02:00
Gabor Kiss-Vamosi
bd8ac58b6b add missing background drawing and radius handling to image button 2020-08-10 06:17:03 +02:00
github-actions[bot]
fcca7fff60 Merge b6c18ed171 into dev 2020-08-09 10:41:53 +00:00
Gabor Kiss-Vamosi
b6c18ed171 Update ROADMAP.md 2020-08-09 12:41:25 +02:00
github-actions[bot]
872030fb77 Merge 90be42c493 into dev 2020-08-08 14:22:34 +00:00
Gabor Kiss-Vamosi
90be42c493 Fix setting local style property multiple times
Realted to https://forum.lvgl.io/t/how-to-change-button-object-color-on-demand/2922/2
2020-08-08 16:22:00 +02:00
Fabio Guerra
c4e7254aed Some changes to support binary fonts without the kernel table. 2020-08-07 10:56:37 -03:00
github-actions[bot]
1b40c2a495 Merge 81caeaa725 into dev 2020-08-07 11:32:00 +00:00
embeddedt
81caeaa725 Fix lv_obj_set_height_fit 2020-08-07 07:31:31 -04:00
github-actions[bot]
1ca9dc6c4e Merge 8af9e96299 into dev 2020-08-06 12:57:04 +00:00
Gabor Kiss-Vamosi
8af9e96299 Merge pull request #1706 from satirebird/code-fixes
Make several descriptor parameters const
2020-08-06 14:56:36 +02:00
github-actions[bot]
70ac65793f Merge 5d981f56ad into dev 2020-08-06 12:55:23 +00:00
Gabor Kiss-Vamosi
5d981f56ad remove unused variable 2020-08-06 14:54:51 +02:00
github-actions[bot]
e16eb8e830 Merge cda21694c4 into dev 2020-08-06 12:51:07 +00:00
Gabor Kiss-Vamosi
58d86cff71 Merge branch 'master' into code-fixes 2020-08-06 14:51:05 +02:00
Gabor Kiss-Vamosi
cda21694c4 Fix text decor (udnerline strikethrough) with older versions of font converter 2020-08-06 14:50:30 +02:00
Gabor Kiss-Vamosi
7af20516a5 add linemeter's mirror feature again
the drawing part was somehow removed
2020-08-06 14:50:30 +02:00
github-actions[bot]
2cab9d12d6 Merge 21985e9a14 into dev 2020-08-06 09:40:58 +00:00
Gabor Kiss-Vamosi
21985e9a14 Update FUNDING.yml 2020-08-06 11:40:30 +02:00
Sven Krauß
7827d948d8 Fix evaluation of return value 2020-08-05 11:18:56 +02:00
Sven Krauß
3b7fa645fb Merge tag 'v7.3.0' into code-fixes
Conflicts:
	src/lv_draw/lv_draw_rect.c
2020-08-05 11:14:27 +02:00
Sven Krauß
28f74bd91d Make several descriptor parameters const, update parameter docs.
Making the descriptor const allows to use static initialized variables.
2020-08-05 10:53:03 +02:00
github-actions[bot]
0e1fda5c37 Merge 1f0a4918f2 into dev 2020-08-05 08:04:45 +00:00
Gabor Kiss-Vamosi
1f0a4918f2 Update ROADMAP.md 2020-08-05 10:04:16 +02:00
Fabio Guerra
004adac31d Adding changes to changelog and replacing line style comments with block comments. 2020-08-05 01:29:54 -03:00
Fabio Guerra
f58d97d990 Adding support to dynamic font loading. 2020-08-04 18:59:49 -03:00
github-actions[bot]
4b1a0d590f Merge bd4db19aee into dev 2020-08-04 16:53:12 +00:00
Gabor Kiss-Vamosi
bd4db19aee rename lv_chart_clear_serie to lv_chart_clear_series and lv_obj_align_origo to lv_obj_align_mid 2020-08-04 18:52:37 +02:00
github-actions[bot]
5c3640868c Merge b4955f0b6e into dev 2020-08-04 16:44:11 +00:00
Gabor Kiss-Vamosi
b4955f0b6e Fix drawing value string twice
Fixes #1704
2020-08-04 18:43:34 +02:00
github-actions[bot]
cdb99b3588 Merge acb46aaed1 into dev 2020-08-04 15:37:37 +00:00
Gabor Kiss-Vamosi
acb46aaed1 Update README.md 2020-08-04 17:37:07 +02:00
github-actions[bot]
525c3bd829 Merge 7caa2bf9ad into dev 2020-08-04 15:36:56 +00:00
Gabor Kiss-Vamosi
7caa2bf9ad Update README.md 2020-08-04 17:36:27 +02:00
Gabor Kiss-Vamosi
0a9cc2a3b5 update version number 2020-08-04 17:35:17 +02:00
Gabor Kiss-Vamosi
62f4ced294 update version number 2020-08-04 17:34:44 +02:00
github-actions[bot]
2a6815c451 Merge a0f338eb6f into dev 2020-08-04 15:34:16 +00:00
Gabor Kiss-Vamosi
a0f338eb6f update changlelog 2020-08-04 17:33:39 +02:00
Gabor Kiss-Vamosi
0f0d57d855 Merge branch 'dev' of https://github.com/littlevgl/lvgl into dev 2020-08-04 17:30:46 +02:00
github-actions[bot]
5d42f92c86 Merge 5810baa021 into dev 2020-08-04 15:12:23 +00:00
github-actions[bot]
42a7fda05d Merge f36f8fe253 into dev 2020-08-04 15:11:53 +00:00
Gabor Kiss-Vamosi
5810baa021 Update library.properties 2020-08-04 17:11:51 +02:00
Gabor Kiss-Vamosi
f36f8fe253 Update library.properties 2020-08-04 17:11:19 +02:00
github-actions[bot]
d56708b45e Merge d0b408d679 into dev 2020-08-04 15:09:01 +00:00
Gabor Kiss-Vamosi
d0b408d679 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-08-04 17:08:21 +02:00
Gabor Kiss-Vamosi
7e3739576f add back library.proeprties 2020-08-04 17:07:54 +02:00
github-actions[bot]
565633828c Merge 061c6325b7 into dev 2020-08-04 12:59:36 +00:00
Gabor Kiss-Vamosi
061c6325b7 Merge pull request #1697 from Droup67/focus_padding
page: Use padding when focus an child item
2020-08-04 14:59:07 +02:00
github-actions[bot]
66c184a84d Merge e3a07ed58c into dev 2020-08-04 09:24:50 +00:00
Gabor Kiss-Vamosi
e3a07ed58c update release.py 2020-08-04 11:24:13 +02:00
github-actions[bot]
e1963a4a3d Merge eb76519d25 into dev 2020-08-04 08:08:03 +00:00
github-actions[bot]
05f6b67b5f Merge 48f8d83bdc into dev 2020-08-04 08:07:32 +00:00
Gabor Kiss-Vamosi
eb76519d25 Release v7.3.0 2020-08-04 10:07:30 +02:00
Gabor Kiss-Vamosi
7b0a0ef4a7 Run code formatter 2020-08-04 10:07:29 +02:00
Gabor Kiss-Vamosi
48f8d83bdc update release.py 2020-08-04 10:06:57 +02:00
github-actions[bot]
a728817fb5 Merge ad422250db into dev 2020-08-04 07:58:01 +00:00
Gabor Kiss-Vamosi
ad422250db update release.py 2020-08-04 09:57:29 +02:00
github-actions[bot]
243c448df9 Merge ec7397e4a0 into dev 2020-08-04 07:50:33 +00:00
Gabor Kiss-Vamosi
ec7397e4a0 update release.py 2020-08-04 09:49:57 +02:00
github-actions[bot]
245de140f4 Merge 0ec409f83e into dev 2020-08-04 07:28:49 +00:00
Gabor Kiss-Vamosi
0ec409f83e fix version nnumber 2020-08-04 09:28:16 +02:00
github-actions[bot]
cc505a3cb2 Merge b58f9c6021 into dev 2020-08-04 07:20:47 +00:00
Gabor Kiss-Vamosi
b58f9c6021 Add LV_USE_OUTLINE/PATTERN/VALUE_STR and LV_MEMCPY_MEMSET_STD 2020-08-04 09:19:59 +02:00
github-actions[bot]
4560a72c32 Merge 85d375b128 into dev 2020-08-03 11:40:16 +00:00
Gabor Kiss-Vamosi
85d375b128 Update ROADMAP.md 2020-08-03 13:39:51 +02:00
github-actions[bot]
99f49f9097 Merge a0e6f7f022 into dev 2020-08-03 11:37:40 +00:00
Gabor Kiss-Vamosi
a0e6f7f022 Update ROADMAP.md 2020-08-03 13:37:11 +02:00
Droup
1c3bbc9f6c Fix focus move
Signed-off-by: Droup <droup@pm.me>
2020-08-03 10:38:18 +02:00
Gabor Kiss-Vamosi
07cb113c0a add radius, border_side and boder_post to style cache 2020-08-03 09:37:01 +02:00
Gabor Kiss-Vamosi
61a5cb44b8 optimze style asking order in lv_obj_init_draw_xxx_dsc function 2020-08-03 07:17:21 +02:00
Gabor Kiss-Vamosi
6ccfd0101a style cache: add missing LV_STYLE_FONT_TEXT to cachable proeprties 2020-08-03 07:03:54 +02:00
Gabor Kiss-Vamosi
1b29814e1e improve style caching 2020-08-03 06:43:25 +02:00
Gabor Kiss-Vamosi
ae0e855d91 style cache fixes 2020-08-02 20:49:21 +02:00
github-actions[bot]
0aa4591021 Merge c85295b5ea into dev 2020-08-02 10:05:44 +00:00
Gabor Kiss-Vamosi
c85295b5ea update CHANGELOG 2020-08-02 12:05:00 +02:00
Gabor Kiss-Vamosi
28213adfa6 -fix using freed memory in _lv_style_list_remove_style
Fixes: #1694
2020-08-02 12:05:00 +02:00
Gabor Kiss-Vamosi
11cab40103 import style caching 2020-08-02 11:36:27 +02:00
Gabor Kiss-Vamosi
41fd83e1d3 implement caching on style lists 2020-08-02 10:14:29 +02:00
github-actions[bot]
25b0b994a0 Merge 2b60f4496f into dev 2020-08-01 17:36:31 +00:00
DefinPlusPlus
2b60f4496f Fixed infinite loop during calculation size of lv_list (#1700) 2020-08-01 13:36:07 -04:00
github-actions[bot]
1d714bfed7 Merge b7d7bf7dd5 into dev 2020-07-31 20:14:15 +00:00
Gabor Kiss-Vamosi
b7d7bf7dd5 Update README.md 2020-07-31 22:13:46 +02:00
Droup
373af97472 page: Use padding when focus an child item
Signed-off-by: Droup <droup@pm.me>
2020-07-31 14:32:17 +02:00
github-actions[bot]
3e9495a074 Merge 1072b71ea0 into dev 2020-07-30 09:12:45 +00:00
Gabor Kiss-Vamosi
1072b71ea0 gauge: fix image needle drawing 2020-07-30 11:11:54 +02:00
Sven Krauß
b0e3f11da1 Make lv_draw_line_dsc_t parameters constant 2020-07-28 17:08:21 +02:00
github-actions[bot]
cb0d6f40c9 Merge 0f69469eee into dev 2020-07-28 10:19:14 +00:00
Seth Itow
0f69469eee README.md: Update link to Micropython documentation (#1693) 2020-07-28 06:18:42 -04:00
github-actions[bot]
f2a59c23f1 Merge cac6f92964 into dev 2020-07-27 18:19:43 +00:00
Gabor Kiss-Vamosi
cac6f92964 fix warning 2020-07-27 20:19:02 +02:00
github-actions[bot]
0d2784a13e Merge 80a4c6ff14 into dev 2020-07-27 15:58:55 +00:00
Gabor Kiss-Vamosi
80a4c6ff14 update CHANGELOG 2020-07-27 17:58:10 +02:00
Gabor Kiss-Vamosi
013ae48221 Merge branch 'size_reduction' 2020-07-27 17:47:25 +02:00
github-actions[bot]
daec3626bc Merge fd695c9ad3 into dev 2020-07-27 15:47:05 +00:00
Gabor Kiss-Vamosi
fd695c9ad3 textarea: fix typo in lv_textarea_set_sscrollbar_mode
Fixes #1691
2020-07-27 17:46:10 +02:00
github-actions[bot]
88ce04cea3 Merge 06d7a6d006 into dev 2020-07-27 14:01:19 +00:00
Gabor Kiss-Vamosi
06d7a6d006 btnmatrix: hadle combined states of buttons (e.g. chacked + disabled) 2020-07-27 15:57:28 +02:00
github-actions[bot]
529fee1e20 Merge ca9dfb7063 into dev 2020-07-27 12:30:52 +00:00
Gabor Kiss-Vamosi
ca9dfb7063 Update FUNDING.yml 2020-07-27 14:30:22 +02:00
github-actions[bot]
83ca45e0c8 Merge fd411e200f into dev 2020-07-27 12:30:13 +00:00
Gabor Kiss-Vamosi
fd411e200f Update and rename _FUNDING.yml to FUNDING.yml 2020-07-27 14:29:41 +02:00
github-actions[bot]
3592a2ac17 Merge 8cc951202c into dev 2020-07-27 12:18:37 +00:00
Gabor Kiss-Vamosi
8cc951202c Rename FUNDING.yml to _FUNDING.yml 2020-07-27 14:17:58 +02:00
github-actions[bot]
ac89d1245b Merge 2172ec93a2 into dev 2020-07-27 12:16:37 +00:00
Gabor Kiss-Vamosi
2172ec93a2 material theme minor fix
Fixes #1689
2020-07-27 14:16:06 +02:00
Gabor Kiss-Vamosi
c173f28a3f add underline properties to the fonts 2020-07-27 12:47:07 +02:00
github-actions[bot]
a5a7329d41 Merge ed10c1da67 into dev 2020-07-26 19:15:06 +00:00
Gabor Kiss-Vamosi
ed10c1da67 Add LV_THEME_MATERIAL_FLAG_NO_TRANSITION and LV_THEME_MATERIAL_FLAG_NO_FOCUS flags 2020-07-26 21:14:10 +02:00
github-actions[bot]
bb730735f2 Merge 834b498aec into dev 2020-07-24 19:51:40 +00:00
Gabor Kiss-Vamosi
834b498aec Update ROADMAP.md 2020-07-24 21:51:08 +02:00
github-actions[bot]
2fb690b3b9 Merge 28a668ce09 into dev 2020-07-24 19:50:15 +00:00
Gabor Kiss-Vamosi
28a668ce09 Create ROADMAP.md 2020-07-24 21:49:44 +02:00
github-actions[bot]
5a2cf28c54 Merge ed480e821c into dev 2020-07-24 14:32:06 +00:00
Gabor Kiss-Vamosi
ed480e821c Merge pull request #1684 from lvgl/pete-pjb-cpicker
Tidy up the edges of the colour picker widget.
2020-07-24 16:31:35 +02:00
Gabor Kiss-Vamosi
f11f7c5223 Merge branch 'master' into pete-pjb-cpicker 2020-07-24 16:30:39 +02:00
github-actions[bot]
3b4bff79c2 Merge f30dc5d186 into dev 2020-07-24 14:16:54 +00:00
Gabor Kiss-Vamosi
f30dc5d186 remove duplicated lines from lv_tabview_add_tab 2020-07-24 16:16:18 +02:00
pete-pjb
da5c9dd424 Add define and comment to explain magic number used in previous fix. 2020-07-24 13:50:35 +01:00
pete-pjb
89adfbc816 Fix ragged edge of Colour Picker. 2020-07-24 10:15:29 +01:00
pete-pjb
d125472e81 Update change log. 2020-07-23 14:24:28 +01:00
pete-pjb
28495b9eb9 Tidy up the edges of the colour picker widget. 2020-07-23 14:15:34 +01:00
github-actions[bot]
4fefa2ee28 Merge 00e93a5d30 into dev 2020-07-22 16:24:25 +00:00
Gabor Kiss-Vamosi
00e93a5d30 Update CHANGELOG.md 2020-07-22 18:23:56 +02:00
github-actions[bot]
95ef03baa8 Merge dae3ebdb66 into dev 2020-07-22 16:23:36 +00:00
Gabor Kiss-Vamosi
dae3ebdb66 Merge pull request #1679 from lvgl/embeddedt-patch-1
textarea: don't call LV_EVENT_INSERT too far before insertion
2020-07-22 18:22:57 +02:00
Gabor Kiss-Vamosi
fb3e6ec1f4 textarea: add insert handler functions 2020-07-22 16:28:03 +02:00
github-actions[bot]
bb4e4a9e53 Merge 4df27fc5b2 into dev 2020-07-22 14:26:22 +00:00
Gabor Kiss-Vamosi
4df27fc5b2 Update CHANGELOG.md 2020-07-22 16:25:42 +02:00
github-actions[bot]
f7870310dc Merge 3c3fe46447 into dev 2020-07-22 14:19:34 +00:00
Gabor Kiss-Vamosi
3c3fe46447 Update CHANGELOG.md 2020-07-22 16:18:49 +02:00
embeddedt
806f3a9bbf textarea: don't call LV_EVENT_INSERT too far before insertion 2020-07-21 11:16:26 -04:00
github-actions[bot]
dca7cedb28 Merge 557342cc08 into dev 2020-07-21 14:39:50 +00:00
Gabor Kiss-Vamosi
557342cc08 Do not print for missing glyph if its height OR width is zero
Fixes: #1674
2020-07-21 16:39:04 +02:00
Gabor Kiss-Vamosi
eb725a3a68 add LV_USE_FONT_SUBPX option and draw_full_border() to avoid duplication in outline and border drawing 2020-07-21 16:06:14 +02:00
Gabor Kiss-Vamosi
53f002c3f8 Merge branch 'dev' into size_reduction 2020-07-21 16:03:54 +02:00
Gabor Kiss-Vamosi
b48120947f Merge branch 'master' into size_reduction 2020-07-21 14:44:11 +02:00
Gabor Kiss-Vamosi
4659289924 Merge branch 'dev' of https://github.com/littlevgl/lvgl into dev 2020-07-21 13:43:16 +02:00
Gabor Kiss-Vamosi
cc0ea22903 increment version number to v7.4-dev 2020-07-21 13:43:05 +02:00
github-actions[bot]
c0ca1a025b Merge 35b3a1f2a4 into dev 2020-07-21 11:42:42 +00:00
Gabor Kiss-Vamosi
35b3a1f2a4 merge dev 2020-07-21 13:42:02 +02:00
Gabor Kiss-Vamosi
6731e44503 Merge branch 'dev' 2020-07-21 13:40:36 +02:00
Gabor Kiss-Vamosi
7b68e6e426 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-07-21 13:38:24 +02:00
Gabor Kiss-Vamosi
c36a96914b fix release script 2020-07-21 13:38:04 +02:00
github-actions[bot]
ab6f93db24 Merge 57079452b0 into dev 2020-07-21 11:30:20 +00:00
Gabor Kiss-Vamosi
57079452b0 Release v7.2.0 2020-07-21 13:29:37 +02:00
Gabor Kiss-Vamosi
960bca7807 Run code formatter 2020-07-21 13:29:36 +02:00
github-actions[bot]
67400d1d72 Merge ecfef570ea into dev 2020-07-17 15:35:14 +00:00
Gabor Kiss-Vamosi
ecfef570ea Merge pull request #1672 from adamhan2/fix_issue_1671
fixes #1671 lv_cont_layout_grid() fails to calculate available space in a row
2020-07-17 17:34:43 +02:00
Adam Han
75875e244d fixes #1671 lv_cont_layout_grid() fails to calculate available space in a row
this issue results in space waste in right side of container
  the size of wasted space in each row is pad_left plus pad_inner
2020-07-17 15:51:09 +01:00
github-actions[bot]
1db33435c1 Merge 2d984da893 into dev 2020-07-17 12:09:30 +00:00
Gabor Kiss-Vamosi
2d984da893 improve mono theme when used with keyboard or encoder 2020-07-17 14:08:42 +02:00
github-actions[bot]
5b062a0d8d Merge c0a7cf76b9 into dev 2020-07-17 09:42:43 +00:00
Gabor Kiss-Vamosi
c0a7cf76b9 minor fixes with LV_COLOR_DEPTH == 1 2020-07-17 11:42:08 +02:00
github-actions[bot]
44e57aaaf5 Merge d06fe5100e into dev 2020-07-17 08:26:44 +00:00
Gabor Kiss-Vamosi
d06fe5100e Merge pull request #1670 from mentha/patch-1
Fix lv_canvas_set_buffer document
2020-07-17 10:26:00 +02:00
mentha
ae94302f4d Fix lv_canvas_set_buffer doc
Lines in canvas buffers are byte aligned so buffers might request larger size and contain unused bits.
The previous documented calc method would often result in a buffer size smaller than what was expected by LVGL, leading to memory corruption and program crash.
2020-07-17 16:09:24 +08:00
Themba Dube
b26b4435a5 Add LV_USE_FONT_COMPRESSED to lv_conf_template.h 2020-07-16 18:58:28 -04:00
Themba Dube
da9a5f58d0 Don't include blending code if LV_USE_BLEND_MODES is disabled 2020-07-16 18:55:35 -04:00
Themba Dube
a4774ccc72 Add LV_USE_FONT_COMPRESSED to control support for compressed fonts 2020-07-16 18:55:25 -04:00
github-actions[bot]
a6289f5e85 Merge dd56e9a013 into dev 2020-07-16 11:09:48 +00:00
Gabor Kiss-Vamosi
dd56e9a013 set the cursor object non clickable by default
Fixes: #1664
2020-07-16 13:09:09 +02:00
github-actions[bot]
e31993bdf2 Merge 6dac633235 into dev 2020-07-15 06:58:39 +00:00
Gabor Kiss-Vamosi
6dac633235 Merge pull request #1663 from diegoherranz/readme_typos
Fix README typos
2020-07-15 08:58:10 +02:00
Diego Herranz
1d5300e02f Fix README typos 2020-07-15 07:55:27 +01:00
github-actions[bot]
b646365e2c Merge 798f3177f2 into dev 2020-07-14 15:37:09 +00:00
Gabor Kiss-Vamosi
798f3177f2 Update README.md 2020-07-14 17:36:41 +02:00
github-actions[bot]
0921cf6e3b Merge ac5f1998e4 into dev 2020-07-14 15:16:11 +00:00
Gabor Kiss-Vamosi
ac5f1998e4 Update README.md 2020-07-14 17:15:30 +02:00
github-actions[bot]
433435889a Merge a66afca68e into dev 2020-07-14 15:07:16 +00:00
Gabor Kiss-Vamosi
a66afca68e Update README.md 2020-07-14 17:06:33 +02:00
Gabor Kiss-Vamosi
b1213dcc59 remove lv_event_queue_refresh_recursive
keep only the synchronous functions for refresh for easier maintanance
2020-07-14 15:25:56 +02:00
github-actions[bot]
f8c8c4040a Merge 2f33670b4f into dev 2020-07-14 11:37:37 +00:00
Gabor Kiss-Vamosi
2f33670b4f Merge pull request #1661 from tehkillerbee/master
Handle LV_EVENT_CANCEL in list/group
2020-07-14 13:37:10 +02:00
Johannes Linde
d8e10c41cf Handle ESC/Cancel event in list 2020-07-14 12:04:53 +02:00
Gabor Kiss-Vamosi
7e38ac68e3 Update CHANGELOG.md 2020-07-13 19:59:53 +02:00
Gabor Kiss-Vamosi
abff805509 Merge pull request #1653 from mibcat/tabview-set-tab-name
widget tableview: add new function lv_tabview_set_tab_name() to change a tab name during runtime
2020-07-13 19:57:25 +02:00
Michael Katzenberger
18072b3dd4 update CHANGELOG.md 2020-07-13 19:56:06 +02:00
github-actions[bot]
4640611758 Merge baeda1998f into dev 2020-07-13 13:31:40 +00:00
pete-pjb
baeda1998f Fix chart linked list free before use bug. 2020-07-13 14:26:04 +01:00
Gabor Kiss-Vamosi
e1a09551ce fix drawing on right border 2020-07-13 09:43:18 +02:00
Michael Katzenberger
ba7a86de74 implement review findings: use C-style comments 2020-07-12 14:22:09 +02:00
Michael Katzenberger
6cb79914a8 widget tableview: add function lv_tabview_set_tab_name() to change a tab name 2020-07-12 11:46:12 +02:00
github-actions[bot]
f1f0aa621a Merge 43a77d8699 into dev 2020-07-10 13:04:49 +00:00
Gabor Kiss-Vamosi
43a77d8699 linemeter: fix arc drawing if the value is close to max value 2020-07-10 15:04:02 +02:00
github-actions[bot]
58b88bf1fb Merge 96bc397821 into dev 2020-07-10 12:57:43 +00:00
Gabor Kiss-Vamosi
96bc397821 linemeter: fix conversation of current value to "level"
Related to #1648
2020-07-10 14:57:03 +02:00
github-actions[bot]
fd508065dd Merge 416ef9e251 into dev 2020-07-09 12:42:08 +00:00
Gabor Kiss-Vamosi
416ef9e251 fix chart series area invalidation 2020-07-09 14:41:24 +02:00
Gabor Kiss-Vamosi
09250d0a92 Delete queued refresh queries 2020-07-09 14:13:21 +02:00
github-actions[bot]
822e06be39 Merge c07ef75ac5 into dev 2020-07-08 13:03:31 +00:00
Gabor Kiss-Vamosi
c07ef75ac5 update release script 2020-07-08 15:02:53 +02:00
github-actions[bot]
2a6f5d46ab Merge e3f6a3327d into dev 2020-07-08 12:59:42 +00:00
Gabor Kiss-Vamosi
e3f6a3327d Update library.json 2020-07-08 14:59:02 +02:00
github-actions[bot]
6227aaee96 Merge 08591a8e8c into dev 2020-07-08 11:43:18 +00:00
Pete Bone
08591a8e8c Merge pull request #1646 from DaPa/master
Fix lv_page_get_height_grid comment
2020-07-08 12:42:51 +01:00
DaPa
106e023c80 Fix lv_page_get_height_grid comment 2020-07-08 14:36:13 +03:00
Gabor Kiss-Vamosi
a5de71933b fix typoe in comments 2020-07-08 10:31:52 +02:00
github-actions[bot]
e85888908a Merge 1a3b6d4cb3 into dev 2020-07-08 07:36:08 +00:00
Gabor Kiss-Vamosi
1a3b6d4cb3 update lv_conf_internal.h 2020-07-08 09:35:25 +02:00
github-actions[bot]
e587ceb22e Merge b769463d39 into dev 2020-07-08 07:32:39 +00:00
Gabor Kiss-Vamosi
b769463d39 update CHANGELONG and lv_conf_internal.h 2020-07-08 09:31:52 +02:00
Gabor Kiss-Vamosi
cbc88285d3 change default fot to 14 px for better compatibility with small displays
Related to #1602
2020-07-08 09:31:52 +02:00
Gabor Kiss-Vamosi
ec64820272 tileview: fix navigation when not screen sized 2020-07-08 09:31:52 +02:00
Gabor Kiss-Vamosi
15b7ea6614 Add lv_event_send_refresh, lv_event_send_refresh_recursive, lv_event_queue_refresh_recursive
Used to easily send LV_EVENT_REFRESH to objects
2020-07-08 09:29:48 +02:00
Gabor Kiss-Vamosi
843555a4b1 Add lv_task_get_next 2020-07-08 09:29:48 +02:00
github-actions[bot]
5f4c26cb79 Merge 019042297d into dev 2020-07-08 04:27:23 +00:00
Gabor Kiss-Vamosi
019042297d Update library.json 2020-07-08 06:26:56 +02:00
github-actions[bot]
46a4469a9c Merge 646cb71a9d into dev 2020-07-07 18:41:18 +00:00
Gabor Kiss-Vamosi
646cb71a9d Update library.json 2020-07-07 20:40:33 +02:00
github-actions[bot]
ad262172de Merge 343b70b19c into dev 2020-07-07 11:09:52 +00:00
Gabor Kiss-Vamosi
343b70b19c Update auto-comment.yml 2020-07-07 13:09:26 +02:00
github-actions[bot]
b802e7e775 Merge 2cecd01b30 into dev 2020-07-07 11:07:33 +00:00
Gabor Kiss-Vamosi
2cecd01b30 Update auto-comment.yml 2020-07-07 13:07:02 +02:00
github-actions[bot]
2ba1fc625f Merge aff7a22ac5 into dev 2020-07-07 11:04:10 +00:00
Gabor Kiss-Vamosi
aff7a22ac5 Update auto-comment.yml 2020-07-07 13:03:30 +02:00
github-actions[bot]
5a23fd569b Merge 234e74202c into dev 2020-07-07 10:58:47 +00:00
Gabor Kiss-Vamosi
234e74202c image decoder open bug described in #1638 2020-07-07 12:58:13 +02:00
github-actions[bot]
914c874ada Merge a6793b2695 into dev 2020-07-07 10:45:11 +00:00
Gabor Kiss-Vamosi
a6793b2695 Update auto-comment.yml 2020-07-07 12:44:42 +02:00
Gabor Kiss-Vamosi
cae5132038 rotary: fix with low chg_rate 2020-07-07 12:35:23 +02:00
github-actions[bot]
45bf6a3862 Merge c599a59f05 into dev 2020-07-07 09:31:48 +00:00
github-actions[bot]
f00a6a118d Merge c97a0684cf into dev 2020-07-07 09:31:03 +00:00
Gabor Kiss-Vamosi
c599a59f05 Update README.md 2020-07-07 11:31:00 +02:00
Gabor Kiss-Vamosi
c97a0684cf Create auto-comment.yml 2020-07-07 11:30:35 +02:00
github-actions[bot]
418413e334 Merge faf56680f8 into dev 2020-07-07 09:30:07 +00:00
github-actions[bot]
815e0afdaf Merge b2d78dcca7 into dev 2020-07-07 09:29:50 +00:00
Gabor Kiss-Vamosi
faf56680f8 Delete auto-comment.yml 2020-07-07 11:29:41 +02:00
Gabor Kiss-Vamosi
b2d78dcca7 Create auto-comment.yml 2020-07-07 11:29:20 +02:00
Gabor Kiss-Vamosi
38e68eeb7a update version number 2020-07-07 10:06:49 +02:00
github-actions[bot]
0f69cbf087 Merge 039080fc26 into dev 2020-07-07 08:06:19 +00:00
Gabor Kiss-Vamosi
039080fc26 update changlog 2020-07-07 10:05:29 +02:00
Gabor Kiss-Vamosi
7e9cf858d6 update version number 2020-07-07 10:03:52 +02:00
Gabor Kiss-Vamosi
a740af4afb fix conflicts 2020-07-07 10:02:50 +02:00
Gabor Kiss-Vamosi
a117b3cead update relaese script 2020-07-07 10:01:28 +02:00
Gabor Kiss-Vamosi
e30efb716f Release v7.1.0 2020-07-07 09:37:00 +02:00
Gabor Kiss-Vamosi
43f5e4d2e0 Run code formatter 2020-07-07 09:36:59 +02:00
github-actions[bot]
e178bcc9f3 Merge d8585d2ea3 into dev 2020-07-07 07:32:59 +00:00
Gabor Kiss-Vamosi
d8585d2ea3 update release.py 2020-07-07 09:32:21 +02:00
Gabor Kiss-Vamosi
96728e7ed9 rotary: minor refactoring 2020-07-06 11:51:26 +02:00
Adam Martini
83bdb6c347 Reverse angle delta logic 2020-07-05 14:44:11 -07:00
Adam Martini
085a6499a7 Comment updates for clarity 2020-07-05 13:59:03 -07:00
Adam Martini
b371bd3d05 Capture tick at drap start 2020-07-05 13:50:05 -07:00
Adam Martini
cf39677dfa Use tick elps 2020-07-05 13:30:07 -07:00
Adam Martini
a0bf57f529 tick type 2020-07-05 13:22:37 -07:00
Adam Martini
7a10b700e2 Remove use of tick_elaspe 2020-07-05 13:21:54 -07:00
Adam Martini
aea84d8d79 Cache timestamp for slew rate limit interation 2020-07-05 13:18:08 -07:00
Adam Martini
e3f4c11500 Remove previous thresholding and add creation defaults. Move angle caching to set value to cache last angel for type changes and external value setters. 2020-07-05 12:49:27 -07:00
Adam Martini
e256a27b5a Add slew rate limited angle delta based on threshold of degress/sec 2020-07-05 12:25:44 -07:00
github-actions[bot]
41c4c25315 Merge 9e56f750a7 into dev 2020-07-04 23:50:42 +00:00
Amir Gonnen
9e56f750a7 Prevent compiler warning in lv_draw_rect.c (#1637) 2020-07-04 19:50:14 -04:00
github-actions[bot]
4396196889 Merge e6fe8436f4 into dev 2020-07-04 11:30:45 +00:00
guoweilkd
e6fe8436f4 Fix #1634: bug in lv_tileview_scrl_signal (#1636) 2020-07-04 07:30:07 -04:00
github-actions[bot]
f3f1c606b6 Merge e9d3001dbf into dev 2020-07-03 12:49:29 +00:00
Gabor Kiss-Vamosi
e9d3001dbf img: improve hit test for transformed images 2020-07-03 14:48:54 +02:00
Gabor Kiss-Vamosi
fd186eeb15 roller: fix copy 2020-07-03 14:24:23 +02:00
github-actions[bot]
25607ceaee Merge 4b2c3e560b into dev 2020-07-01 14:14:54 +00:00
Petri HARRI
4b2c3e560b lv_slider: add knob-only feature and fix bug with symmetrical slider (#1578) 2020-07-01 10:14:14 -04:00
Gabor Kiss-Vamosi
989016dff3 fix conflicts 2020-07-01 15:21:14 +02:00
Gabor Kiss-Vamosi
c54788fae4 fix conflicts 2020-07-01 15:19:29 +02:00
Themba Dube
c7fb2ad12c Merge branch 'master' into dev 2020-07-01 09:19:17 -04:00
Gabor Kiss-Vamosi
2fdeaf5599 fix conflicts 2020-07-01 15:18:48 +02:00
Gabor Kiss-Vamosi
1051e3f5a4 roller: fix copy. Closes #1628 2020-07-01 15:15:12 +02:00
Gabor Kiss-Vamosi
0b68c21840 Merge pull request #1627 from xiaogangly/master
Fix a memory leak bug in function "lv_objmask_remove_mask" .
2020-07-01 15:09:10 +02:00
jbamaral
ac26442ca6 Fix lv_textarea_add_char on big endian (#1620) 2020-07-01 09:08:45 -04:00
Pete Bone
b539e6dc46 Merge pull request #1630 from pete-pjb/dev
New functions for Check Box and a minor bug fix
2020-07-01 12:44:41 +01:00
pete-pjb
06603a9c84 New functions for Check Box and a minor bug fix
Remove use of c++ keyword 'new' from function parameter in
lv_theme_set_base() function.
Add function lv_checkbox_set_state(lv_obj_t * cb, lv_btn_state_t state).
Add function lv_checkbox_get_state(const lv_obj_t * cb)
Update Change log.
2020-07-01 12:13:46 +01:00
github-actions[bot]
6b45f3ade5 Merge 6b246b2fed into dev 2020-07-01 08:53:55 +00:00
Gabor Kiss-Vamosi
6b246b2fed fix default theme colors 2020-07-01 10:53:23 +02:00
xiaogangly
86f74e3da2 Fix a memory leak bug in function "lv_objmask_remove_mask" .
There is a little memory leak When you call function "lv_objmask_remove_mask" to remove a specified mask.
It's need free the memory of list's node.
2020-07-01 15:26:37 +08:00
Gabor Kiss-Vamosi
c4e7d7cb83 Merge branch 'dev' of https://github.com/littlevgl/lvgl into dev 2020-06-30 17:09:57 +02:00
github-actions[bot]
43b69a88a9 Merge 6d1da27b3c into dev 2020-06-30 07:44:39 +00:00
Gabor Kiss-Vamosi
6d1da27b3c Create merge-to-dev.yml 2020-06-30 09:43:58 +02:00
Gabor Kiss-Vamosi
bae04005d3 update old function name in comment 2020-06-29 20:47:55 +02:00
Gabor Kiss-Vamosi
edeca8c01b Merge pull request #1619 from liangyongxiang/master
Add conditional macro LV_USE_GROUP to more GROUP related singles:
2020-06-29 14:52:18 +02:00
Gabor Kiss-Vamosi
3aa35a77cb rotary: minor fixes on dragging 2020-06-28 22:03:20 +02:00
Gabor Kiss-Vamosi
069e24bdb2 add examples folder with arduio examples and move porting folder there 2020-06-28 20:37:32 +02:00
Gabor Kiss-Vamosi
d0db0bab5c add Arduino library files 2020-06-28 20:10:30 +02:00
Themba Dube
421f1b2c01 lv_gpu: fix #1617 by renaming internal macros
This avoids conflicts with STM32Cube.
2020-06-28 09:16:25 -04:00
Gabor Kiss-Vamosi
92027cc06f lv_hal_tick: revert using uint32_t as tick_irq_flag
uint8_t surely can be written in 1 instruction even on 16 bit MCUs
2020-06-28 13:32:40 +02:00
Gabor Kiss-Vamosi
ddbeb212b7 Add support to compressed fonts without pre-filter to gain some speed by sacrificing some memory 2020-06-28 13:29:01 +02:00
liangyongxiang
d055944ebb Add conditional macro LV_USE_GROUP to more GROUP related singles:
- LV_SIGNAL_CONTROL
- LV_SIGNAL_GET_EDITABLE
2020-06-28 12:48:37 +08:00
Amir Gonnen
40daa7195d lv_theme: add lv_theme_set_apply_cb (#1616) 2020-06-27 17:46:22 -04:00
Gabor Kiss-Vamosi
3e8b39c404 Merge pull request #1613 from 3096/lv_win-style-fix
material theme: fix lv_win uninitialed styles
2020-06-27 10:35:18 +02:00
3096
e06201f042 material theme: fix lv_win uninitialed styles 2020-06-26 22:27:52 -07:00
Gabor Kiss-Vamosi
2d7423100a fix conflicts 2020-06-27 06:57:28 +02:00
Gabor Kiss-Vamosi
6971d603d2 add lv_theme_copy 2020-06-27 06:54:47 +02:00
Adam Martini
3af55796d9 Remove uneeded point manupulaton 2020-06-26 19:39:10 -07:00
Adam Martini
200c1e788f Second pass at angle based drag. Working with proper threshold setting with knowledge of rotary range. 2020-06-26 16:54:36 -07:00
Amir Gonnen
aad9f4f0c1 Add lv_dpx inline function (#1612)
Identical to LV_DPX (no code additions)
2020-06-26 18:04:46 -04:00
Adam Martini
d271fd6108 Adjust click area extension 2020-06-26 12:35:41 -07:00
Gabor Kiss-Vamosi
76625adec2 fix typo in lv_obj_align_origo_x/y 2020-06-26 21:02:06 +02:00
Gabor Kiss-Vamosi
8b3f9f19f6 add lv_obj_align_origo_x() and lv_obj_align_origo_y() functions 2020-06-26 20:59:57 +02:00
Gabor Kiss-Vamosi
97f999ed9f add lv_obj_align_x() and lv_obj_align_y() functions 2020-06-26 20:52:21 +02:00
Gabor Kiss-Vamosi
e678a2c599 chart: add lv_chart_set_series_axis and lv_chart_set_y_range 2020-06-26 20:31:20 +02:00
Adam Martini
7e4b8aa49b Second attempt arc drag 2020-06-26 09:46:55 -07:00
Adam Martini
c36f731316 Only drag in one dimension because its too jumpy 2020-06-26 08:50:24 -07:00
Adam Martini
849d3d3255 Use point as last point 2020-06-26 08:48:12 -07:00
Adam Martini
ec4cc14bf9 Remove unsec x setter 2020-06-26 08:46:56 -07:00
Adam Martini
7de60867ef Set last drag point based on diffs 2020-06-26 08:45:41 -07:00
Adam Martini
4011d54668 Use the max x and y drag diff to control drag 2020-06-26 08:40:30 -07:00
Gabor Kiss-Vamosi
6056bc3b95 clraify the tricky loop in lv_tick_get 2020-06-26 14:35:30 +02:00
Gabor Kiss-Vamosi
91f64c8662 Add lv_theme_set_base() to allow easy extension of built-in (or any) themes 2020-06-26 14:05:34 +02:00
Gabor Kiss-Vamosi
274d0b522d Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-06-26 09:39:29 +02:00
Gabor Kiss-Vamosi
ac7527fecf minor optimization in lv_obj_init_draw_img_dsc 2020-06-26 09:39:19 +02:00
Adam Martini
8bcbceef08 Send event on if the value really does change 2020-06-25 23:05:48 -07:00
Adam Martini
7ce9a969c8 Rever drag limit integration as it makes rotary control too granular 2020-06-25 22:43:54 -07:00
Adam Martini
f836e90869 Account for indev drag limit 2020-06-25 22:40:03 -07:00
Adam Martini
6d07effbc3 Revert arc tracking 2020-06-25 21:39:19 -07:00
Adam Martini
a73b316681 Remove undeclared 2020-06-25 21:27:18 -07:00
Adam Martini
70a2287568 Remove undeclared 2020-06-25 21:24:19 -07:00
Adam Martini
9e3d8c9090 Remove undeclared 2020-06-25 21:23:14 -07:00
Adam Martini
2d4c709a88 Get area width using pointer 2020-06-25 21:22:37 -07:00
Adam Martini
92ecff3fc0 WIP: dragging on ring only using lv_atan 2020-06-25 21:18:42 -07:00
Gabor Kiss-Vamosi
2ed6b4e2f5 Merge pull request #1607 from jbamaral/fix-img-big-endian-pr
fix image demos on big endian systems
2020-06-25 17:11:46 +02:00
embeddedt
3761db65e0 Fix spelling issue 2020-06-25 07:32:45 -04:00
Gabor Kiss-Vamosi
eb006b3d39 finialze screen animations 2020-06-25 12:43:45 +02:00
Gabor Kiss-Vamosi
f10f94bea3 use void * as theme user data for backward compatibility 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
710226c6db add user_data to themes 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
44a96df9fb initial implementation of screen load animation 2020-06-25 12:43:44 +02:00
embeddedt
cd788da47a Fix #1610: don't assert an expected null pointer 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
c4eec78a02 lv_textarea fix cursor alignment with empty textarea when the text alignment is center or right 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
1e33359d0c fix build error 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
cf8357e004 fix focusing/defocusing for pages 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
8f243c01d5 style: minor fix on getting style attributes + formatting 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
e2aa68394c update changelog 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
2828582c7a lv_img: fix invalidation area when angle or zoom changes 2020-06-25 12:43:44 +02:00
jbamaral
f6a2c635fd Improve big endian support (#1599) 2020-06-25 12:43:44 +02:00
Gabor Kiss-Vamosi
db24bf1d18 In lv_init test if the the strings are UTF-8 encoded 2020-06-25 12:42:06 +02:00
Deon Marais
8c151a2d43 Add missing lv_font_montserrat_34
if you do not mind me asking, and on matters of fonts why was Roboto changed to Montserrat when V7 was released ?
2020-06-25 12:42:06 +02:00
Gabor Kiss-Vamosi
52cca1dd9b use void * as theme user data for backward compatibility 2020-06-25 06:38:17 +02:00
Gabor Kiss-Vamosi
859f72eb84 add user_data to themes 2020-06-25 06:25:40 +02:00
embeddedt
b77d484a27 Fix #1610: don't assert an expected null pointer 2020-06-24 12:25:16 -04:00
jbamaral
1733508e9a move bug logs to their right position in changelog 2020-06-24 10:01:42 -03:00
jbamaral
5f6c7743ad update internal configuration 2020-06-24 08:38:44 -03:00
jbamaral
2550368d30 fix image demos on big endian systems 2020-06-24 08:30:45 -03:00
Gabor Kiss-Vamosi
63aba1b3de lv_textarea fix cursor alignment with empty textarea when the text alignment is center or right 2020-06-24 11:36:35 +02:00
Gabor Kiss-Vamosi
42f79763e1 fix build error 2020-06-24 11:28:51 +02:00
Gabor Kiss-Vamosi
be19e91e91 fix focusing/defocusing for pages 2020-06-24 11:24:07 +02:00
Gabor Kiss-Vamosi
9561aa767d style: minor fix on getting style attributes + formatting 2020-06-24 10:45:32 +02:00
Gabor Kiss-Vamosi
4c629ec23f update changelog 2020-06-24 10:04:30 +02:00
Gabor Kiss-Vamosi
8864cd87ee lv_img: fix invalidation area when angle or zoom changes 2020-06-24 10:03:37 +02:00
Adam Martini
f75428e52b Match rotary_bg line width to indicator width 2020-06-23 23:06:56 -07:00
Adam Martini
b414aa755d int32 fix to mapping logic 2020-06-23 13:33:25 -07:00
Adam Martini
5961800fe0 Fix map contract 2020-06-23 12:56:07 -07:00
Adam Martini
663af3dfb3 Shift mapping math out of floating point 2020-06-23 12:54:06 -07:00
jbamaral
916f5b343a Improve big endian support (#1599) 2020-06-23 08:30:33 -04:00
Gabor Kiss-Vamosi
c0223977d1 roller: fix misaligned option after setting new options 2020-06-23 11:44:06 +02:00
Gabor Kiss-Vamosi
e1c5d8950f Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-06-23 11:11:57 +02:00
Gabor Kiss-Vamosi
20c46ca640 In lv_init test if the the strings are UTF-8 encoded 2020-06-23 11:11:45 +02:00
Adam Martini
0aeb49d28a Fix Set sym end angle 2020-06-22 22:53:58 -07:00
Adam Martini
83d05f945f Fix bg_end init 2020-06-22 22:49:23 -07:00
Adam Martini
f0cae00574 Rearrange type call for clarity. Fix symmetric arc setters 2020-06-22 22:47:01 -07:00
Adam Martini
46f7dff9e2 Fix statement declaration 2020-06-22 21:56:31 -07:00
Adam Martini
9ede4ba707 typo 2020-06-22 21:54:47 -07:00
Adam Martini
1c071530ad Remove sym references 2020-06-22 21:54:03 -07:00
Adam Martini
ba10671b2b Rotary types. Add symmetric value setter 2020-06-22 21:50:21 -07:00
Gabor Kiss-Vamosi
188205399b Merge pull request #1598 from DeonMarais64/patch-1
Add missing lv_font_montserrat_34
2020-06-22 10:08:22 +02:00
Adam Martini
af7134269e Force set_value handling in reverse 2020-06-21 11:15:48 -07:00
Adam Martini
19a1afbd89 Fix reverse mapping 2020-06-21 11:05:24 -07:00
Adam Martini
5359a762b8 Reverse min and max in mapping reverse 2020-06-21 10:59:41 -07:00
Themba Dube
0d0427f8bc Merge remote-tracking branch 'origin/master' into dev 2020-06-21 08:32:48 -04:00
Adam Martini
0d6b8a86d4 Try reverse mapping 2020-06-21 00:36:39 -07:00
Adam Martini
6c01490372 Use value setter for reverse start angle setting 2020-06-21 00:34:08 -07:00
Adam Martini
4ab8520bfb Use lv math abs 2020-06-21 00:29:03 -07:00
Adam Martini
d60a6cbc76 Add reverse value mapping and arc tracking 2020-06-21 00:26:20 -07:00
Adam Martini
4bedc57b7d Add setter for threshold 2020-06-21 00:08:49 -07:00
Adam Martini
e1761d50a1 Test threshold for value jupming 2020-06-21 00:05:09 -07:00
Adam Martini
856368284e Test sensitivity threshold for value jumping 2020-06-20 23:58:03 -07:00
Adam Martini
ad990994d0 Fix release drag hoping better checking for -1 last drag x 2020-06-20 23:54:25 -07:00
Adam Martini
247b5b6f0c Fix drag diff calc 2020-06-20 23:43:40 -07:00
Adam Martini
6836947e67 typo 2020-06-20 23:33:50 -07:00
Adam Martini
dc873966e9 Make sensitivity an int 2020-06-20 23:33:18 -07:00
Adam Martini
fe483e8e21 Add sensitivity default explicit 2020-06-20 23:26:22 -07:00
Adam Martini
3a31577592 Add sesitivty setter 2020-06-20 23:20:12 -07:00
Adam Martini
3721fc52a8 Typo 2020-06-20 17:25:14 -07:00
Adam Martini
a7350282f0 Use drag diff for value setting 2020-06-20 17:24:34 -07:00
Adam Martini
c93ef97ab9 Remove NULL comp 2020-06-20 17:18:53 -07:00
Adam Martini
866e088f98 Copy knob_area to ext 2020-06-20 17:16:57 -07:00
Adam Martini
15ec0f8e2f Remove value_to_set remnant. Do not override checked opacity 2020-06-20 17:15:09 -07:00
Adam Martini
fc14c2c01c Remove chechable and toggle 2020-06-20 17:11:12 -07:00
Adam Martini
71f8497ee6 Add knob_area ext 2020-06-20 16:47:23 -07:00
Adam Martini
5a0c0e2e97 Add value change event calls for dragging 2020-06-20 16:43:53 -07:00
Adam Martini
3e079a47ae Pull btn functionality out for now, make checked state make DEAFULT. Add dragging value setters. 2020-06-20 16:40:47 -07:00
Adam Martini
35c0cfcfea Use custom event as data is not transfered to CB 2020-06-20 12:23:24 -07:00
Adam Martini
fa8deb524d Mising ; 2020-06-20 12:18:53 -07:00
Adam Martini
f3773694bc Remove custom event in favor or NULL diff 2020-06-20 12:17:15 -07:00
Adam Martini
1860742c13 Fix missing ;. Add custom event last 2020-06-20 12:14:17 -07:00
Adam Martini
f6d75e759c Add btn like signal handling for knob part. Add custom event to distuinguish from VALUE_CHANGED 2020-06-20 12:12:42 -07:00
Adam Martini
9b38b35420 Static state setter 2020-06-20 11:13:37 -07:00
Adam Martini
b1afc3f34d Add rotary state 2020-06-20 11:11:26 -07:00
Adam Martini
1dfdabd638 Test btn extension 2020-06-20 11:06:06 -07:00
Deon Marais
f9512f55cc Add missing lv_font_montserrat_34
if you do not mind me asking, and on matters of fonts why was Roboto changed to Montserrat when V7 was released ?
2020-06-20 09:08:59 +02:00
Adam Martini
446b0b6429 Floats working fro value mapping 2020-06-19 18:05:55 -07:00
Adam Martini
cf4db99206 Test float for mapping 2020-06-19 18:01:15 -07:00
Adam Martini
c854670062 Test float for mapping 2020-06-19 18:00:28 -07:00
Adam Martini
e100565c67 Move map function to proper func to avoid recalc of slope 2020-06-19 17:49:02 -07:00
Adam Martini
f5d9e4bff4 Fix range mapping for value setter assuming left to right indic 2020-06-19 17:39:50 -07:00
Adam Martini
7a7e1668fa Make value setter indic mapping from arc start to bg end. 2020-06-19 17:15:15 -07:00
Adam Martini
4e13d6ae4d Cast ext 2020-06-19 15:59:04 -07:00
Gabor Kiss-Vamosi
201d38c574 Add theme->apply_cb to replace theme->apply_xcb to make it compatible with the Micropython binding 2020-06-20 00:01:33 +02:00
Gabor Kiss-Vamosi
75a27e4cc7 rotary: leave the default size from arc + fix style get 2020-06-19 23:41:29 +02:00
Gabor Kiss-Vamosi
95b07a2d23 rotary: clean up 2020-06-19 23:25:17 +02:00
Gabor Kiss-Vamosi
94a710a5e1 Merge branch 'feature/1568_lv_rotary' of https://github.com/acumartini/lvgl into acumartini-feature/1568_lv_rotary 2020-06-19 23:00:03 +02:00
Adam Martini
b9dc9e81de Missing ; 2020-06-19 11:44:29 -07:00
Adam Martini
1396fce961 Fix debug import 2020-06-19 11:42:55 -07:00
Adam Martini
884be64d17 Fix rotary type getter. 2020-06-19 11:38:22 -07:00
embeddedt
8dbd685a90 Fix #1596: typo in lv_api_map.h 2020-06-19 10:13:53 -04:00
Gabor Kiss-Vamosi
4345e05e32 test
Signed-off-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2020-06-19 15:12:17 +02:00
Gabor Kiss-Vamosi
24b1a7735a roller: allow setting different font for the selected text 2020-06-19 13:17:45 +02:00
Adam Martini
168a7c4c45 Add theme define 2020-06-18 22:46:30 -07:00
Adam Martini
a696aef959 Use rotary param in type getter 2020-06-18 22:43:38 -07:00
Adam Martini
6dddbde387 Add ifndef to internal conf 2020-06-18 22:27:51 -07:00
Adam Martini
b9d92236e3 Add rotary to build.py defines 2020-06-18 22:25:41 -07:00
Adam Martini
2dc14fc7e5 Add missing rotary widget import 2020-06-18 22:22:22 -07:00
Adam Martini
2908a74b42 Reduce knob pad get logic 2020-06-18 17:11:15 -07:00
Adam Martini
1a41f13fd6 Initial lv_rotary work extending lv_arc with stubbed signal handler. 2020-06-18 17:06:24 -07:00
Gabor Kiss-Vamosi
b16f3ff8e7 Merge branch 'dev' of https://github.com/littlevgl/lvgl into dev 2020-06-18 16:32:14 +02:00
Gabor Kiss-Vamosi
0f4aeede79 Update README.md 2020-06-18 16:29:18 +02:00
Gabor Kiss-Vamosi
5d4873aa95 Update README.md 2020-06-18 16:19:57 +02:00
Gabor Kiss-Vamosi
8ac337d515 Update README.md 2020-06-18 16:13:04 +02:00
Gabor Kiss-Vamosi
2678068a86 Update CONTRIBUTING.md 2020-06-18 16:09:07 +02:00
Gabor Kiss-Vamosi
64be5e2096 Update CONTRIBUTING.md 2020-06-18 16:08:17 +02:00
Pete Bone
6b3d7759cc Merge pull request #1587 from pete-pjb/dev
Finalise chart function updates
2020-06-18 14:59:19 +01:00
Pete Bone
765b6c4015 Update CHANGELOG.md 2020-06-18 14:38:07 +01:00
Gabor Kiss-Vamosi
1521d64784 _lv_img_buf_get_transformed_area: do not calculate trivial case 2020-06-18 15:17:03 +02:00
Amir Gonnen
25fbcea31a Ensure mem_max_size is only used on non custom mem (#1588) 2020-06-18 06:40:39 -04:00
Gabor Kiss-Vamosi
51e064d836 Update CHANGELOG.md 2020-06-18 12:37:02 +02:00
Gabor Kiss-Vamosi
6ae7f67ef5 Update CHANGELOG.md 2020-06-18 12:36:05 +02:00
Gabor Kiss-Vamosi
156a3c005d Update CHANGELOG.md 2020-06-18 12:35:38 +02:00
Gabor Kiss-Vamosi
295337ac7e Merge pull request #1590 from diegoherranz/lv_conf_checker
lv_conf_checker.py: change requirement of python 3.6 to >=3.6
2020-06-18 12:32:13 +02:00
Gabor Kiss-Vamosi
a39f51a571 Merge branch 'dev' into dev 2020-06-18 07:41:54 +02:00
Gabor Kiss-Vamosi
d050c99161 Merge branch 'dev' of https://github.com/littlevgl/lvgl into dev 2020-06-18 06:04:02 +02:00
Gabor Kiss-Vamosi
1523cc0634 fix typo 2020-06-18 06:03:52 +02:00
Diego Herranz
65d029279b lv_calendar: add option to start week on Monday (#1589) 2020-06-17 16:09:40 -04:00
Diego Herranz
d2d664a69b lv_conf_checker.py: change requirement of python 3.6 to >=3.6
Many current OSes ship newer versions (e.g. 3.8) and they work OK
for this, so I don't think 3.6 is required specifically.
Versions older than 3.6 wouldn't work, though, since f-strings
are used.
2020-06-17 21:04:46 +01:00
pete-pjb
4a953b9d9d Free memory for series_ll 2020-06-16 18:24:05 +01:00
pete-pjb
ae748cfffa Fix initialisation problem.
Found that new structure parmaeter ext_buf_assigned needs to be
initialised to false in lv_chart_add_series() as sometimes is set true
depending on what was previously in the heap where it was allocated.
2020-06-16 18:04:36 +01:00
PeterB
ad215c5b4b Finalise changes for new Chart Functions 2020-06-16 16:24:37 +01:00
Gabor Kiss-Vamosi
2dd84e6de1 Merge branch 'master' into dev 2020-06-16 16:52:18 +02:00
pete-pjb
05d249d5ee Merge branch 'master' into dev 2020-06-16 15:10:56 +01:00
Pete Bone
f746ac8542 Added functions to extend chart functionality (#1581) 2020-06-16 09:53:21 -04:00
Gabor Kiss-Vamosi
7af64df008 upadte version numer to v7.1.0-dev 2020-06-16 13:57:20 +02:00
Gabor Kiss-Vamosi
975ab3f4cc Merge branch 'dev' 2020-06-16 13:56:42 +02:00
Gabor Kiss-Vamosi
122ef1d862 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-06-16 13:56:00 +02:00
Gabor Kiss-Vamosi
4174ad844c relase.py minor fixes 2020-06-16 13:55:45 +02:00
Gabor Kiss-Vamosi
41e65d9df1 Run code formatter 2020-06-16 13:47:04 +02:00
Gabor Kiss-Vamosi
2d0480c03d Release v7.0.2 2020-06-16 13:42:34 +02:00
Gabor Kiss-Vamosi
b0c9c8778d CHANGELOG set v7.0.2 released 2020-06-16 13:38:37 +02:00
Gabor Kiss-Vamosi
91c98f147f Merge pull request #1580 from DaPa/master
Code comments spelling fixes
2020-06-16 13:36:36 +02:00
DaPa
0bdeb00838 Resolve conflict with 4668bc0 2020-06-16 14:27:08 +03:00
DaPa
eee2184d10 Revert part of last commit to keep _xcb naming into lv_task_create 2020-06-16 14:10:51 +03:00
Gabor Kiss-Vamosi
df9801eac3 Merge pull request #1584 from BesitzeRuf/dev
Fixes drawing of the image border
2020-06-16 13:10:36 +02:00
Gabor Kiss-Vamosi
eacc9d8ce7 chart: fix memory leak 2020-06-16 13:03:54 +02:00
Gabor Kiss-Vamosi
d6e7187d01 fix crash when drawing gradient to the same color 2020-06-16 12:47:09 +02:00
Gabor Kiss-Vamosi
f61f045135 CHANGELOG: fix typo 2020-06-16 12:05:13 +02:00
Gabor Kiss-Vamosi
4668bc0ee3 fix typo in the API 2020-06-16 12:03:32 +02:00
besitzeruf
ae93ee067c Merge branch 'dev-fix-Asymmetric-border-thickness-on-image-objects' into dev 2020-06-16 11:22:30 +02:00
besitzeruf
59165f077e - Fix when border of the image (bottom and right sides) are drawn with different width ( decreased by 1) 2020-06-16 11:18:45 +02:00
pete-pjb
832dbd644b Remove redundant assert 2020-06-16 09:31:37 +01:00
Gabor Kiss-Vamosi
00f8af0fb5 minor fixes 2020-06-16 10:28:10 +02:00
Themba Dube
10ee9e5e99 Merge branch 'dev' of github.com:littlevgl/lvgl into dev 2020-06-15 17:06:39 -04:00
DaPa
33de1ffdc7 Fixed @embeddedt's review comments
- change the wording to say "message box" and not "button matrix"
 - parameter name should be cb and not xcb due MicroPython
 - also corrected comment for lv_async_call in lv_async.h
2020-06-15 19:48:44 +03:00
pete-pjb
fe5663908c Fix unused variable 2020-06-15 17:29:33 +01:00
pete-pjb
f23873e3f5 Added Functions to extend chart functionality as follows:
/**
 * Set the index of the x-axis start point in the data array
 * @param chart             pointer to a chart object
 * @param ser 				pointer to a data series on 'chart'
 * @param id    			the index of the x point in the data array
 */
void lv_chart_set_x_start_point(lv_obj_t * chart, lv_chart_series_t *
ser, uint16_t id);

/**
 * Set an external array of data points to use for the chart
 * NOTE: It is the users responsibility to make sure the point_cnt
matches the external array size.
 * @param chart             pointer to a chart object
 * @param ser 				pointer to a data series on 'chart'
 * @param array				external array of points for chart
 */
void lv_chart_set_ext_array(lv_obj_t * chart, lv_chart_series_t * ser,
lv_coord_t array[], uint16_t point_cnt );

/**
 * Set an individual point value in the chart series directly based on
index
 * @param chart             pointer to a chart object
 * @param ser 				pointer to a data series on 'chart'
 * @param value				value to assign to array point
 * @param id				the index of the x point in the array
 */
void lv_chart_set_point_id(lv_obj_t * chart, lv_chart_series_t * ser,
lv_coord_t value, uint16_t id);


/**
 * get the current index of the x-axis start point in the data array
 * @param chart             pointer to a chart object
 * @param ser 				pointer to a data series on 'chart'
 * @return 					the index of the current x start point in the data array
 */
uint16_t lv_chart_get_x_start_point(lv_obj_t * chart, lv_chart_series_t
* ser);

/**
 * Get an individual point value in the chart series directly based on
index
 * @param chart             pointer to a chart object
 * @param ser 				pointer to a data series on 'chart'
 * @param id				the index of the x point in the array
 * @return					value of array point at index id
 */
lv_coord_t lv_chart_get_point_id(lv_obj_t * chart, lv_chart_series_t *
ser, uint16_t id);
2020-06-15 17:15:05 +01:00
DaPa
585bc329e6 Code comments spelling fixes
Also 2 files have tracing strings affected (shorter with 1 character):
 - lv_obj.c, 1078: LV_LOG_WARN
 - lv_hal_indev.c, 76: LV_LOG_WARN
2020-06-15 17:12:48 +03:00
Gabor Kiss-Vamosi
c20e62d472 lv_gaguge: make lv_gauge_get_angle_offset() offset the labels and needles too
Fixes #1579
2020-06-15 14:16:06 +02:00
Gabor Kiss-Vamosi
9260f9e0aa lv_btnm: fix sending events for hidden buttons 2020-06-14 21:07:42 +02:00
Gabor Kiss-Vamosi
8532bf80df Update CHANGELOG.md 2020-06-14 12:40:49 +02:00
Gabor Kiss-Vamosi
a2bb4099e6 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-06-14 12:39:35 +02:00
Gabor Kiss-Vamosi
182cbb1aa4 Update LV_OPA_MIN and LV_OPA_MAX to widien the opacity processed range
https://forum.lvgl.io/t/blending-fading-of-body-shadow/2466
2020-06-14 12:36:57 +02:00
nchurly
ccff331e3d Fix #1570: uninitialized variable in lv_draw_img.c (#1574) 2020-06-13 12:28:47 -04:00
OH1BDF
43cc512e5a Added functions to set multiple paddings and margins at once (#1565) 2020-06-12 07:28:11 -04:00
Carlos Diaz
a265165038 Add lv_win_add_btn_left (#1566)
Closes #1535
2020-06-12 07:26:59 -04:00
Themba Dube
8117a70608 Merge branch 'master' into dev 2020-06-12 07:23:47 -04:00
Gabor Kiss-Vamosi
dca12fcd7a Update CHANGELOG.md 2020-06-10 10:14:12 +02:00
Gabor Kiss-Vamosi
e2dabe167d Merge pull request #1562 from arturv2000/MaxMemUsed
Added max_used propriety to lv_mem_monitor_t struct
2020-06-10 10:13:34 +02:00
Gabor Kiss-Vamosi
14a359679a Update CHANGELOG.md 2020-06-09 13:41:24 +02:00
Gabor Kiss-Vamosi
3b111c794c Merge pull request #1561 from microwavesafe/master
Remove dependency on ST CubeMX Hal
2020-06-09 13:40:41 +02:00
Gabor Kiss-Vamosi
1ca1934dbe Merge pull request #1563 from C47D/update_spinner
lv_spinner: Replace remaining pre loader references with spinner
2020-06-09 13:28:53 +02:00
arturv2000
ce8d333407 Update src/lv_misc/lv_mem.c
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2020-06-09 09:46:42 +01:00
microwavesafe
71e23c4e13 Added example include defines 2020-06-09 09:45:12 +01:00
C47D
84776ca5f7 lv_spinner: Replace remaining pre loader references with spinner 2020-06-08 18:12:21 -05:00
arturv2000
91acf877c6 Attempt to correct error in tests 2020-06-08 21:00:12 +01:00
artur.vieira
0ebcf7e266 Added Max Used propriety to lv_mem_monitor_t struct 2020-06-08 20:22:06 +01:00
andrew
3c70a1b5a2 Fixed typo in include define
Added help in lv_conf_template.h
2020-06-08 18:36:30 +01:00
Gabor Kiss-Vamosi
4effebb3ea Update README.md 2020-06-08 16:41:06 +02:00
Gabor Kiss-Vamosi
9eff0d1cd8 Update CHANGELOG.md 2020-06-08 16:36:16 +02:00
Gabor Kiss-Vamosi
07ddc9bf8a Update CONTRIBUTING.md 2020-06-08 16:14:33 +02:00
Gabor Kiss-Vamosi
9048bcc6a0 Update README.md 2020-06-08 15:51:18 +02:00
Gabor Kiss-Vamosi
94b2e0f1a3 Update CHANGELOG.md 2020-06-08 14:16:25 +02:00
Gabor Kiss-Vamosi
a62b03743d Merge pull request #1560 from DeonMarais64/master
Add lv_btnmatrix_set/get_align capability
2020-06-08 14:15:49 +02:00
Gabor Kiss-Vamosi
4754935038 Update CHANGELOG.md 2020-06-08 14:15:14 +02:00
Gabor Kiss-Vamosi
ee44433f86 Merge pull request #1522 from fhorinek/encoder-buttons
Encoder input proc support for buttons
2020-06-08 14:14:32 +02:00
Gabor Kiss-Vamosi
9c8c8aee72 update CHANGLEOG 2020-06-08 14:13:33 +02:00
Gabor Kiss-Vamosi
2739753f20 Merge pull request #1509 from fhorinek/master
Added focus parent for v7
2020-06-08 14:11:40 +02:00
Gabor Kiss-Vamosi
14de809fa5 fix warings 2020-06-08 14:10:30 +02:00
Gabor Kiss-Vamosi
06fa5b3b8f fix conflicts 2020-06-08 14:02:04 +02:00
Gabor Kiss-Vamosi
1b9ccf9cc6 add the dev branch to CI 2020-06-08 13:56:45 +02:00
Gabor Kiss-Vamosi
36e825f093 Update README.md 2020-06-08 13:51:19 +02:00
Gabor Kiss-Vamosi
13a53d077d lv_textarea: fix character delete in password mode 2020-06-08 13:23:41 +02:00
Gabor Kiss-Vamosi
479851e968 : restructure to allow asserting in from too 2020-06-08 13:10:56 +02:00
andrew
0867f72cb9 Rename attribute define to match existing options style
Moved static array declaration to top of file
Added attribute define to template and checker headers
2020-06-08 08:40:50 +01:00
embeddedt
df08d0bd54 Fix old documentation link in lv_conf_template.h
https://forum.lvgl.io/t/lv-conf-template-h-font-usage-points-to-wrong-domain/2424
2020-06-05 17:08:00 -04:00
andrew
bb5c6437ff Added GPU init to lv_init
Changed blend buffer attr to more general LV_DMA_ATTR
Added define for CMSIS header
Fixed bug with turning on peripheral clock
2020-06-05 14:04:52 +01:00
Gabor Kiss-Vamosi
e1af20997d : fix if not the {0;0} tile is created first 2020-06-05 12:31:02 +02:00
andrew
cd9f34076e Modified DMA2D fill, copy and blend functions to use direct
register writes
2020-06-05 11:10:51 +01:00
andrew
0d897136c9 Added LV_BLEND_BUF_ATTR as blend_buf MUST be in DMA accessible RAM 2020-06-05 11:10:11 +01:00
Deon Marais
0e1b02e328 Add lv_btnmatrix_set/gett_align capability 2020-06-05 12:05:34 +02:00
Deon Marais
e3b5a14275 Add align-member and set/get functions 2020-06-05 11:58:33 +02:00
Gabor Kiss-Vamosi
643bc92958 fix warning 2020-06-05 11:06:32 +02:00
Gabor Kiss-Vamosi
1c88c1e8d4 lv_dropdown: fix missing event when used with encoder 2020-06-05 10:54:13 +02:00
Gabor Kiss-Vamosi
c3f051ac52 Add log in true double buffering mode with 2020-06-05 10:43:26 +02:00
Gabor Kiss-Vamosi
673c493694 include the version number in lv_conf_template.h
https://forum.lvgl.io/t/add-lvgl-version-to-lv-conf-h/2396/3
2020-06-05 10:36:16 +02:00
embeddedt
4f3dac6477 Fix #1557: use of uninitialized linked list 2020-06-04 09:51:26 -04:00
Gabor Kiss-Vamosi
d667e9d221 Update CHANGELOG.md 2020-06-04 11:58:32 +02:00
Gabor Kiss-Vamosi
21e4427e57 theme material: fix list button focus. 2020-06-04 11:56:57 +02:00
Gabor Kiss-Vamosi
7d29b40425 fix crash when text area cleared. Fixes #1556 2020-06-04 11:47:53 +02:00
Gabor Kiss-Vamosi
93055bc57c Do not call for transparent pixel 2020-06-04 11:47:53 +02:00
Gabor Kiss-Vamosi
d5a3b81737 fix gestures 2020-06-04 11:47:53 +02:00
Gabor Kiss-Vamosi
950ac3b993 Merge pull request #1553 from MiSimon/issue_deinit_log
Write to logfile before setting the log callback to NULL
2020-06-03 15:34:35 +02:00
MiSimon
beb496e3ed Write to logfile before setting the log callback to NULL 2020-06-03 12:37:43 +02:00
Pete Bone
822435748a Fix compiler waring in lv_ll.c (#1550) 2020-06-02 07:27:36 -04:00
Gabor Kiss-Vamosi
140904e201 fix build error 2020-06-02 11:03:00 +02:00
Gabor Kiss-Vamosi
25b4d9c34d Update README.md 2020-06-02 08:54:58 +02:00
Gabor Kiss-Vamosi
a49e7e8295 improve size rounding to 4 or 8 in lv_mem, and lv_ll 2020-06-02 08:51:22 +02:00
Gabor Kiss-Vamosi
542fa7e76d linked list: simplify settings next/prev node
https://forum.lvgl.io/t/data-abort-at-start-lvgl-v7-0-compiled-with-full-speed-optimisation-only/2286/25
2020-06-02 08:44:04 +02:00
Gabor Kiss-Vamosi
28f4092247 label: fix lv_label_get_letter_on if BIDI enabled 2020-06-02 07:13:41 +02:00
Gabor Kiss-Vamosi
6adcdda06a fix minor warings 2020-06-01 22:56:10 +02:00
Gabor Kiss-Vamosi
d953d2b9fe Update CHANGELOG.md 2020-06-01 22:44:46 +02:00
Gabor Kiss-Vamosi
7040084fbd Merge pull request #1545 from pete-pjb/32bit_idx
Change all text related indices from 16-bit to 32-bit integers throughout whole library.
2020-06-01 22:44:30 +02:00
Gabor Kiss-Vamosi
6921d872a3 remove debig code 2020-06-01 22:31:30 +02:00
Gabor Kiss-Vamosi
1544bd7b07 relase script: fix wontg file name (lv_version.h instead of lvgl.h) 2020-06-01 22:28:59 +02:00
Gabor Kiss-Vamosi
d28ac991ec update version number in lvgl.h 2020-06-01 22:25:28 +02:00
Gabor Kiss-Vamosi
9c90130fb3 Update CHANGELOG.md 2020-06-01 22:23:53 +02:00
Mike Fellows
765a97383a Fix visual studio compile errors in lv_anim code
unary negation operator was being applied to an usigned int in three
places.  I'm not sure what the other compilers are doing to accept
the current code , but I have cast the unsigned ints to a signed one
before applying the unary operator.
2020-06-01 22:23:53 +02:00
Gabor Kiss-Vamosi
5cb287c3c7 Update CHANGELOG.md 2020-06-01 22:23:53 +02:00
Gabor Kiss-Vamosi
32eebbbc0c Update CHANGELOG.md 2020-06-01 22:23:53 +02:00
Gabor Kiss-Vamosi
a535b43290 Release v7.0.1 2020-06-01 22:23:53 +02:00
Gabor Kiss-Vamosi
63b1f6805a lv_ta: fix wrong cursor positon when clicked after the last character 2020-06-01 22:23:53 +02:00
Gabor Kiss-Vamosi
884e00ee8f rename release_patch.py to release.py 2020-06-01 21:12:29 +02:00
Gabor Kiss-Vamosi
f3d8d98807 extend the release script with lv_examples and lv_drivers handling 2020-06-01 21:11:46 +02:00
Gabor Kiss-Vamosi
4d8ae98621 Merge pull request #1542 from MCF/vs-compile-error-fixes
Fix visual studio compile errors in lv_anim code
2020-06-01 21:06:36 +02:00
Gabor Kiss-Vamosi
e8a0413ad5 Update CHANGELOG.md 2020-06-01 20:39:59 +02:00
Gabor Kiss-Vamosi
ff7e8ea315 Update CHANGELOG.md 2020-06-01 20:39:03 +02:00
Gabor Kiss-Vamosi
91b997769e Release v7.0.1 2020-06-01 20:28:32 +02:00
Gabor Kiss-Vamosi
6654444e0f update release script 2020-06-01 20:23:07 +02:00
PeterB
3561d9e063 Changed all text related indices from 16 bit to 32 bit integers. 2020-06-01 17:51:47 +01:00
Themba Dube
c5c5b2a393 lv_printf: condition floating-point on value not definition 2020-06-01 12:08:48 -04:00
Themba Dube
0c4c6cf199 lv_printf: expose floating-point configuration option 2020-06-01 12:08:08 -04:00
PeterB
a0583f6feb Merge remote-tracking branch 'origin/master' into 32bit_idx 2020-06-01 12:31:14 +01:00
Themba Dube
0673dd0b12 Change dropdown to use 32-bit indexes 2020-06-01 07:18:31 -04:00
Gabor Kiss-Vamosi
ef1242f234 Update LICENCE.txt 2020-05-31 23:03:38 +02:00
Gabor Kiss-Vamosi
f8c7485d82 Update CHANGELOG.md 2020-05-31 22:54:40 +02:00
Gabor Kiss-Vamosi
88b54456ef Update README.md 2020-05-31 21:46:12 +02:00
Gabor Kiss-Vamosi
2be298fc3f Update README.md 2020-05-31 21:45:36 +02:00
Themba Dube
af812b0c55 keyboard: allow backspace to auto-repeat in numeric mode (lv_examples#58) 2020-05-31 08:33:21 -04:00
Mike Fellows
09fb1e60e3 Fix visual studio compile errors in lv_anim code
unary negation operator was being applied to an usigned int in three
places.  I'm not sure what the other compilers are doing to accept
the current code , but I have cast the unsigned ints to a signed one
before applying the unary operator.
2020-05-30 13:05:25 -07:00
Mike Fellows
4575fec915 Fix a few links in README (#1541)
* To some of the simulator/IDE github projects
* To the one of the STM32F7 github projects
2020-05-30 09:13:53 -04:00
Gabor Kiss-Vamosi
4c3db9e02f clarify the usage of template theme 2020-05-29 06:42:29 +02:00
embeddedt
99f1d1bc7a Remove duplicate docs link 2020-05-28 19:22:28 -04:00
Gabor Kiss-Vamosi
ec5b10142f add lv_obj_remove_style 2020-05-28 07:58:10 +02:00
Gabor Kiss-Vamosi
8d5dfa1ec2 chart: fix X tick drawing 2020-05-28 07:57:47 +02:00
Gabor Kiss-Vamosi
27ef3a1d07 fix chart x axix label drawing 2020-05-28 07:52:00 +02:00
Gabor Kiss-Vamosi
91f8b3060e fix verical dashed line 2020-05-28 07:52:00 +02:00
Gabor Kiss-Vamosi
86307c669f remove leftover code 2020-05-27 16:39:00 +02:00
Gabor Kiss-Vamosi
207ec2997f DMA2D: minor fix with double buffering 2020-05-27 16:21:35 +02:00
Gabor Kiss-Vamosi
65c9b64f9a Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-05-27 16:01:14 +02:00
Gabor Kiss-Vamosi
70162562b2 speed up true double buffering 2020-05-27 16:00:56 +02:00
tgillbe
25a5623e77 Fix lv_slider knob size off-by-one bug (#1531) 2020-05-27 09:19:54 -04:00
Gabor Kiss-Vamosi
4f386f19fe chart: fix y axis label drawing 2020-05-27 11:59:39 +02:00
Gabor Kiss-Vamosi
2be22d3bef list: leaving edit mode with encoder 2020-05-27 11:22:01 +02:00
Gabor Kiss-Vamosi
0a9d8a6133 remove memcpy from lv_ll 2020-05-27 10:36:24 +02:00
Gabor Kiss-Vamosi
6a35a384b8 Merge branch 'encoder-buttons' of https://github.com/fhorinek/lvgl into fhorinek-encoder-buttons 2020-05-27 10:35:58 +02:00
Gabor Kiss-Vamosi
a8904b39ea Merge pull request #1529 from lvgl/kisvegabor-patch-1
Update README.md - CLA test again
2020-05-27 10:09:32 +02:00
Gabor Kiss-Vamosi
08bd2ae669 Update README.md 2020-05-27 10:08:17 +02:00
Gabor Kiss-Vamosi
65a0046891 Merge pull request #1528 from lvgl/kisvegabor-patch-1
Update README.md - Test CLA
2020-05-27 10:03:08 +02:00
Gabor Kiss-Vamosi
421e1fc9f8 Update README.md 2020-05-27 10:01:51 +02:00
Gabor Kiss-Vamosi
306405bcff Merge branch 'master' into speed/shadow 2020-05-26 11:00:09 +02:00
Gabor Kiss-Vamosi
7fb49693f4 minor speed up on rectangle drawing 2020-05-26 10:59:49 +02:00
Gabor Kiss-Vamosi
19c3f9306f improve DMA2D blending dupport 2020-05-26 10:59:29 +02:00
Gabor Kiss-Vamosi
b056315410 add LV_COLOR_MIX_ROUND_OFS to adjust color mix to GPU's algorithms 2020-05-26 10:58:52 +02:00
František Horínek
691ce77800 Modified version for encoder input proc.
Now you can also pass buttons LEFT/RIGHT to emulate the encoder, good for joysticks or small keypads.
All other keys are passed trought.
2020-05-25 15:51:20 +02:00
Gabor Kiss-Vamosi
966b4b11f6 lv_color_mix_with_alpha: fix initialization 2020-05-25 12:44:54 +02:00
Gabor Kiss-Vamosi
b4de4c5ca1 remove dead code 2020-05-25 12:42:38 +02:00
Gabor Kiss-Vamosi
0072a2ade5 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-05-25 11:55:12 +02:00
Gabor Kiss-Vamosi
eda752ab94 add lv_theme_get_color_secondary 2020-05-25 11:49:04 +02:00
Gabor Kiss-Vamosi
89206c51c3 optimize shdow drawing 2020-05-25 11:13:13 +02:00
Gabor Kiss-Vamosi
21a172ca0d Update README.md 2020-05-25 09:29:17 +02:00
Gabor Kiss-Vamosi
2e64db0261 Update README.md 2020-05-25 08:29:57 +02:00
Gabor Kiss-Vamosi
b4b37b98aa Update README.md 2020-05-25 06:41:06 +02:00
Gabor Kiss-Vamosi
dfb7c6731c Update CODING_STYLE.md 2020-05-25 06:35:00 +02:00
Gabor Kiss-Vamosi
2078e4a01a Update CONTRIBUTING.md 2020-05-25 06:26:30 +02:00
Gabor Kiss-Vamosi
11c80b626c Update CONTRIBUTING.md 2020-05-25 06:26:04 +02:00
Gabor Kiss-Vamosi
e3f63e09cf Update CONTRIBUTING.md 2020-05-25 06:24:33 +02:00
Gabor Kiss-Vamosi
07efe31ff4 Update CONTRIBUTING.md 2020-05-25 06:23:12 +02:00
Gabor Kiss-Vamosi
3837988f2d README: change littlevgl to lvgl 2020-05-25 05:54:38 +02:00
Gabor Kiss-Vamosi
5ea142eaf0 Update config.yml 2020-05-25 05:44:24 +02:00
Gabor Kiss-Vamosi
38944883b1 Update config.yml 2020-05-25 05:44:01 +02:00
Gabor Kiss-Vamosi
ab6d69445e Create config.yml 2020-05-25 05:40:04 +02:00
Gabor Kiss-Vamosi
6c34280b66 Merge pull request #1520 from rene-dev/master
fixed RGB palette name in config template
2020-05-24 13:58:04 +02:00
Gabor Kiss-Vamosi
279e594d3e minor formatting 2020-05-24 13:14:42 +02:00
Gabor Kiss-Vamosi
a2c973bd5b fix warings 2020-05-24 13:13:07 +02:00
Rene Hopf
96ba7df9d3 fixed RGB palette name in config template 2020-05-24 01:38:05 +02:00
Gabor Kiss-Vamosi
7e4e5b7271 Merge branch 'master' of https://github.com/fhorinek/lvgl into fhorinek-master 2020-05-23 14:54:18 +02:00
Gabor Kiss-Vamosi
1666c8cb4f handle focus_parent in pointer indevs 2020-05-23 14:53:23 +02:00
Gabor Kiss-Vamosi
1c9830b715 Update README.md 2020-05-23 14:41:11 +02:00
Gabor Kiss-Vamosi
b10dece511 Update README.md 2020-05-23 14:14:02 +02:00
Gabor Kiss-Vamosi
d8a37e8fd8 update themes to avoid garbage collection of styles 2020-05-22 22:36:24 +02:00
Gabor Kiss-Vamosi
2ea96eaf83 fix warning 2020-05-22 22:05:51 +02:00
Gabor Kiss-Vamosi
a8a3c2a3c7 minor rework on button states 2020-05-22 21:45:11 +02:00
Gabor Kiss-Vamosi
ab4d8c9165 fix infinite roller with encoder 2020-05-22 21:36:22 +02:00
František Horínek
8f19010b17 Update src/lv_core/lv_obj.c
Co-authored-by: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2020-05-21 17:27:37 +02:00
Gabor Kiss-Vamosi
4fade082e5 Merge branch 'master' of https://github.com/fhorinek/lvgl into fhorinek-master 2020-05-21 15:17:19 +02:00
Gabor Kiss-Vamosi
2a78353ca4 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-05-21 15:17:07 +02:00
Gabor Kiss-Vamosi
efaf84f6f7 fix material theme init 2020-05-21 15:13:14 +02:00
Gabor Kiss-Vamosi
6f5b756786 update old function names 2020-05-21 15:01:34 +02:00
Gabor Kiss-Vamosi
bebe1f07df img_draw: fix releasing buffer with DMA2D 2020-05-21 14:23:03 +02:00
František Horínek
b23d945ed4 changed behavior to focus_parent flag 2020-05-21 14:09:56 +02:00
Gabor Kiss-Vamosi
82ad0f0c5c img drawing fixes with 32 bit color depth 2020-05-21 12:46:04 +02:00
Gabor Kiss-Vamosi
f248d47a36 fix typo 2020-05-21 11:33:07 +02:00
Gabor Kiss-Vamosi
fa58aed475 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-05-21 11:28:00 +02:00
Gabor Kiss-Vamosi
4eb2340f2a img: fix cover check 2020-05-21 11:27:52 +02:00
Gabor Kiss-Vamosi
474b8e0920 CJK: fix built-in SimSun font and wrong UTF-8 decoding in Arabic processor 2020-05-21 10:40:16 +02:00
Gabor Kiss-Vamosi
c77ab45dd3 add material theme to GC_ROOTS 2020-05-21 09:37:37 +02:00
Gabor Kiss-Vamosi
76ae5934ba Update library.json 2020-05-20 14:50:02 +02:00
Amir Gonnen
8233483477 Add missing LV_GC_INCLUDE (#1511) 2020-05-19 20:15:49 -04:00
František Horínek
10ca6d4215 replaced #ifdef to #if 2020-05-19 15:45:09 +02:00
František Horínek
2712f0aeaa Added macro LV_USE_GROUP_FOCUS_PARENT to automatic tests 2020-05-19 15:31:34 +02:00
František Horínek
aaa78ba949 Added focus parent for v7 2020-05-19 15:22:38 +02:00
Gabor Kiss-Vamosi
080d06b838 fix lv_misc.mk. Fixes: #1508 2020-05-19 14:56:14 +02:00
Gabor Kiss-Vamosi
00176b2c7e rename _mask_list to lv_draw_mask_list 2020-05-19 13:29:21 +02:00
Gabor Kiss-Vamosi
f2ff87f820 add LV_DC_ROOT prefix to _mask_list 2020-05-19 13:27:19 +02:00
Gabor Kiss-Vamosi
6a10f3e116 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-05-19 13:20:38 +02:00
Gabor Kiss-Vamosi
38ae98a565 move (draw) mask_list to gc roots 2020-05-19 13:20:29 +02:00
Gabor Kiss-Vamosi
f2be14868e Update README.md 2020-05-19 11:35:18 +02:00
Gabor Kiss-Vamosi
e6829f6d4b Update CHANGELOG.md 2020-05-19 10:59:21 +02:00
Gabor Kiss-Vamosi
469b676237 Update CHANGELOG.md 2020-05-19 10:57:50 +02:00
Gabor Kiss-Vamosi
5e4456335a Update README.md 2020-05-19 10:57:07 +02:00
Gabor Kiss-Vamosi
46376a4a11 set version number to 7.0.1-dev 2020-05-19 10:31:49 +02:00
Gabor Kiss-Vamosi
72c79b58a8 disable LV_MEM_JUNK 2020-05-19 10:31:13 +02:00
Gabor Kiss-Vamosi
de0d93c47e Update ccpp.yml 2020-05-18 19:05:48 +02:00
Gabor Kiss-Vamosi
e6f89ad799 Update CHANGELOG.md 2020-05-18 17:37:04 +02:00
Gabor Kiss-Vamosi
857ff5e8ed Update CHANGELOG.md 2020-05-18 17:36:36 +02:00
Gabor Kiss-Vamosi
ee6c5e3399 run code formatter 2020-05-18 16:57:23 +02:00
Gabor Kiss-Vamosi
5c7e9bb932 minor fixes 2020-05-18 16:52:23 +02:00
Gabor Kiss-Vamosi
0f95c5b29b comment update littlevgl -> lvgl 2020-05-18 14:55:39 +02:00
Gabor Kiss-Vamosi
382f428a0e keyboard: fix invalid assertatin 2020-05-18 11:46:02 +02:00
Gabor Kiss-Vamosi
a91041bcf7 suppress doxygen warnings 2020-05-18 11:03:10 +02:00
Gabor Kiss-Vamosi
4fb0a5da21 img: remove debug code 2020-05-18 11:02:45 +02:00
Gabor Kiss-Vamosi
f6b759dc71 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-05-18 10:48:21 +02:00
Themba Dube
6e1d53e11e Merge remote-tracking branch 'origin/master' into dev-7.0 2020-05-15 13:48:25 -04:00
Bill Hargen
7ac9388aed Fix #1498: lv_label_set_text() crash (#1499)
This routine tried to optimize a special case of setting the label text to the same address as previously set, but it did not consider whether the prior set was static and tried to realloc non-allocated memory.
2020-05-15 13:42:50 -04:00
Gabor Kiss-Vamosi
486197955b Update CONTRIBUTING.md 2020-05-15 15:00:10 +02:00
Gabor Kiss-Vamosi
69e2f32984 Update README.md 2020-05-15 14:44:25 +02:00
Gabor Kiss-Vamosi
5fe03c34f5 Update README.md 2020-05-15 14:43:45 +02:00
Gabor Kiss-Vamosi
af312fd2ba checkbox: set bullet size with padding 2020-05-14 11:29:49 +02:00
Gabor Kiss-Vamosi
ac52b502a2 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-05-14 11:14:43 +02:00
Gabor Kiss-Vamosi
f00d17b496 update the comments of lv_draw_label 2020-05-14 11:14:34 +02:00
Gabor Kiss-Vamosi
f252edb5c1 material theme, dropdown: enable corner clip on the list 2020-05-14 09:36:44 +02:00
Gabor Kiss-Vamosi
e45cd3c31c fix build error with dma2d 2020-05-13 14:47:33 +02:00
Gabor Kiss-Vamosi
0f8513bf77 Merge pull request #1496 from ValentiWorkLearning/dev-7.0
Fixed implicit casting from void* in lv_imgbuf.h
2020-05-13 14:19:55 +02:00
Gabor Kiss-Vamosi
97392f4fdf reduce API size: add underscore prefix to internal functions 2020-05-13 14:11:16 +02:00
Valentyn Korniienko
74a0b0dab2 Fixed implicit casting from void* in lv_imgbuf.h 2020-05-13 14:58:57 +03:00
Gabor Kiss-Vamosi
79329bdb45 revert font decompression optmiziation 2020-05-13 13:24:38 +02:00
Gabor Kiss-Vamosi
d7940734b8 page: fix scrollbar visibility 2020-05-13 01:09:29 +02:00
Gabor Kiss-Vamosi
d9ebf93836 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-05-13 01:06:10 +02:00
Gabor Kiss-Vamosi
eda4ef8042 optimize color fill with 16 color depth 2020-05-13 01:06:01 +02:00
Gabor Kiss-Vamosi
9b598ec306 fix typo 2020-05-12 21:37:01 +02:00
Gabor Kiss-Vamosi
93e8dd7a2c minor refactoring 2020-05-12 21:30:14 +02:00
Gabor Kiss-Vamosi
a78687ee5d add LV_USE_API_EXTENSION_V6 and LV_USE_IMG_TRANSFORM config options 2020-05-12 21:29:16 +02:00
Gabor Kiss-Vamosi
a1db29b9a2 img: clip corner fixes 2020-05-12 15:00:58 +02:00
Gabor Kiss-Vamosi
52644c2604 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-05-12 13:57:49 +02:00
Gabor Kiss-Vamosi
34b20b307b btn: lower deafult height 2020-05-12 13:57:43 +02:00
Gabor Kiss-Vamosi
42c5794a05 optimize image zoom 2020-05-12 13:56:40 +02:00
Gabor Kiss-Vamosi
d2a0fb8351 minor fixes 2020-05-12 12:17:15 +02:00
Gabor Kiss-Vamosi
48914aaa7c Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-05-12 10:55:05 +02:00
Gabor Kiss-Vamosi
8f0418d194 dropdown: set list width to button 2020-05-12 10:54:51 +02:00
Gabor Kiss-Vamosi
ecc23babc5 Merge pull request #1495 from amirgon/dev-7.0
Replace lv_point_t* to lv_point_t[] to represent point array
2020-05-12 00:39:02 +02:00
Amir Gonnen
3f32911b90 Replace lv_point_t* to lv_point_t[] to represent point array
Needed for Micropython Bindings to identify the argument as an array instead of a pointer to a single lv_point_t
2020-05-12 01:08:50 +03:00
Themba Dube
6c1f784d25 Merge branch 'dev-7.0' of github.com:littlevgl/lvgl into dev-7.0 2020-05-11 12:59:07 -04:00
Georgi Momchilov
18834904ef Update lv_draw_label.c (#1494) 2020-05-11 08:35:49 -04:00
Gabor Kiss-Vamosi
ba5663d3d3 rename LV_DROPDOWN_PART_SCRLBAR to LV_DROPDOWN_PART_SCROLLBAR 2020-05-11 12:34:03 +02:00
Gabor Kiss-Vamosi
d819aa0e4e fix memory corruption in draw_label 2020-05-11 12:32:26 +02:00
Gabor Kiss-Vamosi
ecb5637d9d improve mono theme 2020-05-11 10:28:18 +02:00
Gabor Kiss-Vamosi
b933e5e1ba Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-05-11 10:21:55 +02:00
Gabor Kiss-Vamosi
d6db1ed511 draw label fix huge memory usage 2020-05-11 10:21:37 +02:00
Gabor Kiss-Vamosi
eaeb362001 optimize lv_mem_buf uage 2020-05-11 10:21:23 +02:00
Kowalski Dark
61bafdb37f Fix typos in header comment (#1493) 2020-05-08 12:49:11 -04:00
embig71
a4ed5369c2 Correct computation from #1490 for vertically oriented slider (#1492) 2020-05-08 12:48:20 -04:00
Gabor Kiss-Vamosi
72988117d5 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-05-08 13:04:59 +02:00
Gabor Kiss-Vamosi
a760baa869 material theme minor improvements 2020-05-08 13:04:28 +02:00
Gabor Kiss-Vamosi
a026a5b61d fix assert during obj. creation 2020-05-08 12:39:10 +02:00
Gabor Kiss-Vamosi
25aadd4ae9 fix typo in e6f498a2 2020-05-08 12:38:54 +02:00
Gabor Kiss-Vamosi
38a42fa954 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-05-08 12:30:11 +02:00
Gabor Kiss-Vamosi
e6f498a2da lv_disp_drv_register: fix referencing uninitialized varaible 2020-05-08 12:29:59 +02:00
Gabor Kiss-Vamosi
2500c65506 dma2d fix 2020-05-08 12:09:57 +02:00
Gabor Kiss-Vamosi
f387e1af37 dma2d fixes for F4 2020-05-08 11:53:40 +02:00
Gabor Kiss-Vamosi
2b9608d128 optimize material theme for small displays 2020-05-08 11:53:28 +02:00
Gabor Kiss-Vamosi
341e99587b remove extra file created during merging 2020-05-08 10:25:53 +02:00
Gabor Kiss-Vamosi
9dd387b23e remove bidi.h from lvgl.h 2020-05-08 08:44:31 +02:00
Themba Dube
ceae45ed64 Merge branch 'dev-7.0' of github.com:littlevgl/lvgl into dev-7.0 2020-05-07 16:37:00 -04:00
Themba Dube
5f1b6bc281 Add lv_roller_set_fix_width to API map 2020-05-07 16:36:51 -04:00
Gabor Kiss-Vamosi
33df0e6470 merge master 2020-05-07 16:04:50 +02:00
Gabor Kiss-Vamosi
7aaa092efd Merge pull request #1490 from BillHargen/master
Correct computation of slider value while pressed
2020-05-07 16:03:43 +02:00
Gabor Kiss-Vamosi
232d22c148 fix conflicts 2020-05-07 16:01:48 +02:00
Gabor Kiss-Vamosi
9975036bb2 formatting 2020-05-07 15:56:07 +02:00
Bill Hargen
695c33147b Correct computation of slider value while pressed 2020-05-07 09:39:32 -04:00
Anton Konev
6a96e07f18 Minor fixes (#1488)
* lvgl/lv_onjx/lv_chart: fixed variable type (uint8_t was compared with 256)

* lvgl/lv_core/lv_refr: fixed double assignemnt

Co-authored-by: anton.konev <anton.konev@planarchel.ru>
2020-05-07 07:44:02 -04:00
Gabor Kiss-Vamosi
bc994c60ee minor fixes 2020-05-06 21:39:45 +02:00
Gabor Kiss-Vamosi
0c6d0d48a3 run code formater 2020-05-06 20:08:46 +02:00
Gabor Kiss-Vamosi
835ed44029 fix warnings 2020-05-06 20:05:53 +02:00
Gabor Kiss-Vamosi
d1f1332555 minor renames and fixes 2020-05-06 20:05:53 +02:00
Gabor Kiss-Vamosi
27621e0945 fix drawing of abnormal arcs 2020-05-06 20:05:53 +02:00
Gabor Kiss-Vamosi
d6b85d16cf page: copy styles in create 2020-05-06 10:55:33 +02:00
Gabor Kiss-Vamosi
64fdfbe13f bar: handle border_post style property 2020-05-06 10:55:21 +02:00
Gabor Kiss-Vamosi
18010c2eaa chart: fix overflow in tick drawing 2020-05-06 09:40:41 +02:00
Gabor Kiss-Vamosi
8e87fc4620 minor fixes 2020-05-06 09:27:38 +02:00
Gabor Kiss-Vamosi
12919453d3 free the buffer of font decompression 2020-05-06 09:27:28 +02:00
Themba Dube
adbc158a5c Merge branch 'dev-7.0' of github.com:littlevgl/lvgl into dev-7.0 2020-05-04 13:29:52 -04:00
fstengel
69b14a6146 indev_button_proc: fix crash if points array not set (#1486) 2020-05-04 09:56:13 -04:00
embeddedt
7d42f08431 Ensure table always updates if values change
https://forum.littlevgl.com/t/table-not-updating-values-v7-dev/2190
2020-05-04 08:40:01 -04:00
Themba Dube
95d5298ad9 Add some more 6.x compability macros 2020-05-02 18:36:52 -04:00
Amir Gonnen
1633b2e6db Guard USE AP prototypes with macro (#1485) 2020-05-02 18:23:52 -04:00
Gabor Kiss-Vamosi
1e59100ff2 fix build errors 2020-05-02 07:45:04 +02:00
Gabor Kiss-Vamosi
6337286959 image transform fixes 2020-05-01 20:48:16 +02:00
Gabor Kiss-Vamosi
ffa2970ae5 fixes with LV_COLOR_SCREEN_TRANSP 1 2020-05-01 20:30:28 +02:00
Gabor Kiss-Vamosi
fdb85fd9bd Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-05-01 16:54:25 +02:00
Gabor Kiss-Vamosi
c3361a67b2 fix lv_color_t with LV_COLOR_DEPTH 1 2020-05-01 16:54:13 +02:00
Themba Dube
a7c1d97164 Fix GPU support with STM32F746 2020-05-01 09:45:53 -04:00
Gabor Kiss-Vamosi
aad8667a9f run code formatter 2020-05-01 11:17:43 +02:00
Gabor Kiss-Vamosi
bdc98b4e1f minor fixes 2020-05-01 11:14:10 +02:00
Gabor Kiss-Vamosi
a42629f947 theme fixes 2020-05-01 11:04:15 +02:00
Gabor Kiss-Vamosi
4494fc8a5d fix makefile 2020-05-01 10:58:04 +02:00
Gabor Kiss-Vamosi
41c435b808 update lv_conf.h 2020-05-01 10:56:00 +02:00
Gabor Kiss-Vamosi
c0f15666bc change version number v7.0.0-rc 2020-05-01 10:35:43 +02:00
Gabor Kiss-Vamosi
0006edbb67 add LV_STYLE_TRANSFORM_ANGLE/ZOOM 2020-05-01 10:34:52 +02:00
Gabor Kiss-Vamosi
6d79d6d338 add built in persian, hebrew fonts 2020-05-01 10:22:41 +02:00
Gabor Kiss-Vamosi
3ac2c390c6 Merge branch 'feat/arabic' into dev-7.0 2020-05-01 09:51:17 +02:00
embeddedt
929bbcaee4 Fix misleading comment in lv_btnm
https://forum.littlevgl.com/t/comment-refers-to-nonexisting-function/2175
2020-04-30 10:36:54 -04:00
Gabor Kiss-Vamosi
52ecc4e608 Update CHANGELOG.md 2020-04-30 14:47:31 +02:00
Gabor Kiss-Vamosi
3810aadf0a Update CHANGELOG.md 2020-04-30 14:46:33 +02:00
Gabor Kiss-Vamosi
10926a445c Update CHANGELOG.md 2020-04-30 14:42:34 +02:00
Gabor Kiss-Vamosi
6b270c4fc4 fixes in changelog 2020-04-30 12:25:10 +02:00
Gabor Kiss-Vamosi
ff85904c18 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-30 11:27:27 +02:00
Gabor Kiss-Vamosi
6ad909687e add changelog 2020-04-30 11:27:22 +02:00
Gabor Kiss-Vamosi
240c42c227 win: fix button's size 2020-04-30 11:26:35 +02:00
Amir Gonnen
cea9d7be36 Remove unused function declaration (#1482) 2020-04-29 18:19:50 -04:00
Gabor Kiss-Vamosi
013e6e9b21 Merge pull request #1481 from Wielebny666/master
Adjusting min and max values to the number format
2020-04-29 14:46:29 +02:00
Wielebny666
c2404c307c Adjusting min and max values to the number format 2020-04-29 13:24:07 +02:00
Wielebny666
5e9dd93e76 Merge pull request #1 from littlevgl/master
Update
2020-04-29 12:14:55 +02:00
Gabor Kiss-Vamosi
7260eb71f0 Merge pull request #1480 from Wielebny666/master
Missing scroll bar modifier in tab
2020-04-29 12:10:50 +02:00
Gabor Kiss-Vamosi
af5ed425c0 fix comment of lv_tabview_clean 2020-04-29 11:17:57 +02:00
Gabor Kiss-Vamosi
bf034dc511 add LV_THEME_DEFAULT_INCLUDE to lv_conf.h 2020-04-29 10:37:12 +02:00
Gabor Kiss-Vamosi
52edcfece9 rename lv_tabview_clean to lv_tabview_clean_tab 2020-04-29 10:31:51 +02:00
Paweł Kurzawa
3c8c67a22e Missing scroll bar modifier in tab 2020-04-29 10:29:48 +02:00
Gabor Kiss-Vamosi
36934dcbbc btnmatrix: find the nearest button if clicked between buttons
https://forum.littlevgl.com/t/how-to-ignore-clicks-on-button-matrix-background-panel-which-cause-null-button-text/2158
2020-04-29 10:25:24 +02:00
Gabor Kiss-Vamosi
db2792d6d2 upade makefile fixes 2020-04-29 09:03:40 +02:00
Gabor Kiss-Vamosi
80a4613e59 fix build error and upadte lv_conf_template.h 2020-04-29 09:01:35 +02:00
Gabor Kiss-Vamosi
817e1ce530 place some functions to faster memory 2020-04-29 08:38:59 +02:00
Gabor Kiss-Vamosi
f9cde8e034 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-29 08:30:40 +02:00
Gabor Kiss-Vamosi
31198d52fb remove unused functions declarations 2020-04-29 08:29:45 +02:00
Amir Gonnen
9b0fd97587 Small fixes required for Micropython binding (#1479) 2020-04-28 19:25:39 -04:00
Gabor Kiss-Vamosi
ed318039d2 add CJK built-in font 2020-04-28 22:10:19 +02:00
Gabor Kiss-Vamosi
f14c387de3 minor api renames: set/get_static_text/options -> set/get_text/options_static 2020-04-28 21:07:10 +02:00
Gabor Kiss-Vamosi
1245411328 fix warning in themes 2020-04-28 20:51:18 +02:00
Gabor Kiss-Vamosi
a54d6a1752 DMA2D: invalidate cache only if enabled 2020-04-28 14:39:02 +02:00
Gabor Kiss-Vamosi
843fa5e304 DMA2D fix with 16 bit color depth 2020-04-27 21:07:15 +02:00
Gabor Kiss-Vamosi
c80a4d194f Merge branch 'dev-7.0' into speed/gpu 2020-04-27 14:53:17 +02:00
Gabor Kiss-Vamosi
ef0bd78d02 fix warnings 2020-04-27 13:16:35 +02:00
Gabor Kiss-Vamosi
e78fa9a7d1 optimize font decompression writer 2020-04-27 12:57:26 +02:00
Gabor Kiss-Vamosi
43e873108a introduce lv_anim_path_t to encapsulate the path cb 2020-04-27 11:51:18 +02:00
Gabor Kiss-Vamosi
930332ed99 indev: fix possible null pointer dereference 2020-04-26 10:18:49 +02:00
Wielebny666
271ec3f6ee Fix error in indev driver template (#1476) 2020-04-25 12:11:10 -04:00
Gabor Kiss-Vamosi
ef9955f01f Merge branch 'dev-7.0' into hamidrm-dev-7.0 2020-04-25 16:06:33 +02:00
Gabor Kiss-Vamosi
9fe050dcb9 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-25 16:05:20 +02:00
Gabor Kiss-Vamosi
28d2f8b223 material theme: fix tileview edge flash 2020-04-25 16:05:09 +02:00
Wielebny666
f7f675afd8 Fix compile warning in lv_spinbox_set_style (#1473)
discards 'const' qualifier from pointer
2020-04-25 07:52:08 -04:00
embeddedt
ac1680c53f Fix #1472: Ignore DISABLED state when counting button states 2020-04-24 20:24:34 -04:00
Gabor Kiss-Vamosi
15e064f4af fix conflict 2020-04-24 22:05:00 +02:00
Gabor Kiss-Vamosi
660d0d6000 minor fixes 2020-04-24 22:02:24 +02:00
Gabor Kiss-Vamosi
13dd42fd0b attempt to fix random freeze 2020-04-24 22:01:22 +02:00
Gabor Kiss-Vamosi
4502d7a879 fix build error 2020-04-24 20:51:11 +02:00
Gabor Kiss-Vamosi
36b05f5d1f Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-24 20:43:57 +02:00
Gabor Kiss-Vamosi
acd8b8c17f optimize table drawing by buffering row heights 2020-04-24 20:43:46 +02:00
Gabor Kiss-Vamosi
a98dab0171 optmize edge flash animation 2020-04-24 20:33:51 +02:00
Gabor Kiss-Vamosi
05813bb6e4 Merge pull request #1470 from xennex22/dev-7.0
Fixed compiler warnings and errors
2020-04-24 19:33:43 +02:00
xennex22
e27ad279ba Removed const from function parameter 2020-04-24 08:50:06 -07:00
xennex22
eb3287a75c Removed const from function parameter
Otherwise an error is generated with some compilers.  Passing a const parameter is the right way to do it, but all the obj and widget functions would need to be updated.
2020-04-24 08:49:37 -07:00
xennex22
31b5772028 Cast void pointers
C++ compilers will warn otherwise
2020-04-24 08:43:29 -07:00
xennex22
01630fcf57 Merge pull request #10 from littlevgl/dev-7.0
Dev 7.0
2020-04-24 08:38:38 -07:00
Gabor Kiss-Vamosi
d4384829c6 fix the addition of pressed and focused states 2020-04-24 12:34:17 +02:00
Gabor Kiss-Vamosi
5f528d53f1 dma2d fixes 2020-04-24 12:08:33 +02:00
Gabor Kiss-Vamosi
d98362a60d add disp_drv->wait_cb 2020-04-24 11:52:31 +02:00
Gabor Kiss-Vamosi
68f93723df modify display size limits 2020-04-24 11:32:38 +02:00
Gabor Kiss-Vamosi
c7da9ccd2c fix makefile 2020-04-23 20:51:23 +02:00
Gabor Kiss-Vamosi
f5ad2b3e14 uddate display size limit in lv_conf_templ.h 2020-04-23 20:39:47 +02:00
Gabor Kiss-Vamosi
97adb25879 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-23 15:45:21 +02:00
Gabor Kiss-Vamosi
3b869b0258 replace all memset with lv_memset 2020-04-23 15:45:08 +02:00
Gabor Kiss-Vamosi
479d31e5a7 replace all memcpy with lv_memcpy 2020-04-23 15:27:51 +02:00
Gabor Kiss-Vamosi
c149e5de54 fixes for encoder usage 2020-04-23 09:50:50 +02:00
xennex22
232bbc5270 Merge pull request #7 from littlevgl/dev-7.0
Dev 7.0
2020-04-22 08:12:53 -07:00
Gabor Kiss-Vamosi
88d5111994 Merge pull request #1468 from littlevgl/embeddedt-patch-2
Fix #1467: check whether object type is not NULL
2020-04-22 16:16:36 +02:00
embeddedt
d9f82dab53 Fix #1467: check whether object type is not NULL 2020-04-22 10:10:57 -04:00
Gabor Kiss-Vamosi
c340a7b580 minor fixes 2020-04-21 22:21:42 +02:00
Gabor Kiss-Vamosi
e31ac20d00 btn: allow disable state for ever "normal" state 2020-04-21 22:11:20 +02:00
Gabor Kiss-Vamosi
16e3c28f87 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-21 11:36:15 +02:00
Gabor Kiss-Vamosi
b3a8fb9650 minor renames and fixes 2020-04-21 11:36:05 +02:00
Gabor Kiss-Vamosi
8546de4f59 Merge pull request #1465 from xennex22/cpicker-fix
Fixed rect draw when wider then 360 pixels
2020-04-20 15:04:20 +02:00
Gabor Kiss-Vamosi
f1058bbfe0 remove file created when merging master 2020-04-20 14:52:10 +02:00
Gabor Kiss-Vamosi
44f2ca17fd add comments to GPU DMA2D functions 2020-04-20 14:36:35 +02:00
Gabor Kiss-Vamosi
d203c386b4 fix build error 2020-04-20 14:24:45 +02:00
Gabor Kiss-Vamosi
1995f6d58e merge master 2020-04-20 14:23:14 +02:00
xennex22
ce0f893fd7 Merge pull request #1 from xennex22/cpicker-fix
Fixed rect draw when wider then 360 pixels
2020-04-20 04:48:09 -07:00
xennex22
4767e168b5 Fixed rect draw when wider then 360 pixels 2020-04-19 15:41:44 -07:00
Gabor Kiss-Vamosi
cdf3628682 label: fix LV_LABEL_LONG_DOT 2020-04-19 22:44:45 +02:00
Gabor Kiss-Vamosi
101470488b label: clip text to the real area while drawing (respect padding) 2020-04-19 22:28:49 +02:00
Gabor Kiss-Vamosi
60aa0e03a7 remove Azure pipeline config file to use GitHub CI instead 2020-04-19 14:21:44 +02:00
Gabor Kiss-Vamosi
140a8b3a9a enable GitHub CI for dev-7.0 2020-04-19 14:20:22 +02:00
Gabor Kiss-Vamosi
610bee373a test github ci 2020-04-19 14:04:04 +02:00
Gabor Kiss-Vamosi
a5acbbe827 minor fixes 2020-04-18 21:36:19 +02:00
Gabor Kiss-Vamosi
50975c6140 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-18 21:26:49 +02:00
Gabor Kiss-Vamosi
b7cb6f9995 speed up lv_list_add_btn 2020-04-18 21:17:48 +02:00
embeddedt
40595e4052 Fix #1460: incorrect type name for C++ macro 2020-04-17 21:03:19 -04:00
embeddedt
e6f817e545 Fix swapped comments in lv_slider.h 2020-04-17 09:06:39 -04:00
Gabor Kiss-Vamosi
b196b2c400 Merge pull request #1450 from dykeag/patch-1
More reliable determination of architecture size
2020-04-17 14:56:30 +02:00
Gabor Kiss-Vamosi
202fca3d8e Merge pull request #1459 from littlevgl/tabview_inactive
lv_tabview: respect tab button's inactive state
2020-04-17 14:52:43 +02:00
embeddedt
a1e8fd578f lv_tabview: respect tab button's inactive state 2020-04-17 08:10:31 -04:00
Gabor Kiss-Vamosi
f06038b9c8 fix build error after renames 2020-04-17 13:37:03 +02:00
Gabor Kiss-Vamosi
0ad596ecd6 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-17 13:34:45 +02:00
Gabor Kiss-Vamosi
5007e52fb6 minor renames for Micropython binding 2020-04-17 13:34:27 +02:00
小米-黄齐
9916253a6e Fix build warnings (#1457)
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: Iab6b1c9d64a865b16b6e39ddeaf7d7295ef74060

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
2020-04-17 07:20:40 -04:00
Gabor Kiss-Vamosi
be80438c92 Merge pull request #1452 from littlevgl/task_repeat_count
Add lv_task_set_repeat_count API
2020-04-17 12:53:42 +02:00
Gabor Kiss-Vamosi
bd7c0ad261 fix include path in lv_font_ap_18.c 2020-04-17 11:38:36 +02:00
Gabor Kiss-Vamosi
f56b43d019 update makefile and fix warnings 2020-04-17 10:44:24 +02:00
Gabor Kiss-Vamosi
ef20067cff add LV_USE_ARABIC_PERSIAN_CHARS to lv_conf_templ.h 2020-04-17 10:34:12 +02:00
Gabor Kiss-Vamosi
9de260d648 integrate Arabic processing in to lv_label 2020-04-17 10:30:11 +02:00
Gabor Kiss-Vamosi
bab1d87f2d Merge branch 'dev-7.0' of https://github.com/hamidrm/lvgl into hamidrm-dev-7.0 2020-04-17 08:59:04 +02:00
Gabor Kiss-Vamosi
db154bd820 minor fixes 2020-04-17 08:58:34 +02:00
embeddedt
9bd86963c9 Add note about header guard in lv_conf.h (#1347) 2020-04-16 21:22:06 -04:00
Gabor Kiss-Vamosi
23368fa704 draw_img: blend argb images directly with DMA2D in trivial cases 2020-04-16 16:37:02 +02:00
Gabor Kiss-Vamosi
6f87d29ac7 more dma2d to a separate file 2020-04-16 16:12:35 +02:00
Gabor Kiss-Vamosi
f6ae49d29c minor fixes 2020-04-16 11:13:59 +02:00
Gabor Kiss-Vamosi
54019d4934 add builtin STM32 DMA2D support 2020-04-16 11:12:20 +02:00
Themba Dube
577d6273ab Add lv_task_set_repeat_count API 2020-04-15 17:57:06 -04:00
dykeag
d05264293b More reliable determination of architecture size
If available, use c99 headers and macros to determine architecture size.
2020-04-15 11:17:08 -04:00
Gabor Kiss-Vamosi
e54478343e merge master 2020-04-14 14:57:04 +02:00
Gabor Kiss-Vamosi
25c843ca0c Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-14 14:45:45 +02:00
Gabor Kiss-Vamosi
cf4f0319de add fonts in 32..48px range 2020-04-14 14:45:35 +02:00
Gabor Kiss-Vamosi
6b756a6521 draw: fixes related to blend modes 2020-04-14 14:44:10 +02:00
Gabor Kiss-Vamosi
c757860472 add spinbox to mono theme 2020-04-14 14:10:23 +02:00
Gabor Kiss-Vamosi
ca03ef2b1f Merge pull request #1445 from TGoyen/dev-7.0
Correct style_tick_line in Mono theme
2020-04-14 12:51:13 +02:00
Gabor Kiss-Vamosi
742eb4f6c8 fix warnings 2020-04-14 11:06:56 +02:00
Gabor Kiss-Vamosi
6563f2fa0d lv_mem_free: periodically peform full defrag 2020-04-14 10:56:40 +02:00
Gabor Kiss-Vamosi
9ad1e31521 fix chroma keyed image drawing 2020-04-14 10:20:32 +02:00
Gabor Kiss-Vamosi
c33b3d60fe Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-14 10:05:25 +02:00
Gabor Kiss-Vamosi
e44749deb8 update lv_conf_templ.h 2020-04-14 10:05:15 +02:00
Gabor Kiss-Vamosi
7d5609101f optimize image drawing 2020-04-14 10:00:01 +02:00
Gabor Kiss-Vamosi
e5254bdfef theme updates 2020-04-14 09:55:11 +02:00
Todd Goyen
3d93975e0a Prevent Red Channel from clobbering Green in color_blend_true_color_additive()
- In 8 and 32 bit mode, Red channel data would leak into Green
2020-04-13 19:39:39 -07:00
Todd Goyen
a9f110da1e Correct style_tick_line in Mono theme to only be created if the Spinner is Enabled 2020-04-13 19:32:21 -07:00
Bill Hargen
4c2fcebedb Fix #1438 - round up memory size for decompressing glyph (#1441) 2020-04-13 06:00:45 +02:00
Gabor Kiss-Vamosi
0c309e22e9 fix grid layot. Fixes #1442 2020-04-13 06:00:29 +02:00
scandermore
7f456fc5f3 Fix issue with inactive list buttons activating (#1436)
Fixed a problem where a button in inactive state was activated when another button was pressed in the list, and the list was in single mode
2020-04-13 06:00:16 +02:00
Gabor Kiss-Vamosi
f0a8eb8d1a chart: fix dafault max axis label string length 2020-04-12 14:49:50 +02:00
Gabor Kiss-Vamosi
ccbf4373af spinbox: fix sign after creation is min value > 0 2020-04-12 14:49:02 +02:00
Gabor Kiss-Vamosi
634df1da8a solve conflicts 2020-04-09 15:46:12 +02:00
Gabor Kiss-Vamosi
28e0b40e5e introduce LV_DPX 2020-04-09 15:29:31 +02:00
Gabor Kiss-Vamosi
f3eb40ce2f minor fixes 2020-04-09 15:29:06 +02:00
Gabor Kiss-Vamosi
db46af2fdb improve dark theme 2020-04-09 15:28:43 +02:00
Gabor Kiss-Vamosi
2f6a1ca8bf minor group related fixes 2020-04-09 12:25:50 +02:00
Gabor Kiss-Vamosi
0dc8ecaf26 minor chart optmizations 2020-04-09 11:46:00 +02:00
Gabor Kiss-Vamosi
8c7be3266e minor chart optimization 2020-04-09 09:55:52 +02:00
Gabor Kiss-Vamosi
30205aebeb minor theme update 2020-04-09 08:41:03 +02:00
Gabor Kiss-Vamosi
504c4aaaa7 Merge branch 'dev-7.0' of ../../../eclipse-workspace/lv_sim_eclipse_sdl_dev/lvgl into dev-7.0 2020-04-09 07:11:36 +02:00
Gabor Kiss-Vamosi
49456f1e5c linemeter and gauge invalidation optimization 2020-04-09 07:11:12 +02:00
Gabor Kiss-Vamosi
3b81496cb5 Merge branch 'dev-7.0' of ../../../eclipse-workspace/lv_sim_eclipse_sdl_dev/lvgl into dev-7.0 2020-04-08 20:54:51 +02:00
Gabor Kiss-Vamosi
1ddf83a73c minor fixes 2020-04-08 20:54:02 +02:00
Gabor Kiss-Vamosi
d04d5ab4d4 add initials version of margin (style property) 2020-04-08 11:12:06 +02:00
Gabor Kiss-Vamosi
3abd907404 fix lv_indev_set_button_points prototype 2020-04-07 14:26:44 +02:00
Themba Dube
c0d689b698 Merge branch 'skypoldo-spinbox-rollover' into dev-7.0 2020-04-06 19:42:34 -04:00
Themba Dube
6a2bd516a9 Merge branch 'spinbox-rollover' of https://github.com/skypoldo/lvgl into skypoldo-spinbox-rollover 2020-04-06 19:42:26 -04:00
Themba Dube
23ba886dde Merge branch 'dev-7.0' of github.com:littlevgl/lvgl into dev-7.0 2020-04-06 19:38:21 -04:00
Themba Dube
e6c1c837f8 Merge remote-tracking branch 'origin/master' into dev-7.0 2020-04-06 19:37:38 -04:00
Gabor Kiss-Vamosi
5ab7222bd9 minor fixes 2020-04-06 16:21:53 +02:00
Gabor Kiss-Vamosi
d75ea5f482 imgbtn: avoid warning during creation 2020-04-06 15:38:17 +02:00
Gabor Kiss-Vamosi
559709e69f theme updates 2020-04-06 14:23:57 +02:00
Gabor Kiss-Vamosi
ff8afc8b0c makefile and test fixes 2020-04-06 12:15:51 +02:00
Gabor Kiss-Vamosi
c3b2b57062 remove debug variables 2020-04-06 11:41:49 +02:00
Gabor Kiss-Vamosi
4e79c1b3f4 radius mask: use previus sqrt result and approximate where possible 2020-04-06 11:38:40 +02:00
Gabor Kiss-Vamosi
500691afa7 merge dev-7.0 2020-04-06 11:18:38 +02:00
Gabor Kiss-Vamosi
2c48cf5917 theme fix 2020-04-06 10:50:25 +02:00
Gabor Kiss-Vamosi
4dc9d4ccd0 update lv_conf_internal.h 2020-04-06 10:50:25 +02:00
Gabor Kiss-Vamosi
b4849d0ce1 replace roboto font with montserrat and add built-in fonts for every 2px from 12-32px 2020-04-06 10:50:25 +02:00
Gabor Kiss-Vamosi
3519e31888 improve material theme 2020-04-06 10:50:25 +02:00
Gabor Kiss-Vamosi
22bf167be3 bar: fix indicator's border drawing 2020-04-06 10:50:25 +02:00
Gabor Kiss-Vamosi
e76a5d6d53 start mono theme 2020-04-06 10:50:25 +02:00
Gabor Kiss-Vamosi
919aab01b8 minor fixes 2020-04-06 10:50:25 +02:00
Gabor Kiss-Vamosi
922cc6fc52 sqrt speed up tests 2020-04-06 09:02:24 +02:00
Gabor Kiss-Vamosi
06484394ce improve material theme 2020-04-03 15:38:20 +02:00
Gabor Kiss-Vamosi
bc780b0b3c bar: fix indicator's border drawing 2020-04-03 15:38:10 +02:00
Gabor Kiss-Vamosi
da23cc952f start mono theme 2020-04-03 15:34:37 +02:00
Gabor Kiss-Vamosi
110f16e1df minor fixes 2020-04-03 13:31:11 +02:00
Gabor Kiss-Vamosi
9e4ec59515 fix warning. Closes #1431 2020-04-03 13:13:40 +02:00
Gabor Kiss-Vamosi
5d8798b514 Fix write of of buffer with true double buffering and set_px_cb 2020-04-03 11:38:56 +02:00
Gabor Kiss-Vamosi
eb7909124e add LV_LINEMETER_PRECISE to balance performance and quality 2020-04-02 11:54:33 +02:00
Gabor Kiss-Vamosi
900915c58a Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-04-02 09:50:54 +02:00
Gabor Kiss-Vamosi
51a096b70e minor fixes 2020-04-02 09:48:30 +02:00
Gabor Kiss-Vamosi
163498e192 minor fixes + lv_sqrt() optmization 2020-04-02 09:31:38 +02:00
skypoldo
adcfd69f35 Update lv_spinbox.c
Rollover functionakity changed.

Increase: if new value is over max, set to max first, then reset to minimum

Decrease: if new value is below min, set to min first, then reset to maximum
2020-03-31 17:39:20 +02:00
embeddedt
0db067e27b Merge pull request #1422 from xennex22/dev-7.0
Improve arcs and fix handing of UTF-8 options with dropdown
2020-03-31 10:05:38 -04:00
Gabor Kiss-Vamosi
c234dcd64e update lv_conf_templ.h 2020-03-31 14:18:02 +02:00
Gabor Kiss-Vamosi
6cf24f76e4 theme_init: report style change to all objects 2020-03-31 14:13:44 +02:00
Gabor Kiss-Vamosi
7d5acdcf33 theme: allow live theme update 2020-03-31 14:13:44 +02:00
Gabor Kiss-Vamosi
8bf1cc6f6b label: fix label align with SCROLL or SCROLL_CIRC long mode 2020-03-31 12:18:11 +02:00
Gabor Kiss-Vamosi
858c21d999 optmize lv_canvas_fill_bg 2020-03-31 12:14:45 +02:00
Gabor Kiss-Vamosi
8f81a04ffb img drawing: fix ARGB recoloring 2020-03-31 12:14:45 +02:00
Gabor Kiss-Vamosi
ef7a8f3543 shadow fixes 2020-03-31 11:06:57 +02:00
Gabor Kiss-Vamosi
88c31521e0 remove unused variables 2020-03-31 10:21:36 +02:00
Gabor Kiss-Vamosi
1692cc7b7d optimize shadow drawing 2020-03-31 10:16:11 +02:00
xennex22
5c60112b29 Fixed insert of utf8 options 2020-03-30 15:06:14 -07:00
xennex22
98e8e9c3b0 Prevent more than 360 degree circle being drawn 2020-03-30 15:03:40 -07:00
xennex22
61553426ef Initialize rotation value 2020-03-30 09:13:07 -07:00
xennex22
7e8f6368d6 Added lv_arc_set_rotation, fixed drawing full circle 2020-03-30 09:09:13 -07:00
xennex22
e805e59e8c Added lv_arc_set_rotation 2020-03-30 08:28:50 -07:00
Gabor Kiss-Vamosi
f545db3117 minor fixes 2020-03-29 22:00:48 +02:00
Abdullah Alsigar
e3e130c54c Fix comment typo (#1423) 2020-03-28 11:10:21 -04:00
xennex22
38cb4e73b3 Changed angle data type to uint16_t 2020-03-27 10:20:51 -07:00
xennex22
49b6dc7d33 Changed tabs to spaces 2020-03-27 10:15:51 -07:00
xennex22
52da15c8e7 Changed angle data type to uint16_t 2020-03-27 10:14:09 -07:00
Gabor Kiss-Vamosi
dde615489f Merge pull request #1421 from turoksama/master
Fix a crash with null indev input in lv_indev_wait_release()
2020-03-27 15:09:23 +01:00
Gabor Kiss-Vamosi
57220246e9 fix warning 2020-03-27 10:21:23 +01:00
Gabor Kiss-Vamosi
b772601018 linemeter, gauge: update default size 2020-03-27 10:00:10 +01:00
Gabor Kiss-Vamosi
afcb5c70bc optmize line drawing 2020-03-27 09:52:32 +01:00
Gabor Kiss-Vamosi
9f7365103b increase indev_read_task priority to HIGH to avoid blocking by disp_refr_task 2020-03-27 09:41:58 +01:00
Gabor Kiss-Vamosi
58fc703dba add lv_disp_flush_is_last() 2020-03-27 08:47:52 +01:00
Gabor Kiss-Vamosi
6741f0c283 lv_draw_blend: update GPU px limit 2020-03-27 08:41:11 +01:00
Gabor Kiss-Vamosi
d8afe0c980 update lv_conf_template.h 2020-03-27 08:40:15 +01:00
Gabor Kiss-Vamosi
ae88d7ae30 linemeter: speed optmiziation 2020-03-27 08:29:39 +01:00
Gabor Kiss-Vamosi
b181576bf4 increase GPU usage limit 2020-03-26 16:38:11 +01:00
Gabor Kiss-Vamosi
1b61e553fc theme material: fix build error. Closes #1419 2020-03-26 15:59:35 +01:00
Gabor Kiss-Vamosi
c9afbaafa2 material theme updates 2020-03-26 15:51:33 +01:00
Gabor Kiss-Vamosi
c8c240a302 btn, btnmatrix: minor fixes 2020-03-26 15:50:57 +01:00
Gabor Kiss-Vamosi
21a7acd7a2 lv_img_buf_transorm: remove unnecessary calculations 2020-03-26 15:50:24 +01:00
Gabor Kiss-Vamosi
f6ad61c88b gauge: fix allocation with wrong size 2020-03-26 15:49:23 +01:00
Gabor Kiss-Vamosi
23c2d804f0 experiemnt with more accurate lv_color_mix 2020-03-26 08:58:16 +01:00
Gabor Kiss-Vamosi
8fe169981f optimize ARGB+opa image drawing 2020-03-26 08:57:51 +01:00
Samuel
e655373df2 Fix a null indev input in lv_indev_wait_release()
Will crash on calling while no indev returned conditions, such as delayed for an deletion of objects automatically when idle(no interactive inputs).
Perhaps we will think of that it is "your" responsibility to check before calling. well, I think it may not be easy for the one who does not familar with the library, and I stucked here and debug for hours.
2020-03-26 14:08:25 +08:00
xennex22
d14cd826c3 Change angle values to uint16_t 2020-03-25 18:09:37 -07:00
paolog
a049df2db6 Copy rollover extra field
Added copy of the new extra field when creating a new spinbox copying an existing one
2020-03-25 20:50:21 +01:00
paolog
f8d67a4968 Removed NULL check 2020-03-25 17:37:36 +01:00
paolog
3ab2d8470b Changed rollover field type 2020-03-25 17:36:33 +01:00
skypoldo
a6f3ed8102 Added rollover function to spinbox
The rollover functionalty allows the spinbox to turn aound the range of values. Increasing over maximum values restarts from minimum value. Decreasing below minimum value restarts fro maximum value.
2020-03-25 16:17:01 +01:00
Gabor Kiss-Vamosi
10cd99df5b lv_color_mix_with_alpha: minor fix 2020-03-25 16:15:03 +01:00
Gabor Kiss-Vamosi
e6ad7e2332 fix image zoom with RGB images 2020-03-25 16:14:57 +01:00
Gabor Kiss-Vamosi
c0c1ccec1d belnding fixes with transparent screen 2020-03-25 16:10:51 +01:00
Gabor Kiss-Vamosi
ba1639848d reduce CPU load of PERF_MONITOR 2020-03-25 16:09:30 +01:00
Gabor Kiss-Vamosi
80973db76e minor fixes 2020-03-25 10:07:06 +01:00
Gabor Kiss-Vamosi
848defad9a lv_draw_rect: remove unreachable code 2020-03-25 10:06:57 +01:00
xennex22
cf45342e8d Added bg arc get functions 2020-03-24 13:42:27 -07:00
xennex22
d99b802ac2 Added bg arc gets 2020-03-24 13:41:19 -07:00
Gabor Kiss-Vamosi
242eaa708d Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-24 20:59:25 +01:00
Gabor Kiss-Vamosi
83770e004c lv_img_buf_tranform: fix inaccurate color mixing 2020-03-24 20:59:12 +01:00
Gabor Kiss-Vamosi
b4f8c71501 lv_dropdown_add_option: add invalidation 2020-03-24 20:25:04 +01:00
Gabor Kiss-Vamosi
29bf244e89 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-24 20:14:50 +01:00
Gabor Kiss-Vamosi
4e85f9df1c label: keep scroll position when the text changes 2020-03-24 20:14:39 +01:00
Gabor Kiss-Vamosi
f4ececf7c7 add lv_anim_get 2020-03-24 20:14:19 +01:00
Gabor Kiss-Vamosi
b40c5ada05 table: add asserts after allocations 2020-03-24 19:38:57 +01:00
Gabor Kiss-Vamosi
d481960808 Merge pull request #1412 from xennex22/dev-7.0
Add gauge value formatting function
2020-03-24 19:34:23 +01:00
Gabor Kiss-Vamosi
db2259c742 canvas: fix duplicated invalidation 2020-03-24 19:27:06 +01:00
Gabor Kiss-Vamosi
437169243b canvas: invalidate in lv_canvas_draw_... 2020-03-24 14:13:09 +01:00
Gabor Kiss-Vamosi
b9b6d80c4e Update CONTRIBUTING.md 2020-03-24 14:00:25 +01:00
Gabor Kiss-Vamosi
bb0c5a968c run formatter 2020-03-24 10:13:52 +01:00
Gabor Kiss-Vamosi
a8b49faf6b table: optmize text drawing 2020-03-24 10:05:40 +01:00
Gabor Kiss-Vamosi
9876197131 furthe belnding fixes 2020-03-24 09:44:00 +01:00
Gabor Kiss-Vamosi
ec57e921e2 fix belnding issue. Fixes #1417 2020-03-24 09:37:03 +01:00
Gabor Kiss-Vamosi
7d5250a181 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-24 09:07:04 +01:00
Gabor Kiss-Vamosi
69b22d4c54 arc draw: draw nothing if start_angel == end_angle 2020-03-24 09:06:41 +01:00
Gabor Kiss-Vamosi
ca6c6c6fcc fix warning 2020-03-24 09:05:46 +01:00
Gabor Kiss-Vamosi
1a94e82834 add LV_TXT_FLAG_FIT to skip some text widrth calculations 2020-03-24 08:46:28 +01:00
Gabor Kiss-Vamosi
49b0751dc8 optimize 2020-03-24 08:22:41 +01:00
Gabor Kiss-Vamosi
18caad5058 minor blending optmization 2020-03-24 06:34:20 +01:00
embeddedt
7d96db8b06 Update version shield 2020-03-23 16:45:05 -04:00
Gabor Kiss-Vamosi
523c9793cb draw label: remove 8bpp optimization becasue it's not that effective 2020-03-23 17:13:46 +01:00
Gabor Kiss-Vamosi
f9edf0b341 label drawing optimizations 2020-03-23 17:02:33 +01:00
Gabor Kiss-Vamosi
67a6ca7ac5 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-23 12:42:12 +01:00
Gabor Kiss-Vamosi
cc484b2fce draw label fix with opacity 2020-03-23 12:41:59 +01:00
Gabor Kiss-Vamosi
dcc9fc7255 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-23 12:41:36 +01:00
Gabor Kiss-Vamosi
3ad6eeedc5 minor formatting 2020-03-23 12:39:34 +01:00
Gabor Kiss-Vamosi
15c2a6d0cd letter draw minor optimizations 2020-03-23 12:35:26 +01:00
Gabor Kiss-Vamosi
a517defbd7 generate fonts with ker class (faster) and degree and bullet smybols 2020-03-23 12:35:10 +01:00
Gabor Kiss-Vamosi
3249700ec5 add 'generate_all.py' script to generate all fonts at once 2020-03-23 12:32:23 +01:00
Gabor Kiss-Vamosi
0d303e16e6 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-23 09:25:13 +01:00
Gabor Kiss-Vamosi
68b31008b7 table: automatically expand row_cnt as needed 2020-03-23 09:25:04 +01:00
Gabor Kiss-Vamosi
c57aacafa2 font decompression: fix buffer overflow 2020-03-23 09:24:41 +01:00
Tony Stuart
40b351730f lv_mbox: remove incorrect assignment (#1415) 2020-03-22 16:43:13 -04:00
Gabor Kiss-Vamosi
6fae3a0eb6 draw_img: optimize ARGB rendering 2020-03-22 13:20:09 +01:00
Gabor Kiss-Vamosi
2a1db9ee86 dropdown: fix set/get anim time 2020-03-21 01:24:58 +01:00
Gabor Kiss-Vamosi
2d3ad7f99f fix obj_del_core 2020-03-21 00:37:41 +01:00
Gabor Kiss-Vamosi
6b3aa73c17 fix lv_obj_del 2020-03-21 00:31:24 +01:00
xennex22
7c3e20af49 Added includes 2020-03-20 15:30:51 -07:00
xennex22
d3127af4c7 Fixed function comment 2020-03-20 15:28:11 -07:00
xennex22
cc8667482f Added lv_utils_set_decimal_separator 2020-03-20 15:26:43 -07:00
xennex22
41117ac0a9 Added lv_utils_set_decimal_separator 2020-03-20 15:24:17 -07:00
Gabor Kiss-Vamosi
9abe6b89cc optimize lv_memcpy and lv_memset_... 2020-03-20 21:52:53 +01:00
Gabor Kiss-Vamosi
ac67cad801 remove lv_obj.c/delete_children as it was very similar to lv_obj_del
Ref: https://forum.littlevgl.com/t/lv-obj-del-lv-event-delete-ordering/1859
2020-03-20 13:41:47 +01:00
xennex22
9846c3f62c Renamed lv_gauge_format_cb_t 2020-03-20 04:17:11 -07:00
Gabor Kiss-Vamosi
2a0a6652ae draw rect: fix overdrawing 2020-03-20 12:16:21 +01:00
xennex22
cd5084cd64 Renamed lv_gauge_format_cb_t 2020-03-20 04:15:38 -07:00
xennex22
9a5acbcb4f Changed value typedef to int32_t 2020-03-20 03:51:19 -07:00
xennex22
982c65da93 Changed value typedef to int32_t 2020-03-20 03:49:50 -07:00
xennex22
ae64c3ebf3 Removed gauge and line meter value typedef 2020-03-20 03:48:38 -07:00
xennex22
e8d527f2d9 Change value typedef to int32_t 2020-03-20 03:47:23 -07:00
xennex22
7418f46054 Change value typedef to int32_t 2020-03-20 03:46:44 -07:00
xennex22
dd24c844f6 Undo typedef addition 2020-03-20 03:43:34 -07:00
Gabor Kiss-Vamosi
df01215678 draw_rect: remove debug code 2020-03-20 11:18:02 +01:00
Gabor Kiss-Vamosi
34aaf71a17 btnm: fix undeflow in buttons arrea calculation 2020-03-20 11:05:42 +01:00
Gabor Kiss-Vamosi
786e151661 lv_memcpy: fix according to #1413 2020-03-20 10:52:48 +01:00
Gabor Kiss-Vamosi
3e5275708e add custom memset and optimize masked belnding 2020-03-20 10:35:50 +01:00
Gabor Kiss-Vamosi
3ed8aa86e6 lv_memcpy: minor optimization 2020-03-19 20:45:26 +01:00
Gabor Kiss-Vamosi
3ee8763838 blending a color mixing speed up 2020-03-19 15:29:03 +01:00
Gabor Kiss-Vamosi
dd17e7c9b2 add lv_memcpy.c/h (faster then gcc memcpy) 2020-03-19 15:27:45 +01:00
Gabor Kiss-Vamosi
f4bca3889f add lv_color_mix_premult 2020-03-19 15:26:55 +01:00
Gabor Kiss-Vamosi
d0864e72e0 Merge branch 'fix/arc-end-angle' into dev-7.0 2020-03-19 09:49:07 +01:00
Gabor Kiss-Vamosi
2af4f70382 arc: do not limit end angle to allow full circle 2020-03-19 09:48:51 +01:00
Gabor Kiss-Vamosi
47c54d5772 fix warnings 2020-03-19 09:47:24 +01:00
Gabor Kiss-Vamosi
8867df8f18 fix conflict 2020-03-19 09:34:11 +01:00
Gabor Kiss-Vamosi
530807eca1 minor fixes 2020-03-19 09:32:42 +01:00
Gabor Kiss-Vamosi
229463d801 update material theme 2020-03-19 09:32:33 +01:00
xennex22
5248e8953f Added lv_gauge_value_t and lv_linemeter_value_t typedefs 2020-03-17 16:13:55 -07:00
xennex22
7581cfd8c1 Use lv_gauge_value_t for value data type 2020-03-17 09:50:16 -07:00
xennex22
e990b1c521 Use lv_gauge_value_t for value data type 2020-03-17 09:48:06 -07:00
xennex22
69a726940e Use lv_linemeter_value_t for value data type 2020-03-17 09:45:44 -07:00
xennex22
be685a648e Use lv_linemeter_value_t for value data type 2020-03-17 09:44:44 -07:00
xennex22
17759f7932 Added gauge & linemeter value typedefs 2020-03-17 09:43:05 -07:00
Gabor Kiss-Vamosi
dc0f0e6e5b Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-17 13:54:49 +01:00
Gabor Kiss-Vamosi
aff7eb1653 arc draw fixes 2020-03-17 13:54:37 +01:00
xennex22
61e296dc2a Remove locale reference 2020-03-17 04:27:56 -07:00
xennex22
72b9a2b739 Added gauge label format function 2020-03-17 04:17:43 -07:00
xennex22
0e5d99d159 Added gauge value format function 2020-03-17 04:14:58 -07:00
xennex22
9e1c261eb0 Added lv_utils_num_to_str_fixed 2020-03-17 04:12:26 -07:00
xennex22
546909c1d2 Added lv_utils_num_to_str_fixed 2020-03-17 04:10:42 -07:00
Gabor Kiss-Vamosi
de103cf0d2 textarea: fix special case of copy, with online + center align + RTL base dir 2020-03-17 07:15:56 +01:00
Themba Dube
ab10bdaa03 Make lv_switch respect base direction 2020-03-16 13:58:09 -04:00
Gabor Kiss-Vamosi
f8c8c75361 dropdown: fixes with RTL basedir 2020-03-16 16:23:14 +01:00
Gabor Kiss-Vamosi
fd302d259e obj positiong fixes with RTL base dir 2020-03-16 16:07:52 +01:00
Gabor Kiss-Vamosi
89fd050df1 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-16 15:47:46 +01:00
Gabor Kiss-Vamosi
5f41d3e24a imporve light theme + minor fixes 2020-03-16 15:46:31 +01:00
Themba Dube
82d4c8d6ed lv_bar: fix #1406 (animation issue) 2020-03-14 16:16:33 -04:00
Themba Dube
b5371e9830 Merge branch 'dev-7.0' of github.com:littlevgl/lvgl into dev-7.0 2020-03-14 15:57:43 -04:00
Themba Dube
d399dec0c7 Improve slider handling 2020-03-14 15:57:35 -04:00
hamidrm
95cad47068 Add Arabic & Persian letters in the RTL range 2020-03-14 22:53:59 +03:30
hamidrm
d53d09bb71 AP font name changed 2020-03-14 21:52:37 +03:30
hamidrm
fe28c947c4 Arabic and Persian text support 2020-03-14 21:43:09 +03:30
Gabor Kiss-Vamosi
b58edce0d0 theme material: add padding around page's scrollable 2020-03-14 00:03:18 +01:00
Gabor Kiss-Vamosi
6fbf7db1a6 review material theme 2020-03-14 00:01:03 +01:00
Gabor Kiss-Vamosi
66bc27e424 Merge pull request #1408 from xennex22/dev-7.0
dropdown: convert static options to dynamic when lv_dropdown_add_option is called
2020-03-13 10:19:19 +01:00
embeddedt
00bc5440ad Fix uninitialized variable usage in tabview 2020-03-12 13:18:24 -04:00
Gabor Kiss-Vamosi
e7bab27708 draw label: skip empty letters. Closes #1407 2020-03-12 12:03:17 +01:00
Gabor Kiss-Vamosi
8f89ba2093 page scroll propagation: clear scroller's scrollbar visiblilty in DRAG mode 2020-03-11 22:23:31 +01:00
Gabor Kiss-Vamosi
2d71bc7cc5 msgbox: fix for multi line button matrix 2020-03-11 22:22:39 +01:00
xennex22
f6b8a2f1b6 Added lv_dropdown_clear_options, convert options when adding 2020-03-11 13:14:47 -07:00
xennex22
e19ce6b451 Added lv_dropdown_clear_options 2020-03-11 13:11:50 -07:00
xennex22
d5ab09cf7f Reset number of options when clearing static options 2020-03-11 03:36:25 -07:00
xennex22
bcbcb6f31d Fixed lv_dropdown_add_option with default static options 2020-03-11 03:30:56 -07:00
Gabor Kiss-Vamosi
1023909acd minor fixes 2020-03-11 08:14:08 +01:00
Gabor Kiss-Vamosi
8cdc8bf6fc group related fixes 2020-03-10 22:11:17 +01:00
Gabor Kiss-Vamosi
ca5a78bb5b group related fixes 2020-03-10 21:01:53 +01:00
Gabor Kiss-Vamosi
5ef87d7359 group related fixes 2020-03-10 20:55:44 +01:00
Gabor Kiss-Vamosi
2ebb68af96 drodown: add default options 2020-03-10 20:55:44 +01:00
Gabor Kiss-Vamosi
27e6525a7a add __func__ to log messages 2020-03-10 20:55:44 +01:00
Gabor Kiss-Vamosi
95c64cf7f3 add lv_win_Set_btn_width 2020-03-10 20:55:44 +01:00
Gabor Kiss-Vamosi
4944613152 indev: imrove handling of disabled obejcts 2020-03-10 20:55:44 +01:00
Gabor Kiss-Vamosi
cd85d96fca style refresh fixes 2020-03-10 20:55:44 +01:00
Gabor Kiss-Vamosi
c26635ed3e Update lv_port_disp_template.c 2020-03-10 13:28:33 +01:00
Gabor Kiss-Vamosi
5ad1cb76c2 increase animation task priority 2020-03-10 11:59:51 +01:00
Gabor Kiss-Vamosi
c3f8b19ec9 remove lv_obj_float_top_in 2020-03-10 10:51:47 +01:00
Gabor Kiss-Vamosi
364955c7d7 optimize lv_obj_get_draw_rect_ext_pad_size 2020-03-10 10:51:47 +01:00
Gabor Kiss-Vamosi
291545224c arc: handle out of bounds start/end values 2020-03-10 10:51:47 +01:00
Gabor Kiss-Vamosi
5c1eaf7a3a add lv_obj_float_top_in() 2020-03-10 10:51:47 +01:00
Gabor Kiss-Vamosi
806d7dd8d5 minor foxes 2020-03-10 10:47:14 +01:00
Gabor Kiss-Vamosi
dc4e643f62 style refresh optimizations 2020-03-10 10:41:48 +01:00
Gabor Kiss-Vamosi
498f050262 fix warnings 2020-03-10 08:34:07 +01:00
Gabor Kiss-Vamosi
48a4cc3fc6 renames an fixes 2020-03-09 15:19:23 +01:00
Gabor Kiss-Vamosi
5ad4ede4d2 transition fixes with time = 0 2020-03-09 15:19:16 +01:00
Gabor Kiss-Vamosi
7bfc82317a led: add LV_LED_BRIGHT_MIN/MAX global configs and limit brightness between them 2020-03-09 15:18:19 +01:00
Gabor Kiss-Vamosi
1f2c772e06 do not redraw anything if the active screen was deleted. Closes #1387 2020-03-08 04:06:34 +01:00
Gabor Kiss-Vamosi
f2d67bd4e9 roller: fix lv_roller_set_selected in INFINITE moed. Fixes #1404 2020-03-08 03:54:40 +01:00
Gabor Kiss-Vamosi
25b8185683 minor renames 2020-03-08 03:36:18 +01:00
Gabor Kiss-Vamosi
8880326abd img_decoder: return on out of memory error 2020-03-08 03:36:03 +01:00
embeddedt
6348fe079d Update URL of ESP32 port
Requested by @C47D
2020-03-07 16:00:20 -05:00
Gabor Kiss-Vamosi
ad44495146 remove accidentally enabled LV_BUILD_TEST 2020-03-07 10:25:42 +01:00
embeddedt
48cbc84e5c lv_img_decoder: fix incorrect debug assert (#1402) 2020-03-06 10:22:33 -05:00
Gabor Kiss-Vamosi
c33d875015 minor renames and fixes 2020-03-06 13:14:39 +01:00
Gabor Kiss-Vamosi
5578b0b496 refine imgbtn API to work smoother with tiled mode 2020-03-06 13:14:39 +01:00
Themba Dube
da4115e652 Do not build tests by default 2020-03-05 20:05:18 -05:00
embeddedt
ffdf2ed542 Fix #1401: wrong roller opt selected with pointer-based input 2020-03-05 10:06:48 -05:00
Gabor Kiss-Vamosi
3dc8b9ab0d make style API C++ compatible 2020-03-05 15:39:11 +01:00
embeddedt
c513977559 Fix #1400: divide-by-zero error in lv_mem_monitor 2020-03-04 18:10:45 -05:00
Gabor Kiss-Vamosi
d79fb70aaa linemeter: increase the precision of sine/cos interpolation
it needs the same time to caclulate then a lower resolution
2020-03-04 16:44:20 +01:00
Gabor Kiss-Vamosi
4e10efd642 minor fixes and renames 2020-03-04 16:29:21 +01:00
Gabor Kiss-Vamosi
4afd47e5ab further improve linemeters line precision by interpolating sine and cos values 2020-03-04 14:43:08 +01:00
Gabor Kiss-Vamosi
f9bcde4e6f use a fix value LV_RADIUS_CIRCLE
It messed up roundind when lv_coord_t is int32_t
2020-03-04 12:15:26 +01:00
Gabor Kiss-Vamosi
e1b188f705 fix overflow and reduce lines direction error 2020-03-04 12:09:43 +01:00
Gabor Kiss-Vamosi
f9fa0add86 lv_draw_line: fix crash with masks 2020-03-04 12:09:43 +01:00
Gabor Kiss-Vamosi
1b3d1fcb8e Merge pull request #1398 from xennex22/dev-7.0
Make dropdown options dynamic
2020-03-04 11:31:32 +01:00
Gabor Kiss-Vamosi
419d8912f8 draw_label: fix goining to the first visible line 2020-03-04 11:09:36 +01:00
Gabor Kiss-Vamosi
5c6a7fa6d3 btn: fix lv_btn_set_state to remove DIABLED state if other state is set 2020-03-04 11:09:10 +01:00
Gabor Kiss-Vamosi
cec2660724 imgbtn: improve to use LV_STYLE_TRANSFORM_WIDTH/HEIGHT 2020-03-04 11:08:20 +01:00
Gabor Kiss-Vamosi
59d95b697e fix lv_obj_finish_transition to apply the latest transition in the end 2020-03-04 11:07:29 +01:00
Gabor Kiss-Vamosi
a663578ebc optimize lv_obj_refresh_style 2020-03-04 11:06:47 +01:00
Gabor Kiss-Vamosi
5c1eac455f disable PERF_MONITOR by default 2020-03-04 11:03:31 +01:00
Gabor Kiss-Vamosi
1ff6fc28d3 imgbtn: allow bg drawing 2020-03-04 09:14:07 +01:00
Gabor Kiss-Vamosi
048b5cfb60 lv_conf_template updates 2020-03-04 09:14:07 +01:00
Gabor Kiss-Vamosi
2e9f1139e3 rect bg draw: fix overdrawn line in the middle with LV_RADIUS_CIRCLE 2020-03-04 09:09:28 +01:00
xennex22
f9d467e3e7 Changed lv_dropdown_add_option parameter from int to uint16_t 2020-03-03 06:37:51 -08:00
Gabor Kiss-Vamosi
2f44d9045b run formatter 2020-03-03 15:37:13 +01:00
xennex22
78260c31f2 Removed debug code 2020-03-03 06:37:01 -08:00
Gabor Kiss-Vamosi
b1f059375d Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-03-03 15:36:54 +01:00
Gabor Kiss-Vamosi
caad3c9d1b empty theme: set LV_OPA_COVER for screens by default 2020-03-03 15:35:26 +01:00
Gabor Kiss-Vamosi
4d5b9a02cf fix unititalized variable in lv_img_buf_transform_init 2020-03-03 15:34:49 +01:00
Gabor Kiss-Vamosi
e146da0532 fix transitions 2020-03-03 15:34:10 +01:00
xennex22
cc34ecfa69 Fixed options insert bugs 2020-03-02 21:01:24 -08:00
xennex22
069dd439e3 Fixed lv_dropdown_add_option bugs 2020-03-02 09:10:48 -08:00
xennex22
a0925b0b95 Fixed filename in header comment 2020-03-02 08:22:12 -08:00
xennex22
42fdf16dc3 Added dynamic options cleanup 2020-03-02 08:20:02 -08:00
xennex22
b11d077b6c Changed options to dynamic allocation 2020-03-02 08:18:58 -08:00
xennex22
a9f85a6efd Changed options to dynamic allocation 2020-03-02 08:12:42 -08:00
Gabor Kiss-Vamosi
9291c81829 fix warnings 2020-03-01 07:48:23 +01:00
Gabor Kiss-Vamosi
234f0e761b chart: fixes for faded ara under lines 2020-03-01 07:41:55 +01:00
Gabor Kiss-Vamosi
e51962e361 table: optimize style queries 2020-03-01 02:00:03 +01:00
Gabor Kiss-Vamosi
ac75bfaa54 img copy: copy parameters 2020-03-01 01:59:42 +01:00
Gabor Kiss-Vamosi
38a4c14e07 draw border: optimization when only top+bottom sides are shown 2020-03-01 01:59:06 +01:00
Gabor Kiss-Vamosi
705d7ebaef draw_boder: return on LV_DRAW_SIDE_NONE 2020-03-01 00:00:20 +01:00
Gabor Kiss-Vamosi
7f06779179 Merge pull request #1394 from Maldus512/master
Added mirror option for line meters
2020-02-29 21:23:53 +01:00
Gabor Kiss-Vamosi
acbcf109f9 lmeter: fix mirror prototypes 2020-02-29 21:22:58 +01:00
Mattia Maldini
ab4706bc09 Update src/lv_objx/lv_lmeter.h
Co-Authored-By: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2020-02-29 17:53:05 +01:00
Mattia Maldini
0303110dc3 Update src/lv_objx/lv_lmeter.c
Co-Authored-By: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2020-02-29 17:52:32 +01:00
Gabor Kiss-Vamosi
c74e40922e Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-02-29 13:36:25 +01:00
Gabor Kiss-Vamosi
d3bcdcb8fb add theme template and empty 2020-02-29 13:35:53 +01:00
embeddedt
107aafaf6a Merge pull request #1395 from xennex22/dev-7.0
Rename/move some defines
2020-02-28 11:46:22 -05:00
xennex22
45910077ad Minor comment change 2020-02-28 08:38:42 -08:00
xennex22
336ca64abe Changed LV_USE_LMETER to LV_USE_LINEMETER 2020-02-28 08:22:30 -08:00
xennex22
ccd27ff0fe Changed LV_USE_LMETER to LV_USE_LINEMETER 2020-02-28 08:21:24 -08:00
xennex22
611f25e1e6 Changed LV_USE_LMETER to LV_USE_LINEMETER 2020-02-28 08:20:23 -08:00
xennex22
4fe85b5516 Moved define to header 2020-02-28 08:16:11 -08:00
xennex22
45f15274e4 Moved define to header 2020-02-28 08:15:19 -08:00
Mattia Maldini
97c9971c2a Added mirror option for line meters 2020-02-28 15:36:19 +01:00
Gabor Kiss-Vamosi
ea81e21dd0 reduce CPU usage of the performance monitor 2020-02-28 13:22:44 +01:00
Gabor Kiss-Vamosi
f25633f60f Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-02-28 13:10:25 +01:00
Gabor Kiss-Vamosi
d55f22931f optimize skew line drawing 2020-02-28 13:09:48 +01:00
Gabor Kiss-Vamosi
fbe95a5e7e fixes for performance monitor 2020-02-27 15:48:29 +01:00
Gabor Kiss-Vamosi
760e0eefd6 Add performance monitor 2020-02-27 15:07:18 +01:00
Gabor Kiss-Vamosi
6e6aeb8f09 material theme: simplify line chart's default style 2020-02-27 06:49:29 +01:00
Gabor Kiss-Vamosi
0e934e74fd chart: fix clipped first point 2020-02-27 06:42:08 +01:00
Gabor Kiss-Vamosi
f5e61fdb38 Update lv_version.h 2020-02-26 23:50:16 +01:00
Gabor Kiss-Vamosi
6e6ec16295 release_patch.py: fix incrementing version number 2020-02-26 23:49:20 +01:00
Gabor Kiss-Vamosi
2ead495903 Release v6.1.2 2020-02-26 23:35:12 +01:00
Gabor Kiss-Vamosi
75d44d0538 add release_patch.py 2020-02-26 23:31:16 +01:00
Gabor Kiss-Vamosi
3403ec8332 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-02-26 23:04:45 +01:00
Gabor Kiss-Vamosi
1ddff88a81 make doxygen quite 2020-02-26 22:59:12 +01:00
Gabor Kiss-Vamosi
1239e415ad fix when LV_ANTIALIAS=0 2020-02-26 20:15:29 +01:00
Gabor Kiss-Vamosi
41907f9f3c run astyle code formatter 2020-02-26 19:48:27 +01:00
Gabor Kiss-Vamosi
9d1a1d51d0 replace clag format with astyle 2020-02-26 19:46:58 +01:00
Gabor Kiss-Vamosi
13b1ec2e62 remove lv_conf_checker.h 2020-02-26 19:38:35 +01:00
Gabor Kiss-Vamosi
d7c59c3158 Merge branch 'master' into dev-7.0 2020-02-25 15:33:58 +01:00
Gabor Kiss-Vamosi
8e4297ad73 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-02-25 15:32:51 +01:00
Gabor Kiss-Vamosi
16ed5c605a run cppcheck and fix issues 2020-02-25 15:32:35 +01:00
Gabor Kiss-Vamosi
7464778b8b fix warning 2020-02-25 10:49:34 +01:00
Gabor Kiss-Vamosi
58c6bee99a Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-02-25 10:48:00 +01:00
Gabor Kiss-Vamosi
65f14a33af rename lv_spinner_spinner_anim to lv_spinner_anim_cb 2020-02-25 10:47:49 +01:00
Gabor Kiss-Vamosi
cb4fee4197 add lv_obj_finish_transitions 2020-02-25 10:47:30 +01:00
Gabor Kiss-Vamosi
10ae15e030 remove const from transitpon_path set/get functions 2020-02-25 10:16:31 +01:00
Gabor Kiss-Vamosi
8e45fd5fde update clag-formatter.sh 2020-02-25 09:30:00 +01:00
Gabor Kiss-Vamosi
b91d42b6d5 fix warnings 2020-02-25 09:18:00 +01:00
Gabor Kiss-Vamosi
0543b4d77f textarea: make the placeholder a simple text instead of a label 2020-02-25 09:15:56 +01:00
Gabor Kiss-Vamosi
c498b32c18 minor fixes 2020-02-25 09:15:28 +01:00
Gabor Kiss-Vamosi
c76ff89af3 add va_list support to LV_LOG functions 2020-02-25 08:38:56 +01:00
Gabor Kiss-Vamosi
3414433fd8 Merge pull request #1392 from Maldus512/master
Added overflow check while calculating label height
2020-02-24 15:53:53 +01:00
Gabor Kiss-Vamosi
963140fd74 rename lv_obj_set/get_style_... to lv_obj_set/get_style_local_... 2020-02-24 12:33:03 +01:00
Mattia Maldini
68b93ea002 Added overflow check while calculating label height 2020-02-23 17:10:20 +01:00
Gabor Kiss-Vamosi
5886736522 renames in styles: TRANS->TRANSITION, WIDTH/HEIGHT->TRANSFORM_WIDTH/HEIGHT 2020-02-23 07:51:33 +01:00
Gabor Kiss-Vamosi
a2cb85608a fix warning 2020-02-23 07:26:43 +01:00
Gabor Kiss-Vamosi
52451636c3 elminate dead code on some returns. Fixes #1391 2020-02-23 07:23:44 +01:00
Gabor Kiss-Vamosi
66a25f158c minor fixes 2020-02-23 07:16:40 +01:00
Gabor Kiss-Vamosi
f4f3cc2542 fix warnings 2020-02-22 07:06:31 +01:00
Gabor Kiss-Vamosi
db7e5ae2f4 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-02-22 01:09:51 +01:00
Gabor Kiss-Vamosi
482a53e16e rename LV_STATE_NORMAL to LV_STATE_DEFAULT 2020-02-22 01:09:29 +01:00
Gabor Kiss-Vamosi
02c6aed382 add LV_STYLE_WIDTH/HEIGHT + theme update 2020-02-22 01:05:13 +01:00
Gabor Kiss-Vamosi
a9d3dce55b obj: remove state_dsc, from now a simple state is enough 2020-02-21 16:56:10 +01:00
Gabor Kiss-Vamosi
78923b6b9b support transition on virtual styles too 2020-02-21 16:33:42 +01:00
Gabor Kiss-Vamosi
05b8db0192 new transitions for the main style is working 2020-02-21 15:33:57 +01:00
Gabor Kiss-Vamosi
7756d0cc88 start to improve style transitions 2020-02-21 10:50:50 +01:00
Gabor Kiss-Vamosi
7f14726ba3 theme updates 2020-02-21 06:04:46 +01:00
embeddedt
1122e301ea Fix extra return statement in lv_bar_get_value 2020-02-20 16:45:59 -05:00
Gabor Kiss-Vamosi
8dcfc535b3 start to make material theme more general 2020-02-20 16:01:49 +01:00
Gabor Kiss-Vamosi
759c4ccb35 use 0.1 degree resolution for image rotation in lv_img and lv_canvas 2020-02-20 14:31:17 +01:00
Gabor Kiss-Vamosi
9d7e9f8cb3 fix warnings 2020-02-20 12:27:33 +01:00
Gabor Kiss-Vamosi
0dc1f38d80 imgbtn: compiler error fixes 2020-02-20 12:15:07 +01:00
Gabor Kiss-Vamosi
ecbf97178d add lv_obj_fade_in/out 2020-02-20 12:14:53 +01:00
Gabor Kiss-Vamosi
63ae4a6570 add lv_anim_get_delay() 2020-02-20 12:14:17 +01:00
Gabor Kiss-Vamosi
d979cb7f21 spinbox: add support to 'cursor position with click' 2020-02-20 05:08:03 +01:00
Gabor Kiss-Vamosi
94af20a451 spinbox: add inc/dec event callbacks to be used with +/- buttons created for the spinbox 2020-02-19 12:47:28 +01:00
Gabor Kiss-Vamosi
2091ee3261 roller: fix build errror with disabled animations 2020-02-19 12:46:31 +01:00
Gabor Kiss-Vamosi
49d86040f9 improve roller's theme 2020-02-19 11:52:32 +01:00
Gabor Kiss-Vamosi
e653aacad9 roller: minor fixes 2020-02-19 11:52:15 +01:00
Gabor Kiss-Vamosi
7b6ef62573 upade layout's comments 2020-02-19 06:58:42 +01:00
Gabor Kiss-Vamosi
ac0e477c70 roller: fix broken animtion 2020-02-19 06:39:55 +01:00
Gabor Kiss-Vamosi
748c84c88c add LV_LAYOUT_PRETTY_TOP/MID/BOTTOM instead of LV_LAYOUT_PRETTY 2020-02-19 06:34:35 +01:00
Gabor Kiss-Vamosi
0310f2d789 change anim API and add repeat count 2020-02-19 06:18:24 +01:00
Anton Svitenkov
320ee83dac Fix initialization of disp->last_activity_time (#1388)
if we use custom memory allocation, 'last_activity_time' must be initialized with zero value

Co-authored-by: ftrtyfytfjh <email@email.com>
2020-02-18 07:44:20 -05:00
Gabor Kiss-Vamosi
7fa082b7b5 merge master 2020-02-18 12:29:01 +01:00
Themba Dube
7a022772fc Merge branch 'fix_warnings' into dev-7.0 2020-02-17 19:17:12 -05:00
Themba Dube
914383eea3 Move all uses of _LV_OBJ_STYLE_SET_GET_DECLARE to lv_obj_style_dec.h 2020-02-17 19:14:53 -05:00
Gabor Kiss-Vamosi
f3cad63565 fix include in built-in font 2020-02-17 16:07:00 +01:00
Gabor Kiss-Vamosi
9b01f37fc7 textarea: use 'bullet' instead of '*' in pwd mode if available 2020-02-17 16:04:16 +01:00
Gabor Kiss-Vamosi
87b192c61d draw: add blend_mode fields to draw dscs to avoid a lot #if #endif if LV_USE_BLEND_MODES = 0 2020-02-17 16:03:49 +01:00
Gabor Kiss-Vamosi
dde1547be1 add LV_USE_BLEND_MODES and LV_USE_OPA_SCALE
it saves some style property queries by skipping some rarely used proeprties
2020-02-17 15:41:24 +01:00
Gabor Kiss-Vamosi
173206037d style transition fixes 2020-02-17 14:36:32 +01:00
Gabor Kiss-Vamosi
def245f939 Merge pull request #1385 from DeonMarais64/patch-1
Fix warning
2020-02-17 09:37:37 +01:00
Gabor Kiss-Vamosi
d1e3aa254d add ext. click are to the slider 2020-02-17 06:59:01 +01:00
Gabor Kiss-Vamosi
a0827e74e2 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-02-17 06:45:09 +01:00
Gabor Kiss-Vamosi
0a06c70c27 disable LV_TXT_LINE_BREAK_LONG_LEN by default 2020-02-17 06:44:56 +01:00
Gabor Kiss-Vamosi
943e6cd4d4 Merge pull request #1386 from ShenRen/dev-7.0
add a object`s user data free interface (redo)
2020-02-17 06:03:47 +01:00
RenShen
5199bda6f6 add a object`s user data free interface 2020-02-16 22:24:26 +08:00
Deon Marais
58483fc1aa Fix warning
Warning: transfer of control bypasses initialization lv_tabview.c 926
2020-02-16 06:29:48 +02:00
Themba Dube
8b61bfc70a lv_roller_signal: initialize res variable 2020-02-15 15:22:24 -05:00
Themba Dube
2d8254a91d lv_btnmatrix: don't crash when pointer events aren't on a button 2020-02-15 15:13:57 -05:00
Themba Dube
63ad3df793 Fix some warnings 2020-02-15 14:18:47 -05:00
Themba Dube
7722a2b49d Remove unneeded call to lv_obj_set_pos 2020-02-15 13:34:17 -05:00
Themba Dube
4a4e6b59b1 Fix two -Wuninitialized warnings 2020-02-15 13:31:47 -05:00
Gabor Kiss-Vamosi
332124f1f4 fix theme include 2020-02-15 11:57:10 +01:00
Gabor Kiss-Vamosi
75233b6499 style opa default value fixes 2020-02-15 11:29:54 +01:00
Gabor Kiss-Vamosi
16df7844e2 theme msgbox updates 2020-02-15 08:47:12 +01:00
Gabor Kiss-Vamosi
6c1a96ce2d make style transitions smoother 2020-02-15 02:56:24 +01:00
Gabor Kiss-Vamosi
b6388bc5ac clean up the widgets style lists on delete 2020-02-15 02:30:20 +01:00
Gabor Kiss-Vamosi
761295b99d fixes in various configurations 2020-02-15 02:19:44 +01:00
Gabor Kiss-Vamosi
b8676b26b2 renames and fixes 2020-02-15 00:33:26 +01:00
Gabor Kiss-Vamosi
8a1a5e524f rename lv_objx/ to lv_widgets/ 2020-02-14 22:04:33 +01:00
Gabor Kiss-Vamosi
c9855c3028 merge dev-7.0 2020-02-14 18:26:31 +01:00
Gabor Kiss-Vamosi
a265b8d5c6 merge master 2020-02-14 18:22:51 +01:00
Gabor Kiss-Vamosi
c00750d19f lv_tileview: fix scroll animation 2020-02-14 18:19:24 +01:00
Gabor Kiss-Vamosi
c2fb6c9af2 minor renames and fixes 2020-02-14 17:03:25 +01:00
embeddedt
36a4307930 Send proper tile ID in tileview VALUE_CHANGED event 2020-02-14 10:06:44 -05:00
Gabor Kiss-Vamosi
61d4993cee fit, layout and state renames 2020-02-14 13:38:48 +01:00
Gabor Kiss-Vamosi
220d98ffaa remove teh old themes 2020-02-14 12:56:16 +01:00
Gabor Kiss-Vamosi
74d3c8b034 minor theme fixes 2020-02-14 12:55:33 +01:00
Gabor Kiss-Vamosi
3221e56e18 fixes after rename 2020-02-14 12:44:15 +01:00
Gabor Kiss-Vamosi
53f774a61e rename files too 2020-02-14 12:40:09 +01:00
Gabor Kiss-Vamosi
bd9299c89e rename ta, cb, sw, ddlist, mbox, kb, btnm, lmeter, preload 2020-02-14 12:36:49 +01:00
Gabor Kiss-Vamosi
738faeda21 minor fixes 2020-02-14 12:22:52 +01:00
Gabor Kiss-Vamosi
30910e392b remove a patch file 2020-02-14 10:22:02 +01:00
Gabor Kiss-Vamosi
ed3f0e478c further image invalidataion improvments 2020-02-14 10:21:38 +01:00
Gabor Kiss-Vamosi
9d664b27ec image invalidation fixes 2020-02-14 09:44:39 +01:00
Gabor Kiss-Vamosi
f83ecfb16f image invalidation fixes 2020-02-14 08:10:25 +01:00
Gabor Kiss-Vamosi
2d0fd69910 fixes for mbox and roller 2020-02-13 14:39:15 +01:00
Gabor Kiss-Vamosi
8920865b7e unify LV_STYLE_STATE_.. and LV_OBJ_STATE_... to LV_STATE_... 2020-02-13 14:26:58 +01:00
Gabor Kiss-Vamosi
55124afe66 minor fixes 2020-02-13 13:56:08 +01:00
Gabor Kiss-Vamosi
4cfeb9e985 minor fixes 2020-02-13 06:56:14 +01:00
Gabor Kiss-Vamosi
40e2da1905 update port templates 2020-02-13 06:55:36 +01:00
Gabor Kiss-Vamosi
1b690e6238 renames and minor fixes 2020-02-12 08:54:03 +01:00
embeddedt
b9697df3a1 Warn if lv_obj_set_pos is called on a screen object 2020-02-11 08:42:04 -05:00
Gabor Kiss-Vamosi
1c0d445e7f integrate win 2020-02-11 09:40:40 +01:00
Gabor Kiss-Vamosi
e0fa621e75 add lv_obj_get_draw_rect_ext_pad_size to unify getting ext draw pad 2020-02-11 06:41:41 +01:00
Gabor Kiss-Vamosi
418e84abbd label: bg padding make the label smaller
(no extra virtual size)
2020-02-11 06:41:41 +01:00
Gabor Kiss-Vamosi
2f17d43c13 add STYLE_OUTlINE 2020-02-11 06:41:41 +01:00
Gabor Kiss-Vamosi
fe3e767717 integrate cpicker 2020-02-11 06:41:03 +01:00
Gabor Kiss-Vamosi
ffd8fbec01 improve border drawing 2020-02-10 01:32:25 +01:00
Gabor Kiss-Vamosi
6d0dd49aff arc draw fixes 2020-02-10 01:08:49 +01:00
Gabor Kiss-Vamosi
6996f41ea7 Revert "imporve arc drawing"
This reverts commit 35774188a0.
2020-02-10 01:07:06 +01:00
Gabor Kiss-Vamosi
35774188a0 imporve arc drawing 2020-02-10 00:38:16 +01:00
Gabor Kiss-Vamosi
0381cc60c5 add PATTERN_REPEAT again
It's good complementer of VALUE. PATTERN can be an image on a button and VALUE can be any extra text
2020-02-10 00:30:17 +01:00
Gabor Kiss-Vamosi
0dd6de58b4 chart draw fix 2020-02-10 00:21:19 +01:00
Gabor Kiss-Vamosi
5fe82bd4b8 drawing speed up 2020-02-09 23:08:25 +01:00
Gabor Kiss-Vamosi
48e6f092e3 Merge branch 'feat-new-style' of https://github.com/littlevgl/lvgl into feat-new-style 2020-02-09 21:40:02 +01:00
Gabor Kiss-Vamosi
bd1b521a6d table reduce style querries 2020-02-09 21:34:19 +01:00
Gabor Kiss-Vamosi
4d8d45eecd page scrollbar draw fix 2020-02-09 21:26:09 +01:00
Gabor Kiss-Vamosi
6e771ecd5e ddlist: trucate size of would be dropped out of the screen 2020-02-09 11:23:22 +01:00
Gabor Kiss-Vamosi
32d8398089 draw border fix 2020-02-09 11:16:35 +01:00
Gabor Kiss-Vamosi
b1c89c3a93 draw birder fix 2020-02-09 10:59:45 +01:00
Gabor Kiss-Vamosi
eb43ac7b51 add #if guard to tests 2020-02-09 10:59:38 +01:00
Gabor Kiss-Vamosi
114994fa8c various draw speed improvments 2020-02-09 10:48:34 +01:00
xennex22
43a06b41be Fix a few compiler warnings (#1371) 2020-02-07 16:28:14 -05:00
Gabor Kiss-Vamosi
2cd3a5ac09 Merge pull request #1370 from littlevgl/embeddedt-patch-1
Ensure lv_ta_set_one_line doesn't change text alignment
2020-02-07 15:44:36 +01:00
Gabor Kiss-Vamosi
624a37c529 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-02-07 14:04:05 +01:00
Gabor Kiss-Vamosi
bc7efef537 make base_line signed 2020-02-07 14:03:51 +01:00
Gabor Kiss-Vamosi
369376892e add LV_STYLE_VALUE_... properties 2020-02-07 01:44:22 +01:00
Gabor Kiss-Vamosi
d524a88116 Remove style animations. It's more flexible to make it users task via local styles 2020-02-06 23:01:47 +01:00
Gabor Kiss-Vamosi
a31369678d merge dev-7.0 2020-02-06 01:08:42 +01:00
Gabor Kiss-Vamosi
197bc46d61 shadow draw fix when he left corners are partially clipped 2020-02-06 00:58:56 +01:00
Gabor Kiss-Vamosi
0598428d0d minor draw_blend optimizations 2020-02-05 23:19:32 +01:00
Gabor Kiss-Vamosi
e235c4d5ce arc draw: make full arcs special case 2020-02-05 23:19:18 +01:00
Gabor Kiss-Vamosi
9a8ce0d0e2 arc draw: make full arcs special case 2020-02-05 23:12:24 +01:00
embeddedt
79a65213d6 lv_ta_set_one_line: retrieve text alignment correctly
`lv_label_get_align` should be used, not `lv_ta_get_text_align`.
2020-02-05 10:01:44 -05:00
Gabor Kiss-Vamosi
f56013eb31 merge dev-7.0 2020-02-05 15:45:48 +01:00
Gabor Kiss-Vamosi
b3cce8a069 minor arc invalidation fix 2020-02-05 15:44:19 +01:00
Gabor Kiss-Vamosi
4ad256f00e minor fixes 2020-02-05 15:41:25 +01:00
Gabor Kiss-Vamosi
8b5837cc44 merge dev-7.0 2020-02-05 15:35:53 +01:00
Gabor Kiss-Vamosi
9535c8976a arc invalidation fixes 2020-02-05 15:32:14 +01:00
Gabor Kiss-Vamosi
167e4d8e25 merge dev-7.0 2020-02-05 15:12:45 +01:00
Gabor Kiss-Vamosi
156d518ba6 revert modified styles 2020-02-05 15:00:03 +01:00
Gabor Kiss-Vamosi
5b85469632 further improve arc invalidation 2020-02-05 14:49:02 +01:00
Gabor Kiss-Vamosi
d4f34cb257 Merge branch 'arc_inv' into dev-7.0 2020-02-05 14:10:07 +01:00
Gabor Kiss-Vamosi
d8e921556a fix minor issue in arc drawo 2020-02-05 13:59:38 +01:00
Gabor Kiss-Vamosi
883551d50a fix warning 2020-02-05 13:58:11 +01:00
Gabor Kiss-Vamosi
f5d20f5e30 improve arc invalidation 2020-02-05 12:52:18 +01:00
Gabor Kiss-Vamosi
11b2f53c06 Merge branch 'dev-7.0' into arc_inv 2020-02-05 10:45:28 +01:00
Gabor Kiss-Vamosi
62e42d13d8 merge master 2020-02-05 10:45:10 +01:00
Gabor Kiss-Vamosi
c43704756f improve arc invalidation 2020-02-05 10:40:50 +01:00
Gabor Kiss-Vamosi
68e77be7f5 arc draw fix 2020-02-05 10:32:58 +01:00
Gabor Kiss-Vamosi
47f9e42f9a merge dev-7.0 2020-02-05 03:55:03 +01:00
Gabor Kiss-Vamosi
cf8ace602c improve arc drawing 2020-02-05 03:46:44 +01:00
Gabor Kiss-Vamosi
4c5f713914 arc draw: improve speed 2020-02-05 03:29:16 +01:00
Gabor Kiss-Vamosi
2c7579e947 shadow fix 2020-02-04 19:35:00 +01:00
embeddedt
f960c75e3f Ensure lv_ta_set_one_line doesn't change text alignment 2020-02-04 08:16:41 -05:00
Gabor Kiss-Vamosi
84ed542b34 Merge pull request #1365 from DeonMarais64/master
Incorrect assert,  Compiler warning fix
2020-02-04 10:20:11 +01:00
Gabor Kiss-Vamosi
720322ca9e relace lv_coord_t with int32_t in some performance ciritcal functions 2020-02-04 02:09:15 +01:00
Gabor Kiss-Vamosi
eef239fe70 add LV_STYLE_SCALE_BORDER 2020-02-03 20:49:34 +01:00
Gabor Kiss-Vamosi
cd48d7e473 integrate tileview and preloader + minor improvments 2020-02-03 16:18:53 +01:00
Gabor Kiss-Vamosi
59e70fc6cb apply click focus on press indetad of release 2020-02-02 16:08:43 +01:00
Gabor Kiss-Vamosi
9a5096308b finish lv_obj_style_set/get API simplification 2020-02-02 15:58:08 +01:00
Gabor Kiss-Vamosi
61ec04dd4d start to simplfy lv_obj_style_set/get API 2020-02-02 14:09:19 +01:00
Gabor Kiss-Vamosi
64d281582d img: add drawing background 2020-02-02 10:39:46 +01:00
Gabor Kiss-Vamosi
a59f0edc0a improve style transitions 2020-02-01 20:37:13 +01:00
Gabor Kiss-Vamosi
24ff098588 calendar, list, arc and line improvments 2020-02-01 15:02:52 +01:00
Gabor Kiss-Vamosi
5c3746ee72 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-01-31 06:48:54 +01:00
Gabor Kiss-Vamosi
2839f43e24 add lv_obj_invalidate to some canvas functions 2020-01-31 06:48:41 +01:00
Gabor Kiss-Vamosi
27d23dbeea improve calendar 2020-01-31 06:45:33 +01:00
Deon Marais
4bf228ca2c Remove incorrect assert 2020-01-30 15:17:02 +02:00
Deon Marais
603786f969 Update lv_label.c 2020-01-30 15:15:36 +02:00
Deon Marais
0065992fcd Update lv_symbol_def.h 2020-01-30 15:06:43 +02:00
Deon Marais
e60439a9e7 Update lv_symbol_def.h 2020-01-30 15:02:46 +02:00
Deon Marais
6fbc9f3400 Update lv_color.h 2020-01-30 15:00:42 +02:00
Deon Marais
708d68eac1 Update lv_label.c 2020-01-30 14:58:14 +02:00
Gabor Kiss-Vamosi
cde12976ac label: fix writing out of bounds in LV_LABEL_LONG_FOT mode #1364 2020-01-30 06:39:20 +01:00
Gabor Kiss-Vamosi
0c093da924 win: fix if created as screen 2020-01-30 06:13:15 +01:00
Gabor Kiss-Vamosi
eb44a75bf6 ta, tabview, tileview, win: fix creating as screen. Closes #1363 2020-01-30 05:48:49 +01:00
Gabor Kiss-Vamosi
dde953f0e2 fix warning 2020-01-30 05:41:24 +01:00
Gabor Kiss-Vamosi
6b4ec1ee2e ta: fix disabling cursor blink. Closes #1361 2020-01-30 05:39:38 +01:00
Deon Marais
1765dde018 Fix compiler warning in lv_color_to16 2020-01-29 17:47:20 +02:00
Deon Marais
eb67692baa Removed incorrect assert
Removed incorrect assert in lv_label_set_static_text
2020-01-29 17:43:36 +02:00
Gabor Kiss-Vamosi
286491b847 improve states and focus handling 2020-01-28 22:15:45 +01:00
Gabor Kiss-Vamosi
e7af52be14 btnm: improve handle focus handling 2020-01-28 15:24:18 +01:00
Gabor Kiss-Vamosi
59ee86faa6 improve click focus 2020-01-28 15:24:02 +01:00
Gabor Kiss-Vamosi
f2c53da294 fix warning in lv_draw_blend.c 2020-01-27 13:29:12 +01:00
Gabor Kiss-Vamosi
f2c7210232 add LV_SIGNAL/EVENT_LEAVE + state and indev improvments 2020-01-24 14:55:56 +01:00
Gabor Kiss-Vamosi
c899edd283 add group handling to the new ddlist 2020-01-24 06:03:43 +01:00
Gabor Kiss-Vamosi
eef94325a0 rework ddlist 2020-01-23 17:16:11 +01:00
Gabor Kiss-Vamosi
d108b2e793 further reduce the memory usage of shadow drawing 2020-01-22 12:38:11 +01:00
Gabor Kiss-Vamosi
18378e0a08 reduce shadow memory usage by ~30% 2020-01-22 00:05:49 +01:00
Gabor Kiss-Vamosi
96e2f87952 fix mem leak in bidi 2020-01-21 22:32:25 +01:00
Gabor Kiss-Vamosi
ff46220426 detach roller from ddlist 2020-01-21 22:09:50 +01:00
Gabor Kiss-Vamosi
da095828dc reenablea groups + remove overlay style properties 2020-01-21 15:56:03 +01:00
Gabor Kiss-Vamosi
10b9c9b2f5 fix crash on page delete 2020-01-21 07:00:57 +01:00
Gabor Kiss-Vamosi
3ec7ca2b37 theme updates 2020-01-21 06:26:37 +01:00
Gabor Kiss-Vamosi
2dedea5600 apply theme to some objects 2020-01-20 16:11:38 +01:00
Gabor Kiss-Vamosi
a53fca8c7f fix buffer out of bound error in lv_bidi_get_visual/logicl_pos(). Fixes #1351 2020-01-20 14:51:37 +01:00
Gabor Kiss-Vamosi
9b283981e8 add lv_obj_invalidate_area to replace lv_inv_area in objects. Fixes #1360 2020-01-20 14:47:05 +01:00
Gabor Kiss-Vamosi
ed35420475 start to implement the new theme 2020-01-18 23:34:34 +01:00
Frank
c8027aa70f draw_blend: fix disp declaration for LV_COLOR_SCREEN_TRANSP (#1359) 2020-01-18 08:09:53 -05:00
Gabor Kiss-Vamosi
70a2286f0f Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-01-18 12:16:45 +01:00
Gabor Kiss-Vamosi
33f5448a38 fix overflow on 16 bit MCU in font processing 2020-01-17 15:49:36 +01:00
Gabor Kiss-Vamosi
4d42a06abe merge dev-7.0 2020-01-17 15:30:19 +01:00
Gabor Kiss-Vamosi
87d5c4d135 indev_gesture: avoid referring NULL pointer 2020-01-17 15:28:13 +01:00
Gabor Kiss-Vamosi
03b0f7fc9a Merge pull request #1357 from littlevgl/embeddedt-patch-1
Make unclickable drop down lists work
2020-01-17 15:21:06 +01:00
Gabor Kiss-Vamosi
1dda6f5222 indev: minor fix to avide potential referring of NULL pointer 2020-01-17 13:43:26 +01:00
Gabor Kiss-Vamosi
6640585827 merge dev-7.0 2020-01-17 13:36:10 +01:00
Gabor Kiss-Vamosi
8d71d87242 anim: reinitialize 'last_task_run' when the first anim is added after suspend 2020-01-17 13:30:48 +01:00
Gabor Kiss-Vamosi
6e5e1ab154 ddlist: fix ext draw pad 2020-01-17 13:23:02 +01:00
zlm
400ca85c67 Add a gesture event and fix an arc drawing bug (#1300) 2020-01-16 19:25:02 -05:00
embeddedt
c75d868c2a Make unclickable drop down lists work 2020-01-16 19:07:38 -05:00
Gabor Kiss-Vamosi
42b561fcdc add style copy + minor refactoring 2020-01-16 21:25:11 +01:00
Alexey Papkovskiy
ca84aaf6e8 fix calculation of font kerning values (#1356) 2020-01-16 12:40:25 -05:00
Gabor Kiss-Vamosi
fae87aa3a3 add style test 2020-01-16 14:27:12 +01:00
Gabor Kiss-Vamosi
805af47113 refactoring: class->style, style_dsc->style_list 2020-01-16 14:26:36 +01:00
Gabor Kiss-Vamosi
8d6a5ac776 chart faded area updates 2020-01-15 06:21:48 +01:00
Gabor Kiss-Vamosi
dabd00088b merge dev-7.0 2020-01-15 00:13:32 +01:00
Gabor Kiss-Vamosi
55ed99d851 merge master 2020-01-15 00:10:13 +01:00
Gabor Kiss-Vamosi
533b949595 add dashed line support to horizontal and vertical lines 2020-01-15 00:08:29 +01:00
Gabor Kiss-Vamosi
4f33b531b4 integrate chart 2020-01-14 22:53:27 +01:00
Gabor Kiss-Vamosi
3ba87cba48 minor fixes 2020-01-14 21:16:48 +01:00
Gabor Kiss-Vamosi
d7198aeeee fix polygon drawing 2020-01-14 10:12:36 +01:00
Gabor Kiss-Vamosi
89c0ad468e improve table borders 2020-01-14 08:36:36 +01:00
Gabor Kiss-Vamosi
c3dddda326 integrate table 2020-01-12 22:08:34 +01:00
Gabor Kiss-Vamosi
b033e9d9c5 merge dev-7.0 2020-01-12 15:38:54 +01:00
Gabor Kiss-Vamosi
5b5400fdf1 experiemnt with style transitions 2020-01-12 15:33:14 +01:00
Gabor Kiss-Vamosi
d134ec39e5 test build clean up 2020-01-12 15:17:30 +01:00
Gabor Kiss-Vamosi
fedd1b93ee fix test build 2020-01-12 15:15:30 +01:00
Gabor Kiss-Vamosi
5832f080f5 makefile fixes 2020-01-12 15:03:12 +01:00
Gabor Kiss-Vamosi
ea46f2a236 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-01-12 14:35:53 +01:00
Gabor Kiss-Vamosi
b08bf29aed update makefile for backward compatibility 2020-01-12 14:34:43 +01:00
Gabor Kiss-Vamosi
51928059d2 ta: fix max-length bug in pwd mode 2020-01-11 16:02:23 +01:00
Gabor Kiss-Vamosi
c668c1731d remove lv_label_body_draw, can be replaced by style 2020-01-10 18:16:20 +01:00
Gabor Kiss-Vamosi
2a3384fdc2 bidi: fix array oveflow 2020-01-10 18:16:07 +01:00
Gabor Kiss-Vamosi
284155aab0 make bg_opa:transp the deafult 2020-01-10 16:01:33 +01:00
Gabor Kiss-Vamosi
6344f5f204 integrate mbox 2020-01-10 14:20:10 +01:00
Gabor Kiss-Vamosi
f8f1605714 calendar: simplify styles, and supprot to draw rect. on eash state 2020-01-10 14:19:42 +01:00
Gabor Kiss-Vamosi
bd5f0206f1 integrate led+imgbtn, add BG to arc 2020-01-10 11:10:07 +01:00
Gabor Kiss-Vamosi
f38c9c8faf bar and sw anim fixes 2020-01-10 07:58:39 +01:00
Gabor Kiss-Vamosi
54e11bb835 remove TA cursor type. Use cursor style instead. 2020-01-10 06:52:57 +01:00
Themba Dube
00ba66534d Initialize adv_hittest for non-screen objects 2020-01-09 20:26:46 -05:00
Themba Dube
8f9fb4578c Properly cast struct initializers in lv_color.h 2020-01-09 19:11:40 -05:00
Themba Dube
59fd1ad5f2 Fix weird behavior with switch knobs 2020-01-09 19:11:14 -05:00
Gabor Kiss-Vamosi
bcd4e22429 copy adv_hittest in lv_obj_create 2020-01-09 18:15:54 +01:00
Gabor Kiss-Vamosi
46bf92cd93 remove old style caching 2020-01-09 16:40:22 +01:00
Gabor Kiss-Vamosi
1fcfdf1e28 allow disabling style casche 2020-01-09 15:36:12 +01:00
embeddedt
d3d8205b2f Initialize refresh task before creating display objects 2020-01-09 09:21:32 -05:00
Gabor Kiss-Vamosi
e3c85f6baf improve style caching 2020-01-09 15:10:45 +01:00
Gabor Kiss-Vamosi
5a41efd899 Merge branch 'feat-new-style' of https://github.com/littlevgl/lvgl into feat-new-style 2020-01-09 14:16:58 +01:00
Gabor Kiss-Vamosi
3f617e39d5 try new style caching 2020-01-09 14:16:32 +01:00
Gabor Kiss-Vamosi
b5ce3dd25e minor style improvements 2020-01-09 01:37:14 +01:00
Gabor Kiss-Vamosi
621ff4e0f7 style optimization 2020-01-08 23:56:51 +01:00
Gabor Kiss-Vamosi
76c792929a Merge branch 'feat-new-style' of https://github.com/littlevgl/lvgl into feat-new-style 2020-01-08 23:13:37 +01:00
Gabor Kiss-Vamosi
d8e157ed86 style optimizatin 2020-01-08 23:13:08 +01:00
Gabor Kiss-Vamosi
b175b44fed minor fixes 2020-01-08 21:52:07 +01:00
Gabor Kiss-Vamosi
1b94cf6851 reimplement style caching 2020-01-08 21:31:05 +01:00
Gabor Kiss-Vamosi
02f4dd764f style improvments + integrate arc, canvas, objmask 2020-01-07 23:43:57 +01:00
Gabor Kiss-Vamosi
2eabc1f693 Merge pull request #1309 from littlevgl/power_efficiency
Improve LittlevGL power efficiency
2020-01-07 16:08:05 +01:00
Gabor Kiss-Vamosi
42e6984a75 show the pressed days on calendar 2020-01-07 00:49:47 +01:00
Gabor Kiss-Vamosi
3c150c8e79 remove btn ink effect
It was too specific and probably can't be used directly in real life projects
2020-01-06 23:07:57 +01:00
Gabor Kiss-Vamosi
da503aca9f integrate calendar 2020-01-06 22:14:14 +01:00
Gabor Kiss-Vamosi
6cbd2114e3 rename lv_style_value to lv_style_int 2020-01-06 22:14:04 +01:00
Gabor Kiss-Vamosi
a9e3bbeddc Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2020-01-06 15:06:01 +01:00
Gabor Kiss-Vamosi
1c46d69ef6 apply lv_obj_realign on parent size change. Close #1308 2020-01-06 15:05:51 +01:00
Gabor Kiss-Vamosi
f31ba6cf6f fix memory leak in decoding indexed images 2020-01-06 11:23:48 +01:00
Themba Dube
7afd70a005 Fix -Wnarrowing warning 2020-01-05 20:33:11 -05:00
embeddedt
492c9e4178 Fix #1342 (regression from #1319) 2020-01-05 19:28:29 -05:00
Gabor Kiss-Vamosi
168820118b Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into feat-new-style 2020-01-05 20:05:17 +01:00
Gabor Kiss-Vamosi
73614e6b22 start to separate virtual and real object parts 2020-01-05 20:05:11 +01:00
Themba Dube
3c430cd784 Patch case where animation end frame is smaller than start frame 2020-01-05 12:57:15 -05:00
Gabor Kiss-Vamosi
eea40f41bb merge dev-7.0 2020-01-05 17:05:54 +01:00
Themba Dube
f583b4ffd5 Add task_list_changed flag 2020-01-05 09:27:09 -05:00
Themba Dube
7fcd4669a4 Merge branch 'dev-7.0' into power_efficiency 2020-01-05 09:13:54 -05:00
Themba Dube
32b4a7fc72 Fix regression that removed smooth animation of bar values 2020-01-05 08:57:09 -05:00
Gabor Kiss-Vamosi
6e2a707cfc minor fixes 2020-01-05 01:16:13 +01:00
Gabor Kiss-Vamosi
7d25f66060 Merge branch 'master' of https://github.com/littlevgl/lvgl 2020-01-05 00:10:17 +01:00
Gabor Kiss-Vamosi
9c599e1cc1 remove chart division lines' extra pixel at the ends 2020-01-04 22:18:30 +01:00
Gabor Kiss-Vamosi
678fbd56d3 fix LV_CHART_TYPE_POINT y misalignment 2020-01-04 22:15:59 +01:00
Gabor Kiss-Vamosi
2c8ebb873e Merge pull request #1339 from 3096/master
lv_btnm fix bug don't toggle if inactive
2020-01-04 22:05:54 +01:00
Gabor Kiss-Vamosi
12222469ea Merge pull request #1341 from littlevgl/improve-hittest
Implement advanced hit-testing for zoomed images
2020-01-04 21:35:25 +01:00
Themba Dube
08a125c860 Make lv_obj_is_point_on_coords accept a constant point 2020-01-04 08:52:52 -05:00
Themba Dube
23625441a8 Implement advanced hit-testing for zoomed images 2020-01-04 08:48:51 -05:00
Themba Dube
9432622948 Allow objects to override bounding-box hit-testing 2020-01-04 08:48:37 -05:00
Gabor Kiss-Vamosi
32770da251 integrate ta, kb 2020-01-03 11:06:11 +01:00
3096
e5e68ac679 lv_btnm: don't toggle if inactive 2020-01-02 22:01:42 -08:00
Gabor Kiss-Vamosi
14ea5ab756 integrate line 2020-01-01 22:01:19 +01:00
Gabor Kiss-Vamosi
aa5634dbcd integrate lmeter and gauge 2020-01-01 21:44:16 +01:00
Gabor Kiss-Vamosi
bd382fe262 integrate tabview 2020-01-01 18:46:22 +01:00
Gabor Kiss-Vamosi
96b0955e97 solve conflicts 2020-01-01 16:01:31 +01:00
Gabor Kiss-Vamosi
c81f909263 integrate ddlist, roller + add LV_STYLE_PATTERN 2020-01-01 15:25:16 +01:00
Gabor Kiss-Vamosi
72d5ea44d3 revert changes in lv_group.c/h 2020-01-01 07:30:04 +01:00
Themba Dube
4432a3d31f Merge remote-tracking branch 'origin/master' into dev-7.0 2019-12-31 19:23:21 -05:00
Gabor Kiss-Vamosi
ecc8e48491 integrate img and cb 2019-12-31 23:02:25 +01:00
Gabor Kiss-Vamosi
b4ee25e9cc integrate image drawing + slider, sw 2019-12-31 22:13:32 +01:00
Gabor Kiss-Vamosi
9b757d30fc theme improvments 2019-12-31 11:13:09 +01:00
Gabor Kiss-Vamosi
b0fbac3488 start the new theme system 2019-12-31 07:03:34 +01:00
Gabor Kiss-Vamosi
584e88da08 style: integrate page + fixes + refactoring 2019-12-31 06:10:50 +01:00
Gabor Kiss-Vamosi
479012eb48 lv_btnm: fix FOCUS signal 2019-12-30 15:01:15 +01:00
Gabor Kiss-Vamosi
f8f308a72e lv_event_send_func: obj can be NULL so prevents false positive assert 2019-12-30 14:30:44 +01:00
Gabor Kiss-Vamosi
40ed2b9e26 img_design: return 'not cover' is opa != COVER 2019-12-30 14:25:04 +01:00
Gabor Kiss-Vamosi
da59655d35 minor style fixes + integrate shadow drawing 2019-12-28 01:27:20 +01:00
Gabor Kiss-Vamosi
d80d03ef83 Merge pull request #1333 from amirgon/_lv_mem_buf-root-ptr
Add _lv_mem_buf as root pointer for gc
2019-12-28 00:51:34 +01:00
Gabor Kiss-Vamosi
93f6e48fd4 improve rendering time 2019-12-27 15:39:54 +01:00
Gabor Kiss-Vamosi
302f21cbd5 style fixes 2019-12-27 11:16:21 +01:00
Gabor Kiss-Vamosi
54ae93d1eb add overly style property 2019-12-27 10:21:35 +01:00
embeddedt
b9c8ee1794 Fix typo in ca576434e2 2019-12-26 18:33:24 -05:00
Amir Gonnen
0af0994da1 Add _lv_mem_buf as root pointer for gc 2019-12-26 22:12:26 +02:00
Amir Gonnen
4267acba0d Comment out prototype without definition (#1332) 2019-12-26 14:48:47 -05:00
embeddedt
d3f195e022 Remove use of lv_conf_checker.h 2019-12-26 14:48:14 -05:00
Themba Dube
d9ad45313c Support LV_CONF_INCLUDE_SIMPLE for backwards compatibility 2019-12-26 11:56:06 -05:00
Themba Dube
36ba091af2 Fix typo in lv_draw_label.c 2019-12-26 11:55:53 -05:00
Themba Dube
b2319f1412 Merge branch 'master' into dev-7.0 2019-12-26 11:16:22 -05:00
Gabor Kiss-Vamosi
26fdb159fe Delete azure-pipelines.yml 2019-12-26 15:27:39 +01:00
Gabor Kiss-Vamosi
05736f5957 Update azure-pipelines.yml for Azure Pipelines 2019-12-26 15:15:00 +01:00
Gabor Kiss-Vamosi
c400ba1bdb Update azure-pipelines.yml for Azure Pipelines 2019-12-26 15:14:38 +01:00
Gabor Kiss-Vamosi
b7c6cf94c6 Merge pull request #1324 from CrogST/patch-2
disable warning of unused param
2019-12-26 15:12:15 +01:00
Gabor Kiss-Vamosi
7cad0abb9f Update lv_port_indev_template.c 2019-12-26 15:05:21 +01:00
Gabor Kiss-Vamosi
f4c172f56a Update lv_port_indev_template.c 2019-12-26 15:05:06 +01:00
Gabor Kiss-Vamosi
e432f64644 Update azure-pipelines.yml 2019-12-26 15:01:48 +01:00
Gabor Kiss-Vamosi
2d203c8a41 Update azure-pipelines.yml for Azure Pipelines 2019-12-26 15:00:47 +01:00
CrogST
ca576434e2 disable warning of unused param
If LV_USE_BIDI undefined, than bidi_dir is not used and compiler generate warning.
2019-12-26 13:50:59 +03:00
Gabor Kiss-Vamosi
5dcee31f94 Merge branch 'dev-7.0' into feat-new-style 2019-12-26 04:18:21 +01:00
Gabor Kiss-Vamosi
921b191124 add azure-pipeline.yml 2019-12-26 03:44:06 +01:00
Gabor Kiss-Vamosi
9aa535e30d Set up CI with Azure Pipelines
[skip ci]
2019-12-26 03:42:20 +01:00
Gabor Kiss-Vamosi
0a53c05011 fix warnings 2019-12-26 03:37:28 +01:00
Gabor Kiss-Vamosi
de12286304 temprarly remove _lv_mem_buf from GC roots to fix build error 2019-12-26 03:37:13 +01:00
Gabor Kiss-Vamosi
68984828c3 add tests and lv_conf_internal.h to use LV_CONF_PATH 2019-12-26 02:49:30 +01:00
Gabor Kiss-Vamosi
9cc03b0122 add #1314 again 2019-12-26 02:12:44 +01:00
Gabor Kiss-Vamosi
f5aebd4c2c start implement style caching 2019-12-26 01:30:20 +01:00
Gabor Kiss-Vamosi
f2388b7db2 simplify lv_obj_create 2019-12-23 01:02:19 +01:00
Gabor Kiss-Vamosi
abb4eb147d Merge branch 'master' into dev-7.0 2019-12-22 23:21:25 +01:00
Gabor Kiss-Vamosi
47e29bed8e lv_mem: fix defines for 64 bit environment 2019-12-22 23:21:09 +01:00
Gabor Kiss-Vamosi
5a4e069fb8 minor fixes 2019-12-22 23:19:51 +01:00
Gabor Kiss-Vamosi
07bc58aa9c merge dev-7.0 into feat-new-style 2019-12-22 22:56:13 +01:00
Gabor Kiss-Vamosi
cd32b27bfc merge master 2019-12-22 22:52:11 +01:00
Gabor Kiss-Vamosi
095c0bff49 integrate lv_btnm, add built-in styles, move opa_scale to styles, begin style caching 2019-12-22 22:40:02 +01:00
embeddedt
7b4f461944 Implement custom, opt-in hit-testing handlers for objects (#1318) 2019-12-22 13:51:02 +00:00
Amir Gonnen
248868fef1 Add lv_deinit function (#1319) 2019-12-21 23:35:00 +00:00
Gabor Kiss-Vamosi
ef071d02a7 Merge branch 'c64-test' 2019-12-21 23:07:18 +01:00
Gabor Kiss-Vamosi
65d79a7905 img zoom fix when computing with the edge pixels 2019-12-21 22:11:42 +01:00
Gabor Kiss-Vamosi
a010412fde roller: fix misalignment if the new options has the same width as the previous 2019-12-21 21:50:41 +01:00
Gabor Kiss-Vamosi
af1453400d lv_label: bidi fixes 2019-12-21 20:48:44 +01:00
Gabor Kiss-Vamosi
638666f685 fix include in lv_api_map.h 2019-12-21 20:36:19 +01:00
Gabor Kiss-Vamosi
7175231aab tileview: call drag_end_handler only if it was dragging 2019-12-21 20:27:01 +01:00
Gabor Kiss-Vamosi
1441601e3e list layout fixes 2019-12-21 20:25:30 +01:00
Gabor Kiss-Vamosi
de1683a4ec children inherit obj state 2019-12-19 23:16:53 +01:00
Gabor Kiss-Vamosi
c2d254ff2d Merge pull request #1317 from littlevgl/dd_num_options
Add public API for retrieving option_cnt from ddlist/roller
2019-12-19 23:14:17 +01:00
Gabor Kiss-Vamosi
374657c1be new_style: integrate label 2019-12-19 22:44:18 +01:00
Themba Dube
0a3a8cc2d6 Remove leftover debugging statements 2019-12-19 16:36:29 -05:00
Themba Dube
cba91119e3 Add public API for retrieving option_cnt from ddlist/roller 2019-12-19 16:34:10 -05:00
Themba Dube
73cb9d45d7 Fix improper position calculation for bar indicator 2019-12-19 16:21:39 -05:00
Gabor Kiss-Vamosi
ec0920d933 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2019-12-19 14:41:03 +01:00
Gabor Kiss-Vamosi
51e827776f merge master 2019-12-19 14:38:36 +01:00
Gabor Kiss-Vamosi
5927de98d3 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2019-12-19 14:10:51 +01:00
Gabor Kiss-Vamosi
b01df265ee lv_sw: fix knob size calculation 2019-12-19 14:10:36 +01:00
Gabor Kiss-Vamosi
c1db465256 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2019-12-19 11:15:00 +01:00
Gabor Kiss-Vamosi
8e5446c68f add lv_anim_refr_now() 2019-12-19 11:14:51 +01:00
Gabor Kiss-Vamosi
446a318e6e add obj and style state 2019-12-19 11:05:04 +01:00
Themba Dube
59441ea6a2 Merge remote-tracking branch 'origin/dev-7.0' into power_efficiency 2019-12-18 20:02:58 -05:00
Gabor Kiss-Vamosi
02ca70c691 new_style: implement generic style set/get functions 2019-12-17 09:20:40 +01:00
Gabor Kiss-Vamosi
fdd4a427f3 Merge pull request #1315 from xennex22/dev-7.0
Minor fixes for compiler
2019-12-16 18:51:50 +01:00
xennex22
226e566ebd removed redundent test for NULL 2019-12-16 07:55:19 -08:00
xennex22
dd9d655b3d removed redundent line 2019-12-16 07:54:26 -08:00
xennex22
9f447e8a4e changed fn ptr return type from false to NULL 2019-12-16 07:53:18 -08:00
xennex22
63009588c0 removed unused function prototype 2019-12-16 07:51:07 -08:00
xennex22
92a0ef4be3 removed repeated line 2019-12-16 07:49:22 -08:00
xennex22
145864f872 made default kb maps const
also changed "Bksp" -> LV_SYMBOL_BACKSPACE
2019-12-16 07:48:40 -08:00
xennex22
f8c67bcc12 made lv_slider_draw_knob params const 2019-12-16 07:46:33 -08:00
Gabor Kiss-Vamosi
3429e58d3c Merge pull request #1314 from ElFishle/master
Fix problem: letter space is not regarded in width calculation
2019-12-16 13:41:44 +01:00
hannes
5f4f516bef Fix problem: letter space is not regarded in width calculation 2019-12-16 13:34:10 +01:00
Gabor Kiss-Vamosi
4405ab9cf7 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-12-16 06:14:55 +01:00
Gabor Kiss-Vamosi
1e4883ffc7 lv_page_creeate: fix false positive assert 2019-12-16 06:14:34 +01:00
Gabor Kiss-Vamosi
a101e9a3e5 initial version of new style system 2019-12-14 23:39:26 +01:00
Gabor Kiss-Vamosi
7567679a58 Merge pull request #1312 from patrykkrz/modification
Spinbox object - Cursor need shift to left after merge pull request #1220
2019-12-14 11:08:54 +01:00
Gabor Kiss-Vamosi
d7c74d6461 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-12-14 10:49:10 +01:00
Gabor Kiss-Vamosi
d6e4c2f50c img_cache: for a match, besides src check style too 2019-12-14 10:49:06 +01:00
Patryk Krzywdziński
30539a51ec Cursor need shift to left after merge pull request #1220 2019-12-13 15:46:55 +01:00
Gabor Kiss-Vamosi
b6b5b68d2c Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-12-11 08:57:37 +01:00
Gabor Kiss-Vamosi
f54ecc470c fix text processing with negative letter space 2019-12-11 05:33:44 +01:00
Gabor Kiss-Vamosi
6f9d66843c kb: fix deafult map 2019-12-11 05:17:30 +01:00
Themba Dube
6c64b29d26 Remove leftover debug statements 2019-12-10 20:12:24 -05:00
Themba Dube
5cbff436b4 Suspend the animation task if there are no running animations 2019-12-10 20:10:35 -05:00
Themba Dube
4cb5ab4a03 Suspend the refresh task if a refresh is not necessary 2019-12-10 20:09:40 -05:00
Themba Dube
d20c4bb26a Consider LV_TASK_PRIO_OFF when finding the delay till next run required 2019-12-10 20:09:22 -05:00
Themba Dube
3b4f648468 Make lv_task_handler() return time remaining till next task needs to be run 2019-12-10 19:47:29 -05:00
Gabor Kiss-Vamosi
cdc2cf90ce lv_color.h: fix Wconversion warnings 2019-12-10 15:06:26 +01:00
Gabor Kiss-Vamosi
efeec7d3b6 minor conversion fixes to eliminate warnings 2019-12-09 14:35:13 +01:00
Gabor Kiss-Vamosi
fc29f58754 fix _WIN64 test (has only on underscore) 2019-12-09 14:34:53 +01:00
Gabor Kiss-Vamosi
af29b39803 merge master 2019-12-09 14:28:16 +01:00
Gabor Kiss-Vamosi
338abb3862 kb: minor fixes 2019-12-09 13:47:20 +01:00
Gabor Kiss-Vamosi
503b95a514 Merge branch 'dev-7.0' into master 2019-12-09 13:32:11 +01:00
TridentTD
54220ffbf1 Refactor indev_search_obj into a public API (#1297)
* Add lv_indev_get_obj(...)  for finding the topmost object under a point.
* Replace uses of indev_search_obj() with lv_indev_search_obj()
2019-12-08 21:21:56 +00:00
Gabor Kiss-Vamosi
71be75b0ec Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-12-07 21:11:56 +01:00
Gabor Kiss-Vamosi
da2ee84fbb fix some signal function if debug asssert is enabled 2019-12-07 21:11:38 +01:00
Amir Gonnen
842283d136 bugfix: use size_t also when GC is enabled (#1304) 2019-12-06 16:10:04 -05:00
Themba Dube
d7735410c9 Silence GCC warning 2019-12-06 12:31:19 -05:00
Gabor Kiss-Vamosi
f6f5f691f7 update library.json 2019-12-06 14:41:27 +01:00
Gabor Kiss-Vamosi
840f382b64 release v6.1.1 2019-12-06 14:06:57 +01:00
Gabor Kiss-Vamosi
e8dd654ad6 remove the unimplemented lv_ll_swap 2019-12-06 14:04:06 +01:00
Gabor Kiss-Vamosi
17be0af46b tileview fix assert in signal_cb 2019-12-06 13:43:38 +01:00
Themba Dube
343c6b8c6f Fix narrowing warning in lv_color.h 2019-12-05 20:46:06 -05:00
Gabor Kiss-Vamosi
f34598d810 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-12-05 12:58:21 +01:00
Gabor Kiss-Vamosi
d35e09bfcc lmeter: fix warning 2019-12-05 12:57:59 +01:00
Gabor Kiss-Vamosi
1f2987a66b fix minor warnings 2019-12-05 06:44:11 +01:00
Themba Dube
29f93e35df Silence GCC warning 2019-12-04 21:14:24 -05:00
Gabor Kiss-Vamosi
36082419d8 Merge pull request #1298 from someone42/master
Also making \r break lines in labels
2019-12-03 19:19:47 +01:00
Chris Chua
eb614c32b3 Also making \r break lines in labels 2019-12-04 04:43:16 +11:00
Gabor Kiss-Vamosi
c23655a0d7 fix warnings 2019-12-03 18:42:56 +01:00
Gabor Kiss-Vamosi
c7374948a1 fix memory leak in obj create functions if ext alloc fails 2019-12-03 18:16:14 +01:00
Gabor Kiss-Vamosi
664a538e85 fix warning from #1292 2019-12-03 14:56:17 +01:00
Gabor Kiss-Vamosi
6e97c07588 solve warnings listed in #1292 2019-12-03 06:56:48 +01:00
Gabor Kiss-Vamosi
64df282c81 merge dev-6.1 2019-12-02 16:09:35 +01:00
Gabor Kiss-Vamosi
4037a68ccc typedef uint64_t lv_uintptr_t on 64 bit systems 2019-12-02 15:03:43 +01:00
embeddedt
7137ae4b33 Add range slider support (#1275) 2019-12-02 07:37:33 -05:00
Gabor Kiss-Vamosi
6c8b0c44be fix conversation warnings 2019-12-02 12:20:01 +01:00
Gabor Kiss-Vamosi
6e8a4eeed4 lv_tileview_set_valid_positions: minor fix 2019-12-02 09:19:51 +01:00
Gabor Kiss-Vamosi
0b12f934ec lv_font.h add update comments 2019-12-02 09:16:47 +01:00
Gabor Kiss-Vamosi
e006e084fa add lv_gauge_set_needle_img 2019-11-30 11:41:18 +01:00
Gabor Kiss-Vamosi
5b7058ccf6 Merge pull request #1290 from LanFengXiMenChuiXue/dev-7.0
1.add img center;2.modify tileview;
2019-11-30 10:49:18 +01:00
Gabor Kiss-Vamosi
001724683e tileview: use default LV_DRAG_DIR_ONE 2019-11-29 15:44:15 +01:00
Gabor Kiss-Vamosi
7fa29c573e lv_img: change rotate center naming to pivot 2019-11-29 15:36:52 +01:00
Gabor Kiss-Vamosi
7254dd9f5e Merge branch 'dev-7.0' of https://github.com/LanFengXiMenChuiXue/lvgl into LanFengXiMenChuiXue-dev-7.0 2019-11-29 15:11:42 +01:00
Gabor Kiss-Vamosi
356751c184 add lv_sw_set_knob_on/off_img to display an image on the knob 2019-11-29 15:10:10 +01:00
zhangliming
23a0538bf4 1.add img center;2.modify tileview; 2019-11-29 11:32:22 +08:00
Gabor Kiss-Vamosi
a181a1feb5 add lv_slider_set_img to display an image on the knob 2019-11-28 15:21:29 +01:00
Gabor Kiss-Vamosi
2bd600b68b arc draw rounding fixes 2019-11-28 13:08:56 +01:00
Gabor Kiss-Vamosi
9083adb936 remove unused subpx flag from lv_font_fmt_txt 2019-11-28 10:14:57 +01:00
Gabor Kiss-Vamosi
74fe37ba5b improve arc draw accuracy 2019-11-27 11:45:38 +01:00
xennex22
148478bf60 Fix two minor compile-time issues (#1289) 2019-11-26 23:09:35 -05:00
Gabor Kiss-Vamosi
ec18ea42fe spinbox fix call order in signal function 2019-11-26 14:14:11 +01:00
Gabor Kiss-Vamosi
23a040670e arc and preloader draw and design fixes 2019-11-26 13:25:33 +01:00
Gabor Kiss-Vamosi
d59419c992 change lv_arc_set_angles to lv_arc_set_start/end_angle 2019-11-26 13:25:28 +01:00
Gabor Kiss-Vamosi
da8c604d14 Merge pull request #1287 from Himel55/patch-1
fix spelling mistake
2019-11-26 12:38:06 +01:00
Himel
bf5a8bc52f fix spelling mistake 2019-11-27 00:28:26 +13:00
Gabor Kiss-Vamosi
db7a22a01e Merge pull request #1284 from joltwallet/lv_obj_missing_const
lv_obj: add missing const qualifiers in function definitions.
2019-11-26 11:38:25 +01:00
Gabor Kiss-Vamosi
a596462a49 Merge pull request #1286 from vanwinkeljan/fix_8bit_lv_color_to32
Set alpha channel on return color in lv_color_to32
2019-11-26 09:39:41 +01:00
Gabor Kiss-Vamosi
dbb3630306 Merge pull request #1285 from vanwinkeljan/fix_lv_draw_letter
Make sure that px_opa is initialized in lv_draw_letter
2019-11-26 09:38:29 +01:00
Jan Van Winkel
9ffdefd98a Set alpha channel on return color in lv_color_to32
Set alpha channel on return color in lv_color_to32 for 8-bit to 32-bit
color conversions.

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-11-26 09:22:08 +01:00
Jan Van Winkel
5612b22a4e Make sure that px_opa is initialized in lv_draw_letter
Make sure that the variable px_opa in lv_draw_letter is initialized,
else a compile time warring will occur .

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-11-26 09:13:18 +01:00
Brian Pugh
64a56a2b0f lv_obj: add missing const qualifiers in function definitions. 2019-11-25 22:09:38 -08:00
Gabor Kiss-Vamosi
bd049d1ac3 Merge pull request #1283 from xennex22/dev-6.1
Removed redundent assignment
2019-11-26 07:02:30 +01:00
Gabor Kiss-Vamosi
aafa6e7ccb Merge pull request #1281 from amirgon/master
Remove redundant line
2019-11-26 07:01:45 +01:00
xennex22
c059025d42 Removed redundent assignment 2019-11-25 21:32:49 -08:00
Amir Gonnen
14c407dad3 Remote redundant line
Causes compilation error when LV_COLOR_DEPTH == 16
2019-11-25 23:16:53 +02:00
Gabor Kiss-Vamosi
8bb67c0303 release v6.1 2019-11-25 13:17:55 +01:00
Gabor Kiss-Vamosi
de48d1b558 Merge branch 'dev-6.1' 2019-11-25 13:17:35 +01:00
Gabor Kiss-Vamosi
b388c702e5 add lv_printf.h to lvgl.h 2019-11-25 13:15:12 +01:00
Gabor Kiss-Vamosi
5f2e5e4d01 add subpx and compressed fonts 2019-11-25 12:47:23 +01:00
Gabor Kiss-Vamosi
257f1ed2fe minor fixes 2019-11-25 12:24:17 +01:00
Gabor Kiss-Vamosi
4215516fb8 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2019-11-25 12:20:55 +01:00
Gabor Kiss-Vamosi
ed500690c3 fix memory leak with indexed + alpha images 2019-11-25 12:20:21 +01:00
Gabor Kiss-Vamosi
5f3374624e fix warnings 2019-11-25 11:11:41 +01:00
Gabor Kiss-Vamosi
d17e7c7b76 lv_txt_get_next_word: fix to hanfle recolor command with break chars too 2019-11-25 11:07:48 +01:00
Gabor Kiss-Vamosi
926dafd3b5 minor fixes 2019-11-25 07:15:01 +01:00
Gabor Kiss-Vamosi
a7bfaabfad regenerat fonts 2019-11-25 07:03:35 +01:00
Gabor Kiss-Vamosi
f0863b4179 fix minor warnings 2019-11-25 06:44:13 +01:00
Gabor Kiss-Vamosi
0422e662d9 lv_color.h use 1 common lv_color_make 2019-11-25 06:42:11 +01:00
Stepan Snigirev
12fa1ac788 Initialize variable to remove compiler warning (#1280) 2019-11-23 17:18:09 -05:00
Gabor Kiss-Vamosi
ab0cad1b52 Merge pull request #1279 from amirgon/dev-6.1
Fix `lv_mbox_create` for Micropython Binding
2019-11-23 07:36:03 +01:00
Amir Gonnen
ef2bee1e42 Merge branch 'dev-6.1' of https://github.com/amirgon/lvgl into dev-6.1 2019-11-23 01:42:58 +02:00
Amir Gonnen
9779513928 Fix lv_mbox_create for Micropython Binding
When passing array of strings, the parameter should be defined as const char *[], and not const char **
2019-11-23 01:41:27 +02:00
xennex22
1083d92bd1 Added function comments 2019-11-21 19:01:10 -08:00
xennex22
16263f400e Fixed comments shift -> mode 2019-11-21 18:52:14 -08:00
Gabor Kiss-Vamosi
90234b8cc1 minor optimizations 2019-11-21 12:45:49 +01:00
Gabor Kiss-Vamosi
9a94f88885 lv_font_fmt_txt: don't use bitfield for cmap to avoid bugs in Visual Studio 2019-11-21 12:00:23 +01:00
Gabor Kiss-Vamosi
b4b6a472fb use array[] instead of pointer in API function parameters where required 2019-11-21 06:08:09 +01:00
Gabor Kiss-Vamosi
06f553b3aa lv_img_set_offset_x/y: draw the partial image at the beginning with offset > 0 2019-11-21 05:44:43 +01:00
xennex22
e952c2a69b Merged lv_kb_shift_t into lv_kb_mode_t 2019-11-20 07:51:23 -08:00
xennex22
45d41d3361 Merged lv_kb_shift_t into lv_kb_mode_t 2019-11-20 07:44:24 -08:00
Gabor Kiss-Vamosi
b7d856515b add lv_ddlist_set/get_symbol instead of lv_ddlist_set/get_draw_arrow 2019-11-20 16:18:56 +01:00
Gabor Kiss-Vamosi
53eeee069e fix warning 2019-11-20 15:56:06 +01:00
Gabor Kiss-Vamosi
073b332919 add style.text.underline and strike_through 2019-11-20 15:55:38 +01:00
Gabor Kiss-Vamosi
9e74cdb145 Merge branch 'master' into dev-6.1 2019-11-19 13:47:38 +01:00
Gabor Kiss-Vamosi
810059e3ca lv_cb_get_style: fix with LV_CB_STYLE_BG 2019-11-19 13:47:07 +01:00
Gabor Kiss-Vamosi
cfec8e6381 use lv_mem_buf in lv_bidi 2019-11-19 06:27:21 +01:00
Gabor Kiss-Vamosi
b4dae16e22 move lv_draw_buf to lv_mem as lv_mem_buf
This way they can be used as general purpose buffers not only for drawing
2019-11-19 06:25:14 +01:00
Themba Dube
5612856bca Add ability to customize LV_TXT_COLOR_CMD 2019-11-18 09:30:14 -05:00
Gabor Kiss-Vamosi
12c722b38e merge dev-6.1 2019-11-18 10:49:38 +01:00
Gabor Kiss-Vamosi
1ee7e1961e Merge branch 'master' into dev-6.1 2019-11-18 10:48:16 +01:00
Gabor Kiss-Vamosi
04ec2d17ec lv_task: check if a task has deleted itself 2019-11-18 10:45:44 +01:00
Gabor Kiss-Vamosi
b9d693d153 remove lv_font_heb_16 2019-11-18 09:27:20 +01:00
Gabor Kiss-Vamosi
e47a433204 cpicker: ignore the clicks in the middle with no preview 2019-11-18 07:03:41 +01:00
Gabor Kiss-Vamosi
fcbd9fa4ea indev: do not send wait_releaseLV_SIGNAL/EVENT_PRESSED 2019-11-18 07:03:03 +01:00
xennex22
58eb4edb33 Update lv_ta.c 2019-11-17 10:43:17 -08:00
Gabor Kiss-Vamosi
22973360d0 add support to > 255 fonts by enabling LV_FONT_FMT_TXT_LARGE 2019-11-17 17:12:50 +01:00
Themba Dube
c607e45b48 lv_draw: document assertion so others understand quickly 2019-11-17 08:59:22 -05:00
Gabor Kiss-Vamosi
d7232be181 minor fixes 2019-11-17 06:23:26 +01:00
xennex22
7256c7244d Update lv_kb.c 2019-11-16 13:09:59 -08:00
xennex22
2d52d2f126 Update lv_kb.h 2019-11-16 13:06:30 -08:00
xennex22
24a5e3788d Update lv_kb.c 2019-11-16 08:46:12 -08:00
Gabor Kiss-Vamosi
679419b151 minor theme updates 2019-11-16 12:29:47 +01:00
Gabor Kiss-Vamosi
20a13918d1 bar: improve masking to avoid drawing the indicator out of the radius 2019-11-16 12:29:37 +01:00
Gabor Kiss-Vamosi
cd2c8ae8c1 minor shadow draw fix not LV_DRAW_BLEND_MODE_NORMAL 2019-11-16 12:28:54 +01:00
Gabor Kiss-Vamosi
d5cfd02def mono theme fix uninited styles 2019-11-16 11:36:06 +01:00
Gabor Kiss-Vamosi
537f1256c8 Merge branch 'dev-6.1' into dev-7.0 2019-11-16 11:27:51 +01:00
Gabor Kiss-Vamosi
59743f7f90 linemeter: angle offset fixes
rename lv_lmeter_set_angle to lv_lmeter_set_angle_offset
add lv_lemeter_get_angle_offset
initialze ext->angle_ofs in lv_lmeter_create
2019-11-16 11:27:35 +01:00
Gabor Kiss-Vamosi
5001c4e6a9 theme and minor drawin fixes 2019-11-16 11:22:23 +01:00
Gabor Kiss-Vamosi
197d95cf60 ta: fix label height after style change in one line mode 2019-11-15 15:23:47 +01:00
embeddedt
3452e60ec1 Silence -Wconversion 2019-11-15 08:03:11 -05:00
Gabor Kiss-Vamosi
37cd768e99 Merge branch 'dev-6.1' into dev-7.0 2019-11-15 11:14:30 +01:00
Gabor Kiss-Vamosi
48f81d9f28 lv_objx_templ: fix typo 2019-11-15 11:14:07 +01:00
Gabor Kiss-Vamosi
a2cc8c9b4c lv_objmask_remove_mask: remove all masks is mask==NULL 2019-11-15 11:05:11 +01:00
Gabor Kiss-Vamosi
2be039e917 rename lv_ll_rem to lv_ll_remove 2019-11-15 11:04:46 +01:00
Gabor Kiss-Vamosi
b54b5fcc2b lv_bidi: fix warnings 2019-11-15 09:30:57 +01:00
Gabor Kiss-Vamosi
0130856ef9 fix compiler error with LV_USE_FILESYSTEM = 0 2019-11-15 09:27:43 +01:00
Gabor Kiss-Vamosi
ca5940b693 lv_cpicker_set_color fix compiler error 2019-11-15 09:26:10 +01:00
Gabor Kiss-Vamosi
010d7ef72f merge dev-6.1 2019-11-15 09:20:49 +01:00
Gabor Kiss-Vamosi
ac28a13564 fix warnings 2019-11-15 09:17:42 +01:00
Gabor Kiss-Vamosi
6aeba2d682 Merge branch 'dev-6.1' into dev-7.0 2019-11-15 07:29:24 +01:00
Gabor Kiss-Vamosi
28cc431d95 Merge branch 'master' into dev-6.1 2019-11-15 07:29:00 +01:00
Gabor Kiss-Vamosi
5574bac486 minor fixes 2019-11-15 07:28:42 +01:00
Gabor Kiss-Vamosi
e6d38f1acf merge dev-6.1 2019-11-15 06:53:15 +01:00
Gabor Kiss-Vamosi
bf5ea6658b update lv_conf_checker.h 2019-11-15 06:30:45 +01:00
Gabor Kiss-Vamosi
57cf7ef7d6 Merge pull request #1273 from neilabdev/hotfix/fix_roller_infinite_mode_initialization_bug
lv_roller_create cuases "divide by zero" via modulus operator for infinit scroll mode
2019-11-15 05:12:53 +01:00
Gabor Kiss-Vamosi
98c4514852 Merge pull request #1271 from littlevgl/fix_conversion_warnings
Fix -Wconversion warnings
2019-11-15 05:09:25 +01:00
James Whitfield
b9f7883b0b fixed bug where mode was not properly initialized for for roller extra attributes, causing crash in inf_normalize where there is a condition executed which causes a modulas divide by zero for mode LV_ROLLER_MODE_INFINITE, which is set at random because of dirty memory 2019-11-14 19:35:24 -08:00
Themba Dube
00517116cc Fix some warnings 2019-11-14 21:08:23 -05:00
Themba Dube
575df77a02 Fix public -Wconversion warnings 2019-11-14 20:38:47 -05:00
Gabor Kiss-Vamosi
6148b4016e add lv_objmask_update_mask and lv_objmask_remoev_mask 2019-11-14 14:05:14 +01:00
Gabor Kiss-Vamosi
cbe99407b0 draw_mask updates + lv_objmask use relative coordinates with masks 2019-11-14 14:05:14 +01:00
Gabor Kiss-Vamosi
90b7d3853f lv_draw_mask_add: save only the pointer of the parameter 2019-11-14 14:05:14 +01:00
Gabor Kiss-Vamosi
e76b5d58b5 lv_imgbtn: update img_draw calles to the new prototype 2019-11-14 12:28:27 +01:00
Gabor Kiss-Vamosi
75f27bbeae Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2019-11-14 10:49:47 +01:00
Gabor Kiss-Vamosi
110923168a lv_font_fmt_txt: change tab to 2 spaces 2019-11-14 10:49:41 +01:00
Gabor Kiss-Vamosi
bbf2c8247c Merge pull request #1268 from cpegeo/dev-6.1
Updated lv_refr_area and lv_img_design to account for single pixel height/width objects.
2019-11-13 19:44:40 +01:00
George Slater
de102f9d20 Updated lv_refr_area and lv_img_design to account for single pixel height/width objects.
lv_refr_area: Updated height for area refresh to correctly include areas that are a height of only 1 pixel.
lv_img_design: Updated draw loop to account for objects that are 1 pixel in height or width.
2019-11-13 11:54:05 -06:00
Gabor Kiss-Vamosi
7814d31613 Merge pull request #1261 from joltwallet/fix/txt_long_len
Fix/txt long len wrapping and disable macro
2019-11-13 08:38:44 +01:00
Gabor Kiss-Vamosi
92f9af3113 Merge branch 'dev-6.1' into fix/txt_long_len 2019-11-13 08:38:30 +01:00
Gabor Kiss-Vamosi
9792a74413 Merge pull request #1265 from pete-pjb/dev-6.1
Dev 6.1 Minor fixes
2019-11-13 07:39:59 +01:00
Gabor Kiss-Vamosi
060c27f54a Merge pull request #1264 from Maldus512/master
Added rotation feature to the lmeter
2019-11-13 07:39:07 +01:00
Pete Bone
1e4ce0b143 Dev 6.1 Minor fixes
lv_draw_arc.c -> line 218
Removed unsed fast_atan2() function which appears to have been moved to
lv_math.c as lv_atan2() function.

lv_font_heb_16.c -> line 1
Fixed inconsistent include path.

lv_label.c -> line 734
Added (char*) cast to const char* variable 'txt' to silence compiler
warning when LV_USE_BIDI is disabled.

lv_style.c -> line 93
Removed this line 

lv_style.c -> line 97
Reverted this line to remove override of LV_FONT_DEFAULT defined in
lv_conf.h
2019-11-12 15:26:35 +00:00
Mattia Maldini
b7c3732da7 Different wording 2019-11-12 16:14:18 +01:00
Gabor Kiss-Vamosi
6ebaaa6fa8 Update README.md 2019-11-12 15:25:52 +01:00
Gabor Kiss-Vamosi
db3d642096 Update README.md 2019-11-12 15:24:52 +01:00
Gabor Kiss-Vamosi
97a83cdf5c Create FUNDING.yml 2019-11-12 13:14:19 +01:00
Mattia Maldini
3cd2120b60 Added rotation feature to the lmeter 2019-11-12 13:07:26 +01:00
Gabor Kiss-Vamosi
f8d5d31469 fix typo in lv_img_set/get_antialias 2019-11-12 09:45:40 +01:00
Brian Pugh
79f403ddc5 lv_txt enforce pretty wrapping when first word of a line is a long word. 2019-11-11 23:08:45 -08:00
Gabor Kiss-Vamosi
8ac7bddaf7 fix conflicts 2019-11-12 06:55:08 +01:00
Gabor Kiss-Vamosi
afb47ebf56 Merge pull request #1253 from amirgon/feat-bidi-pos_conv
Feat bidi pos conv
2019-11-12 06:49:05 +01:00
Gabor Kiss-Vamosi
49e105917e add LV_COLOR_SET/GET for every color depth configuration 2019-11-12 06:39:26 +01:00
Brian Pugh
1764220deb lv_txt set word width to 0 when not returning a word in lv_txt_get_next_word 2019-11-11 21:18:32 -08:00
Brian Pugh
bb91aeb64c Add ability to disable inter-long-word breaks by setting LV_TXT_LINE_BREAK_LONG_LEN<=0. Fix some off-by-one character wrapping logic 2019-11-11 20:57:33 -08:00
Gabor Kiss-Vamosi
f3b88a57ca add LV_COLOR_SET/GET_R/G/B
It was mainly because when LV_COLOR_16_SWAP = 1 and  green is split to green_h and green_l
2019-11-12 05:38:26 +01:00
Amir Gonnen
23b58d598d bugfixes
Prevent infinite loop when reaching end of string on get_next_run

Prevent warning about conversion to non const bidi_txt
2019-11-11 22:43:12 +02:00
Gabor Kiss-Vamosi
90eeff7022 merge dev-6.1 2019-11-11 19:42:10 +01:00
Gabor Kiss-Vamosi
46eabd6cf0 Merge pull request #1258 from joltwallet/fix/lv_color_warning
fix 1bit lv_color compilation warnings/errors introduced by ...
2019-11-11 13:07:43 +01:00
Gabor Kiss-Vamosi
3ed0cd444a lv_task: fix crash after executing one shot tasks 2019-11-11 12:32:30 +01:00
Gabor Kiss-Vamosi
8cf7824f82 Merge pull request #1259 from joltwallet/fix/txt_cursor_wrap
Fix cursor wrapping described in https://github.com/littlevgl/lvgl/is…
2019-11-11 12:28:50 +01:00
Gabor Kiss-Vamosi
c4f8d8cd5b bidi: txt_sel fixes 2019-11-11 11:10:01 +01:00
Brian Pugh
183d849e84 Fix cursor wrapping described in https://github.com/littlevgl/lvgl/issues/1256 2019-11-10 23:42:31 -08:00
Brian Pugh
57e2a6d983 fix 1bit lv_color compilation warnings/errors introduced by 3da868a090 2019-11-10 21:44:27 -08:00
Gabor Kiss-Vamosi
6eaf8dd6d3 text sel fix, if start > end 2019-11-10 11:03:19 +01:00
Gabor Kiss-Vamosi
8dfcba6aa8 text sel fixes with bidi 2019-11-10 10:52:49 +01:00
Gabor Kiss-Vamosi
6f762bb7c7 fix lv_cpicker_set_color with 16 bit color depth and byte swap
Fixes #1257
2019-11-10 10:45:54 +01:00
Gabor Kiss-Vamosi
96b9114a5a bidi fixes for multi line text handling 2019-11-09 01:53:02 +01:00
Gabor Kiss-Vamosi
40459e01c9 change lv_objmask default style to transparent 2019-11-09 00:57:26 +01:00
Amir Gonnen
0130f3e5f2 Add RTL indication to pos_conv
When getting visual/logical pos, also get whether this pos is RTL (was reversed)
2019-11-09 01:02:51 +02:00
Gabor Kiss-Vamosi
e719853c0a fix conflicts 2019-11-08 23:15:48 +01:00
Gabor Kiss-Vamosi
eb90f3f418 revert accidentally deleted lv_img_buf_set_px_color 2019-11-08 23:12:07 +01:00
Gabor Kiss-Vamosi
5f1d1f4174 minor img transform fix 2019-11-08 23:07:35 +01:00
Gabor Kiss-Vamosi
80896b5114 Merge branch 'img_transform' of https://github.com/littlevgl/lvgl into img_transform 2019-11-08 22:58:26 +01:00
Gabor Kiss-Vamosi
42cde31888 minor img transform fixes 2019-11-08 22:58:09 +01:00
Gabor Kiss-Vamosi
48d81aab5e fix conflicts 2019-11-08 22:49:03 +01:00
Gabor Kiss-Vamosi
e29210889a add image zoom 2019-11-08 22:47:03 +01:00
Gabor Kiss-Vamosi
a3a326c2ff fix lv_label_get_letter_on in case of multi-line texts 2019-11-08 13:49:52 +01:00
Gabor Kiss-Vamosi
2bcbb309c8 Merge pull request #1250 from TridentTD/dev-7.0
[Dev 7.0]  lv_arc  fix rounded-ending arc
2019-11-08 13:07:41 +01:00
Gabor Kiss-Vamosi
18d1fdb3f5 preloader: fix top point position
in dev7.0 arc angle=0 is on the left and not on the bottom as it was in v6.0
2019-11-08 10:23:49 +01:00
Gabor Kiss-Vamosi
f1aa679e12 blend map optimization 2019-11-08 09:42:08 +01:00
Gabor Kiss-Vamosi
66a67ff24a Merge branch 'img_transform' of https://github.com/littlevgl/lvgl into img_transform 2019-11-08 09:21:05 +01:00
Gabor Kiss-Vamosi
62f6aa45e6 lv_img_rotate optimize anti aliasing 2019-11-08 09:20:35 +01:00
Gabor Kiss-Vamosi
a38734cb9a Merge branch 'img_transform' of https://github.com/littlevgl/lvgl into img_transform 2019-11-08 08:26:40 +01:00
Gabor Kiss-Vamosi
bf42c35cc0 fix conflicts 2019-11-08 08:26:05 +01:00
Gabor Kiss-Vamosi
cde17104a0 add alpha to lv_canvas_fill_bg 2019-11-08 08:21:08 +01:00
Gabor Kiss-Vamosi
49bafb1d36 improve img rotate quality 2019-11-08 08:20:42 +01:00
Gabor Kiss-Vamosi
c632c62cb9 static inline lv_img_buf_get_px 2019-11-07 06:00:16 +01:00
Gabor Kiss-Vamosi
1e685324cf add lv_img_buf_get_px() 2019-11-07 05:38:40 +01:00
Gabor Kiss-Vamosi
641ab62f42 img rotate and canvas blur fixes 2019-11-06 16:16:55 +01:00
Gabor Kiss-Vamosi
37743ba8a2 canvas blur fix 2019-11-06 15:03:18 +01:00
Gabor Kiss-Vamosi
f7c5daad85 add area to canvas blur 2019-11-06 14:55:35 +01:00
Gabor Kiss-Vamosi
05ededf8f3 canavs blur: support LV_CANVAS_16_SWAP 2019-11-06 14:37:03 +01:00
Gabor Kiss-Vamosi
a4c456607b Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2019-11-06 14:21:49 +01:00
Gabor Kiss-Vamosi
bc7fd45ff6 canvas blur optimization 2019-11-06 14:21:39 +01:00
Gabor Kiss-Vamosi
32fb95e7af canvas blur optimization 2019-11-06 14:20:40 +01:00
embeddedt
45c6dbab62 lv_cpicker: credit @AloyseTech and @paulpv 2019-11-06 08:11:58 -05:00
Gabor Kiss-Vamosi
453165a34c canvas blur fix 2019-11-06 13:45:35 +01:00
Gabor Kiss-Vamosi
60b6ef06fa canvas blur optimization 2019-11-06 13:43:57 +01:00
Gabor Kiss-Vamosi
9463633323 add 'safe' option to lv_img_buf_set/get_px_color/opa 2019-11-06 13:36:36 +01:00
Gabor Kiss-Vamosi
1a38783921 canvas blur fixes 2019-11-06 13:12:44 +01:00
Gabor Kiss-Vamosi
c1aae99208 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2019-11-06 12:43:52 +01:00
Gabor Kiss-Vamosi
3aa3bf49e6 add canvas blur 2019-11-06 12:43:40 +01:00
Gabor Kiss-Vamosi
647341426c Merge pull request #1233 from paulpv/fix-hsv
Fix hsv
2019-11-06 05:33:28 +01:00
Gabor Kiss-Vamosi
86f44c974d cpicker: set default type 2019-11-06 05:32:42 +01:00
Gabor Kiss-Vamosi
a76e65db88 Merge branch 'feat-cpicker' into dev-6.1 2019-11-06 05:27:52 +01:00
Gabor Kiss-Vamosi
5441cf9998 bidi fixes + add missing prefix to lv_encoded_get_char_id 2019-11-06 05:19:06 +01:00
Maximilian Schwab
74254975cd Update comment for logging callback (#1255)
Changed lv_log_register_print to lv_log_register_print_cb
2019-11-05 19:40:22 -05:00
Gabor Kiss-Vamosi
5d5a8b4894 convert lv_bidi_get_visual_pos to byteindex 2019-11-05 16:00:32 +01:00
Gabor Kiss-Vamosi
abb393632e minor fixes 2019-11-05 12:30:33 +01:00
TridentTD
93f5f69f73 move rounded-ending from lv_arc.c to lv_draw.arc.c 2019-11-05 17:44:05 +07:00
TridentTD
60148c5c73 move round-ending from lv_arc.c to lv_draw_arc.c 2019-11-05 17:40:02 +07:00
TridentTD
9f5fc99c9b remove rounded-ending in lv_arc.c 2019-11-05 17:37:32 +07:00
Gabor Kiss-Vamosi
2a25ddd0a2 add lv_draw_px 2019-11-05 06:29:53 +01:00
Amir Gonnen
6f57de051b WIP: pos_conv, bugfixes, use in lv_label 2019-11-05 01:03:40 +02:00
Gabor Kiss-Vamosi
e45d083436 fix warnings 2019-11-04 20:43:49 +01:00
Gabor Kiss-Vamosi
769c1a8f8a define empty LV_DEBUG_ASSERT if LV_USE_DEBUG is 0 2019-11-04 20:35:47 +01:00
Gabor Kiss-Vamosi
b44b926156 add the new files to the makefiles 2019-11-04 16:57:30 +01:00
Gabor Kiss-Vamosi
541a010ee9 fix uninitialized and shadoed warnings 2019-11-04 16:56:57 +01:00
Gabor Kiss-Vamosi
5844319017 Merge pull request #1252 from littlevgl/embeddedt_fix_7_warnings
Fix some more warnings in dev-7.0
2019-11-04 14:45:54 +01:00
Themba Dube
935674313c Fix use of empty initializer braces 2019-11-04 08:18:49 -05:00
Themba Dube
fb227e064f Fix some more warnings in dev-7.0 2019-11-04 08:13:07 -05:00
Gabor Kiss-Vamosi
5d565e577f imgbtn fixes for image rotation 2019-11-04 10:03:34 +01:00
Gabor Kiss-Vamosi
3ca7ce5335 remove 'include lv_version.h' 2019-11-04 08:55:16 +01:00
Gabor Kiss-Vamosi
833849c006 move version to lvgl.h 2019-11-04 08:49:33 +01:00
Gabor Kiss-Vamosi
cbe780de14 img rotate fixes 2019-11-04 08:48:14 +01:00
Gabor Kiss-Vamosi
b74e62edba material theme shadow fixes 2019-11-04 08:48:14 +01:00
Amir Gonnen
c7a7d1adca WIP: pos_conv add lv_bidi_get_logical/visual_pos functions 2019-11-04 09:26:52 +02:00
Amir Gonnen
f6829a17b2 WIP: Bidi pos_conv 2019-11-04 01:31:54 +02:00
embeddedt
f453993abc Update lv_version.h 2019-11-03 12:59:34 -05:00
Gabor Kiss-Vamosi
32d94cf7c9 fix warnings 2019-11-03 16:21:58 +01:00
Gabor Kiss-Vamosi
e7afc94cde fix conflicts 2019-11-03 16:12:05 +01:00
Gabor Kiss-Vamosi
a69d75c3d2 add lv_img_buf.c/h for better mosularity 2019-11-03 15:48:10 +01:00
Gabor Kiss-Vamosi
23b2a2810c drag fixes
Even in case of LV_DRAG_DIR_BOTH only one dir drag was possible if x or y havn't changed during the first movement.
2019-11-03 15:45:41 +01:00
Jan Van Winkel
9472d0d0c7 Added missing lv_indev.h includes (#1251) 2019-11-03 08:43:26 -05:00
Gabor Kiss-Vamosi
2199b30132 optimize clip area with image rotation 2019-11-03 10:08:15 +01:00
Gabor Kiss-Vamosi
722820ee56 img rotate: add support all color formats 2019-11-03 07:13:14 +01:00
Gabor Kiss-Vamosi
5222bf92c4 kb: use LV_SYMBOL_NEW_LINE as new line 2019-11-02 23:33:25 +01:00
Gabor Kiss-Vamosi
916133f8b7 remove test code from lv_mbox_set_text 2019-11-02 21:44:12 +01:00
Gabor Kiss-Vamosi
62e6397f82 Merge branch 'dev-6.1' into dev-7.0 2019-11-02 21:41:43 +01:00
Gabor Kiss-Vamosi
3c662670f0 Merge branch 'master' into dev-6.1 2019-11-02 21:35:14 +01:00
Gabor Kiss-Vamosi
8db8470a60 lv_ta_set_placeholder_text: fix placholder align 2019-11-02 21:34:41 +01:00
Gabor Kiss-Vamosi
e0dee03233 Merge branch 'master' into dev-6.1 2019-11-02 21:32:08 +01:00
Gabor Kiss-Vamosi
abfe2f63a1 img rotate auto set ext draw pad 2019-11-02 21:30:51 +01:00
TridentTD
05da56c839 fix rounded-ending arc 2019-11-02 20:17:45 +07:00
Gabor Kiss-Vamosi
2b955ac8b6 img run-time rotate functionally working 2019-11-02 08:51:38 +01:00
Gabor Kiss-Vamosi
fab8288372 fix conflicts 2019-11-01 20:33:50 +01:00
Gabor Kiss-Vamosi
a1d84e5792 img rotate further optimiziation 2019-11-01 20:32:16 +01:00
Gabor Kiss-Vamosi
1458828b97 img rotation fixes 2019-11-01 20:26:39 +01:00
Gabor Kiss-Vamosi
1ae214a2de img rotate optimization 2019-11-01 20:17:11 +01:00
Gabor Kiss-Vamosi
07317f771e fix warning in lv_draw_mask_angle_init 2019-11-01 16:39:19 +01:00
Gabor Kiss-Vamosi
bdd0acf53a fix conflicts 2019-11-01 11:14:04 +01:00
Gabor Kiss-Vamosi
632fd15775 add lv_api_map.h and rename lv_chart_get_point_cnt to lv_chart_get_point_count 2019-11-01 11:12:20 +01:00
Gabor Kiss-Vamosi
b8f5cad89c add lv_img_get_px_rotated 2019-11-01 11:12:20 +01:00
Gabor Kiss-Vamosi
b8a156e0d4 fix lv_cb_is_inactive 2019-11-01 11:10:43 +01:00
George Slater
3758a82f3a lv_color1_t: Add 'ch' struct to union to fix 1bit color compilation error.
lv_color.h:
Updated lv_color1_t union to include 'ch' structure. This fixes compilation errors when configured for 1bit color.
2019-11-01 11:10:43 +01:00
Gabor Kiss-Vamosi
82e2d53763 img_draw angle testing 2019-11-01 11:10:26 +01:00
Gabor Kiss-Vamosi
40f2586a54 add lv_api_map.h and rename lv_chart_get_point_cnt to lv_chart_get_point_count 2019-11-01 11:09:56 +01:00
Gabor Kiss-Vamosi
b73f7a1f82 merger dev-6.1 2019-11-01 06:04:03 +01:00
Gabor Kiss-Vamosi
84a70d1617 add lv_img_get_px_rotated 2019-11-01 06:00:04 +01:00
Themba Dube
982e2036cf Fix inconsistency between lv_debug.c and lv_debug.h 2019-10-31 20:21:58 -04:00
Themba Dube
b02bf9d804 Merge branch 'dev-6.1' of github.com:littlevgl/lvgl into dev-6.1 2019-10-31 20:21:28 -04:00
Themba Dube
2c790699de Remove unused statement in lv_tileview 2019-10-31 20:19:54 -04:00
Themba Dube
859e14bedc Add default cases in lv_tabview.c 2019-10-31 20:19:21 -04:00
Themba Dube
7a0dad4f17 Fix potential bug with page scrollable fit configuration 2019-10-31 20:19:07 -04:00
Themba Dube
958f0acdc8 Fix inconsistency between lv_debug.c and lv_debug.h 2019-10-31 20:18:50 -04:00
Themba Dube
dd1eed7c1b Handle a GCC warning in lv_draw_triangle 2019-10-31 19:57:30 -04:00
Themba Dube
847527df0d Add LV_USE_OBJMASK to lv_conf_template.h 2019-10-31 19:57:20 -04:00
Themba Dube
f92381b15f Fix incorrect mask parameter usage in lv_draw_mask_map_init() 2019-10-31 19:57:01 -04:00
Themba Dube
d40fb513d3 Merge branch 'dev-7.0' of github.com:littlevgl/lvgl into dev-7.0 2019-10-31 19:47:58 -04:00
Gabor Kiss-Vamosi
fb9fb8d09e add LV_LABEL_TEXT_SEL_OFF again 2019-10-31 19:24:41 +01:00
Gabor Kiss-Vamosi
da7e67b381 fix lv_cb_is_inactive 2019-10-31 14:14:40 +01:00
Gabor Kiss-Vamosi
9726e269ab fix drag throw 2019-10-31 08:51:34 +01:00
Gabor Kiss-Vamosi
4a90980023 border part draw fixes 2019-10-31 08:51:19 +01:00
Gabor Kiss-Vamosi
ded47f705a tabview fix missing indicator 2019-10-31 07:07:22 +01:00
Gabor Kiss-Vamosi
6d954bb7ba rect border part draw fixes 2019-10-31 06:46:50 +01:00
Gabor Kiss-Vamosi
1106a2bba0 Merge branch 'dev-7.0' of https://github.com/littlevgl/lvgl into dev-7.0 2019-10-31 06:42:26 +01:00
Gabor Kiss-Vamosi
e76b3b42f4 material theme fixes 2019-10-31 06:42:20 +01:00
Gabor Kiss-Vamosi
4632c35f39 style fixes 2019-10-31 06:41:57 +01:00
Gabor Kiss-Vamosi
0f1e5fba16 Merge pull request #1245 from cpegeo/dev-6.1
lv_color1_t: Add 'ch' struct to union to fix 1bit color compilation error
2019-10-31 06:33:08 +01:00
Gabor Kiss-Vamosi
c653977991 lv_label: add LV_LABEL_TEXT_SEL_OFF again 2019-10-31 06:06:47 +01:00
George Slater
3da868a090 lv_color1_t: Add 'ch' struct to union to fix 1bit color compilation error.
lv_color.h:
Updated lv_color1_t union to include 'ch' structure. This fixes compilation errors when configured for 1bit color.
2019-10-30 17:03:56 -05:00
Themba Dube
8c0cbac668 Merge branch 'dev-6.1' into dev-7.0 2019-10-30 11:31:41 -04:00
Themba Dube
9baef1ef96 Add missing definition of LV_LABEL_TEXT_SEL_OFF 2019-10-30 11:31:24 -04:00
Themba Dube
30a5b29690 Fix issue when LV_USE_BIDI is 0 2019-10-30 11:00:48 -04:00
Gabor Kiss-Vamosi
d0f257d4dd merge dev-6.1 2019-10-30 10:34:39 +01:00
Gabor Kiss-Vamosi
c86e2722bd lv_draw_label: fix warning with txt_sel by adding lv_draw_label_txt_sel_t parameter 2019-10-30 10:16:06 +01:00
Gabor Kiss-Vamosi
a6a3390cbd style fixes 2019-10-30 09:47:28 +01:00
Gabor Kiss-Vamosi
7633fe2a3e clean up styles 2019-10-30 09:47:07 +01:00
Gabor Kiss-Vamosi
224e422f43 fix rectangle border part draw 2019-10-30 09:47:07 +01:00
Gabor Kiss-Vamosi
77706614e2 fix 1px error in the bottom of radius mask 2019-10-30 08:40:16 +01:00
Gabor Kiss-Vamosi
53ff55434a imgbtn minor fix 2019-10-30 07:07:31 +01:00
Gabor Kiss-Vamosi
a75640adc2 merge dev-6.1 2019-10-30 06:59:51 +01:00
Gabor Kiss-Vamosi
cfb72d5b69 fix text recolor processing 2019-10-30 06:49:21 +01:00
Gabor Kiss-Vamosi
38ba12a866 imgbtn fix 2019-10-30 06:32:58 +01:00
Gabor Kiss-Vamosi
42070162b9 add image.intense to btn styles 2019-10-30 06:26:51 +01:00
Gabor Kiss-Vamosi
48a6bf8730 fixes with LV_COLOR_16_SWAP 1 2019-10-30 06:00:13 +01:00
Gabor Kiss-Vamosi
093b522738 minor fixes 2019-10-30 05:29:31 +01:00
Gabor Kiss-Vamosi
dd100e5e07 ta: fix place holder alignment. Fixes #1241 2019-10-29 14:33:59 +01:00
Gabor Kiss-Vamosi
033b42fa3c add comments 2019-10-28 15:52:12 +01:00
Gabor Kiss-Vamosi
1ead05c885 upadte polygon drawing 2019-10-28 15:03:11 +01:00
Gabor Kiss-Vamosi
8fe92bcd9a lv_task: rename task_handler_mutex to already_running. Fixes #1238 2019-10-28 06:24:47 +01:00
Gabor Kiss-Vamosi
dd68877aae bidi bracket handling fixies 2019-10-28 05:47:31 +01:00
Themba Dube
98b353879f Merge remote-tracking branch 'origin/dev-6.1' into feat-cpicker 2019-10-27 09:13:47 -04:00
Themba Dube
6051e20b6c Merge remote-tracking branch 'paulpv/feat-cpicker' into feat-cpicker 2019-10-27 09:10:41 -04:00
Gabor Kiss-Vamosi
98a4d9b062 bidi: barcket process fixes 2019-10-27 10:44:00 +01:00
Gabor Kiss-Vamosi
1c4695a21e Merge branch 'dev-6.1' into feat-bidi 2019-10-27 10:25:51 +01:00
Gabor Kiss-Vamosi
9048e8072b fix conflicts 2019-10-27 10:25:33 +01:00
Gabor Kiss-Vamosi
081b2c2271 bidi: barcket handle fixes 2019-10-27 10:21:37 +01:00
Gabor Kiss-Vamosi
7f19fb53e6 set LV_MEM_JUNK to 0 2019-10-25 13:37:39 +02:00
Gabor Kiss-Vamosi
57a8ee8e32 bidi: add bracket algorithm 2019-10-25 06:15:11 +02:00
Paul Peavyhouse
6df1fe190a #include and use LV_MATH_ABS 2019-10-24 20:13:03 -07:00
Paul Peavyhouse
372b133b18 Converting to integer based math 2019-10-24 16:46:30 -07:00
Gabor Kiss-Vamosi
f02d52a598 merge dev-6.1 2019-10-24 15:25:52 +02:00
Gabor Kiss-Vamosi
d5aabef42d Merge pull request #1231 from amirgon/feat-bidi-wrap
Bidi multi-line text wrap
2019-10-24 13:29:20 +02:00
Gabor Kiss-Vamosi
4158334a40 bidi: ahndle LV_BIDI_DIR_AUTO in lv_bidi_process_paragraph 2019-10-24 07:15:00 +02:00
Gabor Kiss-Vamosi
f38b12ee6c Merge branch 'dev-6.1' of https://github.com/littlevgl/lvgl into dev-6.1 2019-10-24 06:15:45 +02:00
Gabor Kiss-Vamosi
437b34390c fix compiler error with LV_COLOR_16_SWAP adnd LV_SUBPX_BGR 2019-10-24 06:15:19 +02:00
Gabor Kiss-Vamosi
32689cb3e5 Merge pull request #1234 from Boldie/fix_racecondition_flushing
Reset flushing after setting the buffer content to fix race condition.
2019-10-24 06:11:14 +02:00
Sven Steckmann
6f6c26b058 Reset flushing after setting the buffer content to fix race condition.
Flushing flag is used to wait for the finish of the transfer. If this
is reset to 0, the other parts of the code will start accessing the buf_act
(see src/lv_core/lv_refr.c:106) and thus may create a race condition. Exchanging
the resetting to 0 and memset will fix this issue.
2019-10-23 23:48:52 +02:00
Paul Peavyhouse
ddd7c1d30c Adding ending newline 2019-10-22 13:29:38 -07:00
Paul Peavyhouse
a572d8a648 Keeping some original variable names 2019-10-22 13:19:22 -07:00
Paul Peavyhouse
65252024bf Formatting 2019-10-22 13:17:53 -07:00
Paul Peavyhouse
69d7d53768 Documenting code 2019-10-22 13:07:01 -07:00
Paul Peavyhouse
6aff9f65ed Floating point fix for RGB to HSV
Test code at https://github.com/paulpv/lv_examples/blob/master/lv_tests/lv_test_misc/lv_test_color/lv_test_color.ino
2019-10-22 13:02:31 -07:00
Gabor Kiss-Vamosi
cfddd8df65 ddlist: fix label alignment after style change 2019-10-22 06:01:48 +02:00
Amir Gonnen
0634b11578 Add minus (hyphen) as neutral letter 2019-10-22 01:36:37 +03:00
Paul Peavyhouse
3264af9f0e Fixing failure to invalidate indicator 2019-10-21 15:27:57 -07:00
Paul Peavyhouse
901d108bae Merge branch 'dev-6.1' into feat-cpicker 2019-10-21 15:25:36 -07:00
Gabor Kiss-Vamosi
c241905d88 lv_font_roboto_16: add missing symbols 2019-10-21 07:13:04 +02:00
Gabor Kiss-Vamosi
23ec092c14 fix subpxixel rendering with LV_COLOR_16_SWAP 2019-10-21 06:41:40 +02:00
Gabor Kiss-Vamosi
246adc7b43 Merge pull request #1218 from paulpv/fix-rgb565
Fix RGB 565 to 888
2019-10-21 06:30:49 +02:00
Gabor Kiss-Vamosi
0bd200a36a Merge pull request #1228 from tgillbe/feature_arc_antialias
Add arc antialiasing
2019-10-21 05:26:33 +02:00
Amir Gonnen
f7c2512c76 Bidi fixes
Add bidi_dir parameter to lv_draw_label

Use draw buffer for bidi processing

condition bidi code according to LV_USE_BIDI
2019-10-20 02:16:57 +03:00
Paul Peavyhouse
ae006b2bc9 typo 2019-10-19 05:26:18 -07:00
Paul Peavyhouse
a11a06547f More mathematically worded 2019-10-19 05:24:25 -07:00
Paul Peavyhouse
8694b3889b Not so concise comment 2019-10-19 05:17:22 -07:00
Paul Peavyhouse
649e438f0d Experimented and found "smaller" math 2019-10-19 04:04:07 -07:00
Gabor Kiss-Vamosi
9a7b7f8511 btnm, tabview: in LV_SIGNAL_FOCUS assume the last indev if not focused by the an indev 2019-10-19 11:01:10 +02:00
Gabor Kiss-Vamosi
4c944f4050 subpx fixes 2019-10-19 10:29:59 +02:00
tgillbe
6cfb0af7c3 Add arc antialiasing 2019-10-18 15:34:57 +01:00
Gabor Kiss-Vamosi
e1c46cb9bc Merge branch 'feat-subpixel' into dev-6.1 2019-10-18 14:58:04 +02:00
Gabor Kiss-Vamosi
f282c3bd08 subpx: read fro mteh font if subpx is supported 2019-10-18 14:57:27 +02:00
Amir Gonnen
c6b7cf130b Support text wrap for bidi text
TODO: conditional LV_USE_BIDI, allocate global buffer once, pass dir as parameter to lv_draw_label
2019-10-18 02:13:41 +03:00
Paul Peavyhouse
04158b39cd Fully tested values 5 bit red/blue 0 to 31 and 6 bit green 0 to 63 2019-10-16 23:21:30 -07:00
Paul Peavyhouse
92be109cba Fixing +/- 3 conversion problem 2019-10-16 22:41:56 -07:00
Gabor Kiss-Vamosi
87d191e737 lv_font.h: change field order 2019-10-17 06:47:51 +02:00
Gabor Kiss-Vamosi
73a0686672 page, tabview bidi fixes 2019-10-17 06:10:29 +02:00
Gabor Kiss-Vamosi
dbaaaa31a6 lv_obj_set_parent: reposition according to base dir 2019-10-17 06:10:08 +02:00
Themba Dube
2e612c91bd Merge remote-tracking branch 'origin/dev-6.1' into feat-cpicker 2019-10-16 20:37:54 -04:00
Amir Gonnen
770645ecd0 add Hebrew font 2019-10-16 23:35:38 +03:00
Amir Gonnen
93a94bc4d5 Add exported constants to log-level macros (#1226)
See GitHub comments on 0df7d0d996.
2019-10-16 16:21:07 -04:00
Amir Gonnen
c7b8626780 Add exported constants to log-level macros
See comments to 0df7d0d996
2019-10-16 23:09:55 +03:00
Gabor Kiss-Vamosi
51226f7bfb merge bidi 2019-10-16 20:54:46 +02:00
Gabor Kiss-Vamosi
5491b5dc40 optimize triangle and line drawing by reducing mask 2019-10-16 20:38:45 +02:00
Gabor Kiss-Vamosi
1521aad41e move 'corner mask' to style.body 2019-10-16 20:25:53 +02:00
Gabor Kiss-Vamosi
a6f68e5387 add subpx rendering 2019-10-16 14:42:15 +02:00
Gabor Kiss-Vamosi
27c8a88c94 lv_tabiew: fix indicator position 2019-10-16 11:16:16 +02:00
Gabor Kiss-Vamosi
bd9695ab03 font: fix of decompression if size = 0 2019-10-16 11:16:03 +02:00
Gabor Kiss-Vamosi
10b3463a5f add lv_font_subpx_t 2019-10-16 10:34:54 +02:00
Gabor Kiss-Vamosi
bcdd680a2f table: apply bidi on cell values 2019-10-16 05:08:21 +02:00
Gabor Kiss-Vamosi
6b5c89baf7 lv_label_ins_text: consider base dir 2019-10-15 14:25:47 +02:00
Gabor Kiss-Vamosi
54e34c15b9 btnm, tabview: revers the button/tab order with RTL base dir 2019-10-15 11:04:49 +02:00
Gabor Kiss-Vamosi
06746dfd63 fix page overflow when object created on the right due to RTL base dir 2019-10-15 10:32:15 +02:00
Gabor Kiss-Vamosi
f1c7e19985 bidi: remove debug printfs 2019-10-14 16:02:28 +02:00
Gabor Kiss-Vamosi
9d2a2c58f9 In case of RTL with LV_LAYOUT_ROW_X arrangle from the right 2019-10-14 15:25:40 +02:00
Themba Dube
de55986fc0 Merge branch 'dev-6.1' into feat-cpicker 2019-10-12 21:04:21 -04:00
Themba Dube
93ce1b9e1c Silence GCC warning about extra semicolons 2019-10-12 21:03:54 -04:00
Themba Dube
0df7d0d996 Partially revert lv_log.h to fix compilation issue until consensus is reached 2019-10-12 21:00:00 -04:00
Themba Dube
7f5ce8ca37 Merge branch 'dev-6.1' into feat-cpicker 2019-10-12 20:55:29 -04:00
Themba Dube
dcc287c936 Merge remote-tracking branch 'origin/master' into dev-6.1 2019-10-12 20:55:17 -04:00
Themba Dube
bd402605da Merge branch 'dev-6.1' of github.com:littlevgl/lvgl into dev-6.1 2019-10-12 20:54:02 -04:00
Gabor Kiss-Vamosi
c2b3976d5a Merge pull request #1219 from TridentTD/master
Update drawing round-ending lines for the canvas's obj
2019-10-11 16:10:24 +02:00
Gabor Kiss-Vamosi
6d93057532 minor fixes 2019-10-11 15:03:17 +02:00
Gabor Kiss-Vamosi
bae1cb6ae0 lv_conf_checker.py: support macros with parentheses 2019-10-11 15:03:12 +02:00
Gabor Kiss-Vamosi
7325a3cdde Merge branch 'dev-6.1' of https://github.com/littlevgl/lvgl into dev-6.1 2019-10-11 14:43:36 +02:00
Gabor Kiss-Vamosi
641117e896 tabview: on FOCUS preselect the currently active tab 2019-10-11 14:43:29 +02:00
Gabor Kiss-Vamosi
fe35307d9f fix page oveflow with right aligned object (due to RTL base dir) 2019-10-11 14:15:38 +02:00
Gabor Kiss-Vamosi
6f001958ce bidi: fix btnm, kb, ta, table behaviour in RTL context 2019-10-11 12:01:58 +02:00
Gabor Kiss-Vamosi
ca45bfaf07 add triangle drawing 2019-10-10 15:36:53 +02:00
Gabor Kiss-Vamosi
c747f29664 ddlist: RTL deafult pos fixes 2019-10-10 14:34:39 +02:00
Gabor Kiss-Vamosi
cadf2bd97d with RTL base dir: create the object on the right and grow to the right in lv_obj_set_width 2019-10-10 14:16:11 +02:00
Gabor Kiss-Vamosi
7f7abe9a93 subpixel: update drawing to support both types 2019-10-10 07:09:30 +02:00
TridentTD
aa1d5080e4 add if(style->line.rounded) 2019-10-09 23:12:47 +07:00
TridentTD
8af6043e75 add if(style->line.rounded) 2019-10-09 23:11:16 +07:00
Gabor Kiss-Vamosi
7a0728fc3c bidi: minor fixes 2019-10-09 15:36:38 +02:00
Gabor Kiss-Vamosi
a12bbfe0d2 subpixel: add test font 2019-10-09 14:29:22 +02:00
Gabor Kiss-Vamosi
1016b8bb47 Merge pull request #1220 from ScarsFun/master
hide sign in spinbox widget if only positive values
2019-10-09 14:26:31 +02:00
Gabor Kiss-Vamosi
0257fbcd5a bidi: process in paragraphs 2019-10-09 14:00:28 +02:00
Gabor Kiss-Vamosi
eeabd32b9e bidi: minor fixes 2019-10-08 16:54:28 +02:00
crnchbng
68c752ab50 Fix compile issue with LV_EXT_CLICK_AREA_TINY (#1221)
Discussed in https://github.com/littlevgl/lv_gui_builder/issues/2#issuecomment-495246128.
2019-10-08 10:53:31 -04:00
Gabor Kiss-Vamosi
34e133586e make LV_USE_BIDI = 0 by default 2019-10-08 16:31:32 +02:00
Gabor Kiss-Vamosi
b06ef2620a merge dev-6.1 2019-10-08 16:29:40 +02:00
Gabor Kiss-Vamosi
6190763382 bidi: add LV_LABEL_ALIGN_AUTO, LV_BIDI_DIR_AOUT/INHERIT, LV_SIGNAL_BASE_DIR_CHG 2019-10-08 16:26:55 +02:00
Pusillus
99fd136758 hide sign if only positive values 2019-10-08 06:25:40 +02:00
Gabor Kiss-Vamosi
2117c4dab2 fix lv_btn_get_ink_out_time 2019-10-08 06:04:58 +02:00
Gabor Kiss-Vamosi
beafc32594 subpixel: initial test 2019-10-07 20:50:44 +02:00
Pusillus
dbccceea51 hide sign if only positive values 2019-10-06 08:29:15 +02:00
TridentTD
80448a1d54 Update drawing round-ending lines for the canvas's obj 2019-10-06 11:46:44 +07:00
Paul Peavyhouse
e0ca7581ef Initial commit of only 565 to 888; will check others next 2019-10-04 17:03:40 -07:00
Paul Peavyhouse
05f23d5ff0 Merge remote-tracking branch 'littlevgl/dev-6.1' into dev-6.1 2019-10-04 16:16:30 -07:00
Gabor Kiss-Vamosi
92b9141788 Merge pull request #1217 from amirgon/dev-6.1
use "export" macro to export interesting defines to binding
2019-10-04 12:25:23 +02:00
Amir Gonnen
02755339bc Move LV_EXPORT_CONST_INT to compiler settings section 2019-10-04 12:26:33 +03:00
Paul Peavyhouse
34faac98a7 Cleaner calls to get_indic_area 2019-10-03 23:35:57 -07:00
Amir Gonnen
d1d3ef4305 use "export" macro to export interesting defines to binding 2019-10-03 23:20:50 +03:00
Paul Peavyhouse
68c39030a6 Missed a line! 2019-10-03 04:04:27 -07:00
Paul Peavyhouse
61dfb56648 Consolidating common indicator_area calculation code 2019-10-03 04:02:38 -07:00
Paul Peavyhouse
ca9c4c8fda Code formatting 2019-10-03 03:11:38 -07:00
Paul Peavyhouse
c74e6a6207 Shrinking the gap between outer ring and inner preview a little 2019-10-02 21:14:28 -07:00
Gabor Kiss-Vamosi
abb480f988 lv_win_set_content_size: fix setting the size 2019-10-03 06:11:40 +02:00
Gabor Kiss-Vamosi
de96092537 remove unused vars 2019-10-03 06:06:27 +02:00
Gabor Kiss-Vamosi
3753265f56 update makefile 2019-10-03 06:06:20 +02:00
Gabor Kiss-Vamosi
8fb484ab91 font: fix the use of signed/unsiged types 2019-10-03 06:02:21 +02:00
Gabor Kiss-Vamosi
dd87cb8ef4 fix built-in fonts' include path 2019-10-03 05:55:53 +02:00
Gabor Kiss-Vamosi
e4bd622c78 Merge branch 'master' into dev-6.1 2019-10-03 05:54:43 +02:00
Gabor Kiss-Vamosi
dab042fe06 fix lv_font_unscii_8 include 2019-10-03 05:54:21 +02:00
Gabor Kiss-Vamosi
6d52976a16 update (re-generate) lv_font_unscii_8 2019-10-03 05:48:49 +02:00
Themba Dube
0d31e63a1e Merge remote-tracking branch 'origin/master' into dev-6.1 2019-10-02 20:12:58 -04:00
Paul Peavyhouse
b49edd91a2 All color setters use lv_cpicker_set_hsv and return bool for change 2019-10-02 16:21:44 -07:00
Paul Peavyhouse
994057b578 Removing extra indentation 2019-10-02 15:25:25 -07:00
Paul Peavyhouse
8fc9b12c64 Merge remote-tracking branch 'littlevgl/feat-cpicker' into feat-cpicker 2019-10-02 15:20:15 -07:00
Gabor Kiss-Vamosi
4396e0e496 Merge branch 'feat-cpicker' into new_draw 2019-10-02 16:59:50 +02:00
Gabor Kiss-Vamosi
87dd0baca9 merge feat-cpicker 2019-10-02 16:59:11 +02:00
Gabor Kiss-Vamosi
434ef7e667 cpicker: minor fixes 2019-10-02 16:58:41 +02:00
Gabor Kiss-Vamosi
d4196c7534 cpicker: add preview feature 2019-10-02 16:47:08 +02:00
Gabor Kiss-Vamosi
1dfc11ef4f tabview: fix slide navigation and auto-fits 2019-10-02 16:35:02 +02:00
Gabor Kiss-Vamosi
e8625aaf65 add cpicker to lv_conf_template.h 2019-10-02 09:02:43 +02:00
Gabor Kiss-Vamosi
0a25c5ab36 draw_rect: separate bg and border draw + fix artifacts with LV_OPA_COVER borders 2019-10-02 09:00:12 +02:00
Gabor Kiss-Vamosi
11d5fcb9ae cpicker: on double click reset only the current color mode 2019-10-02 08:32:10 +02:00
Gabor Kiss-Vamosi
d6ae10473b cpicker: cleanup 2019-10-02 08:28:24 +02:00
Gabor Kiss-Vamosi
c03744a048 blend: remove unnecessary checks 2019-10-02 07:05:14 +02:00
Gabor Kiss-Vamosi
1edeba573f mask: fix write out-of-bounds of mask_buf 2019-10-02 07:03:53 +02:00
Gabor Kiss-Vamosi
3761987d32 lv_color_mix: reduce rounding error 2019-10-02 07:02:36 +02:00
xennex22
23009e8de9 Update lv_kb.c
Fixed enum prefix
2019-10-01 21:35:12 -07:00
xennex22
3c7cb46318 Update lv_kb.h
Fixed enum prefix
2019-10-01 21:31:50 -07:00
Paul Peavyhouse
786eabe1c7 Merge remote-tracking branch 'littlevgl/feat-cpicker' into feat-cpicker 2019-10-01 20:22:57 -07:00
Gabor Kiss-Vamosi
4f4d963d77 merge feat-cpicker 2019-10-01 22:20:55 +02:00
Gabor Kiss-Vamosi
7a707ff94c merge dev-6.1 2019-10-01 22:16:25 +02:00
Gabor Kiss-Vamosi
10d90a8baa cpicker: minor fixes 2019-10-01 22:08:14 +02:00
Gabor Kiss-Vamosi
eda607d824 cpicker: minor fixes 2019-10-01 22:00:23 +02:00
Gabor Kiss-Vamosi
2600c1c3d9 cpicker: rework 2019-10-01 21:16:30 +02:00
Gabor Kiss-Vamosi
c64dc1d645 bidi: compose otput string and swap arithmetical symbols 2019-10-01 05:48:46 +02:00
Gabor Kiss-Vamosi
8cb508dfec cpicker minor renames 2019-10-01 05:20:20 +02:00
Paul Peavyhouse
af7b2857ee Moving a method 2019-09-30 15:51:18 -07:00
Paul Peavyhouse
98d29cdcd1 Merge remote-tracking branch 'littlevgl/feat-cpicker' into feat-cpicker 2019-09-30 15:46:15 -07:00
Paul Peavyhouse
974e4a245e Consolidating Disc and Rect lv_cpicker_signal 2019-09-30 15:43:02 -07:00
Paul Peavyhouse
333812ba7a Improvements to color picker (#1208) 2019-09-30 10:00:34 -04:00
Gabor Kiss-Vamosi
5e7edc30be Merge pull request #1209 from liuduanfei/master
fixed comment error.
2019-09-30 12:28:14 +02:00
Gabor Kiss-Vamosi
c190374c79 img_cache: store the filename instead of its pointer 2019-09-30 11:56:38 +02:00
HappyTime
a5de64f93c fixed comment error. 2019-09-30 16:56:47 +08:00
Gabor Kiss-Vamosi
a35a79ba4e lv_img: fix caching when image source changes 2019-09-30 06:21:18 +02:00
Paul Peavyhouse
93d2d422b8 Not emitting LV_EVENT_VALUE_CHANGED if double-click doesn't change value 2019-09-29 21:11:53 -07:00
Paul Peavyhouse
1339d92ccd Code formatting 2019-09-29 21:02:12 -07:00
Paul Peavyhouse
bf9ed06bac Consolidating identical LV_KEY_RIGHT/UP and LV_KEY_LEFT/DOWN code 2019-09-29 21:00:00 -07:00
Paul Peavyhouse
3a5293fa32 Tiny consolidation of identical LV_SIGNAL_PRESS_LOST code 2019-09-29 20:56:05 -07:00
xennex22
90b8b3eb76 Update lv_kb.c
Changed keyboard mapping to set a map copy for each keyboard shift state.
2019-09-28 09:19:27 -07:00
xennex22
d9f80ecf1a Update lv_kb.h
Changed keyboard map set functions to take 'lv_kb_shift_t' keyboard shift parameter
2019-09-28 09:15:22 -07:00
Paul Peavyhouse
ab2114e4e7 Eventing LV_EVENT_VALUE_CHANGED when double-clicked 2019-09-28 01:54:10 -07:00
Paul Peavyhouse
1a3d61e074 Consolidate separate h, s, & v vars in to single lv_color_hsv_t var 2019-09-28 01:46:43 -07:00
Gabor Kiss-Vamosi
1a5001d7a3 Merge pull request #1196 from paulpv/color_picker_6
Porting @AloyseTech's color picker from lvgl v5 to v6
2019-09-28 09:16:55 +02:00
Gabor Kiss-Vamosi
a50e597942 bidi: support currencies in rtl 2019-09-28 08:40:02 +02:00
Gabor Kiss-Vamosi
c1e0faf440 Merge pull request #1206 from pete-pjb/dev-6.1
Added extra keyboard mode to enable caps-lock defined as
2019-09-27 10:07:07 +02:00
pete-pjb
3f89a91d9c Changed LV_KB_MODE_TEXT_UC to LV_KB_MODE_TEXT_UPPER as suggested to make
it more intuitive.
2019-09-27 08:43:14 +01:00
pete-pjb
e94f8e3cfc Changed LV_KB_MODE_TEXT_UC to LV_KB_MODE_TEXT_UPPER as suggested to make
it more intuitive.
2019-09-27 08:39:23 +01:00
Gabor Kiss-Vamosi
3aac71b16e lv_btnm: fix row positions 2019-09-27 09:10:26 +02:00
Paul Peavyhouse
7ac2aff982 Using #define defaults instead of hard-coded numbers 2019-09-26 22:35:41 -07:00
Paul Peavyhouse
280c291db7 Cleaned up and ready for [hopefully] final code review! 2019-09-26 22:22:27 -07:00
Gabor Kiss-Vamosi
ac269ebaad bidi: fixes 2019-09-27 06:03:54 +02:00
Gabor Kiss-Vamosi
a3b61e72fc imgbtn: support symbols 2019-09-27 04:04:57 +02:00
Gabor Kiss-Vamosi
5370543e95 Merge branch 'feat-debug' into dev-6.1 2019-09-27 03:29:34 +02:00
Gabor Kiss-Vamosi
f00c24f312 debug: add style sentinel 2019-09-27 03:28:44 +02:00
Paul Peavyhouse
85ffe5f974 Merge branch 'dev-6.1' into color_picker_6 2019-09-26 12:48:04 -07:00
Paul Peavyhouse
c5e7fbd953 Merge remote-tracking branch 'littlevgl/dev-6.1' into dev-6.1 2019-09-26 12:47:31 -07:00
Paul Peavyhouse
8476692731 [Still] working cleanup checkpoint 2019-09-26 12:32:05 -07:00
Paul Peavyhouse
25d4991683 Whitespace changes 2019-09-26 11:24:47 -07:00
Paul Peavyhouse
d3962fc26c [Still] working cleanup checkpoint 2019-09-26 11:17:13 -07:00
pete-pjb
96e64ad6fc Added extra keyboard mode to enable caps-lock defined as
LV_KB_MODE_TEXT_UC
2019-09-26 18:24:28 +01:00
Gabor Kiss-Vamosi
fa6ae44f0f fix conflicts 2019-09-26 15:24:47 +02:00
Gabor Kiss-Vamosi
0a9eeba4e4 dubug: add asserts to every object type's API functions 2019-09-26 15:13:33 +02:00
Gabor Kiss-Vamosi
ede392b7c9 debug: add assterts to lv_obj and update signal functions 2019-09-26 10:51:54 +02:00
Paul Peavyhouse
8e7bd571af Syncing... 2019-09-25 23:41:32 -07:00
Paul Peavyhouse
4d44d16b2e Changing QF from 1 to 3 2019-09-25 23:16:12 -07:00
Gabor Kiss-Vamosi
8dcb1ff21c cpicker: fix line indicator artifact 2019-09-26 07:23:23 +02:00
Gabor Kiss-Vamosi
6e9f10451d Merge branch 'color_picker_6' of https://github.com/paulpv/lvgl into paulpv-color_picker_6 2019-09-26 07:06:58 +02:00
Paul Peavyhouse
46dead9ab9 Consolidating all angle2color/color2angle calculations 2019-09-25 22:02:06 -07:00
Paul Peavyhouse
e9941eaf4c Persist gradient_w & gradient_h to ext
Thought was that it would help invalidating, but it did not.
Still, it helps to clean up the code a tad.
2019-09-25 20:39:56 -07:00
Gabor Kiss-Vamosi
8ce6c32415 add symbols: NEW_LINE, SD_CARD, USB, EYE_OPEN, EYE_CLOSE 2019-09-25 11:37:56 +02:00
Gabor Kiss-Vamosi
e9b6fcd58d debug: minor fixes 2019-09-25 08:58:12 +02:00
Paul Peavyhouse
53a1188f7c Fixing create bug 2019-09-24 21:10:23 -07:00
Paul Peavyhouse
c4e9f69868 Adding lv_cpicker_set_type 2019-09-24 21:06:51 -07:00
Paul Peavyhouse
93cef9e121 Checkpoint of only **partially** working optimized invalidation :/ 2019-09-24 18:48:57 -07:00
Paul Peavyhouse
0b4e7629b8 Got most modes fully working; Rect invalidation not optimized. 2019-09-24 18:00:39 -07:00
Gabor Kiss-Vamosi
5660181b81 debug: rework asserts 2019-09-24 23:14:17 +02:00
Paul Peavyhouse
a7dc9e852c Fix Rect by using persisted gradient & preview area in touch calculation 2019-09-24 13:48:41 -07:00
Gabor Kiss-Vamosi
3dfbc5c85d create lv_bidi.c/h 2019-09-24 21:00:58 +02:00
Gabor Kiss-Vamosi
366f958e1a debug: add the basics of LV_DEBUG 2019-09-24 16:30:38 +02:00
Gabor Kiss-Vamosi
7ef624054a bidi: update list weak and neutral chars 2019-09-24 10:50:43 +02:00
Gabor Kiss-Vamosi
bddf31824c bidi: handle starting and trailing neutrals 2019-09-24 10:30:58 +02:00
Johannes Bauer
4479a22696 Fixed outdated filename in README.md (#1201)
Template header file has been renamed from lv_conf_templ.h to
lv_conf_template.h; reflect that change in the README.md.
2019-09-23 10:11:41 -04:00
Gabor Kiss-Vamosi
2c5c4abdce bidi: clean up 2019-09-23 14:24:15 +02:00
Gabor Kiss-Vamosi
62c6ede15e bidi: first attempt to get runs 2019-09-23 14:17:27 +02:00
embeddedt
bebd2dd896 Update lv_version.h to reflect new development version 2019-09-21 07:02:34 -04:00
Gabor Kiss-Vamosi
6d81b453b3 Merge branch 'master' into dev-6.1 2019-09-20 16:31:33 +02:00
Gabor Kiss-Vamosi
9f978cb087 lv_ta: copy fixes 2019-09-20 16:31:12 +02:00
Gabor Kiss-Vamosi
1439877958 lv_bar: indicator draw fixes 2019-09-20 15:36:08 +02:00
Gabor Kiss-Vamosi
a67463db5b lv_bar: mask the gradient indicators 2019-09-20 11:03:13 +02:00
Gabor Kiss-Vamosi
2c5dd5f3eb lv_tabview: calculate with paddings 2019-09-20 10:57:20 +02:00
Gabor Kiss-Vamosi
87c3296d92 lv_kb: use LV_SYMBOL_BACKSPACE 2019-09-20 07:52:13 +02:00
Gabor Kiss-Vamosi
f341ad9b60 use FontAwesome v5 and add Backspace and Paste symbols 2019-09-20 07:52:13 +02:00
Themba Dube
e4bcade975 Merge remote-tracking branch 'origin/master' into dev-6.1 2019-09-19 09:01:25 -04:00
Gabor Kiss-Vamosi
fc88148e52 scroll prop fixes 2019-09-19 14:58:07 +02:00
embeddedt
cf1fed89e0 Make lv_ta_get_placeholder_text do what it says
Thanks to @TridentTD on the forum for reporting this: https://forum.littlevgl.com/t/bug-at-textareas-lv-ta-get-placeholder-text/707
2019-09-19 08:56:16 -04:00
Paul Peavyhouse
305ac5ff69 Got invalidation working 2019-09-18 21:37:18 -07:00
Paul Peavyhouse
fc1b5c682d Mostly working except for [I think] invalidation; refactoring a bit 2019-09-18 21:23:56 -07:00
Paul Peavyhouse
b67f40ed39 Got the gradient to draw and background honor theme 2019-09-18 17:22:16 -07:00
Paul Peavyhouse
12ee870e2c Got the center button to draw, albeit seems like the wrong color 2019-09-18 15:14:23 -07:00
Paul Peavyhouse
7f565f419a Initial commit of porting @AloyseTech's color picker from lvgl v5 to v6 2019-09-18 12:03:32 -07:00
Gabor Kiss-Vamosi
a79da64757 lv_page: add support to nested (chained) scroll propagation 2019-09-18 16:03:29 +02:00
Vadym Mishchuk
3dc57783ad lv_chart: add secondary Y axis and ability to reverse label order (#1194) 2019-09-18 08:44:57 -04:00
Gabor Kiss-Vamosi
9c8e0f0552 lv_win: add lv_win_set_content_size 2019-09-18 06:30:17 +02:00
Gabor Kiss-Vamosi
e523070d0f scroll propagaton reworked to use drag_parent 2019-09-17 16:07:30 +02:00
Gabor Kiss-Vamosi
c79ada1a46 scroll propagation: start to rework 2019-09-17 14:38:55 +02:00
Gabor Kiss-Vamosi
f445f1965b shadow draw: update mask to fully cover the edge of the bg 2019-09-17 05:07:50 +02:00
Gabor Kiss-Vamosi
31c628f332 update bar, slider, sw drawing 2019-09-16 10:58:28 +02:00
Gabor Kiss-Vamosi
a611160636 Merge branch 'master' into dev-6.1 2019-09-14 11:46:51 +02:00
Gabor Kiss-Vamosi
55badbd0de support disabled antialiasing 2019-09-14 11:46:25 +02:00
Gabor Kiss-Vamosi
88bda09f5f btnm: fix keyboard navigation 2019-09-14 11:24:48 +02:00
Gabor Kiss-Vamosi
f190c78195 font compression: add prefilter support 2019-09-13 15:40:12 +02:00
Gabor Kiss-Vamosi
915046d3ba add font decompression and bpp=3 support 2019-09-13 11:51:31 +02:00
Gabor Kiss-Vamosi
a031af4f1e lv_list: fix the use of last_clicked_btn 2019-09-12 16:04:11 +02:00
Gabor Kiss-Vamosi
8e5e33d746 add lv_slider_set/get_sym 2019-09-12 15:25:49 +02:00
Gabor Kiss-Vamosi
6e4364228f lv_line: update rounded line ending 2019-09-11 15:30:51 +02:00
Gabor Kiss-Vamosi
eb6e8c4563 draw line fixes
the positions weren't pixel perfect
2019-09-11 15:30:13 +02:00
Gabor Kiss-Vamosi
7d675cf1d1 add horizontal gradient main/grad_color_stop 2019-09-11 06:47:52 +02:00
Gabor Kiss-Vamosi
777094cc81 arc mask fixes 2019-09-10 13:31:29 +02:00
Gabor Kiss-Vamosi
cdcb9bebf9 draw inteface fixes 2019-09-10 08:12:10 +02:00
Gabor Kiss-Vamosi
989b2f14e8 simplify draw interface 2019-09-10 07:34:46 +02:00
Gabor Kiss-Vamosi
a296e50650 ad lv_draw_mask_map 2019-09-10 07:02:33 +02:00
Gabor Kiss-Vamosi
d0bc387c14 suppor blend modes on images 2019-09-10 06:13:08 +02:00
Gabor Kiss-Vamosi
2acbc59a46 use set_px_cb and handle image opacity 2019-09-10 05:36:11 +02:00
Gabor Kiss-Vamosi
3f484bcba0 optimize drawing 2019-09-09 06:04:49 +02:00
Gabor Kiss-Vamosi
e008af9768 darw: bugfixes 2019-09-09 05:53:40 +02:00
Gabor Kiss-Vamosi
305198f073 lv_canvas support drawing with TRUE_COLOR_APLHA and ALPHA1/2/4/8BIT 2019-09-08 15:25:20 +02:00
Gabor Kiss-Vamosi
033ed99f1f draw fixes 2019-09-07 01:23:55 +02:00
Gabor Kiss-Vamosi
4e11456706 add lv_draw_mask_fade 2019-09-06 22:50:46 +02:00
Gabor Kiss-Vamosi
5a72e6356f lv_chart: add LV_CHART_AREA_FADE 2019-09-06 22:49:35 +02:00
Gabor Kiss-Vamosi
d246cc3ddb add lv_objmask object type 2019-09-06 19:53:51 +02:00
Gabor Kiss-Vamosi
60cd00f9cc add lv_design_res_t 2019-09-06 19:53:39 +02:00
Gabor Kiss-Vamosi
c8eb31af59 restructrue drawings 2019-09-06 12:24:15 +02:00
Gabor Kiss-Vamosi
2052f202eb handle blend modes 2019-09-06 09:25:08 +02:00
Gabor Kiss-Vamosi
139eb48cf6 enhanced shadow width refinement 2019-09-06 08:20:52 +02:00
Gabor Kiss-Vamosi
935348330e shadow spread fixes 2019-09-05 22:43:44 +02:00
Gabor Kiss-Vamosi
88e88d7ca7 shadow draw fixes 2019-09-05 21:44:29 +02:00
Gabor Kiss-Vamosi
41074a88b8 handle new shadow attributes 2019-09-05 21:19:32 +02:00
Gabor Kiss-Vamosi
424ece6628 add style.body.shadow.offset/spread/opa attributes 2019-09-05 20:52:04 +02:00
Gabor Kiss-Vamosi
a51ffce1b4 add enhanced shadow drawing option 2019-09-05 16:28:12 +02:00
Gabor Kiss-Vamosi
de596cef45 rect draw fixes 2019-09-05 14:29:35 +02:00
Gabor Kiss-Vamosi
eefd9c4e0d lv_table: fix crash on copy in lv_table_create 2019-09-04 16:07:05 +02:00
Gabor Kiss-Vamosi
ffd4708ac3 Remove survey 2019-09-04 15:58:05 +02:00
Gabor Kiss-Vamosi
80280557c6 optimize shadow drawing 2019-09-04 15:39:39 +02:00
Gabor Kiss-Vamosi
0497575b9c improve shadow drawing 2019-09-04 07:35:33 +02:00
embeddedt
49c2bbedbb Fix alpha indexed images with 1 bit color depth (#1184) 2019-09-03 13:53:56 -04:00
Deon Marais
8efba76073 Make sin table constant in lv_math.c (#1185) 2019-09-01 09:19:14 -04:00
Gabor Kiss-Vamosi
78125b66db Update lv_version.h 2019-08-30 10:59:04 +02:00
Gabor Kiss-Vamosi
b273e1a7e6 shadow draw experiments 2019-08-29 19:01:38 +02:00
Gabor Kiss-Vamosi
f15bd1c59b Merge pull request #1183 from tgillbe/dev-6.1
Add transparency support to indexed images
2019-08-29 15:32:18 +02:00
Gabor Kiss-Vamosi
e4d7626ca2 lv_blend_fill simplify API + shadow drawing experiments 2019-08-29 10:07:22 +02:00
Gabor Kiss-Vamosi
3cbc86fedb lv_sqrt: extend lookup table to 1024 2019-08-29 05:34:52 +02:00
Themba Dube
2a4ba5042e Merge branch 'dev-6.1' of github.com:littlevgl/lvgl into dev-6.1 2019-08-28 18:53:48 -04:00
Themba Dube
b1047f4b59 ddlist: move arrow to other side if right alignment is used 2019-08-28 18:53:30 -04:00
Gabor Kiss-Vamosi
cfc5260912 draw rect optimization 2019-08-28 16:33:05 +02:00
tgillbe
54a9ea6179 Action review comments 2019-08-28 15:07:17 +01:00
tgillbe
1ff1e31ed8 Add transparency support to indexed images 2019-08-28 14:24:17 +01:00
HarryManderTait
74d5ac5553 lv_preload: add constant-speed loader (#1181) 2019-08-28 08:01:50 -04:00
Gabor Kiss-Vamosi
3d72e3915b add arc drawing 2019-08-28 09:46:56 +02:00
Themba Dube
cfc86713ce Merge remote-tracking branch 'origin/master' into dev-6.1 2019-08-27 17:33:51 -04:00
Gabor Kiss-Vamosi
63935d283d add mask handling to images and letters 2019-08-27 15:16:05 +02:00
Gabor Kiss-Vamosi
d319ce78a6 darw img optimization 2019-08-27 07:05:51 +02:00
Gabor Kiss-Vamosi
26d71383b2 img draw add alpha and chroma key support 2019-08-27 06:11:33 +02:00
Gabor Kiss-Vamosi
3eb06252e9 indev: fix lv_indev_enable 2019-08-26 09:05:30 +02:00
Gabor Kiss-Vamosi
a5d89e6ece Merge pull request #1179 from explora26/fix_readme
Fix the read input device example in README.md
2019-08-26 07:36:02 +02:00
Harry Jiang
c0180b05b4 Fix the read input device example in README.md 2019-08-26 13:28:04 +08:00
Gabor Kiss-Vamosi
50859a9660 letter draw optimization: draw multiple lines at once 2019-08-26 07:18:08 +02:00
Gabor Kiss-Vamosi
68ded834bb new letter draw 2019-08-26 06:13:28 +02:00
Gabor Kiss-Vamosi
6b4db6e9fc mask and blend fixes 2019-08-26 05:06:49 +02:00
Gabor Kiss-Vamosi
3b54976227 update line daraw with 2d blend 2019-08-24 16:35:25 +02:00
Gabor Kiss-Vamosi
35607533b0 border draw optimization 2019-08-24 15:59:19 +02:00
Gabor Kiss-Vamosi
248c3a51ea btnm: fix padding.bottom handling 2019-08-24 10:15:15 +02:00
Gabor Kiss-Vamosi
85507c4af4 add 2d blending 2019-08-23 10:53:38 +02:00
Gabor Kiss-Vamosi
9b5e84eaca lv_sqrt: fix look up table 2019-08-22 16:17:43 +02:00
Gabor Kiss-Vamosi
801bff7a41 mask fixes 2019-08-22 15:23:53 +02:00
embeddedt
94c95bc9e4 lv_table: fix memory leak when deleted (#1178) 2019-08-21 09:53:55 -04:00
Gabor Kiss-Vamosi
1b5b2bfb4f add real draw functions 2019-08-21 15:44:35 +02:00
seyyah
941409f3f9 docs/CODING_STYLE.md: add src prefix to path (#1174) 2019-08-19 09:24:06 -04:00
Themba Dube
7ea67301d7 Fix off-by-one error in lv_label_set_text_fmt 2019-08-18 16:00:57 -04:00
Themba Dube
d5d8eb5afd Merge remote-tracking branch 'origin/master' into dev-6.1 2019-08-18 15:25:59 -04:00
Gabor Kiss-Vamosi
82e3ee3e76 mask fixes 2019-08-17 16:32:06 +02:00
Gabor Kiss-Vamosi
459bd81695 angle mask experiemnts 2019-08-16 22:37:34 +02:00
Gabor Kiss-Vamosi
bbb0d2f60e lv_roller: fix misalignment when an other obj is cliked while rolling 2019-08-16 16:43:05 +02:00
Gabor Kiss-Vamosi
71e950614f roller, ddlist and lv_label_get_letter_on fixes 2019-08-16 13:43:39 +02:00
Gabor Kiss-Vamosi
c23bdeca90 mask: performance improvments 2019-08-16 08:01:12 +02:00
Gabor Kiss-Vamosi
0840f6c867 angle mask start to implement 2019-08-16 07:54:32 +02:00
embeddedt
c35c84c7d0 Guard uses of antialiasing option with LV_ANTIALIAS 2019-08-15 09:24:22 -04:00
Gabor Kiss-Vamosi
0be096295b radius mask: bug fixes 2019-08-15 06:49:16 +02:00
Gabor Kiss-Vamosi
688f8ee682 radius mask: both sides works 2019-08-14 22:20:05 +02:00
Gabor Kiss-Vamosi
aa092bc353 radius mask: left side works 2019-08-14 22:09:56 +02:00
Gabor Kiss-Vamosi
8d7c9315cb line mask: optimization to avoid division 2019-08-14 16:02:06 +02:00
Gabor Kiss-Vamosi
b1d4d6faef line mask: support all direction and inversion 2019-08-14 11:06:04 +02:00
Gabor Kiss-Vamosi
9b91dc057e line_mask anti-alaising fixes 2019-08-13 17:39:15 +02:00
Gabor Kiss-Vamosi
0aa19da0c7 draw: line mask support all directions 2019-08-13 16:36:56 +02:00
Gabor Kiss-Vamosi
607bd3e31b draw: start line mask 2019-08-13 06:14:38 +02:00
Themba Dube
49afd3f46c Merge branch 'master' into dev-6.1 2019-08-11 12:58:34 -04:00
Gabor Kiss-Vamosi
7c90b84560 Update README.md 2019-08-07 09:42:02 +02:00
Gabor Kiss-Vamosi
5e8a3e180e Update README.md 2019-08-07 09:41:01 +02:00
Gabor Kiss-Vamosi
18eb517cff Update README.md 2019-08-07 09:39:35 +02:00
embeddedt
d4a22cb713 PlatformIO needs 6.0.2 in library.json 2019-08-06 09:33:05 -04:00
Themba Dube
ba1fba1f10 Add lv_label_set_text_fmt 2019-08-06 09:28:50 -04:00
Themba Dube
e53a30381a Merge branch 'master' into dev-6.1 2019-08-06 09:13:27 -04:00
embeddedt
9a69d142fe Update library.json 2019-08-06 08:58:15 -04:00
embeddedt
677e25397b Prevent chart contents from being drawn outside margin (#1169) 2019-08-06 08:47:45 -04:00
Themba Dube
5c735c0fc8 Do not add right padding to calendar label's x1 coordinate 2019-08-05 14:22:37 -04:00
Themba Dube
bdce05e20f Merge branch 'master' into dev-6.1 2019-08-05 13:55:16 -04:00
Themba Dube
7f653e6924 Merge branch 'master' of github.com:littlevgl/lvgl 2019-08-05 13:53:23 -04:00
Themba Dube
22aee91fc2 Fix two issues with keyboard
* Duplicate characters on long press
* Certain keys on the numeric keyboard were not auto-repeating
2019-08-05 13:52:39 -04:00
Jan Van Winkel
ebb29f09fb Corrected warning in theme material (#1168)
Corrected warning for unused variable hue2 in the function style_mod_edit of
the material theme in case color depth = 1.
2019-08-05 08:46:48 -04:00
Brian Pugh
d845cd73b0 Fix compiler warnings in lv_draw_img.c (#1166) 2019-08-04 12:33:46 -04:00
Gabor Kiss-Vamosi
1efff93dda draw_line: fix skew line draw error 2019-08-01 21:01:02 +02:00
Gabor Kiss-Vamosi
17111843a0 fonts: add missing symbols 2019-07-31 12:31:21 +02:00
embeddedt
1f4f333a01 Add library.json 2019-07-30 08:24:26 -04:00
embeddedt
3eeb104463 Update bug-report.md 2019-07-29 12:20:06 -04:00
Gabor Kiss-Vamosi
6bb86f0963 fix typo in comment 2019-07-29 16:19:30 +02:00
Gabor Kiss-Vamosi
8ad5aa36dd lv_label: disable hint on 'LV_LABEL_LONG_TXT_HINT 0' 2019-07-29 16:00:59 +02:00
Gabor Kiss-Vamosi
ec63826d53 lv_draw_label: fix hint 2019-07-29 15:56:20 +02:00
Gabor Kiss-Vamosi
ff853105d9 Revert "font: add const to lv_font_fmt_txt_dsc_t"
This reverts commit 8361a9c23d.
2019-07-29 15:42:54 +02:00
Gabor Kiss-Vamosi
8361a9c23d font: add const to lv_font_fmt_txt_dsc_t 2019-07-29 15:09:21 +02:00
Gabor Kiss-Vamosi
f5dca830c4 add relative include path for lvgl.h in built-in fonts 2019-07-29 14:06:39 +02:00
Gabor Kiss-Vamosi
6a65f6e5d9 add const in arrays of unscii font 2019-07-29 12:26:00 +02:00
Gabor Kiss-Vamosi
4f0393f704 font: make some arrays const 2019-07-29 12:20:55 +02:00
Gabor Kiss-Vamosi
7a73cb00a5 fix display_template example 2019-07-29 11:00:28 +02:00
Gabor Kiss-Vamosi
786e793634 theme_material: improve group style mod funvtions 2019-07-27 17:40:20 +02:00
Gabor Kiss-Vamosi
a9ec60b5cd lv_theme_nigh: update list button's style 2019-07-26 20:35:58 +02:00
Gabor Kiss-Vamosi
3cfe72c0fb lv_calendar_get_pressed_date: return NULL if not date pressed 2019-07-26 13:23:19 +02:00
Gabor Kiss-Vamosi
a4c6d511b7 theme_material: bar, slider, sw padding fixes 2019-07-26 13:22:55 +02:00
Gabor Kiss-Vamosi
fd6d7119f5 indev: seng LV_EVENT_CLICK on if the object is not dragged 2019-07-26 13:22:09 +02:00
Gabor Kiss-Vamosi
0ab5e6e65c theme zen: make scrollbar thinner 2019-07-25 11:36:42 +02:00
Gabor Kiss-Vamosi
6d2bbf2862 lv_canvas: disable anti alaising when drawing with transparent color to chroma keyed canvas 2019-07-25 11:36:42 +02:00
Themba Dube
2093b43045 Add LV_FS_MAX_PATH_LENGTH 2019-07-24 12:25:48 -04:00
Gabor Kiss-Vamosi
ebeeb28e85 Merge pull request #1159 from joltwallet/long_txt_6_1_clean
lv_txt.c long word text wrapping initial commit (refactor).
2019-07-24 06:12:30 +02:00
Gabor Kiss-Vamosi
5a9904fa12 lv_txt_get_next_line: step at least one to avoid infinite loops 2019-07-24 06:07:20 +02:00
Gabor Kiss-Vamosi
28505b09e6 update lv_conf_checker.h 2019-07-24 06:06:41 +02:00
Brian Pugh
29b145ffb2 lv_txt.c long word text wrapping initial commit (refactor). 2019-07-23 09:19:14 -07:00
embeddedt
bf2453ce0e Merge pull request #1158 from engSinteck/master
fix comment
2019-07-23 10:12:26 -04:00
rinaldo
c519b73ae2 fix comment 2019-07-23 10:52:53 -03:00
Gabor Kiss-Vamosi
5d44e66d42 format comments 2019-07-23 08:23:33 +02:00
Gabor Kiss-Vamosi
04be7cc6a6 kb: fix kb_ctrl_spec_map 2019-07-22 15:30:50 +02:00
Gabor Kiss-Vamosi
3977a33ac4 Merge branch 'master' into dev-6.1 2019-07-22 06:30:26 +02:00
Gabor Kiss-Vamosi
c5f69ca3b1 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-07-22 06:30:07 +02:00
Gabor Kiss-Vamosi
aa2f70fabc add lv_printf 2019-07-22 06:29:58 +02:00
Gabor Kiss-Vamosi
465bd3edd9 lv_list: fix comment 2019-07-22 06:29:34 +02:00
Gabor Kiss-Vamosi
639409b881 Merge pull request #1156 from vanwinkeljan/fix_disp_lv_inv_area
Pass disp->driver to rounder_cb in lv_inv_area
2019-07-20 06:27:01 +02:00
Jan Van Winkel
9401353ccb Pass disp->driver to rounder_cb in lv_inv_area
Pass pointer to disp->driver to rounder_cb in lv_inv_area instead of
pointer to disp_refr->driver as lv_inv_area is called when no refresh is
ongoing (lv_disp_drv_register).

Signed-off-by: Jan Van Winkel <jan.van_winkel@dxplore.eu>
2019-07-19 18:07:50 +02:00
Gabor Kiss-Vamosi
196da100b1 Update README.md 2019-07-19 12:09:55 +02:00
Gabor Kiss-Vamosi
24c17a9e5f Update README.md 2019-07-19 11:08:08 +02:00
Gabor Kiss-Vamosi
d1bc187ec6 Update README.md 2019-07-19 08:10:50 +02:00
Gabor Kiss-Vamosi
884b0b8025 Update README.md 2019-07-19 08:07:53 +02:00
Gabor Kiss-Vamosi
9f333d50d7 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-07-17 12:44:08 +02:00
Gabor Kiss-Vamosi
1c859fc3d6 lv_page: propagate the DRAG_START/END events too from scrollable to the bancground 2019-07-17 12:43:50 +02:00
Gabor Kiss-Vamosi
cd0d311531 fix sending of DRAG_BEGIN/END siganls and events 2019-07-17 12:43:10 +02:00
Gabor Kiss-Vamosi
33b4072138 Update CONTRIBUTING.md 2019-07-16 20:57:08 +02:00
Gabor Kiss-Vamosi
da3785240a Create CODING_STYLE.md 2019-07-16 20:53:43 +02:00
Gabor Kiss-Vamosi
ea00b24cdf add LV_STYLE_CREATE 2019-07-15 15:01:50 +02:00
Gabor Kiss-Vamosi
d7fd9eca35 Merge branch 'master' into dev-6.1 2019-07-15 14:56:55 +02:00
embeddedt
27db08eb23 Merge pull request #1151 from sie0x01/master
Fix header color format check in lv_img_decoder_built_in_info
2019-07-14 17:16:20 -04:00
Alexander Siebert
93357446a4 Fix header color format check in lv_img_decoder_built_in_info 2019-07-14 21:26:19 +02:00
Themba Dube
f55abd4e97 Merge remote-tracking branch 'origin/master' into dev-6.1 2019-07-13 21:27:18 -04:00
Gabor Kiss-Vamosi
a421547774 Merge pull request #1144 from BigHeadCreations/master
Fix typos
2019-07-10 15:05:01 +02:00
Gabor Kiss-Vamosi
4a036d8c28 declare lv_font_fmt_txt_cmap_type_t as uint8_t
it causes issue if the bitfield ar interpreted as signed
2019-07-10 14:51:59 +02:00
Timothy Pearson
362378b4e4 Fix typos 2019-07-10 11:56:36 +02:00
Themba Dube
0c8794d557 Merge branch 'master' into dev-6.1 2019-07-09 16:22:02 -04:00
Gabor Kiss-Vamosi
2cead48cd5 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-07-09 15:38:06 +02:00
Gabor Kiss-Vamosi
5312875972 LV_LAYOUT_GRID: fix 2019-07-09 15:37:50 +02:00
Gabor Kiss-Vamosi
fca1a1d434 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-07-09 08:19:26 +02:00
Gabor Kiss-Vamosi
1618930f9b update the fs porting example 2019-07-09 08:19:14 +02:00
Gabor Kiss-Vamosi
014850e73a make lv_fs_get_drv public 2019-07-09 08:18:58 +02:00
Gabor Kiss-Vamosi
1a7e7ef125 Merge pull request #1140 from C47D/horizontal_list
lv_list: Add list layout, implements #1138
2019-07-09 06:52:15 +02:00
embeddedt
f984c35875 Merge pull request #1141 from Jason-Cooke/patch-1
docs: fix typo
2019-07-08 17:38:31 -04:00
Jason Cooke
dec310a78d docs: fix typo 2019-07-09 09:34:46 +12:00
Gabor Kiss-Vamosi
a568a131d6 list: set/get lyout directly, not store in 'ext' 2019-07-08 17:24:30 +02:00
Gabor Kiss-Vamosi
5f9324cec5 Merge branch 'horizontal_list' of https://github.com/C47D/lvgl into C47D-horizontal_list 2019-07-08 17:18:29 +02:00
Gabor Kiss-Vamosi
40c86ea34e color_mix_2_alpha fixes 2019-07-08 13:10:16 +02:00
Gabor Kiss-Vamosi
df91d5bcad add lv_async to makefile 2019-07-08 13:02:48 +02:00
Gabor Kiss-Vamosi
2f29a9f361 fix compiler errors 2019-07-08 13:00:27 +02:00
Gabor Kiss-Vamosi
7bacac488e theme: solve warnings when some object types are disabled 2019-07-08 12:51:47 +02:00
Gabor Kiss-Vamosi
e792352f45 disable color_mix_2_alpha if no used 2019-07-08 12:51:12 +02:00
C47D
b4b4c764a3 [lv_list] Replace lv_list_layout_t with lv_layout_t 2019-07-07 23:41:03 -05:00
C47D
1dfded27d4 [lv_list] Set vertical layout as default 2019-07-07 18:50:35 -05:00
C47D
3654253472 [lv_list] Fix comments and add implementation of list layout 2019-07-07 13:30:19 -05:00
C47D
95149e466f [lv_list] Add list layout prototypes 2019-07-07 12:17:06 -05:00
Themba Dube
1d53e5eaec Move lv_obj_del_async to lv_obj.h 2019-07-06 15:48:18 -04:00
embeddedt
91f8755690 Rename async header guards
Co-Authored-By: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2019-07-06 15:47:43 -04:00
Themba Dube
5ae4b62f4d Initial addition of asynchronous callbacks 2019-07-06 15:47:36 -04:00
Themba Dube
8e9764532d Add unscii to lv_font.mk 2019-07-05 14:33:00 -04:00
Gabor Kiss-Vamosi
03f18260a9 lv_img_decoder_close: fix if closed after error 2019-07-05 15:16:02 +02:00
Gabor Kiss-Vamosi
9023588fef make the built-in image decoders public 2019-07-05 15:06:01 +02:00
Gabor Kiss-Vamosi
89bc24a7d9 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-07-05 07:49:01 +02:00
Gabor Kiss-Vamosi
f66b21433c Merge branch 'dev-6.1' of https://github.com/littlevgl/lvgl into dev-6.1 2019-07-05 07:48:22 +02:00
Gabor Kiss-Vamosi
c021de5968 lv_obj_set_opa_scale: update comment 2019-07-05 07:19:09 +02:00
Gabor Kiss-Vamosi
2dce4407c7 add LV_FONT_FMT_TXT_LARGE to support very large fonts 2019-07-05 06:11:49 +02:00
embeddedt
6989a9c797 Upgrade README button example to 6.0 2019-07-04 19:05:03 -04:00
Gabor Kiss-Vamosi
471ff8a5b5 Merge pull request #1128 from littlevgl/lv_img_buf_alloc
[v6.1] Add lv_img_buf_alloc and lv_img_buf_free functions
2019-07-04 06:39:14 +02:00
Themba Dube
55740d2a96 Move lv_img_buf_get_img_size to C file instead of inlining 2019-07-03 09:47:08 -04:00
Gabor Kiss-Vamosi
6c59216b46 Replace uintptr_t with lv_uintptr_t
uintptr_t is not supported by the 16 bit PIC's compiler (e.g. dsPIC33)
2019-07-03 10:07:12 +02:00
Gabor Kiss-Vamosi
3a8a004e8b Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-07-03 06:54:15 +02:00
Gabor Kiss-Vamosi
a78d0489f5 with line draw out ouf mask test 2019-07-03 06:54:10 +02:00
embeddedt
507c220d3f Merge pull request #1131 from pabigot/pr/20190702
lv_img_cache: fix buffer overrun
2019-07-02 19:18:24 -04:00
Peter A. Bigot
f2f024b610 lv_img_cache: fix buffer overrun
Reset the cache entry, not the pointer to the cache entry.
2019-07-02 17:59:28 -05:00
Gabor Kiss-Vamosi
4f77d8fc1a Update memory usage 2019-07-03 00:46:53 +02:00
Gabor Kiss-Vamosi
3eb14e198a Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-07-03 00:14:26 +02:00
Gabor Kiss-Vamosi
63b070164f use relative include path in built-in files 2019-07-03 00:10:38 +02:00
Gabor Kiss-Vamosi
6eb9975966 add LV_LOG_LEVEL_NONE 2019-07-03 00:10:19 +02:00
Gabor Kiss-Vamosi
0f24ef3666 lv_conf_template.h updates 2019-07-03 00:05:24 +02:00
Gabor Kiss-Vamosi
50d134fa8c remove user data set get from anims to allow LV_USE_USER_DATA 0 2019-07-03 00:05:12 +02:00
embeddedt
5b9d969fa4 Fix Flash memory estimate 2019-07-02 14:34:15 -04:00
Themba Dube
27155720d5 Switch from size_t to uint32_t 2019-07-02 14:26:52 -04:00
embeddedt
90a3edd218 Fix typo in README.md 2019-07-01 21:45:40 -04:00
Themba Dube
9ad51e529e Add API for retrieving raw image bitmap size 2019-07-01 21:38:01 -04:00
embeddedt
0dde2937d7 Merge pull request #1130 from amirgon/master
Add missing gc root
2019-07-01 18:18:05 -04:00
Amir Gonnen
b0870156c8 Merge branch 'dev-6.0' 2019-07-02 00:32:36 +03:00
Amir Gonnen
f7b8e5d415 Add missing gc root 2019-07-02 00:31:50 +03:00
Gabor Kiss-Vamosi
7b0b28f5a7 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-07-01 07:08:54 +02:00
Gabor Kiss-Vamosi
38cbc2fdea Update README.md 2019-07-01 06:23:34 +02:00
Themba Dube
28e321f223 Add lv_img_buf_alloc and lv_img_buf_free functions 2019-06-30 22:05:28 -04:00
embeddedt
86c28355ab Update links in README.md 2019-06-30 09:31:01 -04:00
Gabor Kiss-Vamosi
135c119b20 img_cache: fix memset 2019-06-30 06:01:18 +02:00
Gabor Kiss-Vamosi
3e77e0de8b update version 2019-06-30 05:54:06 +02:00
Gabor Kiss-Vamosi
a77b2ab408 lv_label: fix warnings 2019-06-30 05:52:35 +02:00
Gabor Kiss-Vamosi
9af89dd1b3 send FOCUS/DEFOCUS event if it was already sent by click focus too 2019-06-30 04:54:57 +02:00
Gabor Kiss-Vamosi
3c539d5751 Merge branch 'dev-6.0' 2019-06-28 23:55:41 +02:00
Gabor Kiss-Vamosi
683545f5f0 Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-06-28 23:55:29 +02:00
Gabor Kiss-Vamosi
f91479470b lv_disp_get_hor/ver_res: fix if no disp yet 2019-06-28 22:16:11 +02:00
Gabor Kiss-Vamosi
c1072a6289 lv_chart: fix axis tick postions 2019-06-28 22:15:23 +02:00
Gabor Kiss-Vamosi
d3d83f4991 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-28 21:29:26 +02:00
Themba Dube
72cf43a176 Fix inadvertant commenting of signal 2019-06-28 08:36:53 -04:00
Gabor Kiss-Vamosi
b4dfa5678f Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-28 06:02:01 +02:00
Themba Dube
0e71a34128 Disable Doxygen preprocessing 2019-06-27 18:32:35 -04:00
Themba Dube
2ecd0c4166 Merge branch 'dev-6.0' of github.com:littlevgl/lvgl into dev-6.0 2019-06-27 18:11:19 -04:00
Themba Dube
bbc9c886c6 Update Doxygen comments 2019-06-27 18:07:26 -04:00
embeddedt
fc42d02e97 Merge pull request #1123 from amirgon/dev-6.0
[v6.0] Fix uninitialized var warning
2019-06-27 14:57:24 -04:00
Amir Gonnen
03ac0284ae Fix uninitialized var warning 2019-06-27 21:44:20 +03:00
Gabor Kiss-Vamosi
925e1f9adf update lv_conf_chechker.h 2019-06-27 18:55:37 +02:00
Gabor Kiss-Vamosi
d433114cc2 Merge branch 'dev-6.0' 2019-06-27 18:46:48 +02:00
Gabor Kiss-Vamosi
a2e6589529 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-27 18:46:36 +02:00
Gabor Kiss-Vamosi
c15f7135cd lv_conf_template.h minor fixes 2019-06-27 18:46:28 +02:00
Gabor Kiss-Vamosi
7d278b1c09 Merge pull request #1122 from averne/conf_checker_syntax
lv_conf_checker syntax changes
2019-06-27 18:41:53 +02:00
Gabor Kiss-Vamosi
0bd3a9f4d0 fix conflicts 2019-06-27 18:34:49 +02:00
Gabor Kiss-Vamosi
f8924511d6 rename LV_TASK_PRIO_LAST -> _LV_TASK_PRIO_LAST 2019-06-27 18:25:23 +02:00
averne
d8745e3050 lv_conf_checker syntax changes 2019-06-27 16:46:54 +02:00
Gabor Kiss-Vamosi
a6b81d3da8 fixes when some features are disabled 2019-06-27 08:33:14 +02:00
Gabor Kiss-Vamosi
4c85125a87 update lv_conf_template.h 2019-06-27 08:20:36 +02:00
Gabor Kiss-Vamosi
9dcc47ec33 Merge branch 'vla' into dev-6.0 2019-06-27 08:19:38 +02:00
Gabor Kiss-Vamosi
8f962a0464 run clang-formatter 2019-06-27 07:16:15 +02:00
Gabor Kiss-Vamosi
e1989c5706 minor theme updates 2019-06-26 17:51:14 +02:00
Gabor Kiss-Vamosi
e1a4590fe3 indev: don't set drag_in_prog if not moved 2019-06-26 17:51:03 +02:00
Gabor Kiss-Vamosi
ac8e4af167 Merge branch 'vla' of https://github.com/littlevgl/lvgl into vla 2019-06-26 16:56:35 +02:00
Gabor Kiss-Vamosi
d99bd91fe6 lv_draw_buf minor formatting 2019-06-26 16:56:24 +02:00
Gabor Kiss-Vamosi
b04367c702 remove all VLA and replave with lv_draw_get_buf 2019-06-26 16:53:50 +02:00
Gabor Kiss-Vamosi
47bc4c91b7 remove all VLA and replave with lv_draw_get_buf 2019-06-26 16:51:10 +02:00
Gabor Kiss-Vamosi
ce29102dcf remove 2019-06-26 16:50:10 +02:00
Gabor Kiss-Vamosi
f806f8c526 add lv_draw_free_buf 2019-06-26 15:56:41 +02:00
Gabor Kiss-Vamosi
5b150e57ab Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-26 15:45:08 +02:00
Gabor Kiss-Vamosi
977b74332c night theme update 2019-06-26 15:45:01 +02:00
Gabor Kiss-Vamosi
071bf4cc4c add lv_draw_get_buf and use it for shadow draw 2019-06-26 15:42:54 +02:00
embeddedt
25c5c54b3b Merge pull request #1118 from amirgon/dev-6.0
[v6.0] add an option to define hard coded resolution
2019-06-26 09:42:01 -04:00
embeddedt
d823194378 Merge pull request #1120 from littlevgl/revert-1115-long_txt
Revert "Long txt wrapping refactor"
2019-06-26 09:38:18 -04:00
embeddedt
cba7dfc51b Revert "Long txt wrapping refactor" 2019-06-26 09:37:39 -04:00
Gabor Kiss-Vamosi
fda41d62a1 image decoder: minor fixes 2019-06-26 14:53:01 +02:00
Gabor Kiss-Vamosi
5168b5c44f add a pixel perfect built-in font 2019-06-26 14:52:41 +02:00
Amir Gonnen
1ae0a68e55 [v6.0] add an option to define hard coded resolution 2019-06-26 01:14:38 +03:00
Gabor Kiss-Vamosi
f62f839a25 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-25 18:27:22 +02:00
Gabor Kiss-Vamosi
b71b1f1e3a strip logs at compile time 2019-06-25 18:27:10 +02:00
Gabor Kiss-Vamosi
9d6cf5d2d8 change the prefix of mem_fill_cb and mem_blend_cb to gpu_ 2019-06-25 17:57:42 +02:00
Gabor Kiss-Vamosi
08101e6d6b LV_COLOR_SCREEN_TRANSP fixes if LV_COLOR_DEPTH != 32 2019-06-25 17:41:29 +02:00
Gabor Kiss-Vamosi
cd3d7248c5 fix warnging 2019-06-25 17:14:11 +02:00
Gabor Kiss-Vamosi
721d056803 Merge pull request #1115 from joltwallet/long_txt
Long txt wrapping refactor
2019-06-25 17:13:30 +02:00
Gabor Kiss-Vamosi
5e4bd1fd0c Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-25 15:14:57 +02:00
Gabor Kiss-Vamosi
4891f803fc minor API updates 2019-06-25 15:14:47 +02:00
embeddedt
ff657882bc Fix incorrect argument order in lv_canvas_copy_buf 2019-06-25 08:21:24 -04:00
embeddedt
c54003f014 Fix spelling errors in lv_port_disp_template.c 2019-06-24 13:50:13 -04:00
Brian Pugh
f56cd37f65 long_txt: moved first letter width update to more intuitive location 2019-06-24 09:36:38 -07:00
Brian Pugh
ab4c2bcd93 long_txt fixed incorrect width calculation of break characters. 2019-06-24 09:27:19 -07:00
Gabor Kiss-Vamosi
bba22bfa55 lv_img_decoder: remove palette local variable 2019-06-24 06:48:46 +02:00
Gabor Kiss-Vamosi
00008879b7 lv_ta: modify the order of values to be compatible with spinbox 2019-06-24 06:12:31 +02:00
Gabor Kiss-Vamosi
d66ff20df5 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-24 06:04:20 +02:00
Gabor Kiss-Vamosi
b856391c96 lv_bar: comemnt updates 2019-06-24 05:59:43 +02:00
Gabor Kiss-Vamosi
d67f84bc1a img_decoder: handle error messages as placeholder. 2019-06-24 05:59:31 +02:00
Gabor Kiss-Vamosi
189ca15d7c lv_img_decoder_open: return lv_res_t, save img data in dsc 2019-06-24 05:41:49 +02:00
Brian Pugh
d85efb9926 remove debugging lines 2019-06-23 16:22:51 -07:00
Brian Pugh
a88cacb71e Restore LV_TXT_LINE_BREAK_LONG_* defines in lv_conf_template.h and checker 2019-06-23 16:21:03 -07:00
Brian Pugh
2f95d4a0ca long text comment update 2019-06-23 16:15:14 -07:00
Brian Pugh
2f5ec6befe long text wrapping cleanup 2019-06-23 16:04:17 -07:00
Brian Pugh
44b2197721 Mostly working long text; need to fix dangling newline and remove debugging code 2019-06-23 12:25:17 -07:00
Brian Pugh
3227a2c780 Merge remote-tracking branch 'origin/dev-6.0' into long_txt 2019-06-23 12:07:09 -07:00
embeddedt
7f7034f50f Fix C++ issue reported in #1113
Fix conversion from void * to structure without cast
2019-06-23 12:48:58 -04:00
Brian Pugh
58ce1460d8 Merge remote-tracking branch 'origin/dev-6.0' into long_txt 2019-06-21 19:52:45 -07:00
Gabor Kiss-Vamosi
3c2accacb6 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-22 00:46:41 +02:00
Gabor Kiss-Vamosi
cd6f99c718 update gauge draw 2019-06-22 00:46:35 +02:00
embeddedt
d79df213a1 Merge pull request #1112 from amirgon/dev-6.0
Add lv_img_cache.h to lvgl.h
2019-06-21 17:48:11 -04:00
Amir Gonnen
bc030e7a2e Add lv_img_cache.h to lvgl.h
needs to be user accessible
2019-06-22 00:45:55 +03:00
Gabor Kiss-Vamosi
65d9dc503d Merge pull request #1111 from gsar-rez/dev-6.0
lv_draw_basic: use uint16_t for letter width
2019-06-21 23:16:30 +02:00
embeddedt
1bba2a803f Merge pull request #1110 from joltwallet/cache_mk_fix
Added missing lv_img_cache.c to makefile
2019-06-21 12:37:32 -04:00
embeddedt
ce7b183f50 Fix #1109 2019-06-21 12:37:00 -04:00
Brian Pugh
8e8271ffe6 Added missing lv_img_cache.c to makefile 2019-06-21 09:33:27 -07:00
Sergey Geraskin
ecd21d512d lv_draw_basic: use uint16_t for letter width 2019-06-21 21:33:05 +05:00
Brian Pugh
76e392edd5 Merge remote-tracking branch 'origin/dev-6.0' into long_txt 2019-06-21 09:10:26 -07:00
Gabor Kiss-Vamosi
4c1dbc63d2 lv_list_add -> lv_list_add_btn, event paramter removed from lv_list/win_add_btn 2019-06-21 15:26:28 +02:00
Gabor Kiss-Vamosi
ca1f21ad04 update lv_img_cache 2019-06-20 23:14:17 +02:00
Gabor Kiss-Vamosi
a9c818a6ef use typedef lv_coord_t lv_anim_value_t in lv_anim.h 2019-06-20 18:58:53 +02:00
Gabor Kiss-Vamosi
a63c5eb968 add lv_anim_value_t to lv_conf_templ.h 2019-06-20 18:45:23 +02:00
Gabor Kiss-Vamosi
68f28d1fda add lv_img_cache 2019-06-20 18:43:03 +02:00
Brian Pugh
d25650f561 long text wordwrapping refactor 2019-06-20 08:20:45 -07:00
Gabor Kiss-Vamosi
f5de02ad5a add VALUE_CHANGE events 2019-06-20 14:28:25 +02:00
Gabor Kiss-Vamosi
7a0ccd74a8 animation warning fixes 2019-06-20 06:26:24 +02:00
Gabor Kiss-Vamosi
e72ba9f11b animation warning fixes 2019-06-20 06:20:23 +02:00
Gabor Kiss-Vamosi
d84e977218 fix callback conventions 2019-06-20 06:19:07 +02:00
embeddedt
e48e0d8026 Merge pull request #1107 from amirgon/dev-6.0
[v6.0] Remove duplicated function declarations
2019-06-19 18:11:04 -04:00
Amir Gonnen
1c0f24cfbd Remove duplicated function declarations 2019-06-20 00:12:43 +03:00
embeddedt
1b33667642 Merge pull request #1106 from joltwallet/anim_macros
Fixed compilation issues when animations are disabled
2019-06-19 13:34:41 -04:00
Themba Dube
8173c427aa Keep typedef under TYPEDEFS comment 2019-06-19 13:33:43 -04:00
Gabor Kiss-Vamosi
c630493fc0 comment update 2019-06-19 18:41:29 +02:00
Gabor Kiss-Vamosi
b0b27515bd page: scrl_def_event_cb propage less events 2019-06-19 18:41:12 +02:00
Brian Pugh
625aaa25ff Fixed compilation issues when animations are disabled 2019-06-19 09:08:47 -07:00
Gabor Kiss-Vamosi
1844d060ab minor APU updates 2019-06-19 13:43:02 +02:00
Gabor Kiss-Vamosi
d80cc562d4 minor fixes 2019-06-19 00:40:20 +02:00
Gabor Kiss-Vamosi
6cfcc3fa55 minor API changes 2019-06-19 00:35:35 +02:00
Gabor Kiss-Vamosi
b9081cacef lv_group: fix typo in comment 2019-06-18 06:08:44 +02:00
Gabor Kiss-Vamosi
c46f64c6d5 lv_img_decoder fix memory leak 2019-06-18 05:40:21 +02:00
Gabor Kiss-Vamosi
b9692ee798 add missing 'iniline' 2019-06-17 16:07:34 +02:00
Gabor Kiss-Vamosi
eacf2e5b93 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-17 16:05:38 +02:00
Gabor Kiss-Vamosi
3088849b63 minor API changes 2019-06-17 16:05:30 +02:00
Themba Dube
7fe458229d Minor fix when LV_LABEL_TEXT_SEL is 0 2019-06-16 14:41:58 -04:00
Gabor Kiss-Vamosi
abae15ab7c add '_cb' suffix to callback in lv_fs_drv_t 2019-06-16 10:01:26 +02:00
Gabor Kiss-Vamosi
51878e65dc add user data to lv_fs_drv_t 2019-06-16 09:48:41 +02:00
Gabor Kiss-Vamosi
760359fd5a lv_fs: add 'lv_fs_drv_t * drv' as first paramter to the dirver funnction 2019-06-16 09:24:10 +02:00
Gabor Kiss-Vamosi
b8c35308f2 minor fixes 2019-06-16 09:16:20 +02:00
Gabor Kiss-Vamosi
622c5deada minor fixes 2019-06-16 07:51:36 +02:00
Gabor Kiss-Vamosi
728c221986 regenerate fonts 2019-06-15 17:21:02 +02:00
Themba Dube
a92ffe7cde Fix use of NULL pointer in lv_draw_label 2019-06-14 11:34:22 -04:00
Gabor Kiss-Vamosi
5bb1653991 label hint: comments and formatting 2019-06-14 16:04:15 +02:00
Gabor Kiss-Vamosi
021420775f Merge branch 'dev-6.0' into hint 2019-06-14 15:23:34 +02:00
Gabor Kiss-Vamosi
4f07e9b4ab label hint updates 2019-06-14 15:20:46 +02:00
Gabor Kiss-Vamosi
9e34000dfc label hint updates 2019-06-14 15:15:20 +02:00
Gabor Kiss-Vamosi
10c46e73a8 label_draw hint experiments 2019-06-14 14:57:59 +02:00
Gabor Kiss-Vamosi
dd8fdafe3e lv_ta: minor fix to speed up adding texts 2019-06-14 14:26:10 +02:00
Gabor Kiss-Vamosi
89fae4458e add lv_canvas_set_palette() 2019-06-14 07:17:02 +02:00
Gabor Kiss-Vamosi
71f00017af remove LV_EVENT_SLECTED and use LV_EVENT_VALUE_CHANGED instead 2019-06-14 06:56:54 +02:00
Gabor Kiss-Vamosi
7cbc2d0e7f font_fmt_txt: cache fix 2019-06-14 06:24:02 +02:00
Gabor Kiss-Vamosi
f69dfce051 font_fmt_txt: cache the last letter and its glyph 2019-06-14 05:55:43 +02:00
Gabor Kiss-Vamosi
c52d8e8120 lv_txt: performance optimization 2019-06-14 05:47:40 +02:00
Gabor Kiss-Vamosi
0e41e9aacb simplify mem_fill 2019-06-13 19:25:23 +02:00
Gabor Kiss-Vamosi
3abcf52ad7 mbox: fix clicking with no buttons (#1101) 2019-06-13 05:13:34 +02:00
Gabor Kiss-Vamosi
bceb46b813 improve callback conventions 2019-06-12 23:10:54 +02:00
Gabor Kiss-Vamosi
ed69452c45 font: use binary search 2019-06-12 23:01:16 +02:00
Gabor Kiss-Vamosi
a2c9c72186 add LV_ANIM_ON/OFF 2019-06-11 13:51:14 +02:00
Gabor Kiss-Vamosi
56b9893854 add cppchecker script 2019-06-11 06:33:53 +02:00
Gabor Kiss-Vamosi
288b972ce0 add LV_STYLE_XXX_MAIN if an object has only one style 2019-06-11 06:33:33 +02:00
Gabor Kiss-Vamosi
857d1734fd lv_roller: fix refactoring issue 2019-06-07 14:54:19 +02:00
Gabor Kiss-Vamosi
a1d2d631f0 Merge branch 'border_styles' into dev-6.0 2019-06-07 14:52:24 +02:00
Gabor Kiss-Vamosi
8254ee6661 rename lv_obj_adjust_coords to lv_obj_get_inner_coords 2019-06-07 14:52:14 +02:00
Gabor Kiss-Vamosi
5cc1548b83 lv_coord_t: use typdef in lv_conf.h 2019-06-07 00:08:48 +02:00
Gabor Kiss-Vamosi
f2ca0b15f3 lv_coord_t: add config option in lv_conf.h 2019-06-06 23:44:30 +02:00
Gabor Kiss-Vamosi
dbb5f23cd6 lv_indev: use event instead of signal in feedback function 2019-06-06 23:42:51 +02:00
Gabor Kiss-Vamosi
23f842e462 run clag-format 2019-06-06 06:05:40 +02:00
Gabor Kiss-Vamosi
dba4cebfea fix warnings 2019-06-06 06:04:15 +02:00
Gabor Kiss-Vamosi
81729dfd51 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-06 05:55:29 +02:00
Gabor Kiss-Vamosi
48e1efb6ef font folder restructure and makefile fixes 2019-06-06 05:55:17 +02:00
embeddedt
9396b097ab Minor fixes for Micropython binding (#1094)
* Enable/disable font declarations according to font macros
* Updated sed line which generates _LV_STR enum for Micropython binding
2019-06-05 19:06:58 -04:00
Amir Gonnen
b4d54c71d3 small fixes
Enable/disable font declarations according to font macros. This is required for Micropython otherwise we would get a declaration with a missing definition.

Updated sed line which generates _LV_STR enum for Micropython binding
2019-06-06 01:11:30 +03:00
Gabor Kiss-Vamosi
9139b58abc lv_draw_rect: fix underlow on border width 2019-06-05 18:36:38 +02:00
Gabor Kiss-Vamosi
0ef39ed144 lv_conf_template: formatting 2019-06-05 15:23:16 +02:00
Gabor Kiss-Vamosi
b29c84cc88 Merge branch 'font' of https://github.com/littlevgl/lvgl into dev-6.0 2019-06-05 15:19:12 +02:00
Gabor Kiss-Vamosi
3a2def1e76 font: update lv_conf_template.h 2019-06-05 15:16:51 +02:00
Gabor Kiss-Vamosi
62c531eec3 font: fix glyph_ids_size usage 2019-06-05 12:28:31 +02:00
Gabor Kiss-Vamosi
c54d2d2fd7 add built in fonts 2019-06-05 12:25:49 +02:00
Gabor Kiss-Vamosi
e01577845a draw tri: fix pixel overwrite with oapcity (from #1091) 2019-06-04 15:20:22 +02:00
Gabor Kiss-Vamosi
e8c14961df font: use .list_length property 2019-06-03 00:55:59 +02:00
Gabor Kiss-Vamosi
b0de5b9c0d update built in font converter 2019-06-02 23:27:27 +02:00
Gabor Kiss-Vamosi
33bb0d8004 calnvas: create draw function which uses lv_draw_... function 2019-06-02 20:35:33 +02:00
Gabor Kiss-Vamosi
366698bba3 font: add user data 2019-06-02 14:18:21 +02:00
Gabor Kiss-Vamosi
ff65ecd102 add a default font 2019-06-02 11:57:01 +02:00
Themba Dube
4075a7adfc Roller: do not draw rectangle highlight on borders 2019-06-01 21:37:25 -04:00
Themba Dube
ca01b558f7 Add lv_obj_adjust_coords() API for finding the object's "client area" 2019-06-01 21:37:04 -04:00
Gabor Kiss-Vamosi
f692e00ffe Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into font 2019-06-01 21:46:12 +02:00
Gabor Kiss-Vamosi
30419b3881 letter_draw: support bitmap stream 2019-06-01 21:46:05 +02:00
Gabor Kiss-Vamosi
a94866a115 font: update sample font 2019-05-31 18:52:32 +02:00
Gabor Kiss-Vamosi
df4aecc4c2 font: update sample font 2019-05-31 18:52:19 +02:00
Gabor Kiss-Vamosi
2dfaef4668 font: add LV_ATTRIBUTE_LARGE_CONST for bitmap 2019-05-31 16:42:14 +02:00
Gabor Kiss-Vamosi
23dc884f35 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-31 08:48:42 +02:00
Gabor Kiss-Vamosi
cd8bfa49e2 ta: fix cursor bilnk and password show time 2019-05-31 08:48:36 +02:00
Gabor Kiss-Vamosi
cf124e60ad use optimized triangle drawing if no opacity 2019-05-31 07:51:18 +02:00
Gabor Kiss-Vamosi
7884636b7c add triange optimization option 2019-05-31 07:40:09 +02:00
Gabor Kiss-Vamosi
8c6ef82947 Merge branch 'dev-6.0' into tri 2019-05-31 06:42:05 +02:00
Gabor Kiss-Vamosi
23e7e4e8e2 font: fix generated font file 2019-05-31 05:34:44 +02:00
Gabor Kiss-Vamosi
56d7b986d4 font: save the original generated font 2019-05-31 05:21:27 +02:00
embeddedt
f173875310 Fix bug related to allocation size in lv_img_decoder.c 2019-05-30 10:05:02 -04:00
Gabor Kiss-Vamosi
4cffb73357 font: start to inegrate 2019-05-29 06:40:19 +02:00
Gabor Kiss-Vamosi
b174398cb5 merge new font API 2019-05-29 05:31:03 +02:00
Gabor Kiss-Vamosi
7189a60866 font: use a common list length in the arrays of cmaps 2019-05-28 12:53:19 +02:00
Gabor Kiss-Vamosi
d94075ac92 font: add unicode_list_length and glyph_id_ofs_list_length 2019-05-28 12:10:50 +02:00
Gabor Kiss-Vamosi
0acabe460c font: add new types 2019-05-28 08:46:43 +02:00
Gabor Kiss-Vamosi
a5bbb5e651 font: add cmap type 2019-05-28 08:06:15 +02:00
Gabor Kiss-Vamosi
005a7954ca font: remove unicode_first/last 2019-05-28 07:57:22 +02:00
Gabor Kiss-Vamosi
bf667f747b font: remove box_x_ofs_min/max 2019-05-27 15:26:09 +02:00
Gabor Kiss-Vamosi
0aeff32442 font: fix comment for kern format 2019-05-27 15:13:59 +02:00
Gabor Kiss-Vamosi
5ebed4f24e anim: minor updates 2019-05-27 15:10:15 +02:00
Gabor Kiss-Vamosi
eba910be40 font: use signed types for kern values 2019-05-27 06:20:48 +02:00
Gabor Kiss-Vamosi
b6a86f31d7 update lv_anim.h 2019-05-27 05:47:59 +02:00
Gabor Kiss-Vamosi
d1e59483b4 update lv_anim.h 2019-05-27 05:46:19 +02:00
Gabor Kiss-Vamosi
f2afc18d6b anim: combint var and exec_cb set into lv_anim_set_var_and_cb 2019-05-27 05:42:34 +02:00
Gabor Kiss-Vamosi
72347d4bc1 remove LV_FONT_X4_SET 2019-05-26 19:31:01 +02:00
Gabor Kiss-Vamosi
1ed8207b5c font: add LV_FONT_X4_SET 2019-05-25 19:46:04 +02:00
Gabor Kiss-Vamosi
ceff78476b font: improve templates 2019-05-25 19:32:21 +02:00
Gabor Kiss-Vamosi
62ffe5ab94 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-25 17:05:49 +02:00
Gabor Kiss-Vamosi
d2e28abb79 indev: fix typo 2019-05-25 17:05:38 +02:00
Gabor Kiss-Vamosi
6093053240 lv_style_anim_get_user_data_ptr: fix recusrive call 2019-05-25 17:05:13 +02:00
Gabor Kiss-Vamosi
7cfbf5ed64 Merge pull request #1082 from amirgon/dev-6.0
Replace * by [] to pass array argument
2019-05-25 17:02:52 +02:00
Gabor Kiss-Vamosi
01f990061f indev inactivity: check encoder diff too 2019-05-25 16:53:56 +02:00
Gabor Kiss-Vamosi
b0fffaa55b LV_COLOR_TRANSP, LV_TA_CURSOR_BLINK_TIME and LV_TA_PWD_SHOW_TIME run time configurable 2019-05-25 16:27:36 +02:00
Amir Gonnen
2c7cdea1ee Replace * by [] to pass array argument
As discussed on #935 https://github.com/littlevgl/lvgl/issues/935#issuecomment-481550697
2019-05-25 16:43:57 +03:00
Gabor Kiss-Vamosi
5ef94e395d add font template 2019-05-24 14:31:20 +02:00
Gabor Kiss-Vamosi
6bde219324 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-24 06:27:14 +02:00
Gabor Kiss-Vamosi
d3d9fde245 unify lv_obj_..._ext_click_area... API 2019-05-24 06:26:56 +02:00
Gabor Kiss-Vamosi
225c2f727c improve font template 2019-05-24 06:24:31 +02:00
embeddedt
a3e88e1ecd Update lv_btnm_set_one_toggle docs (#1079) 2019-05-23 10:42:45 -04:00
Gabor Kiss-Vamosi
0f1e260155 LV_CHART_TYPE_AREA fixes 2019-05-22 06:34:14 +02:00
Gabor Kiss-Vamosi
8efb91d51d Merge branch 'joltwallet-func_cast_warn_fix' into dev-6.0 2019-05-21 15:56:34 +02:00
Gabor Kiss-Vamosi
5803fa6214 indev: minor fix 2019-05-21 15:56:27 +02:00
Gabor Kiss-Vamosi
9cb633981f Merge branch 'func_cast_warn_fix' of https://github.com/joltwallet/lvgl into joltwallet-func_cast_warn_fix 2019-05-21 15:53:48 +02:00
Gabor Kiss-Vamosi
d066004783 Merge pull request #1072 from joltwallet/indev_focus_fix
Indev focus fix
2019-05-21 15:52:24 +02:00
Gabor Kiss-Vamosi
5652a163c5 indev: use indev_obj_act for pointers too 2019-05-21 15:49:50 +02:00
Gabor Kiss-Vamosi
f42e6b82c4 Merge branch 'indev_focus_fix' of https://github.com/joltwallet/lvgl into joltwallet-indev_focus_fix 2019-05-21 15:29:42 +02:00
Brian Pugh
6212d0a507 lv_style.c change int16_t to lv_anim_value_t in animation exec cb 2019-05-20 18:38:24 -07:00
Brian Pugh
cd1ad6eb3a Wrapped remaining animation and edge_flash references in #if LV_USE_ANIMATION to save memory/space 2019-05-20 18:31:47 -07:00
Brian Pugh
cbb9c3f73b Fixed syntax error in lv_bar.c when animations are disabled 2019-05-20 10:04:36 -07:00
Brian Pugh
40576b5445 indev.c/h: Replaced CHECK_INDEV_RESET macro with function 2019-05-20 09:52:18 -07:00
Brian Pugh
9b38d455ab renamed indev_obj_focused to indev_obj_act. Improved related documentation/formatting 2019-05-20 09:42:31 -07:00
Brian Pugh
3cc2043fd7 fixed lv_ta.c anim type mismatch 2019-05-20 09:32:13 -07:00
Brian Pugh
a6f0afde4c change some int16_t types to lv_anim_value_t for animation functions. use LV_USE_ANIMATION macros to remove unused variables when animation capabilities is disabled 2019-05-20 09:22:09 -07:00
Gabor Kiss-Vamosi
ba3e7d1da6 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-20 15:52:22 +02:00
Gabor Kiss-Vamosi
9d70ccc226 fix typo 2019-05-20 15:51:31 +02:00
embeddedt
22c2bc4453 Do not return non-void value in lv_style_anim_create 2019-05-20 07:50:39 -04:00
Gabor Kiss-Vamosi
0d2b61f0f3 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-20 12:12:06 +02:00
Gabor Kiss-Vamosi
45a29c1b88 fix typo 2019-05-20 12:11:59 +02:00
Gabor Kiss-Vamosi
1c2d71a0f8 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-20 07:20:54 +02:00
Gabor Kiss-Vamosi
ba9f0cf9bb chart COLUMN draw speed optmize 2019-05-20 07:19:00 +02:00
Gabor Kiss-Vamosi
fd834ae60f Merge pull request #1071 from ali-rostami/patch-2
defining lv_group_remove_all_objs
2019-05-20 06:45:32 +02:00
Gabor Kiss-Vamosi
e8605a52ed font: update fmt_txt 2019-05-20 06:40:00 +02:00
Brian Pugh
7bbe91512a indev.c: indev_obj_focused initial commit to correctly reset indev query when a callback changed the currently focused object and deletes the old one. Only tested on keypad indev, other indev types may need a similar fix re-using the indev_obj_focused variable 2019-05-19 10:56:34 -07:00
Ali Rostami
aed05f26e4 Update src/lv_core/lv_group.h
Co-Authored-By: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2019-05-19 13:55:34 +04:30
Ali Rostami
87979b5645 Update src/lv_core/lv_group.c
Co-Authored-By: Gabor Kiss-Vamosi <kisvegabor@gmail.com>
2019-05-19 13:55:24 +04:30
Gabor Kiss-Vamosi
22195f3455 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-19 11:04:03 +02:00
Gabor Kiss-Vamosi
b0a4fd7dad calendar: optimize cover check in the design function 2019-05-19 10:56:21 +02:00
Gabor Kiss-Vamosi
b6d24040bf font thinking 2019-05-19 10:51:20 +02:00
Gabor Kiss-Vamosi
0be212c26c Merge pull request #1068 from amirgon/dev-6.0
Add missing 'log level' argument to log callback
2019-05-19 10:37:47 +02:00
Ali Rostami
90b8bc9597 declaring the lv_group_remove_all_objs function. 2019-05-19 10:03:57 +04:30
Ali Rostami
8c5c8ed82a defining lv_group_remove_all_objs
`lv_group_remove_all_objs` is a function for removing all objects from a group and making it free of objects.
2019-05-19 10:00:59 +04:30
Brian Pugh
f28efdd9f3 Change int32_t to int16_t in animation functions to fix warnings 2019-05-18 18:14:21 -07:00
embeddedt
62ea055785 Merge pull request #1067 from joltwallet/anim_guard_fix
Fix LV_OBJX_DEF_ANIM_TIME guards
2019-05-18 19:26:34 -04:00
Amir Gonnen
89a2856d6e Add missing 'log level' argument to log callback 2019-05-18 22:54:10 +03:00
Brian Pugh
80760c4669 Fix LV_OBJX_DEF_ANIM_TIME guards 2019-05-18 11:44:50 -07:00
embeddedt
b1622166b4 Merge pull request #1066 from amirgon/dev-6.0
Fixed include path. Fixed typos
2019-05-18 08:38:12 -04:00
Gabor Kiss-Vamosi
f7bc8c2328 theme: update group styles in lv_theme_set_current 2019-05-18 14:03:44 +02:00
Gabor Kiss-Vamosi
83d64fed42 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-18 13:48:37 +02:00
Gabor Kiss-Vamosi
234fa34254 add lv_log_print_g_cb_t 2019-05-18 13:48:27 +02:00
Gabor Kiss-Vamosi
d8edbb8a41 minor formatting 2019-05-18 13:48:13 +02:00
Gabor Kiss-Vamosi
077a645a92 font: add kerning tables 2019-05-18 13:39:44 +02:00
Gabor Kiss-Vamosi
432e87bfdf minor formatting 2019-05-18 11:21:20 +02:00
Gabor Kiss-Vamosi
f16561295b add LV_EVENT_CB_DECLARE 2019-05-18 11:21:16 +02:00
Gabor Kiss-Vamosi
d197ae53e5 Merge pull request #1061 from joltwallet/count_children_recursive
lv_obj_count_children_recursive
2019-05-18 09:48:41 +02:00
Amir Gonnen
42b546a6d7 Fixed include path. Fixed typos 2019-05-18 01:31:29 +03:00
embeddedt
eb1e28e1f5 Merge pull request #1065 from joltwallet/lv_img_decoder_no_fs
lv_img_decoder.c Wrap filesystem calls in LV_USE_FILESYSTEM macro
2019-05-17 12:44:17 -04:00
Brian Pugh
cb6a4527a9 lv_img_decoder.c Wrap filesystem calls in LV_USE_FILESYSTEM macro 2019-05-17 09:12:30 -07:00
Brian Pugh
2f4654b009 Merge remote-tracking branch 'origin/dev-6.0' into count_children_recursive 2019-05-17 08:47:18 -07:00
Gabor Kiss-Vamosi
ca19c7d92f minor formatting 2019-05-17 16:59:12 +02:00
Gabor Kiss-Vamosi
1ef0c197cd built-in img decodder read line bug fix 2019-05-17 09:03:53 +02:00
Gabor Kiss-Vamosi
b842db91aa lv_ll_move_before: bugfix 2019-05-17 08:42:28 +02:00
Gabor Kiss-Vamosi
1f334ba88b mbox: close anim bugfix 2019-05-17 08:29:51 +02:00
Gabor Kiss-Vamosi
c136382be3 add lv_task_create_basic 2019-05-17 08:29:38 +02:00
Gabor Kiss-Vamosi
e525c08a0c rename lv_anim_del_custom to lv_anim_custom_del 2019-05-17 08:01:22 +02:00
Gabor Kiss-Vamosi
b926fd4966 add lv_task_set_cb 2019-05-17 07:58:47 +02:00
Gabor Kiss-Vamosi
4c623cae44 add lv_anim_del_custom 2019-05-17 07:50:00 +02:00
Gabor Kiss-Vamosi
c5ba739627 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-17 07:40:10 +02:00
Gabor Kiss-Vamosi
e421e08c2f remove unused lv_img_decoder_set_custom 2019-05-17 07:39:56 +02:00
embeddedt
bd15b805db Apply fix from #1064 to dev-6.0
Fix mixup of SB and SCRL styles in lv_list_get_style
2019-05-16 19:42:50 -04:00
Gabor Kiss-Vamosi
322211b1ed Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-16 15:31:17 +02:00
Gabor Kiss-Vamosi
04df148f0c add comments to lv_img_decoder 2019-05-16 15:30:52 +02:00
Gabor Kiss-Vamosi
c1b8c2f522 imgbtn: follow image decder changes 2019-05-16 10:27:45 +02:00
Gabor Kiss-Vamosi
6cba2fbab0 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-15 18:58:13 +02:00
Gabor Kiss-Vamosi
5a712931ef lv_page: fix vertical scrollbar position 2019-05-15 18:58:01 +02:00
Gabor Kiss-Vamosi
de824833a0 remove LV_USE_USER_DATA_SINGE to LV_USE_USER_DATA 2019-05-15 18:51:31 +02:00
Gabor Kiss-Vamosi
78c527ee4f remove LV_USE_USER_DATA_MULTI 2019-05-15 18:50:38 +02:00
Gabor Kiss-Vamosi
c46ff018ed Merge branch 'imgdec' into dev-6.0 2019-05-15 18:41:42 +02:00
Gabor Kiss-Vamosi
862a4c3496 Merge branch 'anim' into dev-6.0 2019-05-15 18:39:17 +02:00
Gabor Kiss-Vamosi
569bbdf058 remove lv_style_anim_t and replace it with simply lv_anim_t 2019-05-15 18:27:26 +02:00
Gabor Kiss-Vamosi
648d42ec94 fix screen copy 2019-05-15 07:36:13 +02:00
Gabor Kiss-Vamosi
6a265896a2 fix screen copy 2019-05-15 07:34:19 +02:00
Gabor Kiss-Vamosi
eebe04bd95 lv_key_t: fix format 2019-05-15 06:46:27 +02:00
Gabor Kiss-Vamosi
fe8157cc88 add LV_EVENT_KEY 2019-05-15 06:43:16 +02:00
Gabor Kiss-Vamosi
5af101a1eb add inline anim set functions 2019-05-15 06:15:12 +02:00
Gabor Kiss-Vamosi
e31b6a156e move lv_img_decoder to lv_draw 2019-05-15 05:22:03 +02:00
Gabor Kiss-Vamosi
f706de5517 img_decoder is working (not fully tested yet) 2019-05-14 15:45:03 +02:00
Gabor Kiss-Vamosi
72fb15c3fb comment updates 2019-05-14 07:19:56 +02:00
Gabor Kiss-Vamosi
5afe9c119a lv_indev fix 2019-05-14 07:19:00 +02:00
Gabor Kiss-Vamosi
3a78360b62 lv_indev: do not leave edit mode manually on POINTER release 2019-05-14 06:47:30 +02:00
Gabor Kiss-Vamosi
d58c8663d4 start to reqork the image decoder interface 2019-05-14 06:34:20 +02:00
Brian Pugh
85ead39b6a initial commit of lv_obj_count_children_recursive and of lv_ll_get_len 2019-05-13 09:06:01 -07:00
Gabor Kiss-Vamosi
a3bfdb240e define LV_KEY_... as enum 2019-05-13 05:50:27 +02:00
Gabor Kiss-Vamosi
7f30fb0058 font update 2019-05-11 07:58:37 +02:00
Gabor Kiss-Vamosi
1489629b61 ddlist and roller: fix to save the selected option by encoder 2019-05-10 15:12:41 +02:00
Gabor Kiss-Vamosi
77d43069e0 Merge pull request #951 from ali-rostami/master
add LV_CHART_MODE_CIRCULAR feature to chart objects.
2019-05-10 14:58:20 +02:00
Gabor Kiss-Vamosi
5b1f0caa8d Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-10 07:42:17 +02:00
Gabor Kiss-Vamosi
1cd4ac4aef clag-format: incraese ColumnLimit to 120 2019-05-10 07:42:08 +02:00
Gabor Kiss-Vamosi
8b29a88b58 lv_btn: fix warning 2019-05-10 07:41:32 +02:00
Gabor Kiss-Vamosi
3079d2c6e6 Merge pull request #1058 from joltwallet/user_data_ptr
lv_obj_get_user_data_ptr
2019-05-09 20:02:23 +02:00
Brian Pugh
7631d41c88 lv_obj_user_data_ptr initial commit. Also deleted an unused variable in lv_indev to prevent compiler warnings 2019-05-09 09:02:11 -07:00
Gabor Kiss-Vamosi
523170297e fix a bug in rendering order (scrollbar coverd sibling obejcts too) 2019-05-09 15:55:01 +02:00
Ali Rostami
0442ffe6cb keep the pressed_date after release
we shouldn't lose the pressed_date after the release and press lost
2019-05-09 10:21:50 +04:30
Gabor Kiss-Vamosi
aa4897cdc5 minor fixes 2019-05-09 06:38:25 +02:00
Gabor Kiss-Vamosi
512eb05a22 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-09 06:04:54 +02:00
Gabor Kiss-Vamosi
424bff48f5 lv_obj_move_fore/background: move only if not there now 2019-05-09 06:04:45 +02:00
Gabor Kiss-Vamosi
c31ab099f7 add MASK_AREA_DEBUG option 2019-05-09 06:04:03 +02:00
Gabor Kiss-Vamosi
0f6f2accb6 draw_triange/line optimization: return if the coords are out of the mask 2019-05-09 06:03:25 +02:00
Gabor Kiss-Vamosi
1ddf659631 indev encoder: fix when an object is deleted in the event function 2019-05-08 16:08:05 +02:00
Gabor Kiss-Vamosi
861e090023 minor fixes 2019-05-08 12:04:02 +02:00
Gabor Kiss-Vamosi
e7e24697ea Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-05-07 12:15:14 +02:00
Gabor Kiss-Vamosi
0b31110d3e minor fixes 2019-05-07 12:15:02 +02:00
Gabor Kiss-Vamosi
be84581bbc lv_anim: add typedef int16_t lv_anim_value_t 2019-05-07 06:30:38 +02:00
Gabor Kiss-Vamosi
45c4970fc6 letter draw optimization 2019-05-07 05:40:01 +02:00
Gabor Kiss-Vamosi
1a70d98ba4 lv_roller: fix if clikced while animated 2019-05-04 07:53:31 +02:00
Gabor Kiss-Vamosi
f4c0055c5a add lv_obj_move_foreground/background 2019-05-03 19:25:58 +02:00
Gabor Kiss-Vamosi
18d59bef01 add lv_font_dummy.h to comment on it 2019-05-03 17:03:37 +02:00
Gabor Kiss-Vamosi
f6c60b8204 lv_draw_letter: fix coloe of pixelswith LV_OPA_COVER and LV_OPA_TRANSP 2019-05-03 15:43:56 +02:00
Gabor Kiss-Vamosi
73ef86f9a9 lv_obj_del: fix 2019-05-03 15:22:59 +02:00
Gabor Kiss-Vamosi
0c7d9b96f7 font: minor formatting 2019-05-01 18:10:44 +02:00
Gabor Kiss-Vamosi
469157ebd9 font: update kern space format 2019-05-01 18:08:56 +02:00
Gabor Kiss-Vamosi
cc97e114c2 font: add comments 2019-05-01 17:44:22 +02:00
Gabor Kiss-Vamosi
864c970ba3 font: add kerning support 2019-05-01 16:43:32 +02:00
Gabor Kiss-Vamosi
ed1632f464 Merge branch 'dev-6.0' into font 2019-04-30 15:04:06 +02:00
Gabor Kiss-Vamosi
b7850e2584 fix warnings 2019-04-30 15:03:52 +02:00
Gabor Kiss-Vamosi
9f216a55be event: make delete in event more stabile 2019-04-28 21:53:14 +02:00
Gabor Kiss-Vamosi
1e4fd8fdfb event fixes: crashed when the obj was deleted in nested events 2019-04-28 17:26:18 +02:00
Gabor Kiss-Vamosi
12ee3b3504 kb: set default height to parent size / 2 2019-04-27 20:15:55 +02:00
Gabor Kiss-Vamosi
d8a17c483a font: separate int. and fract. advanced width 2019-04-27 19:43:10 +02:00
Gabor Kiss-Vamosi
c7e6af03e6 Merge branch 'dev-6.0' into font 2019-04-27 19:37:24 +02:00
Gabor Kiss-Vamosi
cc48391333 font: remove monospace 2019-04-27 19:37:19 +02:00
Gabor Kiss-Vamosi
0892cbadc4 kb: set the size to screen by default 2019-04-27 19:26:49 +02:00
Gabor Kiss-Vamosi
5243d235a6 lv_task: add user data and pass lv_task_t as task_cb parameter 2019-04-27 11:32:13 +02:00
Gabor Kiss-Vamosi
15c27c8a9b kb: event fix 2019-04-27 11:01:14 +02:00
Gabor Kiss-Vamosi
630199d9a3 kb: event fix 2019-04-27 10:59:22 +02:00
Gabor Kiss-Vamosi
b623eabb0a font: ignore glyphs with NULL dsc 2019-04-27 10:58:34 +02:00
Gabor Kiss-Vamosi
5321b9b62e make the basics of the new font system work 2019-04-24 17:28:38 +02:00
Gabor Kiss-Vamosi
926490502b Merge branch 'dev-6.0' into font 2019-04-24 14:51:11 +02:00
Gabor Kiss-Vamosi
8dc2b36bf7 lv_canvas_mult_buf: fix with LV_COLOR_16_SWAP 2019-04-24 06:26:03 +02:00
Gabor Kiss-Vamosi
4b657eb07b rename LV_TXT_ENC_ISO8859-1 to ..._ASCII 2019-04-24 06:13:50 +02:00
Gabor Kiss-Vamosi
2edf8f4aab font rework 2019-04-24 05:44:15 +02:00
Gabor Kiss-Vamosi
dc9f8baf0e fix conflicts 2019-04-23 15:59:10 +02:00
Gabor Kiss-Vamosi
4e6aac2157 font rework 2019-04-23 15:56:59 +02:00
Gabor Kiss-Vamosi
1e5f690a45 lv_txt: do not call lv_font_get_width twice 2019-04-23 15:09:37 +02:00
Gabor Kiss-Vamosi
514e2baaca make user data and callback name more consistent (Fixes #1036) 2019-04-23 14:56:40 +02:00
Ali Rostami
d7661e8bbc minor fixes 2019-04-23 09:51:14 +04:30
Gabor Kiss-Vamosi
abd081da30 add LV_TXT_ENC to lv_conf.h and ISO8859-1 support 2019-04-23 06:42:26 +02:00
Gabor Kiss-Vamosi
9cd7de8ccd Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-23 05:59:46 +02:00
Gabor Kiss-Vamosi
5e60002a9b lv_win: remove unused header style (Fixes #1041) 2019-04-23 05:59:19 +02:00
embeddedt
3860c115d4 Merge pull request #1042 from amirgon/dev-6.0
fix lv_conf.h include
2019-04-22 15:40:00 -04:00
Amir Gonnen
4a663c42d4 fix lv_conf.h include 2019-04-22 21:49:22 +03:00
embeddedt
2fbc082633 Merge pull request #1039 from seyyah/patch-1
Add lv_anim_user_data_t
2019-04-22 09:51:24 -04:00
seyyah
ca19f8f4ff Add lv_anim_user_data_t
May be related to: Commit - [add user data where is was missing](e2cfba7c9f)
2019-04-22 16:14:29 +03:00
Gabor Kiss-Vamosi
9e3162080f ddlist and roller fixes 2019-04-22 10:17:21 +02:00
Gabor Kiss-Vamosi
56fcd2d151 fix memory corruptions due to animation audates 2019-04-22 09:20:04 +02:00
Gabor Kiss-Vamosi
e2cfba7c9f add user data where is was missing 2019-04-22 08:45:07 +02:00
Gabor Kiss-Vamosi
2d5183b05d lv_kb: make controll buttons work on click instead of press 2019-04-22 06:00:50 +02:00
Gabor Kiss-Vamosi
4b43adaad1 lv_conf_template.h and lv_conf_checker.h update 2019-04-22 05:50:24 +02:00
Gabor Kiss-Vamosi
b4a632116e Merge pull request #1027 from seyyah/dev-6.0
Added tab button position LEFT and RIGHT
2019-04-22 05:47:03 +02:00
Gabor Kiss-Vamosi
ac89e880a7 font: start to rework 2019-04-22 05:21:49 +02:00
embeddedt
c9c635ca3a Merge pull request #1037 from joltwallet/aa
Fix Antialiasing compiler warning
2019-04-21 08:56:29 -04:00
Brian Pugh
e49de22941 lv_draw_line: Fixed a warning by wrapping unused antialiasing variables in LV_ANTIALIAS 2019-04-20 18:34:56 -07:00
embeddedt
9c708d6f4d Merge pull request #1032 from littlevgl/t_minor_fixes
Minor fixes for compiler warnings/-Werrors
2019-04-20 09:09:06 -04:00
Themba Dube
e9d2191463 Remove lv_area_ext_is_point_on 2019-04-20 09:07:54 -04:00
Themba Dube
95fc629aa5 Rename "dot" union in lv_label 2019-04-20 09:05:36 -04:00
Gabor Kiss-Vamosi
8675a345b4 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-20 06:37:24 +02:00
Gabor Kiss-Vamosi
b5898a750e ddlist: fiy scrollable width 2019-04-20 06:37:06 +02:00
Gabor Kiss-Vamosi
1b1df9f931 Merge pull request #1030 from upbeat27/ddlist_fix
ddlist: fix animation complete not always clearing selection highlight
2019-04-20 06:29:12 +02:00
Gabor Kiss-Vamosi
755f68c87b remove HOVER events 2019-04-20 06:24:00 +02:00
Gabor Kiss-Vamosi
cdb6f1fdd7 lv_btnm: add comments 2019-04-20 06:04:38 +02:00
Themba Dube
d6ef684867 Fix accidental removal of newlines from lv_conf_template.h 2019-04-19 15:23:41 -04:00
Themba Dube
7419900508 Minor fixes for compiler warnings/-Werrors 2019-04-19 15:20:51 -04:00
seyyah
4454683ff0 FIXME note added 2019-04-19 11:35:02 +03:00
Gabor Kiss-Vamosi
5353dae027 lv_kb: fix sending APPLY and CANCEL events 2019-04-19 07:37:57 +02:00
Gabor Kiss-Vamosi
850693a840 ddlist label align fixes 2019-04-19 07:28:48 +02:00
Gabor Kiss-Vamosi
9fc1423ef7 ddlist: fix setting of width settings 2019-04-19 07:15:39 +02:00
Gabor Kiss-Vamosi
a983dfa80a lv_tabview: realaign the tabview on every new tab 2019-04-19 06:40:06 +02:00
Gabor Kiss-Vamosi
5d65def464 Merge branch 'dev-6.0' of https://github.com/seyyah/lvgl into seyyah-dev-6.0 2019-04-19 06:25:43 +02:00
Gabor Kiss-Vamosi
0ad121865c lv_page: improve repostion of new children 2019-04-19 06:10:01 +02:00
Gabor Kiss-Vamosi
8f7e01fc1a add reserved bits to lv_obj_t 2019-04-19 05:57:05 +02:00
Gabor Kiss-Vamosi
82c57e0ceb Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-19 05:46:13 +02:00
Gabor Kiss-Vamosi
a2cb299c0c add LV_EVENT_DELETE 2019-04-19 05:46:02 +02:00
Gabor Kiss-Vamosi
702ca86879 Merge pull request #1020 from joltwallet/ram_optim
RAM optimizations
2019-04-19 05:45:13 +02:00
Gabor Kiss-Vamosi
beeedfc1b2 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-19 05:32:31 +02:00
Gabor Kiss-Vamosi
dfb12a31f9 send DRAG_BEGINT/END events 2019-04-19 05:32:21 +02:00
Gabor Kiss-Vamosi
a3c08e9985 Merge pull request #1019 from canardos/dev-6.0
add lv_obj_set_user_data function
2019-04-19 05:21:42 +02:00
Josh
b477a14fdf ddlist: fix animation issues
The wrong animation function was used for the delete, and so the animation was never deleted.
Must force animation callback on delete, so that the correct selection highlighting is shown.
2019-04-18 12:26:40 -07:00
Josh
2abf55f4c4 ddlist: fix animation complete not always clearing selection highlight 2019-04-18 10:46:16 -07:00
Themba Dube
d0550b7feb Include lv_conf.h in lv_area.h 2019-04-18 13:03:13 -04:00
Themba Dube
1181c07b76 Merge branch 'dev-6.0' of github.com:littlevgl/lvgl into dev-6.0 2019-04-18 11:36:30 -04:00
Themba Dube
6446f78aeb Fix uniniitalized variable during display initialization (detected by Valgrind) 2019-04-18 11:35:57 -04:00
seyyah
a9036eb6b1 Tab button position LEFT and RIGHT: indic consistency 2019-04-18 18:28:15 +03:00
seyyah
b75688b317 Merge branch 'dev-6.0' of github.com:seyyah/lvgl into dev-6.0 2019-04-18 18:00:26 +03:00
seyyah
857a4e1406 Added tab button position LEFT and RIGHT 2019-04-18 18:00:11 +03:00
Gabor Kiss-Vamosi
ad1162922f Merge pull request #1026 from upbeat27/dev-6.0
lv_group: fix lv_group_del not removing group from the group linked list
2019-04-18 09:51:33 +02:00
canardos
5a88709a5c Change assignment to memcpy 2019-04-18 14:12:30 +08:00
Gabor Kiss-Vamosi
41fc80e96b text_sel: minor fixes and renames 2019-04-18 07:11:43 +02:00
Gabor Kiss-Vamosi
9a711d9e88 add LV_LABEL_TEXT_SEL_OFF 0xFFFF 2019-04-18 06:45:45 +02:00
Gabor Kiss-Vamosi
cf21115029 triangle drawing optimzation 2019-04-18 05:58:09 +02:00
Josh
84d79bcf56 lv_group: fix lv_group_del not removing group from the group linked list 2019-04-17 16:00:31 -07:00
Gabor Kiss-Vamosi
2e0c8ca8f5 Merge branch 'dev-6.0' into tri 2019-04-17 15:15:23 +02:00
Gabor Kiss-Vamosi
1ba23100f6 update lv_conf_checker.h 2019-04-17 15:14:54 +02:00
Gabor Kiss-Vamosi
b9af3b0383 triangle draw optimization test 2019-04-17 15:14:09 +02:00
Gabor Kiss-Vamosi
6148d498a9 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-17 15:00:45 +02:00
Gabor Kiss-Vamosi
0811096f21 lv_mem: fix comment typos 2019-04-17 15:00:31 +02:00
Gabor Kiss-Vamosi
de0037e7fe Merge pull request #1023 from joltwallet/lv_label_anim
lv_label pause at beginning of LV_LABEL_LONG_ROLL animation.
2019-04-17 06:13:45 +02:00
Brian Pugh
ff6b6725a5 lv_label: Added initial delay to LV_LABEL_LONG_ROLL_CIRC 2019-04-16 08:50:35 -07:00
Brian Pugh
d7b193d3fc lv_label: change to . Repeated header documentation in c file. 2019-04-15 22:03:12 -07:00
BrianPugh
c401481509 lv_obj.h re-added missing #if LV_USE_OBJ_REALIGN in lv_obj_t 2019-04-15 21:55:22 -07:00
Brian Pugh
eb70f39e42 lv_label pause at beginning of LV_LABEL_LONG_ROLL animation. Also expose the pause amount to lv_conf 2019-04-15 18:08:54 -07:00
BrianPugh
2c5b3fe223 Merge branch 'dev-6.0' into ram_optim 2019-04-15 07:56:08 -07:00
Gabor Kiss-Vamosi
619403ce48 Merge pull request #996 from GreyMS/dev-6.0
Realization of extended clickable area.
2019-04-15 16:08:59 +02:00
Brian Pugh
b3f60153cf lv_label: fixed missing dot_tmp_alloc copy on create 2019-04-14 14:49:42 -07:00
Brian Pugh
30dcf68351 lv_label: change magic number 4 to sizeof(char *) 2019-04-14 13:52:54 -07:00
Brian Pugh
3d77137178 lv_label: dynamically allocate space for dots if necessary. If the required dots storage space is 4 or less bytes, directly stores them in the extended data object 2019-04-14 11:18:31 -07:00
Brian Pugh
50edf4e1f8 Fixed lv_label selection start/end setters to allow the 0th index. 2019-04-14 09:50:02 -07:00
Brian Pugh
f40ee380c8 Optimized bitfields in lv_btn and lv_label. In lv_label, changed selection fields from int to uint16. Because of this change, added getters/setters. Added LV_LABEL_SELECTION_EN option in lv_conf to enable/disable the selection fields 2019-04-14 09:47:45 -07:00
Gabor Kiss-Vamosi
522d59861e solve conflicts 2019-04-14 16:01:48 +02:00
canardos
991f892a98 add lv_obj_set_user_data function 2019-04-14 13:24:12 +08:00
Gabor Kiss-Vamosi
9603ddfbe5 Merge pull request #1016 from joltwallet/preload_direction
lv_preload.c Add feature to allow setting whether the animation is pl…
2019-04-13 18:44:43 +02:00
embeddedt
2b26b9dc51 Merge pull request #1018 from canardos/dev-6.0
Remove legacy control codes
2019-04-13 07:57:30 -04:00
canardos
29daec0caf Remove legacy control codes 2019-04-13 14:56:47 +08:00
Brian Pugh
bbb93d315e lv_preload: abbreviate "animation" and "direction" to "anim" and "dir" 2019-04-12 07:57:16 -07:00
Brian Pugh
610499c278 lv_preload uncomment lv_anim_del in animation create 2019-04-12 07:48:00 -07:00
Gabor Kiss-Vamosi
1cbbd1c59b change memcpy to lv_style_copy 2019-04-12 07:27:53 +02:00
Gabor Kiss-Vamosi
ff6fb2611a Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-12 07:22:48 +02:00
Gabor Kiss-Vamosi
6284e3a21b lv_list: check the return value of btn events 2019-04-12 07:22:37 +02:00
Brian Pugh
3764d7a6ba lv_preload.c Add feature to allow setting whether the animation is played in forward/reverse. Changes the default spinner behavior from counterclockwise to clockwise. 2019-04-11 09:26:11 -07:00
Gabor Kiss-Vamosi
cf943b16e1 Merge pull request #1015 from canardos/const_styles
Allow const lv_style_t objects
2019-04-11 15:46:57 +02:00
Gabor Kiss-Vamosi
a4d4d59346 lv_page: use lv_style_copy instead of memcpy 2019-04-11 15:41:17 +02:00
canardos
e6b7afccd2 Allow const lv_style_t objects 2019-04-11 19:59:55 +08:00
Sergei
5ccf31793e Merge pull request #3 from littlevgl/dev-6.0
Dev 6.0
2019-04-11 14:01:16 +03:00
Gabor Kiss-Vamosi
6a3c7d2b95 lv_list: fix lv_list_get_btn_next/prev 2019-04-11 06:57:19 +02:00
Gabor Kiss-Vamosi
84ea78c1c1 Merge pull request #1014 from littlevgl/list_signal_cb
lv_list: check actual object type instead of relying on signal handler
2019-04-11 06:52:14 +02:00
Gabor Kiss-Vamosi
2b0cdc853f lv_conf_templ: fix typo 2019-04-11 06:34:25 +02:00
Gabor Kiss-Vamosi
0dd723183f lv_conf_templ: disable LV_USE_EXT_CLICK_AREA by default 2019-04-11 06:31:24 +02:00
Gabor Kiss-Vamosi
00f2df74dc lv_conf_temp remove unused LV_USE_EXTENDED_CLICK_AREA... defines 2019-04-11 06:28:31 +02:00
Gabor Kiss-Vamosi
3606ea2588 ext_click_area: run-time area test and renames 2019-04-11 06:26:41 +02:00
Gabor Kiss-Vamosi
12125248c6 Merge branch 'dev-6.0' of https://github.com/GreyMS/lvgl into GreyMS-dev-6.0 2019-04-11 05:46:48 +02:00
Gabor Kiss-Vamosi
2f0921161f Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-11 05:16:50 +02:00
Gabor Kiss-Vamosi
6c9ed1969f lv_disp_buf_init: rename size paramter 2019-04-11 05:16:31 +02:00
Themba Dube
2345e0073d lv_list: check actual object type instead of relying on signal handler 2019-04-10 19:52:11 -04:00
GreyMS
de12c95a80 Fixed typos and include added. 2019-04-10 19:01:47 +03:00
embeddedt
e3244b7a37 Merge pull request #1013 from seyyah/patch-2
Follow to transtion (lv_btnm_set_map_array -> lv_btnm_set_map)
2019-04-10 10:52:59 -04:00
seyyah
0bffba11d6 Follow to transtion (lv_btnm_set_map_array -> lv_btnm_set_map) 2019-04-10 17:44:18 +03:00
GreyMS
9af730c6cb Fixed usage of _lv_indev_proc_t 2019-04-10 15:34:05 +03:00
GreyMS
b59e058f8d Merge branch 'pr/2' into dev-6.0 2019-04-10 14:14:58 +03:00
Gabor Kiss-Vamosi
3d4c784c3b use [] in array argument of 'set' functions (#935) 2019-04-10 08:40:58 +02:00
Gabor Kiss-Vamosi
fb1ca3fb87 rename lv_obj_get_..._func to .._cb (#1011) 2019-04-10 06:40:55 +02:00
Gabor Kiss-Vamosi
427d11e7f5 fix conflicts 2019-04-10 06:27:40 +02:00
Gabor Kiss-Vamosi
d3b494b030 lv_kb: fix typo 2019-04-10 06:25:44 +02:00
Gabor Kiss-Vamosi
b0f3949b3c lv_chart: add _array postfix 2019-04-10 06:23:30 +02:00
Gabor Kiss-Vamosi
c4f8e5f8be run clang format 2019-04-10 06:23:30 +02:00
Gabor Kiss-Vamosi
c2653174f5 lv_kb, lv_btnm: add _array postfix if the parameter is an array 2019-04-10 06:23:30 +02:00
Themba Dube
28d24a3d4d Keep relative offset between pointer and dragged object identical 2019-04-09 16:57:33 -04:00
Themba Dube
ea7c82f478 Fix warnings reported in #1008 2019-04-09 16:18:04 -04:00
Gabor Kiss-Vamosi
5edb1dd38a Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-09 15:24:25 +02:00
Gabor Kiss-Vamosi
ef0e0f812f lv_win, lv_tabview: set screen size by default 2019-04-09 15:24:20 +02:00
Gabor Kiss-Vamosi
b5c7960255 Merge pull request #1003 from littlevgl/obj_drag_dir
Enhance drag logic
2019-04-09 15:05:46 +02:00
Themba Dube
e8b081b015 Release lv_task_handler mutex if no task needs to be run 2019-04-09 09:05:25 -04:00
Themba Dube
67ff40afd0 Enable LV_DRAG_DIR_ALL by default in object initializer
It was previously enabled by `lv_obj_set_drag`.
2019-04-09 09:00:41 -04:00
embeddedt
3d7641733e Merge pull request #1009 from joltwallet/indev_release_fix
lv_indev button release fix
2019-04-09 08:56:16 -04:00
Brian Pugh
d691e72b40 lv_indev: check object delete after sending LV_EVENT_SHORT_CLICKED on group button release 2019-04-08 21:04:17 -07:00
Themba Dube
fc7c7ec619 Merge remote-tracking branch 'origin/dev-6.0' into obj_drag_dir 2019-04-08 13:51:13 -04:00
Themba Dube
36d4807a69 Add back scrolling optimization 2019-04-08 13:50:58 -04:00
Gabor Kiss-Vamosi
e5c699ba23 solve conflicts 2019-04-08 16:39:14 +02:00
Gabor Kiss-Vamosi
75f42fde2f fix conflicts 2019-04-08 14:40:41 +02:00
Themba Dube
0c3a18e1fe Call lv_obj_set_pos if both drag directions are enabled 2019-04-08 08:38:25 -04:00
Gabor Kiss-Vamosi
e47750864e rename LV_GROUP_KEY to LV_KEY 2019-04-08 14:36:20 +02:00
Gabor Kiss-Vamosi
8976b118f8 Merge pull request #998 from joltwallet/indev_esc
lv_indev.c LV_GROUP_KEY_ESC sends LV_EVENT_CANCEL
2019-04-08 05:59:33 +02:00
Gabor Kiss-Vamosi
dff8eb9a3c Merge pull request #1005 from manison/patch/fix-retval
Fix return values from lv_img_dsc_get_info
2019-04-08 05:57:27 +02:00
Ali Rostami
c7d582e403 declare lv_chart_set_update_mode fucntion 2019-04-06 16:30:01 +04:30
Ali Rostami
65b83dd1c1 define lv_chart_set_update_mode function 2019-04-06 16:28:49 +04:30
Themba Dube
2b0e378c73 Merge branch 'dev-6.0' into obj_drag_dir 2019-04-05 14:52:35 -04:00
Themba Dube
231ad935f4 Merge branch 'dev-6.0' of github.com:littlevgl/lvgl into dev-6.0 2019-04-05 14:52:15 -04:00
Themba Dube
9c8296edf9 Fix off-by-one error in lv_calendar 2019-04-05 14:52:04 -04:00
Themba Dube
cbd32d9f28 Update drag logic to consider the movement of a pointer device as drag
It no longer requires the object to have been moved before drag starts.
2019-04-05 14:17:51 -04:00
Themba Dube
5db6b73725 Change lv_drag_direction_t to lv_drag_dir_t and update documentation 2019-04-05 08:48:39 -04:00
manison
b3f4bd1c46 only close file if it was successfully opened and return error from lv_img_dsc_get_info on file operation failure 2019-04-05 14:10:38 +02:00
manison
912b014b03 fix return value type 2019-04-05 10:55:30 +02:00
Gabor Kiss-Vamosi
c58fd97cf7 gpu fill fix 2019-04-05 06:57:51 +02:00
Gabor Kiss-Vamosi
31ff0fd3ff Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-04-05 06:55:46 +02:00
Gabor Kiss-Vamosi
6df6614016 update GPU inteface with 2D fill 2019-04-05 06:55:35 +02:00
Gabor Kiss-Vamosi
264eacd0bc Merge pull request #1002 from littlevgl/table_click
Disable clickable property on tables
2019-04-05 06:24:47 +02:00
Gabor Kiss-Vamosi
248521da53 lv_symbol_defs.h: replace macros with an enum with symbol names (#1000) 2019-04-05 06:16:07 +02:00
Gabor Kiss-Vamosi
0cff8c7963 Merge branch 'dev-6.0' into indev_esc 2019-04-05 05:47:54 +02:00
Themba Dube
789e7a3a12 Add lv_obj_set_drag_dir and lv_obj_get_drag_dir 2019-04-04 21:51:13 -04:00
Themba Dube
d85c138137 Disable clickable property on tables 2019-04-04 21:12:38 -04:00
Gabor Kiss-Vamosi
d6088f2b06 update lv_conf_checker.h 2019-04-04 16:54:54 +02:00
Gabor Kiss-Vamosi
1eca54616a fixes after clang formatting 2019-04-04 16:44:16 +02:00
melnse
3f2b6bb685 Added defines of extended clickable area to conf template and to conf checker. 2019-04-04 14:34:29 +03:00
Sergei
2794b786d7 Merge pull request #1 from littlevgl/dev-6.0
lv_list: don't sent CLICK event if dragged. fix #997
2019-04-04 14:19:50 +03:00
melnse
bc8cd2068e Realized alternative version of extended clickable area: "USE_LV_EXTENDED_CLICKABLE_AREA_TINY". It doesn't store extended coordinates, but calculates them on the fly. Also ext_paddings changed from lv_area to two uint8_t in both versions. 2019-04-04 14:14:40 +03:00
Brian Pugh
d4bfeb2bed lv_indev.c have LV_GROUP_KEY_ESC send an LV_EVENT_CANCEL signal 2019-04-03 22:36:10 -07:00
Gabor Kiss-Vamosi
66585f508f remove astyle files becasue they are replaced with clang-format 2019-04-04 07:16:24 +02:00
Gabor Kiss-Vamosi
ba2160042a run clang format 2019-04-04 07:15:40 +02:00
Gabor Kiss-Vamosi
80e2a1d5d5 add clang-format file 2019-04-04 07:15:09 +02:00
Gabor Kiss-Vamosi
a8c8b6b7a2 add /* clang-format off */ to lv_conf_templ.h 2019-04-04 07:12:48 +02:00
Gabor Kiss-Vamosi
18809da818 Merge branch 'indev_runtime' into dev-6.0 2019-04-04 07:10:43 +02:00
Gabor Kiss-Vamosi
f19f8a9b5c minor fix 2019-04-04 07:10:34 +02:00
Gabor Kiss-Vamosi
41ee89e6d2 renames according to the new lv_conf_templ 2019-04-04 07:07:17 +02:00
Gabor Kiss-Vamosi
889c21b639 update lv_Conf_templ.h 2019-04-04 07:06:24 +02:00
Gabor Kiss-Vamosi
aec671dc67 lv_list: don't sent CLICK event if dragged. fix #997 2019-04-04 05:09:29 +02:00
melnse
6e047e6d27 Fixed typos, changed macro to static function. 2019-04-03 20:09:33 +03:00
melnse
787dd591c1 Realization of extended clickable area.
Suitable for small lonely objects, which must be clicked.
For activation add "#define USE_LV_EXTENDED_CLICK_AREA 1" to lv_conf.h
2019-04-03 19:34:58 +03:00
Gabor Kiss-Vamosi
1d986e13df lv_btnm, lv_kb: replace 'const char ** x' with const char * x[] 2019-04-03 15:47:36 +02:00
embeddedt
c55c36c366 Merge pull request #994 from joltwallet/doc_fixes
Few comment corrections
2019-04-02 12:14:13 -04:00
Brian Pugh
75f5849a73 Few comment corrections 2019-04-02 09:12:00 -07:00
Gabor Kiss-Vamosi
08722f5f8d fix compile error 2019-04-02 12:16:15 +02:00
Gabor Kiss-Vamosi
84ace67720 move INDEV settings from lv_conf.h to the indev driver 2019-04-02 12:15:35 +02:00
Gabor Kiss-Vamosi
38c55377c6 merge master 2019-04-02 06:49:05 +02:00
Gabor Kiss-Vamosi
af61c96802 add LV_LABEL_LONG_ROLL_CIRC 2019-04-02 06:44:50 +02:00
embeddedt
103f6c3041 Assume display is not rotated by default 2019-03-31 19:15:37 -04:00
Gabor Kiss-Vamosi
09f362a1ed add disp. rotate config for disp_drv 2019-03-30 06:23:41 +01:00
Gabor Kiss-Vamosi
9515e800d4 minor comment fix 2019-03-30 06:04:56 +01:00
Gabor Kiss-Vamosi
eb6daa51d7 move antialiasing and refr_task to the display level 2019-03-30 06:03:23 +01:00
Gabor Kiss-Vamosi
438ae64502 fixes for #935 2019-03-29 16:13:28 +01:00
Gabor Kiss-Vamosi
e902f0955f Merge branch 'ta_selection' into dev-6.0 2019-03-29 05:33:54 +01:00
Gabor Kiss-Vamosi
a4a5bef8ca Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-28 06:12:01 +01:00
Gabor Kiss-Vamosi
1cd983941e make LV_TXT_UTF8 always enabled (remove the defeine checks) 2019-03-28 06:11:50 +01:00
Themba Dube
272ee1b466 Fix potentially uninitialized variable in lv_label_is_char_under_pos 2019-03-27 20:46:21 -04:00
Themba Dube
5919cf5613 Draw selection rectangle with line height rather than font height 2019-03-27 19:19:50 -04:00
Themba Dube
97089da7f5 Add lv_ta_set_sel_mode/lv_ta_get_sel_mode 2019-03-27 19:17:48 -04:00
Themba Dube
f5609b6bce Remove leftover inclusion of stdio.h 2019-03-27 19:12:46 -04:00
Themba Dube
e63e1f230a Properly handle selection on multi-line text areas 2019-03-27 19:11:04 -04:00
Themba Dube
3b747718ea More text area fixes 2019-03-27 18:36:57 -04:00
Themba Dube
0a4e8979ec Add lv_ta_clear_selection and fix a few bugs 2019-03-27 17:22:44 -04:00
Themba Dube
b14ed6288a Add lv_ta_get_selection 2019-03-27 17:12:55 -04:00
Themba Dube
82a095b94a Add ability to select text on the text area 2019-03-27 16:39:37 -04:00
Themba Dube
b8fece6e0a Add back prototype for lv_canvas_mult_buf
It appears to have been accidentally removed in aaad794085.
2019-03-27 15:52:13 -04:00
Gabor Kiss-Vamosi
cd47fd72f6 minor zen theme fix 2019-03-27 08:37:08 +01:00
Gabor Kiss-Vamosi
ed9a1f3df5 improve circle anti-alaisins 2019-03-27 08:36:55 +01:00
Gabor Kiss-Vamosi
881d6c060f lv_kb: add lv_kb_def_event_cb (makes possible overwrite the default behavior) 2019-03-27 00:48:35 +01:00
Gabor Kiss-Vamosi
20961a4dda Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-27 00:05:27 +01:00
Gabor Kiss-Vamosi
5be450a3aa lv_canvas: handle alpha in rotate 2019-03-27 00:05:15 +01:00
Gabor Kiss-Vamosi
41754236f8 lv_draw_buf_set/get_px_color/alpha add support all color formats 2019-03-27 00:04:57 +01:00
Gabor Kiss-Vamosi
0464444502 ddlist: fox wrong option selection on click 2019-03-27 00:01:09 +01:00
embeddedt
e8a3f3dd6a Merge pull request #984 from amirgon/dev-6.0
bugfix in lv_canvas_get_img return value
2019-03-26 15:53:14 -04:00
Amir Gonnen
0f43ee23de bugfix in lv_canvas_get_img return value 2019-03-26 21:40:08 +02:00
Gabor Kiss-Vamosi
cf05e2c336 Merge pull request #983 from amirgon/dev-6.0
comment out unimplemented function
2019-03-26 15:37:48 +01:00
Gabor Kiss-Vamosi
9347165a5a add lv_canvas_get_img() 2019-03-26 15:35:45 +01:00
Amir Gonnen
21eab152a6 Merge branch 'dev-6.0' of https://github.com/amirgon/lvgl into dev-6.0 2019-03-26 00:25:28 +02:00
Amir Gonnen
e575d4728b Changed 'typedef enum' to 'typedef uint8_t' 2019-03-26 00:23:36 +02:00
Amir Gonnen
5456418d54 Changed 'typedef enum' to 'typedef uint8_t' 2019-03-26 00:19:38 +02:00
Amir Gonnen
dccdf1e5a4 comment out unimplemented function 2019-03-25 23:40:08 +02:00
Gabor Kiss-Vamosi
a979a445ac Merge pull request #971 from manison/patch/fix-multiple-keypad-events
Fix keypad event might be generated multiple times
2019-03-25 15:53:44 +01:00
manison
516a69e218 refactor multiple keypad event generation as per review 2019-03-25 14:17:23 +01:00
manison
b262381c58 Merge branch 'dev-6.0' into patch/fix-multiple-keypad-events 2019-03-25 13:47:12 +01:00
Gabor Kiss-Vamosi
aaad794085 lv_canvas_rotate: update API 2019-03-24 19:35:10 +01:00
Gabor Kiss-Vamosi
8890589dc1 remove debug printf 2019-03-24 19:34:52 +01:00
Gabor Kiss-Vamosi
37e873fa09 Merge pull request #980 from littlevgl/move_canvas
Move lv_canvas_get_px/lv_canvas_set_px to lv_draw_img.c
2019-03-24 19:14:04 +01:00
Gabor Kiss-Vamosi
347f7db20d Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-24 18:42:19 +01:00
Gabor Kiss-Vamosi
770d1e08e1 lv_ddlist: fix wrong selection on click 2019-03-24 18:42:11 +01:00
Gabor Kiss-Vamosi
06da93f43b Merge pull request #973 from IvanShugov/master
Add support for chart axes ticks and value labels and X axis label
2019-03-24 16:42:41 +01:00
embeddedt
d4559a0f39 Move lv_canvas_get_px/lv_canvas_set_px to lv_draw_img.c 2019-03-24 09:52:24 -04:00
Gabor Kiss-Vamosi
a402f8258d update lv_conf_checker.h 2019-03-24 07:31:56 +01:00
Gabor Kiss-Vamosi
f7f1b5c5ea Merge branch 'dev-6.0' into master 2019-03-24 07:25:32 +01:00
Gabor Kiss-Vamosi
221e269ccb roller and ddlist fixes 2019-03-24 07:16:13 +01:00
Gabor Kiss-Vamosi
ec787b92ba Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-24 06:23:42 +01:00
Gabor Kiss-Vamosi
fa3947576d Merge branch 'master' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-24 06:23:30 +01:00
Gabor Kiss-Vamosi
298cf31340 Merge pull request #978 from littlevgl/ddlist_selected
Make drop down list more aesthetic
2019-03-24 06:13:41 +01:00
Gabor Kiss-Vamosi
13e7f162a0 lv_ddlist: fixes for scrollbar visibility 2019-03-24 06:11:09 +01:00
Gabor Kiss-Vamosi
7cf2b8f1c2 lv_chart fixes 2019-03-24 05:56:00 +01:00
Gabor Kiss-Vamosi
7c2abad471 Merge branch 'master' of https://github.com/ali-rostami/lvgl into ali-rostami-master 2019-03-24 05:25:52 +01:00
Gabor Kiss-Vamosi
2cbffaeaea Merge pull request #977 from littlevgl/new_tabview_scroll
Only start scrolling tabview horizontally if page is at edge
2019-03-24 04:58:44 +01:00
user-0
36b47ba98d FIX margin get function documentation 2019-03-24 00:07:16 +02:00
user-0
81696b85d0 FIXED: Add support for chart axes ticks and value labels / chart label. 2019-03-23 23:59:12 +02:00
user-0
db4f4f0360 FIXED/UPDATED: Add support for chart axes ticks and value labels / chart label. 2019-03-23 22:21:02 +02:00
Themba Dube
5565516e96 Fix off-by-one error in chart line drawing 2019-03-23 09:33:34 -04:00
Themba Dube
d479927e96 Make ddlist more aesthetic 2019-03-23 09:20:41 -04:00
Themba Dube
9c71696373 Merge branch 'dev-6.0' into new_tabview_scroll 2019-03-23 09:06:26 -04:00
embeddedt
e22beaea22 Remove merge information in README.md 2019-03-23 08:59:23 -04:00
Themba Dube
a8dc1afe2c Lock out horizontal swiping while vertical scrolling is in progress 2019-03-22 21:38:05 -04:00
Themba Dube
f0e423a71e Remove debug information 2019-03-22 21:28:57 -04:00
Themba Dube
25539b6606 Merge branch 'new_tabview_scroll' of github.com:littlevgl/lvgl into new_tabview_scroll 2019-03-22 21:27:01 -04:00
Gabor Kiss-Vamosi
f2af4b725a Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-23 01:20:09 +01:00
Gabor Kiss-Vamosi
e1e6813eb1 fix typo in lv_port_..._template files 2019-03-23 01:19:57 +01:00
Gabor Kiss-Vamosi
13033c28d8 lv_page: fix scrl left padding 2019-03-23 01:05:41 +01:00
Themba Dube
e1f9462818 Add debug info to tabview 2019-03-22 19:19:03 -04:00
Themba Dube
6e48776abc Merge branch 'dev-6.0' into new_tabview_scroll 2019-03-22 19:11:52 -04:00
Themba Dube
de04b39165 Remove use of 'const' in lv_btnm_set_one_toggle 2019-03-22 19:11:37 -04:00
Themba Dube
e32b40ecf1 Only start scrolling tabview horizontally if page is at edge 2019-03-22 19:08:21 -04:00
Gabor Kiss-Vamosi
5149d36c1f Merge pull request #966 from littlevgl/btnm_one_toggle
Add lv_btnm_set_one_toggle/lv_btnm_get_one_toggle functions
2019-03-22 22:57:30 +01:00
Gabor Kiss-Vamosi
0150586db7 fix conflicts 2019-03-22 22:39:02 +01:00
user-0
36b212d4dc TUNE: Add support for chart axes ticks and value labels / chart label. 2019-03-22 22:49:09 +02:00
user-0
46d5debc7a FIXED: Add support for chart axes ticks and value labels / chart label. 2019-03-22 19:20:58 +02:00
user-0
087ab979d6 Add support for chart axes ticks and value labels. Add support for chart axis X label. 2019-03-22 17:24:40 +02:00
manison
f972eb54aa fix keypad event might be generated multiple times if the event handler returns LV_RES_INV 2019-03-22 08:46:06 +01:00
Gabor Kiss-Vamosi
0005f4c88e add lv_indev_wait_release to KEYPAD and ENCODER too 2019-03-22 06:35:17 +01:00
Themba Dube
f5aa26f7e1 Update one toggle feature based on review comments 2019-03-21 13:42:03 -04:00
Themba Dube
e7b4bef8ac Add lv_btnm_set_one_toggle/lv_btnm_get_one_toggle functions 2019-03-20 18:33:33 -04:00
Gabor Kiss-Vamosi
47093d057e Merge branch 'img_rotate' into dev-6.0 2019-03-20 16:01:09 +01:00
Gabor Kiss-Vamosi
c9cf1edc07 Merge branch 'insert' into dev-6.0 2019-03-20 16:00:20 +01:00
Gabor Kiss-Vamosi
e8a05aaa65 add LV_EVENT_INSERT and use it in Text Area 2019-03-20 15:59:41 +01:00
Gabor Kiss-Vamosi
12a5e16a75 add table styles to deafult and template themes 2019-03-20 14:53:59 +01:00
Gabor Kiss-Vamosi
a7735b85e9 canvas rotate: comment update 2019-03-20 09:15:56 +01:00
Gabor Kiss-Vamosi
fe4e95af2b canvas: rotate updates 2019-03-20 09:02:55 +01:00
Gabor Kiss-Vamosi
11faf1df5f lv_canvas: add image rotate (experimental) 2019-03-20 08:01:01 +01:00
Gabor Kiss-Vamosi
a83fdb39a8 LV_EVENT_SELECT: send ID instead of text 2019-03-20 06:08:01 +01:00
Gabor Kiss-Vamosi
efe4845923 fix typo 2019-03-20 05:47:41 +01:00
Gabor Kiss-Vamosi
5218a5f8b8 rename scrips folder to sripts 2019-03-20 05:45:37 +01:00
Gabor Kiss-Vamosi
58d375bc93 fix typo: LV_SIGNAL_CONTROLL -> LV_SIGNAL_CONTROL 2019-03-19 07:15:00 +01:00
Gabor Kiss-Vamosi
ee04c41da8 feat(event): add LV_EVENT_SELECTED, event data paramter and update lv_btnm API 2019-03-19 06:30:05 +01:00
Gabor Kiss-Vamosi
4d8ec83866 fix(event): in lv_obj_del get the focused obj before removing the obj from the group
fix #946
2019-03-19 03:45:10 +01:00
Gabor Kiss-Vamosi
1927376fe5 move lv_utils to src/lv_misc 2019-03-18 16:17:32 +01:00
Gabor Kiss-Vamosi
627383fd0d draw triangle opa_scale fixes 2019-03-18 16:16:52 +01:00
Gabor Kiss-Vamosi
02689fceab solve conflicts 2019-03-18 16:09:52 +01:00
Gabor Kiss-Vamosi
615186c5d6 lv_kb: fix typo 2019-03-18 16:02:53 +01:00
Gabor Kiss-Vamosi
795f5772b6 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-18 15:59:46 +01:00
Gabor Kiss-Vamosi
4dabad3d6e add lv_conf_template.h to root and rename template folder to porting 2019-03-18 15:59:20 +01:00
Gabor Kiss-Vamosi
7560f01745 Merge pull request #959 from littlevgl/res_max
Fix remaining instances of LV_HOR_RES/LV_VER_RES in drawing code.
2019-03-18 15:08:11 +01:00
embeddedt
9f37a9803d Merge pull request #958 from manison/patch/fix-function-name-typo
Fix function name typo in btnm
2019-03-18 09:01:10 -04:00
Themba Dube
7af6818897 Fix remaining instances of LV_HOR_RES/LV_VER_RES in drawing code.
Based on #957.
2019-03-18 08:58:10 -04:00
embeddedt
d965db9fe6 Merge pull request #957 from manison/patch/fix-vla-compile-error
Fix error on compiler without VLA support
2019-03-18 08:56:48 -04:00
manison
cc8119d0a7 lv_btnm: fix function name typo 2019-03-18 10:50:54 +01:00
Gabor Kiss-Vamosi
fd26209b16 Merge pull request #952 from amirgon/dev-6.0
Dev 6.0 fixes
2019-03-18 09:46:59 +01:00
Amir Gonnen
a9f807ac99 removed commented out function declarations 2019-03-18 10:00:09 +02:00
manison
53b720cff7 fix error on compiler without VLA support 2019-03-18 08:30:49 +01:00
Mario Rubio Gómez
9f29289afd Added lv_utils and moved functions "bsearch & num_to_str". 2019-03-18 07:25:20 +01:00
Gabor Kiss-Vamosi
abfdfd1b20 rename lv_conf_templ.h to lv_conf_template.h 2019-03-18 05:23:15 +01:00
Gabor Kiss-Vamosi
3198340451 create template fodler 2019-03-18 05:22:06 +01:00
Amir Gonnen
85442c25c0 commented out functions without definition
Functions that are declared but not defined will cause the micropython build to fail, since it would assume, from file header, that these functions are available and will try to call them (linker error)
2019-03-18 01:27:06 +02:00
Amir Gonnen
b222fa3744 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-18 01:04:34 +02:00
Amir Gonnen
fc5f86d696 Fixed gc issues
LV_GC_INCLUDE must be included where LV_GC_ROOT is used

pointer to LV_GV_ROOT must come before LV_GC_ROOT macro
2019-03-18 01:04:20 +02:00
Ali Rostami
b84358dc7f add invalid functions for new data lines
when we want to add set data by `lv_chart_set_next` to a chart in `LV_CHART_MODE_CIRCULAR` mode we don't need to invalidate the whole chart object so these functions are added to just invalidate the added data area.
2019-03-17 16:38:02 +03:30
Ali Rostami
6c1152ed0c add update_mode to lv_chart_ext_t struct 2019-03-17 16:23:08 +03:30
Ali Rostami
5cbdde7729 Merge pull request #4 from littlevgl/dev-6.0
Dev 6.0
2019-03-17 13:19:19 +03:30
Gabor Kiss-Vamosi
f51bf17e39 move lvgl files to src folder 2019-03-17 08:33:03 +01:00
Gabor Kiss-Vamosi
2db846d5e0 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-17 07:59:43 +01:00
Gabor Kiss-Vamosi
efd647f853 lv_indev_get_key fixes 2019-03-17 07:59:38 +01:00
Gabor Kiss-Vamosi
03b7bb72ea Merge pull request #939 from eeshiken/patch-1
Remove inline functions which prevent compile
2019-03-17 07:46:21 +01:00
Gabor Kiss-Vamosi
0ab28f623c replace color macros with functions 2019-03-17 07:44:48 +01:00
Gabor Kiss-Vamosi
3964f3b843 Merge branch 'patch-1' of https://github.com/eeshiken/lvgl into eeshiken-patch-1 2019-03-17 07:36:30 +01:00
Ali Rostami
5a297777c0 Merge pull request #2 from littlevgl/dev-6.0
Merge pull request #943 from ali-rostami/master
2019-03-17 09:21:40 +03:30
Gabor Kiss-Vamosi
80738425f6 Merge pull request #943 from ali-rostami/master
adding area chart
2019-03-17 05:27:16 +01:00
Gabor Kiss-Vamosi
5916f1f5c4 lv_chart: minor fixes 2019-03-17 05:23:43 +01:00
Gabor Kiss-Vamosi
d7b3aeba66 add opa_scale to lv_draw_triangle 2019-03-17 05:22:25 +01:00
Gabor Kiss-Vamosi
de9119a27d Merge branch 'dev-6.0' into ali-rostami-master 2019-03-17 05:12:06 +01:00
Gabor Kiss-Vamosi
96f227e7e1 lv_roller.h: add missing declaration 2019-03-17 05:07:16 +01:00
Gabor Kiss-Vamosi
87117be081 Merge branch 'master' of https://github.com/ali-rostami/lvgl into ali-rostami-master 2019-03-17 05:06:49 +01:00
Gabor Kiss-Vamosi
6d1be4cc11 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-17 04:55:36 +01:00
Gabor Kiss-Vamosi
9c499bdeae lv_btnm: fix crash 2019-03-17 04:55:18 +01:00
Gabor Kiss-Vamosi
dc7ba94b06 Merge pull request #948 from littlevgl/fix_c99_errors
Fix remaining C99 errors
2019-03-17 04:51:19 +01:00
Gabor Kiss-Vamosi
855832b574 lv_roller: add infinite option 2019-03-17 04:32:37 +01:00
Themba Dube
240744f9c9 Silence another pedantic warning 2019-03-16 08:58:52 -04:00
Ali Rostami
a624019943 changed LL_READ_BACK call to LV_LL_READ_BACK
as we don't have `LL_READ_BACK` function anymore. I changed it to `LV_LL_READ_BACK`.
2019-03-16 09:03:50 +03:30
Themba Dube
edb58cc61b Name unnamed structs and remove duplicated semicolons 2019-03-15 19:41:54 -04:00
Gabor Kiss-Vamosi
1e763e6c5e roller, ddlist: minor fixes 2019-03-15 22:51:49 +01:00
Gabor Kiss-Vamosi
51824b4316 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-15 22:19:41 +01:00
Gabor Kiss-Vamosi
92149e11a6 update tehemes with new padding 2019-03-15 22:19:21 +01:00
Elvis Eshikena
5e41a28dcf Add inline functions to replace LV_COLOR_MAKE 2019-03-15 11:48:31 -07:00
embeddedt
2819b30716 Merge pull request #944 from manison/patch/remove-include
Remove unnecessary #include
2019-03-15 08:17:49 -04:00
manison
43371a4980 remove unnecessary #include 2019-03-15 11:41:52 +01:00
Gabor Kiss-Vamosi
8264492f87 minor fixes 2019-03-15 10:18:48 +01:00
Gabor Kiss-Vamosi
abf8cbfb92 Merge branch 'dev-6.0' into padding 2019-03-15 07:28:04 +01:00
Gabor Kiss-Vamosi
c9703af47e to lv_cont_get_fit_width/height to lv_obj 2019-03-15 07:27:58 +01:00
Gabor Kiss-Vamosi
0b53f0f9ed Merge branch 'master' into dev-6.0 2019-03-15 05:45:28 +01:00
Gabor Kiss-Vamosi
15baa59a8f tileview fixes 2019-03-15 05:45:27 +01:00
Gabor Kiss-Vamosi
ee5976ce12 lv_kb: rename function and comment updates 2019-03-15 05:22:23 +01:00
Gabor Kiss-Vamosi
c3156db6b9 apply new padding in some themes 2019-03-15 05:10:43 +01:00
Gabor Kiss-Vamosi
a0b6136dcf Merge branch 'dev-6.0' into padding 2019-03-14 19:37:13 +01:00
Gabor Kiss-Vamosi
e0aeed2e97 add more padding.bottom/top/right/left 2019-03-14 19:37:09 +01:00
Ali Rostami
22ad2e0ec1 adding lv_chart_draw_areas function
after adding this function it is possible to plot the area type chart too.
2019-03-14 11:18:53 +03:30
Ali Rostami
02e5ed8b16 adding area chart type 2019-03-14 11:11:48 +03:30
Gabor Kiss-Vamosi
3a49ece938 eanble sending events from events 2019-03-14 05:34:39 +01:00
Gabor Kiss-Vamosi
250ef8b136 start to replace padding.hor/ver with top/bottom/left/right 2019-03-13 23:58:33 +01:00
Gabor Kiss-Vamosi
e8fdac41a9 lv_group_add_obj: do not add teh object if already added to this group 2019-03-13 22:18:16 +01:00
Gabor Kiss-Vamosi
b8f598112f update lv_indev_enable to enable/disable an indev not a type 2019-03-13 22:08:20 +01:00
Elvis
2be9e67697 replace micropython bindings 2019-03-12 12:06:25 -07:00
Gabor Kiss-Vamosi
89d56e5723 KEYPAD, ENCODER: not send ENTER (process it in RELEASE signals) 2019-03-12 19:20:23 +01:00
Gabor Kiss-Vamosi
6967a8e52f lv_page: fix arrow scroll 2019-03-12 15:17:28 +01:00
Gabor Kiss-Vamosi
3458b1bfb1 imporve ENCODER support by sending signals 2019-03-12 14:46:06 +01:00
Gabor Kiss-Vamosi
4e66afc65b send signals with LEYPAD input devices 2019-03-12 14:29:37 +01:00
Gabor Kiss-Vamosi
4b3859f949 remove btnm, mbox, kb, tabview actions 2019-03-12 06:20:45 +01:00
Elvis
a1ca0bd796 Remove inline functions which prevent compile 2019-03-11 17:26:27 -07:00
Mario Rubio Gómez
92b79cf3a8 Change bsearch C standard function by new lv_bsearch propietary function. 2019-03-11 11:08:25 +01:00
Gabor Kiss-Vamosi
2bf4e080e4 remove lv_btnm_action to replace with generic event_cb 2019-03-11 06:18:44 +01:00
Gabor Kiss-Vamosi
2640727b29 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-09 05:51:46 +01:00
Gabor Kiss-Vamosi
52ee38d7c9 fix warnings 2019-03-09 05:51:33 +01:00
embeddedt
74a9f5b18e Merge pull request #936 from manison/patch/fix-typos
Fix some typos
2019-03-08 10:12:21 -05:00
Gabor Kiss-Vamosi
fcd06e4c1c Merge pull request #924 from ali-rostami/master
add offset feature to img object
2019-03-08 15:03:35 +01:00
Gabor Kiss-Vamosi
245a6ccae6 Merge branch 'dev-6.0' into master 2019-03-08 15:03:13 +01:00
Ali Rostami
e263dddde9 add declaration for offset getter functions. 2019-03-08 17:05:36 +03:30
Ali Rostami
4ab2e505fd add 2 getter functions for offset attribute. 2019-03-08 17:02:56 +03:30
manison
bef17224e4 fix some typos 2019-03-08 14:11:13 +01:00
Gabor Kiss-Vamosi
a59a6880f0 lv_img_offset: invalidate img when offset changes 2019-03-08 11:53:34 +01:00
Gabor Kiss-Vamosi
363304f53e Merge branch 'master' of https://github.com/ali-rostami/lvgl into ali-rostami-master 2019-03-08 11:34:41 +01:00
Gabor Kiss-Vamosi
bff65c217d remove lv_i18n 2019-03-08 08:32:17 +01:00
Gabor Kiss-Vamosi
14b03df174 remove debug printf 2019-03-08 08:02:20 +01:00
Gabor Kiss-Vamosi
93e2b9e0b9 update lv_conf_templ.h 2019-03-08 07:54:36 +01:00
Gabor Kiss-Vamosi
15007e9071 add lv_disp_remove 2019-03-08 06:57:16 +01:00
Mario Rubio Gómez
b882174bf9 Fixed bsearch size of list elements. [sizeof(uint32_t*) --> sizeof(uint32_t)] 2019-03-07 09:50:23 +01:00
Gabor Kiss-Vamosi
370f8223b6 lv_indev_read: use the current corridnate as defult for POINTER type 2019-03-07 01:26:04 +01:00
Gabor Kiss-Vamosi
d5dd1c4b10 Merge branch 'event' of https://github.com/littlevgl/lvgl into event 2019-03-07 00:42:20 +01:00
Gabor Kiss-Vamosi
bc1d71a1d1 event handling improvments 2019-03-07 00:42:08 +01:00
Gabor Kiss-Vamosi
702fb9565d Add LV_ prefix to symbols and vhange USE_LV_... to LV_USE_... 2019-03-07 00:05:16 +01:00
Gabor Kiss-Vamosi
210de388d9 remove lv_ufs 2019-03-06 23:14:35 +01:00
Gabor Kiss-Vamosi
c4ca9870b0 group: add user_data 2019-03-06 23:14:19 +01:00
Gabor Kiss-Vamosi
3d4f823884 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-06 23:00:06 +01:00
Gabor Kiss-Vamosi
d9874ae0f4 marge master 2019-03-06 22:59:58 +01:00
Ali Rostami
0bce1876c1 declare lv_img_set_offset() with new params. 2019-03-06 17:35:14 +03:30
Ali Rostami
fc375fd115 define lv_img_set_offset() with new params 2019-03-06 17:33:14 +03:30
Mario Rubio Gómez
cc190bbb29 Changed index search by binary search for sparse glyphs fonts. 2019-03-06 11:14:06 +01:00
embeddedt
4c8015541e Merge pull request #926 from manison/patch/fix-typo
Fix typo in constant name
2019-03-05 10:17:41 -05:00
manison
b30ca0da76 fix typo in constant name (LV_IMG_CF_UNK*N*OWN) 2019-03-05 14:21:13 +01:00
Gabor Kiss-Vamosi
13a3364656 Update lv_port_disp_templ.c 2019-03-04 16:56:02 +01:00
Gabor Kiss-Vamosi
cabbe414a5 Update lv_port_disp_templ.c 2019-03-04 16:55:29 +01:00
Ali Rostami
c2e3e9d494 add offset member to lv_img_ext_t 2019-03-04 12:47:03 +03:30
Ali Rostami
e298f493ce add offset function 2019-03-04 12:41:28 +03:30
Ali Rostami
69b07acc4e Merge pull request #1 from littlevgl/master
432019 update
2019-03-04 12:23:13 +03:30
Gabor Kiss-Vamosi
9d72ced2b6 focus/defocus event updates 2019-03-03 11:20:49 +01:00
Gabor Kiss-Vamosi
c713c4135b Merge branch 'dev-6.0' into event 2019-03-03 04:29:17 +01:00
Gabor Kiss-Vamosi
2c4ea022b9 lv_page_focus: minor fix 2019-03-03 04:28:54 +01:00
Gabor Kiss-Vamosi
e788907d9c remove free_data/ptr and relpace with user_data 2019-03-02 20:53:51 +01:00
embeddedt
2b4185ec23 Merge pull request #917 from manison/feature/add-mbox-api
Button matrix, message box: new APIs
2019-03-02 11:19:27 -05:00
Gabor Kiss-Vamosi
13f0b61953 improve LV_PROTECT_PRESS_LOST 2019-03-02 01:49:08 +01:00
Gabor Kiss-Vamosi
e50410ffb1 merge slider anim update 2019-03-02 01:23:33 +01:00
Gabor Kiss-Vamosi
cae61d4e3e bar/slider/sw anim updates 2019-03-01 23:50:30 +01:00
Gabor Kiss-Vamosi
86d7f4c888 imprve encoder event support 2019-03-01 22:23:59 +01:00
Gabor Kiss-Vamosi
4743e11967 lv_slider: experimental bar and slider animation update 2019-03-01 15:25:47 +01:00
embeddedt
2ffeef667f Merge pull request #918 from canardos/dev-6.0
add lv_cb_set_static_text function, fix incorrect kb_ctrl_num_map
2019-03-01 07:26:17 -05:00
canardos
2ffb0a83b0 Fix incorrect kb_ctrl_num_map 2019-03-01 15:56:27 +08:00
canardos
4608f72098 add lv_cb_set_static_text function 2019-03-01 15:25:29 +08:00
Gabor Kiss-Vamosi
c318a7fc37 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-03-01 07:53:36 +01:00
Gabor Kiss-Vamosi
25df5347aa lv_btnm_set_ctrl_map: update comment 2019-03-01 07:25:16 +01:00
Gabor Kiss-Vamosi
148cb16cd4 lv_roller_set_hor_fit: use the new fit system 2019-03-01 06:31:09 +01:00
Gabor Kiss-Vamosi
13fff73bdb event: use with keypad 2019-03-01 06:26:03 +01:00
embeddedt
fbeb1d785c Merge pull request #916 from manison/patch/fix-ta-variable-hides-arg
Remove unnecessary variable definition
2019-02-28 09:40:11 -05:00
Gabor Kiss-Vamosi
d992a71513 remove style.body.empty (replaced by style.body.opa) 2019-02-28 13:34:04 +01:00
Gabor Kiss-Vamosi
672626f225 lv_indev: name unnamed struct and unions 2019-02-28 13:05:47 +01:00
manison
513a7e0a4e btnm: introduce lv_btnm_set_pressed API 2019-02-28 09:27:25 +01:00
manison
4e9df1679e fix formatting 2019-02-28 09:09:58 +01:00
manison
4a54b6e4fa fix argument documentation 2019-02-28 09:08:53 +01:00
manison
a7338085ec mbox: introduce lv_mbox_get_btnm API 2019-02-28 09:07:07 +01:00
manison
7ac2009f16 ta: remove unnecessary variable definition/initialization 2019-02-28 08:49:46 +01:00
Gabor Kiss-Vamosi
55197a2934 name unamed structs in lv_color.h 2019-02-28 06:08:15 +01:00
Gabor Kiss-Vamosi
205c791e00 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-02-28 05:23:31 +01:00
Gabor Kiss-Vamosi
b0d3164ecf lv_1i8n: minor fixes 2019-02-28 05:23:21 +01:00
Gabor Kiss-Vamosi
551eadc1d5 Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-02-27 10:58:29 +01:00
Gabor Kiss-Vamosi
409a998df2 add voaltile to 'disp_drv->flushing' to work with optimization 2019-02-27 10:58:18 +01:00
Gabor Kiss-Vamosi
c9a58a8a8c Merge branch 'master' of https://github.com/littlevgl/lvgl into dev-6.0 2019-02-27 10:55:58 +01:00
Gabor Kiss-Vamosi
aa4b17900b lv_ta: fix label auto size on lv_ta size change 2019-02-27 10:55:39 +01:00
Gabor Kiss-Vamosi
3f4c1fe91b imporve backward compatibility 2019-02-27 10:25:21 +01:00
Gabor Kiss-Vamosi
53b8056502 btnm fixes 2019-02-27 06:17:37 +01:00
Gabor Kiss-Vamosi
e323924176 merge dev-6.0 2019-02-27 06:04:30 +01:00
Gabor Kiss-Vamosi
1efb3d87c8 Merge pull request #825 from canardos/dev-6.0
Move control byte to separate array. Add functions to modify dynamically
2019-02-27 06:03:47 +01:00
Gabor Kiss-Vamosi
591e02c71b Merge branch 'dev-6.0' into dev-6.0 2019-02-27 06:00:14 +01:00
Gabor Kiss-Vamosi
e85e4a8eb9 lv_hal_indev: remove unnamed stuct and union 2019-02-26 19:46:37 +01:00
Gabor Kiss-Vamosi
dc0ce46b0c update obejcts with the new event system 2019-02-26 16:07:40 +01:00
Gabor Kiss-Vamosi
50e69bab6b start to implement the new generic event system 2019-02-26 09:25:46 +01:00
Gabor Kiss-Vamosi
cc3ef640da rename lv_fs_free to lv_fs_free_space to avoid collosion woth free() 2019-02-25 15:34:35 +01:00
Gabor Kiss-Vamosi
f7d6604b9b Merge branch 'dev-6.0' of https://github.com/littlevgl/lvgl into dev-6.0 2019-02-25 15:21:51 +01:00
Gabor Kiss-Vamosi
a6821a6cb8 lv_i18n: update void returns to char 2019-02-25 15:21:41 +01:00
embeddedt
f386101e82 Merge pull request #896 from manison/patch/fix-unused-var
Remove unused variable in text area
2019-02-25 09:02:14 -05:00
manison
2aa5f67381 remove unused variable 2019-02-25 09:26:27 +01:00
Gabor Kiss-Vamosi
eb33596d02 add USE_LV_USER_DATA_SINGLE/MULTI 2019-02-25 07:06:05 +01:00
Gabor Kiss-Vamosi
663b8d6c89 fix conflicts 2019-02-25 06:59:31 +01:00
Gabor Kiss-Vamosi
ca2a2e9c49 fix conflicts 2019-02-25 06:56:49 +01:00
Gabor Kiss-Vamosi
54778eb303 update lv_conf files 2019-02-25 06:50:20 +01:00
Gabor Kiss-Vamosi
72288f4450 i18n: fix warnings 2019-02-24 22:27:51 +01:00
Gabor Kiss-Vamosi
c59c71b5c9 Merge branch 'dev-6.0' into i18n 2019-02-24 22:23:39 +01:00
Gabor Kiss-Vamosi
e7a14993c7 Merge branch 'new_fit' into dev-6.0 2019-02-24 22:23:12 +01:00
Gabor Kiss-Vamosi
408ba8d574 i18n: minor API updates 2019-02-24 22:22:37 +01:00
Gabor Kiss-Vamosi
054e43e6e9 indev/disp cb: pass driver as first argument 2019-02-24 21:20:51 +01:00
Gabor Kiss-Vamosi
9141d95865 lv_cont: inform children about parent size change on autofit 2019-02-24 07:06:22 +01:00
Gabor Kiss-Vamosi
ddbd8386d2 lv_page: fixes when child is added 2019-02-24 06:41:00 +01:00
Gabor Kiss-Vamosi
285ff7d3b4 lv_cont: improve fit with TIGHT, FLOOD, FILL 2019-02-24 06:24:36 +01:00
Themba Dube
5f94480bfb Don't check LV_LOG_LEVEL unless USE_LV_LOG is enabled 2019-02-22 12:10:17 -05:00
Themba Dube
7cfa099ec3 Merge remote-tracking branch 'origin/master' into dev-6.0 2019-02-22 12:02:23 -05:00
Themba Dube
7e60fcb298 Merge remote-tracking branch 'origin/master' into dev-6.0 2019-02-22 12:00:58 -05:00
Gabor Kiss-Vamosi
9264cd9d56 Merge branch 'multi-disp' of https://github.com/littlevgl/lvgl into multi-disp 2019-02-22 14:22:23 +01:00
Gabor Kiss-Vamosi
c34d5a4f6b init disp resolution 2019-02-22 14:22:11 +01:00
embeddedt
4a6e34dcbd Merge pull request #883 from manison/patch/ta-fix-crash-uninit-field
Fix crash on uninitialized field in text area
2019-02-21 10:55:30 -05:00
Themba Dube
7f6131d440 Merge remote-tracking branch 'zavovi/master' into dev-6.0 2019-02-21 10:40:59 -05:00
embeddedt
1f25bfb60b Merge pull request #879 from manison/patch/focus-visible-objects-only
Modify lv_group_focus_next/prev so that hidden objects don't receive focus
2019-02-21 10:38:28 -05:00
manison
a1e062bc49 ta: fix crash on uninitialized field 2019-02-21 15:21:53 +01:00
Gabor Kiss-Vamosi
438e665c6d Merge pull request #881 from manison/patch/multidisp-fix-vla-errs
Fix compilation errors when compiler does not support VLAs
2019-02-21 14:47:39 +01:00
manison
fd6e5ae3ef fix compilation errors when compiler does not support VLAs 2019-02-21 13:46:32 +01:00
Gabor Kiss-Vamosi
b9ed89a976 i18n add const prefixes where required 2019-02-21 12:37:33 +01:00
manison
000cc9d92f modify lv_group_focus_next/prev so that hidden objects don't receive focus 2019-02-21 10:18:17 +01:00
Gabor Kiss-Vamosi
69456cd3f5 minor fixes 2019-02-21 00:50:14 +01:00
Gabor Kiss-Vamosi
d27dfbd6d7 update README 2019-02-21 00:50:06 +01:00
Gabor Kiss-Vamosi
0ccaac4e00 updade lv_conf_templ.h 2019-02-21 00:21:59 +01:00
Gabor Kiss-Vamosi
030fe60b34 multi-disp: API updates 2019-02-20 23:58:13 +01:00
embeddedt
28b97582b6 Merge pull request #873 from manison/patch/fix-press-from-keypad
Text area should ignore presses generated by keypad input device
2019-02-20 12:36:13 -05:00
manison
236f9291be ta ignores presses generated by keypad input device
fixes bug introduced in 4f50a5a: when the LV_SIGNAL_PRESSED is generated by keypad input device (through LV_GROUP_KEY_ENTER key), it does not carry information about position (the position information is overlayed with key information in lv_indev_proc_t struct in this case), so we cannot touch it
2019-02-20 17:08:38 +01:00
Gabor Kiss-Vamosi
fcf1d52e4a replace lv_lang with more advanced lv_i18n 2019-02-20 12:55:21 +01:00
Gabor Kiss-Vamosi
f2bd701927 multi-disp: API updates 2019-02-20 10:16:33 +01:00
Gabor Kiss-Vamosi
8581a249bd lv_group_create: inititalize missing fields 2019-02-20 06:20:29 +01:00
canardos
688cd79a55 Update function documentation for clarity 2019-02-20 03:32:37 +08:00
canardos
d5f7f3d51c Fix incorrect iterators 2019-02-20 03:29:53 +08:00
canardos
1b519cd104 Add const qualifier to lv_btnm_set_map / static functions 2019-02-19 15:06:23 +08:00
canardos
a6d8d1cbc5 Implement lv_btnm_set_ctrl_map. Update function documentation 2019-02-19 14:56:45 +08:00
Gabor Kiss-Vamosi
a494521d7b Merge branch 'dev-6.0' into manison-feature/theme_focus_cb 2019-02-19 07:03:31 +01:00
Themba Dube
99825aa29f Merge branch 'master' into dev-6.0 2019-02-18 12:18:16 -05:00
manison
df88e319a8 fixed compilation errors when USE_LV_GROUP == 0 2019-02-18 08:34:41 +01:00
manison
5dfac5a92b use memcpy rather than structure assignment, since this might not be supported by all compilers 2019-02-18 08:24:51 +01:00
Themba Dube
62e58a25c9 Merge branch 'master' into dev-6.0 2019-02-17 14:58:32 -05:00
Gabor Kiss-Vamosi
2af6ca8833 Merge pull request #841 from muhammetasan/master
10 times faster int to string implementation
2019-02-15 15:09:53 +01:00
manison
f9d8269274 update theme focus styles 2019-02-15 09:54:47 +01:00
manison
3c7b6ae94c copy default style modifiers to all themes 2019-02-15 08:59:53 +01:00
manison
8ec60fbe3e add groups to the linked list
https://github.com/littlevgl/lvgl/issues/806
2019-02-15 08:46:12 +01:00
manison
79dc8b2ace Merge branch 'dev-6.0' into feature/theme_focus_cb 2019-02-15 08:04:54 +01:00
Gabor Kiss-Vamosi
ef8563c9bd multi-disp_: minor fixes 2019-02-15 06:20:48 +01:00
Muhammet Asan
533d39b4c2 10 times faster int to string implementation 2019-02-14 14:13:25 +01:00
Themba Dube
48bd4fecc6 Merge branch 'master' into dev-6.0 2019-02-13 18:20:06 -05:00
Gabor Kiss-Vamosi
673892cd80 multi-disp: unique VDB to displays 2019-02-13 01:40:22 +01:00
Gabor Kiss-Vamosi
cfa7d22d33 multi-disp: display level vdb experiment 2019-02-12 22:35:59 +01:00
manison
327d7c84ca added style modification callbacks to lv_theme_t struct
https://github.com/littlevgl/lvgl/issues/806
2019-02-12 16:35:17 +01:00
Gabor Kiss-Vamosi
7571bedc46 multi-disp: minor updates 2019-02-12 16:20:59 +01:00
Gabor Kiss-Vamosi
b15ffa3d89 multi-disp: add unique inv_buf to each display 2019-02-12 15:38:13 +01:00
manison
c94fb96bb2 fix theme initialization 2019-02-12 15:02:43 +01:00
Gabor Kiss-Vamosi
8c4e4c3861 multi-disp: refresh multiple displays 2019-02-12 12:21:34 +01:00
canardos
fa736411e3 Move control byte to separate array and add functions to modify dynamically 2019-02-12 16:55:30 +08:00
manison
728cd17275 determine required size of the th_styles array at compile time and remove runtime assertion
https://github.com/littlevgl/lvgl/issues/806
2019-02-12 09:04:24 +01:00
manison
44e5cc446c moved theme styles into substructure within lv_theme_t
https://github.com/littlevgl/lvgl/issues/806
2019-02-11 09:35:06 +01:00
Gabor Kiss-Vamosi
5b92b4d01b move basic descriptors to lv_disp_t 2019-02-10 11:06:47 +01:00
Gabor Kiss-Vamosi
e2e6479fb0 multi_disp: add dynamic hor/ver res 2019-02-07 19:17:10 +01:00
embeddedt
89e8995dc4 Merge branch 'master' into dev-6.0
Merges bugfixes from 5.3.
2019-02-07 10:38:08 -05:00
Gabor Kiss-Vamosi
57a542fcac Merge pull request #793 from MiSimon/feature_ta_placeholder_text
Placeholder text for lv_ta
2019-02-04 16:14:47 +01:00
Gabor Kiss-Vamosi
4f50a5a147 ta placeholder: fixes 2019-02-03 01:33:21 +01:00
Gabor Kiss-Vamosi
2692100bb1 multi-disp: minor update 2019-02-03 00:47:50 +01:00
Gabor Kiss-Vamosi
e7fcb58bec Merge pull request #789 from MiSimon/feature_ta_place_cursor_on_click
Position the text cursor when a lv_ta object is clicked
2019-02-03 00:43:07 +01:00
Gabor Kiss-Vamosi
2752b51d50 Merge pull request #788 from MiSimon/feature_ta_ctrl_keys
Added POS1 and END support to lv_ta
2019-02-03 00:40:34 +01:00
MiSimon
a71964f0b2 Removed some spaces 2019-02-02 23:25:11 +01:00
MiSimon
43b20179ed removed code duplication 2019-02-02 22:59:28 +01:00
MiSimon
0d76cc4ef3 Changed POS1 to HOME 2019-02-02 22:45:02 +01:00
Gabor Kiss-Vamosi
cfe0c14e56 ta click: add to lv_ta_signal too 2019-02-02 05:11:18 +01:00
Gabor Kiss-Vamosi
1e6dc74c5a lv_ta click simplification 2019-02-02 05:00:59 +01:00
Gabor Kiss-Vamosi
e1afa61128 multi-disp: inital changes 2019-02-02 04:46:19 +01:00
MiSimon
8acc122ab0 Added placeholder label to text area 2019-02-02 01:26:52 +01:00
MiSimon
4e61a2da33 Fixed missing NULL check 2019-02-02 00:21:50 +01:00
MiSimon
dc9cffec5d Position cursor at the position at which lv_ta was clicked 2019-02-02 00:19:18 +01:00
MiSimon
86b34460dd Added POS1 and END support to lv_ta 2019-02-01 23:53:09 +01:00
435 changed files with 233764 additions and 198431 deletions

1
.github/FUNDING.yml vendored Normal file
View File

@@ -0,0 +1 @@
custom: ["https://paypal.me/littlevgl?locale.x=en_US"]

View File

@@ -7,6 +7,8 @@ assignees: ''
---
> # Important: issues that don't use this template will be ignored/closed.
**Describe the bug**
A clear and concise description of what the bug is.

14
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@@ -0,0 +1,14 @@
blank_issues_enabled: false
contact_links:
- name: Documentation
url: https://docs.lvgl.io
about: Be sure to read to documentation first
- name: Forum
url: https://forum.lvgl.io
about: For how-to questions use the forum
- name: CONTIBUTING.md
url: https://github.com/lvgl/lvgl/blob/master/docs/CONTRIBUTING.md#faq-about-contributing
about: The basic rules of contributing
- name: CODING_STYLE.md
url: https://github.com/lvgl/lvgl/blob/master/docs/CODING_STYLE.md
about: Quick summary of LVGL's code style

12
.github/auto-comment.yml vendored Normal file
View File

@@ -0,0 +1,12 @@
# Comment to a new issue.
pullRequestOpened: |
Thank you for raising your pull request.
To ensure that all licensing criteria is met all repositories of the LVGL project apply a process called DCO (Developer's Certificate of Origin).
The text of DCO can be read here: https://developercertificate.org/
For a more detailed description see the [Documentation](https://docs.lvgl.io/latest/en/html/contributing/index.html#developer-certification-of-origin-dco) site.
By contributing to any repositories of the LVGL project you state that your contribution corresponds with the DCO.
No further action is required if your contribution fulfills the DCO. If you are not sure about it feel free to ask us in a comment.

42
.github/workflows/build_micropython.yml vendored Normal file
View File

@@ -0,0 +1,42 @@
name: Build Micropython with LVGL submodule
on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master, dev ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install SDL
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install libsdl2-dev
- name: Clone lv_micropython
run: git clone https://github.com/lvgl/lv_micropython.git .
- name: Update submodules
run: git submodule update --init --recursive
- name: Checkout LVGL submodule
working-directory: ./lib/lv_bindings/lvgl
run: |
git fetch --force ${{ github.event.repository.git_url }} "+refs/heads/*:refs/remotes/origin/*"
git fetch --force ${{ github.event.repository.git_url }} "+refs/pull/*:refs/remotes/origin/pr/*"
git checkout ${{ github.sha }} || git checkout ${{ github.event.pull_request.head.sha }}
git submodule update --init --recursive
- name: Build mpy-cross
run: make -j $(nproc) -C mpy-cross
- name: Build the unix port
run: make -j $(nproc) -C ports/unix
- name: Run advanced_demo
run: >
echo "import gc,utime;
utime.sleep(5);
gc.collect();
utime.sleep(5)" |
ports/unix/micropython -i lib/lv_bindings/examples/advanced_demo.py

17
.github/workflows/ccpp.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: C/C++ CI
on:
push:
branches: [ master, dev ]
pull_request:
branches: [master, dev ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run tests
run: sudo apt-get install libpng-dev; cd tests; python ./build.py

17
.github/workflows/merge-to-dev.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
name: Merge master branch to dev
on:
push:
branches:
- 'master'
jobs:
merge-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Merge to dev branch
uses: devmasx/merge-branch@v1.1.0
with:
type: now
target_branch: 'dev'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

27
.github/workflows/release.yml vendored Normal file
View File

@@ -0,0 +1,27 @@
on:
push:
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Create Release
jobs:
build:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
See the [CHANGELOG](https://github.com/lvgl/lvgl/blob/master/CHANGELOG.md)
draft: false
prerelease: false

6
.gitignore vendored
View File

@@ -1,3 +1,9 @@
scripts/release/__pycache__
**/*.o
**/*bin
**/*.swp
**/*.swo
tags
docs/api_doc
scripts/cppcheck_res.txt
scripts/built_in_font/lv_font_*

321
CHANGELOG.md Normal file
View File

@@ -0,0 +1,321 @@
# Changelog
## v7.7.1 (04.11.2020)
### Bugfixes
- Respect btnmatrix's `one_check` in `lv_btnmatrix_set_btn_ctrl`
- Gauge: make the needle images to use the styles from `LV_GAUGE_PART_PART`
- Group: fix in `lv_group_remove_obj` to handle deleting hidden obejcts correctly
## v7.7.0 (20.10.2020)
### New features
- Add PXP GPU support (for NXP MCUs)
- Add VG-Lite GPU support (for NXP MCUs)
- Allow max. 16 cell types for table
- Add `lv_table_set_text_fmt()`
- Use margin on calendar header to set distances and padding to the size of the header
- Add `text_sel_bg` style proeprty
### Bugfixes
- Theme update to support text selection background
- Fix imgbtn state change
- Support RTL in table (draw columns right to left)
- Support RTL in pretty layout (draw columns right to left)
- Skip objects in groups if they are in disabled state
- Fix dropdown selection with RTL basedirection
- Fix rectangle border drawing with large width
- Fix `lv_win_clean()`
## v7.6.1 (06.10.2020)
### Bugfixes
- Fix BIDI support in dropdown list
- Fix copying base dir in `lv_obj_create`
- Handle sub pixel rendering in font loader
- Fix transitions with style caching
- Fix click focus
- Fix imgbtn image switching with empty style
- Material theme: do not set the text font to allow easy global font change
## v7.6.0 (22.09.2020)
### New features
- Check whether any style property has changed on a state change to decide if any redraw is required
### Bugfixes
- Fix selection of options with non-ASCII letters in dropdown list
- Fix font loader to support LV_FONT_FMT_TXT_LARGE
## v7.5.0 (15.09.2020)
### New features
- Add `clean_dcache_cb` and `lv_disp_clean_dcache` to enable users to use their own cache management function
- Add `gpu_wait_cb` to wait until the GPU is working. It allows to run CPU a wait only when the rendered data is needed.
- Add 10px and 8ox built in fonts
### Bugfixes
- Fix unexpeted DEFOCUS on lv_page when clicking to bg after the scrollable
- Fix `lv_obj_del` and `lv_obj_clean` if the children list changed during deletion.
- Adjust button matrix button width to include padding when spanning multiple units.
- Add rounding to btnmatrix line height calculation
- Add `decmopr_buf` to GC roots
- Fix divisioin by zero in draw_pattern (lv_draw_rect.c) if the image or letter is not found
- Fix drawing images with 1 px height or width
## v7.4.0 (01.09.2020)
The main new features of v7.4 are run-time font loading, style caching and arc knob with value setting by click.
### New features
- Add `lv_font_load()` function - Loads a `lv_font_t` object from a binary font file
- Add `lv_font_free()` function - Frees the memory allocated by the `lv_font_load()` function
- Add style caching to reduce acces time of properties with default value
- arc: add set value by click feature
- arc: add `LV_ARC_PART_KNOB` similarly to slider
- send gestures even if the the obejct was dragged. User can check dragging with `lv_indev_is_dragging(lv_indev_act())` in the event function.
### Bugfixes
- Fix color bleeding on border drawing
- Fix using 'LV_SCROLLBAR_UNHIDE' after 'LV_SCROLLBAR_ON'
- Fix croping of last column/row if an image is zoomed
- Fix zooming and rotateing mosaic images
- Fix deleting tabview with LEFT/RIGHT tab position
- Fix btnmatrix to not send event when CLICK_TRIG = true and the cursor slid from a pressed button
- Fix roller width if selected text is larger than the normal
## v7.3.1 (18.08.2020)
### Bugfixes
- Fix drawing value string twice
- Rename `lv_chart_clear_serie` to `lv_chart_clear_series` and `lv_obj_align_origo` to `lv_obj_align_mid`
- Add linemeter's mirror feature again
- Fix text decor (udnerline strikethrough) with older versions of font converter
- Fix setting local style property multiple times
- Add missing background drawing and radius handling to image button
- Allow adding extra label to list buttons
- Fix crash if `lv_table_set_col_cnt` is called before `lv_table_set_row_cnt` for the first time
- Fix overflow in large image transformations
- Limit extra button click area of button matrix's buttons. With large paddings it was counter intuitive. (Gaps are mapped to button when clicked).
- Fix `lv_btnmatrix_set_one_check` not forcing exactly one button to be checked
- Fix color picker invalidation in rectangle mode
- Init disabled days to gray color in calendar
## v7.3.0 (04.08.2020)
### New features
- Add `lv_task_get_next`
- Add `lv_event_send_refresh`, `lv_event_send_refresh_recursive` to easily send `LV_EVENT_REFRESH` to object
- Add `lv_tabview_set_tab_name()` function - used to change a tab's name
- Add `LV_THEME_MATERIAL_FLAG_NO_TRANSITION` and `LV_THEME_MATERIAL_FLAG_NO_FOCUS` flags
- Reduce code size by adding: `LV_USE_FONT_COMPRESSED` and `LV_FONT_USE_SUBPX` and applying some optimization
- Add `LV_MEMCPY_MEMSET_STD` to use standard `memcpy` and `memset`
### Bugfixes
- Do not print warning for missing glyph if its height OR width is zero.
- Prevent duplicated sending of `LV_EVENT_INSERT` from text area
- Tidy outer edges of cpicker widget.
- Remove duplicated lines from `lv_tabview_add_tab`
- btnmatrix: hadle combined states of buttons (e.g. chacked + disabled)
- textarea: fix typo in lv_textarea_set_sscrollbar_mode
- gauge: fix image needle drawing
- fix using freed memory in _lv_style_list_remove_style
## v7.2.0 (21.07.2020)
### New features
- Add screen transitions with `lv_scr_load_anim()`
- Add display background color, wallpaper and opacity. Shown when the screen is transparent. Can be used with `lv_disp_set_bg_opa/color/image()`.
- Add `LV_CALENDAR_WEEK_STARTS_MONDAY`
- Add `lv_chart_set_x_start_point()` function - Set the index of the x-axis start point in the data array
- Add `lv_chart_set_ext_array()` function - Set an external array of data points to use for the chart
- Add `lv_chart_set_point_id()` function - Set an individual point value in the chart series directly based on index
- Add `lv_chart_get_x_start_point()` function - Get the current index of the x-axis start point in the data array
- Add `lv_chart_get_point_id()` function - Get an individual point value in the chart series directly based on index
- Add `ext_buf_assigned` bit field to `lv_chart_series_t` structure - it's true if external buffer is assigned to series
- Add `lv_chart_set_series_axis()` to assign series to primary or secondary axis
- Add `lv_chart_set_y_range()` to allow setting range of secondary y axis (based on `lv_chart_set_range` but extended with an axis parameter)
- Allow setting different font for the selected text in `lv_roller`
- Add `theme->apply_cb` to replace `theme->apply_xcb` to make it compatible with the MicroPython binding
- Add `lv_theme_set_base()` to allow easy extension of built-in (or any) themes
- Add `lv_obj_align_x()` and `lv_obj_align_y()` functions
- Add `lv_obj_align_origo_x()` and `lv_obj_align_origo_y()` functions
### Bugfixes
- `tileview` fix navigation when not screen sized
- Use 14px font by default to for better compatibility with smaller displays
- `linemeter` fix conversation of current value to "level"
- Fix drawing on right border
- Set the cursor image non clickable by default
- Improve mono theme when used with keyboard or encoder
## v7.1.0 (07.07.2020)
### New features
- Add `focus_parent` attribute to `lv_obj`
- Allow using buttons in encoder input device
- Add lv_btnmatrix_set/get_align capability
- DMA2D: Remove dependency on ST CubeMX HAL
- Added `max_used` propriety to `lv_mem_monitor_t` struct
- In `lv_init` test if the the strings are UTF-8 encoded.
- Add `user_data` to themes
- Add LV_BIG_ENDIAN_SYSTEM flag to lv_conf.h in order to fix displaying images on big endian systems.
- Add inline function lv_checkbox_get_state(const lv_obj_t * cb) to extend the checkbox functionality.
- Add inline function lv_checkbox_set_state(const lv_obj_t * cb, lv_btn_state_t state ) to extend the checkbox functionality.
### Bugfixes
- `lv_img` fix invalidation area when angle or zoom changes
- Update the style handling to support Big endian MCUs
- Change some methods to support big endian hardware.
- remove use of c++ keyword 'new' in parameter of function lv_theme_set_base().
- Add LV_BIG_ENDIAN_SYSTEM flag to lv_conf.h in order to fix displaying images on big endian systems.
- Fix inserting chars in text area in big endian hardware.
## v7.0.2 (16.06.2020)
### Bugfixes
- `lv_textarea` fix wrong cursor position when clicked after the last character
- Change all text related indices from 16-bit to 32-bit integers throughout whole library. #1545
- Fix gestures
- Do not call `set_px_cb` for transparent pixel
- Fix list button focus in material theme
- Fix crash when the a text area is cleared with the backspace of a keyboard
- Add version number to `lv_conf_template.h`
- Add log in true double buffering mode with `set_px_cb`
- `lv_dropdown`: fix missing `LV_EVENT_VALUE_CHANGED` event when used with encoder
- `lv_tileview`: fix if not the {0;0} tile is created first
- `lv_debug`: restructure to allow asserting in from `lv_misc` too
- add assert if `_lv_mem_buf_get()` fails
- `lv_textarea`: fix character delete in password mode
- Update `LV_OPA_MIN` and `LV_OPA_MAX` to widen the opacity processed range
- `lv_btnm` fix sending events for hidden buttons
- `lv_gaguge` make `lv_gauge_set_angle_offset` offset the labels and needles too
- Fix typo in the API `scrllable` -> `scrollable`
- `tabview` by default allow auto expanding the page only to right and bottom (#1573)
- fix crash when drawing gradient to the same color
- chart: fix memory leak
- `img`: improve hit test for transformed images
## v7.0.1 (01.06.2020)
### Bugfixes
- Make the Microptyhon working by adding the required variables as GC_ROOT
- Prefix some internal API functions with `_` to reduce the API of LVGL
- Fix built-in SimSun CJK font
- Fix UTF-8 encoding when `LV_USE_ARABIC_PERSIAN_CHARS` is enabled
- Fix DMA2D usage when 32 bit images directly blended
- Fix lv_roller in infinite mode when used with encoder
- Add `lv_theme_get_color_secondary()`
- Add `LV_COLOR_MIX_ROUND_OFS` to adjust color mixing to make it compatible with the GPU
- Improve DMA2D blending
- Remove memcpy from `lv_ll` (caused issues with some optimization settings)
- `lv_chart` fix X tick drawing
- Fix vertical dashed line drawing
- Some additonal minor fixes and formattings
## v7.0.0 (18.05.2020)
### Documentation
The docs for v7 is available at https://docs.littlevgl.com/v7/en/html/index.html
### Legal changes
The name of the project is changed to LVGL and the new website is on https://lvgl.io
LVGL remains free under the same conditions (MIT license) and a company is created to manage LVGL and offer services.
### New drawing system
Complete rework of LVGL's draw engine to use "masks" for more advanced and higher quality graphical effects.
A possible use-case of this system is to remove the overflowing content from the rounded edges.
It also allows drawing perfectly anti-aliased circles, lines, and arcs.
Internally, the drawings happen by defining masks (such as rounded rectangle, line, angle).
When something is drawn the currently active masks can make some pixels transparent.
For example, rectangle borders are drawn by using 2 rectangle masks: one mask removes the inner part and another the outer part.
The API in this regard remained the same but some new functions were added:
- `lv_img_set_zoom`: set image object's zoom factor
- `lv_img_set_angle`: set image object's angle without using canvas
- `lv_img_set_pivot`: set the pivot point of rotation
The new drawing engine brought new drawing features too. They are highlighted in the "style" section.
### New style system
The old style system is replaced with a new more flexible and lightweighted one.
It uses an approach similar to CSS: support cascading styles, inheriting properties and local style properties per object.
As part of these updates, a lot of objects were reworked and the APIs have been changed.
- more shadows options: *offset* and *spread*
- gradient stop position to shift the gradient area and horizontal gradient
- `LV_BLEND_MODE_NORMAL/ADDITIVE/SUBTRACTIVE` blending modes
- *clip corner*: crop the content on the rounded corners
- *text underline* and *strikethrough*
- dashed vertical and horizontal lines (*dash gap*, *dash_width*)
- *outline*: a border-like part drawn out of the background. Can have spacing to the background.
- *pattern*: display and image in the middle of the background or repeat it
- *value* display a text which is stored in the style. It can be used e.g. as a lighweighted text on buttons too.
- *margin*: similar to *padding* but used to keep space outside of the object
Read the [Style](https://docs.littlevgl.com/v7/en/html/overview/style.html) section of the documentation to learn how the new styles system works.
### GPU integration
To better utilize GPUs, from this version GPU usage can be integrated into LVGL. In `lv_conf.h` any supported GPUs can be enabled with a single configuration option.
Right now, only ST's DMA2D (Chrom-ART) is integrated. More will in the upcoming releases.
### Renames
The following object types are renamed:
- sw -> switch
- ta -> textarea
- cb -> checkbox
- lmeter -> linemeter
- mbox -> msgbox
- ddlist -> dropdown
- btnm -> btnmatrix
- kb -> keyboard
- preload -> spinner
- lv_objx folder -> lv_widgets
- LV_FIT_FILL -> LV_FIT_PARENT
- LV_FIT_FLOOD -> LV_FLOOD_MAX
- LV_LAYOUT_COL_L/M/R -> LV_LAYOUT_COLUMN_LEFT/MID/RIGHT
- LV_LAYOUT_ROW_T/M/B -> LV_LAYOUT_ROW_TOP/MID/BOTTOM
### Reworked and improved object
- `dropdown`: Completely reworked. Now creates a separate list when opened and can be dropped to down/up/left/right.
- `label`: `body_draw` is removed, instead, if its style has a visible background/border/shadow etc it will be drawn. Padding really makes the object larger (not just virtually as before)
- `arc`: can draw bacground too.
- `btn`: doesn't store styles for each state because it's done naturally in the new style system.
- `calendar`: highlight the pressed datum. The used styles are changed: use `LV_CALENDAR_PART_DATE` normal for normal dates, checked for highlighted, focused for today, pressed for the being pressed. (checked+pressed, focused+pressed also work)
- `chart`: only has `LINE` and `COLUMN` types because with new styles all the others can be described. LV_CHART_PART_SERIES sets the style of the series. bg_opa > 0 draws an area in LINE mode. `LV_CHART_PART_SERIES_BG` also added to set a different style for the series area. Padding in `LV_CHART_PART_BG` makes the series area smaller, and it ensures space for axis labels/numbers.
- `linemeter`, `gauge`: can have background if the related style properties are set. Padding makes the scale/lines smaller. scale_border_width and scale_end_border_width allow to draw an arc on the outer part of the scale lines.
- `gauge`: `lv_gauge_set_needle_img` allows use image as needle
- `canvas`: allow drawing to true color alpha and alpha only canvas, add `lv_canvas_blur_hor/ver` and rename `lv_canvas_rotate` to `lv_canvas_transform`
- `textarea`: If available in the font use bullet (`U+2022`) character in text area password
### New object types
- `lv_objmask`: masks can be added to it. The children will be masked accordingly.
### Others
- Change the built-in fonts to [Montserrat](https://fonts.google.com/specimen/Montserrat) and add built-in fonts from 12 px to 48 px for every 2nd size.
- Add example CJK and Arabic/Persian/Hebrew built-in font
- Add ° and "bullet" to the built-in fonts
- Add Arabic/Persian script support: change the character according to its position in the text.
- Add `playback_time` to animations.
- Add `repeat_count` to animations instead of the current "repeat forever".
- Replace `LV_LAYOUT_PRETTY` with `LV_LAYOUT_PRETTY_TOP/MID/BOTTOM`
### Demos
- [lv_examples](https://github.com/littlevgl/lv_examples) was reworked and new examples and demos were added
### New release policy
- Maintain this Changelog for every release
- Save old major version in new branches. E.g. `release/v6`
- Merge new features and fixes directly into `master` and release a patch or minor releases every 2 weeks.
### Migrating from v6 to v7
- First and foremost, create a new `lv_conf.h` based on `lv_conf_template.h`.
- To try the new version it suggested using a simulator project and see the examples.
- If you have a running project, the most difficult part of the migration is updating to the new style system. Unfortunately, there is no better way than manually updating to the new format.
- The other parts are mainly minor renames and refactoring as described above.

View File

@@ -1,5 +1,5 @@
MIT licence
Copyright (c) 2016 Gábor Kiss-Vámosi
Copyright (c) 2020 LVGL LLC
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

288
README.md
View File

@@ -1,178 +1,147 @@
<h1 align="center"> LittlevGL - Open-source Embedded GUI Library</h1>
<h1 align="center"> LVGL - Light and Versatile Graphics Library</h1>
<p align="center">
<a href="https://github.com/littlevgl/lvgl/blob/master/LICENCE.txt"><img src="https://img.shields.io/badge/licence-MIT-blue.svg"></a>
<a href="https://github.com/littlevgl/lvgl/releases/tag/v5.3"><img src="https://img.shields.io/badge/version-5.3-blue.svg"></a>
<br>
<img src="https://user-images.githubusercontent.com/42941056/109342022-428df280-7839-11eb-89f7-a476495f8e9c.gif">
<img src="https://lvgl.io/assets/images/img_1.png">
</p>
<p align="center">
LittlevGL provides everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint.
LVGL provides everything you need to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint.
</p>
<h4><a href="https://github.com/lvgl/docs_old/raw/release/v6/en/docs_v5_3.zip">Documentation</a></h4>
<h4 align="center">
<a href="https://lvgl.io">Website </a> &middot;
<a href="https://lvgl.io/demos">Online demo</a> &middot;
<a href="https://docs.lvgl.io/">Docs</a> &middot;
<a href="https://forum.lvgl.io">Forum</a>
</h4>
<!--
<p align="center">
:star: Star the project if you like it! And share with your friends <a href="https://twitter.com/intent/tweet?text=LittlevGL%20is%20a%20free%20and%20open%20source%20embedded%20GUI%20library%20with%20easy-to-use%20graphical%20elements,%20beautiful%20visual%20effects%20and%20low%20memory%20footprint.&url=https://littlevgl.com/&hashtags=littlevgl,embedded,gui,free,opensource"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social"></a>
</p>
-->
---
### Features
* **Powerful building blocks** buttons, charts, lists, sliders, images, etc.
* **Advanced graphics** with animations, anti-aliasing, opacity, smooth scrolling
* **Various input devices** touch pad, mouse, keyboard, encoder, buttons, etc.
* **Multi-language support** with UTF-8 encoding
* **Fully customizable** graphical elements
* **Hardware independent** to use with any microcontroller or display
* **Scalable** to operate with little memory (64 kB Flash, 10 kB RAM)
* **OS, External memory and GPU** supported but not required
* **Single frame buffer** operation even with advances graphical effects
* **Written in C** for maximal compatibility
* **Micropython Binding** exposes [LittlevGL API in Micropython](https://blog.littlevgl.com/2019-02-20/micropython-bindings)
* **Simulator** to develop on PC without embedded hardware
* **Tutorials, examples, themes** for rapid development
* **Documentation** and API references online
## Features
* Powerful [building blocks](https://docs.lvgl.io/latest/en/html/widgets/index.html): buttons, charts, lists, sliders, images, etc.
* Advanced graphics: animations, anti-aliasing, opacity, smooth scrolling
* Use [various input devices](https://docs.lvgl.io/latest/en/html/overview/indev.html): touchscreen, mouse, keyboard, encoder, buttons, etc.
* Use [multiple displays](https://docs.lvgl.io/latest/en/html/overview/display.html): e.g. monochrome and color display
* Hardware independent to use with any microcontroller or display
* Scalable to operate with little memory (64 kB Flash, 10 kB RAM)
* Multi-language support with UTF-8 handling, Bidirectional and Arabic script support
* Fully customizable graphical elements via [CSS-like styles](https://docs.lvgl.io/latest/en/html/overview/style.html)
* OS, External memory and GPU are supported but not required
* Smooth rendering even with a [single frame buffer](https://docs.lvgl.io/latest/en/html/porting/display.html)
* Written in C for maximal compatibility (C++ compatible)
* Micropython Binding exposes [LVGL API in Micropython](https://blog.lvgl.io/2019-02-20/micropython-bindings)
* [Simulator](https://docs.lvgl.io/latest/en/html/get-started/pc-simulator.html) to develop on PC without embedded hardware
* [Examples](lv_examples) and tutorials for rapid development
* [Documentation](http://docs.lvgl.io/) and API references
### Supported devices
Basically, every modern controller - which is able to drive a display - is suitable to run LittlevGL. The minimal requirements:
- **16, 32 or 64-bit** microcontroller or processor
- **&gt; 16 MHz** clock speed
- **&gt; 8 kB RAM for static data** and **&gt; 2 KB RAM for dynamic data** (graphical objects)
- **&gt; 64 kB flash** program memory
- **Optionally ~1/10 screen sized memory** for buffered drawing (on 240 × 320, 16-bit colors it's 15 kB)
## Requirements
Basically, every modern controller (which is able to drive a display) is suitable to run LVGL. The minimal requirements are:
Just to mention some **platforms**:
- STM32F1, STM32F3, [STM32F4](https://blog.littlevgl.com/2017-07-15/stm32f429_disco_port), [STM32F7](https://github.com/littlevgl/stm32f746_disco_no_os_sw4stm32)
<table>
<tr>
<td> <strong>Name</strong> </td>
<td><strong>Minimal</strong></td>
<td><strong>Recommended</strong></td>
</tr>
<tr>
<td><strong>Architecture</strong></td>
<td colspan="2">16, 32 or 64 bit microcontroller or processor</td>
</tr>
<tr>
<td> <strong>Clock</strong></td>
<td> &gt; 16 MHz </td>
<td> &gt; 48 MHz</td>
</tr>
<tr>
<td> <strong>Flash/ROM</strong></td>
<td> &gt; 64 kB </td>
<td> &gt; 180 kB</td>
</tr>
<tr>
<td> <strong>Static RAM</strong></td>
<td> &gt; 2 kB </td>
<td> &gt; 4 kB</td>
</tr>
<tr>
<td> <strong>Stack</strong></td>
<td> &gt; 2 kB </td>
<td> &gt; 8 kB</td>
</tr>
<tr>
<td> <strong>Heap</strong></td>
<td> &gt; 2 kB </td>
<td> &gt; 8 kB</td>
</tr>
<tr>
<td> <strong>Display buffer</strong></td>
<td> &gt; 1 &times; <em>hor. res.</em> pixels </td>
<td> &gt; 10 &times; <em>hor. res.</em> pixels </td>
</tr>
<tr>
<td> <strong>Compiler</strong></td>
<td colspan="2"> C99 or newer </td>
</tr>
</table>
*Note that the memory usage might vary depending on the architecture, compiler and build options.*
Just to mention some platforms:
- STM32F1, STM32F3, STM32F4, STM32F7, STM32L4, STM32L5, STM32H7
- Microchip dsPIC33, PIC24, PIC32MX, PIC32MZ
- NXP Kinetis, LPC, iMX
- [Linux frame buffer](https://blog.littlevgl.com/2018-01-03/linux_fb) (/dev/fb)
- [Raspberry PI](http://www.vk3erw.com/index.php/16-software/63-raspberry-pi-official-7-touchscreen-and-littlevgl)
- [Espressif ESP32](https://github.com/littlevgl/esp32_ili9431)
- Nordic nrf52
- Quectell M66
- NXP: Kinetis, LPC, iMX, iMX RT
- [Linux frame buffer](https://blog.lvgl.io/2018-01-03/linux_fb) (/dev/fb)
- [Raspberry Pi](http://www.vk3erw.com/index.php/16-software/63-raspberry-pi-official-7-touchscreen-and-littlevgl)
- [Espressif ESP32](https://github.com/lvgl/lv_port_esp32)
- [Infineon Aurix](https://github.com/lvgl/lv_port_aurix)
- Nordic NRF52 Bluetooth modules
- Quectel modems
### Quick start in a simulator
The easiest way to get started with LittlevGL is to run it in a simulator on your PC without any embedded hardware.
## Get started
This list shows the recommended way of learning the library:
1. Check the [Online demos](https://lvgl.io/demos) to see LVGL in action (3 minutes)
2. Read the [Introduction](https://docs.lvgl.io/latest/en/html/intro/index.html) page of the documentation (5 minutes)
3. Get familiar with the basics on the [Quick overview](https://docs.lvgl.io/latest/en/html/get-started/quick-overview.html) page (15 minutes)
4. Set up a [Simulator](https://docs.lvgl.io/latest/en/html/get-started/pc-simulator.html) (10 minutes)
5. Try out some [Examples](https://github.com/lvgl/lv_examples/)
6. Port LVGL to a board. See the [Porting](https://docs.lvgl.io/latest/en/html/porting/index.html) guide or check the ready to use [Projects](https://github.com/lvgl?q=lv_port_&type=&language=)
7. Read the [Overview](https://docs.lvgl.io/latest/en/html/overview/index.html) page to get a better understanding of the library (2-3 hours)
8. Check the documentation of the [Widgets](https://docs.lvgl.io/latest/en/html/widgets/index.html) to see their features and usage
9. If you have questions go to the [Forum](http://forum.lvgl.io/)
10. Read the [Contributing](https://docs.lvgl.io/latest/en/html/contributing/index.html) guide to see how you can help to improve LVGL (15 minutes)
Choose a project with your favourite IDE:
## Examples
| Eclipse | CodeBlocks | Visual Studio | PlatformIO | Qt Creator |
|-------------|-------------|---------------|-----------|------------|
| [![Eclipse](https://littlevgl.com/logo/ide/eclipse.jpg)](https://github.com/littlevgl/pc_simulator_sdl_eclipse) | [![CodeBlocks](https://littlevgl.com/logo/ide/codeblocks.jpg)](https://github.com/littlevgl/pc_simulator_win_codeblocks) | [![VisualStudio](https://littlevgl.com/logo/ide/visualstudio.jpg)](https://github.com/littlevgl/visual_studio_2017_sdl_x64) | [![PlatformIO](https://littlevgl.com/logo/ide/platformio.jpg)](https://github.com/littlevgl/pc_simulator_sdl_platformio) | [![QtCreator](https://littlevgl.com/logo/ide/qtcreator.jpg)](https://blog.littlevgl.com/2019-01-03/qt-creator) |
| Cross-platform<br>with SDL | Native Windows | Cross-platform<br>with SDL | Cross-platform<br>with SDL | Cross-platform<br>with SDL |
For more examples see the [lv_examples](https://github.com/lvgl/lv_examples) repository.
### Porting to an embedded hardware
In the most simple case you need to do these steps:
1. Copy `lv_conf_templ.h` as `lv_conf.h` next to `lvgl` and set at least `LV_HOR_RES`, `LV_VER_RES` and `LV_COLOR_DEPTH`.
2. Call `lv_tick_inc(x)` every `x` milliseconds **in a Timer or Task** (`x` should be between 1 and 10). It is required for the internal timing of LittlevGL. **It's very important that you don't call `lv_task_handler` in the same loop.**
3. Call `lv_init()`
4. Register a function which can **copy a pixel array** to an area of the screen:
### Button with label
```c
lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
disp_drv.disp_flush = disp_flush; /*Set your driver function*/
lv_disp_drv_register(&disp_drv); /*Finally register the driver*/
void disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p)
{
int32_t x, y;
for(y = y1; y <= y2; y++) {
for(x = x1; x <= x2; x++) {
sep_pixel(x, y, *color_p); /* Put a pixel to the display.*/
color_p++;
}
}
lv_flush_ready(); /* Tell you are ready with the flushing*/
}
```
5. Register a function which can **read an input device**. E.g. for a touch pad:
```c
lv_indev_drv_init(&indev_drv); /*Descriptor of a input device driver*/
indev_drv.type = LV_INDEV_TYPE_POINTER; /*Touch pad is a pointer-like device*/
indev_drv.read = touchpad_read; /*Set your driver function*/
lv_indev_drv_register(&indev_drv); /*Finally register the driver*/
bool touchpad_read(lv_indev_data_t * data)
{
static lv_coord_t last_x = 0;
static lv_coord_t last_y = 0;
/*Save the state and save the pressed coordinate*/
data->state = touchpad_is_pressed() ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL;
if(data->state == LV_INDEV_STATE_PR) touchpad_get_xy(&last_x, &last_y);
/*Set the coordinates (if released use the last pressed coordinates)*/
data->point.x = last_x;
data->point.y = last_y;
return false; /*Return `false` because we are not buffering and no more data to read*/
}
```
6. Call `lv_task_handler()` periodically every few milliseconds in the main `while(1)` loop, in Timer interrupt or in an Operation system task. It will redraw the screen if required, handle input devices etc. **It's very important that you don't call `lv_tick_inc` in the same loop.**
For a detailed description check the [Documentation](https://docs.littlevgl.com/#Porting) or the [Porting tutorial](https://github.com/littlevgl/lv_examples/blob/master/lv_tutorial/0_porting/lv_tutorial_porting.c)
### Code examples
#### Create a button with a label and assign a click callback
```c
lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL); /*Add a button the current screen*/
lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL); /*Add a button to the current screen*/
lv_obj_set_pos(btn, 10, 10); /*Set its position*/
lv_obj_set_size(btn, 100, 50); /*Set its size*/
lv_obj_set_event_cb(btn, btn_event_cb); /*Assign a callback to the button*/
lv_btn_set_action(btn, LV_BTN_ACTION_CLICK, btn_action);/*Assign a callback to the button*/
lv_obj_t * label = lv_label_create(btn, NULL); /*Add a label to the button*/
lv_label_set_text(label, "Button"); /*Set the labels text*/
lv_res_t btn_action(lv_obj_t * btn)
...
void btn_event_cb(lv_obj_t * btn, lv_event_t event)
{
printf("Clicked\n");
return LV_RES_OK;
if(event == LV_EVENT_CLICKED) {
printf("Clicked\n");
}
}
```
![Simple button with LittelvGL](https://littlevgl.com/github/btn1.gif)
![LVGL button with label example](https://raw.githubusercontent.com/lvgl/docs/latest/misc/simple_button_example.gif)
#### Modify the styles
```c
static lv_style_t style_btn_rel; /*A variable to store the released style*/
lv_style_copy(&style_btn_rel, &lv_style_plain); /*Initialize from a built-in style*/
style_btn_rel.body.border.color = LV_COLOR_HEX3(0x269);
style_btn_rel.body.border.width = 1;
style_btn_rel.body.main_color = LV_COLOR_HEX3(0xADF);
style_btn_rel.body.grad_color = LV_COLOR_HEX3(0x46B);
style_btn_rel.body.shadow.width = 4;
style_btn_rel.body.shadow.type = LV_SHADOW_BOTTOM;
style_btn_rel.body.radius = LV_RADIUS_CIRCLE;
style_btn_rel.text.color = LV_COLOR_HEX3(0xDEF);
static lv_style_t style_btn_pr; /*A variable to store the pressed style*/
lv_style_copy(&style_btn_pr, &style_btn_rel); /*Initialize from the released style*/
style_btn_pr.body.border.color = LV_COLOR_HEX3(0x46B);
style_btn_pr.body.main_color = LV_COLOR_HEX3(0x8BD);
style_btn_pr.body.grad_color = LV_COLOR_HEX3(0x24A);
style_btn_pr.body.shadow.width = 2;
style_btn_pr.text.color = LV_COLOR_HEX3(0xBCD);
lv_btn_set_style(btn, LV_BTN_STYLE_REL, &style_btn_rel); /*Set the button's released style*/
lv_btn_set_style(btn, LV_BTN_STYLE_PR, &style_btn_pr); /*Set the button's pressed style*/
```
![Simple button with LittelvGL](https://littlevgl.com/github/btn2.gif)
#### Enable a fancy effect
```c
/*Add some effects when the button is clicked*/
lv_btn_set_ink_in_time(btn, 300);
lv_btn_set_ink_wait_time(btn, 100);
lv_btn_set_ink_out_time(btn, 300);
```
![Simple button with LittelvGL](https://littlevgl.com/github/btn3.gif)
#### Use LittlevGL from Micropython
### LVGL from Micropython
Learn more about [Micropython](https://docs.lvgl.io/latest/en/html/get-started/micropython.html).
```python
# Create a Button and a Label
scr = lv.obj()
@@ -185,22 +154,7 @@ label.set_text("Button")
lv.scr_load(scr)
```
Check out the [Documentation](https://docs.littlevgl.com/) for more!
## Contributing
LVGL is an open project and contribution is very welcome. There are many ways to contribute from simply speaking about your project, through writing examples, improving the documentation, fixing bugs to hosing your own project under in LVGL.
### Contributing
To ask questions please use the [Forum](https://forum.littlevgl.com).
FOr development related things (bug reports, feature suggestions) use [GitHub's Issue tracker](https://github.com/littlevgl/lvgl/issues).
You can contribute in several ways:
- **Answer other's question** in the Forum
- **Report and/or fix bugs** using the issue tracker and in Pull-request
- **Suggest and/or implement new features** using the issue tracker and in Pull-request
- **Improve and/or translate the documentation** learn more [here](https://github.com/littlevgl/docs)
- **Write a blog post about your experiences** learn more [here](https://github.com/littlevgl/blog)
- **Upload your project or product as a reference** to [this site](https://blog.littlevgl.com/2018-12-26/references)
Before contributing, please read [CONTRIBUTING.md](https://github.com/littlevgl/lvgl/blob/master/docs/CONTRIBUTING.md).
### Donate
If you are pleased with the library, found it useful, or you are happy with the support you got, please help its further development:
[![Donate](https://littlevgl.com/donate_dir/donate_btn.png)](https://littlevgl.com/donate)
For a detailed description of contribution opportunities visit the [Contributing](https://docs.lvgl.io/latest/en/html/contributing/index.html) section of the documentation.

89
docs/CODING_STYLE.md Normal file
View File

@@ -0,0 +1,89 @@
# Coding style
## File format
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 '_'
* In variable and function names use only lower case letters (e.g. *height_tmp*)
* In enums and defines use only upper case letters (e.g. *e.g. MAX_LINE_NUM*)
* Global names (API):
* 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.
* 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:
* 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 200 lines (except very straightforwards)
* Variables:
* One line, one declaration (BAD: char x, y;)
* Use `<stdint.h>` (*uint8_t*, *int32_t* etc)
* 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)
## Comments
Before every function have a comment like this:
```c
/**
* Return with the screen of an object
* @param obj pointer to an object
* @return pointer to a screen
*/
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 */`.
The code should show clearly what you are doing.
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*/`
In comments use \` \` when referring to a variable. E.g. ``/*Update the value of `x_act`*/``
### Formatting
Here is example to show bracket placing and using of white spaces:
```c
/**
* Set a new text for a label. Memory will be allocated to store the text by the label.
* @param label pointer to a label object
* @param text '\0' terminated character string. NULL to refresh with the current text.
*/
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;
}
...
}
```
Use 4 spaces indentation instead of tab.
You can use **astyle** to format the code. Run `code-formatter.sh` from the `scrips` folder.

View File

@@ -1,103 +1,5 @@
# Contributing to Littlev Graphics Library
# Contributing to LVGL
**Welcome! It's glad to see that you are interested in contributing to LittlevGL! There are several types of task where you can help to build a better library! Let's see how to get started!**
There are many different possibilities 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:
- answer other's questions
- report and/or fix bugs
- suggest and/or implement new features
- improve and/or translate the documentation
- write a blog post about your experiences
But first, start with the most Frequently Asked Questions.
## FAQ about contributing
### What license does my code need to be under?
Any code added to LittlevGL must be licensed under [MIT](https://choosealicense.com/licenses/mit/) or another license that is fully compatible. Contributions under other licenses are highly likely to be rejected.
If you borrow code from another project, please make sure to add their copyright notice to your contribution.
### Where do I ask questions, give feedback, or report bugs?
We use the [forum](http://forum.littlevgl.com/) for questions, feature suggestions, and discussions.
We use [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues) to report bugs.
For both of these there are some rules:
- Be kind and friendly.
- Speak about one thing in one issue.
- Give feedback and close the issue if your question is answered.
- Explain exactly what you experience or expect. _"The button is not working"_ is not enough info to get help.
- For most issues you should send an absolute minimal code example in order to reproduce the issue. Ideally this should be easily usable in the PC simulator.
- Use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format your post.
- If you don't get any answer in a week write a comment like "Can somebody help?". Maybe your issue wasn't noticed.
### 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 about them:
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 updates
3. **Create a PR** on the GitHub on the page of you `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. Bugfixes for the last release 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 then saying nothing.
- Please read and follow this [guide about the coding style](https://docs.littlevgl.com/#Coding-Style-Guide)
### 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 I contribute?
### Answering other's questions
It's a great way to contribute to the library if you already use it. Just go the [issue tracker](https://github.com/littlevgl/lvgl/issues), read the titles and if you are already familiar with a topic, don't be shy, and write your suggestion.
### 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://docs.littlevgl.com/#Coding-Style-Guide).
### Improving and/or translating the documentation
The documentation of LittlevGL is written in Markdown and available [here](https://github.com/littlevgl/doc) for editing. If you find some parts of the documentation obscure or insufficient just search the related `.md` file, hit the edit icon and add your updates. This way a new Pull request will be generated automatically.
If you can devote more time to improve the documentation you can translate it!
1. Just copy the English `.md` files from the root folder to `locale/LANGUAGE_CODE` (language code is e.g. DE, FR, ES etc)
2. Append the language code the end of files (e.g. Welcome_fr.md)
3. Update the filenames in `_Sidebar.md`
4. Translate the page(s) you want
5. Create a Pull request
### Writing a blog post about your experiences
Have ported LittlevGL to a new platform? Have you created a fancy GUI? Do you know a great trick?
You can share your knowledge on LittelvGL'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
## Summary
I hope you have taken a liking to contribute to LittelvGL. A helpful and friendly community is waiting for you! :)
Thank you for considering contributing to LVGL.
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.

59
docs/ROADMAP.md Normal file
View File

@@ -0,0 +1,59 @@
# 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 September/October 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 of `create` functions deprecated
## v8.1
- Add radio button widget
## v9
- Simplify `group`s. Discussion is [here](https://forum.lvgl.io/t/lv-group-tabindex/2927/3).
- Unit testing (gtest?). See [#1658](https://github.com/lvgl/lvgl/issues/1658)
- Benchmarking (gem5?). See [#1660](https://github.com/lvgl/lvgl/issues/1660)
- Consider direct binary font format support
- Remove the copy paramter from create functions
- Style selectors and style-based states See [#1832](https://github.com/lvgl/lvgl/issues/1832)
## v10
- Remove property level states
## Ideas
- 9-patch support for `lv_imgbtn`.
- lv_mem_alloc_aligned(size, align)
- Text node. See [#1701](https://github.com/lvgl/lvgl/issues/1701#issuecomment-699479408)
- RGB888 support [#1722](https://github.com/lvgl/lvgl/issues/1722)
- Consider ARGB4444, ARGB1555 format
- CPP binding. See [Forum](https://forum.lvgl.io/t/is-it-possible-to-officially-support-optional-cpp-api/2736)
- Optmize font decompression
- Switch to RGBA colors in styles
- Need coverage report for tests
- Need static analize (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)

View File

@@ -1 +0,0 @@
--style=kr --convert-tabs --indent=spaces=4 --indent-switches --pad-oper --unpad-paren --align-pointer=middle --suffix=.bak --lineend=linux --min-conditional-indent=

View File

@@ -1 +0,0 @@
--convert-tabs --indent=spaces=4

119
examples/LVGL_Arduino.ino Normal file
View File

@@ -0,0 +1,119 @@
#include <lvgl.h>
#include <TFT_eSPI.h>
TFT_eSPI tft = TFT_eSPI(); /* TFT instance */
static lv_disp_buf_t disp_buf;
static lv_color_t buf[LV_HOR_RES_MAX * 10];
#if USE_LV_LOG != 0
/* Serial debugging */
void my_print(lv_log_level_t level, const char * file, uint32_t line, const char * dsc)
{
Serial.printf("%s@%d->%s\r\n", file, line, dsc);
Serial.flush();
}
#endif
/* Display flushing */
void my_disp_flush(lv_disp_drv_t *disp, const lv_area_t *area, lv_color_t *color_p)
{
uint32_t w = (area->x2 - area->x1 + 1);
uint32_t h = (area->y2 - area->y1 + 1);
tft.startWrite();
tft.setAddrWindow(area->x1, area->y1, w, h);
tft.pushColors(&color_p->full, w * h, true);
tft.endWrite();
lv_disp_flush_ready(disp);
}
/*Read the touchpad*/
bool my_touchpad_read(lv_indev_drv_t * indev_driver, lv_indev_data_t * data)
{
uint16_t touchX, touchY;
bool touched = tft.getTouch(&touchX, &touchY, 600);
if(!touched)
{
data->state = LV_INDEV_STATE_REL;
return false;
}
else
{
data->state = LV_INDEV_STATE_PR;
}
if(touchX>screenWidth || touchY > screenHeight)
{
Serial.println("Y or y outside of expected parameters..");
Serial.print("y:");
Serial.print(touchX);
Serial.print(" x:");
Serial.print(touchY);
}
else
{
/*Set the coordinates*/
data->point.x = touchX;
data->point.y = touchY;
Serial.print("Data x");
Serial.println(touchX);
Serial.print("Data y");
Serial.println(touchY);
}
return false; /*Return `false` because we are not buffering and no more data to read*/
}
void setup()
{
Serial.begin(115200); /* prepare for possible serial debug */
lv_init();
#if USE_LV_LOG != 0
lv_log_register_print_cb(my_print); /* register print function for debugging */
#endif
tft.begin(); /* TFT init */
tft.setRotation(1); /* Landscape orientation */
uint16_t calData[5] = { 275, 3620, 264, 3532, 1 };
tft.setTouch(calData);
lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10);
/*Initialize the display*/
lv_disp_drv_t disp_drv;
lv_disp_drv_init(&disp_drv);
disp_drv.hor_res = 320;
disp_drv.ver_res = 240;
disp_drv.flush_cb = my_disp_flush;
disp_drv.buffer = &disp_buf;
lv_disp_drv_register(&disp_drv);
/*Initialize the (dummy) input device driver*/
lv_indev_drv_t indev_drv;
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read_cb = my_touchpad_read;
lv_indev_drv_register(&indev_drv);
/* Try an example from the lv_examples repository
* https://github.com/lvgl/lv_examples*/
lv_ex_btn_1();
}
void loop()
{
lv_task_handler(); /* let the GUI do its work */
delay(5);
}

View File

@@ -0,0 +1,198 @@
/**
* @file lv_port_disp_templ.c
*
*/
/*Copy this file as "lv_port_disp.c" and set this value to "1" to enable content*/
#if 0
/*********************
* INCLUDES
*********************/
#include "lv_port_disp_template.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void disp_init(void);
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p);
#if LV_USE_GPU
static void gpu_blend(lv_disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
const lv_area_t * fill_area, lv_color_t color);
#endif
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
void lv_port_disp_init(void)
{
/*-------------------------
* Initialize your display
* -----------------------*/
disp_init();
/*-----------------------------
* Create a buffer for drawing
*----------------------------*/
/* LVGL requires a buffer where it internally draws the widgets.
* Later this buffer will passed your display drivers `flush_cb` to copy its content to your dispay.
* The buffer has to be greater than 1 display row
*
* There are three buffering configurations:
* 1. Create ONE buffer with some rows:
* LVGL will draw the display's content here and writes it to your display
*
* 2. Create TWO buffer with some rows:
* LVGL will draw the display's content to a buffer and writes it your display.
* You should use DMA to write the buffer's content to the display.
* It will enable LVGL to draw the next part of the screen to the other buffer while
* the data is being sent form the first buffer. It makes rendering and flushing parallel.
*
* 3. Create TWO screen-sized buffer:
* Similar to 2) but the buffer have to be screen sized. When LVGL is ready it will give the
* whole frame to display. This way you only need to change the frame buffer's address instead of
* copying the pixels.
* */
/* Example for 1) */
static lv_disp_buf_t draw_buf_dsc_1;
static lv_color_t draw_buf_1[LV_HOR_RES_MAX * 10]; /*A buffer for 10 rows*/
lv_disp_buf_init(&draw_buf_dsc_1, draw_buf_1, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/
/* Example for 2) */
static lv_disp_buf_t draw_buf_dsc_2;
static lv_color_t draw_buf_2_1[LV_HOR_RES_MAX * 10]; /*A buffer for 10 rows*/
static lv_color_t draw_buf_2_1[LV_HOR_RES_MAX * 10]; /*An other buffer for 10 rows*/
lv_disp_buf_init(&draw_buf_dsc_2, draw_buf_2_1, draw_buf_2_1, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/
/* Example for 3) */
static lv_disp_buf_t draw_buf_dsc_3;
static lv_color_t draw_buf_3_1[LV_HOR_RES_MAX * LV_VER_RES_MAX]; /*A screen sized buffer*/
static lv_color_t draw_buf_3_1[LV_HOR_RES_MAX * LV_VER_RES_MAX]; /*An other screen sized buffer*/
lv_disp_buf_init(&draw_buf_dsc_3, draw_buf_3_1, draw_buf_3_2, LV_HOR_RES_MAX * LV_VER_RES_MAX); /*Initialize the display buffer*/
/*-----------------------------------
* Register the display in LVGL
*----------------------------------*/
lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
/*Set up the functions to access to your display*/
/*Set the resolution of the display*/
disp_drv.hor_res = 480;
disp_drv.ver_res = 320;
/*Used to copy the buffer's content to the display*/
disp_drv.flush_cb = disp_flush;
/*Set a display buffer*/
disp_drv.buffer = &draw_buf_dsc_1;
#if LV_USE_GPU
/*Optionally add functions to access the GPU. (Only in buffered mode, LV_VDB_SIZE != 0)*/
/*Blend two color array using opacity*/
disp_drv.gpu_blend_cb = gpu_blend;
/*Fill a memory array with a color*/
disp_drv.gpu_fill_cb = gpu_fill;
#endif
/*Finally register the driver*/
lv_disp_drv_register(&disp_drv);
}
/**********************
* STATIC FUNCTIONS
**********************/
/* Initialize your display and the required peripherals. */
static void disp_init(void)
{
/*You code here*/
}
/* Flush the content of the internal buffer the specific area on the display
* You can use DMA or any hardware acceleration to do this operation in the background but
* 'lv_disp_flush_ready()' has to be called when finished. */
static void disp_flush(lv_disp_drv_t * disp_drv, const lv_area_t * area, lv_color_t * color_p)
{
/*The most simple case (but also the slowest) to put all pixels to the screen one-by-one*/
int32_t x;
int32_t y;
for(y = area->y1; y <= area->y2; y++) {
for(x = area->x1; x <= area->x2; x++) {
/* Put a pixel to the display. For example: */
/* put_px(x, y, *color_p)*/
color_p++;
}
}
/* IMPORTANT!!!
* Inform the graphics library that you are ready with the flushing*/
lv_disp_flush_ready(disp_drv);
}
/*OPTIONAL: GPU INTERFACE*/
#if LV_USE_GPU
/* If your MCU has hardware accelerator (GPU) then you can use it to blend to memories using opacity
* It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/
static void gpu_blend(lv_disp_drv_t * disp_drv, lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa)
{
/*It's an example code which should be done by your GPU*/
uint32_t i;
for(i = 0; i < length; i++) {
dest[i] = lv_color_mix(dest[i], src[i], opa);
}
}
/* If your MCU has hardware accelerator (GPU) then you can use it to fill a memory with a color
* It can be used only in buffered mode (LV_VDB_SIZE != 0 in lv_conf.h)*/
static void gpu_fill(lv_disp_drv_t * disp_drv, lv_color_t * dest_buf, lv_coord_t dest_width,
const lv_area_t * fill_area, lv_color_t color)
{
/*It's an example code which should be done by your GPU*/
int32_t x, y;
dest_buf += dest_width * fill_area->y1; /*Go to the first line*/
for(y = fill_area->y1; y <= fill_area->y2; y++) {
for(x = fill_area->x1; x <= fill_area->x2; x++) {
dest_buf[x] = color;
}
dest_buf+=dest_width; /*Go to the next line*/
}
}
#endif /*LV_USE_GPU*/
#else /* Enable this file at the top */
/* This dummy typedef exists purely to silence -Wpedantic. */
typedef int keep_pedantic_happy;
#endif

View File

@@ -9,7 +9,7 @@
/*********************
* INCLUDES
*********************/
#include "lv_port_fs_templ.h"
#include "lv_port_fs_template.h"
/*********************
* DEFINES
@@ -42,20 +42,20 @@ typedef struct {
**********************/
static void fs_init(void);
static lv_fs_res_t fs_open (void * file_p, const char * path, lv_fs_mode_t mode);
static lv_fs_res_t fs_close (void * file_p);
static lv_fs_res_t fs_read (void * file_p, void * buf, uint32_t btr, uint32_t * br);
static lv_fs_res_t fs_write(void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
static lv_fs_res_t fs_seek (void * file_p, uint32_t pos);
static lv_fs_res_t fs_size (void * file_p, uint32_t * size_p);
static lv_fs_res_t fs_tell (void * file_p, uint32_t * pos_p);
static lv_fs_res_t fs_remove (const char *path);
static lv_fs_res_t fs_trunc (void * file_p);
static lv_fs_res_t fs_rename (const char * oldname, const char * newname);
static lv_fs_res_t fs_free (uint32_t * total_p, uint32_t * free_p);
static lv_fs_res_t fs_dir_open (void * rddir_p, const char *path);
static lv_fs_res_t fs_dir_read (void * rddir_p, char *fn);
static lv_fs_res_t fs_dir_close (void * rddir_p);
static lv_fs_res_t fs_open (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode);
static lv_fs_res_t fs_close (lv_fs_drv_t * drv, void * file_p);
static lv_fs_res_t fs_read (lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br);
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw);
static lv_fs_res_t fs_seek (lv_fs_drv_t * drv, void * file_p, uint32_t pos);
static lv_fs_res_t fs_size (lv_fs_drv_t * drv, void * file_p, uint32_t * size_p);
static lv_fs_res_t fs_tell (lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p);
static lv_fs_res_t fs_remove (lv_fs_drv_t * drv, const char *path);
static lv_fs_res_t fs_trunc (lv_fs_drv_t * drv, void * file_p);
static lv_fs_res_t fs_rename (lv_fs_drv_t * drv, const char * oldname, const char * newname);
static lv_fs_res_t fs_free (lv_fs_drv_t * drv, uint32_t * total_p, uint32_t * free_p);
static lv_fs_res_t fs_dir_open (lv_fs_drv_t * drv, void * rddir_p, const char *path);
static lv_fs_res_t fs_dir_read (lv_fs_drv_t * drv, void * rddir_p, char *fn);
static lv_fs_res_t fs_dir_close (lv_fs_drv_t * drv, void * rddir_p);
/**********************
* STATIC VARIABLES
@@ -81,34 +81,34 @@ void lv_port_fs_init(void)
fs_init();
/*---------------------------------------------------
* Register the file system interface in LittlevGL
* Register the file system interface in LVGL
*--------------------------------------------------*/
/* Add a simple drive to open images */
lv_fs_drv_t fs_drv; /*A driver descriptor*/
memset(&fs_drv, 0, sizeof(lv_fs_drv_t)); /*Initialization*/
lv_fs_drv_t fs_drv;
lv_fs_drv_init(&fs_drv);
/*Set up fields...*/
fs_drv.file_size = sizeof(file_t);
fs_drv.letter = 'P';
fs_drv.open = fs_open;
fs_drv.close = fs_close;
fs_drv.read = fs_read;
fs_drv.write = fs_write;
fs_drv.seek = fs_seek;
fs_drv.tell = fs_tell;
fs_drv.free = fs_free;
fs_drv.size = fs_size;
fs_drv.remove = fs_remove;
fs_drv.rename = fs_rename;
fs_drv.trunc = fs_trunc;
fs_drv.open_cb = fs_open;
fs_drv.close_cb = fs_close;
fs_drv.read_cb = fs_read;
fs_drv.write_cb = fs_write;
fs_drv.seek_cb = fs_seek;
fs_drv.tell_cb = fs_tell;
fs_drv.free_space_cb = fs_free;
fs_drv.size_cb = fs_size;
fs_drv.remove_cb = fs_remove;
fs_drv.rename_cb = fs_rename;
fs_drv.trunc_cb = fs_trunc;
fs_drv.rddir_size = sizeof(dir_t);
fs_drv.dir_close = fs_dir_close;
fs_drv.dir_open = fs_dir_open;
fs_drv.dir_read = fs_dir_read;
fs_drv.dir_close_cb = fs_dir_close;
fs_drv.dir_open_cb = fs_dir_open;
fs_drv.dir_read_cb = fs_dir_read;
lv_fs_add_drv(&fs_drv);
lv_fs_drv_register(&fs_drv);
}
/**********************
@@ -125,12 +125,13 @@ static void fs_init(void)
/**
* Open a file
* @param drv pointer to a driver where this function belongs
* @param file_p pointer to a file_t variable
* @param path path to the file beginning with the driver letter (e.g. S:/folder/file.txt)
* @param mode read: FS_MODE_RD, write: FS_MODE_WR, both: FS_MODE_RD | FS_MODE_WR
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_open (void * file_p, const char * path, lv_fs_mode_t mode)
static lv_fs_res_t fs_open (lv_fs_drv_t * drv, void * file_p, const char * path, lv_fs_mode_t mode)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -159,11 +160,12 @@ static lv_fs_res_t fs_open (void * file_p, const char * path, lv_fs_mode_t mode)
/**
* Close an opened file
* @param drv pointer to a driver where this function belongs
* @param file_p pointer to a file_t variable. (opened with lv_ufs_open)
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_close (void * file_p)
static lv_fs_res_t fs_close (lv_fs_drv_t * drv, void * file_p)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -174,6 +176,7 @@ static lv_fs_res_t fs_close (void * file_p)
/**
* Read data from an opened file
* @param drv pointer to a driver where this function belongs
* @param file_p pointer to a file_t variable.
* @param buf pointer to a memory block where to store the read data
* @param btr number of Bytes To Read
@@ -181,7 +184,7 @@ static lv_fs_res_t fs_close (void * file_p)
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_read (void * file_p, void * buf, uint32_t btr, uint32_t * br)
static lv_fs_res_t fs_read (lv_fs_drv_t * drv, void * file_p, void * buf, uint32_t btr, uint32_t * br)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -192,13 +195,14 @@ static lv_fs_res_t fs_read (void * file_p, void * buf, uint32_t btr, uint32_t *
/**
* Write into a file
* @param drv pointer to a driver where this function belongs
* @param file_p pointer to a file_t variable
* @param buf pointer to a buffer with the bytes to write
* @param btr Bytes To Write
* @param br the number of real written bytes (Bytes Written). NULL if unused.
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_write(void * file_p, const void * buf, uint32_t btw, uint32_t * bw)
static lv_fs_res_t fs_write(lv_fs_drv_t * drv, void * file_p, const void * buf, uint32_t btw, uint32_t * bw)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -209,12 +213,13 @@ static lv_fs_res_t fs_write(void * file_p, const void * buf, uint32_t btw, uint3
/**
* Set the read write pointer. Also expand the file size if necessary.
* @param drv pointer to a driver where this function belongs
* @param file_p pointer to a file_t variable. (opened with lv_ufs_open )
* @param pos the new position of read write pointer
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_seek (void * file_p, uint32_t pos)
static lv_fs_res_t fs_seek (lv_fs_drv_t * drv, void * file_p, uint32_t pos)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -225,11 +230,12 @@ static lv_fs_res_t fs_seek (void * file_p, uint32_t pos)
/**
* Give the size of a file bytes
* @param drv pointer to a driver where this function belongs
* @param file_p pointer to a file_t variable
* @param size pointer to a variable to store the size
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_size (void * file_p, uint32_t * size_p)
static lv_fs_res_t fs_size (lv_fs_drv_t * drv, void * file_p, uint32_t * size_p)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -239,12 +245,13 @@ static lv_fs_res_t fs_size (void * file_p, uint32_t * size_p)
}
/**
* Give the position of the read write pointer
* @param drv pointer to a driver where this function belongs
* @param file_p pointer to a file_t variable.
* @param pos_p pointer to to store the result
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_tell (void * file_p, uint32_t * pos_p)
static lv_fs_res_t fs_tell (lv_fs_drv_t * drv, void * file_p, uint32_t * pos_p)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -255,10 +262,11 @@ static lv_fs_res_t fs_tell (void * file_p, uint32_t * pos_p)
/**
* Delete a file
* @param drv pointer to a driver where this function belongs
* @param path path of the file to delete
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_remove (const char *path)
static lv_fs_res_t fs_remove (lv_fs_drv_t * drv, const char *path)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -269,11 +277,12 @@ static lv_fs_res_t fs_remove (const char *path)
/**
* Truncate the file size to the current position of the read write pointer
* @param drv pointer to a driver where this function belongs
* @param file_p pointer to an 'ufs_file_t' variable. (opened with lv_fs_open )
* @return LV_FS_RES_OK: no error, the file is read
* any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_trunc (void * file_p)
static lv_fs_res_t fs_trunc (lv_fs_drv_t * drv, void * file_p)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -284,11 +293,12 @@ static lv_fs_res_t fs_trunc (void * file_p)
/**
* Rename a file
* @param drv pointer to a driver where this function belongs
* @param oldname path to the file
* @param newname path with the new name
* @return LV_FS_RES_OK or any error from 'fs_res_t'
*/
static lv_fs_res_t fs_rename (const char * oldname, const char * newname)
static lv_fs_res_t fs_rename (lv_fs_drv_t * drv, const char * oldname, const char * newname)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -299,12 +309,13 @@ static lv_fs_res_t fs_rename (const char * oldname, const char * newname)
/**
* Get the free and total size of a driver in kB
* @param drv pointer to a driver where this function belongs
* @param letter the driver letter
* @param total_p pointer to store the total size [kB]
* @param free_p pointer to store the free size [kB]
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_free (uint32_t * total_p, uint32_t * free_p)
static lv_fs_res_t fs_free (lv_fs_drv_t * drv, uint32_t * total_p, uint32_t * free_p)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -315,11 +326,12 @@ static lv_fs_res_t fs_free (uint32_t * total_p, uint32_t * free_p)
/**
* Initialize a 'fs_read_dir_t' variable for directory reading
* @param drv pointer to a driver where this function belongs
* @param rddir_p pointer to a 'fs_read_dir_t' variable
* @param path path to a directory
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_dir_open (void * rddir_p, const char *path)
static lv_fs_res_t fs_dir_open (lv_fs_drv_t * drv, void * rddir_p, const char *path)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -331,11 +343,12 @@ static lv_fs_res_t fs_dir_open (void * rddir_p, const char *path)
/**
* Read the next filename form a directory.
* The name of the directories will begin with '/'
* @param drv pointer to a driver where this function belongs
* @param rddir_p pointer to an initialized 'fs_read_dir_t' variable
* @param fn pointer to a buffer to store the filename
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_dir_read (void * rddir_p, char *fn)
static lv_fs_res_t fs_dir_read (lv_fs_drv_t * drv, void * rddir_p, char *fn)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -346,10 +359,11 @@ static lv_fs_res_t fs_dir_read (void * rddir_p, char *fn)
/**
* Close the directory reading
* @param drv pointer to a driver where this function belongs
* @param rddir_p pointer to an initialized 'fs_read_dir_t' variable
* @return LV_FS_RES_OK or any error from lv_fs_res_t enum
*/
static lv_fs_res_t fs_dir_close (void * rddir_p)
static lv_fs_res_t fs_dir_close (lv_fs_drv_t * drv, void * rddir_p)
{
lv_fs_res_t res = LV_FS_RES_NOT_IMP;
@@ -358,4 +372,8 @@ static lv_fs_res_t fs_dir_close (void * rddir_p)
return res;
}
#else /* Enable this file at the top */
/* This dummy typedef exists purely to silence -Wpedantic. */
typedef int keep_pedantic_happy;
#endif

View File

@@ -9,7 +9,7 @@
/*********************
* INCLUDES
*********************/
#include "lv_port_indev_templ.h"
#include "lv_port_indev_template.h"
/*********************
* DEFINES
@@ -24,25 +24,25 @@
**********************/
static void touchpad_init(void);
static bool touchpad_read(lv_indev_data_t * data);
static bool touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
static bool touchpad_is_pressed(void);
static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y);
static void mouse_init(void);
static bool mouse_read(lv_indev_data_t * data);
static bool mouse_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
static bool mouse_is_pressed(void);
static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y);
static void keypad_init(void);
static bool keypad_read(lv_indev_data_t * data);
static bool keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
static uint32_t keypad_get_key(void);
static void encoder_init(void);
static bool encoder_read(lv_indev_data_t * data);
static bool encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
static void encoder_handler(void);
static void button_init(void);
static bool button_read(lv_indev_data_t * data);
static bool button_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data);
static int8_t button_get_pressed_id(void);
static bool button_is_pressed(uint8_t id);
@@ -92,7 +92,7 @@ void lv_port_indev_init(void)
/*Register a touchpad input device*/
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read = touchpad_read;
indev_drv.read_cb = touchpad_read;
indev_touchpad = lv_indev_drv_register(&indev_drv);
/*------------------
@@ -105,12 +105,12 @@ void lv_port_indev_init(void)
/*Register a mouse input device*/
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_POINTER;
indev_drv.read = mouse_read;
indev_drv.read_cb = mouse_read;
indev_mouse = lv_indev_drv_register(&indev_drv);
/*Set cursor. For simplicity set a HOME symbol now.*/
lv_obj_t * mouse_cursor = lv_img_create(lv_scr_act(), NULL);
lv_img_set_src(mouse_cursor, SYMBOL_HOME);
lv_obj_t * mouse_cursor = lv_img_create(lv_disp_get_scr_act(NULL), NULL);
lv_img_set_src(mouse_cursor, LV_SYMBOL_HOME);
lv_indev_set_cursor(indev_mouse, mouse_cursor);
/*------------------
@@ -123,7 +123,7 @@ void lv_port_indev_init(void)
/*Register a keypad input device*/
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_KEYPAD;
indev_drv.read = keypad_read;
indev_drv.read_cb = keypad_read;
indev_keypad = lv_indev_drv_register(&indev_drv);
/* Later you should create group(s) with `lv_group_t * group = lv_group_create()`,
@@ -140,14 +140,14 @@ void lv_port_indev_init(void)
/*Register a encoder input device*/
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_KEYPAD;
indev_drv.read = encoder_read;
indev_drv.type = LV_INDEV_TYPE_ENCODER;
indev_drv.read_cb = encoder_read;
indev_encoder = lv_indev_drv_register(&indev_drv);
/* Later you should create group(s) with `lv_group_t * group = lv_group_create()`,
* add objects to the group with `lv_group_add_obj(group, obj)`
* and assign this input device to group to navigate in it:
* `lv_indev_set_group(indev_keypad, group);` */
* `lv_indev_set_group(indev_encoder, group);` */
/*------------------
* Button
@@ -159,7 +159,7 @@ void lv_port_indev_init(void)
/*Register a button input device*/
lv_indev_drv_init(&indev_drv);
indev_drv.type = LV_INDEV_TYPE_BUTTON;
indev_drv.read = button_read;
indev_drv.read_cb = button_read;
indev_button = lv_indev_drv_register(&indev_drv);
/*Assign buttons to points on the screen*/
@@ -187,7 +187,7 @@ static void touchpad_init(void)
}
/* Will be called by the library to read the touchpad */
static bool touchpad_read(lv_indev_data_t * data)
static bool touchpad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
{
static lv_coord_t last_x = 0;
static lv_coord_t last_y = 0;
@@ -237,7 +237,7 @@ static void mouse_init(void)
}
/* Will be called by the library to read the mouse */
static bool mouse_read(lv_indev_data_t * data)
static bool mouse_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
{
/*Get the current x and y coordinates*/
mouse_get_xy(&data->point.x, &data->point.y);
@@ -281,7 +281,7 @@ static void keypad_init(void)
}
/* Will be called by the library to read the mouse */
static bool keypad_read(lv_indev_data_t * data)
static bool keypad_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
{
static uint32_t last_key = 0;
@@ -293,22 +293,22 @@ static bool keypad_read(lv_indev_data_t * data)
if(act_key != 0) {
data->state = LV_INDEV_STATE_PR;
/*Translate the keys to LittlevGL control characters according to your key definitions*/
/*Translate the keys to LVGL control characters according to your key definitions*/
switch(act_key) {
case 1:
act_key = LV_GROUP_KEY_NEXT;
act_key = LV_KEY_NEXT;
break;
case 2:
act_key = LV_GROUP_KEY_PREV;
act_key = LV_KEY_PREV;
break;
case 3:
act_key = LV_GROUP_KEY_LEFT;
act_key = LV_KEY_LEFT;
break;
case 4:
act_key = LV_GROUP_KEY_RIGHT;
act_key = LV_KEY_RIGHT;
break;
case 5:
act_key = LV_GROUP_KEY_ENTER;
act_key = LV_KEY_ENTER;
break;
}
@@ -342,7 +342,7 @@ static void encoder_init(void)
}
/* Will be called by the library to read the encoder */
static bool encoder_read(lv_indev_data_t * data)
static bool encoder_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
{
data->enc_diff = encoder_diff;
@@ -373,7 +373,7 @@ static void button_init(void)
}
/* Will be called by the library to read the button */
static bool button_read(lv_indev_data_t * data)
static bool button_read(lv_indev_drv_t * indev_drv, lv_indev_data_t * data)
{
static uint8_t last_btn = 0;
@@ -389,7 +389,7 @@ static bool button_read(lv_indev_data_t * data)
}
/*Save the last pressed button's ID*/
data->btn = last_btn;
data->btn_id = last_btn;
/*Return `false` because we are not buffering and no more data to read*/
return false;
@@ -421,4 +421,8 @@ static bool button_is_pressed(uint8_t id)
return false;
}
#else /* Enable this file at the top */
/* This dummy typedef exists purely to silence -Wpedantic. */
typedef int keep_pedantic_happy;
#endif

17
library.json Normal file
View File

@@ -0,0 +1,17 @@
{
"name": "lvgl",
"version": "7.7.1",
"keywords": "graphics, gui, embedded, tft, lvgl",
"description": "Graphics library to create embedded GUI with easy-to-use graphical elements, beautiful visual effects and low memory footprint. It offers anti-aliasing, opacity, and animations using only one frame buffer.",
"repository": {
"type": "git",
"url": "https://github.com/lvgl/lvgl.git"
},
"build": {
"includeDir": "."
},
"license": "MIT",
"homepage": "https://lvgl.io",
"frameworks": "*",
"platforms": "*"
}

10
library.properties Normal file
View File

@@ -0,0 +1,10 @@
name=lvgl
version=7.7.1
author=kisvegabor
maintainer=kisvegabor,embeddedt,pete-pjb
sentence=Full-featured Graphics Library for Embedded Systems
paragraph=Powerful and easy-to-use embedded GUI with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash).
category=Display
url=https://lvgl.io
architectures=*
includes=lvgl.h

View File

@@ -1,655 +0,0 @@
/**
* GENERATED FILE, DO NOT EDIT IT!
* @file lv_conf_checker.h
* Make sure all the defines of lv_conf.h have a default value
**/
#ifndef LV_CONF_CHECKER_H
#define LV_CONF_CHECKER_H
/*===================
Dynamic memory
*===================*/
/* Memory size which will be used by the library
* to store the graphical objects and other data */
#ifndef LV_MEM_CUSTOM
#define LV_MEM_CUSTOM 0 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/
#endif
#if LV_MEM_CUSTOM == 0
#ifndef LV_MEM_SIZE
# define LV_MEM_SIZE (64U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
#endif
#ifndef LV_MEM_ATTR
# define LV_MEM_ATTR /*Complier prefix for big array declaration*/
#endif
#ifndef LV_MEM_ADR
# define LV_MEM_ADR 0 /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/
#endif
#ifndef LV_MEM_AUTO_DEFRAG
# define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/
#endif
#else /*LV_MEM_CUSTOM*/
#ifndef LV_MEM_CUSTOM_INCLUDE
# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
#endif
#ifndef LV_MEM_CUSTOM_ALLOC
# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
#endif
#ifndef LV_MEM_CUSTOM_FREE
# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
#endif
#endif /*LV_MEM_CUSTOM*/
/* Garbage Collector settings
* Used if lvgl is binded to higher language and the memory is managed by that language */
#ifndef LV_ENABLE_GC
#define LV_ENABLE_GC 0
#endif
#if LV_ENABLE_GC != 0
#ifndef LV_MEM_CUSTOM_REALLOC
# define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
#endif
#ifndef LV_MEM_CUSTOM_GET_SIZE
# define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
#endif
#ifndef LV_GC_INCLUDE
# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
#endif
#endif /* LV_ENABLE_GC */
/*===================
Graphical settings
*===================*/
/* Horizontal and vertical resolution of the library.*/
#ifndef LV_HOR_RES
#define LV_HOR_RES (480)
#endif
#ifndef LV_VER_RES
#define LV_VER_RES (320)
#endif
/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide
* (Not so important, you can adjust it to modify default sizes and spaces)*/
#ifndef LV_DPI
#define LV_DPI 100
#endif
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
#ifndef LV_ANTIALIAS
#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/
#endif
/*Screen refresh period in milliseconds*/
#ifndef LV_REFR_PERIOD
#define LV_REFR_PERIOD 30
#endif
/*-----------------
* VDB settings
*----------------*/
/* VDB (Virtual Display Buffer) is an internal graphics buffer.
* The GUI will be drawn into this buffer first and then
* the buffer will be passed to your `disp_drv.disp_flush` function to
* copy it to your frame buffer.
* VDB is required for: buffered drawing, opacity, anti-aliasing and shadows
* Learn more: https://docs.littlevgl.com/#Drawing*/
/* Size of the VDB in pixels. Typical size: ~1/10 screen. Must be >= LV_HOR_RES
* Setting it to 0 will disable VDB and `disp_drv.disp_fill` and `disp_drv.disp_map` functions
* will be called to draw to the frame buffer directly*/
#ifndef LV_VDB_SIZE
#define LV_VDB_SIZE ((LV_VER_RES * LV_HOR_RES) / 10)
#endif
/* Bit-per-pixel of VDB. Useful for monochrome or non-standard color format displays.
* Special formats are handled with `disp_drv.vdb_wr`)*/
#ifndef LV_VDB_PX_BPP
#define LV_VDB_PX_BPP LV_COLOR_SIZE /*LV_COLOR_SIZE comes from LV_COLOR_DEPTH below to set 8, 16 or 32 bit pixel size automatically */
#endif
/* Place VDB to a specific address (e.g. in external RAM)
* 0: allocate automatically into RAM
* LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/
#ifndef LV_VDB_ADR
#define LV_VDB_ADR 0
#endif
/* Use two Virtual Display buffers (VDB) to parallelize rendering and flushing
* The flushing should use DMA to write the frame buffer in the background */
#ifndef LV_VDB_DOUBLE
#define LV_VDB_DOUBLE 0
#endif
/* Place VDB2 to a specific address (e.g. in external RAM)
* 0: allocate automatically into RAM
* LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/
#ifndef LV_VDB2_ADR
#define LV_VDB2_ADR 0
#endif
/* Using true double buffering in `disp_drv.disp_flush` you will always get the image of the whole screen.
* Your only task is to set the rendered image (`color_p` parameter) as frame buffer address or send it to your display.
* The best if you do in the blank period of you display to avoid tearing effect.
* Requires:
* - LV_VDB_SIZE = LV_HOR_RES * LV_VER_RES
* - LV_VDB_DOUBLE = 1
*/
#ifndef LV_VDB_TRUE_DOUBLE_BUFFERED
#define LV_VDB_TRUE_DOUBLE_BUFFERED 0
#endif
/*=================
Misc. setting
*=================*/
/*Input device settings*/
#ifndef LV_INDEV_READ_PERIOD
#define LV_INDEV_READ_PERIOD 50 /*Input device read period in milliseconds*/
#endif
#ifndef LV_INDEV_POINT_MARKER
#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/
#endif
#ifndef LV_INDEV_DRAG_LIMIT
#define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */
#endif
#ifndef LV_INDEV_DRAG_THROW
#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */
#endif
#ifndef LV_INDEV_LONG_PRESS_TIME
#define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/
#endif
#ifndef LV_INDEV_LONG_PRESS_REP_TIME
#define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */
#endif
/*Color settings*/
#ifndef LV_COLOR_DEPTH
#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/
#endif
#ifndef LV_COLOR_16_SWAP
#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/
#endif
#ifndef LV_COLOR_SCREEN_TRANSP
#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/
#endif
#ifndef LV_COLOR_TRANSP
#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/
#endif
/*Text settings*/
#ifndef LV_TXT_UTF8
#define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */
#endif
#ifndef LV_TXT_BREAK_CHARS
#define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/
#endif
#ifndef LV_TXT_LINE_BREAK_LONG_LEN
#define LV_TXT_LINE_BREAK_LONG_LEN 12 /* If a character is at least this long, will break wherever "prettiest" */
#endif
#ifndef LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN
#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 /* Minimum number of characters of a word to put on a line before a break */
#endif
#ifndef LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */
#endif
/*Feature usage*/
#ifndef USE_LV_ANIMATION
#define USE_LV_ANIMATION 1 /*1: Enable all animations*/
#endif
#ifndef USE_LV_SHADOW
#define USE_LV_SHADOW 1 /*1: Enable shadows*/
#endif
#ifndef USE_LV_GROUP
#define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/
#endif
#ifndef USE_LV_GPU
#define USE_LV_GPU 1 /*1: Enable GPU interface*/
#endif
#ifndef USE_LV_REAL_DRAW
#define USE_LV_REAL_DRAW 1 /*1: Enable function which draw directly to the frame buffer instead of VDB (required if LV_VDB_SIZE = 0)*/
#endif
#ifndef USE_LV_FILESYSTEM
#define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/
#endif
#ifndef USE_LV_MULTI_LANG
#define USE_LV_MULTI_LANG 0 /* Number of languages for labels to store (0: to disable this feature)*/
#endif
/*Compiler settings*/
#ifndef LV_ATTRIBUTE_TICK_INC
#define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */
#endif
#ifndef LV_ATTRIBUTE_TASK_HANDLER
#define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to `lv_task_handler` function */
#endif
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN /* With size optimization (-Os) the compiler might not align data to 4 or 8 byte boundary. This alignment will be explicitly applied where needed.*/
#endif
#ifndef LV_COMPILER_VLA_SUPPORTED
#define LV_COMPILER_VLA_SUPPORTED 1 /* 1: Variable length array is supported*/
#endif
#ifndef LV_COMPILER_NON_CONST_INIT_SUPPORTED
#define LV_COMPILER_NON_CONST_INIT_SUPPORTED 1 /* 1: Initialization with non constant values are supported */
#endif
/*HAL settings*/
#ifndef LV_TICK_CUSTOM
#define LV_TICK_CUSTOM 0 /*1: use a custom tick source (removing the need to manually update the tick with `lv_tick_inc`) */
#endif
#if LV_TICK_CUSTOM == 1
#ifndef LV_TICK_CUSTOM_INCLUDE
#define LV_TICK_CUSTOM_INCLUDE "sonething.h" /*Header for the sys time function*/
#endif
#ifndef LV_TICK_CUSTOM_SYS_TIME_EXPR
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
#endif
#endif /*LV_TICK_CUSTOM*/
/*Log settings*/
#ifndef USE_LV_LOG
#define USE_LV_LOG 1 /*Enable/disable the log module*/
#endif
#if USE_LV_LOG
/* How important log should be added:
* LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
* LV_LOG_LEVEL_INFO Log important events
* LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't caused problem
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
*/
#ifndef LV_LOG_LEVEL
# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
#endif
/* 1: Print the log with 'printf'; 0: user need to register a callback*/
#ifndef LV_LOG_PRINTF
# define LV_LOG_PRINTF 0
#endif
#endif /*USE_LV_LOG*/
/*================
* THEME USAGE
*================*/
#ifndef LV_THEME_LIVE_UPDATE
#define LV_THEME_LIVE_UPDATE 1 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
#endif
#ifndef USE_LV_THEME_TEMPL
#define USE_LV_THEME_TEMPL 0 /*Just for test*/
#endif
#ifndef USE_LV_THEME_DEFAULT
#define USE_LV_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/
#endif
#ifndef USE_LV_THEME_ALIEN
#define USE_LV_THEME_ALIEN 1 /*Dark futuristic theme*/
#endif
#ifndef USE_LV_THEME_NIGHT
#define USE_LV_THEME_NIGHT 1 /*Dark elegant theme*/
#endif
#ifndef USE_LV_THEME_MONO
#define USE_LV_THEME_MONO 1 /*Mono color theme for monochrome displays*/
#endif
#ifndef USE_LV_THEME_MATERIAL
#define USE_LV_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/
#endif
#ifndef USE_LV_THEME_ZEN
#define USE_LV_THEME_ZEN 1 /*Peaceful, mainly light theme */
#endif
#ifndef USE_LV_THEME_NEMO
#define USE_LV_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/
#endif
/*==================
* FONT USAGE
*===================*/
/* More info about fonts: https://docs.littlevgl.com/#Fonts
* To enable a built-in font use 1,2,4 or 8 values
* which will determine the bit-per-pixel. Higher value means smoother fonts */
#ifndef USE_LV_FONT_DEJAVU_10
#define USE_LV_FONT_DEJAVU_10 4
#endif
#ifndef USE_LV_FONT_DEJAVU_10_LATIN_SUP
#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 4
#endif
#ifndef USE_LV_FONT_DEJAVU_10_CYRILLIC
#define USE_LV_FONT_DEJAVU_10_CYRILLIC 4
#endif
#ifndef USE_LV_FONT_SYMBOL_10
#define USE_LV_FONT_SYMBOL_10 4
#endif
#ifndef USE_LV_FONT_DEJAVU_20
#define USE_LV_FONT_DEJAVU_20 4
#endif
#ifndef USE_LV_FONT_DEJAVU_20_LATIN_SUP
#define USE_LV_FONT_DEJAVU_20_LATIN_SUP 4
#endif
#ifndef USE_LV_FONT_DEJAVU_20_CYRILLIC
#define USE_LV_FONT_DEJAVU_20_CYRILLIC 4
#endif
#ifndef USE_LV_FONT_SYMBOL_20
#define USE_LV_FONT_SYMBOL_20 4
#endif
#ifndef USE_LV_FONT_DEJAVU_30
#define USE_LV_FONT_DEJAVU_30 4
#endif
#ifndef USE_LV_FONT_DEJAVU_30_LATIN_SUP
#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 4
#endif
#ifndef USE_LV_FONT_DEJAVU_30_CYRILLIC
#define USE_LV_FONT_DEJAVU_30_CYRILLIC 4
#endif
#ifndef USE_LV_FONT_SYMBOL_30
#define USE_LV_FONT_SYMBOL_30 4
#endif
#ifndef USE_LV_FONT_DEJAVU_40
#define USE_LV_FONT_DEJAVU_40 4
#endif
#ifndef USE_LV_FONT_DEJAVU_40_LATIN_SUP
#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 4
#endif
#ifndef USE_LV_FONT_DEJAVU_40_CYRILLIC
#define USE_LV_FONT_DEJAVU_40_CYRILLIC 4
#endif
#ifndef USE_LV_FONT_SYMBOL_40
#define USE_LV_FONT_SYMBOL_40 4
#endif
#ifndef USE_LV_FONT_MONOSPACE_8
#define USE_LV_FONT_MONOSPACE_8 1
#endif
/* Optionally declare your custom fonts here.
* You can use these fonts as default font too
* and they will be available globally. E.g.
* #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
* LV_FONT_DECLARE(my_font_2) \
*/
#ifndef LV_FONT_CUSTOM_DECLARE
#define LV_FONT_CUSTOM_DECLARE
#endif
#ifndef LV_FONT_DEFAULT
#define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/
#endif
/*===================
* LV_OBJ SETTINGS
*==================*/
#ifndef LV_OBJ_FREE_NUM_TYPE
#define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/
#endif
#ifndef LV_OBJ_FREE_PTR
#define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/
#endif
#ifndef LV_OBJ_REALIGN
#define LV_OBJ_REALIGN 1 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
#endif
/*==================
* LV OBJ X USAGE
*================*/
/*
* Documentation of the object types: https://docs.littlevgl.com/#Object-types
*/
/*****************
* Simple object
*****************/
/*Label (dependencies: -*/
#ifndef USE_LV_LABEL
#define USE_LV_LABEL 1
#endif
#if USE_LV_LABEL != 0
#ifndef LV_LABEL_SCROLL_SPEED
# define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/
#endif
#endif
/*Image (dependencies: lv_label*/
#ifndef USE_LV_IMG
#define USE_LV_IMG 1
#endif
#if USE_LV_IMG != 0
#ifndef LV_IMG_CF_INDEXED
# define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/
#endif
#ifndef LV_IMG_CF_ALPHA
# define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/
#endif
#endif
/*Line (dependencies: -*/
#ifndef USE_LV_LINE
#define USE_LV_LINE 1
#endif
/*Arc (dependencies: -)*/
#ifndef USE_LV_ARC
#define USE_LV_ARC 1
#endif
/*******************
* Container objects
*******************/
/*Container (dependencies: -*/
#ifndef USE_LV_CONT
#define USE_LV_CONT 1
#endif
/*Page (dependencies: lv_cont)*/
#ifndef USE_LV_PAGE
#define USE_LV_PAGE 1
#endif
/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
#ifndef USE_LV_WIN
#define USE_LV_WIN 1
#endif
/*Tab (dependencies: lv_page, lv_btnm)*/
#ifndef USE_LV_TABVIEW
#define USE_LV_TABVIEW 1
#endif
# if USE_LV_TABVIEW != 0
#ifndef LV_TABVIEW_ANIM_TIME
# define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/
#endif
#endif
/*Tileview (dependencies: lv_page) */
#ifndef USE_LV_TILEVIEW
#define USE_LV_TILEVIEW 1
#endif
#if USE_LV_TILEVIEW
#ifndef LV_TILEVIEW_ANIM_TIME
# define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/
#endif
#endif
/*************************
* Data visualizer objects
*************************/
/*Bar (dependencies: -)*/
#ifndef USE_LV_BAR
#define USE_LV_BAR 1
#endif
/*Line meter (dependencies: *;)*/
#ifndef USE_LV_LMETER
#define USE_LV_LMETER 1
#endif
/*Gauge (dependencies:lv_bar, lv_lmeter)*/
#ifndef USE_LV_GAUGE
#define USE_LV_GAUGE 1
#endif
/*Chart (dependencies: -)*/
#ifndef USE_LV_CHART
#define USE_LV_CHART 1
#endif
/*Table (dependencies: lv_label)*/
#ifndef USE_LV_TABLE
#define USE_LV_TABLE 1
#endif
#if USE_LV_TABLE
#ifndef LV_TABLE_COL_MAX
# define LV_TABLE_COL_MAX 12
#endif
#endif
/*LED (dependencies: -)*/
#ifndef USE_LV_LED
#define USE_LV_LED 1
#endif
/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
#ifndef USE_LV_MBOX
#define USE_LV_MBOX 1
#endif
/*Text area (dependencies: lv_label, lv_page)*/
#ifndef USE_LV_TA
#define USE_LV_TA 1
#endif
#if USE_LV_TA != 0
#ifndef LV_TA_CURSOR_BLINK_TIME
# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/
#endif
#ifndef LV_TA_PWD_SHOW_TIME
# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/
#endif
#endif
/*Spinbox (dependencies: lv_ta)*/
#ifndef USE_LV_SPINBOX
#define USE_LV_SPINBOX 1
#endif
/*Calendar (dependencies: -)*/
#ifndef USE_LV_CALENDAR
#define USE_LV_CALENDAR 1
#endif
/*Preload (dependencies: lv_arc)*/
#ifndef USE_LV_PRELOAD
#define USE_LV_PRELOAD 1
#endif
#if USE_LV_PRELOAD != 0
#ifndef LV_PRELOAD_DEF_ARC_LENGTH
# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
#endif
#ifndef LV_PRELOAD_DEF_SPIN_TIME
# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
#endif
#ifndef LV_PRELOAD_DEF_ANIM
# define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC
#endif
#endif
/*Canvas (dependencies: lv_img)*/
#ifndef USE_LV_CANVAS
#define USE_LV_CANVAS 1
#endif
/*************************
* User input objects
*************************/
/*Button (dependencies: lv_cont*/
#ifndef USE_LV_BTN
#define USE_LV_BTN 1
#endif
#if USE_LV_BTN != 0
#ifndef LV_BTN_INK_EFFECT
# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/
#endif
#endif
/*Image Button (dependencies: lv_btn*/
#ifndef USE_LV_IMGBTN
#define USE_LV_IMGBTN 1
#endif
#if USE_LV_IMGBTN
#ifndef LV_IMGBTN_TILED
# define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
#endif
#endif
/*Button matrix (dependencies: -)*/
#ifndef USE_LV_BTNM
#define USE_LV_BTNM 1
#endif
/*Keyboard (dependencies: lv_btnm)*/
#ifndef USE_LV_KB
#define USE_LV_KB 1
#endif
/*Check box (dependencies: lv_btn, lv_label)*/
#ifndef USE_LV_CB
#define USE_LV_CB 1
#endif
/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
#ifndef USE_LV_LIST
#define USE_LV_LIST 1
#endif
#if USE_LV_LIST != 0
#ifndef LV_LIST_FOCUS_TIME
# define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */
#endif
#endif
/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
#ifndef USE_LV_DDLIST
#define USE_LV_DDLIST 1
#endif
#if USE_LV_DDLIST != 0
#ifndef LV_DDLIST_ANIM_TIME
# define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/
#endif
#endif
/*Roller (dependencies: lv_ddlist)*/
#ifndef USE_LV_ROLLER
#define USE_LV_ROLLER 1
#endif
#if USE_LV_ROLLER != 0
#ifndef LV_ROLLER_ANIM_TIME
# define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/
#endif
#endif
/*Slider (dependencies: lv_bar)*/
#ifndef USE_LV_SLIDER
#define USE_LV_SLIDER 1
#endif
/*Switch (dependencies: lv_slider)*/
#ifndef USE_LV_SW
#define USE_LV_SW 1
#endif
/*************************
* Non-user section
*************************/
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
#ifndef _CRT_SECURE_NO_WARNINGS
# define _CRT_SECURE_NO_WARNINGS
#endif
#endif
#endif /*LV_CONF_CHECKER_H*/

View File

@@ -1,52 +0,0 @@
'''
Generates a chechker file for lv_conf.h from lv_conf_templ.h define all the not defined values
'''
import re
fin = open("lv_conf_templ.h", "r");
fout = open("lv_conf_checker.h", "w");
fout.write(
'/**\n\
* GENERATED FILE, DO NOT EDIT IT!\n\
* @file lv_conf_checker.h\n\
* Make sure all the defines of lv_conf.h have a default value\n\
**/\n\
\n\
#ifndef LV_CONF_CHECKER_H\n\
#define LV_CONF_CHECKER_H\n\
'
)
inlines = fin.read().splitlines();
started = 0
for i in inlines:
if(not started):
if('#define LV_CONF_H' in i):
started = 1
continue
else:
continue
if('/*--END OF LV_CONF_H--*/' in i): break
if(re.search('^ *# *define .*$', i)):
new = re.sub('^ *# *define', '#define ', i)
new = re.sub(' +', ' ', new) #Remove extra white spaces
splitted = new.split(' ')
fout.write('#ifndef ' + splitted[1] + '\n')
fout.write(i + '\n')
fout.write('#endif\n')
else:
fout.write(i + '\n')
fout.write(
'\n\
#endif /*LV_CONF_CHECKER_H*/\n\
')

View File

@@ -1,403 +0,0 @@
/**
* @file lv_conf.h
*
*/
/*
* COPY THIS FILE AS lv_conf.h
*/
#if 0 /*Set it to "1" to enable content*/
#ifndef LV_CONF_H
#define LV_CONF_H
/*===================
Dynamic memory
*===================*/
/* Memory size which will be used by the library
* to store the graphical objects and other data */
#define LV_MEM_CUSTOM 0 /*1: use custom malloc/free, 0: use the built-in lv_mem_alloc/lv_mem_free*/
#if LV_MEM_CUSTOM == 0
# define LV_MEM_SIZE (64U * 1024U) /*Size memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
# define LV_MEM_ATTR /*Complier prefix for big array declaration*/
# define LV_MEM_ADR 0 /*Set an address for memory pool instead of allocation it as an array. Can be in external SRAM too.*/
# define LV_MEM_AUTO_DEFRAG 1 /*Automatically defrag on free*/
#else /*LV_MEM_CUSTOM*/
# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
#endif /*LV_MEM_CUSTOM*/
/* Garbage Collector settings
* Used if lvgl is binded to higher language and the memory is managed by that language */
#define LV_ENABLE_GC 0
#if LV_ENABLE_GC != 0
# define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
# define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
#endif /* LV_ENABLE_GC */
/*===================
Graphical settings
*===================*/
/* Horizontal and vertical resolution of the library.*/
#define LV_HOR_RES (480)
#define LV_VER_RES (320)
/* Dot Per Inch: used to initialize default sizes. E.g. a button with width = LV_DPI / 2 -> half inch wide
* (Not so important, you can adjust it to modify default sizes and spaces)*/
#define LV_DPI 100
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
#define LV_ANTIALIAS 1 /*1: Enable anti-aliasing*/
/*Screen refresh period in milliseconds*/
#define LV_REFR_PERIOD 30
/*-----------------
* VDB settings
*----------------*/
/* VDB (Virtual Display Buffer) is an internal graphics buffer.
* The GUI will be drawn into this buffer first and then
* the buffer will be passed to your `disp_drv.disp_flush` function to
* copy it to your frame buffer.
* VDB is required for: buffered drawing, opacity, anti-aliasing and shadows
* Learn more: https://docs.littlevgl.com/#Drawing*/
/* Size of the VDB in pixels. Typical size: ~1/10 screen. Must be >= LV_HOR_RES
* Setting it to 0 will disable VDB and `disp_drv.disp_fill` and `disp_drv.disp_map` functions
* will be called to draw to the frame buffer directly*/
#define LV_VDB_SIZE ((LV_VER_RES * LV_HOR_RES) / 10)
/* Bit-per-pixel of VDB. Useful for monochrome or non-standard color format displays.
* Special formats are handled with `disp_drv.vdb_wr`)*/
#define LV_VDB_PX_BPP LV_COLOR_SIZE /*LV_COLOR_SIZE comes from LV_COLOR_DEPTH below to set 8, 16 or 32 bit pixel size automatically */
/* Place VDB to a specific address (e.g. in external RAM)
* 0: allocate automatically into RAM
* LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/
#define LV_VDB_ADR 0
/* Use two Virtual Display buffers (VDB) to parallelize rendering and flushing
* The flushing should use DMA to write the frame buffer in the background */
#define LV_VDB_DOUBLE 0
/* Place VDB2 to a specific address (e.g. in external RAM)
* 0: allocate automatically into RAM
* LV_VDB_ADR_INV: to replace it later with `lv_vdb_set_adr()`*/
#define LV_VDB2_ADR 0
/* Using true double buffering in `disp_drv.disp_flush` you will always get the image of the whole screen.
* Your only task is to set the rendered image (`color_p` parameter) as frame buffer address or send it to your display.
* The best if you do in the blank period of you display to avoid tearing effect.
* Requires:
* - LV_VDB_SIZE = LV_HOR_RES * LV_VER_RES
* - LV_VDB_DOUBLE = 1
*/
#define LV_VDB_TRUE_DOUBLE_BUFFERED 0
/*=================
Misc. setting
*=================*/
/*Input device settings*/
#define LV_INDEV_READ_PERIOD 50 /*Input device read period in milliseconds*/
#define LV_INDEV_POINT_MARKER 0 /*Mark the pressed points (required: USE_LV_REAL_DRAW = 1)*/
#define LV_INDEV_DRAG_LIMIT 10 /*Drag threshold in pixels */
#define LV_INDEV_DRAG_THROW 20 /*Drag throw slow-down in [%] (must be > 0). Greater value means faster slow-down */
#define LV_INDEV_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/
#define LV_INDEV_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */
/*Color settings*/
#define LV_COLOR_DEPTH 16 /*Color depth: 1/8/16/32*/
#define LV_COLOR_16_SWAP 0 /*Swap the 2 bytes of RGB565 color. Useful if the display has a 8 bit interface (e.g. SPI)*/
#define LV_COLOR_SCREEN_TRANSP 0 /*1: Enable screen transparency. Useful for OSD or other overlapping GUIs. Requires ARGB8888 colors*/
#define LV_COLOR_TRANSP LV_COLOR_LIME /*Images pixels with this color will not be drawn (with chroma keying)*/
/*Text settings*/
#define LV_TXT_UTF8 1 /*Enable UTF-8 coded Unicode character usage */
#define LV_TXT_BREAK_CHARS " ,.;:-_" /*Can break texts on these chars*/
#define LV_TXT_LINE_BREAK_LONG_LEN 12 /* If a character is at least this long, will break wherever "prettiest" */
#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3 /* Minimum number of characters of a word to put on a line before a break */
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 1 /* Minimum number of characters of a word to put on a line after a break */
/*Feature usage*/
#define USE_LV_ANIMATION 1 /*1: Enable all animations*/
#define USE_LV_SHADOW 1 /*1: Enable shadows*/
#define USE_LV_GROUP 1 /*1: Enable object groups (for keyboards)*/
#define USE_LV_GPU 1 /*1: Enable GPU interface*/
#define USE_LV_REAL_DRAW 1 /*1: Enable function which draw directly to the frame buffer instead of VDB (required if LV_VDB_SIZE = 0)*/
#define USE_LV_FILESYSTEM 1 /*1: Enable file system (might be required for images*/
#define USE_LV_MULTI_LANG 0 /* Number of languages for labels to store (0: to disable this feature)*/
/*Compiler settings*/
#define LV_ATTRIBUTE_TICK_INC /* Define a custom attribute to `lv_tick_inc` function */
#define LV_ATTRIBUTE_TASK_HANDLER /* Define a custom attribute to `lv_task_handler` function */
#define LV_ATTRIBUTE_MEM_ALIGN /* With size optimization (-Os) the compiler might not align data to 4 or 8 byte boundary. This alignment will be explicitly applied where needed.*/
#define LV_COMPILER_VLA_SUPPORTED 1 /* 1: Variable length array is supported*/
#define LV_COMPILER_NON_CONST_INIT_SUPPORTED 1 /* 1: Initialization with non constant values are supported */
/*HAL settings*/
#define LV_TICK_CUSTOM 0 /*1: use a custom tick source (removing the need to manually update the tick with `lv_tick_inc`) */
#if LV_TICK_CUSTOM == 1
#define LV_TICK_CUSTOM_INCLUDE "something.h" /*Header for the sys time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current systime in ms*/
#endif /*LV_TICK_CUSTOM*/
/*Log settings*/
#define USE_LV_LOG 1 /*Enable/disable the log module*/
#if USE_LV_LOG
/* How important log should be added:
* LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
* LV_LOG_LEVEL_INFO Log important events
* LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't caused problem
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
*/
# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
/* 1: Print the log with 'printf'; 0: user need to register a callback*/
# define LV_LOG_PRINTF 0
#endif /*USE_LV_LOG*/
/*================
* THEME USAGE
*================*/
#define LV_THEME_LIVE_UPDATE 1 /*1: Allow theme switching at run time. Uses 8..10 kB of RAM*/
#define USE_LV_THEME_TEMPL 0 /*Just for test*/
#define USE_LV_THEME_DEFAULT 1 /*Built mainly from the built-in styles. Consumes very few RAM*/
#define USE_LV_THEME_ALIEN 1 /*Dark futuristic theme*/
#define USE_LV_THEME_NIGHT 1 /*Dark elegant theme*/
#define USE_LV_THEME_MONO 1 /*Mono color theme for monochrome displays*/
#define USE_LV_THEME_MATERIAL 1 /*Flat theme with bold colors and light shadows*/
#define USE_LV_THEME_ZEN 1 /*Peaceful, mainly light theme */
#define USE_LV_THEME_NEMO 1 /*Water-like theme based on the movie "Finding Nemo"*/
/*==================
* FONT USAGE
*===================*/
/* More info about fonts: https://docs.littlevgl.com/#Fonts
* To enable a built-in font use 1,2,4 or 8 values
* which will determine the bit-per-pixel. Higher value means smoother fonts */
#define USE_LV_FONT_DEJAVU_10 4
#define USE_LV_FONT_DEJAVU_10_LATIN_SUP 4
#define USE_LV_FONT_DEJAVU_10_CYRILLIC 4
#define USE_LV_FONT_SYMBOL_10 4
#define USE_LV_FONT_DEJAVU_20 4
#define USE_LV_FONT_DEJAVU_20_LATIN_SUP 4
#define USE_LV_FONT_DEJAVU_20_CYRILLIC 4
#define USE_LV_FONT_SYMBOL_20 4
#define USE_LV_FONT_DEJAVU_30 4
#define USE_LV_FONT_DEJAVU_30_LATIN_SUP 4
#define USE_LV_FONT_DEJAVU_30_CYRILLIC 4
#define USE_LV_FONT_SYMBOL_30 4
#define USE_LV_FONT_DEJAVU_40 4
#define USE_LV_FONT_DEJAVU_40_LATIN_SUP 4
#define USE_LV_FONT_DEJAVU_40_CYRILLIC 4
#define USE_LV_FONT_SYMBOL_40 4
#define USE_LV_FONT_MONOSPACE_8 1
/* Optionally declare your custom fonts here.
* You can use these fonts as default font too
* and they will be available globally. E.g.
* #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
* LV_FONT_DECLARE(my_font_2) \
*/
#define LV_FONT_CUSTOM_DECLARE
#define LV_FONT_DEFAULT &lv_font_dejavu_20 /*Always set a default font from the built-in fonts*/
/*===================
* LV_OBJ SETTINGS
*==================*/
#define LV_OBJ_FREE_NUM_TYPE uint32_t /*Type of free number attribute (comment out disable free number)*/
#define LV_OBJ_FREE_PTR 1 /*Enable the free pointer attribute*/
#define LV_OBJ_REALIGN 1 /*Enable `lv_obj_realaign()` based on `lv_obj_align()` parameters*/
/*==================
* LV OBJ X USAGE
*================*/
/*
* Documentation of the object types: https://docs.littlevgl.com/#Object-types
*/
/*****************
* Simple object
*****************/
/*Label (dependencies: -*/
#define USE_LV_LABEL 1
#if USE_LV_LABEL != 0
# define LV_LABEL_SCROLL_SPEED 25 /*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_SCROLL/ROLL' mode*/
#endif
/*Image (dependencies: lv_label*/
#define USE_LV_IMG 1
#if USE_LV_IMG != 0
# define LV_IMG_CF_INDEXED 1 /*Enable indexed (palette) images*/
# define LV_IMG_CF_ALPHA 1 /*Enable alpha indexed images*/
#endif
/*Line (dependencies: -*/
#define USE_LV_LINE 1
/*Arc (dependencies: -)*/
#define USE_LV_ARC 1
/*******************
* Container objects
*******************/
/*Container (dependencies: -*/
#define USE_LV_CONT 1
/*Page (dependencies: lv_cont)*/
#define USE_LV_PAGE 1
/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
#define USE_LV_WIN 1
/*Tab (dependencies: lv_page, lv_btnm)*/
#define USE_LV_TABVIEW 1
# if USE_LV_TABVIEW != 0
# define LV_TABVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/
#endif
/*Tileview (dependencies: lv_page) */
#define USE_LV_TILEVIEW 1
#if USE_LV_TILEVIEW
# define LV_TILEVIEW_ANIM_TIME 300 /*Time of slide animation [ms] (0: no animation)*/
#endif
/*************************
* Data visualizer objects
*************************/
/*Bar (dependencies: -)*/
#define USE_LV_BAR 1
/*Line meter (dependencies: *;)*/
#define USE_LV_LMETER 1
/*Gauge (dependencies:lv_bar, lv_lmeter)*/
#define USE_LV_GAUGE 1
/*Chart (dependencies: -)*/
#define USE_LV_CHART 1
/*Table (dependencies: lv_label)*/
#define USE_LV_TABLE 1
#if USE_LV_TABLE
# define LV_TABLE_COL_MAX 12
#endif
/*LED (dependencies: -)*/
#define USE_LV_LED 1
/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
#define USE_LV_MBOX 1
/*Text area (dependencies: lv_label, lv_page)*/
#define USE_LV_TA 1
#if USE_LV_TA != 0
# define LV_TA_CURSOR_BLINK_TIME 400 /*ms*/
# define LV_TA_PWD_SHOW_TIME 1500 /*ms*/
#endif
/*Spinbox (dependencies: lv_ta)*/
#define USE_LV_SPINBOX 1
/*Calendar (dependencies: -)*/
#define USE_LV_CALENDAR 1
/*Preload (dependencies: lv_arc)*/
#define USE_LV_PRELOAD 1
#if USE_LV_PRELOAD != 0
# define LV_PRELOAD_DEF_ARC_LENGTH 60 /*[deg]*/
# define LV_PRELOAD_DEF_SPIN_TIME 1000 /*[ms]*/
# define LV_PRELOAD_DEF_ANIM LV_PRELOAD_TYPE_SPINNING_ARC
#endif
/*Canvas (dependencies: lv_img)*/
#define USE_LV_CANVAS 1
/*************************
* User input objects
*************************/
/*Button (dependencies: lv_cont*/
#define USE_LV_BTN 1
#if USE_LV_BTN != 0
# define LV_BTN_INK_EFFECT 1 /*Enable button-state animations - draw a circle on click (dependencies: USE_LV_ANIMATION)*/
#endif
/*Image Button (dependencies: lv_btn*/
#define USE_LV_IMGBTN 1
#if USE_LV_IMGBTN
# define LV_IMGBTN_TILED 0 /*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
#endif
/*Button matrix (dependencies: -)*/
#define USE_LV_BTNM 1
/*Keyboard (dependencies: lv_btnm)*/
#define USE_LV_KB 1
/*Check box (dependencies: lv_btn, lv_label)*/
#define USE_LV_CB 1
/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
#define USE_LV_LIST 1
#if USE_LV_LIST != 0
# define LV_LIST_FOCUS_TIME 100 /*Default animation time of focusing to a list element [ms] (0: no animation) */
#endif
/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
#define USE_LV_DDLIST 1
#if USE_LV_DDLIST != 0
# define LV_DDLIST_ANIM_TIME 200 /*Open and close default animation time [ms] (0: no animation)*/
#endif
/*Roller (dependencies: lv_ddlist)*/
#define USE_LV_ROLLER 1
#if USE_LV_ROLLER != 0
# define LV_ROLLER_ANIM_TIME 200 /*Focus animation time [ms] (0: no animation)*/
#endif
/*Slider (dependencies: lv_bar)*/
#define USE_LV_SLIDER 1
/*Switch (dependencies: lv_slider)*/
#define USE_LV_SW 1
/*************************
* Non-user section
*************************/
#if LV_INDEV_DRAG_THROW <= 0
#warning "LV_INDEV_DRAG_THROW must be greater than 0"
#undef LV_INDEV_DRAG_THROW
#define LV_INDEV_DRAG_THROW 1
#endif
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
# define _CRT_SECURE_NO_WARNINGS
#endif
/*--END OF LV_CONF_H--*/
/*Be sure every define has a default value*/
#include "lvgl/lv_conf_checker.h"
#endif /*LV_CONF_H*/
#endif /*End of "Content enable"*/

763
lv_conf_template.h Normal file
View File

@@ -0,0 +1,763 @@
/**
* @file lv_conf.h
* Configuration file for v7.7.1-dev
*/
/*
* COPY THIS FILE AS `lv_conf.h` NEXT TO the `lvgl` FOLDER
*/
#if 0 /*Set it to "1" to enable content*/
#ifndef LV_CONF_H
#define LV_CONF_H
/* clang-format off */
#include <stdint.h>
/*====================
Graphical settings
*====================*/
/* Maximal horizontal and vertical resolution to support by the library.*/
#define LV_HOR_RES_MAX (480)
#define LV_VER_RES_MAX (320)
/* Color depth:
* - 1: 1 byte per pixel
* - 8: RGB332
* - 16: RGB565
* - 32: ARGB8888
*/
#define LV_COLOR_DEPTH 16
/* Swap the 2 bytes of RGB565 color.
* Useful if the display has a 8 bit interface (e.g. SPI)*/
#define LV_COLOR_16_SWAP 0
/* 1: Enable screen transparency.
* Useful for OSD or other overlapping GUIs.
* Requires `LV_COLOR_DEPTH = 32` colors and the screen's style should be modified: `style.body.opa = ...`*/
#define LV_COLOR_SCREEN_TRANSP 0
/*Images pixels with this color will not be drawn (with chroma keying)*/
#define LV_COLOR_TRANSP LV_COLOR_LIME /*LV_COLOR_LIME: pure green*/
/* Enable anti-aliasing (lines, and radiuses will be smoothed) */
#define LV_ANTIALIAS 1
/* Default display refresh period.
* Can be changed in the display driver (`lv_disp_drv_t`).*/
#define LV_DISP_DEF_REFR_PERIOD 30 /*[ms]*/
/* Dot Per Inch: used to initialize default sizes.
* E.g. a button with width = LV_DPI / 2 -> half inch wide
* (Not so important, you can adjust it to modify default sizes and spaces)*/
#define LV_DPI 130 /*[px]*/
/* The the real width of the display changes some default values:
* default object sizes, layout of examples, etc.
* According to the width of the display (hor. res. / dpi)
* the displays fall in 4 categories.
* The 4th is extra large which has no upper limit so not listed here
* The upper limit of the categories are set below in 0.1 inch unit.
*/
#define LV_DISP_SMALL_LIMIT 30
#define LV_DISP_MEDIUM_LIMIT 50
#define LV_DISP_LARGE_LIMIT 70
/* Type of coordinates. Should be `int16_t` (or `int32_t` for extreme cases) */
typedef int16_t lv_coord_t;
/*=========================
Memory manager settings
*=========================*/
/* LittelvGL's internal memory manager's settings.
* The graphical objects and other related data are stored here. */
/* 1: use custom malloc/free, 0: use the built-in `lv_mem_alloc` and `lv_mem_free` */
#define LV_MEM_CUSTOM 0
#if LV_MEM_CUSTOM == 0
/* Size of the memory used by `lv_mem_alloc` in bytes (>= 2kB)*/
# define LV_MEM_SIZE (32U * 1024U)
/* Complier prefix for a big array declaration */
# define LV_MEM_ATTR
/* Set an address for the memory pool instead of allocating it as an array.
* Can be in external SRAM too. */
# define LV_MEM_ADR 0
/* Automatically defrag. on free. Defrag. means joining the adjacent free cells. */
# define LV_MEM_AUTO_DEFRAG 1
#else /*LV_MEM_CUSTOM*/
# define LV_MEM_CUSTOM_INCLUDE <stdlib.h> /*Header for the dynamic memory function*/
# define LV_MEM_CUSTOM_ALLOC malloc /*Wrapper to malloc*/
# define LV_MEM_CUSTOM_FREE free /*Wrapper to free*/
#endif /*LV_MEM_CUSTOM*/
/* Use the standard memcpy and memset instead of LVGL's own functions.
* The standard functions might or might not be faster depending on their implementation. */
#define LV_MEMCPY_MEMSET_STD 0
/* Garbage Collector settings
* Used if lvgl is binded to higher level language and the memory is managed by that language */
#define LV_ENABLE_GC 0
#if LV_ENABLE_GC != 0
# define LV_GC_INCLUDE "gc.h" /*Include Garbage Collector related things*/
# define LV_MEM_CUSTOM_REALLOC your_realloc /*Wrapper to realloc*/
# define LV_MEM_CUSTOM_GET_SIZE your_mem_get_size /*Wrapper to lv_mem_get_size*/
#endif /* LV_ENABLE_GC */
/*=======================
Input device settings
*=======================*/
/* Input device default settings.
* Can be changed in the Input device driver (`lv_indev_drv_t`)*/
/* Input device read period in milliseconds */
#define LV_INDEV_DEF_READ_PERIOD 30
/* Drag threshold in pixels */
#define LV_INDEV_DEF_DRAG_LIMIT 10
/* Drag throw slow-down in [%]. Greater value -> faster slow-down */
#define LV_INDEV_DEF_DRAG_THROW 10
/* Long press time in milliseconds.
* Time to send `LV_EVENT_LONG_PRESSSED`) */
#define LV_INDEV_DEF_LONG_PRESS_TIME 400
/* Repeated trigger period in long press [ms]
* Time between `LV_EVENT_LONG_PRESSED_REPEAT */
#define LV_INDEV_DEF_LONG_PRESS_REP_TIME 100
/* Gesture threshold in pixels */
#define LV_INDEV_DEF_GESTURE_LIMIT 50
/* Gesture min velocity at release before swipe (pixels)*/
#define LV_INDEV_DEF_GESTURE_MIN_VELOCITY 3
/*==================
* Feature usage
*==================*/
/*1: Enable the Animations */
#define LV_USE_ANIMATION 1
#if LV_USE_ANIMATION
/*Declare the type of the user data of animations (can be e.g. `void *`, `int`, `struct`)*/
typedef void * lv_anim_user_data_t;
#endif
/* 1: Enable shadow drawing on rectangles*/
#define LV_USE_SHADOW 1
#if LV_USE_SHADOW
/* Allow buffering some shadow calculation
* LV_SHADOW_CACHE_SIZE is the max. shadow size to buffer,
* where shadow size is `shadow_width + radius`
* Caching has LV_SHADOW_CACHE_SIZE^2 RAM cost*/
#define LV_SHADOW_CACHE_SIZE 0
#endif
/*1: enable outline drawing on rectangles*/
#define LV_USE_OUTLINE 1
/*1: enable pattern drawing on rectangles*/
#define LV_USE_PATTERN 1
/*1: enable value string drawing on rectangles*/
#define LV_USE_VALUE_STR 1
/* 1: Use other blend modes than normal (`LV_BLEND_MODE_...`)*/
#define LV_USE_BLEND_MODES 1
/* 1: Use the `opa_scale` style property to set the opacity of an object and its children at once*/
#define LV_USE_OPA_SCALE 1
/* 1: Use image zoom and rotation*/
#define LV_USE_IMG_TRANSFORM 1
/* 1: Enable object groups (for keyboard/encoder navigation) */
#define LV_USE_GROUP 1
#if LV_USE_GROUP
typedef void * lv_group_user_data_t;
#endif /*LV_USE_GROUP*/
/* 1: Enable GPU interface*/
#define LV_USE_GPU 1 /*Only enables `gpu_fill_cb` and `gpu_blend_cb` in the disp. drv- */
#define LV_USE_GPU_STM32_DMA2D 0
/*If enabling LV_USE_GPU_STM32_DMA2D, LV_GPU_DMA2D_CMSIS_INCLUDE must be defined to include path of CMSIS header of target processor
e.g. "stm32f769xx.h" or "stm32f429xx.h" */
#define LV_GPU_DMA2D_CMSIS_INCLUDE
/*1: Use PXP for CPU off-load on NXP RTxxx platforms */
#define LV_USE_GPU_NXP_PXP 0
/*1: Add default bare metal and FreeRTOS interrupt handling routines for PXP (lv_gpu_nxp_pxp_osa.c)
* and call lv_gpu_nxp_pxp_init() automatically during lv_init(). Note that symbol FSL_RTOS_FREE_RTOS
* has to be defined in order to use FreeRTOS OSA, otherwise bare-metal implementation is selected.
*0: lv_gpu_nxp_pxp_init() has to be called manually before lv_init()
* */
#define LV_USE_GPU_NXP_PXP_AUTO_INIT 0
/*1: Use VG-Lite for CPU offload on NXP RTxxx platforms */
#define LV_USE_GPU_NXP_VG_LITE 0
/* 1: Enable file system (might be required for images */
#define LV_USE_FILESYSTEM 1
#if LV_USE_FILESYSTEM
/*Declare the type of the user data of file system drivers (can be e.g. `void *`, `int`, `struct`)*/
typedef void * lv_fs_drv_user_data_t;
#endif
/*1: Add a `user_data` to drivers and objects*/
#define LV_USE_USER_DATA 0
/*1: Show CPU usage and FPS count in the right bottom corner*/
#define LV_USE_PERF_MONITOR 0
/*1: Use the functions and types from the older API if possible */
#define LV_USE_API_EXTENSION_V6 1
#define LV_USE_API_EXTENSION_V7 1
/*========================
* Image decoder and cache
*========================*/
/* 1: Enable indexed (palette) images */
#define LV_IMG_CF_INDEXED 1
/* 1: Enable alpha indexed images */
#define LV_IMG_CF_ALPHA 1
/* Default image cache size. Image caching keeps the images opened.
* If only the built-in image formats are used there is no real advantage of caching.
* (I.e. no new image decoder is added)
* With complex image decoders (e.g. PNG or JPG) caching can save the continuous open/decode of images.
* However the opened images might consume additional RAM.
* LV_IMG_CACHE_DEF_SIZE must be >= 1 */
#define LV_IMG_CACHE_DEF_SIZE 1
/*Declare the type of the user data of image decoder (can be e.g. `void *`, `int`, `struct`)*/
typedef void * lv_img_decoder_user_data_t;
/*=====================
* Compiler settings
*====================*/
/* For big endian systems set to 1 */
#define LV_BIG_ENDIAN_SYSTEM 0
/* Define a custom attribute to `lv_tick_inc` function */
#define LV_ATTRIBUTE_TICK_INC
/* Define a custom attribute to `lv_task_handler` function */
#define LV_ATTRIBUTE_TASK_HANDLER
/* Define a custom attribute to `lv_disp_flush_ready` function */
#define LV_ATTRIBUTE_FLUSH_READY
/* Required alignment size for buffers */
#define LV_ATTRIBUTE_MEM_ALIGN_SIZE
/* With size optimization (-Os) the compiler might not align data to
* 4 or 8 byte boundary. Some HW may need even 32 or 64 bytes.
* This alignment will be explicitly applied where needed.
* LV_ATTRIBUTE_MEM_ALIGN_SIZE should be used to specify required align size.
* E.g. __attribute__((aligned(LV_ATTRIBUTE_MEM_ALIGN_SIZE))) */
#define LV_ATTRIBUTE_MEM_ALIGN
/* Attribute to mark large constant arrays for example
* font's bitmaps */
#define LV_ATTRIBUTE_LARGE_CONST
/* Prefix performance critical functions to place them into a faster memory (e.g RAM)
* Uses 15-20 kB extra memory */
#define LV_ATTRIBUTE_FAST_MEM
/* Export integer constant to binding.
* This macro is used with constants in the form of LV_<CONST> that
* should also appear on lvgl binding API such as Micropython
*
* The default value just prevents a GCC warning.
*/
#define LV_EXPORT_CONST_INT(int_value) struct _silence_gcc_warning
/* Prefix variables that are used in GPU accelerated operations, often these need to be
* placed in RAM sections that are DMA accessible */
#define LV_ATTRIBUTE_DMA
/*===================
* HAL settings
*==================*/
/* 1: use a custom tick source.
* It removes the need to manually update the tick with `lv_tick_inc`) */
#define LV_TICK_CUSTOM 0
#if LV_TICK_CUSTOM == 1
#define LV_TICK_CUSTOM_INCLUDE "Arduino.h" /*Header for the system time function*/
#define LV_TICK_CUSTOM_SYS_TIME_EXPR (millis()) /*Expression evaluating to current system time in ms*/
#endif /*LV_TICK_CUSTOM*/
typedef void * lv_disp_drv_user_data_t; /*Type of user data in the display driver*/
typedef void * lv_indev_drv_user_data_t; /*Type of user data in the input device driver*/
/*================
* Log settings
*===============*/
/*1: Enable the log module*/
#define LV_USE_LOG 0
#if LV_USE_LOG
/* How important log should be added:
* LV_LOG_LEVEL_TRACE A lot of logs to give detailed information
* LV_LOG_LEVEL_INFO Log important events
* LV_LOG_LEVEL_WARN Log if something unwanted happened but didn't cause a problem
* LV_LOG_LEVEL_ERROR Only critical issue, when the system may fail
* LV_LOG_LEVEL_NONE Do not log anything
*/
# define LV_LOG_LEVEL LV_LOG_LEVEL_WARN
/* 1: Print the log with 'printf';
* 0: user need to register a callback with `lv_log_register_print_cb`*/
# define LV_LOG_PRINTF 0
#endif /*LV_USE_LOG*/
/*=================
* Debug settings
*================*/
/* If Debug is enabled LittelvGL validates the parameters of the functions.
* If an invalid parameter is found an error log message is printed and
* the MCU halts at the error. (`LV_USE_LOG` should be enabled)
* If you are debugging the MCU you can pause
* the debugger to see exactly where the issue is.
*
* The behavior of asserts can be overwritten by redefining them here.
* E.g. #define LV_ASSERT_MEM(p) <my_assert_code>
*/
#define LV_USE_DEBUG 1
#if LV_USE_DEBUG
/*Check if the parameter is NULL. (Quite fast) */
#define LV_USE_ASSERT_NULL 1
/*Checks is the memory is successfully allocated or no. (Quite fast)*/
#define LV_USE_ASSERT_MEM 1
/*Check the integrity of `lv_mem` after critical operations. (Slow)*/
#define LV_USE_ASSERT_MEM_INTEGRITY 0
/* Check the strings.
* Search for NULL, very long strings, invalid characters, and unnatural repetitions. (Slow)
* If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
#define LV_USE_ASSERT_STR 0
/* Check NULL, the object's type and existence (e.g. not deleted). (Quite slow)
* If disabled `LV_USE_ASSERT_NULL` will be performed instead (if it's enabled) */
#define LV_USE_ASSERT_OBJ 0
/*Check if the styles are properly initialized. (Fast)*/
#define LV_USE_ASSERT_STYLE 0
#endif /*LV_USE_DEBUG*/
/*==================
* FONT USAGE
*===================*/
/* The built-in fonts contains the ASCII range and some Symbols with 4 bit-per-pixel.
* The symbols are available via `LV_SYMBOL_...` defines
* More info about fonts: https://docs.lvgl.io/v7/en/html/overview/font.html
* To create a new font go to: https://lvgl.com/ttf-font-to-c-array
*/
/* Montserrat fonts with bpp = 4
* https://fonts.google.com/specimen/Montserrat */
#define LV_FONT_MONTSERRAT_8 0
#define LV_FONT_MONTSERRAT_10 0
#define LV_FONT_MONTSERRAT_12 0
#define LV_FONT_MONTSERRAT_14 1
#define LV_FONT_MONTSERRAT_16 0
#define LV_FONT_MONTSERRAT_18 0
#define LV_FONT_MONTSERRAT_20 0
#define LV_FONT_MONTSERRAT_22 0
#define LV_FONT_MONTSERRAT_24 0
#define LV_FONT_MONTSERRAT_26 0
#define LV_FONT_MONTSERRAT_28 0
#define LV_FONT_MONTSERRAT_30 0
#define LV_FONT_MONTSERRAT_32 0
#define LV_FONT_MONTSERRAT_34 0
#define LV_FONT_MONTSERRAT_36 0
#define LV_FONT_MONTSERRAT_38 0
#define LV_FONT_MONTSERRAT_40 0
#define LV_FONT_MONTSERRAT_42 0
#define LV_FONT_MONTSERRAT_44 0
#define LV_FONT_MONTSERRAT_46 0
#define LV_FONT_MONTSERRAT_48 0
/* Demonstrate special features */
#define LV_FONT_MONTSERRAT_12_SUBPX 0
#define LV_FONT_MONTSERRAT_28_COMPRESSED 0 /*bpp = 3*/
#define LV_FONT_DEJAVU_16_PERSIAN_HEBREW 0 /*Hebrew, Arabic, PErisan letters and all their forms*/
#define LV_FONT_SIMSUN_16_CJK 0 /*1000 most common CJK radicals*/
/*Pixel perfect monospace font
* http://pelulamu.net/unscii/ */
#define LV_FONT_UNSCII_8 0
/* Optionally declare your custom fonts here.
* You can use these fonts as default font too
* and they will be available globally. E.g.
* #define LV_FONT_CUSTOM_DECLARE LV_FONT_DECLARE(my_font_1) \
* LV_FONT_DECLARE(my_font_2)
*/
#define LV_FONT_CUSTOM_DECLARE
/* Enable it if you have fonts with a lot of characters.
* The limit depends on the font size, font face and bpp
* but with > 10,000 characters if you see issues probably you need to enable it.*/
#define LV_FONT_FMT_TXT_LARGE 0
/* Enables/disables support for compressed fonts. If it's disabled, compressed
* glyphs cannot be processed by the library and won't be rendered.
*/
#define LV_USE_FONT_COMPRESSED 1
/* Enable subpixel rendering */
#define LV_USE_FONT_SUBPX 1
#if LV_USE_FONT_SUBPX
/* Set the pixel order of the display.
* Important only if "subpx fonts" are used.
* With "normal" font it doesn't matter.
*/
#define LV_FONT_SUBPX_BGR 0
#endif
/*Declare the type of the user data of fonts (can be e.g. `void *`, `int`, `struct`)*/
typedef void * lv_font_user_data_t;
/*================
* THEME USAGE
*================*/
/*Always enable at least on theme*/
/* No theme, you can apply your styles as you need
* No flags. Set LV_THEME_DEFAULT_FLAG 0 */
#define LV_USE_THEME_EMPTY 1
/*Simple to the create your theme based on it
* No flags. Set LV_THEME_DEFAULT_FLAG 0 */
#define LV_USE_THEME_TEMPLATE 1
/* A fast and impressive theme.
* Flags:
* LV_THEME_MATERIAL_FLAG_LIGHT: light theme
* LV_THEME_MATERIAL_FLAG_DARK: dark theme
* LV_THEME_MATERIAL_FLAG_NO_TRANSITION: disable transitions (state change animations)
* LV_THEME_MATERIAL_FLAG_NO_FOCUS: disable indication of focused state)
* */
#define LV_USE_THEME_MATERIAL 1
/* Mono-color theme for monochrome displays.
* If LV_THEME_DEFAULT_COLOR_PRIMARY is LV_COLOR_BLACK the
* texts and borders will be black and the background will be
* white. Else the colors are inverted.
* No flags. Set LV_THEME_DEFAULT_FLAG 0 */
#define LV_USE_THEME_MONO 1
#define LV_THEME_DEFAULT_INCLUDE <stdint.h> /*Include a header for the init. function*/
#define LV_THEME_DEFAULT_INIT lv_theme_material_init
#define LV_THEME_DEFAULT_COLOR_PRIMARY lv_color_hex(0x01a2b1)
#define LV_THEME_DEFAULT_COLOR_SECONDARY lv_color_hex(0x44d1b6)
#define LV_THEME_DEFAULT_FLAG LV_THEME_MATERIAL_FLAG_LIGHT
#define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_14
#define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_14
#define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_14
#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_14
/*=================
* Text settings
*=================*/
/* Select a character encoding for strings.
* Your IDE or editor should have the same character encoding
* - LV_TXT_ENC_UTF8
* - LV_TXT_ENC_ASCII
* */
#define LV_TXT_ENC LV_TXT_ENC_UTF8
/*Can break (wrap) texts on these chars*/
#define LV_TXT_BREAK_CHARS " ,.;:-_"
/* If a word is at least this long, will break wherever "prettiest"
* To disable, set to a value <= 0 */
#define LV_TXT_LINE_BREAK_LONG_LEN 0
/* Minimum number of characters in a long word to put on a line before a break.
* Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
#define LV_TXT_LINE_BREAK_LONG_PRE_MIN_LEN 3
/* Minimum number of characters in a long word to put on a line after a break.
* Depends on LV_TXT_LINE_BREAK_LONG_LEN. */
#define LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 3
/* The control character to use for signalling text recoloring. */
#define LV_TXT_COLOR_CMD "#"
/* Support bidirectional texts.
* Allows mixing Left-to-Right and Right-to-Left texts.
* The direction will be processed according to the Unicode Bidirectioanl Algorithm:
* https://www.w3.org/International/articles/inline-bidi-markup/uba-basics*/
#define LV_USE_BIDI 0
#if LV_USE_BIDI
/* Set the default direction. Supported values:
* `LV_BIDI_DIR_LTR` Left-to-Right
* `LV_BIDI_DIR_RTL` Right-to-Left
* `LV_BIDI_DIR_AUTO` detect texts base direction */
#define LV_BIDI_BASE_DIR_DEF LV_BIDI_DIR_AUTO
#endif
/* Enable Arabic/Persian processing
* In these languages characters should be replaced with
* an other form based on their position in the text */
#define LV_USE_ARABIC_PERSIAN_CHARS 0
/*Change the built in (v)snprintf functions*/
#define LV_SPRINTF_CUSTOM 0
#if LV_SPRINTF_CUSTOM
# define LV_SPRINTF_INCLUDE <stdio.h>
# define lv_snprintf snprintf
# define lv_vsnprintf vsnprintf
#else /*!LV_SPRINTF_CUSTOM*/
# define LV_SPRINTF_DISABLE_FLOAT 1
#endif /*LV_SPRINTF_CUSTOM*/
/*===================
* LV_OBJ SETTINGS
*==================*/
#if LV_USE_USER_DATA
/*Declare the type of the user data of object (can be e.g. `void *`, `int`, `struct`)*/
typedef void * lv_obj_user_data_t;
/*Provide a function to free user data*/
#define LV_USE_USER_DATA_FREE 0
#if LV_USE_USER_DATA_FREE
# define LV_USER_DATA_FREE_INCLUDE "something.h" /*Header for user data free function*/
/* Function prototype : void user_data_free(lv_obj_t * obj); */
# define LV_USER_DATA_FREE (user_data_free) /*Invoking for user data free function*/
#endif
#endif
/*1: enable `lv_obj_realign()` based on `lv_obj_align()` parameters*/
#define LV_USE_OBJ_REALIGN 1
/* Enable to make the object clickable on a larger area.
* LV_EXT_CLICK_AREA_OFF or 0: Disable this feature
* LV_EXT_CLICK_AREA_TINY: The extra area can be adjusted horizontally and vertically (0..255 px)
* LV_EXT_CLICK_AREA_FULL: The extra area can be adjusted in all 4 directions (-32k..+32k px)
*/
#define LV_USE_EXT_CLICK_AREA LV_EXT_CLICK_AREA_TINY
/*==================
* LV OBJ X USAGE
*================*/
/*
* Documentation of the object types: https://docs.lvgl.com/#Object-types
*/
/*Arc (dependencies: -)*/
#define LV_USE_ARC 1
/*Bar (dependencies: -)*/
#define LV_USE_BAR 1
/*Button (dependencies: lv_cont*/
#define LV_USE_BTN 1
/*Button matrix (dependencies: -)*/
#define LV_USE_BTNMATRIX 1
/*Calendar (dependencies: -)*/
#define LV_USE_CALENDAR 1
#if LV_USE_CALENDAR
# define LV_CALENDAR_WEEK_STARTS_MONDAY 0
#endif
/*Canvas (dependencies: lv_img)*/
#define LV_USE_CANVAS 1
/*Check box (dependencies: lv_btn, lv_label)*/
#define LV_USE_CHECKBOX 1
/*Chart (dependencies: -)*/
#define LV_USE_CHART 1
#if LV_USE_CHART
# define LV_CHART_AXIS_TICK_LABEL_MAX_LEN 256
#endif
/*Container (dependencies: -*/
#define LV_USE_CONT 1
/*Color picker (dependencies: -*/
#define LV_USE_CPICKER 1
/*Drop down list (dependencies: lv_page, lv_label, lv_symbol_def.h)*/
#define LV_USE_DROPDOWN 1
#if LV_USE_DROPDOWN != 0
/*Open and close default animation time [ms] (0: no animation)*/
# define LV_DROPDOWN_DEF_ANIM_TIME 200
#endif
/*Gauge (dependencies:lv_bar, lv_linemeter)*/
#define LV_USE_GAUGE 1
/*Image (dependencies: lv_label*/
#define LV_USE_IMG 1
/*Image Button (dependencies: lv_btn*/
#define LV_USE_IMGBTN 1
#if LV_USE_IMGBTN
/*1: The imgbtn requires left, mid and right parts and the width can be set freely*/
# define LV_IMGBTN_TILED 0
#endif
/*Keyboard (dependencies: lv_btnm)*/
#define LV_USE_KEYBOARD 1
/*Label (dependencies: -*/
#define LV_USE_LABEL 1
#if LV_USE_LABEL != 0
/*Hor, or ver. scroll speed [px/sec] in 'LV_LABEL_LONG_ROLL/ROLL_CIRC' mode*/
# define LV_LABEL_DEF_SCROLL_SPEED 25
/* Waiting period at beginning/end of animation cycle */
# define LV_LABEL_WAIT_CHAR_COUNT 3
/*Enable selecting text of the label */
# define LV_LABEL_TEXT_SEL 0
/*Store extra some info in labels (12 bytes) to speed up drawing of very long texts*/
# define LV_LABEL_LONG_TXT_HINT 0
#endif
/*LED (dependencies: -)*/
#define LV_USE_LED 1
#if LV_USE_LED
# define LV_LED_BRIGHT_MIN 120 /*Minimal brightness*/
# define LV_LED_BRIGHT_MAX 255 /*Maximal brightness*/
#endif
/*Line (dependencies: -*/
#define LV_USE_LINE 1
/*List (dependencies: lv_page, lv_btn, lv_label, (lv_img optionally for icons ))*/
#define LV_USE_LIST 1
#if LV_USE_LIST != 0
/*Default animation time of focusing to a list element [ms] (0: no animation) */
# define LV_LIST_DEF_ANIM_TIME 100
#endif
/*Line meter (dependencies: *;)*/
#define LV_USE_LINEMETER 1
#if LV_USE_LINEMETER
/* Draw line more precisely at cost of performance.
* Useful if there are lot of lines any minor are visible
* 0: No extra precision
* 1: Some extra precision
* 2: Best precision
*/
# define LV_LINEMETER_PRECISE 1
#endif
/*Mask (dependencies: -)*/
#define LV_USE_OBJMASK 1
/*Message box (dependencies: lv_rect, lv_btnm, lv_label)*/
#define LV_USE_MSGBOX 1
/*Page (dependencies: lv_cont)*/
#define LV_USE_PAGE 1
#if LV_USE_PAGE != 0
/*Focus default animation time [ms] (0: no animation)*/
# define LV_PAGE_DEF_ANIM_TIME 400
#endif
/*Preload (dependencies: lv_arc, lv_anim)*/
#define LV_USE_SPINNER 1
#if LV_USE_SPINNER != 0
# define LV_SPINNER_DEF_ARC_LENGTH 60 /*[deg]*/
# define LV_SPINNER_DEF_SPIN_TIME 1000 /*[ms]*/
# define LV_SPINNER_DEF_ANIM LV_SPINNER_TYPE_SPINNING_ARC
#endif
/*Roller (dependencies: lv_ddlist)*/
#define LV_USE_ROLLER 1
#if LV_USE_ROLLER != 0
/*Focus animation time [ms] (0: no animation)*/
# define LV_ROLLER_DEF_ANIM_TIME 200
/*Number of extra "pages" when the roller is infinite*/
# define LV_ROLLER_INF_PAGES 7
#endif
/*Slider (dependencies: lv_bar)*/
#define LV_USE_SLIDER 1
/*Spinbox (dependencies: lv_ta)*/
#define LV_USE_SPINBOX 1
/*Switch (dependencies: lv_slider)*/
#define LV_USE_SWITCH 1
/*Text area (dependencies: lv_label, lv_page)*/
#define LV_USE_TEXTAREA 1
#if LV_USE_TEXTAREA != 0
# define LV_TEXTAREA_DEF_CURSOR_BLINK_TIME 400 /*ms*/
# define LV_TEXTAREA_DEF_PWD_SHOW_TIME 1500 /*ms*/
#endif
/*Table (dependencies: lv_label)*/
#define LV_USE_TABLE 1
#if LV_USE_TABLE
# define LV_TABLE_COL_MAX 12
# define LV_TABLE_CELL_STYLE_CNT 4
#endif
/*Tab (dependencies: lv_page, lv_btnm)*/
#define LV_USE_TABVIEW 1
# if LV_USE_TABVIEW != 0
/*Time of slide animation [ms] (0: no animation)*/
# define LV_TABVIEW_DEF_ANIM_TIME 300
#endif
/*Tileview (dependencies: lv_page) */
#define LV_USE_TILEVIEW 1
#if LV_USE_TILEVIEW
/*Time of slide animation [ms] (0: no animation)*/
# define LV_TILEVIEW_DEF_ANIM_TIME 300
#endif
/*Window (dependencies: lv_cont, lv_btn, lv_label, lv_img, lv_page)*/
#define LV_USE_WIN 1
/*==================
* Non-user section
*==================*/
#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) /* Disable warnings for Visual Studio*/
# define _CRT_SECURE_NO_WARNINGS
#endif
/*--END OF LV_CONF_H--*/
#endif /*LV_CONF_H*/
#endif /*End of "Content enable"*/

View File

@@ -1,12 +0,0 @@
CSRCS += lv_group.c
CSRCS += lv_indev.c
CSRCS += lv_obj.c
CSRCS += lv_refr.c
CSRCS += lv_style.c
CSRCS += lv_vdb.c
CSRCS += lv_lang.c
DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_core
VPATH += :$(LVGL_DIR)/lvgl/lv_core
CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_core"

View File

@@ -1,555 +0,0 @@
/**
* @file lv_group.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_group.h"
#if USE_LV_GROUP != 0
#include <stddef.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void style_mod_def(lv_style_t * style);
static void style_mod_edit_def(lv_style_t * style);
static void lv_group_refocus(lv_group_t *g);
static void obj_to_foreground(lv_obj_t * obj);
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Create a new object group
* @return pointer to the new object group
*/
lv_group_t * lv_group_create(void)
{
lv_group_t * group = lv_mem_alloc(sizeof(lv_group_t));
lv_mem_assert(group);
if(group == NULL) return NULL;
lv_ll_init(&group->obj_ll, sizeof(lv_obj_t *));
group->style_mod = style_mod_def;
group->style_mod_edit = style_mod_edit_def;
group->obj_focus = NULL;
group->frozen = 0;
group->focus_cb = NULL;
group->click_focus = 1;
group->editing = 0;
group->wrap = 1;
return group;
}
/**
* Delete a group object
* @param group pointer to a group
*/
void lv_group_del(lv_group_t * group)
{
/*Defocus the the currently focused object*/
if(group->obj_focus != NULL) {
(*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
lv_obj_invalidate(*group->obj_focus);
}
/*Remove the objects from the group*/
lv_obj_t ** obj;
LL_READ(group->obj_ll, obj) {
(*obj)->group_p = NULL;
}
lv_ll_clear(&(group->obj_ll));
lv_mem_free(group);
}
/**
* Add an object to a group
* @param group pointer to a group
* @param obj pointer to an object to add
*/
void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj)
{
if(group == NULL) return;
/*If the object is already in a group and focused then defocus it*/
if(obj->group_p) {
if(lv_obj_is_focused(obj)) {
lv_group_refocus(obj->group_p);
LV_LOG_INFO("group: assign object to an other group");
}
}
obj->group_p = group;
lv_obj_t ** next = lv_ll_ins_tail(&group->obj_ll);
lv_mem_assert(next);
if(next == NULL) return;
*next = obj;
/* If the head and the tail is equal then there is only one object in the linked list.
* In this case automatically activate it*/
if(lv_ll_get_head(&group->obj_ll) == next) {
lv_group_refocus(group);
}
}
/**
* Remove an object from its group
* @param obj pointer to an object to remove
*/
void lv_group_remove_obj(lv_obj_t * obj)
{
lv_group_t * g = obj->group_p;
if(g == NULL) return;
if(g->obj_focus == NULL) return; /*Just to be sure (Not possible if there is at least one object in the group)*/
/*Focus on the next object*/
if(*g->obj_focus == obj) {
/*If this is the only object in the group then focus to nothing.*/
if(lv_ll_get_head(&g->obj_ll) == g->obj_focus && lv_ll_get_tail(&g->obj_ll) == g->obj_focus) {
(*g->obj_focus)->signal_func(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
}
/*If there more objects in the group then focus to the next/prev object*/
else {
lv_group_refocus(g);
}
}
/* If the focuses object is still the same then it was the only object in the group but it will be deleted.
* Set the `obj_focus` to NULL to get back to the initial state of the group with zero objects*/
if(*g->obj_focus == obj) {
g->obj_focus = NULL;
}
/*Search the object and remove it from its group */
lv_obj_t ** i;
LL_READ(g->obj_ll, i) {
if(*i == obj) {
lv_ll_rem(&g->obj_ll, i);
lv_mem_free(i);
obj->group_p = NULL;
break;
}
}
}
/**
* Focus on an object (defocus the current)
* @param obj pointer to an object to focus on
*/
void lv_group_focus_obj(lv_obj_t * obj)
{
lv_group_t * g = obj->group_p;
if(g == NULL) return;
if(g->frozen != 0) return;
/*On defocus edit mode must be leaved*/
lv_group_set_editing(g, false);
lv_obj_t ** i;
LL_READ(g->obj_ll, i) {
if(*i == obj) {
if(g->obj_focus == i) return; /*Don't focus the already focused object again*/
if(g->obj_focus != NULL) {
(*g->obj_focus)->signal_func(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
lv_obj_invalidate(*g->obj_focus);
}
g->obj_focus = i;
if(g->obj_focus != NULL) {
(*g->obj_focus)->signal_func(*g->obj_focus, LV_SIGNAL_FOCUS, NULL);
if(g->focus_cb) g->focus_cb(g);
lv_obj_invalidate(*g->obj_focus);
/*If the object or its parent has `top == true` bring it to the foregorund*/
obj_to_foreground(*g->obj_focus);
}
break;
}
}
}
/**
* Focus the next object in a group (defocus the current)
* @param group pointer to a group
*/
void lv_group_focus_next(lv_group_t * group)
{
if(group->frozen) return;
if(group->obj_focus) {
(*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
lv_obj_invalidate(*group->obj_focus);
}
lv_obj_t ** obj_next;
if(group->obj_focus == NULL) obj_next = lv_ll_get_head(&group->obj_ll);
else obj_next = lv_ll_get_next(&group->obj_ll, group->obj_focus);
if(obj_next == NULL) {
if(group->wrap) obj_next = lv_ll_get_head(&group->obj_ll);
else obj_next = lv_ll_get_tail(&group->obj_ll);
}
group->obj_focus = obj_next;
if(group->obj_focus) {
(*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_FOCUS, NULL);
lv_obj_invalidate(*group->obj_focus);
if(group->focus_cb) group->focus_cb(group);
/*If the object or its parent has `top == true` bring it to the foregorund*/
obj_to_foreground(*group->obj_focus);
}
}
/**
* Focus the previous object in a group (defocus the current)
* @param group pointer to a group
*/
void lv_group_focus_prev(lv_group_t * group)
{
if(group->frozen) return;
if(group->obj_focus) {
(*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
lv_obj_invalidate(*group->obj_focus);
}
lv_obj_t ** obj_next;
if(group->obj_focus == NULL) obj_next = lv_ll_get_tail(&group->obj_ll);
else obj_next = lv_ll_get_prev(&group->obj_ll, group->obj_focus);
if(obj_next == NULL) {
if(group->wrap) obj_next = lv_ll_get_tail(&group->obj_ll);
else obj_next = lv_ll_get_head(&group->obj_ll);
}
group->obj_focus = obj_next;
if(group->obj_focus != NULL) {
(*group->obj_focus)->signal_func(*group->obj_focus, LV_SIGNAL_FOCUS, NULL);
lv_obj_invalidate(*group->obj_focus);
if(group->focus_cb) group->focus_cb(group);
/*If the object or its parent has `top == true` bring it to the foregorund*/
obj_to_foreground(*group->obj_focus);
}
}
/**
* Do not let to change the focus from the current object
* @param group pointer to a group
* @param en true: freeze, false: release freezing (normal mode)
*/
void lv_group_focus_freeze(lv_group_t * group, bool en)
{
if(en == false) group->frozen = 0;
else group->frozen = 1;
}
/**
* Send a control character to the focuses object of a group
* @param group pointer to a group
* @param c a character (use LV_GROUP_KEY_.. to navigate)
* @return result of focused object in group.
*/
lv_res_t lv_group_send_data(lv_group_t * group, uint32_t c)
{
lv_obj_t * act = lv_group_get_focused(group);
if(act == NULL) return LV_RES_OK;
return act->signal_func(act, LV_SIGNAL_CONTROLL, &c);
}
/**
* Set a function for a group which will modify the object's style if it is in focus
* @param group pointer to a group
* @param style_mod_func the style modifier function pointer
*/
void lv_group_set_style_mod_cb(lv_group_t * group, lv_group_style_mod_func_t style_mod_func)
{
group->style_mod = style_mod_func;
if(group->obj_focus != NULL) lv_obj_invalidate(*group->obj_focus);
}
/**
* Set a function for a group which will modify the object's style if it is in focus in edit mode
* @param group pointer to a group
* @param style_mod_func the style modifier function pointer
*/
void lv_group_set_style_mod_edit_cb(lv_group_t * group, lv_group_style_mod_func_t style_mod_func)
{
group->style_mod_edit = style_mod_func;
if(group->obj_focus != NULL) lv_obj_invalidate(*group->obj_focus);
}
/**
* Set a function for a group which will be called when a new object is focused
* @param group pointer to a group
* @param focus_cb the call back function or NULL if unused
*/
void lv_group_set_focus_cb(lv_group_t * group, lv_group_focus_cb_t focus_cb)
{
group->focus_cb = focus_cb;
}
/**
* Manually set the current mode (edit or navigate).
* @param group pointer to group
* @param edit: true: edit mode; false: navigate mode
*/
void lv_group_set_editing(lv_group_t * group, bool edit)
{
uint8_t en_val = edit ? 1 : 0;
if(en_val == group->editing) return; /*Do not set the same mode again*/
group->editing = en_val;
lv_obj_t * focused = lv_group_get_focused(group);
if(focused) focused->signal_func(focused, LV_SIGNAL_FOCUS, NULL); /*Focus again to properly leave edit mode*/
lv_obj_invalidate(focused);
}
/**
* Set the `click_focus` attribute. If enabled then the object will be focused then it is clicked.
* @param group pointer to group
* @param en: true: enable `click_focus`
*/
void lv_group_set_click_focus(lv_group_t * group, bool en)
{
group->click_focus = en ? 1 : 0;
}
void lv_group_set_refocus_policy(lv_group_t * group, lv_group_refocus_policy_t policy) {
group->refocus_policy = policy & 0x01;
}
static void lv_group_refocus(lv_group_t *g) {
/*Refocus must temporarily allow wrapping to work correctly*/
uint8_t temp_wrap = g->wrap;
g->wrap = 1;
if(g->refocus_policy == LV_GROUP_REFOCUS_POLICY_NEXT)
lv_group_focus_next(g);
else if(g->refocus_policy == LV_GROUP_REFOCUS_POLICY_PREV)
lv_group_focus_prev(g);
/*Restore wrap property*/
g->wrap = temp_wrap;
}
/**
* Set whether focus next/prev will allow wrapping from first->last or last->first.
* @param group pointer to group
* @param en: true: enable `wrap`
*/
void lv_group_set_wrap(lv_group_t * group, bool en)
{
group->wrap = en ? 1 : 0;
}
/**
* Modify a style with the set 'style_mod' function. The input style remains unchanged.
* @param group pointer to group
* @param style pointer to a style to modify
* @return a copy of the input style but modified with the 'style_mod' function
*/
lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style)
{
lv_style_copy(&group->style_tmp, style);
if(group->editing) {
if(group->style_mod_edit) group->style_mod_edit(&group->style_tmp);
} else {
if(group->style_mod) group->style_mod(&group->style_tmp);
}
return &group->style_tmp;
}
/**
* Get the focused object or NULL if there isn't one
* @param group pointer to a group
* @return pointer to the focused object
*/
lv_obj_t * lv_group_get_focused(const lv_group_t * group)
{
if(!group) return NULL;
if(group->obj_focus == NULL) return NULL;
return *group->obj_focus;
}
/**
* Get a the style modifier function of a group
* @param group pointer to a group
* @return pointer to the style modifier function
*/
lv_group_style_mod_func_t lv_group_get_style_mod_cb(const lv_group_t * group)
{
if(!group) return false;
return group->style_mod ;
}
/**
* Get a the style modifier function of a group in edit mode
* @param group pointer to a group
* @return pointer to the style modifier function
*/
lv_group_style_mod_func_t lv_group_get_style_mod_edit_cb(const lv_group_t * group)
{
if(!group) return false;
return group->style_mod_edit;
}
/**
* Get the focus callback function of a group
* @param group pointer to a group
* @return the call back function or NULL if not set
*/
lv_group_focus_cb_t lv_group_get_focus_cb(const lv_group_t * group)
{
if(!group) return false;
return group->focus_cb;
}
/**
* Get the current mode (edit or navigate).
* @param group pointer to group
* @return true: edit mode; false: navigate mode
*/
bool lv_group_get_editing(const lv_group_t * group)
{
if(!group) return false;
return group->editing ? true : false;
}
/**
* Get the `click_focus` attribute.
* @param group pointer to group
* @return true: `click_focus` is enabled; false: disabled
*/
bool lv_group_get_click_focus(const lv_group_t * group)
{
if(!group) return false;
return group->click_focus ? true : false;
}
/**
* Get whether focus next/prev will allow wrapping from first->last or last->first object.
* @param group pointer to group
* @param en: true: wrapping enabled; false: wrapping disabled
*/
bool lv_group_get_wrap(lv_group_t * group)
{
if(!group) return false;
return group->wrap ? true : false;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Default style modifier function
* @param style pointer to a style to modify. (Typically group.style_tmp) It will be OVERWRITTEN.
*/
static void style_mod_def(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
/*Make the style to be a little bit orange*/
style->body.border.opa = LV_OPA_COVER;
style->body.border.color = LV_COLOR_ORANGE;
/*If not empty or has border then emphasis the border*/
if(style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_ORANGE, LV_OPA_70);
style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_ORANGE, LV_OPA_70);
style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_ORANGE, LV_OPA_60);
style->text.color = lv_color_mix(style->text.color, LV_COLOR_ORANGE, LV_OPA_70);
#else
style->body.border.opa = LV_OPA_COVER;
style->body.border.color = LV_COLOR_BLACK;
style->body.border.width = 2;
#endif
}
/**
* Default style modifier function
* @param style pointer to a style to modify. (Typically group.style_tmp) It will be OVERWRITTEN.
*/
static void style_mod_edit_def(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
/*Make the style to be a little bit orange*/
style->body.border.opa = LV_OPA_COVER;
style->body.border.color = LV_COLOR_GREEN;
/*If not empty or has border then emphasis the border*/
if(style->body.empty == 0 || style->body.border.width != 0) style->body.border.width = LV_DPI / 20;
style->body.main_color = lv_color_mix(style->body.main_color, LV_COLOR_GREEN, LV_OPA_70);
style->body.grad_color = lv_color_mix(style->body.grad_color, LV_COLOR_GREEN, LV_OPA_70);
style->body.shadow.color = lv_color_mix(style->body.shadow.color, LV_COLOR_GREEN, LV_OPA_60);
style->text.color = lv_color_mix(style->text.color, LV_COLOR_GREEN, LV_OPA_70);
#else
style->body.border.opa = LV_OPA_COVER;
style->body.border.color = LV_COLOR_BLACK;
style->body.border.width = 3;
#endif
}
static void obj_to_foreground(lv_obj_t * obj)
{
/*Search for 'top' attribute*/
lv_obj_t * i = obj;
lv_obj_t * last_top = NULL;
while(i != NULL) {
if(i->top != 0) last_top = i;
i = lv_obj_get_parent(i);
}
if(last_top != NULL) {
/*Move the last_top object to the foreground*/
lv_obj_t * par = lv_obj_get_parent(last_top);
/*After list change it will be the new head*/
lv_ll_chg_list(&par->child_ll, &par->child_ll, last_top);
lv_obj_invalidate(last_top);
}
}
#endif /*USE_LV_GROUP != 0*/

View File

@@ -1,965 +0,0 @@
/**
* @file lv_indev_proc.c
*
*/
/*********************
* INCLUDES
********************/
#include "lv_indev.h"
#include "../lv_hal/lv_hal_tick.h"
#include "../lv_core/lv_group.h"
#include "../lv_core/lv_refr.h"
#include "../lv_misc/lv_task.h"
#include "../lv_misc/lv_math.h"
#include "../lv_draw/lv_draw_rbasic.h"
#include "lv_obj.h"
/*********************
* DEFINES
*********************/
#if LV_INDEV_DRAG_THROW <= 0
#warning "LV_INDEV_DRAG_THROW must be greater than 0"
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
#if LV_INDEV_READ_PERIOD != 0
static void indev_proc_task(void * param);
static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data);
static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data);
static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data);
static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data);
static void indev_proc_press(lv_indev_proc_t * proc);
static void indev_proc_release(lv_indev_proc_t * proc);
static void indev_proc_reset_query_handler(lv_indev_t * indev);
static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj);
static void indev_drag(lv_indev_proc_t * state);
static void indev_drag_throw(lv_indev_proc_t * state);
#endif
/**********************
* STATIC VARIABLES
**********************/
static lv_indev_t * indev_act;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the display input device subsystem
*/
void lv_indev_init(void)
{
#if LV_INDEV_READ_PERIOD != 0
lv_task_create(indev_proc_task, LV_INDEV_READ_PERIOD, LV_TASK_PRIO_MID, NULL);
#endif
lv_indev_reset(NULL); /*Reset all input devices*/
}
/**
* Get the currently processed input device. Can be used in action functions too.
* @return pointer to the currently processed input device or NULL if no input device processing right now
*/
lv_indev_t * lv_indev_get_act(void)
{
return indev_act;
}
/**
* Get the type of an input device
* @param indev pointer to an input device
* @return the type of the input device from `lv_hal_indev_type_t` (`LV_INDEV_TYPE_...`)
*/
lv_hal_indev_type_t lv_indev_get_type(const lv_indev_t * indev)
{
if(indev == NULL) return LV_INDEV_TYPE_NONE;
return indev->driver.type;
}
/**
* Reset one or all input devices
* @param indev pointer to an input device to reset or NULL to reset all of them
*/
void lv_indev_reset(lv_indev_t * indev)
{
if(indev) indev->proc.reset_query = 1;
else {
lv_indev_t * i = lv_indev_next(NULL);
while(i) {
i->proc.reset_query = 1;
i = lv_indev_next(i);
}
}
}
/**
* Reset the long press state of an input device
* @param indev pointer to an input device
*/
void lv_indev_reset_lpr(lv_indev_t * indev)
{
indev->proc.long_pr_sent = 0;
indev->proc.longpr_rep_timestamp = lv_tick_get();
indev->proc.pr_timestamp = lv_tick_get();
}
/**
* Enable input devices device by type
* @param type Input device type
* @param enable true: enable this type; false: disable this type
*/
void lv_indev_enable(lv_hal_indev_type_t type, bool enable)
{
lv_indev_t * i = lv_indev_next(NULL);
while(i) {
if(i->driver.type == type) i->proc.disabled = enable == false ? 1 : 0;
i = lv_indev_next(i);
}
}
/**
* Set a cursor for a pointer input device (for LV_INPUT_TYPE_POINTER and LV_INPUT_TYPE_BUTTON)
* @param indev pointer to an input device
* @param cur_obj pointer to an object to be used as cursor
*/
void lv_indev_set_cursor(lv_indev_t * indev, lv_obj_t * cur_obj)
{
if(indev->driver.type != LV_INDEV_TYPE_POINTER) return;
indev->cursor = cur_obj;
lv_obj_set_parent(indev->cursor, lv_layer_sys());
lv_obj_set_pos(indev->cursor, indev->proc.act_point.x, indev->proc.act_point.y);
}
#if USE_LV_GROUP
/**
* Set a destination group for a keypad input device (for LV_INDEV_TYPE_KEYPAD)
* @param indev pointer to an input device
* @param group point to a group
*/
void lv_indev_set_group(lv_indev_t * indev, lv_group_t * group)
{
if(indev->driver.type == LV_INDEV_TYPE_KEYPAD || indev->driver.type == LV_INDEV_TYPE_ENCODER) indev->group = group;
}
#endif
/**
* Set the an array of points for LV_INDEV_TYPE_BUTTON.
* These points will be assigned to the buttons to press a specific point on the screen
* @param indev pointer to an input device
* @param group point to a group
*/
void lv_indev_set_button_points(lv_indev_t * indev, const lv_point_t * points)
{
if(indev->driver.type == LV_INDEV_TYPE_BUTTON) indev->btn_points = points;
}
/**
* Set feedback callback for indev.
* @param indev pointer to an input device
* @param feedback feedback callback
*/
void lv_indev_set_feedback(lv_indev_t *indev, lv_indev_feedback_t feedback)
{
indev->feedback = feedback;
}
/**
* Get the last point of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON)
* @param indev pointer to an input device
* @param point pointer to a point to store the result
*/
void lv_indev_get_point(const lv_indev_t * indev, lv_point_t * point)
{
if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) {
point->x = -1;
point->y = -1;
} else {
point->x = indev->proc.act_point.x;
point->y = indev->proc.act_point.y;
}
}
/**
* Get the last key of an input device (for LV_INDEV_TYPE_KEYPAD)
* @param indev pointer to an input device
* @return the last pressed key (0 on error)
*/
uint32_t lv_indev_get_key(const lv_indev_t * indev)
{
if(indev->driver.type != LV_INDEV_TYPE_KEYPAD) return 0;
else return indev->proc.last_key;
}
/**
* Check if there is dragging with an input device or not (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON)
* @param indev pointer to an input device
* @return true: drag is in progress
*/
bool lv_indev_is_dragging(const lv_indev_t * indev)
{
if(indev == NULL) return false;
if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) return false;
return indev->proc.drag_in_prog == 0 ? false : true;
}
/**
* Get the vector of dragging of an input device (for LV_INDEV_TYPE_POINTER and LV_INDEV_TYPE_BUTTON)
* @param indev pointer to an input device
* @param point pointer to a point to store the vector
*/
void lv_indev_get_vect(const lv_indev_t * indev, lv_point_t * point)
{
if(indev == NULL) {
point->x = 0;
point->y = 0;
return;
}
if(indev->driver.type != LV_INDEV_TYPE_POINTER && indev->driver.type != LV_INDEV_TYPE_BUTTON) {
point->x = 0;
point->y = 0;
} else {
point->x = indev->proc.vect.x;
point->y = indev->proc.vect.y;
}
}
/**
* Get elapsed time since last press
* @param indev pointer to an input device (NULL to get the overall smallest inactivity)
* @return Elapsed ticks (milliseconds) since last press
*/
uint32_t lv_indev_get_inactive_time(const lv_indev_t * indev)
{
uint32_t t;
if(indev) return t = lv_tick_elaps(indev->last_activity_time);
lv_indev_t * i;
t = UINT16_MAX;
i = lv_indev_next(NULL);
while(i) {
t = LV_MATH_MIN(t, lv_tick_elaps(i->last_activity_time));
i = lv_indev_next(i);
}
return t;
}
/**
* Get feedback callback for indev.
* @param indev pointer to an input device
* @return feedback callback
*/
lv_indev_feedback_t lv_indev_get_feedback(const lv_indev_t *indev)
{
return indev->feedback;
}
/**
* Do nothing until the next release
* @param indev pointer to an input device
*/
void lv_indev_wait_release(lv_indev_t * indev)
{
indev->proc.wait_unil_release = 1;
}
/**********************
* STATIC FUNCTIONS
**********************/
#if LV_INDEV_READ_PERIOD != 0
/**
* Called periodically to handle the input devices
* @param param unused
*/
static void indev_proc_task(void * param)
{
(void)param;
LV_LOG_TRACE("indev task started");
lv_indev_data_t data;
lv_indev_t * i;
i = lv_indev_next(NULL);
/*Read and process all indevs*/
while(i) {
indev_act = i;
/*Handle reset query before processing the point*/
indev_proc_reset_query_handler(i);
if(i->proc.disabled == 0) {
bool more_to_read;
do {
/*Read the data*/
more_to_read = lv_indev_read(i, &data);
indev_proc_reset_query_handler(i); /*The active object might deleted even in the read function*/
i->proc.state = data.state;
if(i->proc.state == LV_INDEV_STATE_PR) {
i->last_activity_time = lv_tick_get();
}
if(i->driver.type == LV_INDEV_TYPE_POINTER) {
indev_pointer_proc(i, &data);
} else if(i->driver.type == LV_INDEV_TYPE_KEYPAD) {
indev_keypad_proc(i, &data);
} else if(i->driver.type == LV_INDEV_TYPE_ENCODER) {
indev_encoder_proc(i, &data);
} else if(i->driver.type == LV_INDEV_TYPE_BUTTON) {
indev_button_proc(i, &data);
}
/*Handle reset query if it happened in during processing*/
indev_proc_reset_query_handler(i);
} while(more_to_read);
}
i = lv_indev_next(i); /*Go to the next indev*/
}
indev_act = NULL; /*End of indev processing, so no act indev*/
LV_LOG_TRACE("indev task finished");
}
/**
* Process a new point from LV_INDEV_TYPE_POINTER input device
* @param i pointer to an input device
* @param data pointer to the data read from the input device
*/
static void indev_pointer_proc(lv_indev_t * i, lv_indev_data_t * data)
{
/*Move the cursor if set and moved*/
if(i->cursor != NULL &&
(i->proc.last_point.x != data->point.x ||
i->proc.last_point.y != data->point.y)) {
lv_obj_set_pos(i->cursor, data->point.x, data->point.y);
}
i->proc.act_point.x = data->point.x;
i->proc.act_point.y = data->point.y;
if(i->proc.state == LV_INDEV_STATE_PR) {
#if LV_INDEV_POINT_MARKER != 0
lv_area_t area;
area.x1 = i->proc.act_point.x - (LV_INDEV_POINT_MARKER >> 1);
area.y1 = i->proc.act_point.y - (LV_INDEV_POINT_MARKER >> 1);
area.x2 = i->proc.act_point.x + ((LV_INDEV_POINT_MARKER >> 1) | 0x1);
area.y2 = i->proc.act_point.y + ((LV_INDEV_POINT_MARKER >> 1) | 0x1);
lv_rfill(&area, NULL, LV_COLOR_MAKE(0xFF, 0, 0), LV_OPA_COVER);
#endif
indev_proc_press(&i->proc);
} else {
indev_proc_release(&i->proc);
}
i->proc.last_point.x = i->proc.act_point.x;
i->proc.last_point.y = i->proc.act_point.y;
}
/**
* Process a new point from LV_INDEV_TYPE_KEYPAD input device
* @param i pointer to an input device
* @param data pointer to the data read from the input device
*/
static void indev_keypad_proc(lv_indev_t * i, lv_indev_data_t * data)
{
#if USE_LV_GROUP
if(i->group == NULL) return;
/*Key press happened*/
if(data->state == LV_INDEV_STATE_PR &&
i->proc.last_state == LV_INDEV_STATE_REL) {
i->proc.pr_timestamp = lv_tick_get();
lv_obj_t * focused = lv_group_get_focused(i->group);
if(focused && data->key == LV_GROUP_KEY_ENTER) {
focused->signal_func(focused, LV_SIGNAL_PRESSED, indev_act);
}
}
/*Pressing*/
else if(data->state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_PR) {
if(data->key == LV_GROUP_KEY_ENTER &&
i->proc.long_pr_sent == 0 &&
lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) {
/*On enter long press leave edit mode.*/
lv_obj_t * focused = lv_group_get_focused(i->group);
if(focused) {
focused->signal_func(focused, LV_SIGNAL_LONG_PRESS, indev_act);
i->proc.long_pr_sent = 1;
}
}
}
/*Release happened*/
else if(data->state == LV_INDEV_STATE_REL && i->proc.last_state == LV_INDEV_STATE_PR) {
/*The user might clear the key when it was released. Always release the pressed key*/
data->key = i->proc.last_key;
/* Edit mode is not used by KEYPAD devices.
* So leave edit mode if we are in it before focusing on the next/prev object*/
if(data->key == LV_GROUP_KEY_NEXT || data->key == LV_GROUP_KEY_PREV) {
lv_group_set_editing(i->group, false);
}
if(data->key == LV_GROUP_KEY_NEXT) {
lv_group_focus_next(i->group);
} else if(data->key == LV_GROUP_KEY_PREV) {
lv_group_focus_prev(i->group);
} else if(data->key == LV_GROUP_KEY_ENTER) {
if(!i->proc.long_pr_sent) {
lv_group_send_data(i->group, data->key);
}
} else {
lv_group_send_data(i->group, data->key);
}
if(i->proc.reset_query) return; /*The object might be deleted in `focus_cb` or due to any other user event*/
i->proc.pr_timestamp = 0;
i->proc.long_pr_sent = 0;
}
i->proc.last_state = data->state;
i->proc.last_key = data->key;
#else
(void)data; /*Unused*/
(void)i; /*Unused*/
#endif
}
/**
* Process a new point from LV_INDEV_TYPE_ENCODER input device
* @param i pointer to an input device
* @param data pointer to the data read from the input device
*/
static void indev_encoder_proc(lv_indev_t * i, lv_indev_data_t * data)
{
#if USE_LV_GROUP
if(i->group == NULL) return;
/*Process the steps first. They are valid only with released button*/
if(data->state == LV_INDEV_STATE_REL) {
/*In edit mode send LEFT/RIGHT keys*/
if(lv_group_get_editing(i->group)) {
int32_t s;
if(data->enc_diff < 0) {
for(s = 0; s < -data->enc_diff; s++) lv_group_send_data(i->group, LV_GROUP_KEY_LEFT);
} else if(data->enc_diff > 0) {
for(s = 0; s < data->enc_diff; s++) lv_group_send_data(i->group, LV_GROUP_KEY_RIGHT);
}
}
/*In navigate mode focus on the next/prev objects*/
else {
int32_t s;
if(data->enc_diff < 0) {
for(s = 0; s < -data->enc_diff; s++) lv_group_focus_prev(i->group);
} else if(data->enc_diff > 0) {
for(s = 0; s < data->enc_diff; s++) lv_group_focus_next(i->group);
}
}
}
/*Key press happened*/
if(data->state == LV_INDEV_STATE_PR &&
i->proc.last_state == LV_INDEV_STATE_REL) {
i->proc.pr_timestamp = lv_tick_get();
}
/*Pressing*/
else if(data->state == LV_INDEV_STATE_PR && i->proc.last_state == LV_INDEV_STATE_PR) {
if(i->proc.long_pr_sent == 0 &&
lv_tick_elaps(i->proc.pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) {
/*On enter long press leave edit mode.*/
lv_obj_t * focused = lv_group_get_focused(i->group);
bool editable = false;
if(focused) focused->signal_func(focused, LV_SIGNAL_GET_EDITABLE, &editable);
if(editable) {
if(i->group->obj_ll.head != i->group->obj_ll.tail)
lv_group_set_editing(i->group, lv_group_get_editing(i->group) ? false : true); /*Toggle edit mode on long press*/
else if(focused)
focused->signal_func(focused, LV_SIGNAL_LONG_PRESS, indev_act);
}
/*If not editable then just send a long press signal*/
else {
if(focused)
focused->signal_func(focused, LV_SIGNAL_LONG_PRESS, indev_act);
}
i->proc.long_pr_sent = 1;
}
}
/*Release happened*/
else if(data->state == LV_INDEV_STATE_REL && i->proc.last_state == LV_INDEV_STATE_PR) {
lv_obj_t * focused = lv_group_get_focused(i->group);
bool editable = false;
if(focused) focused->signal_func(focused, LV_SIGNAL_GET_EDITABLE, &editable);
/*The button was released on a non-editable object. Just send enter*/
if(!editable) {
lv_group_send_data(i->group, LV_GROUP_KEY_ENTER);
}
/*An object is being edited and the button is releases. Just send enter */
else if(i->group->editing) {
if(!i->proc.long_pr_sent || i->group->obj_ll.head == i->group->obj_ll.tail)
lv_group_send_data(i->group, LV_GROUP_KEY_ENTER); /*Ignore long pressed enter release because it comes from mode switch*/
}
/*If the focused object is editable and now in navigate mode then enter edit mode*/
else if(editable && !i->group->editing && !i->proc.long_pr_sent) {
lv_group_set_editing(i->group, lv_group_get_editing(i->group) ? false : true); /*Toggle edit mode on long press*/
}
if(i->proc.reset_query) return; /*The object might be deleted in `focus_cb` or due to any other user event*/
i->proc.pr_timestamp = 0;
i->proc.long_pr_sent = 0;
}
i->proc.last_state = data->state;
i->proc.last_key = data->key;
#else
(void)data; /*Unused*/
(void)i; /*Unused*/
#endif
}
/**
* Process new points from a input device. indev->state.pressed has to be set
* @param indev pointer to an input device state
* @param x x coordinate of the next point
* @param y y coordinate of the next point
*/
static void indev_button_proc(lv_indev_t * i, lv_indev_data_t * data)
{
i->proc.act_point.x = i->btn_points[data->btn].x;
i->proc.act_point.y = i->btn_points[data->btn].y;
/*Still the same point is pressed*/
if(i->proc.last_point.x == i->proc.act_point.x &&
i->proc.last_point.y == i->proc.act_point.y &&
data->state == LV_INDEV_STATE_PR) {
#if LV_INDEV_POINT_MARKER != 0
lv_area_t area;
area.x1 = i->proc.act_point.x - (LV_INDEV_POINT_MARKER >> 1);
area.y1 = i->proc.act_point.y - (LV_INDEV_POINT_MARKER >> 1);
area.x2 = i->proc.act_point.x + ((LV_INDEV_POINT_MARKER >> 1) | 0x1);
area.y2 = i->proc.act_point.y + ((LV_INDEV_POINT_MARKER >> 1) | 0x1);
lv_rfill(&area, NULL, LV_COLOR_MAKE(0xFF, 0, 0), LV_OPA_COVER);
#endif
indev_proc_press(&i->proc);
} else {
/*If a new point comes always make a release*/
indev_proc_release(&i->proc);
}
i->proc.last_point.x = i->proc.act_point.x;
i->proc.last_point.y = i->proc.act_point.y;
}
/**
* Process the pressed state of LV_INDEV_TYPE_POINER input devices
* @param indev pointer to an input device 'proc'
*/
static void indev_proc_press(lv_indev_proc_t * proc)
{
lv_obj_t * pr_obj = proc->act_obj;
if(proc->wait_unil_release != 0) return;
/*If there is no last object then search*/
if(proc->act_obj == NULL) {
pr_obj = indev_search_obj(proc, lv_layer_top());
if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_scr_act());
}
/*If there is last object but it is not dragged and not protected also search*/
else if(proc->drag_in_prog == 0 &&
lv_obj_is_protected(proc->act_obj, LV_PROTECT_PRESS_LOST) == false) {/*Now act_obj != NULL*/
pr_obj = indev_search_obj(proc, lv_layer_top());
if(pr_obj == NULL) pr_obj = indev_search_obj(proc, lv_scr_act());
}
/*If a dragable or a protected object was the last then keep it*/
else {
}
/*If a new object was found reset some variables and send a pressed signal*/
if(pr_obj != proc->act_obj) {
proc->last_point.x = proc->act_point.x;
proc->last_point.y = proc->act_point.y;
/*If a new object found the previous was lost, so send a signal*/
if(proc->act_obj != NULL) {
proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESS_LOST, indev_act);
if(proc->reset_query != 0) return;
}
proc->act_obj = pr_obj; /*Save the pressed object*/
proc->last_obj = proc->act_obj; /*Refresh the last_obj*/
if(proc->act_obj != NULL) {
/* Save the time when the obj pressed.
* It is necessary to count the long press time.*/
proc->pr_timestamp = lv_tick_get();
proc->long_pr_sent = 0;
proc->drag_range_out = 0;
proc->drag_in_prog = 0;
proc->drag_sum.x = 0;
proc->drag_sum.y = 0;
proc->vect.x = 0;
proc->vect.y = 0;
/*Search for 'top' attribute*/
lv_obj_t * i = proc->act_obj;
lv_obj_t * last_top = NULL;
while(i != NULL) {
if(i->top != 0) last_top = i;
i = lv_obj_get_parent(i);
}
if(last_top != NULL) {
/*Move the last_top object to the foreground*/
lv_obj_t * par = lv_obj_get_parent(last_top);
/*After list change it will be the new head*/
lv_ll_chg_list(&par->child_ll, &par->child_ll, last_top);
lv_obj_invalidate(last_top);
}
/*Send a signal about the press*/
proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESSED, indev_act);
if(proc->reset_query != 0) return;
}
}
/*Calculate the vector*/
proc->vect.x = proc->act_point.x - proc->last_point.x;
proc->vect.y = proc->act_point.y - proc->last_point.y;
/*If there is active object and it can be dragged run the drag*/
if(proc->act_obj != NULL) {
proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESSING, indev_act);
if(proc->reset_query != 0) return;
indev_drag(proc);
if(proc->reset_query != 0) return;
/*If there is no drag then check for long press time*/
if(proc->drag_in_prog == 0 && proc->long_pr_sent == 0) {
/*Send a signal about the long press if enough time elapsed*/
if(lv_tick_elaps(proc->pr_timestamp) > LV_INDEV_LONG_PRESS_TIME) {
pr_obj->signal_func(pr_obj, LV_SIGNAL_LONG_PRESS, indev_act);
if(proc->reset_query != 0) return;
/*Mark the signal sending to do not send it again*/
proc->long_pr_sent = 1;
/*Save the long press time stamp for the long press repeat handler*/
proc->longpr_rep_timestamp = lv_tick_get();
}
}
/*Send long press repeated signal*/
if(proc->drag_in_prog == 0 && proc->long_pr_sent == 1) {
/*Send a signal about the long press repeate if enough time elapsed*/
if(lv_tick_elaps(proc->longpr_rep_timestamp) > LV_INDEV_LONG_PRESS_REP_TIME) {
pr_obj->signal_func(pr_obj, LV_SIGNAL_LONG_PRESS_REP, indev_act);
if(proc->reset_query != 0) return;
proc->longpr_rep_timestamp = lv_tick_get();
}
}
}
}
/**
* Process the released state of LV_INDEV_TYPE_POINER input devices
* @param proc pointer to an input device 'proc'
*/
static void indev_proc_release(lv_indev_proc_t * proc)
{
if(proc->wait_unil_release != 0) {
proc->act_obj = NULL;
proc->last_obj = NULL;
proc->pr_timestamp = 0;
proc->longpr_rep_timestamp = 0;
proc->wait_unil_release = 0;
}
/*Forgot the act obj and send a released signal */
if(proc->act_obj != NULL) {
/* If the object was protected against press lost then it possible that
* the object is already not pressed but still it is the `act_obj`.
* In this case send the `LV_SIGNAL_RELEASED` if the indev is ON the `act_obj` */
if(lv_obj_is_protected(proc->act_obj, LV_PROTECT_PRESS_LOST)) {
/* Search the object on the current current coordinates.
* The start object is the object itself. If not ON it the the result will be NULL*/
lv_obj_t * obj_on = indev_search_obj(proc, proc->act_obj);
if(obj_on == proc->act_obj) proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_RELEASED, indev_act);
else proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_PRESS_LOST, indev_act);
}
/* The simple case: `act_obj` was not protected against press lost.
* If it is already not pressed then was handled in `indev_proc_press`*/
else {
proc->act_obj->signal_func(proc->act_obj, LV_SIGNAL_RELEASED, indev_act);
}
if(proc->reset_query != 0) return;
/*Handle click focus*/
#if USE_LV_GROUP
/*Edit mode is not used by POINTER devices. So leave edit mode if we are in it*/
lv_group_t * act_g = lv_obj_get_group(proc->act_obj);
if(lv_group_get_editing(act_g)) {
lv_group_set_editing(act_g, false);
}
/*Check, if the parent is in a group focus on it.*/
if(lv_obj_is_protected(proc->act_obj, LV_PROTECT_CLICK_FOCUS) == false) { /*Respect the click protection*/
lv_group_t * g = lv_obj_get_group(proc->act_obj);
lv_obj_t * parent = proc->act_obj;
while(g == NULL) {
parent = lv_obj_get_parent(parent);
if(parent == NULL) break;
if(lv_obj_is_protected(parent, LV_PROTECT_CLICK_FOCUS)) { /*Ignore is the protected against click focus*/
parent = NULL;
break;
}
g = lv_obj_get_group(parent);
}
if(g != NULL && parent != NULL)
if(lv_group_get_click_focus(g)) {
lv_group_focus_obj(parent);
}
}
#endif
if(proc->reset_query != 0) return;
proc->act_obj = NULL;
proc->pr_timestamp = 0;
proc->longpr_rep_timestamp = 0;
}
/*The reset can be set in the signal function.
* In case of reset query ignore the remaining parts.*/
if(proc->last_obj != NULL && proc->reset_query == 0) {
indev_drag_throw(proc);
if(proc->reset_query != 0) return;
}
}
/**
* Process a new point from LV_INDEV_TYPE_BUTTON input device
* @param i pointer to an input device
* @param data pointer to the data read from the input device
* Reset input device if a reset query has been sent to it
* @param indev pointer to an input device
*/
static void indev_proc_reset_query_handler(lv_indev_t * indev)
{
if(indev->proc.reset_query) {
indev->proc.act_obj = NULL;
indev->proc.last_obj = NULL;
indev->proc.drag_range_out = 0;
indev->proc.drag_in_prog = 0;
indev->proc.long_pr_sent = 0;
indev->proc.pr_timestamp = 0;
indev->proc.longpr_rep_timestamp = 0;
indev->proc.drag_sum.x = 0;
indev->proc.drag_sum.y = 0;
indev->proc.reset_query = 0;
}
}
/**
* Search the most top, clickable object on the last point of an input device
* @param proc pointer to the `lv_indev_proc_t` part of the input device
* @param obj pointer to a start object, typically the screen
* @return pointer to the found object or NULL if there was no suitable object
*/
static lv_obj_t * indev_search_obj(const lv_indev_proc_t * proc, lv_obj_t * obj)
{
lv_obj_t * found_p = NULL;
/*If the point is on this object*/
/*Check its children too*/
if(lv_area_is_point_on(&obj->coords, &proc->act_point)) {
lv_obj_t * i;
LL_READ(obj->child_ll, i) {
found_p = indev_search_obj(proc, i);
/*If a child was found then break*/
if(found_p != NULL) {
break;
}
}
/*If then the children was not ok, and this obj is clickable
* and it or its parent is not hidden then save this object*/
if(found_p == NULL && lv_obj_get_click(obj) != false) {
lv_obj_t * hidden_i = obj;
while(hidden_i != NULL) {
if(lv_obj_get_hidden(hidden_i) == true) break;
hidden_i = lv_obj_get_parent(hidden_i);
}
/*No parent found with hidden == true*/
if(hidden_i == NULL) found_p = obj;
}
}
return found_p;
}
/**
* Handle the dragging of indev_proc_p->act_obj
* @param indev pointer to a input device state
*/
static void indev_drag(lv_indev_proc_t * state)
{
lv_obj_t * drag_obj = state->act_obj;
/*If drag parent is active check recursively the drag_parent attribute*/
while(lv_obj_get_drag_parent(drag_obj) != false &&
drag_obj != NULL) {
drag_obj = lv_obj_get_parent(drag_obj);
}
if(drag_obj == NULL) return;
if(lv_obj_get_drag(drag_obj) == false) return;
/*Count the movement by drag*/
state->drag_sum.x += state->vect.x;
state->drag_sum.y += state->vect.y;
/*Enough move?*/
if(state->drag_range_out == 0) {
/*If a move is greater then LV_DRAG_LIMIT then begin the drag*/
if(LV_MATH_ABS(state->drag_sum.x) >= LV_INDEV_DRAG_LIMIT ||
LV_MATH_ABS(state->drag_sum.y) >= LV_INDEV_DRAG_LIMIT) {
state->drag_range_out = 1;
}
}
/*If the drag limit is stepped over then handle the dragging*/
if(state->drag_range_out != 0) {
/*Set new position if the vector is not zero*/
if(state->vect.x != 0 ||
state->vect.y != 0) {
/*Get the coordinates of the object and modify them*/
lv_coord_t act_x = lv_obj_get_x(drag_obj);
lv_coord_t act_y = lv_obj_get_y(drag_obj);
uint16_t inv_buf_size = lv_refr_get_buf_size(); /*Get the number of currently invalidated areas*/
lv_coord_t prev_x = drag_obj->coords.x1;
lv_coord_t prev_y = drag_obj->coords.y1;
lv_coord_t prev_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj));
lv_coord_t prev_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj));
lv_obj_set_pos(drag_obj, act_x + state->vect.x, act_y + state->vect.y);
/*Set the drag in progress flag if the object is really moved*/
if(drag_obj->coords.x1 != prev_x || drag_obj->coords.y1 != prev_y) {
if(state->drag_range_out != 0) { /*Send the drag begin signal on first move*/
drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_BEGIN, indev_act);
if(state->reset_query != 0) return;
}
state->drag_in_prog = 1;
}
/*If the object didn't moved then clear the invalidated areas*/
else {
/*In a special case if the object is moved on a page and
* the scrollable has fit == true and the object is dragged of the page then
* while its coordinate is not changing only the parent's size is reduced */
lv_coord_t act_par_w = lv_obj_get_width(lv_obj_get_parent(drag_obj));
lv_coord_t act_par_h = lv_obj_get_height(lv_obj_get_parent(drag_obj));
if(act_par_w == prev_par_w && act_par_h == prev_par_h) {
uint16_t new_inv_buf_size = lv_refr_get_buf_size();
lv_refr_pop_from_buf(new_inv_buf_size - inv_buf_size);
}
}
}
}
}
/**
* Handle throwing by drag if the drag is ended
* @param indev pointer to an input device state
*/
static void indev_drag_throw(lv_indev_proc_t * state)
{
if(state->drag_in_prog == 0) return;
/*Set new position if the vector is not zero*/
lv_obj_t * drag_obj = state->last_obj;
/*If drag parent is active check recursively the drag_parent attribute*/
while(lv_obj_get_drag_parent(drag_obj) != false &&
drag_obj != NULL) {
drag_obj = lv_obj_get_parent(drag_obj);
}
if(drag_obj == NULL) return;
/*Return if the drag throw is not enabled*/
if(lv_obj_get_drag_throw(drag_obj) == false) {
state->drag_in_prog = 0;
drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act);
return;
}
/*Reduce the vectors*/
state->vect.x = state->vect.x * (100 - LV_INDEV_DRAG_THROW) / 100;
state->vect.y = state->vect.y * (100 - LV_INDEV_DRAG_THROW) / 100;
if(state->vect.x != 0 ||
state->vect.y != 0) {
/*Get the coordinates and modify them*/
lv_area_t coords_ori;
lv_obj_get_coords(drag_obj, &coords_ori);
lv_coord_t act_x = lv_obj_get_x(drag_obj) + state->vect.x;
lv_coord_t act_y = lv_obj_get_y(drag_obj) + state->vect.y;
lv_obj_set_pos(drag_obj, act_x, act_y);
lv_area_t coord_new;
lv_obj_get_coords(drag_obj, &coord_new);
/*If non of the coordinates are changed then do not continue throwing*/
if((coords_ori.x1 == coord_new.x1 || state->vect.x == 0) &&
(coords_ori.y1 == coord_new.y1 || state->vect.y == 0)) {
state->drag_in_prog = 0;
state->vect.x = 0;
state->vect.y = 0;
drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act);
}
}
/*If the vectors become 0 -> drag_in_prog = 0 and send a drag end signal*/
else {
state->drag_in_prog = 0;
drag_obj->signal_func(drag_obj, LV_SIGNAL_DRAG_END, indev_act);
}
}
#endif

View File

@@ -1,117 +0,0 @@
/**
* @file lv_lang.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_lang.h"
#if USE_LV_MULTI_LANG
#include "lv_obj.h"
#include "../lv_misc/lv_gc.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void lang_set_core(lv_obj_t * obj);
/**********************
* STATIC VARIABLES
**********************/
static uint8_t lang_act = 0;
static const void * (*get_txt)(uint16_t);
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Change the language
* @param lang_id the id of the
*/
void lv_lang_set(uint8_t lang_id)
{
lang_act = lang_id;
lv_obj_t * i;
LL_READ(LV_GC_ROOT(_lv_scr_ll), i) {
i->signal_func(i, LV_SIGNAL_LANG_CHG, NULL);
lang_set_core(i);
}
lang_set_core(lv_scr_act());
}
/**
* Set a function to get the texts of the set languages from a `txt_id`
* @param fp a function pointer to get the texts
*/
void lv_lang_set_text_func(const void * (*fp)(uint16_t))
{
get_txt = fp;
}
/**
* Use the function set by `lv_lang_set_text_func` to get the `txt_id` text in the set language
* @param txt_id an ID of the text to get
* @return the `txt_id` txt on the set language
*/
const void * lv_lang_get_text(uint16_t txt_id)
{
if(get_txt == NULL) {
LV_LOG_WARN("lv_lang_get_text: text_func is not specified");
return NULL; /*No text_get function specified */
}
if(txt_id == LV_LANG_TXT_ID_NONE) {
LV_LOG_WARN("lv_lang_get_text: attempts to get invalid text ID");
return NULL; /*Invalid txt_id*/
}
return get_txt(txt_id);
}
/**
* Return with ID of the currently selected language
* @return pointer to the active screen object (loaded by 'lv_scr_load()')
*/
uint8_t lv_lang_act(void)
{
return lang_act;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Change the language of the children. (Called recursively)
* @param obj pointer to an object
*/
static void lang_set_core(lv_obj_t * obj)
{
lv_obj_t * i;
LL_READ(obj->child_ll, i) {
i->signal_func(i, LV_SIGNAL_LANG_CHG, NULL);
lang_set_core(i);
}
}
#endif /*USE_LV_MULTI_LANG*/

View File

@@ -1,74 +0,0 @@
/**
* @file lv_lang.h
*
*/
#ifndef LV_LANG_H
#define LV_LANG_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#if USE_LV_MULTI_LANG
#include <stdint.h>
/*********************
* DEFINES
*********************/
#define LV_LANG_TXT_ID_NONE 0xFFFF /*Used to not assign any text IDs for a multi-language object.*/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Change the language
* @param lang_id the id of the
*/
void lv_lang_set(uint8_t lang_id);
/**
* Set a function to get the texts of the set languages from a `txt_id`
* @param fp a function pointer to get the texts
*/
void lv_lang_set_text_func(const void * (*fp)(uint16_t));
/**
* Use the function set by `lv_lang_set_text_func` to get the `txt_id` text in the set language
* @param txt_id an ID of the text to get
* @return the `txt_id` txt on the set language
*/
const void * lv_lang_get_text(uint16_t txt_id);
/**
* Return with ID of the currently selected language
* @return pointer to the active screen object (loaded by 'lv_scr_load()')
*/
uint8_t lv_lang_act(void);
/**********************
* MACROS
**********************/
#endif /*USE_LV_MULTI_LANG*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_LANG_H*/

File diff suppressed because it is too large Load Diff

View File

@@ -1,841 +0,0 @@
/**
* @file lv_obj.h
*
*/
#ifndef LV_OBJ_H
#define LV_OBJ_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#include <stddef.h>
#include <stdbool.h>
#include "lv_style.h"
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_mem.h"
#include "../lv_misc/lv_ll.h"
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_log.h"
/*********************
* DEFINES
*********************/
/*Error check of lv_conf.h*/
#if LV_HOR_RES == 0 || LV_VER_RES == 0
#error "LittlevGL: LV_HOR_RES and LV_VER_RES must be greater than 0"
#endif
#if LV_ANTIALIAS > 1
#error "LittlevGL: LV_ANTIALIAS can be only 0 or 1"
#endif
#if LV_VDB_SIZE == 0 && LV_ANTIALIAS != 0
#error "LittlevGL: If LV_VDB_SIZE == 0 the anti-aliasing must be disabled"
#endif
#if LV_VDB_SIZE > 0 && LV_VDB_SIZE < LV_HOR_RES
#error "LittlevGL: Small Virtual Display Buffer (lv_conf.h: LV_VDB_SIZE >= LV_HOR_RES)"
#endif
#if LV_VDB_SIZE == 0 && USE_LV_REAL_DRAW == 0
#error "LittlevGL: If LV_VDB_SIZE = 0 Real drawing function are required (lv_conf.h: USE_LV_REAL_DRAW 1)"
#endif
#define LV_ANIM_IN 0x00 /*Animation to show an object. 'OR' it with lv_anim_builtin_t*/
#define LV_ANIM_OUT 0x80 /*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/
#define LV_ANIM_DIR_MASK 0x80 /*ANIM_IN/ANIM_OUT mask*/
#define LV_MAX_ANCESTOR_NUM 8
/**********************
* TYPEDEFS
**********************/
struct _lv_obj_t;
enum
{
LV_DESIGN_DRAW_MAIN,
LV_DESIGN_DRAW_POST,
LV_DESIGN_COVER_CHK,
};
typedef uint8_t lv_design_mode_t;
typedef bool (* lv_design_func_t) (struct _lv_obj_t * obj, const lv_area_t * mask_p, lv_design_mode_t mode);
enum
{
LV_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action function or an operation was failed*/
LV_RES_OK, /*The object is valid (no deleted) after the action*/
};
typedef uint8_t lv_res_t;
enum
{
/*General signals*/
LV_SIGNAL_CLEANUP,
LV_SIGNAL_CHILD_CHG,
LV_SIGNAL_CORD_CHG,
LV_SIGNAL_STYLE_CHG,
LV_SIGNAL_REFR_EXT_SIZE,
LV_SIGNAL_LANG_CHG,
LV_SIGNAL_GET_TYPE,
_LV_SIGNAL_FEEDBACK_SECTION_START,
/*Input device related*/
LV_SIGNAL_PRESSED,
LV_SIGNAL_PRESSING,
LV_SIGNAL_PRESS_LOST,
LV_SIGNAL_RELEASED,
LV_SIGNAL_LONG_PRESS,
LV_SIGNAL_LONG_PRESS_REP,
LV_SIGNAL_DRAG_BEGIN,
LV_SIGNAL_DRAG_END,
/*Group related*/
LV_SIGNAL_FOCUS,
LV_SIGNAL_DEFOCUS,
LV_SIGNAL_CONTROLL,
_LV_SIGNAL_FEEDBACK_SECTION_END,
LV_SIGNAL_GET_EDITABLE,
};
typedef uint8_t lv_signal_t;
typedef lv_res_t (* lv_signal_func_t) (struct _lv_obj_t * obj, lv_signal_t sign, void * param);
enum
{
LV_ALIGN_CENTER = 0,
LV_ALIGN_IN_TOP_LEFT,
LV_ALIGN_IN_TOP_MID,
LV_ALIGN_IN_TOP_RIGHT,
LV_ALIGN_IN_BOTTOM_LEFT,
LV_ALIGN_IN_BOTTOM_MID,
LV_ALIGN_IN_BOTTOM_RIGHT,
LV_ALIGN_IN_LEFT_MID,
LV_ALIGN_IN_RIGHT_MID,
LV_ALIGN_OUT_TOP_LEFT,
LV_ALIGN_OUT_TOP_MID,
LV_ALIGN_OUT_TOP_RIGHT,
LV_ALIGN_OUT_BOTTOM_LEFT,
LV_ALIGN_OUT_BOTTOM_MID,
LV_ALIGN_OUT_BOTTOM_RIGHT,
LV_ALIGN_OUT_LEFT_TOP,
LV_ALIGN_OUT_LEFT_MID,
LV_ALIGN_OUT_LEFT_BOTTOM,
LV_ALIGN_OUT_RIGHT_TOP,
LV_ALIGN_OUT_RIGHT_MID,
LV_ALIGN_OUT_RIGHT_BOTTOM,
};
typedef uint8_t lv_align_t;
#if LV_OBJ_REALIGN
typedef struct {
const struct _lv_obj_t * base;
lv_coord_t xofs;
lv_coord_t yofs;
lv_align_t align;
uint8_t auto_realign :1;
uint8_t origo_align :1; /*1: the oigo (center of the object) was aligned with `lv_obj_align_origo`*/
}lv_reailgn_t;
#endif
typedef struct _lv_obj_t
{
struct _lv_obj_t * par; /*Pointer to the parent object*/
lv_ll_t child_ll; /*Linked list to store the children objects*/
lv_area_t coords; /*Coordinates of the object (x1, y1, x2, y2)*/
lv_signal_func_t signal_func; /*Object type specific signal function*/
lv_design_func_t design_func; /*Object type specific design function*/
void * ext_attr; /*Object type specific extended data*/
lv_style_t * style_p; /*Pointer to the object's style*/
#if LV_OBJ_FREE_PTR != 0
void * free_ptr; /*Application specific pointer (set it freely)*/
#endif
#if USE_LV_GROUP != 0
void * group_p; /*Pointer to the group of the object*/
#endif
/*Attributes and states*/
uint8_t click :1; /*1: Can be pressed by an input device*/
uint8_t drag :1; /*1: Enable the dragging*/
uint8_t drag_throw :1; /*1: Enable throwing with drag*/
uint8_t drag_parent :1; /*1: Parent will be dragged instead*/
uint8_t hidden :1; /*1: Object is hidden*/
uint8_t top :1; /*1: If the object or its children is clicked it goes to the foreground*/
uint8_t opa_scale_en :1; /*1: opa_scale is set*/
uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from `lv_protect_t`*/
lv_opa_t opa_scale; /*Scale down the opacity by this factor. Effects all children as well*/
lv_coord_t ext_size; /*EXTtend the size of the object in every direction. E.g. for shadow drawing*/
#if LV_OBJ_REALIGN
lv_reailgn_t realign;
#endif
#ifdef LV_OBJ_FREE_NUM_TYPE
LV_OBJ_FREE_NUM_TYPE free_num; /*Application specific identifier (set it freely)*/
#endif
} lv_obj_t;
typedef lv_res_t (*lv_action_t) (struct _lv_obj_t * obj);
/*Protect some attributes (max. 8 bit)*/
enum
{
LV_PROTECT_NONE = 0x00,
LV_PROTECT_CHILD_CHG = 0x01, /*Disable the child change signal. Used by the library*/
LV_PROTECT_PARENT = 0x02, /*Prevent automatic parent change (e.g. in lv_page)*/
LV_PROTECT_POS = 0x04, /*Prevent automatic positioning (e.g. in lv_cont layout)*/
LV_PROTECT_FOLLOW = 0x08, /*Prevent the object be followed in automatic ordering (e.g. in lv_cont PRETTY layout)*/
LV_PROTECT_PRESS_LOST= 0x10, /*If the `indev` was pressing this object but swiped out while pressing do not search other object.*/
LV_PROTECT_CLICK_FOCUS= 0x20,/*Prevent focusing the object by clicking on it*/
};
typedef uint8_t lv_protect_t;
/*Used by `lv_obj_get_type()`. The object's and its ancestor types are stored here*/
typedef struct {
const char * type[LV_MAX_ANCESTOR_NUM]; /*[0]: the actual type, [1]: ancestor, [2] #1's ancestor ... [x]: "lv_obj" */
} lv_obj_type_t;
enum
{
LV_ANIM_NONE = 0,
LV_ANIM_FLOAT_TOP, /*Float from/to the top*/
LV_ANIM_FLOAT_LEFT, /*Float from/to the left*/
LV_ANIM_FLOAT_BOTTOM, /*Float from/to the bottom*/
LV_ANIM_FLOAT_RIGHT, /*Float from/to the right*/
LV_ANIM_GROW_H, /*Grow/shrink horizontally*/
LV_ANIM_GROW_V, /*Grow/shrink vertically*/
};
typedef uint8_t lv_anim_builtin_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Init. the 'lv' library.
*/
void lv_init(void);
/*--------------------
* Create and delete
*-------------------*/
/**
* Create a basic object
* @param parent pointer to a parent object.
* If NULL then a screen will be created
* @param copy pointer to a base object, if not NULL then the new object will be copied from it
* @return pointer to the new object
*/
lv_obj_t * lv_obj_create(lv_obj_t * parent,const lv_obj_t * copy);
/**
* Delete 'obj' and all of its children
* @param obj pointer to an object to delete
* @return LV_RES_INV because the object is deleted
*/
lv_res_t lv_obj_del(lv_obj_t * obj);
/**
* Delete all children of an object
* @param obj pointer to an object
*/
void lv_obj_clean(lv_obj_t *obj);
/**
* Mark the object as invalid therefore its current position will be redrawn by 'lv_refr_task'
* @param obj pointer to an object
*/
void lv_obj_invalidate(const lv_obj_t * obj);
/*=====================
* Setter functions
*====================*/
/*--------------
* Screen set
*--------------*/
/**
* Load a new screen
* @param scr pointer to a screen
*/
void lv_scr_load(lv_obj_t * scr);
/*--------------------
* Parent/children set
*--------------------*/
/**
* Set a new parent for an object. Its relative position will be the same.
* @param obj pointer to an object. Can't be a screen.
* @param parent pointer to the new parent object. (Can't be NULL)
*/
void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent);
/*--------------------
* Coordinate set
* ------------------*/
/**
* Set relative the position of an object (relative to the parent)
* @param obj pointer to an object
* @param x new distance from the left side of the parent
* @param y new distance from the top of the parent
*/
void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y);
/**
* Set the x coordinate of a object
* @param obj pointer to an object
* @param x new distance from the left side from the parent
*/
void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x);
/**
* Set the y coordinate of a object
* @param obj pointer to an object
* @param y new distance from the top of the parent
*/
void lv_obj_set_y(lv_obj_t * obj, lv_coord_t y);
/**
* Set the size of an object
* @param obj pointer to an object
* @param w new width
* @param h new height
*/
void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h);
/**
* Set the width of an object
* @param obj pointer to an object
* @param w new width
*/
void lv_obj_set_width(lv_obj_t * obj, lv_coord_t w);
/**
* Set the height of an object
* @param obj pointer to an object
* @param h new height
*/
void lv_obj_set_height(lv_obj_t * obj, lv_coord_t h);
/**
* Align an object to an other object.
* @param obj pointer to an object to align
* @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
* @param align type of alignment (see 'lv_align_t' enum)
* @param x_mod x coordinate shift after alignment
* @param y_mod y coordinate shift after alignment
*/
void lv_obj_align(lv_obj_t * obj,const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod);
/**
* Align an object to an other object.
* @param obj pointer to an object to align
* @param base pointer to an object (if NULL the parent is used). 'obj' will be aligned to it.
* @param align type of alignment (see 'lv_align_t' enum)
* @param x_mod x coordinate shift after alignment
* @param y_mod y coordinate shift after alignment
*/
void lv_obj_align_origo(lv_obj_t * obj, const lv_obj_t * base, lv_align_t align, lv_coord_t x_mod, lv_coord_t y_mod);
/**
* Realign the object based on the last `lv_obj_align` parameters.
* @param obj pointer to an object
*/
void lv_obj_realign(lv_obj_t * obj);
/**
* Enable the automatic realign of the object when its size has changed based on the last `lv_obj_align` parameters.
* @param obj pointer to an object
* @param en true: enable auto realign; false: disable auto realign
*/
void lv_obj_set_auto_realign(lv_obj_t * obj, bool en);
/*---------------------
* Appearance set
*--------------------*/
/**
* Set a new style for an object
* @param obj pointer to an object
* @param style_p pointer to the new style
*/
void lv_obj_set_style(lv_obj_t * obj, lv_style_t * style);
/**
* Notify an object about its style is modified
* @param obj pointer to an object
*/
void lv_obj_refresh_style(lv_obj_t * obj);
/**
* Notify all object if a style is modified
* @param style pointer to a style. Only the objects with this style will be notified
* (NULL to notify all objects)
*/
void lv_obj_report_style_mod(lv_style_t * style);
/*-----------------
* Attribute set
*----------------*/
/**
* Hide an object. It won't be visible and clickable.
* @param obj pointer to an object
* @param en true: hide the object
*/
void lv_obj_set_hidden(lv_obj_t * obj, bool en);
/**
* Enable or disable the clicking of an object
* @param obj pointer to an object
* @param en true: make the object clickable
*/
void lv_obj_set_click(lv_obj_t * obj, bool en);
/**
* Enable to bring this object to the foreground if it
* or any of its children is clicked
* @param obj pointer to an object
* @param en true: enable the auto top feature
*/
void lv_obj_set_top(lv_obj_t * obj, bool en);
/**
* Enable the dragging of an object
* @param obj pointer to an object
* @param en true: make the object dragable
*/
void lv_obj_set_drag(lv_obj_t * obj, bool en);
/**
* Enable the throwing of an object after is is dragged
* @param obj pointer to an object
* @param en true: enable the drag throw
*/
void lv_obj_set_drag_throw(lv_obj_t * obj, bool en);
/**
* Enable to use parent for drag related operations.
* If trying to drag the object the parent will be moved instead
* @param obj pointer to an object
* @param en true: enable the 'drag parent' for the object
*/
void lv_obj_set_drag_parent(lv_obj_t * obj, bool en);
/**
* Set editable parameter Used by groups and keyboard/encoder control.
* Editable object has something inside to choose (the elements of a list)
* @param obj pointer to an object
* @param en true: enable editing
*/
//void lv_obj_set_editable(lv_obj_t * obj, bool en);
/**
* Set the opa scale enable parameter (required to set opa_scale with `lv_obj_set_opa_scale()`)
* @param obj pointer to an object
* @param en true: opa scaling is enabled for this object and all children; false: no opa scaling
*/
void lv_obj_set_opa_scale_enable(lv_obj_t * obj, bool en);
/**
* Set the opa scale of an object
* @param obj pointer to an object
* @param opa_scale a factor to scale down opacity [0..255]
*/
void lv_obj_set_opa_scale(lv_obj_t * obj, lv_opa_t opa_scale);
/**
* Set a bit or bits in the protect filed
* @param obj pointer to an object
* @param prot 'OR'-ed values from `lv_protect_t`
*/
void lv_obj_set_protect(lv_obj_t * obj, uint8_t prot);
/**
* Clear a bit or bits in the protect filed
* @param obj pointer to an object
* @param prot 'OR'-ed values from `lv_protect_t`
*/
void lv_obj_clear_protect(lv_obj_t * obj, uint8_t prot);
/**
* Set the signal function of an object.
* Always call the previous signal function in the new.
* @param obj pointer to an object
* @param fp the new signal function
*/
void lv_obj_set_signal_func(lv_obj_t * obj, lv_signal_func_t fp);
/**
* Set a new design function for an object
* @param obj pointer to an object
* @param fp the new design function
*/
void lv_obj_set_design_func(lv_obj_t * obj, lv_design_func_t fp);
/*----------------
* Other set
*--------------*/
/**
* Allocate a new ext. data for an object
* @param obj pointer to an object
* @param ext_size the size of the new ext. data
* @return pointer to the allocated ext
*/
void * lv_obj_allocate_ext_attr(lv_obj_t * obj, uint16_t ext_size);
/**
* Send a 'LV_SIGNAL_REFR_EXT_SIZE' signal to the object
* @param obj pointer to an object
*/
void lv_obj_refresh_ext_size(lv_obj_t * obj);
#ifdef LV_OBJ_FREE_NUM_TYPE
/**
* Set an application specific number for an object.
* It can help to identify objects in the application.
* @param obj pointer to an object
* @param free_num the new free number
*/
void lv_obj_set_free_num(lv_obj_t * obj, LV_OBJ_FREE_NUM_TYPE free_num);
#endif
#if LV_OBJ_FREE_PTR != 0
/**
* Set an application specific pointer for an object.
* It can help to identify objects in the application.
* @param obj pointer to an object
* @param free_p the new free pinter
*/
void lv_obj_set_free_ptr(lv_obj_t * obj, void * free_p);
#endif
#if USE_LV_ANIMATION
/**
* Animate an object
* @param obj pointer to an object to animate
* @param type type of animation from 'lv_anim_builtin_t'. 'OR' it with ANIM_IN or ANIM_OUT
* @param time time of animation in milliseconds
* @param delay delay before the animation in milliseconds
* @param cb a function to call when the animation is ready
*/
void lv_obj_animate(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, void (*cb) (lv_obj_t *));
#endif
/*=======================
* Getter functions
*======================*/
/*------------------
* Screen get
*-----------------*/
/**
* Return with a pointer to the active screen
* @return pointer to the active screen object (loaded by 'lv_scr_load()')
*/
lv_obj_t * lv_scr_act(void);
/**
* Return with the top layer. (Same on every screen and it is above the normal screen layer)
* @return pointer to the top layer object (transparent screen sized lv_obj)
*/
lv_obj_t * lv_layer_top(void);
/**
* Return with the system layer. (Same on every screen and it is above the all other layers)
* It is used for example by the cursor
* @return pointer to the system layer object (transparent screen sized lv_obj)
*/
lv_obj_t * lv_layer_sys(void);
/**
* Return with the screen of an object
* @param obj pointer to an object
* @return pointer to a screen
*/
lv_obj_t * lv_obj_get_screen(const lv_obj_t * obj);
/*---------------------
* Parent/children get
*--------------------*/
/**
* Returns with the parent of an object
* @param obj pointer to an object
* @return pointer to the parent of 'obj'
*/
lv_obj_t * lv_obj_get_parent(const lv_obj_t * obj);
/**
* Iterate through the children of an object (start from the "youngest, lastly created")
* @param obj pointer to an object
* @param child NULL at first call to get the next children
* and the previous return value later
* @return the child after 'act_child' or NULL if no more child
*/
lv_obj_t * lv_obj_get_child(const lv_obj_t * obj, const lv_obj_t * child);
/**
* Iterate through the children of an object (start from the "oldest", firstly created)
* @param obj pointer to an object
* @param child NULL at first call to get the next children
* and the previous return value later
* @return the child after 'act_child' or NULL if no more child
*/
lv_obj_t * lv_obj_get_child_back(const lv_obj_t * obj, const lv_obj_t * child);
/**
* Count the children of an object (only children directly on 'obj')
* @param obj pointer to an object
* @return children number of 'obj'
*/
uint16_t lv_obj_count_children(const lv_obj_t * obj);
/*---------------------
* Coordinate get
*--------------------*/
/**
* Copy the coordinates of an object to an area
* @param obj pointer to an object
* @param cords_p pointer to an area to store the coordinates
*/
void lv_obj_get_coords(const lv_obj_t * obj, lv_area_t * cords_p);
/**
* Get the x coordinate of object
* @param obj pointer to an object
* @return distance of 'obj' from the left side of its parent
*/
lv_coord_t lv_obj_get_x(const lv_obj_t * obj);
/**
* Get the y coordinate of object
* @param obj pointer to an object
* @return distance of 'obj' from the top of its parent
*/
lv_coord_t lv_obj_get_y(const lv_obj_t * obj);
/**
* Get the width of an object
* @param obj pointer to an object
* @return the width
*/
lv_coord_t lv_obj_get_width(const lv_obj_t * obj);
/**
* Get the height of an object
* @param obj pointer to an object
* @return the height
*/
lv_coord_t lv_obj_get_height(const lv_obj_t * obj);
/**
* Get the extended size attribute of an object
* @param obj pointer to an object
* @return the extended size attribute
*/
lv_coord_t lv_obj_get_ext_size(const lv_obj_t * obj);
/**
* Get the automatic realign property of the object.
* @param obj pointer to an object
* @return true: auto realign is enabled; false: auto realign is disabled
*/
bool lv_obj_get_auto_realign(lv_obj_t * obj);
/*-----------------
* Appearance get
*---------------*/
/**
* Get the style pointer of an object (if NULL get style of the parent)
* @param obj pointer to an object
* @return pointer to a style
*/
lv_style_t * lv_obj_get_style(const lv_obj_t * obj);
/*-----------------
* Attribute get
*----------------*/
/**
* Get the hidden attribute of an object
* @param obj pointer to an object
* @return true: the object is hidden
*/
bool lv_obj_get_hidden(const lv_obj_t * obj);
/**
* Get the click enable attribute of an object
* @param obj pointer to an object
* @return true: the object is clickable
*/
bool lv_obj_get_click(const lv_obj_t * obj);
/**
* Get the top enable attribute of an object
* @param obj pointer to an object
* @return true: the auto top feature is enabled
*/
bool lv_obj_get_top(const lv_obj_t * obj);
/**
* Get the drag enable attribute of an object
* @param obj pointer to an object
* @return true: the object is dragable
*/
bool lv_obj_get_drag(const lv_obj_t * obj);
/**
* Get the drag throw enable attribute of an object
* @param obj pointer to an object
* @return true: drag throw is enabled
*/
bool lv_obj_get_drag_throw(const lv_obj_t * obj);
/**
* Get the drag parent attribute of an object
* @param obj pointer to an object
* @return true: drag parent is enabled
*/
bool lv_obj_get_drag_parent(const lv_obj_t * obj);
/**
* Get the opa scale enable parameter
* @param obj pointer to an object
* @return true: opa scaling is enabled for this object and all children; false: no opa scaling
*/
lv_opa_t lv_obj_get_opa_scale_enable(const lv_obj_t * obj);
/**
* Get the opa scale parameter of an object
* @param obj pointer to an object
* @return opa scale [0..255]
*/
lv_opa_t lv_obj_get_opa_scale(const lv_obj_t * obj);
/**
* Get the protect field of an object
* @param obj pointer to an object
* @return protect field ('OR'ed values of `lv_protect_t`)
*/
uint8_t lv_obj_get_protect(const lv_obj_t * obj);
/**
* Check at least one bit of a given protect bitfield is set
* @param obj pointer to an object
* @param prot protect bits to test ('OR'ed values of `lv_protect_t`)
* @return false: none of the given bits are set, true: at least one bit is set
*/
bool lv_obj_is_protected(const lv_obj_t * obj, uint8_t prot);
/**
* Get the signal function of an object
* @param obj pointer to an object
* @return the signal function
*/
lv_signal_func_t lv_obj_get_signal_func(const lv_obj_t * obj);
/**
* Get the design function of an object
* @param obj pointer to an object
* @return the design function
*/
lv_design_func_t lv_obj_get_design_func(const lv_obj_t * obj);
/*------------------
* Other get
*-----------------*/
/**
* Get the ext pointer
* @param obj pointer to an object
* @return the ext pointer but not the dynamic version
* Use it as ext->data1, and NOT da(ext)->data1
*/
void * lv_obj_get_ext_attr(const lv_obj_t * obj);
/**
* Get object's and its ancestors type. Put their name in `type_buf` starting with the current type.
* E.g. buf.type[0]="lv_btn", buf.type[1]="lv_cont", buf.type[2]="lv_obj"
* @param obj pointer to an object which type should be get
* @param buf pointer to an `lv_obj_type_t` buffer to store the types
*/
void lv_obj_get_type(lv_obj_t * obj, lv_obj_type_t * buf);
#ifdef LV_OBJ_FREE_NUM_TYPE
/**
* Get the free number
* @param obj pointer to an object
* @return the free number
*/
LV_OBJ_FREE_NUM_TYPE lv_obj_get_free_num(const lv_obj_t * obj);
#endif
#if LV_OBJ_FREE_PTR != 0
/**
* Get the free pointer
* @param obj pointer to an object
* @return the free pointer
*/
void * lv_obj_get_free_ptr(const lv_obj_t * obj);
#endif
#if USE_LV_GROUP
/**
* Get the group of the object
* @param obj pointer to an object
* @return the pointer to group of the object
*/
void * lv_obj_get_group(const lv_obj_t * obj);
/**
* Tell whether the object is the focused object of a group or not.
* @param obj pointer to an object
* @return true: the object is focused, false: the object is not focused or not in a group
*/
bool lv_obj_is_focused(const lv_obj_t * obj);
#endif
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_OBJ_H*/

View File

@@ -1,614 +0,0 @@
/**
* @file lv_refr.c
*
*/
/*********************
* INCLUDES
*********************/
#include <stddef.h>
#include "lv_refr.h"
#include "lv_vdb.h"
#include "../lv_hal/lv_hal_tick.h"
#include "../lv_hal/lv_hal_disp.h"
#include "../lv_misc/lv_task.h"
#include "../lv_misc/lv_mem.h"
/*********************
* DEFINES
*********************/
#ifndef LV_INV_FIFO_SIZE
#define LV_INV_FIFO_SIZE 32 /*The average count of objects on a screen */
#endif
/**********************
* TYPEDEFS
**********************/
typedef struct {
lv_area_t area;
uint8_t joined;
} lv_join_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void lv_refr_task(void * param);
static void lv_refr_join_area(void);
static void lv_refr_areas(void);
#if LV_VDB_SIZE == 0
static void lv_refr_area_no_vdb(const lv_area_t * area_p);
#else
static void lv_refr_area_with_vdb(const lv_area_t * area_p);
static void lv_refr_area_part_vdb(const lv_area_t * area_p);
#endif
static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj);
static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p);
static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p);
/**********************
* STATIC VARIABLES
**********************/
static lv_join_t inv_buf[LV_INV_FIFO_SIZE];
static uint16_t inv_buf_p;
static void (*monitor_cb)(uint32_t, uint32_t); /*Monitor the rendering time*/
static void (*round_cb)(lv_area_t *); /*If set then called to modify invalidated areas for special display controllers*/
static uint32_t px_num;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the screen refresh subsystem
*/
void lv_refr_init(void)
{
inv_buf_p = 0;
memset(inv_buf, 0, sizeof(inv_buf));
lv_task_t * task;
task = lv_task_create(lv_refr_task, LV_REFR_PERIOD, LV_TASK_PRIO_MID, NULL);
lv_task_ready(task); /*Be sure the screen will be refreshed immediately on start up*/
}
/**
* Redraw the invalidated areas now.
* Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process can
* prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process (e.g. progress bar)
* this function can be called when the screen should be updated.
*/
void lv_refr_now(void)
{
lv_refr_task(NULL);
}
/**
* Invalidate an area
* @param area_p pointer to area which should be invalidated
*/
void lv_inv_area(const lv_area_t * area_p)
{
/*Clear the invalidate buffer if the parameter is NULL*/
if(area_p == NULL) {
inv_buf_p = 0;
return;
}
lv_area_t scr_area;
scr_area.x1 = 0;
scr_area.y1 = 0;
scr_area.x2 = LV_HOR_RES - 1;
scr_area.y2 = LV_VER_RES - 1;
lv_area_t com_area;
bool suc;
suc = lv_area_intersect(&com_area, area_p, &scr_area);
/*The area is truncated to the screen*/
if(suc != false) {
if(round_cb) round_cb(&com_area);
/*Save only if this area is not in one of the saved areas*/
uint16_t i;
for(i = 0; i < inv_buf_p; i++) {
if(lv_area_is_in(&com_area, &inv_buf[i].area) != false) return;
}
/*Save the area*/
if(inv_buf_p < LV_INV_FIFO_SIZE) {
lv_area_copy(&inv_buf[inv_buf_p].area, &com_area);
} else {/*If no place for the area add the screen*/
inv_buf_p = 0;
lv_area_copy(&inv_buf[inv_buf_p].area, &scr_area);
}
inv_buf_p ++;
}
}
/**
* Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels
* @param cb pointer to a callback function (void my_refr_cb(uint32_t time_ms, uint32_t px_num))
* time_ms: refresh time in [ms]
* px_num: not the drawn pixels but the number of affected pixels of the screen
* (more pixels are drawn because of overlapping objects)
*/
void lv_refr_set_monitor_cb(void (*cb)(uint32_t, uint32_t))
{
monitor_cb = cb;
}
/**
* Called when an area is invalidated to modify the coordinates of the area.
* Special display controllers may require special coordinate rounding
* @param cb pointer to the a function which will modify the area
*/
void lv_refr_set_round_cb(void(*cb)(lv_area_t *))
{
round_cb = cb;
}
/**
* Get the number of areas in the buffer
* @return number of invalid areas
*/
uint16_t lv_refr_get_buf_size(void)
{
return inv_buf_p;
}
/**
* Pop (delete) the last 'num' invalidated areas from the buffer
* @param num number of areas to delete
*/
void lv_refr_pop_from_buf(uint16_t num)
{
if(inv_buf_p < num) inv_buf_p = 0;
else inv_buf_p -= num;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Called periodically to handle the refreshing
* @param param unused
*/
static void lv_refr_task(void * param)
{
(void)param;
LV_LOG_TRACE("display refresh task started");
uint32_t start = lv_tick_get();
if(lv_disp_get_active() == NULL) {
LV_LOG_TRACE("No display is registered");
return;
}
lv_refr_join_area();
lv_refr_areas();
/*If refresh happened ...*/
if(inv_buf_p != 0) {
/*In true double buffered mode copy the refreshed areas to the new VDB to keep it up to date*/
#if LV_VDB_TRUE_DOUBLE_BUFFERED
lv_vdb_t * vdb_p = lv_vdb_get();
vdb_p->area.x1 = 0;
vdb_p->area.x2 = LV_HOR_RES-1;
vdb_p->area.y1 = 0;
vdb_p->area.y2 = LV_VER_RES - 1;
/*Flush the content of the VDB*/
lv_vdb_flush();
/* With true double buffering the flushing should be only the address change of the current frame buffer
* Wait until the address change is ready and copy the active content to the other frame buffer (new active VDB)
* The changes will be written to the new VDB.*/
lv_vdb_t * vdb_act = lv_vdb_get_active();
lv_vdb_t * vdb_ina = lv_vdb_get_inactive();
uint8_t * buf_act = (uint8_t *) vdb_act->buf;
uint8_t * buf_ina = (uint8_t *) vdb_ina->buf;
uint16_t a;
for(a = 0; a < inv_buf_p; a++) {
if(inv_buf[a].joined == 0) {
lv_coord_t y;
uint32_t start_offs = ((LV_HOR_RES * inv_buf[a].area.y1 + inv_buf[a].area.x1) * LV_VDB_PX_BPP) >> 3;
uint32_t line_length = (lv_area_get_width(&inv_buf[a].area) * LV_VDB_PX_BPP) >> 3;
for(y = inv_buf[a].area.y1; y <= inv_buf[a].area.y2; y++) {
memcpy(buf_act + start_offs, buf_ina + start_offs, line_length);
start_offs += (LV_HOR_RES * LV_VDB_PX_BPP) >> 3;
}
}
}
#endif
/*Clean up*/
memset(inv_buf, 0, sizeof(inv_buf));
inv_buf_p = 0;
/*Call monitor cb if present*/
if(monitor_cb != NULL) {
monitor_cb(lv_tick_elaps(start), px_num);
}
}
LV_LOG_TRACE("display refresh task finished");
}
/**
* Join the areas which has got common parts
*/
static void lv_refr_join_area(void)
{
uint32_t join_from;
uint32_t join_in;
lv_area_t joined_area;
for(join_in = 0; join_in < inv_buf_p; join_in++) {
if(inv_buf[join_in].joined != 0) continue;
/*Check all areas to join them in 'join_in'*/
for(join_from = 0; join_from < inv_buf_p; join_from++) {
/*Handle only unjoined areas and ignore itself*/
if(inv_buf[join_from].joined != 0 || join_in == join_from) {
continue;
}
/*Check if the areas are on each other*/
if(lv_area_is_on(&inv_buf[join_in].area,
&inv_buf[join_from].area) == false) {
continue;
}
lv_area_join(&joined_area, &inv_buf[join_in].area,
&inv_buf[join_from].area);
/*Join two area only if the joined area size is smaller*/
if(lv_area_get_size(&joined_area) <
(lv_area_get_size(&inv_buf[join_in].area) + lv_area_get_size(&inv_buf[join_from].area))) {
lv_area_copy(&inv_buf[join_in].area, &joined_area);
/*Mark 'join_form' is joined into 'join_in'*/
inv_buf[join_from].joined = 1;
}
}
}
}
/**
* Refresh the joined areas
*/
static void lv_refr_areas(void)
{
px_num = 0;
uint32_t i;
for(i = 0; i < inv_buf_p; i++) {
/*Refresh the unjoined areas*/
if(inv_buf[i].joined == 0) {
/*If there is no VDB do simple drawing*/
#if LV_VDB_SIZE == 0
lv_refr_area_no_vdb(&inv_buf[i].area);
#else
/*If VDB is used...*/
lv_refr_area_with_vdb(&inv_buf[i].area);
#endif
if(monitor_cb != NULL) px_num += lv_area_get_size(&inv_buf[i].area);
}
}
}
#if LV_VDB_SIZE == 0
/**
* Refresh an area if there is no Virtual Display Buffer
* @param area_p pointer to an area to refresh
*/
static void lv_refr_area_no_vdb(const lv_area_t * area_p)
{
lv_obj_t * top_p;
/*Get top object which is not covered by others*/
top_p = lv_refr_get_top_obj(area_p, lv_scr_act());
/*Do the refreshing*/
lv_refr_obj_and_children(top_p, area_p);
/*Also refresh top and sys layer unconditionally*/
lv_refr_obj_and_children(lv_layer_top(), area_p);
lv_refr_obj_and_children(lv_layer_sys(), area_p);
}
#else
/**
* Refresh an area if there is Virtual Display Buffer
* @param area_p pointer to an area to refresh
*/
static void lv_refr_area_with_vdb(const lv_area_t * area_p)
{
#if LV_VDB_TRUE_DOUBLE_BUFFERED == 0
/*Calculate the max row num*/
lv_coord_t w = lv_area_get_width(area_p);
lv_coord_t h = lv_area_get_height(area_p);
lv_coord_t y2 = area_p->y2 >= LV_VER_RES ? y2 = LV_VER_RES - 1 : area_p->y2;
int32_t max_row = (uint32_t) LV_VDB_SIZE / w;
if(max_row > h) max_row = h;
/*Round down the lines of VDB if rounding is added*/
if(round_cb) {
lv_area_t tmp;
tmp.x1 = 0;
tmp.x2 = 0;
tmp.y1 = 0;
lv_coord_t y_tmp = max_row - 1;
do {
tmp.y2 = y_tmp;
round_cb(&tmp);
/*If this height fits into `max_row` then fine*/
if(lv_area_get_height(&tmp) <= max_row) break;
/*Decrement the height of the area until it fits into `max_row` after rounding*/
y_tmp --;
} while(y_tmp != 0);
if(y_tmp == 0) {
LV_LOG_WARN("Can't set VDB height using the round function. (Wrong round_cb or to small VDB)");
return;
} else {
max_row = tmp.y2 + 1;
}
}
/*Always use the full row*/
lv_coord_t row;
lv_coord_t row_last = 0;
for(row = area_p->y1; row + max_row - 1 <= y2; row += max_row) {
lv_vdb_t * vdb_p = lv_vdb_get();
if(!vdb_p) {
LV_LOG_WARN("Invalid VDB pointer");
return;
}
/*Calc. the next y coordinates of VDB*/
vdb_p->area.x1 = area_p->x1;
vdb_p->area.x2 = area_p->x2;
vdb_p->area.y1 = row;
vdb_p->area.y2 = row + max_row - 1;
if(vdb_p->area.y2 > y2) vdb_p->area.y2 = y2;
row_last = vdb_p->area.y2;
lv_refr_area_part_vdb(area_p);
}
/*If the last y coordinates are not handled yet ...*/
if(y2 != row_last) {
lv_vdb_t * vdb_p = lv_vdb_get();
if(!vdb_p) {
LV_LOG_WARN("Invalid VDB pointer");
return;
}
/*Calc. the next y coordinates of VDB*/
vdb_p->area.x1 = area_p->x1;
vdb_p->area.x2 = area_p->x2;
vdb_p->area.y1 = row;
vdb_p->area.y2 = y2;
/*Refresh this part too*/
lv_refr_area_part_vdb(area_p);
}
#else
lv_vdb_t * vdb_p = lv_vdb_get();
vdb_p->area.x1 = 0;
vdb_p->area.x2 = LV_HOR_RES-1;
vdb_p->area.y1 = 0;
vdb_p->area.y2 = LV_VER_RES - 1;
lv_refr_area_part_vdb(area_p);
#endif
}
/**
* Refresh a part of an area which is on the actual Virtual Display Buffer
* @param area_p pointer to an area to refresh
*/
static void lv_refr_area_part_vdb(const lv_area_t * area_p)
{
lv_vdb_t * vdb_p = lv_vdb_get();
if(!vdb_p) {
LV_LOG_WARN("Invalid VDB pointer");
return;
}
lv_obj_t * top_p;
/*Get the new mask from the original area and the act. VDB
It will be a part of 'area_p'*/
lv_area_t start_mask;
lv_area_intersect(&start_mask, area_p, &vdb_p->area);
/*Get the most top object which is not covered by others*/
top_p = lv_refr_get_top_obj(&start_mask, lv_scr_act());
/*Do the refreshing from the top object*/
lv_refr_obj_and_children(top_p, &start_mask);
/*Also refresh top and sys layer unconditionally*/
lv_refr_obj_and_children(lv_layer_top(), &start_mask);
lv_refr_obj_and_children(lv_layer_sys(), &start_mask);
/* In true double buffered mode flush only once when all areas were rendered.
* In normal mode flush after every area */
#if LV_VDB_TRUE_DOUBLE_BUFFERED == 0
/*Flush the content of the VDB*/
lv_vdb_flush();
#endif
}
#endif /*LV_VDB_SIZE == 0*/
/**
* Search the most top object which fully covers an area
* @param area_p pointer to an area
* @param obj the first object to start the searching (typically a screen)
* @return
*/
static lv_obj_t * lv_refr_get_top_obj(const lv_area_t * area_p, lv_obj_t * obj)
{
lv_obj_t * i;
lv_obj_t * found_p = NULL;
/*If this object is fully cover the draw area check the children too */
if(lv_area_is_in(area_p, &obj->coords) && obj->hidden == 0) {
LL_READ(obj->child_ll, i) {
found_p = lv_refr_get_top_obj(area_p, i);
/*If a children is ok then break*/
if(found_p != NULL) {
break;
}
}
/*If no better children check this object*/
if(found_p == NULL) {
lv_style_t * style = lv_obj_get_style(obj);
if(style->body.opa == LV_OPA_COVER &&
obj->design_func(obj, area_p, LV_DESIGN_COVER_CHK) != false &&
lv_obj_get_opa_scale(obj) == LV_OPA_COVER) {
found_p = obj;
}
}
}
return found_p;
}
/**
* Make the refreshing from an object. Draw all its children and the youngers too.
* @param top_p pointer to an objects. Start the drawing from it.
* @param mask_p pointer to an area, the objects will be drawn only here
*/
static void lv_refr_obj_and_children(lv_obj_t * top_p, const lv_area_t * mask_p)
{
/* Normally always will be a top_obj (at least the screen)
* but in special cases (e.g. if the screen has alpha) it won't.
* In this case use the screen directly */
if(top_p == NULL) top_p = lv_scr_act();
/*Refresh the top object and its children*/
lv_refr_obj(top_p, mask_p);
/*Draw the 'younger' sibling objects because they can be on top_obj */
lv_obj_t * par;
lv_obj_t * i;
lv_obj_t * border_p = top_p;
par = lv_obj_get_parent(top_p);
/*Do until not reach the screen*/
while(par != NULL) {
/*object before border_p has to be redrawn*/
i = lv_ll_get_prev(&(par->child_ll), border_p);
while(i != NULL) {
/*Refresh the objects*/
lv_refr_obj(i, mask_p);
i = lv_ll_get_prev(&(par->child_ll), i);
}
/*The new border will be there last parents,
*so the 'younger' brothers of parent will be refreshed*/
border_p = par;
/*Go a level deeper*/
par = lv_obj_get_parent(par);
}
/*Call the post draw design function of the parents of the to object*/
par = lv_obj_get_parent(top_p);
while(par != NULL) {
par->design_func(par, mask_p, LV_DESIGN_DRAW_POST);
par = lv_obj_get_parent(par);
}
}
/**
* Refresh an object an all of its children. (Called recursively)
* @param obj pointer to an object to refresh
* @param mask_ori_p pointer to an area, the objects will be drawn only here
*/
static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
{
/*Do not refresh hidden objects*/
if(obj->hidden != 0) return;
bool union_ok; /* Store the return value of area_union */
/* Truncate the original mask to the coordinates of the parent
* because the parent and its children are visible only here */
lv_area_t obj_mask;
lv_area_t obj_ext_mask;
lv_area_t obj_area;
lv_coord_t ext_size = obj->ext_size;
lv_obj_get_coords(obj, &obj_area);
obj_area.x1 -= ext_size;
obj_area.y1 -= ext_size;
obj_area.x2 += ext_size;
obj_area.y2 += ext_size;
union_ok = lv_area_intersect(&obj_ext_mask, mask_ori_p, &obj_area);
/*Draw the parent and its children only if they ore on 'mask_parent'*/
if(union_ok != false) {
/* Redraw the object */
obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN);
//usleep(5 * 1000); /*DEBUG: Wait after every object draw to see the order of drawing*/
/*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/
lv_obj_get_coords(obj, &obj_area);
union_ok = lv_area_intersect(&obj_mask, mask_ori_p, &obj_area);
if(union_ok != false) {
lv_area_t mask_child; /*Mask from obj and its child*/
lv_obj_t * child_p;
lv_area_t child_area;
LL_READ_BACK(obj->child_ll, child_p) {
lv_obj_get_coords(child_p, &child_area);
ext_size = child_p->ext_size;
child_area.x1 -= ext_size;
child_area.y1 -= ext_size;
child_area.x2 += ext_size;
child_area.y2 += ext_size;
/* Get the union (common parts) of original mask (from obj)
* and its child */
union_ok = lv_area_intersect(&mask_child, &obj_mask, &child_area);
/*If the parent and the child has common area then refresh the child */
if(union_ok) {
/*Refresh the next children*/
lv_refr_obj(child_p, &mask_child);
}
}
}
/* If all the children are redrawn make 'post draw' design */
obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST);
}
}

View File

@@ -1,95 +0,0 @@
/**
* @file lv_refr.h
*
*/
#ifndef LV_REFR_H
#define LV_REFR_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_obj.h"
#include <stdbool.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the screen refresh subsystem
*/
void lv_refr_init(void);
/**
* Redraw the invalidated areas now.
* Normally the redrawing is periodically executed in `lv_task_handler` but a long blocking process can
* prevent the call of `lv_task_handler`. In this case if the the GUI is updated in the process (e.g. progress bar)
* this function can be called when the screen should be updated.
*/
void lv_refr_now(void);
/**
* Invalidate an area
* @param area_p pointer to area which should be invalidated
*/
void lv_inv_area(const lv_area_t * area_p);
/**
* Set a function to call after every refresh to announce the refresh time and the number of refreshed pixels
* @param cb pointer to a callback function (void my_refr_cb(uint32_t time_ms, uint32_t px_num))
*/
void lv_refr_set_monitor_cb(void (*cb)(uint32_t, uint32_t));
/**
* Called when an area is invalidated to modify the coordinates of the area.
* Special display controllers may require special coordinate rounding
* @param cb pointer to the a function which will modify the area
*/
void lv_refr_set_round_cb(void(*cb)(lv_area_t*));
/**
* Get the number of areas in the buffer
* @return number of invalid areas
*/
uint16_t lv_refr_get_buf_size(void);
/**
* Pop (delete) the last 'num' invalidated areas from the buffer
* @param num number of areas to delete
*/
void lv_refr_pop_from_buf(uint16_t num);
/**********************
* STATIC FUNCTIONS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_REFR_H*/

View File

@@ -1,346 +0,0 @@
/**
* @file lv_style.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_obj.h"
#include "../lv_misc/lv_mem.h"
/*********************
* DEFINES
*********************/
#define STYLE_MIX_MAX 256
#define STYLE_MIX_SHIFT 8 /*log2(STYLE_MIX_MAX)*/
#define VAL_PROP(v1, v2, r) v1 + (((v2-v1) * r) >> STYLE_MIX_SHIFT)
#define STYLE_ATTR_MIX(attr, r) if(start->attr != end->attr) {res->attr = VAL_PROP(start->attr, end->attr, r);} else {res->attr = start->attr;}
/**********************
* TYPEDEFS
**********************/
#if USE_LV_ANIMATION
typedef struct {
lv_style_t style_start; /*Save not only pointers because can be same as 'style_anim' then it will be modified too*/
lv_style_t style_end;
lv_style_t * style_anim;
void (*end_cb)(void *);
} lv_style_anim_dsc_t;
#endif
/**********************
* STATIC PROTOTYPES
**********************/
#if USE_LV_ANIMATION
static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val);
static void style_animation_common_end_cb(void * ptr);
#endif
/**********************
* STATIC VARIABLES
**********************/
lv_style_t lv_style_scr;
lv_style_t lv_style_transp;
lv_style_t lv_style_transp_fit;
lv_style_t lv_style_transp_tight;
lv_style_t lv_style_plain;
lv_style_t lv_style_plain_color;
lv_style_t lv_style_pretty;
lv_style_t lv_style_pretty_color;
lv_style_t lv_style_btn_rel;
lv_style_t lv_style_btn_pr;
lv_style_t lv_style_btn_tgl_rel;
lv_style_t lv_style_btn_tgl_pr;
lv_style_t lv_style_btn_ina;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Init the basic styles
*/
void lv_style_init(void)
{
/* Not White/Black/Gray colors are created by HSV model with
* HUE = 210*/
/*Screen style*/
lv_style_scr.glass = 0;
lv_style_scr.body.opa = LV_OPA_COVER;
lv_style_scr.body.main_color = LV_COLOR_WHITE;
lv_style_scr.body.grad_color = LV_COLOR_WHITE;
lv_style_scr.body.radius = 0;
lv_style_scr.body.padding.ver = LV_DPI / 12;
lv_style_scr.body.padding.hor = LV_DPI / 12;
lv_style_scr.body.padding.inner = LV_DPI / 12;
lv_style_scr.body.border.color = LV_COLOR_BLACK;
lv_style_scr.body.border.opa = LV_OPA_COVER;
lv_style_scr.body.border.width = 0;
lv_style_scr.body.border.part = LV_BORDER_FULL;
lv_style_scr.body.shadow.color = LV_COLOR_GRAY;
lv_style_scr.body.shadow.type = LV_SHADOW_FULL;
lv_style_scr.body.shadow.width = 0;
lv_style_scr.text.opa = LV_OPA_COVER;
lv_style_scr.text.color = LV_COLOR_MAKE(0x30, 0x30, 0x30);
lv_style_scr.text.font = LV_FONT_DEFAULT;
lv_style_scr.text.letter_space = 2;
lv_style_scr.text.line_space = 2;
lv_style_scr.image.opa = LV_OPA_COVER;
lv_style_scr.image.color = LV_COLOR_MAKE(0x20, 0x20, 0x20);
lv_style_scr.image.intense = LV_OPA_TRANSP;
lv_style_scr.line.opa = LV_OPA_COVER;
lv_style_scr.line.color = LV_COLOR_MAKE(0x20, 0x20, 0x20);
lv_style_scr.line.width = 2;
lv_style_scr.line.rounded = 0;
/*Plain style (by default near the same as the screen style)*/
memcpy(&lv_style_plain, &lv_style_scr, sizeof(lv_style_t));
/*Plain color style*/
memcpy(&lv_style_plain_color, &lv_style_plain, sizeof(lv_style_t));
lv_style_plain_color.text.color = LV_COLOR_MAKE(0xf0, 0xf0, 0xf0);
lv_style_plain_color.image.color = LV_COLOR_MAKE(0xf0, 0xf0, 0xf0);
lv_style_plain_color.line.color = LV_COLOR_MAKE(0xf0, 0xf0, 0xf0);
lv_style_plain_color.body.main_color = LV_COLOR_MAKE(0x55, 0x96, 0xd8);
lv_style_plain_color.body.grad_color = lv_style_plain_color.body.main_color;
/*Pretty style */
memcpy(&lv_style_pretty, &lv_style_plain, sizeof(lv_style_t));
lv_style_pretty.text.color = LV_COLOR_MAKE(0x20, 0x20, 0x20);
lv_style_pretty.image.color = LV_COLOR_MAKE(0x20, 0x20, 0x20);
lv_style_pretty.line.color = LV_COLOR_MAKE(0x20, 0x20, 0x20);
lv_style_pretty.body.main_color = LV_COLOR_WHITE;
lv_style_pretty.body.grad_color = LV_COLOR_SILVER;
lv_style_pretty.body.radius = LV_DPI / 15;
lv_style_pretty.body.border.color = LV_COLOR_MAKE(0x40, 0x40, 0x40);
lv_style_pretty.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1;
lv_style_pretty.body.border.opa = LV_OPA_30;
/*Pretty color style*/
memcpy(&lv_style_pretty_color, &lv_style_pretty, sizeof(lv_style_t));
lv_style_pretty_color.text.color = LV_COLOR_MAKE(0xe0, 0xe0, 0xe0);
lv_style_pretty_color.image.color = LV_COLOR_MAKE(0xe0, 0xe0, 0xe0);
lv_style_pretty_color.line.color = LV_COLOR_MAKE(0xc0, 0xc0, 0xc0);
lv_style_pretty_color.body.main_color = LV_COLOR_MAKE(0x6b, 0x9a, 0xc7);
lv_style_pretty_color.body.grad_color = LV_COLOR_MAKE(0x2b, 0x59, 0x8b);
lv_style_pretty_color.body.border.color = LV_COLOR_MAKE(0x15, 0x2c, 0x42);
/*Transparent style*/
memcpy(&lv_style_transp, &lv_style_plain, sizeof(lv_style_t));
lv_style_transp.body.empty = 1;
lv_style_transp.glass = 1;
lv_style_transp.body.border.width = 0;
/*Transparent fitting size*/
memcpy(&lv_style_transp_fit, &lv_style_transp, sizeof(lv_style_t));
lv_style_transp_fit.body.padding.hor = 0;
lv_style_transp_fit.body.padding.ver = 0;
/*Transparent tight style*/
memcpy(&lv_style_transp_tight, &lv_style_transp_fit, sizeof(lv_style_t));
lv_style_transp_tight.body.padding.inner = 0;
/*Button released style*/
memcpy(&lv_style_btn_rel, &lv_style_plain, sizeof(lv_style_t));
lv_style_btn_rel.body.main_color = LV_COLOR_MAKE(0x76, 0xa2, 0xd0);
lv_style_btn_rel.body.grad_color = LV_COLOR_MAKE(0x19, 0x3a, 0x5d);
lv_style_btn_rel.body.radius = LV_DPI / 15;
lv_style_btn_rel.body.padding.hor = LV_DPI / 4;
lv_style_btn_rel.body.padding.ver = LV_DPI / 6;
lv_style_btn_rel.body.padding.inner = LV_DPI / 10;
lv_style_btn_rel.body.border.color = LV_COLOR_MAKE(0x0b, 0x19, 0x28);
lv_style_btn_rel.body.border.width = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1;
lv_style_btn_rel.body.border.opa = LV_OPA_70;
lv_style_btn_rel.body.shadow.color = LV_COLOR_GRAY;
lv_style_btn_rel.body.shadow.width = 0;
lv_style_btn_rel.text.color = LV_COLOR_MAKE(0xff, 0xff, 0xff);
lv_style_btn_rel.image.color = LV_COLOR_MAKE(0xff, 0xff, 0xff);
/*Button pressed style*/
memcpy(&lv_style_btn_pr, &lv_style_btn_rel, sizeof(lv_style_t));
lv_style_btn_pr.body.main_color = LV_COLOR_MAKE(0x33, 0x62, 0x94);
lv_style_btn_pr.body.grad_color = LV_COLOR_MAKE(0x10, 0x26, 0x3c);
lv_style_btn_pr.text.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6);
lv_style_btn_pr.image.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6);
lv_style_btn_pr.line.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6);
/*Button toggle released style*/
memcpy(&lv_style_btn_tgl_rel, &lv_style_btn_rel, sizeof(lv_style_t));
lv_style_btn_tgl_rel.body.main_color = LV_COLOR_MAKE(0x0a, 0x11, 0x22);
lv_style_btn_tgl_rel.body.grad_color = LV_COLOR_MAKE(0x37, 0x62, 0x90);
lv_style_btn_tgl_rel.body.border.color = LV_COLOR_MAKE(0x01, 0x07, 0x0d);
lv_style_btn_tgl_rel.text.color = LV_COLOR_MAKE(0xc8, 0xdd, 0xf4);
lv_style_btn_tgl_rel.image.color = LV_COLOR_MAKE(0xc8, 0xdd, 0xf4);
lv_style_btn_tgl_rel.line.color = LV_COLOR_MAKE(0xc8, 0xdd, 0xf4);
/*Button toggle pressed style*/
memcpy(&lv_style_btn_tgl_pr, &lv_style_btn_tgl_rel, sizeof(lv_style_t));
lv_style_btn_tgl_pr.body.main_color = LV_COLOR_MAKE(0x02, 0x14, 0x27);
lv_style_btn_tgl_pr.body.grad_color = LV_COLOR_MAKE(0x2b, 0x4c, 0x70);
lv_style_btn_tgl_pr.text.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6);
lv_style_btn_tgl_pr.image.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6);
lv_style_btn_tgl_pr.line.color = LV_COLOR_MAKE(0xa4, 0xb5, 0xc6);
/*Button inactive style*/
memcpy(&lv_style_btn_ina, &lv_style_btn_rel, sizeof(lv_style_t));
lv_style_btn_ina.body.main_color = LV_COLOR_MAKE(0xd8, 0xd8, 0xd8);
lv_style_btn_ina.body.grad_color = LV_COLOR_MAKE(0xd8, 0xd8, 0xd8);
lv_style_btn_ina.body.border.color = LV_COLOR_MAKE(0x90, 0x90, 0x90);
lv_style_btn_ina.text.color = LV_COLOR_MAKE(0x70, 0x70, 0x70);
lv_style_btn_ina.image.color = LV_COLOR_MAKE(0x70, 0x70, 0x70);
lv_style_btn_ina.line.color = LV_COLOR_MAKE(0x70, 0x70, 0x70);
}
/**
* Copy a style to an other
* @param dest pointer to the destination style
* @param src pointer to the source style
*/
void lv_style_copy(lv_style_t * dest, const lv_style_t * src)
{
memcpy(dest, src, sizeof(lv_style_t));
}
/**
* Mix two styles according to a given ratio
* @param start start style
* @param end end style
* @param res store the result style here
* @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style
*/
void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio)
{
STYLE_ATTR_MIX(body.opa, ratio);
STYLE_ATTR_MIX(body.radius, ratio);
STYLE_ATTR_MIX(body.border.width, ratio);
STYLE_ATTR_MIX(body.border.opa, ratio);
STYLE_ATTR_MIX(body.shadow.width, ratio);
STYLE_ATTR_MIX(body.padding.hor, ratio);
STYLE_ATTR_MIX(body.padding.ver, ratio);
STYLE_ATTR_MIX(body.padding.inner, ratio);
STYLE_ATTR_MIX(text.line_space, ratio);
STYLE_ATTR_MIX(text.letter_space, ratio);
STYLE_ATTR_MIX(text.opa, ratio);
STYLE_ATTR_MIX(line.width, ratio);
STYLE_ATTR_MIX(line.opa, ratio);
STYLE_ATTR_MIX(image.intense, ratio);
STYLE_ATTR_MIX(image.opa, ratio);
lv_opa_t opa = ratio == STYLE_MIX_MAX ? LV_OPA_COVER : ratio;
res->body.main_color = lv_color_mix(end->body.main_color, start->body.main_color, opa);
res->body.grad_color = lv_color_mix(end->body.grad_color, start->body.grad_color, opa);
res->body.border.color = lv_color_mix(end->body.border.color, start->body.border.color, opa);
res->body.shadow.color = lv_color_mix(end->body.shadow.color, start->body.shadow.color, opa);
res->text.color = lv_color_mix(end->text.color, start->text.color, opa);
res->image.color = lv_color_mix(end->image.color, start->image.color, opa);
res->line.color = lv_color_mix(end->line.color, start->line.color, opa);
if(ratio < (STYLE_MIX_MAX >> 1)) {
res->body.empty = start->body.empty;
res->body.border.part = start->body.border.part;
res->glass = start->glass;
res->text.font = start->text.font;
res->body.shadow.type = start->body.shadow.type;
res->line.rounded = start->line.rounded;
} else {
res->body.empty = end->body.empty;
res->body.border.part = end->body.border.part;
res->glass = end->glass;
res->text.font = end->text.font;
res->body.shadow.type = end->body.shadow.type;
res->line.rounded = end->line.rounded;
}
}
#if USE_LV_ANIMATION
/**
* Create an animation from a pre-configured 'lv_style_anim_t' variable
* @param anim pointer to a pre-configured 'lv_style_anim_t' variable (will be copied)
* @return pointer to a descriptor. Really this variable will be animated. (Can be used in `lv_anim_del(dsc, NULL)`)
*/
void * lv_style_anim_create(lv_style_anim_t * anim)
{
lv_style_anim_dsc_t * dsc;
dsc = lv_mem_alloc(sizeof(lv_style_anim_dsc_t));
lv_mem_assert(dsc);
if(dsc == NULL) return NULL;
dsc->style_anim = anim->style_anim;
memcpy(&dsc->style_start, anim->style_start, sizeof(lv_style_t));
memcpy(&dsc->style_end, anim->style_end, sizeof(lv_style_t));
memcpy(dsc->style_anim, anim->style_start, sizeof(lv_style_t));
dsc->end_cb = anim->end_cb;
lv_anim_t a;
a.var = (void *)dsc;
a.start = 0;
a.end = STYLE_MIX_MAX;
a.fp = (lv_anim_fp_t)style_animator;
a.path = lv_anim_path_linear;
a.end_cb = style_animation_common_end_cb;
a.act_time = anim->act_time;
a.time = anim->time;
a.playback = anim->playback;
a.playback_pause = anim->playback_pause;
a.repeat = anim->repeat;
a.repeat_pause = anim->repeat_pause;
lv_anim_create(&a);
return dsc;
}
#endif
/**********************
* STATIC FUNCTIONS
**********************/
#if USE_LV_ANIMATION
/**
* Used by the style animations to set the values of a style according to start and end style.
* @param dsc the 'animated variable' set by lv_style_anim_create()
* @param val the current state of the animation between 0 and LV_STYLE_ANIM_RES
*/
static void style_animator(lv_style_anim_dsc_t * dsc, int32_t val)
{
const lv_style_t * start = &dsc->style_start;
const lv_style_t * end = &dsc->style_end;
lv_style_t * act = dsc->style_anim;
lv_style_mix(start, end, act, val);
lv_obj_report_style_mod(dsc->style_anim);
}
/**
* Called when a style animation is ready
* It called the user defined call back and free the allocated memories
* @param ptr the 'animated variable' set by lv_style_anim_create()
*/
static void style_animation_common_end_cb(void * ptr)
{
lv_style_anim_dsc_t * dsc = ptr; /*To avoid casting*/
if(dsc->end_cb) dsc->end_cb(dsc);
lv_mem_free(dsc);
}
#endif

View File

@@ -1,199 +0,0 @@
/**
* @file lv_style.h
*
*/
#ifndef LV_STYLE_H
#define LV_STYLE_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stdbool.h>
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_font.h"
#include "../lv_misc/lv_anim.h"
/*********************
* DEFINES
*********************/
#define LV_RADIUS_CIRCLE (LV_COORD_MAX) /*A very big radius to always draw as circle*/
/**********************
* TYPEDEFS
**********************/
/*Border types (Use 'OR'ed values)*/
enum
{
LV_BORDER_NONE = 0x00,
LV_BORDER_BOTTOM = 0x01,
LV_BORDER_TOP = 0x02,
LV_BORDER_LEFT = 0x04,
LV_BORDER_RIGHT = 0x08,
LV_BORDER_FULL = 0x0F,
LV_BORDER_INTERNAL = 0x10, /*FOR matrix-like objects (e.g. Button matrix)*/
};
typedef uint8_t lv_border_part_t;
/*Shadow types*/
enum
{
LV_SHADOW_BOTTOM = 0,
LV_SHADOW_FULL,
};
typedef uint8_t lv_shadow_type_t;
typedef struct
{
uint8_t glass :1; /*1: Do not inherit this style*/
struct {
lv_color_t main_color;
lv_color_t grad_color; /*`grad_color` will be removed in v6.0, use `aux_color` instead*/
lv_coord_t radius;
lv_opa_t opa;
struct {
lv_color_t color;
lv_coord_t width;
lv_border_part_t part;
lv_opa_t opa;
} border;
struct {
lv_color_t color;
lv_coord_t width;
lv_shadow_type_t type;
} shadow;
struct {
lv_coord_t ver;
lv_coord_t hor;
lv_coord_t inner;
} padding;
uint8_t empty :1; /*Transparent background (border still drawn)*/
} body;
struct {
lv_color_t color;
const lv_font_t * font;
lv_coord_t letter_space;
lv_coord_t line_space;
lv_opa_t opa;
} text;
struct {
lv_color_t color;
lv_opa_t intense;
lv_opa_t opa;
} image;
struct {
lv_color_t color;
lv_coord_t width;
lv_opa_t opa;
uint8_t rounded :1; /*1: rounded line endings*/
} line;
} lv_style_t;
#if USE_LV_ANIMATION
typedef struct {
const lv_style_t * style_start; /*Pointer to the starting style*/
const lv_style_t * style_end; /*Pointer to the destination style*/
lv_style_t * style_anim; /*Pointer to a style to animate*/
lv_anim_cb_t end_cb; /*Call it when the animation is ready (NULL if unused)*/
int16_t time; /*Animation time in ms*/
int16_t act_time; /*Current time in animation. Set to negative to make delay.*/
uint16_t playback_pause; /*Wait before play back*/
uint16_t repeat_pause; /*Wait before repeat*/
uint8_t playback :1; /*When the animation is ready play it back*/
uint8_t repeat :1; /*Repeat the animation infinitely*/
} lv_style_anim_t;
/* Example initialization
lv_style_anim_t a;
a.style_anim = &style_to_anim;
a.style_start = &style_1;
a.style_end = &style_2;
a.act_time = 0;
a.time = 1000;
a.playback = 0;
a.playback_pause = 0;
a.repeat = 0;
a.repeat_pause = 0;
a.end_cb = NULL;
lv_style_anim_create(&a);
*/
#endif
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Init the basic styles
*/
void lv_style_init (void);
/**
* Copy a style to an other
* @param dest pointer to the destination style
* @param src pointer to the source style
*/
void lv_style_copy(lv_style_t * dest, const lv_style_t * src);
/**
* Mix two styles according to a given ratio
* @param start start style
* @param end end style
* @param res store the result style here
* @param ratio the ratio of mix [0..256]; 0: `start` style; 256: `end` style
*/
void lv_style_mix(const lv_style_t * start, const lv_style_t * end, lv_style_t * res, uint16_t ratio);
#if USE_LV_ANIMATION
/**
* Create an animation from a pre-configured 'lv_style_anim_t' variable
* @param anim pointer to a pre-configured 'lv_style_anim_t' variable (will be copied)
* @return pointer to a descriptor. Really this variable will be animated. (Can be used in `lv_anim_del(dsc, NULL)`)
*/
void * lv_style_anim_create(lv_style_anim_t * anim);
#endif
/*************************
* GLOBAL VARIABLES
*************************/
extern lv_style_t lv_style_scr;
extern lv_style_t lv_style_transp;
extern lv_style_t lv_style_transp_fit;
extern lv_style_t lv_style_transp_tight;
extern lv_style_t lv_style_plain;
extern lv_style_t lv_style_plain_color;
extern lv_style_t lv_style_pretty;
extern lv_style_t lv_style_pretty_color;
extern lv_style_t lv_style_btn_rel;
extern lv_style_t lv_style_btn_pr;
extern lv_style_t lv_style_btn_tgl_rel;
extern lv_style_t lv_style_btn_tgl_pr;
extern lv_style_t lv_style_btn_ina;
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_STYLE_H*/

View File

@@ -1,207 +0,0 @@
/**
* @file lv_vdb.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_vdb.h"
#if LV_VDB_SIZE != 0
#include "../lv_hal/lv_hal_disp.h"
#include "../lv_misc/lv_log.h"
#include <stddef.h>
/*********************
* DEFINES
*********************/
#ifndef LV_ATTRIBUTE_FLUSH_READY
#define LV_ATTRIBUTE_FLUSH_READY
#endif
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/*Simple VDB*/
#if LV_VDB_DOUBLE == 0
# if LV_VDB_ADR == 0
/*If the buffer address is not specified simply allocate it*/
static LV_ATTRIBUTE_MEM_ALIGN uint8_t vdb_buf[LV_VDB_SIZE_IN_BYTES];
static lv_vdb_t vdb = {.buf = (lv_color_t *)vdb_buf};
# else /*LV_VDB_ADR != 0*/
/*If the buffer address is specified use that address*/
static lv_vdb_t vdb = {.buf = (lv_color_t *)LV_VDB_ADR};
# endif
/*LV_VDB_DOUBLE != 0*/
#else
/*Double VDB*/
static uint8_t vdb_active = 0;
# if LV_VDB_ADR == 0
/*If the buffer address is not specified simply allocate it*/
static LV_ATTRIBUTE_MEM_ALIGN uint8_t vdb_buf1[LV_VDB_SIZE_IN_BYTES];
static LV_ATTRIBUTE_MEM_ALIGN uint8_t vdb_buf2[LV_VDB_SIZE_IN_BYTES];
static lv_vdb_t vdb[2] = {{.buf = (lv_color_t *) vdb_buf1}, {.buf = (lv_color_t *) vdb_buf2}};
# else /*LV_VDB_ADR != 0*/
/*If the buffer address is specified use that address*/
static lv_vdb_t vdb[2] = {{.buf = (lv_color_t *)LV_VDB_ADR}, {.buf = (lv_color_t *)LV_VDB2_ADR}};
# endif
#endif
static volatile bool vdb_flushing = false;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Get the 'vdb' variable or allocate one in LV_VDB_DOUBLE mode
* @return pointer to a 'vdb' variable
*/
lv_vdb_t * lv_vdb_get(void)
{
#if LV_VDB_DOUBLE == 0
/* Wait until VDB is flushing.
* (Until this user calls of 'lv_flush_ready()' in the display drivers's flush function*/
while(vdb_flushing);
return &vdb;
#else
/*If already there is an active do nothing*/
return &vdb[vdb_active];
#endif
}
/**
* Flush the content of the VDB
*/
void lv_vdb_flush(void)
{
lv_vdb_t * vdb_act = lv_vdb_get();
if(!vdb_act) {
LV_LOG_WARN("Invalid VDB pointer");
return;
}
/*Don't start a new flush while the previous is not finished*/
#if LV_VDB_DOUBLE
while(vdb_flushing);
#endif /*LV_VDB_DOUBLE*/
vdb_flushing = true;
/*Flush the rendered content to the display*/
lv_disp_flush(vdb_act->area.x1, vdb_act->area.y1, vdb_act->area.x2, vdb_act->area.y2, vdb_act->buf);
#if LV_VDB_DOUBLE
/*Make the other VDB active. The content of the current will be kept until the next flush*/
vdb_active++;
vdb_active &= 0x1;
/*If the screen is transparent initialize it when the new VDB is selected*/
# if LV_COLOR_SCREEN_TRANSP
memset(vdb[vdb_active].buf, 0x00, LV_VDB_SIZE_IN_BYTES);
# endif /*LV_COLOR_SCREEN_TRANSP*/
#endif /*#if LV_VDB_DOUBLE*/
}
/**
* Set the address of VDB buffer(s) manually. To use this set `LV_VDB_ADR` (and `LV_VDB2_ADR`) to `LV_VDB_ADR_INV` in `lv_conf.h`.
* It should be called before `lv_init()`. The size of the buffer should be: `LV_VDB_SIZE_IN_BYTES`
* @param buf1 address of the VDB.
* @param buf2 address of the second buffer. `NULL` if `LV_VDB_DOUBLE 0`
*/
void lv_vdb_set_adr(void * buf1, void * buf2)
{
#if LV_VDB_DOUBLE == 0
(void) buf2; /*unused*/
vdb.buf = buf1;
#else
vdb[0].buf = buf1;
vdb[1].buf = buf2;
#endif
}
/**
* Call in the display driver's 'disp_flush' function when the flushing is finished
*/
LV_ATTRIBUTE_FLUSH_READY void lv_flush_ready(void)
{
vdb_flushing = false;
/*If the screen is transparent initialize it when the flushing is ready*/
#if LV_VDB_DOUBLE == 0 && LV_COLOR_SCREEN_TRANSP
memset(vdb_buf, 0x00, LV_VDB_SIZE_IN_BYTES);
#endif
}
/**
* Get currently active VDB, where the drawing happens. Used with `LV_VDB_DOUBLE 1`
* @return pointer to the active VDB. If `LV_VDB_DOUBLE 0` give the single VDB
*/
lv_vdb_t * lv_vdb_get_active(void)
{
#if LV_VDB_DOUBLE == 0
return &vdb;
#else
return &vdb[vdb_active];
#endif
}
/**
* Get currently inactive VDB, which is being displayed or being flushed. Used with `LV_VDB_DOUBLE 1`
* @return pointer to the inactive VDB. If `LV_VDB_DOUBLE 0` give the single VDB
*/
lv_vdb_t * lv_vdb_get_inactive(void)
{
#if LV_VDB_DOUBLE == 0
return &vdb;
#else
return &vdb[(vdb_active + 1) & 0x1];
#endif
}
/**
* Whether the flushing is in progress or not
* @return true: flushing is in progress; false: flushing ready
*/
bool lv_vdb_is_flushing(void)
{
return vdb_flushing;
}
/**********************
* STATIC FUNCTIONS
**********************/
#else
/**
* Just for compatibility
*/
void lv_flush_ready(void)
{
/*Do nothing. It is used only for VDB*/
}
#endif

View File

@@ -1,119 +0,0 @@
/**
* @file lv_vdb.h
*
*/
#ifndef LV_VDB_H
#define LV_VDB_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#if LV_VDB_SIZE != 0
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_area.h"
/*********************
* DEFINES
*********************/
/*Can be used in `lv_conf.h` the set an invalid address for the VDB. It should be replaced later by a valid address using `lv_vdb_set_adr()`*/
#define LV_VDB_ADR_INV 8 /*8 is still too small to be valid but it's aligned on 64 bit machines as well*/
#ifndef LV_VDB_PX_BPP
#define LV_VDB_PX_BPP LV_COLOR_SIZE /* Default is LV_COLOR_SIZE */
#endif
#if LV_VDB_TRUE_DOUBLE_BUFFERED && (LV_VDB_SIZE != LV_HOR_RES * LV_VER_RES || LV_VDB_DOUBLE == 0)
#error "With LV_VDB_TRUE_DOUBLE_BUFFERED: (LV_VDB_SIZE = LV_HOR_RES * LV_VER_RES and LV_VDB_DOUBLE = 1 is required"
#endif
/* The size of VDB in bytes.
* (LV_VDB_SIZE * LV_VDB_PX_BPP) >> 3): just divide by 8 to convert bits to bytes
* (((LV_VDB_SIZE * LV_VDB_PX_BPP) & 0x7) ? 1 : 0): add an extra byte to round up.
* E.g. if LV_VDB_SIZE = 10 and LV_VDB_PX_BPP = 1 -> 10 bits -> 2 bytes*/
#define LV_VDB_SIZE_IN_BYTES ((LV_VDB_SIZE * LV_VDB_PX_BPP) >> 3) + (((LV_VDB_SIZE * LV_VDB_PX_BPP) & 0x7) ? 1 : 0)
/**********************
* TYPEDEFS
**********************/
typedef struct
{
lv_area_t area;
lv_color_t *buf;
} lv_vdb_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Get the 'vdb' variable or allocate one in LV_VDB_DOUBLE mode
* @return pointer to a 'vdb' variable
*/
lv_vdb_t * lv_vdb_get(void);
/**
* Flush the content of the vdb
*/
void lv_vdb_flush(void);
/**
* Set the address of VDB buffer(s) manually. To use this set `LV_VDB_ADR` (and `LV_VDB2_ADR`) to `LV_VDB_ADR_INV` in `lv_conf.h`.
* It should be called before `lv_init()`. The size of the buffer should be: `LV_VDB_SIZE_IN_BYTES`
* @param buf1 address of the VDB.
* @param buf2 address of the second buffer. `NULL` if `LV_VDB_DOUBLE 0`
*/
void lv_vdb_set_adr(void * buf1, void * buf2);
/**
* Call in the display driver's 'disp_flush' function when the flushing is finished
*/
void lv_flush_ready(void);
/**
* Get currently active VDB, where the drawing happens. Used with `LV_VDB_DOUBLE 1`
* @return pointer to the active VDB. If `LV_VDB_DOUBLE 0` give the single VDB
*/
lv_vdb_t * lv_vdb_get_active(void);
/**
* Get currently inactive VDB, which is being displayed or being flushed. Used with `LV_VDB_DOUBLE 1`
* @return pointer to the inactive VDB. If `LV_VDB_DOUBLE 0` give the single VDB
*/
lv_vdb_t * lv_vdb_get_inactive(void);
/**
* Whether the flushing is in progress or not
* @return true: flushing is in progress; false: flushing ready
*/
bool lv_vdb_is_flushing(void);
/**********************
* MACROS
**********************/
#else /*LV_VDB_SIZE != 0*/
/*Just for compatibility*/
void lv_flush_ready(void);
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_VDB_H*/

View File

@@ -1,164 +0,0 @@
/**
* @file lv_draw.c
*
*/
/*********************
* INCLUDES
*********************/
#include <stdio.h>
#include <stdbool.h>
#include "lv_draw.h"
#include "lv_draw_rbasic.h"
#include "lv_draw_vbasic.h"
#include "../lv_misc/lv_fs.h"
#include "../lv_misc/lv_math.h"
#include "../lv_misc/lv_ufs.h"
#include "../lv_objx/lv_img.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
#if LV_VDB_SIZE != 0
void (*const px_fp)(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) = lv_vpx;
void (*const fill_fp)(const lv_area_t * coords, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) = lv_vfill;
void (*const letter_fp)(const lv_point_t * pos_p, const lv_area_t * mask, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa) = lv_vletter;
void (*const map_fp)(const lv_area_t * cords_p, const lv_area_t * mask_p,
const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte,
lv_color_t recolor, lv_opa_t recolor_opa) = lv_vmap;
#else
void (*const px_fp)(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) = lv_rpx;
void (*const fill_fp)(const lv_area_t * coords, const lv_area_t * mask, lv_color_t color, lv_opa_t opa) = lv_rfill;
void (*const letter_fp)(const lv_point_t * pos_p, const lv_area_t * mask, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa) = lv_rletter;
void (*const map_fp)(const lv_area_t * cords_p, const lv_area_t * mask_p,
const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte,
lv_color_t recolor, lv_opa_t recolor_opa) = lv_rmap;
#endif
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**********************
* STATIC FUNCTIONS
**********************/
#if LV_ANTIALIAS != 0
/**
* Get the opacity of a pixel based it's position in a line segment
* @param seg segment length
* @param px_id position of of a pixel which opacity should be get [0..seg-1]
* @param base_opa the base opacity
* @return the opacity of the given pixel
*/
lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa)
{
/* How to calculate the opacity of pixels on the edges which makes the anti-aliasing?
* For example we have a line like this (y = -0.5 * x):
*
* | _ _
* * * |
*
* Anti-aliased pixels come to the '*' characters
* Calculate what percentage of the pixels should be covered if real line (not rasterized) would be drawn:
* 1. A real line should start on (0;0) and end on (2;1)
* 2. So the line intersection coordinates on the first pixel: (0;0) (1;0.5) -> 25% covered pixel in average
* 3. For the second pixel: (1;0.5) (2;1) -> 75% covered pixel in average
* 4. The equation: (px_id * 2 + 1) / (segment_width * 2)
* segment_width: the line segment which is being anti-aliased (was 2 in the example)
* px_id: pixel ID from 0 to (segment_width - 1)
* result: [0..1] coverage of the pixel
*/
/*Accelerate the common segment sizes to avoid division*/
static const lv_opa_t seg1[1] = {128};
static const lv_opa_t seg2[2] = {64, 192};
static const lv_opa_t seg3[3] = {42, 128, 212};
static const lv_opa_t seg4[4] = {32, 96, 159, 223};
static const lv_opa_t seg5[5] = {26, 76, 128, 178, 230};
static const lv_opa_t seg6[6] = {21, 64, 106, 148, 191, 234};
static const lv_opa_t seg7[7] = {18, 55, 91, 128, 164, 200, 237};
static const lv_opa_t seg8[8] = {16, 48, 80, 112, 143, 175, 207, 239};
static const lv_opa_t * seg_map[] = {seg1, seg2, seg3, seg4,
seg5, seg6, seg7, seg8
};
if(seg == 0) return LV_OPA_TRANSP;
else if(seg < 8) return (uint32_t)((uint32_t)seg_map[seg - 1][px_id] * base_opa) >> 8;
else {
return ((px_id * 2 + 1) * base_opa) / (2 * seg);
}
}
/**
* Add a vertical anti-aliasing segment (pixels with decreasing opacity)
* @param x start point x coordinate
* @param y start point y coordinate
* @param length length of segment (negative value to start from 0 opacity)
* @param mask draw only in this area
* @param color color of pixels
* @param opa maximum opacity
*/
void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, lv_opa_t opa)
{
bool aa_inv = false;
if(length < 0) {
aa_inv = true;
length = -length;
}
lv_coord_t i;
for(i = 0; i < length; i++) {
lv_opa_t px_opa = lv_draw_aa_get_opa(length, i, opa);
if(aa_inv) px_opa = opa - px_opa;
px_fp(x, y + i, mask, color, px_opa);
}
}
/**
* Add a horizontal anti-aliasing segment (pixels with decreasing opacity)
* @param x start point x coordinate
* @param y start point y coordinate
* @param length length of segment (negative value to start from 0 opacity)
* @param mask draw only in this area
* @param color color of pixels
* @param opa maximum opacity
*/
void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, lv_opa_t opa)
{
bool aa_inv = false;
if(length < 0) {
aa_inv = true;
length = -length;
}
lv_coord_t i;
for(i = 0; i < length; i++) {
lv_opa_t px_opa = lv_draw_aa_get_opa(length, i, opa);
if(aa_inv) px_opa = opa - px_opa;
px_fp(x + i, y, mask, color, px_opa);
}
}
#endif

View File

@@ -1,115 +0,0 @@
/**
* @file lv_draw.h
*
*/
#ifndef LV_DRAW_H
#define LV_DRAW_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#include "../lv_core/lv_style.h"
#include "../lv_misc/lv_txt.h"
/*********************
* DEFINES
*********************/
/*If image pixels contains alpha we need to know how much byte is a pixel*/
#if LV_COLOR_DEPTH == 1 || LV_COLOR_DEPTH == 8
# define LV_IMG_PX_SIZE_ALPHA_BYTE 2
#elif LV_COLOR_DEPTH == 16
# define LV_IMG_PX_SIZE_ALPHA_BYTE 3
#elif LV_COLOR_DEPTH == 32
# define LV_IMG_PX_SIZE_ALPHA_BYTE 4
#endif
/**********************
* TYPEDEFS
**********************/
enum {
LV_IMG_SRC_VARIABLE,
LV_IMG_SRC_FILE,
LV_IMG_SRC_SYMBOL,
LV_IMG_SRC_UNKNOWN,
};
typedef uint8_t lv_img_src_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
#if LV_ANTIALIAS != 0
/**
* Get the opacity of a pixel based it's position in a line segment
* @param seg segment length
* @param px_id position of of a pixel which opacity should be get [0..seg-1]
* @param base_opa the base opacity
* @return the opacity of the given pixel
*/
lv_opa_t lv_draw_aa_get_opa(lv_coord_t seg, lv_coord_t px_id, lv_opa_t base_opa);
/**
* Add a vertical anti-aliasing segment (pixels with decreasing opacity)
* @param x start point x coordinate
* @param y start point y coordinate
* @param length length of segment (negative value to start from 0 opacity)
* @param mask draw only in this area
* @param color color of pixels
* @param opa maximum opacity
*/
void lv_draw_aa_ver_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, lv_opa_t opa);
/**
* Add a horizontal anti-aliasing segment (pixels with decreasing opacity)
* @param x start point x coordinate
* @param y start point y coordinate
* @param length length of segment (negative value to start from 0 opacity)
* @param mask draw only in this area
* @param color color of pixels
* @param opa maximum opacity
*/
void lv_draw_aa_hor_seg(lv_coord_t x, lv_coord_t y, lv_coord_t length, const lv_area_t * mask, lv_color_t color, lv_opa_t opa);
#endif
/**********************
* GLOBAL VARIABLES
**********************/
extern void (*const px_fp)(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_color_t color, lv_opa_t opa);
extern void (*const fill_fp)(const lv_area_t * coords, const lv_area_t * mask, lv_color_t color, lv_opa_t opa);
extern void (*const letter_fp)(const lv_point_t * pos_p, const lv_area_t * mask, const lv_font_t * font_p, uint32_t letter, lv_color_t color, lv_opa_t opa);
extern void (*const map_fp)(const lv_area_t * cords_p, const lv_area_t * mask_p,
const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte,
lv_color_t recolor, lv_opa_t recolor_opa);
/**********************
* MACROS
**********************/
/**********************
* POST INCLUDES
*********************/
#include "lv_draw_rect.h"
#include "lv_draw_label.h"
#include "lv_draw_img.h"
#include "lv_draw_line.h"
#include "lv_draw_triangle.h"
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_H*/

View File

@@ -1,14 +0,0 @@
CSRCS += lv_draw_vbasic.c
CSRCS += lv_draw_rbasic.c
CSRCS += lv_draw.c
CSRCS += lv_draw_rect.c
CSRCS += lv_draw_label.c
CSRCS += lv_draw_line.c
CSRCS += lv_draw_img.c
CSRCS += lv_draw_arc.c
CSRCS += lv_draw_triangle.c
DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_draw
VPATH += :$(LVGL_DIR)/lvgl/lv_draw
CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_draw"

View File

@@ -1,264 +0,0 @@
/**
* @file lv_draw_arc.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_draw_arc.h"
#include "../lv_misc/lv_math.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static uint16_t fast_atan2(int x, int y);
static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa);
static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa);
static bool deg_test_norm(uint16_t deg, uint16_t start, uint16_t end);
static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end);
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Draw an arc. (Can draw pie too with great thickness.)
* @param center_x the x coordinate of the center of the arc
* @param center_y the y coordinate of the center of the arc
* @param radius the radius of the arc
* @param mask the arc will be drawn only in this mask
* @param start_angle the start angle of the arc (0 deg on the bottom, 90 deg on the right)
* @param end_angle the end angle of the arc
* @param style style of the arc (`body.thickness`, `body.main_color`, `body.opa` is used)
* @param opa_scale scale down all opacities by the factor
*/
void lv_draw_arc(lv_coord_t center_x, lv_coord_t center_y, uint16_t radius, const lv_area_t * mask,
uint16_t start_angle, uint16_t end_angle, const lv_style_t * style, lv_opa_t opa_scale)
{
lv_coord_t thickness = style->line.width;
if(thickness > radius) thickness = radius;
lv_coord_t r_out = radius;
lv_coord_t r_in = r_out - thickness;
int16_t deg_base;
int16_t deg;
lv_coord_t x_start[4];
lv_coord_t x_end[4];
lv_color_t color = style->line.color;
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->body.opa : (uint16_t)((uint16_t) style->body.opa * opa_scale) >> 8;
bool (*deg_test)(uint16_t, uint16_t, uint16_t);
if(start_angle <= end_angle) deg_test = deg_test_norm;
else deg_test = deg_test_inv;
if(deg_test(270, start_angle, end_angle)) hor_line(center_x - r_out + 1, center_y, mask, thickness - 1, color, opa); // Left Middle
if(deg_test(90, start_angle, end_angle)) hor_line(center_x + r_in, center_y, mask, thickness - 1, color, opa); // Right Middle
if(deg_test(180, start_angle, end_angle)) ver_line(center_x, center_y - r_out + 1, mask, thickness - 1, color, opa); // Top Middle
if(deg_test(0, start_angle, end_angle)) ver_line(center_x, center_y + r_in, mask, thickness - 1, color, opa); // Bottom middle
uint32_t r_out_sqr = r_out * r_out;
uint32_t r_in_sqr = r_in * r_in;
int16_t xi;
int16_t yi;
for(yi = -r_out; yi < 0; yi++) {
x_start[0] = LV_COORD_MIN;
x_start[1] = LV_COORD_MIN;
x_start[2] = LV_COORD_MIN;
x_start[3] = LV_COORD_MIN;
x_end[0] = LV_COORD_MIN;
x_end[1] = LV_COORD_MIN;
x_end[2] = LV_COORD_MIN;
x_end[3] = LV_COORD_MIN;
for(xi = -r_out; xi < 0; xi++) {
uint32_t r_act_sqr = xi * xi + yi * yi;
if(r_act_sqr > r_out_sqr) continue;
deg_base = fast_atan2(xi, yi) - 180;
deg = 180 + deg_base;
if(deg_test(deg, start_angle, end_angle)) {
if(x_start[0] == LV_COORD_MIN) x_start[0] = xi;
} else if(x_start[0] != LV_COORD_MIN && x_end[0] == LV_COORD_MIN) {
x_end[0] = xi - 1;
}
deg = 360 - deg_base;
if(deg_test(deg, start_angle, end_angle)) {
if(x_start[1] == LV_COORD_MIN) x_start[1] = xi;
} else if(x_start[1] != LV_COORD_MIN && x_end[1] == LV_COORD_MIN) {
x_end[1] = xi - 1;
}
deg = 180 - deg_base;
if(deg_test(deg, start_angle, end_angle)) {
if(x_start[2] == LV_COORD_MIN) x_start[2] = xi;
} else if(x_start[2] != LV_COORD_MIN && x_end[2] == LV_COORD_MIN) {
x_end[2] = xi - 1;
}
deg = deg_base;
if(deg_test(deg, start_angle, end_angle)) {
if(x_start[3] == LV_COORD_MIN) x_start[3] = xi;
} else if(x_start[3] != LV_COORD_MIN && x_end[3] == LV_COORD_MIN) {
x_end[3] = xi - 1;
}
if(r_act_sqr < r_in_sqr) break; /*No need to continue the iteration in x once we found the inner edge of the arc*/
}
if(x_start[0] != LV_COORD_MIN) {
if(x_end[0] == LV_COORD_MIN) x_end[0] = xi - 1;
hor_line(center_x + x_start[0], center_y + yi, mask, x_end[0] - x_start[0], color, opa);
}
if(x_start[1] != LV_COORD_MIN) {
if(x_end[1] == LV_COORD_MIN) x_end[1] = xi - 1;
hor_line(center_x + x_start[1], center_y - yi, mask, x_end[1] - x_start[1], color, opa);
}
if(x_start[2] != LV_COORD_MIN) {
if(x_end[2] == LV_COORD_MIN) x_end[2] = xi - 1;
hor_line(center_x - x_end[2], center_y + yi, mask, LV_MATH_ABS(x_end[2] - x_start[2]), color, opa);
}
if(x_start[3] != LV_COORD_MIN) {
if(x_end[3] == LV_COORD_MIN) x_end[3] = xi - 1;
hor_line(center_x - x_end[3], center_y - yi, mask, LV_MATH_ABS(x_end[3] - x_start[3]), color, opa);
}
#if LV_ANTIALIAS
/*TODO*/
#endif
}
}
static uint16_t fast_atan2(int x, int y)
{
// Fast XY vector to integer degree algorithm - Jan 2011 www.RomanBlack.com
// Converts any XY values including 0 to a degree value that should be
// within +/- 1 degree of the accurate value without needing
// large slow trig functions like ArcTan() or ArcCos().
// NOTE! at least one of the X or Y values must be non-zero!
// This is the full version, for all 4 quadrants and will generate
// the angle in integer degrees from 0-360.
// Any values of X and Y are usable including negative values provided
// they are between -1456 and 1456 so the 16bit multiply does not overflow.
unsigned char negflag;
unsigned char tempdegree;
unsigned char comp;
unsigned int degree; // this will hold the result
//signed int x; // these hold the XY vector at the start
//signed int y; // (and they will be destroyed)
unsigned int ux;
unsigned int uy;
// Save the sign flags then remove signs and get XY as unsigned ints
negflag = 0;
if(x < 0) {
negflag += 0x01; // x flag bit
x = (0 - x); // is now +
}
ux = x; // copy to unsigned var before multiply
if(y < 0) {
negflag += 0x02; // y flag bit
y = (0 - y); // is now +
}
uy = y; // copy to unsigned var before multiply
// 1. Calc the scaled "degrees"
if(ux > uy) {
degree = (uy * 45) / ux; // degree result will be 0-45 range
negflag += 0x10; // octant flag bit
} else {
degree = (ux * 45) / uy; // degree result will be 0-45 range
}
// 2. Compensate for the 4 degree error curve
comp = 0;
tempdegree = degree; // use an unsigned char for speed!
if(tempdegree > 22) { // if top half of range
if(tempdegree <= 44) comp++;
if(tempdegree <= 41) comp++;
if(tempdegree <= 37) comp++;
if(tempdegree <= 32) comp++; // max is 4 degrees compensated
} else { // else is lower half of range
if(tempdegree >= 2) comp++;
if(tempdegree >= 6) comp++;
if(tempdegree >= 10) comp++;
if(tempdegree >= 15) comp++; // max is 4 degrees compensated
}
degree += comp; // degree is now accurate to +/- 1 degree!
// Invert degree if it was X>Y octant, makes 0-45 into 90-45
if(negflag & 0x10) degree = (90 - degree);
// 3. Degree is now 0-90 range for this quadrant,
// need to invert it for whichever quadrant it was in
if(negflag & 0x02) { // if -Y
if(negflag & 0x01) // if -Y -X
degree = (180 + degree);
else // else is -Y +X
degree = (180 - degree);
} else { // else is +Y
if(negflag & 0x01) // if +Y -X
degree = (360 - degree);
}
return degree;
}
/**********************
* STATIC FUNCTIONS
**********************/
static void ver_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa)
{
lv_area_t area;
lv_area_set(&area, x, y, x, y + len);
fill_fp(&area, mask, color, opa);
}
static void hor_line(lv_coord_t x, lv_coord_t y, const lv_area_t * mask, lv_coord_t len, lv_color_t color, lv_opa_t opa)
{
lv_area_t area;
lv_area_set(&area, x, y, x + len, y);
fill_fp(&area, mask, color, opa);
}
static bool deg_test_norm(uint16_t deg, uint16_t start, uint16_t end)
{
if(deg >= start && deg <= end) return true;
else return false;
}
static bool deg_test_inv(uint16_t deg, uint16_t start, uint16_t end)
{
if(deg >= start || deg <= end) {
return true;
} else return false;
}

View File

@@ -1,759 +0,0 @@
/**
* @file lv_draw_img.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_draw_img.h"
#include "../lv_misc/lv_fs.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask,
const void * src, const lv_style_t * style, lv_opa_t opa_scale);
static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * style);
static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf);
static void lv_img_decoder_close(void);
static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf);
static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf);
/**********************
* STATIC VARIABLES
**********************/
static bool decoder_custom;
static const void * decoder_src;
static lv_img_src_t decoder_src_type;
static lv_img_header_t decoder_header;
static const lv_style_t * decoder_style;
#if USE_LV_FILESYSTEM
static lv_fs_file_t decoder_file;
#endif
#if LV_IMG_CF_INDEXED
static lv_color_t decoder_index_map[256];
#endif
static lv_img_decoder_info_f_t lv_img_decoder_info_custom;
static lv_img_decoder_open_f_t lv_img_decoder_open_custom;
static lv_img_decoder_read_line_f_t lv_img_decoder_read_line_custom;
static lv_img_decoder_close_f_t lv_img_decoder_close_custom;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Draw an image
* @param coords the coordinates of the image
* @param mask the image will be drawn only in this area
* @param src pointer to a lv_color_t array which contains the pixels of the image
* @param style style of the image
* @param opa_scale scale down all opacities by the factor
*/
void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
const void * src, const lv_style_t * style, lv_opa_t opa_scale)
{
if(src == NULL) {
LV_LOG_WARN("Image draw: src is NULL");
lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER);
lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL);
return;
}
lv_res_t res;
res = lv_img_draw_core(coords, mask, src, style, opa_scale);
if(res == LV_RES_INV) {
LV_LOG_WARN("Image draw error");
lv_draw_rect(coords, mask, &lv_style_plain, LV_OPA_COVER);
lv_draw_label(coords, mask, &lv_style_plain, LV_OPA_COVER, "No\ndata", LV_TXT_FLAG_NONE, NULL);
return;
}
}
/**
*
* @param src
* @param header
* @param style
* @return
*/
lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header)
{
header->always_zero = 0;
/*Try to get info with the custom functions first*/
if(lv_img_decoder_info_custom) {
lv_res_t custom_res;
custom_res = lv_img_decoder_info_custom(src, header);
if(custom_res == LV_RES_OK) return LV_RES_OK; /*Custom info has supported this source*/
}
lv_img_src_t src_type = lv_img_src_get_type(src);
if(src_type == LV_IMG_SRC_VARIABLE) {
header->w = ((lv_img_dsc_t *)src)->header.w;
header->h = ((lv_img_dsc_t *)src)->header.h;
header->cf = ((lv_img_dsc_t *)src)->header.cf;
}
#if USE_LV_FILESYSTEM
else if(src_type == LV_IMG_SRC_FILE) {
lv_fs_file_t file;
lv_fs_res_t res;
uint32_t rn;
res = lv_fs_open(&file, src, LV_FS_MODE_RD);
if(res == LV_FS_RES_OK) {
res = lv_fs_read(&file, header, sizeof(lv_img_header_t), &rn);
}
/*Create a dummy header on fs error*/
if(res != LV_FS_RES_OK || rn != sizeof(lv_img_header_t)) {
header->w = LV_DPI;
header->h = LV_DPI;
header->cf = LV_IMG_CF_UNKOWN;
}
lv_fs_close(&file);
}
#endif
else if(src_type == LV_IMG_SRC_SYMBOL) {
/*The size depend on the font but it is unknown here. It should be handled outside of the function*/
header->w = 1;
header->h = 1;
/* Symbols always have transparent parts. Important because of cover check in the design function.
* The actual value doesn't matter because lv_draw_label will draw it*/
header->cf = LV_IMG_CF_ALPHA_1BIT;
} else {
LV_LOG_WARN("Image get info found unknown src type");
return false;
}
return true;
}
uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf)
{
uint8_t px_size = 0;
switch(cf) {
case LV_IMG_CF_UNKOWN:
case LV_IMG_CF_RAW:
px_size = 0;
break;
case LV_IMG_CF_TRUE_COLOR:
case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED:
px_size = LV_COLOR_SIZE;
break;
case LV_IMG_CF_TRUE_COLOR_ALPHA:
px_size = LV_IMG_PX_SIZE_ALPHA_BYTE << 3;
break;
case LV_IMG_CF_INDEXED_1BIT:
case LV_IMG_CF_ALPHA_1BIT:
px_size = 1;
break;
case LV_IMG_CF_INDEXED_2BIT:
case LV_IMG_CF_ALPHA_2BIT:
px_size = 2;
break;
case LV_IMG_CF_INDEXED_4BIT:
case LV_IMG_CF_ALPHA_4BIT:
px_size = 4;
break;
case LV_IMG_CF_INDEXED_8BIT:
case LV_IMG_CF_ALPHA_8BIT:
px_size = 8;
break;
default:
px_size = 0;
break;
}
return px_size;
}
bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf)
{
bool is_chroma_keyed = false;
switch(cf) {
case LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED:
case LV_IMG_CF_RAW_CHROMA_KEYED:
case LV_IMG_CF_INDEXED_1BIT:
case LV_IMG_CF_INDEXED_2BIT:
case LV_IMG_CF_INDEXED_4BIT:
case LV_IMG_CF_INDEXED_8BIT:
is_chroma_keyed = true;
break;
default:
is_chroma_keyed = false;
break;
}
return is_chroma_keyed;
}
bool lv_img_color_format_has_alpha(lv_img_cf_t cf)
{
bool has_alpha = false;
switch(cf) {
case LV_IMG_CF_TRUE_COLOR_ALPHA:
case LV_IMG_CF_RAW_ALPHA:
case LV_IMG_CF_ALPHA_1BIT:
case LV_IMG_CF_ALPHA_2BIT:
case LV_IMG_CF_ALPHA_4BIT:
case LV_IMG_CF_ALPHA_8BIT:
has_alpha = true;
break;
default:
has_alpha = false;
break;
}
return has_alpha;
}
/**
* Get the type of an image source
* @param src pointer to an image source:
* - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code)
* - a path to a file (e.g. "S:/folder/image.bin")
* - or a symbol (e.g. SYMBOL_CLOSE)
* @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKOWN
*/
lv_img_src_t lv_img_src_get_type(const void * src)
{
lv_img_src_t img_src_type = LV_IMG_SRC_UNKNOWN;
if(src == NULL) return img_src_type;
const uint8_t * u8_p = src;
/*The first byte shows the type of the image source*/
if(u8_p[0] >= 0x20 && u8_p[0] <= 0x7F) {
img_src_type = LV_IMG_SRC_FILE; /*If it's an ASCII character then it's file name*/
} else if(u8_p[0] >= 0x80) {
img_src_type = LV_IMG_SRC_SYMBOL; /*Symbols begins after 0x7F*/
} else {
img_src_type = LV_IMG_SRC_VARIABLE; /*`lv_img_dsc_t` is design to the first byte < 0x20*/
}
if (LV_IMG_SRC_UNKNOWN == img_src_type) {
LV_LOG_WARN("lv_img_src_get_type: unknown image type");
}
return img_src_type;
}
/**
* Set custom decoder functions. See the typdefs of the function typed above for more info about them
* @param info_fp info get function
* @param open_fp open function
* @param read_fp read line function
* @param close_fp clode function
*/
void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp,
lv_img_decoder_read_line_f_t read_fp, lv_img_decoder_close_f_t close_fp)
{
lv_img_decoder_info_custom = info_fp;
lv_img_decoder_open_custom = open_fp;
lv_img_decoder_read_line_custom = read_fp;
lv_img_decoder_close_custom = close_fp;
}
/**********************
* STATIC FUNCTIONS
**********************/
static lv_res_t lv_img_draw_core(const lv_area_t * coords, const lv_area_t * mask,
const void * src, const lv_style_t * style, lv_opa_t opa_scale)
{
lv_area_t mask_com; /*Common area of mask and coords*/
bool union_ok;
union_ok = lv_area_intersect(&mask_com, mask, coords);
if(union_ok == false) {
return LV_RES_OK; /*Out of mask. There is nothing to draw so the image is drawn successfully.*/
}
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->image.opa : (uint16_t)((uint16_t) style->image.opa * opa_scale) >> 8;
lv_img_header_t header;
lv_res_t header_res;
header_res = lv_img_dsc_get_info(src, &header);
if(header_res != LV_RES_OK) {
LV_LOG_WARN("Image draw can't get image info");
lv_img_decoder_close();
return LV_RES_INV;
}
bool chroma_keyed = lv_img_color_format_is_chroma_keyed(header.cf);
bool alpha_byte = lv_img_color_format_has_alpha(header.cf);
const uint8_t * img_data = lv_img_decoder_open(src, style);
if(img_data == LV_IMG_DECODER_OPEN_FAIL) {
LV_LOG_WARN("Image draw cannot open the image resource");
lv_img_decoder_close();
return LV_RES_INV;
}
/* The decoder open could open the image and gave the entire uncompressed image.
* Just draw it!*/
if(img_data) {
map_fp(coords, mask, img_data, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense);
}
/* The whole uncompressed image is not available. Try to read it line-by-line*/
else {
lv_coord_t width = lv_area_get_width(&mask_com);
#if LV_COMPILER_VLA_SUPPORTED
uint8_t buf[(lv_area_get_width(&mask_com) * ((LV_COLOR_DEPTH >> 3) + 1))];
#else
uint8_t buf[LV_HOR_RES * ((LV_COLOR_DEPTH >> 3) + 1)]; /*+1 because of the possible alpha byte*/
#endif
lv_area_t line;
lv_area_copy(&line, &mask_com);
lv_area_set_height(&line, 1);
lv_coord_t x = mask_com.x1 - coords->x1;
lv_coord_t y = mask_com.y1 - coords->y1;
lv_coord_t row;
lv_res_t read_res;
for(row = mask_com.y1; row <= mask_com.y2; row++) {
read_res = lv_img_decoder_read_line(x, y, width, buf);
if(read_res != LV_RES_OK) {
lv_img_decoder_close();
LV_LOG_WARN("Image draw can't read the line");
return LV_RES_INV;
}
map_fp(&line, mask, buf, opa, chroma_keyed, alpha_byte, style->image.color, style->image.intense);
line.y1++;
line.y2++;
y++;
}
}
lv_img_decoder_close();
return LV_RES_OK;
}
static const uint8_t * lv_img_decoder_open(const void * src, const lv_style_t * style)
{
decoder_custom = false;
/*Try to open with the custom functions first*/
if(lv_img_decoder_open_custom) {
const uint8_t * custom_res;
custom_res = lv_img_decoder_open_custom(src, style);
if(custom_res != LV_IMG_DECODER_OPEN_FAIL) {
decoder_custom = true; /*Mark that custom decoder function should be used for this img source.*/
return custom_res; /*Custom open supported this source*/
}
}
decoder_src = src;
decoder_style = style;
decoder_src_type = lv_img_src_get_type(src);
lv_res_t header_res;
header_res = lv_img_dsc_get_info(src, &decoder_header);
if(header_res == LV_RES_INV) {
decoder_src = NULL;
decoder_src_type = LV_IMG_SRC_UNKNOWN;
LV_LOG_WARN("Built-in image decoder can't get the header info");
return LV_IMG_DECODER_OPEN_FAIL;
}
/*Open the file if it's a file*/
if(decoder_src_type == LV_IMG_SRC_FILE) {
#if USE_LV_FILESYSTEM
lv_fs_res_t res = lv_fs_open(&decoder_file, src, LV_FS_MODE_RD);
if(res != LV_FS_RES_OK) {
LV_LOG_WARN("Built-in image decoder can't open the file");
return LV_IMG_DECODER_OPEN_FAIL;
}
#else
LV_LOG_WARN("Image built-in decoder can read file because USE_LV_FILESYSTEM = 0");
return LV_IMG_DECODER_OPEN_FAIL;
#endif
}
/*Process the different color formats*/
lv_img_cf_t cf = decoder_header.cf;
if(cf == LV_IMG_CF_TRUE_COLOR ||
cf == LV_IMG_CF_TRUE_COLOR_ALPHA ||
cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
if(decoder_src_type == LV_IMG_SRC_VARIABLE) {
/*In case of uncompressed formats if the image stored in the ROM/RAM simply give it's pointer*/
return ((lv_img_dsc_t *)decoder_src)->data;
} else {
/*If it's file it need to be read line by line later*/
return NULL;
}
} else if(cf == LV_IMG_CF_INDEXED_1BIT ||
cf == LV_IMG_CF_INDEXED_2BIT ||
cf == LV_IMG_CF_INDEXED_4BIT ||
cf == LV_IMG_CF_INDEXED_8BIT) {
#if LV_IMG_CF_INDEXED
#if USE_LV_FILESYSTEM
lv_color32_t palette_file[256];
#endif
lv_color32_t * palette_p = NULL;
uint8_t px_size = lv_img_color_format_get_px_size(cf);
uint32_t palette_size = 1 << px_size;
if(decoder_src_type == LV_IMG_SRC_FILE) {
/*Read the palette from file*/
#if USE_LV_FILESYSTEM
lv_fs_seek(&decoder_file, 4); /*Skip the header*/
lv_fs_read(&decoder_file, palette_file, palette_size * sizeof(lv_color32_t), NULL);
palette_p = palette_file;
#else
LV_LOG_WARN("Image built-in decoder can read the palette because USE_LV_FILESYSTEM = 0");
return LV_IMG_DECODER_OPEN_FAIL;
#endif
} else {
/*The palette begins in the beginning of the image data. Just point to it.*/
palette_p = (lv_color32_t *)((lv_img_dsc_t *)decoder_src)->data;
}
uint32_t i;
for(i = 0; i < palette_size; i++) {
decoder_index_map[i] = LV_COLOR_MAKE(palette_p[i].red, palette_p[i].green, palette_p[i].blue);
}
return NULL;
#else
LV_LOG_WARN("Indexed (palette) images are not enabled in lv_conf.h. See LV_IMG_CF_INDEXED");
return LV_IMG_DECODER_OPEN_FAIL;
#endif
} else if(cf == LV_IMG_CF_ALPHA_1BIT ||
cf == LV_IMG_CF_ALPHA_2BIT ||
cf == LV_IMG_CF_ALPHA_4BIT ||
cf == LV_IMG_CF_ALPHA_8BIT) {
#if LV_IMG_CF_ALPHA
return NULL; /*Nothing to process*/
#else
LV_LOG_WARN("Alpha indexed images are not enabled in lv_conf.h. See LV_IMG_CF_ALPHA");
return LV_IMG_DECODER_OPEN_FAIL;
#endif
} else {
LV_LOG_WARN("Image decoder open: unknown color format")
return LV_IMG_DECODER_OPEN_FAIL;
}
}
static lv_res_t lv_img_decoder_read_line(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf)
{
/*Try to read the line with the custom functions*/
if(decoder_custom) {
if(lv_img_decoder_read_line_custom) {
lv_res_t custom_res;
custom_res = lv_img_decoder_read_line_custom(x, y, len, buf);
return custom_res;
} else {
LV_LOG_WARN("Image open with custom decoder but read not supported")
}
return LV_RES_INV; /*It"s an error if not returned earlier*/
}
if(decoder_src_type == LV_IMG_SRC_FILE) {
#if USE_LV_FILESYSTEM
uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf);
lv_fs_res_t res;
if(decoder_header.cf == LV_IMG_CF_TRUE_COLOR ||
decoder_header.cf == LV_IMG_CF_TRUE_COLOR_ALPHA ||
decoder_header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED) {
uint32_t pos = ((y * decoder_header.w + x) * px_size) >> 3;
pos += 4; /*Skip the header*/
res = lv_fs_seek(&decoder_file, pos);
if(res != LV_FS_RES_OK) {
LV_LOG_WARN("Built-in image decoder seek failed");
return false;
}
uint32_t btr = len * (px_size >> 3);
uint32_t br = 0;
lv_fs_read(&decoder_file, buf, btr, &br);
if(res != LV_FS_RES_OK || btr != br) {
LV_LOG_WARN("Built-in image decoder read failed");
return false;
}
} else if(decoder_header.cf == LV_IMG_CF_ALPHA_1BIT ||
decoder_header.cf == LV_IMG_CF_ALPHA_2BIT ||
decoder_header.cf == LV_IMG_CF_ALPHA_4BIT ||
decoder_header.cf == LV_IMG_CF_ALPHA_8BIT) {
lv_img_built_in_decoder_line_alpha(x, y, len, buf);
} else if(decoder_header.cf == LV_IMG_CF_INDEXED_1BIT ||
decoder_header.cf == LV_IMG_CF_INDEXED_2BIT ||
decoder_header.cf == LV_IMG_CF_INDEXED_4BIT ||
decoder_header.cf == LV_IMG_CF_INDEXED_8BIT) {
lv_img_built_in_decoder_line_indexed(x, y, len, buf);
} else {
LV_LOG_WARN("Built-in image decoder read not supports the color format");
return false;
}
#else
LV_LOG_WARN("Image built-in decoder can't read file because USE_LV_FILESYSTEM = 0");
return false;
#endif
} else if(decoder_src_type == LV_IMG_SRC_VARIABLE) {
const lv_img_dsc_t * img_dsc = decoder_src;
if(img_dsc->header.cf == LV_IMG_CF_ALPHA_1BIT ||
img_dsc->header.cf == LV_IMG_CF_ALPHA_2BIT ||
img_dsc->header.cf == LV_IMG_CF_ALPHA_4BIT ||
img_dsc->header.cf == LV_IMG_CF_ALPHA_8BIT) {
lv_img_built_in_decoder_line_alpha(x, y, len, buf);
} else if(img_dsc->header.cf == LV_IMG_CF_INDEXED_1BIT ||
img_dsc->header.cf == LV_IMG_CF_INDEXED_2BIT ||
img_dsc->header.cf == LV_IMG_CF_INDEXED_4BIT ||
img_dsc->header.cf == LV_IMG_CF_INDEXED_8BIT) {
lv_img_built_in_decoder_line_indexed(x, y, len, buf);
} else {
LV_LOG_WARN("Built-in image decoder not supports the color format");
return false;
}
}
return true;
}
static void lv_img_decoder_close(void)
{
/*Try to close with the custom functions*/
if(decoder_custom) {
if(lv_img_decoder_close_custom) lv_img_decoder_close_custom();
return;
}
/*It was opened with built-in decoder*/
if(decoder_src) {
#if USE_LV_FILESYSTEM
if(decoder_src_type == LV_IMG_SRC_FILE) {
lv_fs_close(&decoder_file);
}
#endif
decoder_src_type = LV_IMG_SRC_UNKNOWN;
decoder_src = NULL;
}
}
static lv_res_t lv_img_built_in_decoder_line_alpha(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf)
{
#if LV_IMG_CF_ALPHA
const lv_opa_t alpha1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/
const lv_opa_t alpha2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/
const lv_opa_t alpha4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/
68, 85, 102, 119,
136, 153, 170, 187,
204, 221, 238, 255
};
/*Simply fill the buffer with the color. Later only the alpha value will be modified.*/
lv_color_t bg_color = decoder_style->image.color;
lv_coord_t i;
for(i = 0; i < len; i++) {
#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = bg_color.full;
#elif LV_COLOR_DEPTH == 16
/*Because of Alpha byte 16 bit color can start on odd address which can cause crash*/
buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE] = bg_color.full & 0xFF;
buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + 1] = (bg_color.full >> 8) & 0xFF;
#elif LV_COLOR_DEPTH == 32
*((uint32_t *)&buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE]) = bg_color.full;
#else
#error "Invalid LV_COLOR_DEPTH. Check it in lv_conf.h"
#endif
}
const lv_opa_t * opa_table = NULL;
uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf);
uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/
lv_coord_t w = 0;
uint32_t ofs = 0;
int8_t pos = 0;
switch(decoder_header.cf) {
case LV_IMG_CF_ALPHA_1BIT:
w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/
if(decoder_header.w & 0x7) w++;
ofs += w * y + (x >> 3); /*First pixel*/
pos = 7 - (x & 0x7);
opa_table = alpha1_opa_table;
break;
case LV_IMG_CF_ALPHA_2BIT:
w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/
if(decoder_header.w & 0x3) w++;
ofs += w * y + (x >> 2); /*First pixel*/
pos = 6 - ((x & 0x3) * 2);
opa_table = alpha2_opa_table;
break;
case LV_IMG_CF_ALPHA_4BIT:
w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/
if(decoder_header.w & 0x1) w++;
ofs += w * y + (x >> 1); /*First pixel*/
pos = 4 - ((x & 0x1) * 4);
opa_table = alpha4_opa_table;
break;
case LV_IMG_CF_ALPHA_8BIT:
w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/
ofs += w * y + x; /*First pixel*/
pos = 0;
break;
}
#if USE_LV_FILESYSTEM
# if LV_COMPILER_VLA_SUPPORTED
uint8_t fs_buf[w];
# else
uint8_t fs_buf[LV_HOR_RES];
# endif
#endif
const uint8_t * data_tmp = NULL;
if(decoder_src_type == LV_IMG_SRC_VARIABLE) {
const lv_img_dsc_t * img_dsc = decoder_src;
data_tmp = img_dsc->data + ofs;
} else {
#if USE_LV_FILESYSTEM
lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/
lv_fs_read(&decoder_file, fs_buf, w, NULL);
data_tmp = fs_buf;
#else
LV_LOG_WARN("Image built-in alpha line reader can't read file because USE_LV_FILESYSTEM = 0");
data_tmp = NULL; /*To avoid warnings*/
return LV_RES_INV;
#endif
}
uint8_t byte_act = 0;
uint8_t val_act;
for(i = 0; i < len; i ++) {
val_act = (data_tmp[byte_act] & (mask << pos)) >> pos;
buf[i * LV_IMG_PX_SIZE_ALPHA_BYTE + LV_IMG_PX_SIZE_ALPHA_BYTE - 1] =
decoder_header.cf == LV_IMG_CF_ALPHA_8BIT ? val_act : opa_table[val_act];
pos -= px_size;
if(pos < 0) {
pos = 8 - px_size;
data_tmp++;
}
}
return LV_RES_OK;
#else
LV_LOG_WARN("Image built-in alpha line reader failed because LV_IMG_CF_ALPHA is 0 in lv_conf.h");
return LV_RES_INV;
#endif
}
static lv_res_t lv_img_built_in_decoder_line_indexed(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf)
{
#if LV_IMG_CF_INDEXED
uint8_t px_size = lv_img_color_format_get_px_size(decoder_header.cf);
uint16_t mask = (1 << px_size) - 1; /*E.g. px_size = 2; mask = 0x03*/
lv_coord_t w = 0;
int8_t pos = 0;
uint32_t ofs = 0;
switch(decoder_header.cf) {
case LV_IMG_CF_INDEXED_1BIT:
w = (decoder_header.w >> 3); /*E.g. w = 20 -> w = 2 + 1*/
if(decoder_header.w & 0x7) w++;
ofs += w * y + (x >> 3); /*First pixel*/
ofs += 8; /*Skip the palette*/
pos = 7 - (x & 0x7);
break;
case LV_IMG_CF_INDEXED_2BIT:
w = (decoder_header.w >> 2); /*E.g. w = 13 -> w = 3 + 1 (bytes)*/
if(decoder_header.w & 0x3) w++;
ofs += w * y + (x >> 2); /*First pixel*/
ofs += 16; /*Skip the palette*/
pos = 6 - ((x & 0x3) * 2);
break;
case LV_IMG_CF_INDEXED_4BIT:
w = (decoder_header.w >> 1); /*E.g. w = 13 -> w = 6 + 1 (bytes)*/
if(decoder_header.w & 0x1) w++;
ofs += w * y + (x >> 1); /*First pixel*/
ofs += 64; /*Skip the palette*/
pos = 4 - ((x & 0x1) * 4);
break;
case LV_IMG_CF_INDEXED_8BIT:
w = decoder_header.w; /*E.g. x = 7 -> w = 7 (bytes)*/
ofs += w * y + x; /*First pixel*/
ofs += 1024; /*Skip the palette*/
pos = 0;
break;
}
#if USE_LV_FILESYSTEM
# if LV_COMPILER_VLA_SUPPORTED
uint8_t fs_buf[w];
# else
uint8_t fs_buf[LV_HOR_RES];
# endif
#endif
const uint8_t * data_tmp = NULL;
if(decoder_src_type == LV_IMG_SRC_VARIABLE) {
const lv_img_dsc_t * img_dsc = decoder_src;
data_tmp = img_dsc->data + ofs;
} else {
#if USE_LV_FILESYSTEM
lv_fs_seek(&decoder_file, ofs + 4); /*+4 to skip the header*/
lv_fs_read(&decoder_file, fs_buf, w, NULL);
data_tmp = fs_buf;
#else
LV_LOG_WARN("Image built-in indexed line reader can't read file because USE_LV_FILESYSTEM = 0");
data_tmp = NULL; /*To avoid warnings*/
return LV_RES_INV;
#endif
}
uint8_t byte_act = 0;
uint8_t val_act;
lv_coord_t i;
lv_color_t * cbuf = (lv_color_t *) buf;
for(i = 0; i < len; i ++) {
val_act = (data_tmp[byte_act] & (mask << pos)) >> pos;
cbuf[i] = decoder_index_map[val_act];
pos -= px_size;
if(pos < 0) {
pos = 8 - px_size;
data_tmp++;
}
}
return LV_RES_OK;
#else
LV_LOG_WARN("Image built-in indexed line reader failed because LV_IMG_CF_INDEXED is 0 in lv_conf.h");
return LV_RES_INV;
#endif
}

View File

@@ -1,167 +0,0 @@
/**
* @file lv_draw_img.h
*
*/
#ifndef LV_DRAW_IMG_H
#define LV_DRAW_IMG_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_draw.h"
#include "../lv_core/lv_obj.h"
/*********************
* DEFINES
*********************/
#define LV_IMG_DECODER_OPEN_FAIL ((void*)(-1))
/**********************
* TYPEDEFS
**********************/
struct _lv_img_t;
typedef struct {
/* The first 8 bit is very important to distinguish the different source types.
* For more info see `lv_img_get_src_type()` in lv_img.c */
uint32_t cf :5; /* Color format: See `lv_img_color_format_t`*/
uint32_t always_zero :3; /*It the upper bits of the first byte. Always zero to look like a non-printable character*/
uint32_t reserved :2; /*Reserved to be used later*/
uint32_t w:11; /*Width of the image map*/
uint32_t h:11; /*Height of the image map*/
} lv_img_header_t;
/*Image color format*/
enum {
LV_IMG_CF_UNKOWN = 0,
LV_IMG_CF_RAW, /*Contains the file as it is. Needs custom decoder function*/
LV_IMG_CF_RAW_ALPHA, /*Contains the file as it is. The image has alpha. Needs custom decoder function*/
LV_IMG_CF_RAW_CHROMA_KEYED, /*Contains the file as it is. The image is chroma keyed. Needs custom decoder function*/
LV_IMG_CF_TRUE_COLOR, /*Color format and depth should match with LV_COLOR settings*/
LV_IMG_CF_TRUE_COLOR_ALPHA, /*Same as `LV_IMG_CF_TRUE_COLOR` but every pixel has an alpha byte*/
LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED, /*Same as `LV_IMG_CF_TRUE_COLOR` but LV_COLOR_TRANSP pixels will be transparent*/
LV_IMG_CF_INDEXED_1BIT, /*Can have 2 different colors in a palette (always chroma keyed)*/
LV_IMG_CF_INDEXED_2BIT, /*Can have 4 different colors in a palette (always chroma keyed)*/
LV_IMG_CF_INDEXED_4BIT, /*Can have 16 different colors in a palette (always chroma keyed)*/
LV_IMG_CF_INDEXED_8BIT, /*Can have 256 different colors in a palette (always chroma keyed)*/
LV_IMG_CF_ALPHA_1BIT, /*Can have one color and it can be drawn or not*/
LV_IMG_CF_ALPHA_2BIT, /*Can have one color but 4 different alpha value*/
LV_IMG_CF_ALPHA_4BIT, /*Can have one color but 16 different alpha value*/
LV_IMG_CF_ALPHA_8BIT, /*Can have one color but 256 different alpha value*/
};
typedef uint8_t lv_img_cf_t;
/* Image header it is compatible with
* the result image converter utility*/
typedef struct
{
lv_img_header_t header;
uint32_t data_size;
const uint8_t * data;
} lv_img_dsc_t;
/* Decoder function definitions */
/**
* Get info from an image and store in the `header`
* @param src the image source. Can be a pointer to a C array or a file name (Use `lv_img_src_get_type` to determine the type)
* @param header store the info here
* @return LV_RES_OK: info written correctly; LV_RES_INV: failed
*/
typedef lv_res_t (*lv_img_decoder_info_f_t)(const void * src, lv_img_header_t * header);
/**
* Open an image for decoding. Prepare it as it is required to read it later
* @param src the image source. Can be a pointer to a C array or a file name (Use `lv_img_src_get_type` to determine the type)
* @param style the style of image (maybe it will be required to determine a color or something)
* @return there are 3 possible return values:
* 1) buffer with the decoded image
* 2) if can decode the whole image NULL. decoder_read_line will be called to read the image line-by-line
* 3) LV_IMG_DECODER_OPEN_FAIL if the image format is unknown to the decoder or an error occurred
*/
typedef const uint8_t * (*lv_img_decoder_open_f_t)(const void * src, const lv_style_t * style);
/**
* Decode `len` pixels starting from the given `x`, `y` coordinates and store them in `buf`.
* Required only if the "open" function can't return with the whole decoded pixel array.
* @param x start x coordinate
* @param y startt y coordinate
* @param len number of pixels to decode
* @param buf a buffer to store the decoded pixels
* @return LV_RES_OK: ok; LV_RES_INV: failed
*/
typedef lv_res_t (*lv_img_decoder_read_line_f_t)(lv_coord_t x, lv_coord_t y, lv_coord_t len, uint8_t * buf);
/**
* Close the pending decoding. Free resources etc.
*/
typedef void (*lv_img_decoder_close_f_t)(void);
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Draw an image
* @param coords the coordinates of the image
* @param mask the image will be drawn only in this area
* @param src pointer to a lv_color_t array which contains the pixels of the image
* @param style style of the image
* @param opa_scale scale down all opacities by the factor
*/
void lv_draw_img(const lv_area_t * coords, const lv_area_t * mask,
const void * src, const lv_style_t * style, lv_opa_t opa_scale);
/**
* Get the type of an image source
* @param src pointer to an image source:
* - pointer to an 'lv_img_t' variable (image stored internally and compiled into the code)
* - a path to a file (e.g. "S:/folder/image.bin")
* - or a symbol (e.g. SYMBOL_CLOSE)
* @return type of the image source LV_IMG_SRC_VARIABLE/FILE/SYMBOL/UNKOWN
*/
lv_img_src_t lv_img_src_get_type(const void * src);
/**
* Set custom decoder functions. See the typdefs of the function typed above for more info about them
* @param info_fp info get function
* @param open_fp open function
* @param read_fp read line function
* @param close_fp clode function
*/
void lv_img_decoder_set_custom(lv_img_decoder_info_f_t info_fp, lv_img_decoder_open_f_t open_fp,
lv_img_decoder_read_line_f_t read_fp, lv_img_decoder_close_f_t close_fp);
lv_res_t lv_img_dsc_get_info(const char * src, lv_img_header_t * header);
uint8_t lv_img_color_format_get_px_size(lv_img_cf_t cf);
bool lv_img_color_format_is_chroma_keyed(lv_img_cf_t cf);
bool lv_img_color_format_has_alpha(lv_img_cf_t cf);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_TEMPL_H*/

View File

@@ -1,264 +0,0 @@
/**
* @file lv_draw_label.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_draw_label.h"
#include "lv_draw_rbasic.h"
#include "../lv_misc/lv_math.h"
/*********************
* DEFINES
*********************/
#define LABEL_RECOLOR_PAR_LENGTH 6
/**********************
* TYPEDEFS
**********************/
enum {
CMD_STATE_WAIT,
CMD_STATE_PAR,
CMD_STATE_IN,
};
typedef uint8_t cmd_state_t;
/**********************
* STATIC PROTOTYPES
**********************/
static uint8_t hex_char_to_num(char hex);
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Write a text
* @param coords coordinates of the label
* @param mask the label will be drawn only in this area
* @param style pointer to a style
* @param opa_scale scale down all opacities by the factor
* @param txt 0 terminated text to write
* @param flag settings for the text from 'txt_flag_t' enum
* @param offset text offset in x and y direction (NULL if unused)
*
*/
void lv_draw_label(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale,
const char * txt, lv_txt_flag_t flag, lv_point_t * offset)
{
const lv_font_t * font = style->text.font;
lv_coord_t w;
if((flag & LV_TXT_FLAG_EXPAND) == 0) {
/*Normally use the label's width as width*/
w = lv_area_get_width(coords);
} else {
/*If EXAPND is enabled then not limit the text's width to the object's width*/
lv_point_t p;
lv_txt_get_size(&p, txt, style->text.font, style->text.letter_space, style->text.line_space, LV_COORD_MAX, flag);
w = p.x;
}
lv_coord_t line_height = lv_font_get_height(font) + style->text.line_space;
/*Init variables for the first line*/
lv_coord_t line_width = 0;
lv_point_t pos;
pos.x = coords->x1;
pos.y = coords->y1;
lv_coord_t x_ofs = 0;
lv_coord_t y_ofs = 0;
if(offset != NULL) {
x_ofs = offset->x;
y_ofs = offset->y;
pos.y += y_ofs;
}
uint32_t line_start = 0;
uint32_t line_end = lv_txt_get_next_line(txt, font, style->text.letter_space, w, flag);
/*Go the first visible line*/
while(pos.y + line_height < mask->y1) {
/*Go to next line*/
line_start = line_end;
line_end += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag);
pos.y += line_height;
if(txt[line_start] == '\0') return;
}
/*Align to middle*/
if(flag & LV_TXT_FLAG_CENTER) {
line_width = lv_txt_get_width(&txt[line_start], line_end - line_start,
font, style->text.letter_space, flag);
pos.x += (lv_area_get_width(coords) - line_width) / 2;
}
/*Align to the right*/
else if(flag & LV_TXT_FLAG_RIGHT) {
line_width = lv_txt_get_width(&txt[line_start], line_end - line_start,
font, style->text.letter_space, flag);
pos.x += lv_area_get_width(coords) - line_width;
}
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->text.opa : (uint16_t)((uint16_t) style->text.opa * opa_scale) >> 8;
cmd_state_t cmd_state = CMD_STATE_WAIT;
uint32_t i;
uint16_t par_start = 0;
lv_color_t recolor;
lv_coord_t letter_w;
/*Real draw need a background color for higher bpp letter*/
#if LV_VDB_SIZE == 0
lv_rletter_set_background(style->body.main_color);
#endif
/*Write out all lines*/
while(txt[line_start] != '\0') {
if(offset != NULL) {
pos.x += x_ofs;
}
/*Write all letter of a line*/
cmd_state = CMD_STATE_WAIT;
i = line_start;
uint32_t letter;
while(i < line_end) {
letter = lv_txt_encoded_next(txt, &i);
/*Handle the re-color command*/
if((flag & LV_TXT_FLAG_RECOLOR) != 0) {
if(letter == (uint32_t)LV_TXT_COLOR_CMD[0]) {
if(cmd_state == CMD_STATE_WAIT) { /*Start char*/
par_start = i;
cmd_state = CMD_STATE_PAR;
continue;
} else if(cmd_state == CMD_STATE_PAR) { /*Other start char in parameter escaped cmd. char */
cmd_state = CMD_STATE_WAIT;
} else if(cmd_state == CMD_STATE_IN) { /*Command end */
cmd_state = CMD_STATE_WAIT;
continue;
}
}
/*Skip the color parameter and wait the space after it*/
if(cmd_state == CMD_STATE_PAR) {
if(letter == ' ') {
/*Get the parameter*/
if(i - par_start == LABEL_RECOLOR_PAR_LENGTH + 1) {
char buf[LABEL_RECOLOR_PAR_LENGTH + 1];
memcpy(buf, &txt[par_start], LABEL_RECOLOR_PAR_LENGTH);
buf[LABEL_RECOLOR_PAR_LENGTH] = '\0';
int r, g, b;
r = (hex_char_to_num(buf[0]) << 4) + hex_char_to_num(buf[1]);
g = (hex_char_to_num(buf[2]) << 4) + hex_char_to_num(buf[3]);
b = (hex_char_to_num(buf[4]) << 4) + hex_char_to_num(buf[5]);
recolor = LV_COLOR_MAKE(r, g, b);
} else {
recolor.full = style->text.color.full;
}
cmd_state = CMD_STATE_IN; /*After the parameter the text is in the command*/
}
continue;
}
}
lv_color_t color = style->text.color;
if(cmd_state == CMD_STATE_IN) color = recolor;
letter_fp(&pos, mask, font, letter, color, opa);
letter_w = lv_font_get_width(font, letter);
if(letter_w > 0){
pos.x += letter_w + style->text.letter_space;
}
}
/*Go to next line*/
line_start = line_end;
line_end += lv_txt_get_next_line(&txt[line_start], font, style->text.letter_space, w, flag);
pos.x = coords->x1;
/*Align to middle*/
if(flag & LV_TXT_FLAG_CENTER) {
line_width = lv_txt_get_width(&txt[line_start], line_end - line_start,
font, style->text.letter_space, flag);
pos.x += (lv_area_get_width(coords) - line_width) / 2;
}
/*Align to the right*/
else if(flag & LV_TXT_FLAG_RIGHT) {
line_width = lv_txt_get_width(&txt[line_start], line_end - line_start,
font, style->text.letter_space, flag);
pos.x += lv_area_get_width(coords) - line_width;
}
/*Go the next line position*/
pos.y += line_height;
if(pos.y > mask->y2) return;
}
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Convert a hexadecimal characters to a number (0..15)
* @param hex Pointer to a hexadecimal character (0..9, A..F)
* @return the numerical value of `hex` or 0 on error
*/
static uint8_t hex_char_to_num(char hex)
{
uint8_t result = 0;
if(hex >= '0' && hex <= '9') {
result = hex - '0';
}
else {
if(hex >= 'a') hex -= 'a' - 'A'; /*Convert to upper case*/
switch(hex) {
case 'A':
result = 10;
break;
case 'B':
result = 11;
break;
case 'C':
result = 12;
break;
case 'D':
result = 13;
break;
case 'E':
result = 14;
break;
case 'F':
result = 15;
break;
default:
result = 0;
break;
}
}
return result;
}

View File

@@ -1,53 +0,0 @@
/**
* @file lv_draw_label.h
*
*/
#ifndef LV_DRAW_LABEL_H
#define LV_DRAW_LABEL_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_draw.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Write a text
* @param coords coordinates of the label
* @param mask the label will be drawn only in this area
* @param style pointer to a style
* @param opa_scale scale down all opacities by the factor
* @param txt 0 terminated text to write
* @param flag settings for the text from 'txt_flag_t' enum
* @param offset text offset in x and y direction (NULL if unused)
*
*/
void lv_draw_label(const lv_area_t * coords,const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale,
const char * txt, lv_txt_flag_t flag, lv_point_t * offset);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_LABEL_H*/

View File

@@ -1,608 +0,0 @@
/**
* @file lv_draw_line.c
*
*/
/*********************
* INCLUDES
*********************/
#include <stdio.h>
#include <stdbool.h>
#include "lv_draw.h"
#include "../lv_misc/lv_math.h"
/*********************
* DEFINES
*********************/
#if LV_COMPILER_VLA_SUPPORTED == 0
#define LINE_MAX_WIDTH 64
#endif
/**********************
* TYPEDEFS
**********************/
typedef struct {
lv_point_t p1;
lv_point_t p2;
lv_point_t p_act;
lv_coord_t dx;
lv_coord_t sx; /*-1: x1 < x2; 1: x2 >= x1*/
lv_coord_t dy;
lv_coord_t sy; /*-1: y1 < y2; 1: y2 >= y1*/
lv_coord_t err;
lv_coord_t e2;
bool hor; /*Rather horizontal or vertical*/
} line_draw_t;
typedef struct {
lv_coord_t width;
lv_coord_t width_1;
lv_coord_t width_half;
} line_width_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale);
static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale);
static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale);
static void line_init(line_draw_t * line, const lv_point_t * p1, const lv_point_t * p2);
static bool line_next(line_draw_t * line);
static bool line_next_y(line_draw_t * line);
static bool line_next_x(line_draw_t * line);
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Draw a line
* @param point1 first point of the line
* @param point2 second point of the line
* @param mask the line will be drawn only on this area
* @param style pointer to a line's style
* @param opa_scale scale down all opacities by the factor
*/
void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * mask,
const lv_style_t * style, lv_opa_t opa_scale)
{
if(style->line.width == 0) return;
if(point1->x == point2->x && point1->y == point2->y) return;
line_draw_t main_line;
lv_point_t p1;
lv_point_t p2;
/*If the line if rather vertical then be sure y1 < y2 else x1 < x2*/
if(LV_MATH_ABS(point1->x - point2->x) > LV_MATH_ABS(point1->y - point2->y)) {
/*Steps less in y then x -> rather horizontal*/
if(point1->x < point2->x) {
p1.x = point1->x;
p1.y = point1->y;
p2.x = point2->x;
p2.y = point2->y;
} else {
p1.x = point2->x;
p1.y = point2->y;
p2.x = point1->x;
p2.y = point1->y;
}
} else {
/*Steps less in x then y -> rather vertical*/
if(point1->y < point2->y) {
p1.x = point1->x;
p1.y = point1->y;
p2.x = point2->x;
p2.y = point2->y;
} else {
p1.x = point2->x;
p1.y = point2->y;
p2.x = point1->x;
p2.y = point1->y;
}
}
line_init(&main_line, &p1, &p2);
/*Special case draw a horizontal line*/
if(main_line.p1.y == main_line.p2.y) {
line_draw_hor(&main_line, mask, style, opa_scale);
}
/*Special case draw a vertical line*/
else if(main_line.p1.x == main_line.p2.x) {
line_draw_ver(&main_line, mask, style, opa_scale);
}
/*Arbitrary skew line*/
else {
bool dir_ori = false;
#if LV_ANTIALIAS
lv_point_t p_tmp;
if(main_line.hor) {
if(main_line.p1.y < main_line.p2.y) {
dir_ori = true;
p_tmp.x = main_line.p2.x;
p_tmp.y = main_line.p2.y - 1;
line_init(&main_line, &p1, &p_tmp);
main_line.sy = LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/
}
else if(main_line.p1.y > main_line.p2.y) {
dir_ori = false;
p_tmp.x = main_line.p2.x;
p_tmp.y = main_line.p2.y + 1;
line_init(&main_line, &p1, &p_tmp);
main_line.sy = -LV_MATH_ABS(main_line.sy); /*The sign can change if the line becomes horizontal*/
}
}
else {
if(main_line.p1.x < main_line.p2.x) {
dir_ori = true;
p_tmp.x = main_line.p2.x - 1;
p_tmp.y = main_line.p2.y;
line_init(&main_line, &p1, &p_tmp);
main_line.sx = LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/
}
else if(main_line.p1.x > main_line.p2.x) {
dir_ori = false;
p_tmp.x = main_line.p2.x + 1;
p_tmp.y = main_line.p2.y;
line_init(&main_line, &p1, &p_tmp);
main_line.sx = -LV_MATH_ABS(main_line.sx); /*The sign can change if the line becomes vertical*/
}
}
#endif
line_draw_skew(&main_line, dir_ori, mask, style, opa_scale);
}
}
/**********************
* STATIC FUNCTIONS
**********************/
static void line_draw_hor(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
{
lv_coord_t width = style->line.width - 1;
lv_coord_t width_half = width >> 1;
lv_coord_t width_1 = width & 0x1;
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8;
lv_area_t act_area;
act_area.x1 = main_line->p1.x;
act_area.x2 = main_line->p2.x;
act_area.y1 = main_line->p1.y - width_half - width_1;
act_area.y2 = main_line->p2.y + width_half ;
lv_area_t draw_area;
draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2);
draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2);
draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2);
draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2);
fill_fp(&draw_area, mask, style->line.color, opa);
}
static void line_draw_ver(line_draw_t * main_line, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
{
lv_coord_t width = style->line.width - 1;
lv_coord_t width_half = width >> 1;
lv_coord_t width_1 = width & 0x1;
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8;
lv_area_t act_area;
act_area.x1 = main_line->p1.x - width_half;
act_area.x2 = main_line->p2.x + width_half + width_1;
act_area.y1 = main_line->p1.y;
act_area.y2 = main_line->p2.y;
lv_area_t draw_area;
draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2);
draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2);
draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2);
draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2);
fill_fp(&draw_area, mask, style->line.color, opa);
}
static void line_draw_skew(line_draw_t * main_line, bool dir_ori, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale)
{
lv_opa_t opa = opa_scale == LV_OPA_COVER ? style->line.opa : (uint16_t)((uint16_t) style->line.opa * opa_scale) >> 8;
lv_point_t vect_main, vect_norm;
vect_main.x = main_line->p2.x - main_line->p1.x;
vect_main.y = main_line->p2.y - main_line->p1.y;
if(main_line->hor) {
if(main_line->p1.y < main_line->p2.y + dir_ori) {
vect_norm.x = - vect_main.y;
vect_norm.y = vect_main.x;
} else {
vect_norm.x = vect_main.y;
vect_norm.y = -vect_main.x;
}
} else {
if(main_line->p1.x < main_line->p2.x + dir_ori) {
vect_norm.x = vect_main.y;
vect_norm.y = - vect_main.x;
} else {
vect_norm.x = - vect_main.y;
vect_norm.y = vect_main.x;
}
}
/* In case of a short but tick line the perpendicular ending is longer then the real line.
* it would break the calculations so make the normal vector larger*/
vect_norm.x = vect_norm.x << 4;
vect_norm.y = vect_norm.y << 4;
lv_coord_t width;
width = style->line.width;
/* The pattern stores the points of the line ending. It has the good direction and length.
* The worth case is the 45° line where pattern can have 1.41 x `width` points*/
#if LV_COMPILER_VLA_SUPPORTED
lv_point_t pattern[width * 2];
#else
lv_point_t pattern[LINE_MAX_WIDTH];
#endif
lv_coord_t i = 0;
/*Create a perpendicular pattern (a small line)*/
if(width != 0) {
line_draw_t pattern_line;
lv_point_t p0 = {0, 0};
line_init(&pattern_line, &p0, &vect_norm);
uint32_t width_sqr = width * width;
/* Run for a lot of times. Meanwhile the real width will be determined as well */
for(i = 0; i < (lv_coord_t)sizeof(pattern); i ++) {
pattern[i].x = pattern_line.p_act.x;
pattern[i].y = pattern_line.p_act.y;
/*Finish the pattern line if it's length equal to the desired width (Use Pythagoras theorem)*/
uint32_t sqr = pattern_line.p_act.x * pattern_line.p_act.x + pattern_line.p_act.y * pattern_line.p_act.y;
if(sqr >= width_sqr) {
width = i;
#if LV_ANTIALIAS
width--;
#endif
break;
}
line_next(&pattern_line);
}
}
#if LV_ANTIALIAS
lv_coord_t width_safe = width;
if(width == 0) width_safe = 1;
lv_coord_t aa_last_corner;
aa_last_corner = 0;
#endif
lv_coord_t x_center_ofs = 0;
lv_coord_t y_center_ofs = 0;
if(width != 0) {
x_center_ofs = pattern[width - 1].x / 2;
y_center_ofs = pattern[width - 1].y / 2;
}
else {
if(main_line->hor && main_line->p1.y >= main_line->p2.y + dir_ori) pattern[0].y --;
if(!main_line->hor && main_line->p1.x >= main_line->p2.x + dir_ori) pattern[0].x --;
}
/* Make the coordinates relative to the center */
for(i = 0; i < width; i++) {
pattern[i].x -= x_center_ofs;
pattern[i].y -= y_center_ofs;
#if LV_ANTIALIAS
if(i != 0) {
if(main_line->hor) {
if(pattern[i - 1].x != pattern[i].x) {
lv_coord_t seg_w = pattern[i].y - pattern[aa_last_corner].y;
if(main_line->sy < 0) {
lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y + seg_w + 1,
seg_w, mask, style->line.color, opa);
lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y + seg_w + 1,
-seg_w, mask, style->line.color, opa);
} else {
lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y,
seg_w, mask, style->line.color, opa);
lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y,
-seg_w, mask, style->line.color, opa);
}
aa_last_corner = i;
}
} else {
if(pattern[i - 1].y != pattern[i].y) {
lv_coord_t seg_w = pattern[i].x - pattern[aa_last_corner].x;
if(main_line->sx < 0) {
lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w + 1, main_line->p1.y + pattern[aa_last_corner].y - 1,
seg_w, mask, style->line.color, opa);
lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w + 1, main_line->p2.y + pattern[aa_last_corner].y + 1,
-seg_w, mask, style->line.color, opa);
} else {
lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, main_line->p1.y + pattern[aa_last_corner].y - 1,
seg_w, mask, style->line.color, opa);
lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, main_line->p2.y + pattern[aa_last_corner].y + 1,
-seg_w, mask, style->line.color, opa);
}
aa_last_corner = i;
}
}
}
#endif
}
#if LV_ANTIALIAS
/*Add the last part of anti-aliasing for the perpendicular ending*/
if(width != 0) { /*Due to rounding error with very thin lines it looks ugly*/
if(main_line->hor) {
lv_coord_t seg_w = pattern[width_safe - 1].y - pattern[aa_last_corner].y;
if(main_line->sy < 0) {
lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y + seg_w,
seg_w + main_line->sy, mask, style->line.color, opa);
lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y + seg_w,
-(seg_w + main_line->sy), mask, style->line.color, opa);
} else {
lv_draw_aa_ver_seg(main_line->p1.x + pattern[aa_last_corner].x - 1, main_line->p1.y + pattern[aa_last_corner].y,
seg_w + main_line->sy, mask, style->line.color, opa);
lv_draw_aa_ver_seg(main_line->p2.x + pattern[aa_last_corner].x + 1, main_line->p2.y + pattern[aa_last_corner].y,
-(seg_w + main_line->sy), mask, style->line.color, opa);
}
} else {
lv_coord_t seg_w = pattern[width_safe - 1].x - pattern[aa_last_corner].x;
if(main_line->sx < 0) {
lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x + seg_w, main_line->p1.y + pattern[aa_last_corner].y - 1,
seg_w + main_line->sx, mask, style->line.color, opa);
lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x + seg_w, main_line->p2.y + pattern[aa_last_corner].y + 1,
-(seg_w + main_line->sx), mask, style->line.color, opa);
} else {
lv_draw_aa_hor_seg(main_line->p1.x + pattern[aa_last_corner].x, main_line->p1.y + pattern[aa_last_corner].y - 1,
seg_w + main_line->sx, mask, style->line.color, opa);
lv_draw_aa_hor_seg(main_line->p2.x + pattern[aa_last_corner].x, main_line->p2.y + pattern[aa_last_corner].y + 1,
-(seg_w + main_line->sx), mask, style->line.color, opa);
}
}
}
#endif
#if LV_ANTIALIAS
/*Shift the anti aliasing on the edges (-1, 1 or 0 (zero only in case width == 0))*/
lv_coord_t aa_shift1;
lv_coord_t aa_shift2;
if(main_line->hor == false) {
if(main_line->sx < 0) {
aa_shift1 = -1;
aa_shift2 = width == 0 ? 0 : aa_shift1;
} else {
aa_shift2 = 1;
aa_shift1 = width == 0 ? 0 : aa_shift2;
}
} else {
if(main_line->sy < 0) {
aa_shift1 = -1;
aa_shift2 = width == 0 ? 0 : aa_shift1;
} else {
aa_shift2 = 1;
aa_shift1 = width == 0 ? 0 : aa_shift2;
}
}
#endif
volatile lv_point_t prev_p;
prev_p.x = main_line->p1.x;
prev_p.y = main_line->p1.y;
lv_area_t draw_area;
bool first_run = true;
if(main_line->hor) {
while(line_next_y(main_line)) {
for(i = 0; i < width; i++) {
draw_area.x1 = prev_p.x + pattern[i].x;
draw_area.y1 = prev_p.y + pattern[i].y;
draw_area.x2 = draw_area.x1 + main_line->p_act.x - prev_p.x - 1;
draw_area.y2 = draw_area.y1;
fill_fp(&draw_area, mask, style->line.color, opa);
/* Fill the gaps
* When stepping in y one pixel remains empty on every corner (don't do this on the first segment ) */
if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) {
px_fp(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa);
}
}
#if LV_ANTIALIAS
lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1,
-(main_line->p_act.x - prev_p.x), mask, style->line.color, opa);
lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2,
main_line->p_act.x - prev_p.x, mask, style->line.color, opa);
#endif
first_run = false;
prev_p.x = main_line->p_act.x;
prev_p.y = main_line->p_act.y;
}
for(i = 0; i < width; i++) {
draw_area.x1 = prev_p.x + pattern[i].x;
draw_area.y1 = prev_p.y + pattern[i].y;
draw_area.x2 = draw_area.x1 + main_line->p_act.x - prev_p.x;
draw_area.y2 = draw_area.y1;
fill_fp(&draw_area, mask, style->line.color, opa);
/* Fill the gaps
* When stepping in y one pixel remains empty on every corner */
if(i != 0 && pattern[i].x != pattern[i - 1].x && !first_run) {
px_fp(draw_area.x1, draw_area.y1 - main_line->sy, mask, style->line.color, opa);
}
}
#if LV_ANTIALIAS
lv_draw_aa_hor_seg(prev_p.x + pattern[0].x, prev_p.y + pattern[0].y - aa_shift1,
-(main_line->p_act.x - prev_p.x + 1), mask, style->line.color, opa);
lv_draw_aa_hor_seg(prev_p.x + pattern[width_safe - 1].x, prev_p.y + pattern[width_safe - 1].y + aa_shift2,
main_line->p_act.x - prev_p.x + 1, mask, style->line.color, opa);
#endif
}
/*Rather a vertical line*/
else {
while(line_next_x(main_line)) {
for(i = 0; i < width; i++) {
draw_area.x1 = prev_p.x + pattern[i].x;
draw_area.y1 = prev_p.y + pattern[i].y;
draw_area.x2 = draw_area.x1;
draw_area.y2 = draw_area.y1 + main_line->p_act.y - prev_p.y - 1;
fill_fp(&draw_area, mask, style->line.color, opa);
/* Fill the gaps
* When stepping in x one pixel remains empty on every corner (don't do this on the first segment ) */
if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) {
px_fp(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa);
}
}
#if LV_ANTIALIAS
lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y,
-(main_line->p_act.y - prev_p.y), mask, style->line.color, opa);
lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y,
main_line->p_act.y - prev_p.y, mask, style->line.color, opa);
#endif
first_run = false;
prev_p.x = main_line->p_act.x;
prev_p.y = main_line->p_act.y;
}
/*Draw the last part*/
for(i = 0; i < width; i++) {
draw_area.x1 = prev_p.x + pattern[i].x;
draw_area.y1 = prev_p.y + pattern[i].y;
draw_area.x2 = draw_area.x1;
draw_area.y2 = draw_area.y1 + main_line->p_act.y - prev_p.y;
fill_fp(&draw_area, mask, style->line.color, opa);
/* Fill the gaps
* When stepping in x one pixel remains empty on every corner */
if(i != 0 && pattern[i].y != pattern[i - 1].y && !first_run) {
px_fp(draw_area.x1 - main_line->sx, draw_area.y1, mask, style->line.color, opa);
}
}
#if LV_ANTIALIAS
lv_draw_aa_ver_seg(prev_p.x + pattern[0].x - aa_shift1, prev_p.y + pattern[0].y,
-(main_line->p_act.y - prev_p.y + 1), mask, style->line.color, opa);
lv_draw_aa_ver_seg(prev_p.x + pattern[width_safe - 1].x + aa_shift2, prev_p.y + pattern[width_safe - 1].y,
main_line->p_act.y - prev_p.y + 1, mask, style->line.color, opa);
#endif
}
}
static void line_init(line_draw_t * line, const lv_point_t * p1, const lv_point_t * p2)
{
line->p1.x = p1->x;
line->p1.y = p1->y;
line->p2.x = p2->x;
line->p2.y = p2->y;
line->dx = LV_MATH_ABS(line->p2.x - line->p1.x);
line->sx = line->p1.x < line->p2.x ? 1 : -1;
line->dy = LV_MATH_ABS(line->p2.y - line->p1.y);
line->sy = line->p1.y < line->p2.y ? 1 : -1;
line->err = (line->dx > line->dy ? line->dx : -line->dy) / 2;
line->e2 = 0;
line->hor = line->dx > line->dy ? true : false; /*Rather horizontal or vertical*/
line->p_act.x = line->p1.x;
line->p_act.y = line->p1.y;
}
static bool line_next(line_draw_t * line)
{
if(line->p_act.x == line->p2.x && line->p_act.y == line->p2.y) return false;
line->e2 = line->err;
if(line->e2 > -line->dx) {
line->err -= line->dy;
line->p_act.x += line->sx;
}
if(line->e2 < line->dy) {
line->err += line->dx;
line->p_act.y += line->sy;
}
return true;
}
/**
* Iterate until step one in y direction.
* @param line
* @return
*/
static bool line_next_y(line_draw_t * line)
{
lv_coord_t last_y = line->p_act.y;
do {
if(!line_next(line)) return false;
} while(last_y == line->p_act.y);
return true;
}
/**
* Iterate until step one in x direction.
* @param line
* @return
*/
static bool line_next_x(line_draw_t * line)
{
lv_coord_t last_x = line->p_act.x;
do {
if(!line_next(line)) return false;
} while(last_x == line->p_act.x);
return true;
}

View File

@@ -1,49 +0,0 @@
/**
* @file lv_draw_line.h
*
*/
#ifndef LV_DRAW_LINE_H
#define LV_DRAW_LINE_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Draw a line
* @param point1 first point of the line
* @param point2 second point of the line
* @param mask the line will be drawn only on this area
* @param style pointer to a line's style
* @param opa_scale scale down all opacities by the factor
*/
void lv_draw_line(const lv_point_t * point1, const lv_point_t * point2, const lv_area_t * mask,
const lv_style_t * style, lv_opa_t opa_scale);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_LINE_H*/

View File

@@ -1,269 +0,0 @@
/**
* @file lv_draw_rbasic.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_draw_rbasic.h"
#if USE_LV_REAL_DRAW != 0
#include "../lv_hal/lv_hal_disp.h"
#include "../lv_misc/lv_font.h"
#include "lv_draw.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
static lv_color_t letter_bg_color;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Put a pixel to the display
* @param x x coordinate of the pixel
* @param y y coordinate of the pixel
* @param mask_p the pixel will be drawn on this area
* @param color color of the pixel
* @param opa opacity (ignored, only for compatibility with lv_vpx)
*/
void lv_rpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa)
{
(void)opa; /*Opa is used only for compatibility with lv_vpx*/
lv_area_t area;
area.x1 = x;
area.y1 = y;
area.x2 = x;
area.y2 = y;
lv_rfill(&area, mask_p, color, LV_OPA_COVER);
}
/**
* Fill an area on the display
* @param cords_p coordinates of the area to fill
* @param mask_p fill only o this mask
* @param color fill color
* @param opa opacity (ignored, only for compatibility with lv_vfill)
*/
void lv_rfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
lv_color_t color, lv_opa_t opa)
{
(void)opa; /*Opa is used only for compatibility with lv_vfill*/
lv_area_t masked_area;
bool union_ok = true;
if(mask_p != NULL) {
union_ok = lv_area_intersect(&masked_area, cords_p, mask_p);
} else {
lv_area_t scr_area;
lv_area_set(&scr_area, 0, 0, LV_HOR_RES - 1, LV_VER_RES - 1);
union_ok = lv_area_intersect(&masked_area, cords_p, &scr_area);
}
if(union_ok != false) {
lv_disp_fill(masked_area.x1, masked_area.y1, masked_area.x2, masked_area.y2, color);
}
}
/**
* Draw a letter to the display
* @param pos_p left-top coordinate of the latter
* @param mask_p the letter will be drawn only on this area
* @param font_p pointer to font
* @param letter a letter to draw
* @param color color of letter
* @param opa opacity of letter (ignored, only for compatibility with lv_vletter)
*/
void lv_rletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
const lv_font_t * font_p, uint32_t letter,
lv_color_t color, lv_opa_t opa)
{
(void)opa; /*Opa is used only for compatibility with lv_vletter*/
static uint8_t bpp1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/
static uint8_t bpp2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/
static uint8_t bpp4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/
68, 85, 102, 119,
136, 153, 170, 187,
204, 221, 238, 255
};
if(font_p == NULL) return;
uint8_t letter_w = lv_font_get_width(font_p, letter);
uint8_t letter_h = lv_font_get_height(font_p);
uint8_t bpp = lv_font_get_bpp(font_p, letter); /*Bit per pixel (1,2, 4 or 8)*/
uint8_t * bpp_opa_table;
uint8_t mask_init;
uint8_t mask;
switch(bpp) {
case 1:
bpp_opa_table = bpp1_opa_table;
mask_init = 0x80;
break;
case 2:
bpp_opa_table = bpp2_opa_table;
mask_init = 0xC0;
break;
case 4:
bpp_opa_table = bpp4_opa_table;
mask_init = 0xF0;
break;
case 8:
bpp_opa_table = NULL;
mask_init = 0xFF;
break; /*No opa table, pixel value will be used directly*/
default:
return; /*Invalid bpp. Can't render the letter*/
}
const uint8_t * map_p = lv_font_get_bitmap(font_p, letter);
if(map_p == NULL) return;
/*If the letter is completely out of mask don't draw it */
if(pos_p->x + letter_w < mask_p->x1 || pos_p->x > mask_p->x2 ||
pos_p->y + letter_h < mask_p->y1 || pos_p->y > mask_p->y2) return;
lv_coord_t col, row;
uint8_t col_bit;
uint8_t col_byte_cnt;
uint8_t width_byte_scr = letter_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/
if(letter_w & 0x7) width_byte_scr++;
uint8_t width_byte_bpp = (letter_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/
if((letter_w * bpp) & 0x7) width_byte_bpp++;
/* Calculate the col/row start/end on the map*/
lv_coord_t col_start = pos_p->x >= mask_p->x1 ? 0 : mask_p->x1 - pos_p->x;
lv_coord_t col_end = pos_p->x + letter_w <= mask_p->x2 ? letter_w : mask_p->x2 - pos_p->x + 1;
lv_coord_t row_start = pos_p->y >= mask_p->y1 ? 0 : mask_p->y1 - pos_p->y;
lv_coord_t row_end = pos_p->y + letter_h <= mask_p->y2 ? letter_h : mask_p->y2 - pos_p->y + 1;
/*Move on the map too*/
map_p += (row_start * width_byte_bpp) + ((col_start * bpp) >> 3);
uint8_t letter_px;
for(row = row_start; row < row_end; row ++) {
col_byte_cnt = 0;
col_bit = (col_start * bpp) % 8;
mask = mask_init >> col_bit;
for(col = col_start; col < col_end; col ++) {
letter_px = (*map_p & mask) >> (8 - col_bit - bpp);
if(letter_px != 0) {
lv_rpx(pos_p->x + col, pos_p->y + row, mask_p, lv_color_mix(color, letter_bg_color, bpp == 8 ? letter_px : bpp_opa_table[letter_px]), LV_OPA_COVER);
}
if(col_bit < 8 - bpp) {
col_bit += bpp;
mask = mask >> bpp;
} else {
col_bit = 0;
col_byte_cnt ++;
mask = mask_init;
map_p ++;
}
}
map_p += (width_byte_bpp) - col_byte_cnt;
}
}
/**
* When the letter is ant-aliased it needs to know the background color
* @param bg_color the background color of the currently drawn letter
*/
void lv_rletter_set_background(lv_color_t color)
{
letter_bg_color = color;
}
/**
* Draw a color map to the display (image)
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area
* @param map_p pointer to a lv_color_t array
* @param opa opacity of the map (ignored, only for compatibility with 'lv_vmap')
* @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels
* @param alpha_byte true: extra alpha byte is inserted for every pixel (not supported, only l'v_vmap' can draw it)
* @param recolor mix the pixels with this color
* @param recolor_opa the intense of recoloring
*/
void lv_rmap(const lv_area_t * cords_p, const lv_area_t * mask_p,
const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte,
lv_color_t recolor, lv_opa_t recolor_opa)
{
if(alpha_byte) return; /*Pixel level opacity i not supported in real map drawing*/
(void)opa; /*opa is used only for compatibility with lv_vmap*/
lv_area_t masked_a;
bool union_ok;
union_ok = lv_area_intersect(&masked_a, cords_p, mask_p);
/*If there are common part of the mask and map then draw the map*/
if(union_ok == false) return;
/*Go to the first pixel*/
lv_coord_t map_width = lv_area_get_width(cords_p);
map_p += (masked_a.y1 - cords_p->y1) * map_width * sizeof(lv_color_t);
map_p += (masked_a.x1 - cords_p->x1) * sizeof(lv_color_t);
lv_coord_t row;
if(recolor_opa == LV_OPA_TRANSP && chroma_key == false) {
lv_coord_t mask_w = lv_area_get_width(&masked_a) - 1;
for(row = masked_a.y1; row <= masked_a.y2; row++) {
lv_disp_map(masked_a.x1, row, masked_a.x1 + mask_w, row, (lv_color_t *)map_p);
map_p += map_width * sizeof(lv_color_t); /*Next row on the map*/
}
} else {
lv_color_t chroma_key_color = LV_COLOR_TRANSP;
lv_coord_t col;
for(row = masked_a.y1; row <= masked_a.y2; row++) {
for(col = masked_a.x1; col <= masked_a.x2; col++) {
lv_color_t * px_color = (lv_color_t *) &map_p[(uint32_t)(col - masked_a.x1) * sizeof(lv_color_t)];
if(chroma_key && chroma_key_color.full == px_color->full) continue;
if(recolor_opa != LV_OPA_TRANSP) {
lv_color_t recolored_px = lv_color_mix(recolor, *px_color, recolor_opa);
lv_rpx(col, row, mask_p, recolored_px, LV_OPA_COVER);
} else {
lv_rpx(col, row, mask_p, *px_color, LV_OPA_COVER);
}
}
map_p += map_width * sizeof(lv_color_t); /*Next row on the map*/
}
}
}
/**********************
* STATIC FUNCTIONS
**********************/
#endif /*USE_LV_REAL_DRAW*/

View File

@@ -1,96 +0,0 @@
/**
* @file lv_draw_rbasic..h
*
*/
#ifndef LV_DRAW_RBASIC_H
#define LV_DRAW_RBASIC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#if USE_LV_REAL_DRAW != 0
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_font.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_rpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa);
/**
* Fill an area on the display
* @param cords_p coordinates of the area to fill
* @param mask_p fill only o this mask
* @param color fill color
* @param opa opacity (ignored, only for compatibility with lv_vfill)
*/
void lv_rfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
lv_color_t color, lv_opa_t opa);
/**
* Draw a letter to the display
* @param pos_p left-top coordinate of the latter
* @param mask_p the letter will be drawn only on this area
* @param font_p pointer to font
* @param letter a letter to draw
* @param color color of letter
* @param opa opacity of letter (ignored, only for compatibility with lv_vletter)
*/
void lv_rletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
const lv_font_t * font_p, uint32_t letter,
lv_color_t color, lv_opa_t opa);
/**
* When the letter is ant-aliased it needs to know the background color
* @param bg_color the background color of the currently drawn letter
*/
void lv_rletter_set_background(lv_color_t color);
/**
* Draw a color map to the display (image)
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area
* @param map_p pointer to a lv_color_t array
* @param opa opacity of the map (ignored, only for compatibility with 'lv_vmap')
* @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels
* @param alpha_byte true: extra alpha byte is inserted for every pixel (not supported, only l'v_vmap' can draw it)
* @param recolor mix the pixels with this color
* @param recolor_opa the intense of recoloring
*/
void lv_rmap(const lv_area_t * cords_p, const lv_area_t * mask_p,
const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte,
lv_color_t recolor, lv_opa_t recolor_opa);
/**********************
* MACROS
**********************/
#endif /*USE_LV_REAL_DRAW*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_RBASIC_H*/

File diff suppressed because it is too large Load Diff

View File

@@ -1,48 +0,0 @@
/**
* @file lv_draw_rect.h
*
*/
#ifndef LV_DRAW_RECT_H
#define LV_DRAW_RECT_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_draw.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Draw a rectangle
* @param coords the coordinates of the rectangle
* @param mask the rectangle will be drawn only in this mask
* @param style pointer to a style
* @param opa_scale scale down all opacities by the factor
*/
void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_style_t * style, lv_opa_t opa_scale);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_RECT_H*/

View File

@@ -1,168 +0,0 @@
/**
* @file lv_draw_triangle.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_draw_triangle.h"
#include "../lv_misc/lv_math.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
static void point_swap(lv_point_t * p1, lv_point_t * p2);
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
#if USE_LV_TRIANGLE != 0
/**
*
* @param points pointer to an array with 3 points
* @param mask the triangle will be drawn only in this mask
* @param color color of the triangle
*/
void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color)
{
lv_point_t tri[3];
memcpy(tri, points, sizeof(tri));
/*Sort the vertices according to their y coordinate (0: y max, 1: y mid, 2:y min)*/
if(tri[1].y < tri[0].y) point_swap(&tri[1], &tri[0]);
if(tri[2].y < tri[1].y) point_swap(&tri[2], &tri[1]);
if(tri[1].y < tri[0].y) point_swap(&tri[1], &tri[0]);
/*Return is the triangle is degenerated*/
if(tri[0].x == tri[1].x && tri[0].y == tri[1].y) return;
if(tri[1].x == tri[2].x && tri[1].y == tri[2].y) return;
if(tri[0].x == tri[2].x && tri[0].y == tri[2].y) return;
if(tri[0].x == tri[1].x && tri[1].x == tri[2].x) return;
if(tri[0].y == tri[1].y && tri[1].y == tri[2].y) return;
/*Draw the triangle*/
lv_point_t edge1;
lv_coord_t dx1 = LV_MATH_ABS(tri[0].x - tri[1].x);
lv_coord_t sx1 = tri[0].x < tri[1].x ? 1 : -1;
lv_coord_t dy1 = LV_MATH_ABS(tri[0].y - tri[1].y);
lv_coord_t sy1 = tri[0].y < tri[1].y ? 1 : -1;
lv_coord_t err1 = (dx1 > dy1 ? dx1 : -dy1) / 2;
lv_coord_t err_tmp1;
lv_point_t edge2;
lv_coord_t dx2 = LV_MATH_ABS(tri[0].x - tri[2].x);
lv_coord_t sx2 = tri[0].x < tri[2].x ? 1 : -1;
lv_coord_t dy2 = LV_MATH_ABS(tri[0].y - tri[2].y);
lv_coord_t sy2 = tri[0].y < tri[2].y ? 1 : -1;
lv_coord_t err2 = (dx1 > dy2 ? dx2 : -dy2) / 2;
lv_coord_t err_tmp2;
lv_coord_t y1_tmp;
lv_coord_t y2_tmp;
edge1.x = tri[0].x;
edge1.y = tri[0].y;
edge2.x = tri[0].x;
edge2.y = tri[0].y;
lv_area_t act_area;
lv_area_t draw_area;
while(1) {
act_area.x1 = edge1.x;
act_area.x2 = edge2.x ;
act_area.y1 = edge1.y;
act_area.y2 = edge2.y ;
draw_area.x1 = LV_MATH_MIN(act_area.x1, act_area.x2);
draw_area.x2 = LV_MATH_MAX(act_area.x1, act_area.x2);
draw_area.y1 = LV_MATH_MIN(act_area.y1, act_area.y2);
draw_area.y2 = LV_MATH_MAX(act_area.y1, act_area.y2);
draw_area.x2--; /*Do not draw most right pixel because it will be drawn by the adjacent triangle*/
fill_fp(&draw_area, mask, color, LV_OPA_50);
/*Calc. the next point of edge1*/
y1_tmp = edge1.y;
do {
if(edge1.x == tri[1].x && edge1.y == tri[1].y) {
dx1 = LV_MATH_ABS(tri[1].x - tri[2].x);
sx1 = tri[1].x < tri[2].x ? 1 : -1;
dy1 = LV_MATH_ABS(tri[1].y - tri[2].y);
sy1 = tri[1].y < tri[2].y ? 1 : -1;
err1 = (dx1 > dy1 ? dx1 : -dy1) / 2;
} else if(edge1.x == tri[2].x && edge1.y == tri[2].y) return;
err_tmp1 = err1;
if(err_tmp1 > -dx1) {
err1 -= dy1;
edge1.x += sx1;
}
if(err_tmp1 < dy1) {
err1 += dx1;
edge1.y += sy1;
}
} while(edge1.y == y1_tmp);
/*Calc. the next point of edge2*/
y2_tmp = edge2.y;
do {
if(edge2.x == tri[2].x && edge2.y == tri[2].y) return;
err_tmp2 = err2;
if(err_tmp2 > -dx2) {
err2 -= dy2;
edge2.x += sx2;
}
if(err_tmp2 < dy2) {
err2 += dx2;
edge2.y += sy2;
}
} while(edge2.y == y2_tmp);
}
}
#endif
/**********************
* STATIC FUNCTIONS
**********************/
#if USE_LV_TRIANGLE != 0
/**
* Swap two points
* p1 pointer to the first point
* p2 pointer to the second point
*/
static void point_swap(lv_point_t * p1, lv_point_t * p2)
{
lv_point_t tmp;
tmp.x = p1->x;
tmp.y = p1->y;
p1->x = p2->x;
p1->y = p2->y;
p2->x = tmp.x;
p2->y = tmp.y;
}
#endif

View File

@@ -1,51 +0,0 @@
/**
* @file lv_draw_triangle.h
*
*/
#ifndef LV_DRAW_TRIANGLE_H
#define LV_DRAW_TRIANGLE_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_draw.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/*Experimental use for 3D modeling*/
#define USE_LV_TRIANGLE 1
#if USE_LV_TRIANGLE != 0
/**
*
* @param points pointer to an array with 3 points
* @param mask the triangle will be drawn only in this mask
* @param color color of the triangle
*/
void lv_draw_triangle(const lv_point_t * points, const lv_area_t * mask, lv_color_t color);
#endif
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_TRIANGLE_H*/

View File

@@ -1,692 +0,0 @@
/**
* @file lv_vdraw.c
*
*/
#include "lv_draw_vbasic.h"
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "../lv_hal/lv_hal_disp.h"
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_font.h"
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_log.h"
#if LV_VDB_SIZE != 0
#include <stddef.h>
#include "../lv_core/lv_vdb.h"
#include "lv_draw.h"
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
#define VFILL_HW_ACC_SIZE_LIMIT 50 /*Always fill < 50 px with 'sw_color_fill' because of the hw. init overhead*/
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa);
#if LV_COLOR_SCREEN_TRANSP
static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa);
#endif
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Put a pixel in the Virtual Display Buffer
* @param x pixel x coordinate
* @param y pixel y coordinate
* @param mask_p fill only on this mask (truncated to VDB area)
* @param color pixel color
* @param opa opacity of the area (0..255)
*/
void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa)
{
if(opa < LV_OPA_MIN) return;
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
lv_vdb_t * vdb_p = lv_vdb_get();
if(!vdb_p) {
LV_LOG_WARN("Invalid VDB pointer");
return;
}
/*Pixel out of the mask*/
if(x < mask_p->x1 || x > mask_p->x2 ||
y < mask_p->y1 || y > mask_p->y2) {
return;
}
uint32_t vdb_width = lv_area_get_width(&vdb_p->area);
/*Make the coordinates relative to VDB*/
x -= vdb_p->area.x1;
y -= vdb_p->area.y1;
lv_disp_t * disp = lv_disp_get_active();
if(disp->driver.vdb_wr) {
disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, x, y, color, opa);
} else {
lv_color_t * vdb_px_p = vdb_p->buf + y * vdb_width + x;
#if LV_COLOR_SCREEN_TRANSP == 0
if(opa == LV_OPA_COVER) {
*vdb_px_p = color;
} else {
*vdb_px_p = lv_color_mix(color, *vdb_px_p, opa);
}
#else
*vdb_px_p = color_mix_2_alpha(*vdb_px_p, (*vdb_px_p).alpha, color, opa);
#endif
}
}
/**
* Fill an area in the Virtual Display Buffer
* @param cords_p coordinates of the area to fill
* @param mask_p fill only o this mask (truncated to VDB area)
* @param color fill color
* @param opa opacity of the area (0..255)
*/
void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
lv_color_t color, lv_opa_t opa)
{
if(opa < LV_OPA_MIN) return;
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
lv_area_t res_a;
bool union_ok;
lv_vdb_t * vdb_p = lv_vdb_get();
if(!vdb_p) {
LV_LOG_WARN("Invalid VDB pointer");
return;
}
/*Get the union of cord and mask*/
/* The mask is already truncated to the vdb size
* in 'lv_refr_area_with_vdb' function */
union_ok = lv_area_intersect(&res_a, cords_p, mask_p);
/*If there are common part of the three area then draw to the vdb*/
if(union_ok == false) return;
lv_area_t vdb_rel_a; /*Stores relative coordinates on vdb*/
vdb_rel_a.x1 = res_a.x1 - vdb_p->area.x1;
vdb_rel_a.y1 = res_a.y1 - vdb_p->area.y1;
vdb_rel_a.x2 = res_a.x2 - vdb_p->area.x1;
vdb_rel_a.y2 = res_a.y2 - vdb_p->area.y1;
lv_color_t * vdb_buf_tmp = vdb_p->buf;
uint32_t vdb_width = lv_area_get_width(&vdb_p->area);
/*Move the vdb_tmp to the first row*/
vdb_buf_tmp += vdb_width * vdb_rel_a.y1;
#if USE_LV_GPU
static LV_ATTRIBUTE_MEM_ALIGN lv_color_t color_array_tmp[LV_HOR_RES]; /*Used by 'lv_disp_mem_blend'*/
static lv_coord_t last_width = -1;
lv_coord_t w = lv_area_get_width(&vdb_rel_a);
/*Don't use hw. acc. for every small fill (because of the init overhead)*/
if(w < VFILL_HW_ACC_SIZE_LIMIT) {
sw_color_fill(&vdb_p->area, vdb_p->buf, &vdb_rel_a, color, opa);
}
/*Not opaque fill*/
else if(opa == LV_OPA_COVER) {
/*Use hw fill if present*/
if(lv_disp_is_mem_fill_supported()) {
lv_coord_t row;
for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) {
lv_disp_mem_fill(&vdb_buf_tmp[vdb_rel_a.x1], w, color);
vdb_buf_tmp += vdb_width;
}
}
/*Use hw blend if present and the area is not too small*/
else if(lv_area_get_height(&vdb_rel_a) > VFILL_HW_ACC_SIZE_LIMIT &&
lv_disp_is_mem_blend_supported()) {
/*Fill a one line sized buffer with a color and blend this later*/
if(color_array_tmp[0].full != color.full || last_width != w) {
uint16_t i;
for(i = 0; i < w; i++) {
color_array_tmp[i].full = color.full;
}
last_width = w;
}
/*Blend the filled line to every line VDB line-by-line*/
lv_coord_t row;
for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) {
lv_disp_mem_blend(&vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa);
vdb_buf_tmp += vdb_width;
}
}
/*Else use sw fill if no better option*/
else {
sw_color_fill(&vdb_p->area, vdb_p->buf, &vdb_rel_a, color, opa);
}
}
/*Fill with opacity*/
else {
/*Use hw blend if present*/
if(lv_disp_is_mem_blend_supported()) {
if(color_array_tmp[0].full != color.full || last_width != w) {
uint16_t i;
for(i = 0; i < w; i++) {
color_array_tmp[i].full = color.full;
}
last_width = w;
}
lv_coord_t row;
for(row = vdb_rel_a.y1; row <= vdb_rel_a.y2; row++) {
lv_disp_mem_blend(&vdb_buf_tmp[vdb_rel_a.x1], color_array_tmp, w, opa);
vdb_buf_tmp += vdb_width;
}
}
/*Use sw fill with opa if no better option*/
else {
sw_color_fill(&vdb_p->area, vdb_p->buf, &vdb_rel_a, color, opa);
}
}
#else
sw_color_fill(&vdb_p->area, vdb_p->buf, &vdb_rel_a, color, opa);
#endif
}
/**
* Draw a letter in the Virtual Display Buffer
* @param pos_p left-top coordinate of the latter
* @param mask_p the letter will be drawn only on this area (truncated to VDB area)
* @param font_p pointer to font
* @param letter a letter to draw
* @param color color of letter
* @param opa opacity of letter (0..255)
*/
void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
const lv_font_t * font_p, uint32_t letter,
lv_color_t color, lv_opa_t opa)
{
const uint8_t bpp1_opa_table[2] = {0, 255}; /*Opacity mapping with bpp = 1 (Just for compatibility)*/
const uint8_t bpp2_opa_table[4] = {0, 85, 170, 255}; /*Opacity mapping with bpp = 2*/
const uint8_t bpp4_opa_table[16] = {0, 17, 34, 51, /*Opacity mapping with bpp = 4*/
68, 85, 102, 119,
136, 153, 170, 187,
204, 221, 238, 255
};
if(opa < LV_OPA_MIN) return;
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
if(font_p == NULL) {
LV_LOG_WARN("Font: character's bitmap not found");
return;
}
lv_coord_t pos_x = pos_p->x;
lv_coord_t pos_y = pos_p->y;
uint8_t letter_w = lv_font_get_real_width(font_p, letter);
uint8_t letter_h = lv_font_get_height(font_p);
uint8_t bpp = lv_font_get_bpp(font_p, letter); /*Bit per pixel (1,2, 4 or 8)*/
const uint8_t * bpp_opa_table;
uint8_t mask_init;
uint8_t mask;
if(lv_font_is_monospace(font_p, letter)) {
pos_x += (lv_font_get_width(font_p, letter) - letter_w) / 2;
}
switch(bpp) {
case 1:
bpp_opa_table = bpp1_opa_table;
mask_init = 0x80;
break;
case 2:
bpp_opa_table = bpp2_opa_table;
mask_init = 0xC0;
break;
case 4:
bpp_opa_table = bpp4_opa_table;
mask_init = 0xF0;
break;
case 8:
bpp_opa_table = NULL;
mask_init = 0xFF;
break; /*No opa table, pixel value will be used directly*/
default:
return; /*Invalid bpp. Can't render the letter*/
}
const uint8_t * map_p = lv_font_get_bitmap(font_p, letter);
if(map_p == NULL) return;
/*If the letter is completely out of mask don't draw it */
if(pos_x + letter_w < mask_p->x1 || pos_x > mask_p->x2 ||
pos_y + letter_h < mask_p->y1 || pos_y > mask_p->y2) return;
lv_vdb_t * vdb_p = lv_vdb_get();
if(!vdb_p) {
LV_LOG_WARN("Invalid VDB pointer");
return;
}
lv_coord_t vdb_width = lv_area_get_width(&vdb_p->area);
lv_color_t * vdb_buf_tmp = vdb_p->buf;
lv_coord_t col, row;
uint8_t col_bit;
uint8_t col_byte_cnt;
uint8_t width_byte_scr = letter_w >> 3; /*Width in bytes (on the screen finally) (e.g. w = 11 -> 2 bytes wide)*/
if(letter_w & 0x7) width_byte_scr++;
uint8_t width_byte_bpp = (letter_w * bpp) >> 3; /*Letter width in byte. Real width in the font*/
if((letter_w * bpp) & 0x7) width_byte_bpp++;
/* Calculate the col/row start/end on the map*/
lv_coord_t col_start = pos_x >= mask_p->x1 ? 0 : mask_p->x1 - pos_x;
lv_coord_t col_end = pos_x + letter_w <= mask_p->x2 ? letter_w : mask_p->x2 - pos_x + 1;
lv_coord_t row_start = pos_y >= mask_p->y1 ? 0 : mask_p->y1 - pos_y;
lv_coord_t row_end = pos_y + letter_h <= mask_p->y2 ? letter_h : mask_p->y2 - pos_y + 1;
/*Set a pointer on VDB to the first pixel of the letter*/
vdb_buf_tmp += ((pos_y - vdb_p->area.y1) * vdb_width)
+ pos_x - vdb_p->area.x1;
/*If the letter is partially out of mask the move there on VDB*/
vdb_buf_tmp += (row_start * vdb_width) + col_start;
/*Move on the map too*/
map_p += (row_start * width_byte_bpp) + ((col_start * bpp) >> 3);
lv_disp_t * disp = lv_disp_get_active();
uint8_t letter_px;
lv_opa_t px_opa;
for(row = row_start; row < row_end; row ++) {
col_byte_cnt = 0;
col_bit = (col_start * bpp) % 8;
mask = mask_init >> col_bit;
for(col = col_start; col < col_end; col ++) {
letter_px = (*map_p & mask) >> (8 - col_bit - bpp);
if(letter_px != 0) {
if(opa == LV_OPA_COVER) {
px_opa = bpp == 8 ? letter_px : bpp_opa_table[letter_px];
} else {
px_opa = bpp == 8 ?
(uint16_t)((uint16_t)letter_px * opa) >> 8 :
(uint16_t)((uint16_t)bpp_opa_table[letter_px] * opa) >> 8;
}
if(disp->driver.vdb_wr) {
disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width,
(col + pos_x) - vdb_p->area.x1, (row + pos_y) - vdb_p->area.y1,
color, px_opa);
} else {
#if LV_COLOR_SCREEN_TRANSP == 0
*vdb_buf_tmp = lv_color_mix(color, *vdb_buf_tmp, px_opa);
#else
*vdb_buf_tmp = color_mix_2_alpha(*vdb_buf_tmp, (*vdb_buf_tmp).alpha, color, px_opa);
#endif
}
}
vdb_buf_tmp++;
if(col_bit < 8 - bpp) {
col_bit += bpp;
mask = mask >> bpp;
} else {
col_bit = 0;
col_byte_cnt ++;
mask = mask_init;
map_p ++;
}
}
map_p += (width_byte_bpp) - col_byte_cnt;
vdb_buf_tmp += vdb_width - (col_end - col_start); /*Next row in VDB*/
}
}
/**
* Draw a color map to the display (image)
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area (truncated to VDB area)
* @param map_p pointer to a lv_color_t array
* @param opa opacity of the map
* @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels
* @param alpha_byte true: extra alpha byte is inserted for every pixel
* @param recolor mix the pixels with this color
* @param recolor_opa the intense of recoloring
*/
void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p,
const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte,
lv_color_t recolor, lv_opa_t recolor_opa)
{
if(opa < LV_OPA_MIN) return;
if(opa > LV_OPA_MAX) opa = LV_OPA_COVER;
lv_area_t masked_a;
bool union_ok;
lv_vdb_t * vdb_p = lv_vdb_get();
if(!vdb_p) {
LV_LOG_WARN("Invalid VDB pointer");
return;
}
/*Get the union of map size and mask*/
/* The mask is already truncated to the vdb size
* in 'lv_refr_area_with_vdb' function */
union_ok = lv_area_intersect(&masked_a, cords_p, mask_p);
/*If there are common part of the three area then draw to the vdb*/
if(union_ok == false) return;
/*The pixel size in byte is different if an alpha byte is added too*/
uint8_t px_size_byte = alpha_byte ? LV_IMG_PX_SIZE_ALPHA_BYTE : sizeof(lv_color_t);
/*If the map starts OUT of the masked area then calc. the first pixel*/
lv_coord_t map_width = lv_area_get_width(cords_p);
if(cords_p->y1 < masked_a.y1) {
map_p += (uint32_t) map_width * ((masked_a.y1 - cords_p->y1)) * px_size_byte;
}
if(cords_p->x1 < masked_a.x1) {
map_p += (masked_a.x1 - cords_p->x1) * px_size_byte;
}
/*Stores coordinates relative to the current VDB*/
masked_a.x1 = masked_a.x1 - vdb_p->area.x1;
masked_a.y1 = masked_a.y1 - vdb_p->area.y1;
masked_a.x2 = masked_a.x2 - vdb_p->area.x1;
masked_a.y2 = masked_a.y2 - vdb_p->area.y1;
lv_coord_t vdb_width = lv_area_get_width(&vdb_p->area);
lv_color_t * vdb_buf_tmp = vdb_p->buf;
vdb_buf_tmp += (uint32_t) vdb_width * masked_a.y1; /*Move to the first row*/
vdb_buf_tmp += (uint32_t) masked_a.x1; /*Move to the first col*/
lv_coord_t row;
lv_coord_t map_useful_w = lv_area_get_width(&masked_a);
lv_disp_t * disp = lv_disp_get_active();
/*The simplest case just copy the pixels into the VDB*/
if(chroma_key == false && alpha_byte == false && opa == LV_OPA_COVER && recolor_opa == LV_OPA_TRANSP) {
/*Use the custom VDB write function is exists*/
if(disp->driver.vdb_wr) {
lv_coord_t col;
for(row = masked_a.y1; row <= masked_a.y2; row++) {
for(col = 0; col < map_useful_w; col++) {
lv_color_t px_color = *((lv_color_t *)&map_p[(uint32_t)col * px_size_byte]);
disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, col + masked_a.x1, row, px_color, opa);
}
map_p += map_width * px_size_byte; /*Next row on the map*/
}
}
/*Normal native VDB*/
else {
for(row = masked_a.y1; row <= masked_a.y2; row++) {
#if USE_LV_GPU
if(lv_disp_is_mem_blend_supported() == false) {
sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa);
} else {
lv_disp_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa);
}
#else
sw_mem_blend(vdb_buf_tmp, (lv_color_t *)map_p, map_useful_w, opa);
#endif
map_p += map_width * px_size_byte; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
}
}
}
/*In the other cases every pixel need to be checked one-by-one*/
else {
lv_color_t chroma_key_color = LV_COLOR_TRANSP;
lv_coord_t col;
lv_color_t last_img_px = LV_COLOR_BLACK;
lv_color_t recolored_px = lv_color_mix(recolor, last_img_px, recolor_opa);
for(row = masked_a.y1; row <= masked_a.y2; row++) {
for(col = 0; col < map_useful_w; col++) {
lv_opa_t opa_result = opa;
uint8_t * px_color_p = (uint8_t *) &map_p[(uint32_t)col * px_size_byte];
lv_color_t px_color;
/*Calculate with the pixel level alpha*/
if(alpha_byte) {
#if LV_COLOR_DEPTH == 8 || LV_COLOR_DEPTH == 1
px_color.full = px_color_p[0];
#elif LV_COLOR_DEPTH == 16
/*Because of Alpha byte 16 bit color can start on odd address which can cause crash*/
px_color.full = px_color_p[0] + (px_color_p[1] << 8);
#elif LV_COLOR_DEPTH == 32
px_color = *((lv_color_t *)px_color_p);
#endif
lv_opa_t px_opa = *(px_color_p + LV_IMG_PX_SIZE_ALPHA_BYTE - 1);
if(px_opa == LV_OPA_TRANSP) continue;
else if(px_opa != LV_OPA_COVER) opa_result = (uint32_t)((uint32_t)px_opa * opa_result) >> 8;
} else {
px_color = *((lv_color_t *)px_color_p);
}
/*Handle chroma key*/
if(chroma_key && px_color.full == chroma_key_color.full) continue;
/*Re-color the pixel if required*/
if(recolor_opa != LV_OPA_TRANSP) {
if(last_img_px.full != px_color.full) { /*Minor acceleration: calculate only for new colors (save the last)*/
last_img_px = px_color;
recolored_px = lv_color_mix(recolor, last_img_px, recolor_opa);
}
/*Handle custom VDB write is present*/
if(disp->driver.vdb_wr) {
disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, col + masked_a.x1, row, recolored_px, opa_result);
}
/*Normal native VDB write*/
else {
if(opa_result == LV_OPA_COVER) vdb_buf_tmp[col].full = recolored_px.full;
else vdb_buf_tmp[col] = lv_color_mix(recolored_px, vdb_buf_tmp[col], opa_result);
}
} else {
/*Handle custom VDB write is present*/
if(disp->driver.vdb_wr) {
disp->driver.vdb_wr((uint8_t *)vdb_p->buf, vdb_width, col + masked_a.x1, row, px_color, opa_result);
}
/*Normal native VDB write*/
else {
if(opa_result == LV_OPA_COVER) vdb_buf_tmp[col] = px_color;
else {
#if LV_COLOR_SCREEN_TRANSP == 0
vdb_buf_tmp[col] = lv_color_mix(px_color, vdb_buf_tmp[col], opa_result);
#else
vdb_buf_tmp[col] = color_mix_2_alpha(vdb_buf_tmp[col], vdb_buf_tmp[col].alpha, px_color, opa_result);
#endif
}
}
}
}
map_p += map_width * px_size_byte; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
}
}
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Blend pixels to destination memory using opacity
* @param dest a memory address. Copy 'src' here.
* @param src pointer to pixel map. Copy it to 'dest'.
* @param length number of pixels in 'src'
* @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
*/
static void sw_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa)
{
if(opa == LV_OPA_COVER) {
memcpy(dest, src, length * sizeof(lv_color_t));
} else {
uint32_t col;
for(col = 0; col < length; col++) {
dest[col] = lv_color_mix(src[col], dest[col], opa);
}
}
}
/**
*
* @param mem_area coordinates of 'mem' memory area
* @param mem a memory address. Considered to a rectangular window according to 'mem_area'
* @param fill_area coordinates of an area to fill. Relative to 'mem_area'.
* @param color fill color
* @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
*/
static void sw_color_fill(lv_area_t * mem_area, lv_color_t * mem, const lv_area_t * fill_area, lv_color_t color, lv_opa_t opa)
{
/*Set all row in vdb to the given color*/
lv_coord_t row;
lv_coord_t col;
lv_coord_t mem_width = lv_area_get_width(mem_area);
lv_disp_t * disp = lv_disp_get_active();
if(disp->driver.vdb_wr) {
for(col = fill_area->x1; col <= fill_area->x2; col++) {
for(row = fill_area->y1; row <= fill_area->y2; row++) {
disp->driver.vdb_wr((uint8_t *)mem, mem_width, col, row, color, opa);
}
}
} else {
mem += fill_area->y1 * mem_width; /*Go to the first row*/
/*Run simpler function without opacity*/
if(opa == LV_OPA_COVER) {
/*Fill the first row with 'color'*/
for(col = fill_area->x1; col <= fill_area->x2; col++) {
mem[col] = color;
}
/*Copy the first row to all other rows*/
lv_color_t * mem_first = &mem[fill_area->x1];
lv_coord_t copy_size = (fill_area->x2 - fill_area->x1 + 1) * sizeof(lv_color_t);
mem += mem_width;
for(row = fill_area->y1 + 1; row <= fill_area->y2; row++) {
memcpy(&mem[fill_area->x1], mem_first, copy_size);
mem += mem_width;
}
}
/*Calculate with alpha too*/
else {
#if LV_COLOR_SCREEN_TRANSP == 0
lv_color_t bg_tmp = LV_COLOR_BLACK;
lv_color_t opa_tmp = lv_color_mix(color, bg_tmp, opa);
#endif
for(row = fill_area->y1; row <= fill_area->y2; row++) {
for(col = fill_area->x1; col <= fill_area->x2; col++) {
#if LV_COLOR_SCREEN_TRANSP == 0
/*If the bg color changed recalculate the result color*/
if(mem[col].full != bg_tmp.full) {
bg_tmp = mem[col];
opa_tmp = lv_color_mix(color, bg_tmp, opa);
}
mem[col] = opa_tmp;
#else
mem[col] = color_mix_2_alpha(mem[col], mem[col].alpha, color, opa);
#endif
}
mem += mem_width;
}
}
}
}
#if LV_COLOR_SCREEN_TRANSP
/**
* Mix two colors. Both color can have alpha value. It requires ARGB888 colors.
* @param bg_color background color
* @param bg_opa alpha of the background color
* @param fg_color foreground color
* @param fg_opa alpha of the foreground color
* @return the mixed color. the alpha channel (color.alpha) contains the result alpha
*/
static inline lv_color_t color_mix_2_alpha(lv_color_t bg_color, lv_opa_t bg_opa, lv_color_t fg_color, lv_opa_t fg_opa)
{
/* Pick the foreground if it's fully opaque or the Background is fully transparent*/
if(fg_opa == LV_OPA_COVER && bg_opa <= LV_OPA_MIN) {
fg_color.alpha = fg_opa;
return fg_color;
}
/*Transparent foreground: use the Background*/
else if(fg_opa <= LV_OPA_MIN) {
return bg_color;
}
/*Opaque background: use simple mix*/
else if(bg_opa >= LV_OPA_MAX) {
return lv_color_mix(fg_color, bg_color, fg_opa);
}
/*Both colors have alpha. Expensive calculation need to be applied*/
else {
/*Save the parameters and the result. If they will be asked again don't compute again*/
static lv_opa_t fg_opa_save = 0;
static lv_opa_t bg_opa_save = 0;
static lv_color_t c = {{0}};
if(fg_opa != fg_opa_save || bg_opa != bg_opa_save) {
fg_opa_save = fg_opa;
bg_opa_save = bg_opa;
/*Info: https://en.wikipedia.org/wiki/Alpha_compositing#Analytical_derivation_of_the_over_operator*/
lv_opa_t alpha_res = 255 - ((uint16_t)((uint16_t)(255 - fg_opa) * (255 - bg_opa)) >> 8);
if(alpha_res == 0) {
while(1);
}
lv_opa_t ratio = (uint16_t)((uint16_t) fg_opa * 255) / alpha_res;
c = lv_color_mix(fg_color, bg_color, ratio);
c.alpha = alpha_res;
}
return c;
}
}
#endif /*LV_COLOR_SCREEN_TRANSP*/
#endif

View File

@@ -1,89 +0,0 @@
/**
* @file lv_draw_vbasic.h
*
*/
#ifndef LV_DRAW_VBASIC_H
#define LV_DRAW_VBASIC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#if LV_VDB_SIZE != 0
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_area.h"
#include "../lv_misc/lv_font.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_vpx(lv_coord_t x, lv_coord_t y, const lv_area_t * mask_p, lv_color_t color, lv_opa_t opa);
/**
* Fill an area in the Virtual Display Buffer
* @param cords_p coordinates of the area to fill
* @param mask_p fill only o this mask
* @param color fill color
* @param opa opacity of the area (0..255)
*/
void lv_vfill(const lv_area_t * cords_p, const lv_area_t * mask_p,
lv_color_t color, lv_opa_t opa);
/**
* Draw a letter in the Virtual Display Buffer
* @param pos_p left-top coordinate of the latter
* @param mask_p the letter will be drawn only on this area
* @param font_p pointer to font
* @param letter a letter to draw
* @param color color of letter
* @param opa opacity of letter (0..255)
*/
void lv_vletter(const lv_point_t * pos_p, const lv_area_t * mask_p,
const lv_font_t * font_p, uint32_t letter,
lv_color_t color, lv_opa_t opa);
/**
* Draw a color map to the display (image)
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area (truncated to VDB area)
* @param map_p pointer to a lv_color_t array
* @param opa opacity of the map
* @param chroma_keyed true: enable transparency of LV_IMG_LV_COLOR_TRANSP color pixels
* @param alpha_byte true: extra alpha byte is inserted for every pixel
* @param recolor mix the pixels with this color
* @param recolor_opa the intense of recoloring
*/
void lv_vmap(const lv_area_t * cords_p, const lv_area_t * mask_p,
const uint8_t * map_p, lv_opa_t opa, bool chroma_key, bool alpha_byte,
lv_color_t recolor, lv_opa_t recolor_opa);
/**********************
* MACROS
**********************/
#endif /*LV_VDB_SIZE != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_RBASIC_H*/

View File

@@ -1,165 +0,0 @@
/**
* @file lv_font_built_in.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_font_builtin.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the built-in fonts
*/
void lv_font_builtin_init(void)
{
/*DEJAVU 10*/
#if USE_LV_FONT_DEJAVU_10 != 0
lv_font_add(&lv_font_dejavu_10, NULL);
#endif
#if USE_LV_FONT_DEJAVU_10_LATIN_SUP != 0
#if USE_LV_FONT_DEJAVU_10 != 0
lv_font_add(&lv_font_dejavu_10_latin_sup, &lv_font_dejavu_10);
#else
lv_font_add(&lv_font_dejavu_10_latin_sup, NULL);
#endif
#endif
#if USE_LV_FONT_DEJAVU_10_CYRILLIC != 0
#if USE_LV_FONT_DEJAVU_10 != 0
lv_font_add(&lv_font_dejavu_10_cyrillic, &lv_font_dejavu_10);
#else
lv_font_add(&lv_font_dejavu_10_cyrillic, NULL);
#endif
#endif
/*SYMBOL 10*/
#if USE_LV_FONT_SYMBOL_10 != 0
#if USE_LV_FONT_DEJAVU_10 != 0
lv_font_add(&lv_font_symbol_10, &lv_font_dejavu_10);
#else
lv_font_add(&lv_font_symbol_10, NULL);
#endif
#endif
/*DEJAVU 20*/
#if USE_LV_FONT_DEJAVU_20 != 0
lv_font_add(&lv_font_dejavu_20, NULL);
#endif
#if USE_LV_FONT_DEJAVU_20_LATIN_SUP != 0
#if USE_LV_FONT_DEJAVU_20 != 0
lv_font_add(&lv_font_dejavu_20_latin_sup, &lv_font_dejavu_20);
#else
lv_font_add(&lv_font_symbol_20_latin_sup, NULL);
#endif
#endif
#if USE_LV_FONT_DEJAVU_20_CYRILLIC != 0
#if USE_LV_FONT_DEJAVU_20 != 0
lv_font_add(&lv_font_dejavu_20_cyrillic, &lv_font_dejavu_20);
#else
lv_font_add(&lv_font_dejavu_20_cyrillic, NULL);
#endif
#endif
/*SYMBOL 20*/
#if USE_LV_FONT_SYMBOL_20 != 0
#if USE_LV_FONT_DEJAVU_20 != 0
lv_font_add(&lv_font_symbol_20, &lv_font_dejavu_20);
#else
lv_font_add(&lv_font_symbol_20, NULL);
#endif
#endif
/*DEJAVU 30*/
#if USE_LV_FONT_DEJAVU_30 != 0
lv_font_add(&lv_font_dejavu_30, NULL);
#endif
#if USE_LV_FONT_DEJAVU_30_LATIN_SUP != 0
#if USE_LV_FONT_DEJAVU_30 != 0
lv_font_add(&lv_font_dejavu_30_latin_sup, &lv_font_dejavu_30);
#else
lv_font_add(&lv_font_dejavu_30_latin_sup, NULL);
#endif
#endif
#if USE_LV_FONT_DEJAVU_30_CYRILLIC != 0
#if USE_LV_FONT_DEJAVU_30 != 0
lv_font_add(&lv_font_dejavu_30_cyrillic, &lv_font_dejavu_30);
#else
lv_font_add(&lv_font_dejavu_30_cyrillic, NULL);
#endif
#endif
/*SYMBOL 30*/
#if USE_LV_FONT_SYMBOL_30 != 0
#if USE_LV_FONT_DEJAVU_30 != 0
lv_font_add(&lv_font_symbol_30, &lv_font_dejavu_30);
#else
lv_font_add(&lv_font_symbol_30, NULL);
#endif
#endif
/*DEJAVU 40*/
#if USE_LV_FONT_DEJAVU_40 != 0
lv_font_add(&lv_font_dejavu_40, NULL);
#endif
#if USE_LV_FONT_DEJAVU_40_LATIN_SUP != 0
#if USE_LV_FONT_DEJAVU_40 != 0
lv_font_add(&lv_font_dejavu_40_latin_sup, &lv_font_dejavu_40);
#else
lv_font_add(&lv_font_dejavu_40_latin_sup, NULL);
#endif
#endif
#if USE_LV_FONT_DEJAVU_40_CYRILLIC != 0
#if USE_LV_FONT_DEJAVU_40 != 0
lv_font_add(&lv_font_dejavu_40_cyrillic, &lv_font_dejavu_40);
#else
lv_font_add(&lv_font_dejavu_40_cyrillic, NULL);
#endif
#endif
/*SYMBOL 40*/
#if USE_LV_FONT_SYMBOL_40 != 0
#if USE_LV_FONT_DEJAVU_40 != 0
lv_font_add(&lv_font_symbol_40, &lv_font_dejavu_40);
#else
lv_font_add(&lv_font_symbol_40, NULL);
#endif
#endif
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@@ -1,125 +0,0 @@
/**
* @file lv_font_builtin.h
*
*/
#ifndef LV_FONT_BUILTIN_H
#define LV_FONT_BUILTIN_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#include "../lv_misc/lv_font.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the built-in fonts
*/
void lv_font_builtin_init(void);
/**********************
* MACROS
**********************/
/**********************
* FONT DECLARATIONS
**********************/
/*10 px */
#if USE_LV_FONT_DEJAVU_10
LV_FONT_DECLARE(lv_font_dejavu_10)
#endif
#if USE_LV_FONT_DEJAVU_10_LATIN_SUP
LV_FONT_DECLARE(lv_font_dejavu_10_latin_sup)
#endif
#if USE_LV_FONT_DEJAVU_10_CYRILLIC
LV_FONT_DECLARE(lv_font_dejavu_10_cyrillic)
#endif
#if USE_LV_FONT_SYMBOL_10
LV_FONT_DECLARE(lv_font_symbol_10)
#endif
/*20 px */
#if USE_LV_FONT_DEJAVU_20
LV_FONT_DECLARE(lv_font_dejavu_20)
#endif
#if USE_LV_FONT_DEJAVU_20_LATIN_SUP
LV_FONT_DECLARE(lv_font_dejavu_20_latin_sup)
#endif
#if USE_LV_FONT_DEJAVU_20_CYRILLIC
LV_FONT_DECLARE(lv_font_dejavu_20_cyrillic)
#endif
#if USE_LV_FONT_SYMBOL_20
LV_FONT_DECLARE(lv_font_symbol_20)
#endif
/*30 px */
#if USE_LV_FONT_DEJAVU_30
LV_FONT_DECLARE(lv_font_dejavu_30)
#endif
#if USE_LV_FONT_DEJAVU_30_LATIN_SUP
LV_FONT_DECLARE(lv_font_dejavu_30_latin_sup)
#endif
#if USE_LV_FONT_DEJAVU_30_CYRILLIC
LV_FONT_DECLARE(lv_font_dejavu_30_cyrillic)
#endif
#if USE_LV_FONT_SYMBOL_30
LV_FONT_DECLARE(lv_font_symbol_30)
#endif
/*40 px */
#if USE_LV_FONT_DEJAVU_40
LV_FONT_DECLARE(lv_font_dejavu_40)
#endif
#if USE_LV_FONT_DEJAVU_40_LATIN_SUP
LV_FONT_DECLARE(lv_font_dejavu_40_latin_sup)
#endif
#if USE_LV_FONT_DEJAVU_40_CYRILLIC
LV_FONT_DECLARE(lv_font_dejavu_40_cyrillic)
#endif
#if USE_LV_FONT_SYMBOL_40
LV_FONT_DECLARE(lv_font_symbol_40)
#endif
#if USE_LV_FONT_MONOSPACE_8
LV_FONT_DECLARE(lv_font_monospace_8)
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_FONT_BUILTIN_H*/

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +0,0 @@
CSRCS += lv_font_builtin.c
CSRCS += lv_font_dejavu_10.c
CSRCS += lv_font_dejavu_20.c
CSRCS += lv_font_dejavu_30.c
CSRCS += lv_font_dejavu_40.c
CSRCS += lv_font_dejavu_10_cyrillic.c
CSRCS += lv_font_dejavu_20_cyrillic.c
CSRCS += lv_font_dejavu_30_cyrillic.c
CSRCS += lv_font_dejavu_40_cyrillic.c
CSRCS += lv_font_dejavu_10_latin_sup.c
CSRCS += lv_font_dejavu_20_latin_sup.c
CSRCS += lv_font_dejavu_30_latin_sup.c
CSRCS += lv_font_dejavu_40_latin_sup.c
CSRCS += lv_font_symbol_10.c
CSRCS += lv_font_symbol_20.c
CSRCS += lv_font_symbol_30.c
CSRCS += lv_font_symbol_40.c
CSRCS += lv_font_monospace_8.c
DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_fonts
VPATH += :$(LVGL_DIR)/lvgl/lv_fonts
CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_fonts"

View File

@@ -1,8 +0,0 @@
CSRCS += lv_hal_disp.c
CSRCS += lv_hal_indev.c
CSRCS += lv_hal_tick.c
DEPPATH += --dep-path $(LVGL_DIR)/lvgl/lv_hal
VPATH += :$(LVGL_DIR)/lvgl/lv_hal
CFLAGS += "-I$(LVGL_DIR)/lvgl/lv_hal"

View File

@@ -1,242 +0,0 @@
/**
* @file hal_disp.c
*
* @description HAL layer for display driver
*
*/
/*********************
* INCLUDES
*********************/
#include <stdint.h>
#include <stddef.h>
#include "../lv_hal/lv_hal_disp.h"
#include "../lv_misc/lv_mem.h"
#include "../lv_core/lv_obj.h"
#include "../lv_misc/lv_gc.h"
#if defined(LV_GC_INCLUDE)
# include LV_GC_INCLUDE
#endif /* LV_ENABLE_GC */
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
static lv_disp_t * active;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize a display driver with default values.
* It is used to surly have known values in the fields ant not memory junk.
* After it you can set the fields.
* @param driver pointer to driver variable to initialize
*/
void lv_disp_drv_init(lv_disp_drv_t * driver)
{
driver->disp_fill = NULL;
driver->disp_map = NULL;
driver->disp_flush = NULL;
#if USE_LV_GPU
driver->mem_blend = NULL;
driver->mem_fill = NULL;
#endif
#if LV_VDB_SIZE
driver->vdb_wr = NULL;
#endif
}
/**
* Register an initialized display driver.
* Automatically set the first display as active.
* @param driver pointer to an initialized 'lv_disp_drv_t' variable (can be local variable)
* @return pointer to the new display or NULL on error
*/
lv_disp_t * lv_disp_drv_register(lv_disp_drv_t * driver)
{
lv_disp_t * node;
node = lv_mem_alloc(sizeof(lv_disp_t));
lv_mem_assert(node);
if(node == NULL) return NULL;
memcpy(&node->driver, driver, sizeof(lv_disp_drv_t));
node->next = NULL;
/* Set first display as active by default */
if(LV_GC_ROOT(_lv_disp_list) == NULL) {
LV_GC_ROOT(_lv_disp_list) = node;
active = node;
lv_obj_invalidate(lv_scr_act());
} else {
((lv_disp_t*)LV_GC_ROOT(_lv_disp_list))->next = node;
}
return node;
}
/**
* Set the active display
* @param disp pointer to a display (return value of 'lv_disp_register')
*/
void lv_disp_set_active(lv_disp_t * disp)
{
active = disp;
lv_obj_invalidate(lv_scr_act());
}
/**
* Get a pointer to the active display
* @return pointer to the active display
*/
lv_disp_t * lv_disp_get_active(void)
{
return active;
}
/**
* Get the next display.
* @param disp pointer to the current display. NULL to initialize.
* @return the next display or NULL if no more. Give the first display when the parameter is NULL
*/
lv_disp_t * lv_disp_next(lv_disp_t * disp)
{
if(disp == NULL) {
return LV_GC_ROOT(_lv_disp_list);
} else {
if(((lv_disp_t*)LV_GC_ROOT(_lv_disp_list))->next == NULL) return NULL;
else return ((lv_disp_t*)LV_GC_ROOT(_lv_disp_list))->next;
}
}
/**
* Write the content of the internal buffer (VDB) to the display
* @param x1 left coordinate of the rectangle
* @param x2 right coordinate of the rectangle
* @param y1 top coordinate of the rectangle
* @param y2 bottom coordinate of the rectangle
* @param color_p fill color
*/
void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color)
{
if(active == NULL) return;
if(active->driver.disp_fill != NULL) active->driver.disp_fill(x1, y1, x2, y2, color);
}
/**
* Fill a rectangular area with a color on the active display
* @param x1 left coordinate of the rectangle
* @param x2 right coordinate of the rectangle
* @param y1 top coordinate of the rectangle
* @param y2 bottom coordinate of the rectangle
* @param color_p pointer to an array of colors
*/
void lv_disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t * color_p)
{
if(active == NULL) return;
if(active->driver.disp_flush != NULL) {
LV_LOG_TRACE("disp flush started");
active->driver.disp_flush(x1, y1, x2, y2, color_p);
LV_LOG_TRACE("disp flush ready");
} else {
LV_LOG_WARN("disp flush function registered");
}
}
/**
* Put a color map to a rectangular area on the active display
* @param x1 left coordinate of the rectangle
* @param x2 right coordinate of the rectangle
* @param y1 top coordinate of the rectangle
* @param y2 bottom coordinate of the rectangle
* @param color_map pointer to an array of colors
*/
void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_map)
{
if(active == NULL) return;
if(active->driver.disp_map != NULL) active->driver.disp_map(x1, y1, x2, y2, color_map);
}
#if USE_LV_GPU
/**
* Blend pixels to a destination memory from a source memory
* In 'lv_disp_drv_t' 'mem_blend' is optional. (NULL if not available)
* @param dest a memory address. Blend 'src' here.
* @param src pointer to pixel map. Blend it to 'dest'.
* @param length number of pixels in 'src'
* @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
*/
void lv_disp_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa)
{
if(active == NULL) return;
if(active->driver.mem_blend != NULL) active->driver.mem_blend(dest, src, length, opa);
}
/**
* Fill a memory with a color (GPUs may support it)
* In 'lv_disp_drv_t' 'mem_fill' is optional. (NULL if not available)
* @param dest a memory address. Copy 'src' here.
* @param src pointer to pixel map. Copy it to 'dest'.
* @param length number of pixels in 'src'
* @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
*/
void lv_disp_mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color)
{
if(active == NULL) return;
if(active->driver.mem_fill != NULL) active->driver.mem_fill(dest, length, color);
}
/**
* Shows if memory blending (by GPU) is supported or not
* @return false: 'mem_blend' is not supported in the driver; true: 'mem_blend' is supported in the driver
*/
bool lv_disp_is_mem_blend_supported(void)
{
if(active == NULL) return false;
if(active->driver.mem_blend) return true;
else return false;
}
/**
* Shows if memory fill (by GPU) is supported or not
* @return false: 'mem_fill' is not supported in the drover; true: 'mem_fill' is supported in the driver
*/
bool lv_disp_is_mem_fill_supported(void)
{
if(active == NULL) return false;
if(active->driver.mem_fill) return true;
else return false;
}
#endif
/**********************
* STATIC FUNCTIONS
**********************/

View File

@@ -1,174 +0,0 @@
/**
* @file hal_disp.h
*
* @description Display Driver HAL interface header file
*
*/
#ifndef HAL_DISP_H
#define HAL_DISP_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stdint.h>
#include <stdbool.h>
#include "lv_hal.h"
#include "../lv_misc/lv_color.h"
#include "../lv_misc/lv_area.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**
* Display Driver structure to be registered by HAL
*/
typedef struct _disp_drv_t {
/*Write the internal buffer (VDB) to the display. 'lv_flush_ready()' has to be called when finished*/
void (*disp_flush)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p);
/*Fill an area with a color on the display*/
void (*disp_fill)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color);
/*Write pixel map (e.g. image) to the display*/
void (*disp_map)(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p);
/*Optional interface functions to use GPU*/
#if USE_LV_GPU
/*Blend two memories using opacity (GPU only)*/
void (*mem_blend)(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
/*Fill a memory with a color (GPU only)*/
void (*mem_fill)(lv_color_t * dest, uint32_t length, lv_color_t color);
#endif
#if LV_VDB_SIZE
/*Optional: Set a pixel in a buffer according to the requirements of the display*/
void (*vdb_wr)(uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, lv_color_t color, lv_opa_t opa);
#endif
} lv_disp_drv_t;
typedef struct _disp_t {
lv_disp_drv_t driver;
struct _disp_t *next;
} lv_disp_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize a display driver with default values.
* It is used to surly have known values in the fields ant not memory junk.
* After it you can set the fields.
* @param driver pointer to driver variable to initialize
*/
void lv_disp_drv_init(lv_disp_drv_t *driver);
/**
* Register an initialized display driver.
* Automatically set the first display as active.
* @param driver pointer to an initialized 'lv_disp_drv_t' variable (can be local variable)
* @return pointer to the new display or NULL on error
*/
lv_disp_t * lv_disp_drv_register(lv_disp_drv_t *driver);
/**
* Set the active display
* @param disp pointer to a display (return value of 'lv_disp_register')
*/
void lv_disp_set_active(lv_disp_t * disp);
/**
* Get a pointer to the active display
* @return pointer to the active display
*/
lv_disp_t * lv_disp_get_active(void);
/**
* Get the next display.
* @param disp pointer to the current display. NULL to initialize.
* @return the next display or NULL if no more. Give the first display when the parameter is NULL
*/
lv_disp_t * lv_disp_next(lv_disp_t * disp);
/**
* Fill a rectangular area with a color on the active display
* @param x1 left coordinate of the rectangle
* @param x2 right coordinate of the rectangle
* @param y1 top coordinate of the rectangle
* @param y2 bottom coordinate of the rectangle
* @param color_p pointer to an array of colors
*/
void lv_disp_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t *color_p);
/**
* Fill a rectangular area with a color on the active display
* @param x1 left coordinate of the rectangle
* @param x2 right coordinate of the rectangle
* @param y1 top coordinate of the rectangle
* @param y2 bottom coordinate of the rectangle
* @param color fill color
*/
void lv_disp_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color);
/**
* Put a color map to a rectangular area on the active display
* @param x1 left coordinate of the rectangle
* @param x2 right coordinate of the rectangle
* @param y1 top coordinate of the rectangle
* @param y2 bottom coordinate of the rectangle
* @param color_map pointer to an array of colors
*/
void lv_disp_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_map);
#if USE_LV_GPU
/**
* Blend pixels to a destination memory from a source memory
* In 'lv_disp_drv_t' 'mem_blend' is optional. (NULL if not available)
* @param dest a memory address. Blend 'src' here.
* @param src pointer to pixel map. Blend it to 'dest'.
* @param length number of pixels in 'src'
* @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
*/
void lv_disp_mem_blend(lv_color_t * dest, const lv_color_t * src, uint32_t length, lv_opa_t opa);
/**
* Fill a memory with a color (GPUs may support it)
* In 'lv_disp_drv_t' 'mem_fill' is optional. (NULL if not available)
* @param dest a memory address. Copy 'src' here.
* @param src pointer to pixel map. Copy it to 'dest'.
* @param length number of pixels in 'src'
* @param opa opacity (0, LV_OPA_TRANSP: transparent ... 255, LV_OPA_COVER, fully cover)
*/
void lv_disp_mem_fill(lv_color_t * dest, uint32_t length, lv_color_t color);
/**
* Shows if memory blending (by GPU) is supported or not
* @return false: 'mem_blend' is not supported in the driver; true: 'mem_blend' is supported in the driver
*/
bool lv_disp_is_mem_blend_supported(void);
/**
* Shows if memory fill (by GPU) is supported or not
* @return false: 'mem_fill' is not supported in the drover; true: 'mem_fill' is supported in the driver
*/
bool lv_disp_is_mem_fill_supported(void);
#endif
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

View File

@@ -1,135 +0,0 @@
/**
* @file hal_indev.c
*
* @description Input device HAL interface
*
*/
/*********************
* INCLUDES
*********************/
#include "../lv_hal/lv_hal_indev.h"
#include "../lv_misc/lv_mem.h"
#include "../lv_misc/lv_gc.h"
#if defined(LV_GC_INCLUDE)
# include LV_GC_INCLUDE
#endif /* LV_ENABLE_GC */
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize an input device driver with default values.
* It is used to surly have known values in the fields ant not memory junk.
* After it you can set the fields.
* @param driver pointer to driver variable to initialize
*/
void lv_indev_drv_init(lv_indev_drv_t * driver)
{
driver->read = NULL;
driver->type = LV_INDEV_TYPE_NONE;
driver->user_data = NULL;
}
/**
* Register an initialized input device driver.
* @param driver pointer to an initialized 'lv_indev_drv_t' variable (can be local variable)
* @return pointer to the new input device or NULL on error
*/
lv_indev_t * lv_indev_drv_register(lv_indev_drv_t * driver)
{
lv_indev_t * node;
node = lv_mem_alloc(sizeof(lv_indev_t));
if(!node) return NULL;
memset(node, 0, sizeof(lv_indev_t));
memcpy(&node->driver, driver, sizeof(lv_indev_drv_t));
node->next = NULL;
node->proc.reset_query = 1;
node->cursor = NULL;
node->group = NULL;
node->btn_points = NULL;
if(LV_GC_ROOT(_lv_indev_list) == NULL) {
LV_GC_ROOT(_lv_indev_list) = node;
} else {
lv_indev_t * last = LV_GC_ROOT(_lv_indev_list);
while(last->next)
last = last->next;
last->next = node;
}
return node;
}
/**
* Get the next input device.
* @param indev pointer to the current input device. NULL to initialize.
* @return the next input devise or NULL if no more. Give the first input device when the parameter is NULL
*/
lv_indev_t * lv_indev_next(lv_indev_t * indev)
{
if(indev == NULL) {
return LV_GC_ROOT(_lv_indev_list);
} else {
if(indev->next == NULL) return NULL;
else return indev->next;
}
}
/**
* Read data from an input device.
* @param indev pointer to an input device
* @param data input device will write its data here
* @return false: no more data; true: there more data to read (buffered)
*/
bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t * data)
{
bool cont = false;
memset(data, 0, sizeof(lv_indev_data_t));
data->state = LV_INDEV_STATE_REL;
if(indev->driver.read) {
data->user_data = indev->driver.user_data;
LV_LOG_TRACE("idnev read started");
cont = indev->driver.read(data);
LV_LOG_TRACE("idnev read finished");
} else {
LV_LOG_WARN("indev function registered");
}
return cont;
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@@ -1,166 +0,0 @@
/**
* @file hal_indev.h
*
* @description Input Device HAL interface layer header file
*
*/
#ifndef HAL_INDEV_H
#define HAL_INDEV_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stdbool.h>
#include <stdint.h>
#include "lv_hal.h"
#include "../lv_misc/lv_area.h"
#include "../lv_core/lv_obj.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/*Possible input device types*/
enum {
LV_INDEV_TYPE_NONE, /*Show uninitialized state*/
LV_INDEV_TYPE_POINTER, /*Touch pad, mouse, external button*/
LV_INDEV_TYPE_KEYPAD, /*Keypad or keyboard*/
LV_INDEV_TYPE_BUTTON, /*External (hardware button) which is assinged to a specific point of the screen*/
LV_INDEV_TYPE_ENCODER, /*Encoder with only Left, Right turn and a Button*/
};
typedef uint8_t lv_hal_indev_type_t;
/*States for input devices*/
enum {
LV_INDEV_STATE_REL = 0,
LV_INDEV_STATE_PR
};
typedef uint8_t lv_indev_state_t;
/*Data type when an input device is read */
typedef struct {
union {
lv_point_t point; /*For LV_INDEV_TYPE_POINTER the currently pressed point*/
uint32_t key; /*For LV_INDEV_TYPE_KEYPAD the currently pressed key*/
uint32_t btn; /*For LV_INDEV_TYPE_BUTTON the currently pressed button*/
int16_t enc_diff; /*For LV_INDEV_TYPE_ENCODER number of steps since the previous read*/
};
void *user_data; /*'lv_indev_drv_t.priv' for this driver*/
lv_indev_state_t state; /*LV_INDEV_STATE_REL or LV_INDEV_STATE_PR*/
} lv_indev_data_t;
/*Initialized by the user and registered by 'lv_indev_add()'*/
typedef struct {
lv_hal_indev_type_t type; /*Input device type*/
bool (*read)(lv_indev_data_t *data); /*Function pointer to read data. Return 'true' if there is still data to be read (buffered)*/
void *user_data; /*Pointer to user defined data, passed in 'lv_indev_data_t' on read*/
} lv_indev_drv_t;
struct _lv_obj_t;
/*Run time data of input devices*/
typedef struct _lv_indev_proc_t {
lv_indev_state_t state;
union {
struct { /*Pointer and button data*/
lv_point_t act_point;
lv_point_t last_point;
lv_point_t vect;
lv_point_t drag_sum; /*Count the dragged pixels to check LV_INDEV_DRAG_LIMIT*/
struct _lv_obj_t * act_obj;
struct _lv_obj_t * last_obj;
/*Flags*/
uint8_t drag_range_out :1;
uint8_t drag_in_prog :1;
uint8_t wait_unil_release :1;
};
struct { /*Keypad data*/
lv_indev_state_t last_state;
uint32_t last_key;
};
};
uint32_t pr_timestamp; /*Pressed time stamp*/
uint32_t longpr_rep_timestamp; /*Long press repeat time stamp*/
/*Flags*/
uint8_t long_pr_sent :1;
uint8_t reset_query :1;
uint8_t disabled :1;
} lv_indev_proc_t;
struct _lv_indev_t;
typedef void (*lv_indev_feedback_t)(struct _lv_indev_t *, lv_signal_t);
struct _lv_obj_t;
struct _lv_group_t;
/*The main input device descriptor with driver, runtime data ('proc') and some additional information*/
typedef struct _lv_indev_t {
lv_indev_drv_t driver;
lv_indev_proc_t proc;
lv_indev_feedback_t feedback;
uint32_t last_activity_time;
union {
struct _lv_obj_t *cursor; /*Cursor for LV_INPUT_TYPE_POINTER*/
struct _lv_group_t *group; /*Keypad destination group*/
const lv_point_t * btn_points; /*Array points assigned to the button ()screen will be pressed here by the buttons*/
};
struct _lv_indev_t *next;
} lv_indev_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize an input device driver with default values.
* It is used to surly have known values in the fields ant not memory junk.
* After it you can set the fields.
* @param driver pointer to driver variable to initialize
*/
void lv_indev_drv_init(lv_indev_drv_t *driver);
/**
* Register an initialized input device driver.
* @param driver pointer to an initialized 'lv_indev_drv_t' variable (can be local variable)
* @return pointer to the new input device or NULL on error
*/
lv_indev_t * lv_indev_drv_register(lv_indev_drv_t *driver);
/**
* Get the next input device.
* @param indev pointer to the current input device. NULL to initialize.
* @return the next input devise or NULL if no more. Gives the first input device when the parameter is NULL
*/
lv_indev_t * lv_indev_next(lv_indev_t * indev);
/**
* Read data from an input device.
* @param indev pointer to an input device
* @param data input device will write its data here
* @return false: no more data; true: there more data to read (buffered)
*/
bool lv_indev_read(lv_indev_t * indev, lv_indev_data_t *data);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

View File

@@ -1,445 +0,0 @@
/**
* @file anim.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_anim.h"
#if USE_LV_ANIMATION
#include <stddef.h>
#include <string.h>
#include "../lv_hal/lv_hal_tick.h"
#include "lv_task.h"
#include "lv_math.h"
#include "lv_gc.h"
#if defined(LV_GC_INCLUDE)
# include LV_GC_INCLUDE
#endif /* LV_ENABLE_GC */
/*********************
* DEFINES
*********************/
#define LV_ANIM_RESOLUTION 1024
#define LV_ANIM_RES_SHIFT 10
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void anim_task(void * param);
static bool anim_ready_handler(lv_anim_t * a);
/**********************
* STATIC VARIABLES
**********************/
static uint32_t last_task_run;
static bool anim_list_changed;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Init. the animation module
*/
void lv_anim_init(void)
{
lv_ll_init(&LV_GC_ROOT(_lv_anim_ll), sizeof(lv_anim_t));
last_task_run = lv_tick_get();
lv_task_create(anim_task, LV_REFR_PERIOD, LV_TASK_PRIO_MID, NULL);
}
/**
* Create an animation
* @param anim_p an initialized 'anim_t' variable. Not required after call.
*/
void lv_anim_create(lv_anim_t * anim_p)
{
LV_LOG_TRACE("animation create started")
/* Do not let two animations for the same 'var' with the same 'fp'*/
if(anim_p->fp != NULL) lv_anim_del(anim_p->var, anim_p->fp); /*fp == NULL would delete all animations of var*/
/*Add the new animation to the animation linked list*/
lv_anim_t * new_anim = lv_ll_ins_head(&LV_GC_ROOT(_lv_anim_ll));
lv_mem_assert(new_anim);
if(new_anim == NULL) return;
/*Initialize the animation descriptor*/
anim_p->playback_now = 0;
memcpy(new_anim, anim_p, sizeof(lv_anim_t));
/*Set the start value*/
if(new_anim->fp != NULL) new_anim->fp(new_anim->var, new_anim->start);
/* Creating an animation changed the linked list.
* It's important if it happens in a ready callback. (see `anim_task`)*/
anim_list_changed = true;
LV_LOG_TRACE("animation created")
}
/**
* Delete an animation for a variable with a given animator function
* @param var pointer to variable
* @param fp a function pointer which is animating 'var',
* or NULL to delete all animations of 'var'
* @return true: at least 1 animation is deleted, false: no animation is deleted
*/
bool lv_anim_del(void * var, lv_anim_fp_t fp)
{
lv_anim_t * a;
lv_anim_t * a_next;
bool del = false;
a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
while(a != NULL) {
/*'a' might be deleted, so get the next object while 'a' is valid*/
a_next = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a);
if(a->var == var && (a->fp == fp || fp == NULL)) {
lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a);
lv_mem_free(a);
anim_list_changed = true; /*Read by `anim_task`. It need to know if a delete occurred in the linked list*/
del = true;
}
a = a_next;
}
return del;
}
/**
* Get the number of currently running animations
* @return the number of running animations
*/
uint16_t lv_anim_count_running(void)
{
uint16_t cnt = 0;
lv_anim_t * a;
LL_READ(LV_GC_ROOT(_lv_anim_ll), a) cnt++;
return cnt++;
}
/**
* Calculate the time of an animation with a given speed and the start and end values
* @param speed speed of animation in unit/sec
* @param start start value of the animation
* @param end end value of the animation
* @return the required time [ms] for the animation with the given parameters
*/
uint16_t lv_anim_speed_to_time(uint16_t speed, int32_t start, int32_t end)
{
int32_t d = LV_MATH_ABS((int32_t) start - end);
uint32_t time = (int32_t)((int32_t)(d * 1000) / speed);
if(time > UINT16_MAX) time = UINT16_MAX;
if(time == 0) {
time++;
}
return time;
}
/**
* Calculate the current value of an animation applying linear characteristic
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_linear(const lv_anim_t * a)
{
/*Calculate the current step*/
uint16_t step;
if(a->time == a->act_time) step = LV_ANIM_RESOLUTION; /*Use the last value if the time fully elapsed*/
else step = (a->act_time * LV_ANIM_RESOLUTION) / a->time;
/* Get the new value which will be proportional to `step`
* and the `start` and `end` values*/
int32_t new_value;
new_value = (int32_t) step * (a->end - a->start);
new_value = new_value >> LV_ANIM_RES_SHIFT;
new_value += a->start;
return new_value;
}
/**
* Calculate the current value of an animation slowing down the start phase
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_ease_in(const lv_anim_t * a)
{
/*Calculate the current step*/
uint32_t t;
if(a->time == a->act_time) t = 1024;
else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
int32_t step = lv_bezier3(t, 0, 1, 1, 1024);
int32_t new_value;
new_value = (int32_t) step * (a->end - a->start);
new_value = new_value >> 10;
new_value += a->start;
return new_value;
}
/**
* Calculate the current value of an animation slowing down the end phase
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_ease_out(const lv_anim_t * a)
{
/*Calculate the current step*/
uint32_t t;
if(a->time == a->act_time) t = 1024;
else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
int32_t step = lv_bezier3(t, 0, 1023, 1023, 1024);
int32_t new_value;
new_value = (int32_t) step * (a->end - a->start);
new_value = new_value >> 10;
new_value += a->start;
return new_value;
}
/**
* Calculate the current value of an animation applying an "S" characteristic (cosine)
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_ease_in_out(const lv_anim_t * a)
{
/*Calculate the current step*/
uint32_t t;
if(a->time == a->act_time) t = 1024;
else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
int32_t step = lv_bezier3(t, 0, 100, 924, 1024);
int32_t new_value;
new_value = (int32_t) step * (a->end - a->start);
new_value = new_value >> 10;
new_value += a->start;
return new_value;
}
/**
* Calculate the current value of an animation with overshoot at the end
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_overshoot(const lv_anim_t * a)
{
/*Calculate the current step*/
uint32_t t;
if(a->time == a->act_time) t = 1024;
else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
int32_t step = lv_bezier3(t, 0, 600, 1300, 1024);
int32_t new_value;
new_value = (int32_t) step * (a->end - a->start);
new_value = new_value >> 10;
new_value += a->start;
return new_value;
}
/**
* Calculate the current value of an animation with 3 bounces
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_bounce(const lv_anim_t * a)
{
/*Calculate the current step*/
uint32_t t;
if(a->time == a->act_time) t = 1024;
else t = (uint32_t)((uint32_t)a->act_time * 1024) / a->time;
int32_t diff = (a->end - a->start);
/*3 bounces has 5 parts: 3 down and 2 up. One part is t / 5 long*/
if(t < 408){
/*Go down*/
t = (t * 2500) >> 10; /*[0..1024] range*/
}
else if(t >= 408 && t < 614) {
/*First bounce back*/
t -= 408;
t = t * 5; /*to [0..1024] range*/
t = 1024 - t;
diff = diff / 6;
}
else if(t >= 614 && t < 819) {
/*Fall back*/
t -= 614;
t = t * 5; /*to [0..1024] range*/
diff = diff / 6;
}
else if(t >= 819 && t < 921) {
/*Second bounce back*/
t -= 819;
t = t * 10; /*to [0..1024] range*/
t = 1024 - t;
diff = diff / 16;
}
else if(t >= 921 && t <= 1024) {
/*Fall back*/
t -= 921;
t = t * 10; /*to [0..1024] range*/
diff = diff / 16;
}
if(t > 1024) t = 1024;
int32_t step = lv_bezier3(t, 1024, 1024, 800, 0);
int32_t new_value;
new_value = (int32_t) step * diff;
new_value = new_value >> 10;
new_value = a->end - new_value;
return new_value;
}
/**
* Calculate the current value of an animation applying step characteristic.
* (Set end value on the end of the animation)
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_step(const lv_anim_t * a)
{
if(a->act_time >= a->time) return a->end;
else return a->start;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Periodically handle the animations.
* @param param unused
*/
static void anim_task(void * param)
{
(void)param;
lv_anim_t * a;
LL_READ(LV_GC_ROOT(_lv_anim_ll), a) {
a->has_run = 0;
}
uint32_t elaps = lv_tick_elaps(last_task_run);
a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
while(a != NULL) {
/*It can be set by `lv_anim_del()` typically in `end_cb`. If set then an animation delete happened in `anim_ready_handler`
* which could make this linked list reading corrupt because the list is changed meanwhile
*/
anim_list_changed = false;
if(!a->has_run) {
a->has_run = 1; /*The list readying might be reseted so need to know which anim has run already*/
a->act_time += elaps;
if(a->act_time >= 0) {
if(a->act_time > a->time) a->act_time = a->time;
int32_t new_value;
new_value = a->path(a);
if(a->fp != NULL) a->fp(a->var, new_value); /*Apply the calculated value*/
/*If the time is elapsed the animation is ready*/
if(a->act_time >= a->time) {
anim_ready_handler(a);
}
}
}
/* If the linked list changed due to anim. delete then it's not safe to continue
* the reading of the list from here -> start from the head*/
if(anim_list_changed) a = lv_ll_get_head(&LV_GC_ROOT(_lv_anim_ll));
else a = lv_ll_get_next(&LV_GC_ROOT(_lv_anim_ll), a);
}
last_task_run = lv_tick_get();
}
/**
* Called when an animation is ready to do the necessary thinks
* e.g. repeat, play back, delete etc.
* @param a pointer to an animation descriptor
* @return true: animation delete occurred nnd the `LV_GC_ROOT(_lv_anim_ll)` has changed
* */
static bool anim_ready_handler(lv_anim_t * a)
{
/*Delete the animation if
* - no repeat and no play back (simple one shot animation)
* - no repeat, play back is enabled and play back is ready */
if((a->repeat == 0 && a->playback == 0) ||
(a->repeat == 0 && a->playback == 1 && a->playback_now == 1)) {
void (*cb)(void *) = a->end_cb;
void * p = a->var;
lv_ll_rem(&LV_GC_ROOT(_lv_anim_ll), a);
lv_mem_free(a);
anim_list_changed = true;
/* Call the callback function at the end*/
/* Check if an animation is deleted in the cb function
* if yes then the caller function has to know this*/
if(cb != NULL) cb(p);
}
/*If the animation is not deleted then restart it*/
else {
a->act_time = - a->repeat_pause; /*Restart the animation*/
/*Swap the start and end values in play back mode*/
if(a->playback != 0) {
/*If now turning back use the 'playback_pause*/
if(a->playback_now == 0) a->act_time = - a->playback_pause;
/*Toggle the play back state*/
a->playback_now = a->playback_now == 0 ? 1 : 0;
/*Swap the start and end values*/
int32_t tmp;
tmp = a->start;
a->start = a->end;
a->end = tmp;
}
}
return anim_list_changed;
}
#endif

View File

@@ -1,177 +0,0 @@
/**
* @file anim.h
*
*/
#ifndef ANIM_H
#define ANIM_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#if USE_LV_ANIMATION
#include <stdint.h>
#include <stdbool.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
struct _lv_anim_t;
typedef int32_t(*lv_anim_path_t)(const struct _lv_anim_t*);
typedef void (*lv_anim_fp_t)(void *, int32_t);
typedef void (*lv_anim_cb_t)(void *);
typedef struct _lv_anim_t
{
void * var; /*Variable to animate*/
lv_anim_fp_t fp; /*Animator function*/
lv_anim_cb_t end_cb; /*Call it when the animation is ready*/
lv_anim_path_t path; /*An array with the steps of animations*/
int32_t start; /*Start value*/
int32_t end; /*End value*/
uint16_t time; /*Animation time in ms*/
int16_t act_time; /*Current time in animation. Set to negative to make delay.*/
uint16_t playback_pause; /*Wait before play back*/
uint16_t repeat_pause; /*Wait before repeat*/
uint8_t playback :1; /*When the animation is ready play it back*/
uint8_t repeat :1; /*Repeat the animation infinitely*/
/*Animation system use these - user shouldn't set*/
uint8_t playback_now :1; /*Play back is in progress*/
uint32_t has_run :1; /*Indicates the animation has run it this round*/
} lv_anim_t;
/*Example initialization
lv_anim_t a;
a.var = obj;
a.start = lv_obj_get_height(obj);
a.end = new_height;
a.fp = (lv_anim_fp_t)lv_obj_set_height;
a.path = lv_anim_path_linear;
a.end_cb = NULL;
a.act_time = 0;
a.time = 200;
a.playback = 0;
a.playback_pause = 0;
a.repeat = 0;
a.repeat_pause = 0;
lv_anim_create(&a);
*/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Init. the animation module
*/
void lv_anim_init(void);
/**
* Create an animation
* @param anim_p an initialized 'anim_t' variable. Not required after call.
*/
void lv_anim_create(lv_anim_t * anim_p);
/**
* Delete an animation for a variable with a given animatior function
* @param var pointer to variable
* @param fp a function pointer which is animating 'var',
* or NULL to ignore it and delete all animation with 'var
* @return true: at least 1 animation is deleted, false: no animation is deleted
*/
bool lv_anim_del(void * var, lv_anim_fp_t fp);
/**
* Get the number of currently running animations
* @return the number of running animations
*/
uint16_t lv_anim_count_running(void);
/**
* Calculate the time of an animation with a given speed and the start and end values
* @param speed speed of animation in unit/sec
* @param start start value of the animation
* @param end end value of the animation
* @return the required time [ms] for the animation with the given parameters
*/
uint16_t lv_anim_speed_to_time(uint16_t speed, int32_t start, int32_t end);
/**
* Calculate the current value of an animation applying linear characteristic
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_linear(const lv_anim_t *a);
/**
* Calculate the current value of an animation slowing down the start phase
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_ease_in(const lv_anim_t * a);
/**
* Calculate the current value of an animation slowing down the end phase
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_ease_out(const lv_anim_t * a);
/**
* Calculate the current value of an animation applying an "S" characteristic (cosine)
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_ease_in_out(const lv_anim_t *a);
/**
* Calculate the current value of an animation with overshoot at the end
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_overshoot(const lv_anim_t * a);
/**
* Calculate the current value of an animation with 3 bounces
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_bounce(const lv_anim_t * a);
/**
* Calculate the current value of an animation applying step characteristic.
* (Set end value on the end of the animation)
* @param a pointer to an animation
* @return the current value to set
*/
int32_t lv_anim_path_step(const lv_anim_t *a);
/**********************
* MACROS
**********************/
#endif /*USE_LV_ANIMATION == 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_ANIM_H*/

View File

@@ -1,200 +0,0 @@
/**
* @file lv_area.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_area.h"
#include "lv_math.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize an area
* @param area_p pointer to an area
* @param x1 left coordinate of the area
* @param y1 top coordinate of the area
* @param x2 right coordinate of the area
* @param y2 bottom coordinate of the area
*/
void lv_area_set(lv_area_t * area_p, lv_coord_t x1, lv_coord_t y1, lv_coord_t x2, lv_coord_t y2)
{
area_p->x1 = x1;
area_p->y1 = y1;
area_p->x2 = x2;
area_p->y2 = y2;
}
/**
* Set the width of an area
* @param area_p pointer to an area
* @param w the new width of the area (w == 1 makes x1 == x2)
*/
void lv_area_set_width(lv_area_t * area_p, lv_coord_t w)
{
area_p->x2 = area_p->x1 + w - 1;
}
/**
* Set the height of an area
* @param area_p pointer to an area
* @param h the new height of the area (h == 1 makes y1 == y2)
*/
void lv_area_set_height(lv_area_t * area_p, lv_coord_t h)
{
area_p->y2 = area_p->y1 + h - 1;
}
/**
* Set the position of an area (width and height will be kept)
* @param area_p pointer to an area
* @param x the new x coordinate of the area
* @param y the new y coordinate of the area
*/
void lv_area_set_pos(lv_area_t * area_p, lv_coord_t x, lv_coord_t y)
{
lv_coord_t w = lv_area_get_width(area_p);
lv_coord_t h = lv_area_get_height(area_p);
area_p->x1 = x;
area_p->y1 = y;
lv_area_set_width(area_p, w);
lv_area_set_height(area_p, h);
}
/**
* Return with area of an area (x * y)
* @param area_p pointer to an area
* @return size of area
*/
uint32_t lv_area_get_size(const lv_area_t * area_p)
{
uint32_t size;
size = (uint32_t)(area_p->x2 - area_p->x1 + 1) *
(area_p->y2 - area_p->y1 + 1);
return size;
}
/**
* Get the common parts of two areas
* @param res_p pointer to an area, the result will be stored here
* @param a1_p pointer to the first area
* @param a2_p pointer to the second area
* @return false: the two area has NO common parts, res_p is invalid
*/
bool lv_area_intersect(lv_area_t * res_p, const lv_area_t * a1_p, const lv_area_t * a2_p)
{
/* Get the smaller area from 'a1_p' and 'a2_p' */
res_p->x1 = LV_MATH_MAX(a1_p->x1, a2_p->x1);
res_p->y1 = LV_MATH_MAX(a1_p->y1, a2_p->y1);
res_p->x2 = LV_MATH_MIN(a1_p->x2, a2_p->x2);
res_p->y2 = LV_MATH_MIN(a1_p->y2, a2_p->y2);
/*If x1 or y1 greater then x2 or y2 then the areas union is empty*/
bool union_ok = true;
if((res_p->x1 > res_p->x2) ||
(res_p->y1 > res_p->y2)) {
union_ok = false;
}
return union_ok;
}
/**
* Join two areas into a third which involves the other two
* @param res_p pointer to an area, the result will be stored here
* @param a1_p pointer to the first area
* @param a2_p pointer to the second area
*/
void lv_area_join(lv_area_t * a_res_p, const lv_area_t * a1_p, const lv_area_t * a2_p)
{
a_res_p->x1 = LV_MATH_MIN(a1_p->x1, a2_p->x1);
a_res_p->y1 = LV_MATH_MIN(a1_p->y1, a2_p->y1);
a_res_p->x2 = LV_MATH_MAX(a1_p->x2, a2_p->x2);
a_res_p->y2 = LV_MATH_MAX(a1_p->y2, a2_p->y2);
}
/**
* Check if a point is on an area
* @param a_p pointer to an area
* @param p_p pointer to a point
* @return false:the point is out of the area
*/
bool lv_area_is_point_on(const lv_area_t * a_p, const lv_point_t * p_p)
{
bool is_on = false;
if((p_p->x >= a_p->x1 && p_p->x <= a_p->x2) &&
((p_p->y >= a_p->y1 && p_p->y <= a_p->y2))) {
is_on = true;
}
return is_on;
}
/**
* Check if two area has common parts
* @param a1_p pointer to an area.
* @param a2_p pointer to an other area
* @return false: a1_p and a2_p has no common parts
*/
bool lv_area_is_on(const lv_area_t * a1_p, const lv_area_t * a2_p)
{
if((a1_p->x1 <= a2_p->x2) &&
(a1_p->x2 >= a2_p->x1) &&
(a1_p->y1 <= a2_p->y2) &&
(a1_p->y2 >= a2_p->y1)) {
return true;
} else {
return false;
}
}
/**
* Check if an area is fully on an other
* @param ain_p pointer to an area which could be in 'aholder_p'
* @param aholder pointer to an area which could involve 'ain_p'
* @return
*/
bool lv_area_is_in(const lv_area_t * ain_p, const lv_area_t * aholder_p)
{
bool is_in = false;
if(ain_p->x1 >= aholder_p->x1 &&
ain_p->y1 >= aholder_p->y1 &&
ain_p->x2 <= aholder_p->x2 &&
ain_p->y2 <= aholder_p->y2) {
is_in = true;
}
return is_in;
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@@ -1,79 +0,0 @@
/**
* @file lv_circ.c
* Circle drawing algorithm (with Bresenham)
* Only a 1/8 circle is calculated. Use CIRC_OCT1_X, CIRC_OCT1_Y macros to get
* the other octets.
*/
/*********************
* INCLUDES
*********************/
#include "lv_circ.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the circle drawing
* @param c pointer to a point. The coordinates will be calculated here
* @param tmp point to a variable. It will store temporary data
* @param radius radius of the circle
*/
void lv_circ_init(lv_point_t * c, lv_coord_t * tmp, lv_coord_t radius)
{
c->x = radius;
c->y = 0;
*tmp = 1 - radius;
}
/**
* Test the circle drawing is ready or not
* @param c same as in circ_init
* @return true if the circle is not ready yet
*/
bool lv_circ_cont(lv_point_t * c)
{
return c->y <= c->x ? true : false;
}
/**
* Get the next point from the circle
* @param c same as in circ_init. The next point stored here.
* @param tmp same as in circ_init.
*/
void lv_circ_next(lv_point_t * c, lv_coord_t * tmp)
{
c->y++;
if(*tmp <= 0) {
(*tmp) += 2 * c->y + 1; // Change in decision criterion for y -> y+1
} else {
c->x--;
(*tmp) += 2 * (c->y - c->x) + 1; // Change for y -> y+1, x -> x-1
}
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@@ -1,79 +0,0 @@
/**
* @file lv_circ.h
*
*/
#ifndef LV_CIRC_H
#define LV_CIRC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stddef.h>
#include "lv_area.h"
/*********************
* DEFINES
*********************/
#define LV_CIRC_OCT1_X(p) (p.x)
#define LV_CIRC_OCT1_Y(p) (p.y)
#define LV_CIRC_OCT2_X(p) (p.y)
#define LV_CIRC_OCT2_Y(p) (p.x)
#define LV_CIRC_OCT3_X(p) (-p.y)
#define LV_CIRC_OCT3_Y(p) (p.x)
#define LV_CIRC_OCT4_X(p) (-p.x)
#define LV_CIRC_OCT4_Y(p) (p.y)
#define LV_CIRC_OCT5_X(p) (-p.x)
#define LV_CIRC_OCT5_Y(p) (-p.y)
#define LV_CIRC_OCT6_X(p) (-p.y)
#define LV_CIRC_OCT6_Y(p) (-p.x)
#define LV_CIRC_OCT7_X(p) (p.y)
#define LV_CIRC_OCT7_Y(p) (-p.x)
#define LV_CIRC_OCT8_X(p) (p.x)
#define LV_CIRC_OCT8_Y(p) (-p.y)
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the circle drawing
* @param c pointer to a point. The coordinates will be calculated here
* @param tmp point to a variable. It will store temporary data
* @param radius radius of the circle
*/
void lv_circ_init(lv_point_t * c, lv_coord_t * tmp, lv_coord_t radius);
/**
* Test the circle drawing is ready or not
* @param c same as in circ_init
* @return true if the circle is not ready yet
*/
bool lv_circ_cont(lv_point_t * c);
/**
* Get the next point from the circle
* @param c same as in circ_init. The next point stored here.
* @param tmp same as in circ_init.
*/
void lv_circ_next(lv_point_t * c, lv_coord_t * tmp);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

View File

@@ -1,143 +0,0 @@
/**
* @file lv_color.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_color.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Convert a HSV color to RGB
* @param h hue [0..359]
* @param s saturation [0..100]
* @param v value [0..100]
* @return the given RGB color in RGB (with LV_COLOR_DEPTH depth)
*/
lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v)
{
h = (uint32_t)((uint32_t)h * 255) / 360;
s = (uint16_t)((uint16_t)s * 255) / 100;
v = (uint16_t)((uint16_t)v * 255) / 100;
uint8_t r, g, b;
uint8_t region, remainder, p, q, t;
if(s == 0) {
r = v;
g = v;
b = v;
return LV_COLOR_MAKE(v, v, v);
}
region = h / 43;
remainder = (h - (region * 43)) * 6;
p = (v * (255 - s)) >> 8;
q = (v * (255 - ((s * remainder) >> 8))) >> 8;
t = (v * (255 - ((s * (255 - remainder)) >> 8))) >> 8;
switch(region) {
case 0:
r = v;
g = t;
b = p;
break;
case 1:
r = q;
g = v;
b = p;
break;
case 2:
r = p;
g = v;
b = t;
break;
case 3:
r = p;
g = q;
b = v;
break;
case 4:
r = t;
g = p;
b = v;
break;
default:
r = v;
g = p;
b = q;
break;
}
lv_color_t result = LV_COLOR_MAKE(r, g, b);
return result;
}
/**
* Convert an RGB color to HSV
* @param r red
* @param g green
* @param b blue
* @return the given RGB color n HSV
*/
lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r, uint8_t g, uint8_t b)
{
lv_color_hsv_t hsv;
uint8_t rgbMin, rgbMax;
rgbMin = r < g ? (r < b ? r : b) : (g < b ? g : b);
rgbMax = r > g ? (r > b ? r : b) : (g > b ? g : b);
hsv.v = rgbMax;
if(hsv.v == 0) {
hsv.h = 0;
hsv.s = 0;
return hsv;
}
hsv.s = 255 * (long)(rgbMax - rgbMin) / hsv.v;
if(hsv.s == 0) {
hsv.h = 0;
return hsv;
}
if(rgbMax == r)
hsv.h = 0 + 43 * (g - b) / (rgbMax - rgbMin);
else if(rgbMax == g)
hsv.h = 85 + 43 * (b - r) / (rgbMax - rgbMin);
else
hsv.h = 171 + 43 * (r - g) / (rgbMax - rgbMin);
return hsv;
}

View File

@@ -1,441 +0,0 @@
/**
* @file lv_color.h
*
*/
#ifndef LV_COLOR_H
#define LV_COLOR_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
/*Error checking*/
#if LV_COLOR_DEPTH == 24
#error "LV_COLOR_DEPTH 24 is deprecated. Use LV_COLOR_DEPTH 32 instead (lv_conf.h)"
#endif
#if LV_COLOR_DEPTH != 32 && LV_COLOR_SCREEN_TRANSP != 0
#error "LV_COLOR_SCREEN_TRANSP requires LV_COLOR_DEPTH == 32. Set it in lv_conf.h"
#endif
#if LV_COLOR_DEPTH != 16 && LV_COLOR_16_SWAP != 0
#error "LV_COLOR_16_SWAP requires LV_COLOR_DEPTH == 16. Set it in lv_conf.h"
#endif
#include <stdint.h>
/*********************
* DEFINES
*********************/
#define LV_COLOR_WHITE LV_COLOR_MAKE(0xFF,0xFF,0xFF)
#define LV_COLOR_SILVER LV_COLOR_MAKE(0xC0,0xC0,0xC0)
#define LV_COLOR_GRAY LV_COLOR_MAKE(0x80,0x80,0x80)
#define LV_COLOR_BLACK LV_COLOR_MAKE(0x00,0x00,0x00)
#define LV_COLOR_RED LV_COLOR_MAKE(0xFF,0x00,0x00)
#define LV_COLOR_MAROON LV_COLOR_MAKE(0x80,0x00,0x00)
#define LV_COLOR_YELLOW LV_COLOR_MAKE(0xFF,0xFF,0x00)
#define LV_COLOR_OLIVE LV_COLOR_MAKE(0x80,0x80,0x00)
#define LV_COLOR_LIME LV_COLOR_MAKE(0x00,0xFF,0x00)
#define LV_COLOR_GREEN LV_COLOR_MAKE(0x00,0x80,0x00)
#define LV_COLOR_CYAN LV_COLOR_MAKE(0x00,0xFF,0xFF)
#define LV_COLOR_AQUA LV_COLOR_CYAN
#define LV_COLOR_TEAL LV_COLOR_MAKE(0x00,0x80,0x80)
#define LV_COLOR_BLUE LV_COLOR_MAKE(0x00,0x00,0xFF)
#define LV_COLOR_NAVY LV_COLOR_MAKE(0x00,0x00,0x80)
#define LV_COLOR_MAGENTA LV_COLOR_MAKE(0xFF,0x00,0xFF)
#define LV_COLOR_PURPLE LV_COLOR_MAKE(0x80,0x00,0x80)
#define LV_COLOR_ORANGE LV_COLOR_MAKE(0xFF,0xA5,0x00)
enum {
LV_OPA_TRANSP = 0,
LV_OPA_0 = 0,
LV_OPA_10 = 25,
LV_OPA_20 = 51,
LV_OPA_30 = 76,
LV_OPA_40 = 102,
LV_OPA_50 = 127,
LV_OPA_60 = 153,
LV_OPA_70 = 178,
LV_OPA_80 = 204,
LV_OPA_90 = 229,
LV_OPA_100 = 255,
LV_OPA_COVER = 255,
};
#define LV_OPA_MIN 16 /*Opacities below this will be transparent*/
#define LV_OPA_MAX 251 /*Opacities above this will fully cover*/
#if LV_COLOR_DEPTH == 1
#define LV_COLOR_SIZE 8
#elif LV_COLOR_DEPTH == 8
#define LV_COLOR_SIZE 8
#elif LV_COLOR_DEPTH == 16
#define LV_COLOR_SIZE 16
#elif LV_COLOR_DEPTH == 32
#define LV_COLOR_SIZE 32
#else
#error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!"
#endif
/**********************
* TYPEDEFS
**********************/
typedef union
{
uint8_t blue :1;
uint8_t green :1;
uint8_t red :1;
uint8_t full :1;
} lv_color1_t;
typedef union
{
struct
{
uint8_t blue :2;
uint8_t green :3;
uint8_t red :3;
};
uint8_t full;
} lv_color8_t;
typedef union
{
struct
{
#if LV_COLOR_16_SWAP == 0
uint16_t blue :5;
uint16_t green :6;
uint16_t red :5;
#else
uint16_t green_h :3;
uint16_t red :5;
uint16_t blue :5;
uint16_t green_l :3;
#endif
};
uint16_t full;
} lv_color16_t;
typedef union
{
struct
{
uint8_t blue;
uint8_t green;
uint8_t red;
uint8_t alpha;
};
uint32_t full;
} lv_color32_t;
#if LV_COLOR_DEPTH == 1
typedef uint8_t lv_color_int_t;
typedef lv_color1_t lv_color_t;
#elif LV_COLOR_DEPTH == 8
typedef uint8_t lv_color_int_t;
typedef lv_color8_t lv_color_t;
#elif LV_COLOR_DEPTH == 16
typedef uint16_t lv_color_int_t;
typedef lv_color16_t lv_color_t;
#elif LV_COLOR_DEPTH == 32
typedef uint32_t lv_color_int_t;
typedef lv_color32_t lv_color_t;
#else
#error "Invalid LV_COLOR_DEPTH in lv_conf.h! Set it to 1, 8, 16 or 32!"
#endif
typedef uint8_t lv_opa_t;
typedef struct
{
uint16_t h;
uint8_t s;
uint8_t v;
} lv_color_hsv_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/*In color conversations:
* - When converting to bigger color type the LSB weight of 1 LSB is calculated
* E.g. 16 bit Red has 5 bits
* 8 bit Red has 2 bits
* ----------------------
* 8 bit red LSB = (2^5 - 1) / (2^2 - 1) = 31 / 3 = 10
*
* - When calculating to smaller color type simply shift out the LSBs
* E.g. 8 bit Red has 2 bits
* 16 bit Red has 5 bits
* ----------------------
* Shift right with 5 - 3 = 2
*/
static inline uint8_t lv_color_to1(lv_color_t color)
{
#if LV_COLOR_DEPTH == 1
return color.full;
#elif LV_COLOR_DEPTH == 8
if((color.red & 0x4) ||
(color.green & 0x4) ||
(color.blue & 0x2)) {
return 1;
} else {
return 0;
}
#elif LV_COLOR_DEPTH == 16
# if LV_COLOR_16_SWAP == 0
if((color.red & 0x10) ||
(color.green & 0x20) ||
(color.blue & 0x10)) {
return 1;
# else
if((color.red & 0x10) ||
(color.green_h & 0x20) ||
(color.blue & 0x10)) {
return 1;
# endif
} else {
return 0;
}
#elif LV_COLOR_DEPTH == 32
if((color.red & 0x80) ||
(color.green & 0x80) ||
(color.blue & 0x80)) {
return 1;
} else {
return 0;
}
#endif
}
static inline uint8_t lv_color_to8(lv_color_t color)
{
#if LV_COLOR_DEPTH == 1
if(color.full == 0) return 0;
else return 0xFF;
#elif LV_COLOR_DEPTH == 8
return color.full;
#elif LV_COLOR_DEPTH == 16
# if LV_COLOR_16_SWAP == 0
lv_color8_t ret;
ret.red = color.red >> 2; /* 5 - 3 = 2*/
ret.green = color.green >> 3; /* 6 - 3 = 3*/
ret.blue = color.blue >> 3; /* 5 - 2 = 3*/
return ret.full;
# else
lv_color8_t ret;
ret.red = color.red >> 2; /* 5 - 3 = 2*/
ret.green = color.green_h; /* 6 - 3 = 3*/
ret.blue = color.blue >> 3; /* 5 - 2 = 3*/
return ret.full;
# endif
#elif LV_COLOR_DEPTH == 32
lv_color8_t ret;
ret.red = color.red >> 5; /* 8 - 3 = 5*/
ret.green = color.green >> 5; /* 8 - 3 = 5*/
ret.blue = color.blue >> 6; /* 8 - 2 = 6*/
return ret.full;
#endif
}
static inline uint16_t lv_color_to16(lv_color_t color)
{
#if LV_COLOR_DEPTH == 1
if(color.full == 0) return 0;
else return 0xFFFF;
#elif LV_COLOR_DEPTH == 8
lv_color16_t ret;
# if LV_COLOR_16_SWAP == 0
ret.red = color.red * 4; /*(2^5 - 1)/(2^3 - 1) = 31/7 = 4*/
ret.green = color.green * 9; /*(2^6 - 1)/(2^3 - 1) = 63/7 = 9*/
ret.blue = color.blue * 10; /*(2^5 - 1)/(2^2 - 1) = 31/3 = 10*/
# else
ret.red = color.red * 4;
uint8_t g_tmp = color.green * 9;
ret.green_h = (g_tmp & 0x1F) >> 3;
ret.green_l = g_tmp & 0x07;
ret.blue = color.blue * 10;
# endif
return ret.full;
#elif LV_COLOR_DEPTH == 16
return color.full;
#elif LV_COLOR_DEPTH == 32
lv_color16_t ret;
# if LV_COLOR_16_SWAP == 0
ret.red = color.red >> 3; /* 8 - 5 = 3*/
ret.green = color.green >> 2; /* 8 - 6 = 2*/
ret.blue = color.blue >> 3; /* 8 - 5 = 3*/
# else
ret.red = color.red >> 3;
ret.green_h = (color.green & 0xE0) >> 5;
ret.green_l = (color.green & 0x1C) >> 2;
ret.blue = color.blue >> 3;
# endif
return ret.full;
#endif
}
static inline uint32_t lv_color_to32(lv_color_t color)
{
#if LV_COLOR_DEPTH == 1
if(color.full == 0) return 0;
else return 0xFFFFFFFF;
#elif LV_COLOR_DEPTH == 8
lv_color32_t ret;
ret.red = color.red * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/
ret.green = color.green * 36; /*(2^8 - 1)/(2^3 - 1) = 255/7 = 36*/
ret.blue = color.blue * 85; /*(2^8 - 1)/(2^2 - 1) = 255/3 = 85*/
ret.alpha = 0xFF;
return ret.full;
#elif LV_COLOR_DEPTH == 16
# if LV_COLOR_16_SWAP == 0
lv_color32_t ret;
ret.red = color.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/
ret.green = color.green * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/
ret.blue = color.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/
ret.alpha = 0xFF;
return ret.full;
# else
lv_color32_t ret;
ret.red = color.red * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/
ret.green = ((color.green_h << 3) + color.green_l) * 4; /*(2^8 - 1)/(2^6 - 1) = 255/63 = 4*/
ret.blue = color.blue * 8; /*(2^8 - 1)/(2^5 - 1) = 255/31 = 8*/
ret.alpha = 0xFF;
return ret.full;
# endif
#elif LV_COLOR_DEPTH == 32
return color.full;
#endif
}
static inline lv_color_t lv_color_mix(lv_color_t c1, lv_color_t c2, uint8_t mix)
{
lv_color_t ret;
#if LV_COLOR_DEPTH != 1
/*LV_COLOR_DEPTH == 8, 16 or 32*/
ret.red = (uint16_t)((uint16_t) c1.red * mix + (c2.red * (255 - mix))) >> 8;
# if LV_COLOR_DEPTH == 16 && LV_COLOR_16_SWAP
/*If swapped Green is in 2 parts*/
uint16_t g_1 = (c1.green_h << 3) + c1.green_l;
uint16_t g_2 = (c2.green_h << 3) + c2.green_l;
uint16_t g_out = (uint16_t)((uint16_t) g_1 * mix + (g_2 * (255 - mix))) >> 8;
ret.green_h = g_out >> 3;
ret.green_l = g_out & 0x7;
# else
ret.green = (uint16_t)((uint16_t) c1.green * mix + (c2.green * (255 - mix))) >> 8;
# endif
ret.blue = (uint16_t)((uint16_t) c1.blue * mix + (c2.blue * (255 - mix))) >> 8;
# if LV_COLOR_DEPTH == 32
ret.alpha = 0xFF;
# endif
#else
/*LV_COLOR_DEPTH == 1*/
ret.full = mix > LV_OPA_50 ? c1.full : c2.full;
#endif
return ret;
}
/**
* Get the brightness of a color
* @param color a color
* @return the brightness [0..255]
*/
static inline uint8_t lv_color_brightness(lv_color_t color)
{
lv_color32_t c32;
c32.full = lv_color_to32(color);
uint16_t bright = 3 * c32.red + c32.blue + 4 * c32.green;
return (uint16_t) bright >> 3;
}
/* The most simple macro to create a color from R,G and B values
* The order of bit field is different on Big-endian and Little-endian machines*/
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#if LV_COLOR_DEPTH == 1
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){(b8 >> 7 | g8 >> 7 | r8 >> 7)})
#elif LV_COLOR_DEPTH == 8
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 6, g8 >> 5, r8 >> 5}})
#elif LV_COLOR_DEPTH == 16
# if LV_COLOR_16_SWAP == 0
# define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8 >> 3, g8 >> 2, r8 >> 3}})
# else
# define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{g8 >> 5, r8 >> 3, b8 >> 3, (g8 >> 2) & 0x7}})
# endif
#elif LV_COLOR_DEPTH == 32
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{b8, g8, r8, 0xff}}) /*Fix 0xff alpha*/
#endif
#else
#if LV_COLOR_DEPTH == 1
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){(r8 >> 7 | g8 >> 7 | b8 >> 7)})
#elif LV_COLOR_DEPTH == 8
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{r8 >> 6, g8 >> 5, b8 >> 5}})
#elif LV_COLOR_DEPTH == 16
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{r8 >> 3, g8 >> 2, b8 >> 3}})
#elif LV_COLOR_DEPTH == 32
#define LV_COLOR_MAKE(r8, g8, b8) ((lv_color_t){{0xff, r8, g8, b8}}) /*Fix 0xff alpha*/
#endif
#endif
#define LV_COLOR_HEX(c) LV_COLOR_MAKE((uint8_t) ((uint32_t)((uint32_t)c >> 16) & 0xFF), \
(uint8_t) ((uint32_t)((uint32_t)c >> 8) & 0xFF), \
(uint8_t) ((uint32_t) c & 0xFF))
/*Usage LV_COLOR_HEX3(0x16C) which means LV_COLOR_HEX(0x1166CC)*/
#define LV_COLOR_HEX3(c) LV_COLOR_MAKE((uint8_t) (((c >> 4) & 0xF0) | ((c >> 8) & 0xF)), \
(uint8_t) ((uint32_t)(c & 0xF0) | ((c & 0xF0) >> 4)), \
(uint8_t) ((uint32_t)(c & 0xF) | ((c & 0xF) << 4)))
static inline lv_color_t lv_color_hex(uint32_t c){
return LV_COLOR_HEX(c);
}
static inline lv_color_t lv_color_hex3(uint32_t c){
return LV_COLOR_HEX3(c);
}
/**
* Convert a HSV color to RGB
* @param h hue [0..359]
* @param s saturation [0..100]
* @param v value [0..100]
* @return the given RGB color in RGB (with LV_COLOR_DEPTH depth)
*/
lv_color_t lv_color_hsv_to_rgb(uint16_t h, uint8_t s, uint8_t v);
/**
* Convert an RGB color to HSV
* @param r red
* @param g green
* @param b blue
* @return the given RGB color n HSV
*/
lv_color_hsv_t lv_color_rgb_to_hsv(uint8_t r, uint8_t g, uint8_t b);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*USE_COLOR*/

View File

@@ -1,269 +0,0 @@
/**
* @file lv_font.c
*
*/
/*********************
* INCLUDES
*********************/
#include <stddef.h>
#include "lv_font.h"
#include "lv_log.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the fonts
*/
void lv_font_init(void)
{
lv_font_builtin_init();
}
/**
* Add a font to an other to extend the character set.
* @param child the font to add
* @param parent this font will be extended. Using it later will contain the characters from `child`
*/
void lv_font_add(lv_font_t * child, lv_font_t * parent)
{
if(parent == NULL) return;
while(parent->next_page != NULL) {
parent = parent->next_page; /*Got to the last page and add the new font there*/
}
parent->next_page = child;
}
/**
* Remove a font from a character set.
* @param child the font to remove
* @param parent remove `child` from here
*/
void lv_font_remove(lv_font_t * child, lv_font_t * parent)
{
if(parent == NULL) return;
if(child == NULL) return;
while(parent->next_page != child) {
parent = parent->next_page; /*Got to the last page and add the new font there*/
}
parent->next_page = child->next_page;
}
/**
* Tells if font which contains `letter` is monospace or not
* @param font_p point to font
* @param letter an UNICODE character code
* @return true: the letter is monospace; false not monospace
*/
bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter)
{
const lv_font_t * font_i = font_p;
int16_t w;
while(font_i != NULL) {
w = font_i->get_width(font_i, letter);
if(w >= 0) {
/*Glyph found*/
if(font_i->monospace) return true;
return false;
}
font_i = font_i->next_page;
}
return 0;
}
/**
* Return with the bitmap of a font.
* @param font_p pointer to a font
* @param letter an UNICODE character code
* @return pointer to the bitmap of the letter
*/
const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter)
{
const lv_font_t * font_i = font_p;
while(font_i != NULL) {
const uint8_t * bitmap = font_i->get_bitmap(font_i, letter);
if(bitmap) return bitmap;
font_i = font_i->next_page;
}
return NULL;
}
/**
* Get the width of a letter in a font. If `monospace` is set then return with it.
* @param font_p pointer to a font
* @param letter an UNICODE character code
* @return the width of a letter
*/
uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter)
{
const lv_font_t * font_i = font_p;
int16_t w;
while(font_i != NULL) {
w = font_i->get_width(font_i, letter);
if(w >= 0) {
/*Glyph found*/
uint8_t m = font_i->monospace;
if(m) w = m;
return w;
}
font_i = font_i->next_page;
}
return 0;
}
/**
* Get the width of the letter without overwriting it with the `monospace` attribute
* @param font_p pointer to a font
* @param letter an UNICODE character code
* @return the width of a letter
*/
uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter)
{
const lv_font_t * font_i = font_p;
int16_t w;
while(font_i != NULL) {
w = font_i->get_width(font_i, letter);
if(w >= 0) return w;
font_i = font_i->next_page;
}
return 0;
}
/**
* Get the bit-per-pixel of font
* @param font pointer to font
* @param letter a letter from font (font extensions can have different bpp)
* @return bpp of the font (or font extension)
*/
uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter)
{
const lv_font_t * font_i = font;
while(font_i != NULL) {
if(letter >= font_i->unicode_first && letter <= font_i->unicode_last) {
return font_i->bpp;
}
font_i = font_i->next_page;
}
return 0;
}
/**
* Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in the range
* @param font pointer to font
* @param unicode_letter an unicode letter which bitmap should be get
* @return pointer to the bitmap or NULL if not found
*/
const uint8_t * lv_font_get_bitmap_continuous(const lv_font_t * font, uint32_t unicode_letter)
{
/*Check the range*/
if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL;
uint32_t index = (unicode_letter - font->unicode_first);
return &font->glyph_bitmap[font->glyph_dsc[index].glyph_index];
}
/**
* Generic bitmap get function used in 'font->get_bitmap' when the font NOT contains all characters in the range (sparse)
* @param font pointer to font
* @param unicode_letter an unicode letter which bitmap should be get
* @return pointer to the bitmap or NULL if not found
*/
const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unicode_letter)
{
/*Check the range*/
if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return NULL;
uint32_t i;
for(i = 0; font->unicode_list[i] != 0; i++) {
if(font->unicode_list[i] == unicode_letter) {
return &font->glyph_bitmap[font->glyph_dsc[i].glyph_index];
}
}
return NULL;
}
/**
* Generic glyph width get function used in 'font->get_width' when the font contains all characters in the range
* @param font pointer to font
* @param unicode_letter an unicode letter which width should be get
* @return width of the gylph or -1 if not found
*/
int16_t lv_font_get_width_continuous(const lv_font_t * font, uint32_t unicode_letter)
{
/*Check the range*/
if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) {
return -1;
}
uint32_t index = (unicode_letter - font->unicode_first);
return font->glyph_dsc[index].w_px;
}
/**
* Generic glyph width get function used in 'font->get_bitmap' when the font NOT contains all characters in the range (sparse)
* @param font pointer to font
* @param unicode_letter an unicode letter which width should be get
* @return width of the glyph or -1 if not found
*/
int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter)
{
/*Check the range*/
if(unicode_letter < font->unicode_first || unicode_letter > font->unicode_last) return -1;
uint32_t i;
for(i = 0; font->unicode_list[i] != 0; i++) {
if(font->unicode_list[i] == unicode_letter) {
return font->glyph_dsc[i].w_px;
}
}
return -1;
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@@ -1,192 +0,0 @@
/**
* @file lv_font.h
*
*/
#ifndef LV_FONT_H
#define LV_FONT_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#include "lv_symbol_def.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
uint32_t w_px :8;
uint32_t glyph_index :24;
} lv_font_glyph_dsc_t;
typedef struct
{
uint32_t unicode :21;
uint32_t glyph_dsc_index :11;
} lv_font_unicode_map_t;
typedef struct _lv_font_struct
{
uint32_t unicode_first;
uint32_t unicode_last;
const uint8_t * glyph_bitmap;
const lv_font_glyph_dsc_t * glyph_dsc;
const uint32_t * unicode_list;
const uint8_t * (*get_bitmap)(const struct _lv_font_struct *,uint32_t); /*Get a glyph's bitmap from a font*/
int16_t (*get_width)(const struct _lv_font_struct *,uint32_t); /*Get a glyph's with with a given font*/
struct _lv_font_struct * next_page; /*Pointer to a font extension*/
uint32_t h_px :8;
uint32_t bpp :4; /*Bit per pixel: 1, 2 or 4*/
uint32_t monospace :8; /*Fix width (0: normal width)*/
uint16_t glyph_cnt; /*Number of glyphs (letters) in the font*/
} lv_font_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the fonts
*/
void lv_font_init(void);
/**
* Add a font to an other to extend the character set.
* @param child the font to add
* @param parent this font will be extended. Using it later will contain the characters from `child`
*/
void lv_font_add(lv_font_t *child, lv_font_t *parent);
/**
* Remove a font from a character set.
* @param child the font to remove
* @param parent remove `child` from here
*/
void lv_font_remove(lv_font_t * child, lv_font_t * parent);
/**
* Tells if font which contains `letter` is monospace or not
* @param font_p point to font
* @param letter an UNICODE character code
* @return true: the letter is monospace; false not monospace
*/
bool lv_font_is_monospace(const lv_font_t * font_p, uint32_t letter);
/**
* Return with the bitmap of a font.
* @param font_p pointer to a font
* @param letter an UNICODE character code
* @return pointer to the bitmap of the letter
*/
const uint8_t * lv_font_get_bitmap(const lv_font_t * font_p, uint32_t letter);
/**
* Get the width of a letter in a font. If `monospace` is set then return with it.
* @param font_p pointer to a font
* @param letter an UNICODE character code
* @return the width of a letter
*/
uint8_t lv_font_get_width(const lv_font_t * font_p, uint32_t letter);
/**
* Get the width of the letter without overwriting it with the `monospace` attribute
* @param font_p pointer to a font
* @param letter an UNICODE character code
* @return the width of a letter
*/
uint8_t lv_font_get_real_width(const lv_font_t * font_p, uint32_t letter);
/**
* Get the height of a font
* @param font_p pointer to a font
* @return the height of a font
*/
static inline uint8_t lv_font_get_height(const lv_font_t * font_p)
{
return font_p->h_px;
}
/**
* Get the bit-per-pixel of font
* @param font pointer to font
* @param letter a letter from font (font extensions can have different bpp)
* @return bpp of the font (or font extension)
*/
uint8_t lv_font_get_bpp(const lv_font_t * font, uint32_t letter);
/**
* Generic bitmap get function used in 'font->get_bitmap' when the font contains all characters in the range
* @param font pointer to font
* @param unicode_letter an unicode letter which bitmap should be get
* @return pointer to the bitmap or NULL if not found
*/
const uint8_t * lv_font_get_bitmap_continuous(const lv_font_t * font, uint32_t unicode_letter);
/**
* Generic bitmap get function used in 'font->get_bitmap' when the font NOT contains all characters in the range (sparse)
* @param font pointer to font
* @param unicode_letter an unicode letter which bitmap should be get
* @return pointer to the bitmap or NULL if not found
*/
const uint8_t * lv_font_get_bitmap_sparse(const lv_font_t * font, uint32_t unicode_letter);
/**
* Generic glyph width get function used in 'font->get_width' when the font contains all characters in the range
* @param font pointer to font
* @param unicode_letter an unicode letter which width should be get
* @return width of the gylph or -1 if not found
*/
int16_t lv_font_get_width_continuous(const lv_font_t * font, uint32_t unicode_letter);
/**
* Generic glyph width get function used in 'font->get_bitmap' when the font NOT contains all characters in the range (sparse)
* @param font pointer to font
* @param unicode_letter an unicode letter which width should be get
* @return width of the glyph or -1 if not found
*/
int16_t lv_font_get_width_sparse(const lv_font_t * font, uint32_t unicode_letter);
/**********************
* MACROS
**********************/
#define LV_FONT_DECLARE(font_name) extern lv_font_t font_name;
/**********************
* ADD BUILT IN FONTS
**********************/
#include "../lv_fonts/lv_font_builtin.h"
/*Declare the custom (user defined) fonts*/
#ifdef LV_FONT_CUSTOM_DECLARE
LV_FONT_CUSTOM_DECLARE
#endif
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*USE_FONT*/

View File

@@ -1,77 +0,0 @@
/**
* @file lv_gc.h
*
*/
#ifndef LV_GC_H
#define LV_GC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#include <stdint.h>
#include <stdbool.h>
#include "lv_mem.h"
#include "lv_ll.h"
/*********************
* DEFINES
*********************/
#define LV_GC_ROOTS(prefix) \
prefix lv_ll_t _lv_task_ll; /*Linked list to store the lv_tasks*/ \
prefix lv_ll_t _lv_scr_ll; /*Linked list of screens*/ \
prefix lv_ll_t _lv_drv_ll;\
prefix lv_ll_t _lv_file_ll;\
prefix lv_ll_t _lv_anim_ll;\
prefix void * _lv_def_scr;\
prefix void * _lv_act_scr;\
prefix void * _lv_top_layer;\
prefix void * _lv_sys_layer;\
prefix void * _lv_task_act;\
prefix void * _lv_indev_list;\
prefix void * _lv_disp_list;\
#define LV_NO_PREFIX
#define LV_ROOTS LV_GC_ROOTS(LV_NO_PREFIX)
#if LV_ENABLE_GC == 1
# if LV_MEM_CUSTOM != 1
# error "GC requires CUSTOM_MEM"
# endif /* LV_MEM_CUSTOM */
#else /* LV_ENABLE_GC */
# define LV_GC_ROOT(x) x
LV_GC_ROOTS(extern)
#endif /* LV_ENABLE_GC */
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_GC_H*/

View File

@@ -1,76 +0,0 @@
/**
* @file lv_log.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_log.h"
#if USE_LV_LOG
#if LV_LOG_PRINTF
#include <stdio.h>
#endif
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
static void (*print_cb)(lv_log_level_t, const char *, uint32_t, const char *);
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Register custom print (or anything else) function to call when log is added
* @param f a function pointer:
* `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * dsc)`
*/
void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const char *))
{
print_cb = f;
}
/**
* Add a log
* @param level the level of log. (From `lv_log_level_t` enum)
* @param file name of the file when the log added
* @param line line number in the source code where the log added
* @param dsc description of the log
*/
void lv_log_add(lv_log_level_t level, const char * file, int line, const char * dsc)
{
if(level >= _LV_LOG_LEVEL_NUM) return; /*Invalid level*/
if(level >= LV_LOG_LEVEL) {
#if LV_LOG_PRINTF
static const char * lvl_prefix[] = {"Trace", "Info", "Warn", "Error"};
printf("%s: %s \t(%s #%d)\n", lvl_prefix[level], dsc, file, line);
#else
if(print_cb) print_cb(level, file, line, dsc);
#endif
}
}
/**********************
* STATIC FUNCTIONS
**********************/
#endif /*USE_LV_LOG*/

View File

@@ -1,86 +0,0 @@
/**
* @file lv_log.h
*
*/
#ifndef LV_LOG_H
#define LV_LOG_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#ifdef LV_CONF_INCLUDE_SIMPLE
#include "lv_conf.h"
#else
#include "../../lv_conf.h"
#endif
#include <stdint.h>
/*********************
* DEFINES
*********************/
/*Possible log level. For compatibility declare it independently from `USE_LV_LOG`*/
#define LV_LOG_LEVEL_TRACE 0 /*A lot of logs to give detailed information*/
#define LV_LOG_LEVEL_INFO 1 /*Log important events*/
#define LV_LOG_LEVEL_WARN 2 /*Log if something unwanted happened but didn't caused problem*/
#define LV_LOG_LEVEL_ERROR 3 /*Only critical issue, when the system may fail*/
#define _LV_LOG_LEVEL_NUM 4
typedef int8_t lv_log_level_t;
#if USE_LV_LOG
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Register custom print (or anything else) function to call when log is added
* @param f a function pointer:
* `void my_print (lv_log_level_t level, const char * file, uint32_t line, const char * dsc)`
*/
void lv_log_register_print(void f(lv_log_level_t, const char *, uint32_t, const char *));
/**
* Add a log
* @param level the level of log. (From `lv_log_level_t` enum)
* @param file name of the file when the log added
* @param line line number in the source code where the log added
* @param dsc description of the log
*/
void lv_log_add(lv_log_level_t level, const char * file, int line, const char * dsc);
/**********************
* MACROS
**********************/
#define LV_LOG_TRACE(dsc) lv_log_add(LV_LOG_LEVEL_TRACE, __FILE__, __LINE__, dsc);
#define LV_LOG_INFO(dsc) lv_log_add(LV_LOG_LEVEL_INFO, __FILE__, __LINE__, dsc);
#define LV_LOG_WARN(dsc) lv_log_add(LV_LOG_LEVEL_WARN, __FILE__, __LINE__, dsc);
#define LV_LOG_ERROR(dsc) lv_log_add(LV_LOG_LEVEL_ERROR, __FILE__, __LINE__, dsc);
#else /*USE_LV_LOG*/
/*Do nothing if `USE_LV_LOG 0`*/
#define lv_log_add(level, file, line, dsc) {;}
#define LV_LOG_TRACE(dsc) {;}
#define LV_LOG_INFO(dsc) {;}
#define LV_LOG_WARN(dsc) {;}
#define LV_LOG_ERROR(dsc) {;}
#endif /*USE_LV_LOG*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_LOG_H*/

View File

@@ -1,166 +0,0 @@
/**
* @file lv_math.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_math.h"
#include <stdbool.h>
#include <stdlib.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
static int16_t sin0_90_table[] = {
0, 572, 1144, 1715, 2286, 2856, 3425, 3993, 4560, 5126,
5690, 6252, 6813, 7371, 7927, 8481, 9032, 9580, 10126, 10668,
11207, 11743, 12275, 12803, 13328, 13848, 14364, 14876, 15383, 15886,
16383, 16876, 17364, 17846, 18323, 18794, 19260, 19720, 20173, 20621,
21062, 21497, 21925, 22347, 22762, 23170, 23571, 23964, 24351, 24730,
25101, 25465, 25821, 26169, 26509, 26841, 27165, 27481, 27788, 28087,
28377, 28659, 28932, 29196, 29451, 29697, 29934, 30162, 30381, 30591,
30791, 30982, 31163, 31335, 31498, 31650, 31794, 31927, 32051, 32165,
32269, 32364, 32448, 32523, 32587, 32642, 32687, 32722, 32747, 32762,
32767
};
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Convert a number to string
* @param num a number
* @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements)
* @return same as `buf` (just for convenience)
*/
char * lv_math_num_to_str(int32_t num, char * buf)
{
char * buf_ori = buf;
if(num == 0) {
buf[0] = '0';
buf[1] = '\0';
return buf;
} else if(num < 0) {
(*buf) = '-';
buf++;
num = LV_MATH_ABS(num);
}
uint32_t output = 0;
int8_t i;
for(i = 31; i >= 0; i--) {
if((output & 0xF) >= 5)
output += 3;
if(((output & 0xF0) >> 4) >= 5)
output += (3 << 4);
if(((output & 0xF00) >> 8) >= 5)
output += (3 << 8);
if(((output & 0xF000) >> 12) >= 5)
output += (3 << 12);
if(((output & 0xF0000) >> 16) >= 5)
output += (3 << 16);
if(((output & 0xF00000) >> 20) >= 5)
output += (3 << 20);
if(((output & 0xF000000) >> 24) >= 5)
output += (3 << 24);
if(((output & 0xF0000000) >> 28) >= 5)
output += (3 << 28);
output = (output << 1) | ((num >> i) & 1);
}
uint8_t digit;
bool leading_zero_ready = false;
for(i = 28; i >= 0; i -= 4) {
digit = ((output >> i) & 0xF) + '0';
if(digit == '0' && leading_zero_ready == false) continue;
leading_zero_ready = true;
(*buf) = digit;
buf++;
}
(*buf) = '\0';
return buf_ori;
}
/**
* Return with sinus of an angle
* @param angle
* @return sinus of 'angle'. sin(-90) = -32767, sin(90) = 32767
*/
int16_t lv_trigo_sin(int16_t angle)
{
int16_t ret = 0;
angle = angle % 360;
if(angle < 0) angle = 360 + angle;
if(angle < 90) {
ret = sin0_90_table[angle];
} else if(angle >= 90 && angle < 180) {
angle = 180 - angle;
ret = sin0_90_table[angle];
} else if(angle >= 180 && angle < 270) {
angle = angle - 180;
ret = - sin0_90_table[angle];
} else { /*angle >=270*/
angle = 360 - angle;
ret = - sin0_90_table[angle];
}
return ret;
}
/**
* Calculate a value of a Cubic Bezier function.
* @param t time in range of [0..LV_BEZIER_VAL_MAX]
* @param u0 start values in range of [0..LV_BEZIER_VAL_MAX]
* @param u1 control value 1 values in range of [0..LV_BEZIER_VAL_MAX]
* @param u2 control value 2 in range of [0..LV_BEZIER_VAL_MAX]
* @param u3 end values in range of [0..LV_BEZIER_VAL_MAX]
* @return the value calculated from the given parameters in range of [0..LV_BEZIER_VAL_MAX]
*/
int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3)
{
uint32_t t_rem = 1024 - t;
uint32_t t_rem2 = (t_rem * t_rem) >> 10;
uint32_t t_rem3 = (t_rem2 * t_rem) >> 10;
uint32_t t2 = (t * t) >> 10;
uint32_t t3 = (t2 * t) >> 10;
uint32_t v1 = ((uint32_t)t_rem3 * u0) >> 10;
uint32_t v2 = ((uint32_t)3 * t_rem2 * t * u1) >> 20;
uint32_t v3 = ((uint32_t)3 * t_rem * t2 * u2) >> 20;
uint32_t v4 = ((uint32_t)t3 * u3) >> 10;
return v1 + v2 + v3 + v4;
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@@ -1,73 +0,0 @@
/**
* @file math_base.h
*
*/
#ifndef LV_MATH_H
#define LV_MATH_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stdint.h>
/*********************
* DEFINES
*********************/
#define LV_MATH_MIN(a,b) ((a) < (b) ? (a) : (b))
#define LV_MATH_MAX(a,b) ((a) > (b) ? (a) : (b))
#define LV_MATH_ABS(x) ((x) > 0 ? (x) : (-(x)))
#define LV_TRIGO_SIN_MAX 32767
#define LV_TRIGO_SHIFT 15 /* >> LV_TRIGO_SHIFT to normalize*/
#define LV_BEZIER_VAL_MAX 1024 /*Max time in Bezier functions (not [0..1] to use integers) */
#define LV_BEZIER_VAL_SHIFT 10 /*log2(LV_BEZIER_VAL_MAX): used to normalize up scaled values*/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Convert a number to string
* @param num a number
* @param buf pointer to a `char` buffer. The result will be stored here (max 10 elements)
* @return same as `buf` (just for convenience)
*/
char * lv_math_num_to_str(int32_t num, char * buf);
/**
* Return with sinus of an angle
* @param angle
* @return sinus of 'angle'. sin(-90) = -32767, sin(90) = 32767
*/
int16_t lv_trigo_sin(int16_t angle);
/**
* Calculate a value of a Cubic Bezier function.
* @param t time in range of [0..LV_BEZIER_VAL_MAX]
* @param u0 start values in range of [0..LV_BEZIER_VAL_MAX]
* @param u1 control value 1 values in range of [0..LV_BEZIER_VAL_MAX]
* @param u2 control value 2 in range of [0..LV_BEZIER_VAL_MAX]
* @param u3 end values in range of [0..LV_BEZIER_VAL_MAX]
* @return the value calculated from the given parameters in range of [0..LV_BEZIER_VAL_MAX]
*/
int32_t lv_bezier3(uint32_t t, int32_t u0, int32_t u1, int32_t u2, int32_t u3);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif

Some files were not shown because too many files have changed in this diff Show More