Compare commits

...

3911 Commits

Author SHA1 Message Date
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
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
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
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
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
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
embeddedt
e2147d4be5 Update forum link 2019-06-28 16:02:28 -04: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
22e8ec2b01 Merge pull request #1104 from C47D/fix_group_wrap
[lv_group - v5.3] Init wrap on group creation and fix documentation of wrap setter
2019-06-18 06:07:37 +02:00
Gabor Kiss-Vamosi
c46f64c6d5 lv_img_decoder fix memory leak 2019-06-18 05:40:21 +02:00
C47D
648e2c4f17 [lv_group] Init wrap on group creation and fix documentation of wrap setter 2019-06-17 20:39:40 -05: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
4139cd619b Update README.md 2019-06-11 15:54:13 +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
embeddedt
037e828c8a Fix lv_cont_get_fit_height using width instead
Reported in #1075
2019-05-21 09:52:18 -04: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
Gabor Kiss-Vamosi
d658eef2a0 fix typo
lv_font_symbol_30_basic -> lv_font_symbol_30
2019-05-20 15:50:21 +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
embeddedt
292ca72c03 Merge pull request #1064 from CrogST/patch-1
Fix swapping of SB and SCRL styles in lv_list_get_style function
2019-05-16 19:41:26 -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
CrogST
8273499a8c Error in lv_list_get_style function
SB and SCRL styles were mixed up. Let me now if it is ok.
2019-05-16 14:30:54 +03: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
c8d1413ece Update lv_obj.c 2019-05-15 07:36:00 +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
dab545e770 Update lv_canvas.c 2019-05-12 08:21:32 +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
8745d16ba9 Update lv_canvas.c 2019-04-24 06:26:42 +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
ef0f8b29cf Update lv_txt.c 2019-04-23 15:08:12 +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
Gabor Kiss-Vamosi
580d1e111d lv_list: fix lv_list_get_btn_next/prev 2019-04-11 08:11:13 -04:00
Themba Dube
b6df62a62a lv_list: check actual object type instead of relying on signal handler 2019-04-11 08:09:33 -04: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
embeddedt
5f76d98311 Update README.md 2019-04-04 11:27:55 -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
Gabor Kiss-Vamosi
bb20b8ca1a rounder_cb bug fix 2019-04-02 05:59:23 +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
Gabor Kiss-Vamosi
87d27a5665 Merge pull request #986 from upbeat27/master
lv_ddlist: fix original selected option not restoring on escape
2019-03-27 21:17:16 +01: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
Josh
6468d925ed lv_ddlist: fix original selected option not restoring on escape 2019-03-27 09:23:43 -07:00
embeddedt
c1e98d3f37 Update all-other-issues.md 2019-03-27 10:39:42 -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
Gabor Kiss-Vamosi
22f84314a4 Rename bug_report.md to bug-report.md 2019-03-22 21:28:18 +01:00
Themba Dube
03b3070871 Update issue templates 2019-03-22 13:58:19 -04:00
Themba Dube
73ab6b3e2f Add back missing bug report template 2019-03-22 13:57:35 -04:00
embeddedt
2f86a67e71 Add other issues template 2019-03-22 13:28:36 -04:00
embeddedt
1b12ee50bb Merge pull request #976 from littlevgl/issue-templates
Add bug report issue template
2019-03-22 13:28:26 -04:00
embeddedt
ee4e61ed68 Add bug report issue template 2019-03-22 13:23:55 -04: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
Gabor Kiss-Vamosi
98d43daa5d Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-03-13 12:07:37 +01:00
Gabor Kiss-Vamosi
095a159005 lv_tileview_set_tile_act: fix with no animation
It should the position of the scrollable but the size was set
2019-03-13 05:22:55 +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
embeddedt
ec6598ccfb Update CONTRIBUTING.md with forum information 2019-03-12 10:35:48 -04: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
embeddedt
c74e48249d Add license information to CONTRIBUTING.md 2019-03-11 09:51:07 -04: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
2eaa579121 lv_ddlist: fix value revert on focus 2019-03-08 15:48:44 +01: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
Gabor Kiss-Vamosi
66e70afbb4 use the obj->top on focus to bring the obj. to the foregorund 2019-03-06 16:13:04 +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
Gabor Kiss-Vamosi
9d0f68880a Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-03-05 15:34:36 +01:00
Gabor Kiss-Vamosi
78574541e3 lv_tileview: infinite loop bugfix 2019-03-05 15:32:09 +01: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
b8c6783207 Update README.md 2019-03-03 08:13:13 +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
embeddedt
961d8e0350 Merge pull request #922 from amirgon/undef_free
Workaround for stray 'free' macro
2019-03-02 17:37:29 -05:00
Amir Gonnen
6f53e4616a Workaround for stray 'free' macro
Related to littlevgl/lv_binding_micropython#11 'Build error for STM32 port due to 'free()' macro'
2019-03-03 00:12:12 +02: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
Themba Dube
f509d8fa4f Apply ta label size fix from dev-6.0 2019-03-02 11:17:15 -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
00ef778c7c Merge branch 'master' of https://github.com/littlevgl/lvgl 2019-02-28 06:56:23 +01:00
Gabor Kiss-Vamosi
fbe838730f lv_btnm: init recolor to 0 2019-02-28 06:56:10 +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
b2e07d858b revert placeholder init 2019-02-27 10:10:12 +01:00
Gabor Kiss-Vamosi
dfbcec2f0d lv_ta: init placeholder 2019-02-27 10:09:36 +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
65685a0da6 Merge pull request #892 from amirgon/patch-1
Add Micropython feature to README.md
2019-02-24 12:26:42 +01:00
Amir Gonnen
0bab902753 Add Micropython feature
and a short example
2019-02-24 11:20:37 +02: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
embeddedt
a374baa376 Merge pull request #889 from littlevgl/embeddedt-patch-1
Remove semicolons in lv_font_builtin.h
2019-02-22 12:01:49 -05:00
Themba Dube
7e60fcb298 Merge remote-tracking branch 'origin/master' into dev-6.0 2019-02-22 12:00:58 -05:00
embeddedt
02c95e8fed Remove semicolons in lv_font_builtin.h 2019-02-22 10:09:07 -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
Gabor Kiss-Vamosi
56f54d864a Merge pull request #888 from joltwallet/lv_list_remember
lv_list remember
2019-02-22 13:14:28 +01:00
Brian Pugh
465f8fa96a lv_list: lv_list_set_btn_selected: only write ext->last_sel if btn is non-NULL. 2019-02-21 21:40:00 -08:00
Brian Pugh
a7260bbfa9 Revert semicolon removal from f4498fd0. This semicolon is necessary for more natural, less error prone custom font declaration in lv_conf.h 2019-02-21 21:02:18 -08: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
374dfcd60a Merge pull request #884 from littlevgl/revert-836-master
Revert "[#809] Added x axis scrolling feature into lv_page_focus function."
2019-02-21 10:40:01 -05:00
embeddedt
457f667cab Revert "[#809] Added x axis scrolling feature into lv_page_focus function." 2019-02-21 10:39:39 -05:00
embeddedt
4b6e78cf78 Merge pull request #836 from zavovi/master
[#809] Added x axis scrolling feature into lv_page_focus function.
2019-02-21 10:39:31 -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
Vilem Zavodny
07e9fc4ccf [#809] Fixed scroll focus when object is out of the page in twi sides. 2019-02-21 10:41:41 +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
a39d617ac9 Update stale.yml 2019-02-21 07:35:14 +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
be8db0719f Merge pull request #876 from ironiron/master
Remove duplicate semicolons
2019-02-20 16:49:45 -05:00
Rafał Mazurkiewicz
f4498fd0a4 removed unnecessary semicolons 2019-02-20 22:36:56 +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
embeddedt
245d81ee92 Update README.md 2019-02-18 13:05:58 -05:00
Themba Dube
99825aa29f Merge branch 'master' into dev-6.0 2019-02-18 12:18:16 -05:00
Themba Dube
d05ec536fd Fix compilation errors when USE_LV_GROUP is 0 2019-02-18 12:17:56 -05:00
Themba Dube
153f16fc05 Merge branch 'master' of github.com:littlevgl/lvgl 2019-02-18 12:16:16 -05:00
Themba Dube
2e0b8e10ae Add missing include to lv_math.c 2019-02-18 12:15:57 -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
Gabor Kiss-Vamosi
62195b7cc7 lv_label_draw fix with offset.y 2019-02-18 06:41:02 +01:00
Gabor Kiss-Vamosi
9572c7d4ed lv_imgbtn: bugfix 2019-02-18 05:57:30 +01:00
Gabor Kiss-Vamosi
20282ce89f remove var. declaration in for loop header 2019-02-18 05:57:30 +01:00
Themba Dube
62e58a25c9 Merge branch 'master' into dev-6.0 2019-02-17 14:58:32 -05:00
Themba Dube
19ea8ac55f Fix compilation error introduced in 1e8ea6b15b 2019-02-17 14:58:10 -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
e3bbe0a4fd spinbox fixes 2019-02-15 06:34:30 +01:00
Gabor Kiss-Vamosi
96adbe3827 spinbox fixes 2019-02-15 06:34:30 +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
manison
92babea8c8 fix typo in function name 2019-02-13 06:46:08 -05:00
Vilem Zavodny
3425f29130 [#809] Added x axis scrolling feature into lv_page_focus function. 2019-02-13 11:19:47 +01:00
Gabor Kiss-Vamosi
673892cd80 multi-disp: unique VDB to displays 2019-02-13 01:40:22 +01:00
Gabor Kiss-Vamosi
f5b8dd17b8 lv_list_set_selected_btn fix 2019-02-12 22:48:54 +01:00
Gabor Kiss-Vamosi
cfa7d22d33 multi-disp: display level vdb experiment 2019-02-12 22:35:59 +01:00
embeddedt
fabd551e2a Fix error reported by @canardos in lv_imgbtn 2019-02-12 11:03:34 -05: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
2b67dcd2cf Merge pull request #827 from littlevgl/embeddedt-patch-1
Add LV_INDEV_DRAG_THROW checker to lv_conf_templ.h
2019-02-12 16:24:45 +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
embeddedt
5addccc270 Merge pull request #828 from littlevgl/embeddedt-patch-2
Fix image source not being copied in lv_imgbtn
2019-02-12 09:15:46 -05:00
manison
c94fb96bb2 fix theme initialization 2019-02-12 15:02:43 +01:00
embeddedt
9ac933fb9e Fix image source not being copied in lv_imgbtn 2019-02-12 07:04:34 -05:00
embeddedt
44c2397804 Add LV_INDEV_DRAG_THROW checker to lv_conf_templ.h 2019-02-12 07:01:04 -05: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
Gabor Kiss-Vamosi
caa2064c90 lv_spinbox: fixes 2019-02-12 07:55:46 +01:00
Gabor Kiss-Vamosi
6f47dd6522 theme fixes 2019-02-12 07:33:42 +01:00
Gabor Kiss-Vamosi
c71047f359 lv_chart: LV_CHART_VETICAL_LINES fixes 2019-02-12 06:03:06 +01:00
Gabor Kiss-Vamosi
6871e0252a add LV_ATTRIBUTE_MEM_ALIGN option
update lv_conf_chechker.h
2019-02-12 05:42:45 +01:00
Gabor Kiss-Vamosi
56cfcc693a Merge pull request #820 from seyyah/patch-1
Typo: sonething -> something
2019-02-11 11:30:25 +01:00
seyyah
a87f4388e5 Typo: sonething -> something 2019-02-11 13:25:11 +03: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
embeddedt
f686243f64 Add warning about LV_INDEV_DRAG_THROW 2019-02-10 06:53:11 -05:00
embeddedt
d64902b2a5 Add note about LV_INDEV_DRAG_THROW to lv_conf_templ.h 2019-02-10 06:52:17 -05:00
Gabor Kiss-Vamosi
5b92b4d01b move basic descriptors to lv_disp_t 2019-02-10 11:06:47 +01:00
Gabor Kiss-Vamosi
0733885a73 Merge pull request #817 from fpw/bugfix/color-narrowing
Fix gcc narrowing warning
2019-02-10 07:59:10 +01:00
Gabor Kiss-Vamosi
c42f378184 fix image colors in themes 2019-02-10 06:51:28 +01:00
Gabor Kiss-Vamosi
ad74d32f51 fix image colors in themes 2019-02-10 06:51:28 +01:00
Folke Will
321a08b42e Retain formatting 2019-02-09 13:48:09 +01:00
Folke Will
b7d5537961 Fix color narrowing warning 2019-02-09 13:46:29 +01:00
embeddedt
32017ff659 Fix x/y mixup in lv_page.c (fixes #815) 2019-02-08 10:20:05 -05:00
embeddedt
e2c0e58af9 Merge pull request #811 from amirgon/master
Prevent crash when lv_init is called more than once.
2019-02-07 18:25:26 -05:00
embeddedt
1c67d07dc3 Move setting of _lv_initialized and correct formatting
Set _lv_initialized at the end of lv_init.

Correct formatting of "if" statement to be consistent with the rest of the library.
2019-02-07 17:57:06 -05:00
Amir Gonnen
e72589c6d4 Prevent crash when lv_init is called more than once. After the first call, it will do nothing. 2019-02-08 00:03:16 +02: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
b0b1174564 lv_canvas: fix with LV_COLOR_16_SWAP 2019-02-07 10:27:47 +01: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
fb1a7fc0fc Update stale.yml 2019-02-04 15:28:01 +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
Gabor Kiss-Vamosi
b5bcede82f Merge pull request #790 from 0xflotus/patch-1
fixed small errors
2019-02-02 04:36:44 +01:00
Gabor Kiss-Vamosi
23dfc37171 Merge pull request #787 from littlevgl/update-version-readme
Change v5.3 to 5.3 in README
2019-02-02 04:23:17 +01:00
0xflotus
148539d242 fixed small errors 2019-02-02 02:26:49 +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
Gabor Kiss-Vamosi
b66e8410f6 Update README.md 2019-02-01 22:27:57 +01:00
Themba D
9a272039d3 Change v5.3 to 5.3
When the badge already says 'version' it doesn't make sense to put the 'v' before the version number.
2019-02-01 16:05:46 -05:00
Gabor Kiss-Vamosi
dc69cf82eb Update README.md 2019-02-01 21:53:12 +01:00
Gabor Kiss-Vamosi
17c19fc35a Update README.md 2019-02-01 15:10:59 +01:00
Gabor Kiss-Vamosi
4cd13016d3 Update README.md 2019-02-01 05:44:19 +01:00
Gabor Kiss-Vamosi
84781c62c2 version number to v5.3 2019-02-01 05:09:20 +01:00
Gabor Kiss-Vamosi
378453c954 Merge branch 'dev-5.3' 2019-02-01 05:08:33 +01:00
Gabor Kiss-Vamosi
40709625cc Merge remote-tracking branch 'origin/master' into dev-5.3 2019-02-01 05:04:05 +01:00
Gabor Kiss-Vamosi
77f6844340 add top level lvgl.mk 2019-02-01 05:03:35 +01:00
Gabor Kiss-Vamosi
68083fa15a Update README.md 2019-01-31 21:23:56 +01:00
Gabor Kiss-Vamosi
cbab184002 lv_canvas: restore reverted updates 2019-01-31 21:06:28 +01:00
Gabor Kiss-Vamosi
0819688f50 Revert "lv_canvas: comment update"
This reverts commit 078bc96b77.
2019-01-31 20:24:40 +01:00
Gabor Kiss-Vamosi
6770e1ab32 Revert "lv_canvas: support indexed images"
This reverts commit ed8ec4a4c2.
2019-01-31 20:24:30 +01:00
Gabor Kiss-Vamosi
078bc96b77 lv_canvas: comment update 2019-01-31 19:39:57 +01:00
Gabor Kiss-Vamosi
ed8ec4a4c2 lv_canvas: support indexed images 2019-01-31 19:38:40 +01:00
Gabor Kiss-Vamosi
4fbf1401fa Update README.md 2019-01-31 19:28:09 +01:00
Gabor Kiss-Vamosi
5f2f6b6617 Update README.md 2019-01-31 19:26:39 +01:00
Gabor Kiss-Vamosi
e3c2a7db67 Update README.md 2019-01-31 19:25:41 +01:00
Gabor Kiss-Vamosi
ace5acea0b Update README.md 2019-01-31 19:13:50 +01:00
Gabor Kiss-Vamosi
8511c6b9cf Update README.md 2019-01-31 19:13:26 +01:00
Gabor Kiss-Vamosi
3ef4a73db5 Update README.md 2019-01-31 15:56:52 +01:00
Gabor Kiss-Vamosi
2274ca348b Merge pull request #783 from seyyah/dev-5.3
lv_canvas: lv_canvas_boundary_fill4 function interface enhancement
2019-01-31 15:55:25 +01:00
Gabor Kiss-Vamosi
e9fca9cad6 Update README.md 2019-01-31 15:43:23 +01:00
Gabor Kiss-Vamosi
96eba5f877 Update README.md 2019-01-31 15:42:18 +01:00
seyyah
3db41c327f lv_canvas: update function prototypes 2019-01-31 16:22:07 +03:00
seyyah
6de1ad36dc lv_canvas: merge last commits 2019-01-31 16:15:50 +03:00
seyyah
635ca1ab90 lv_canvas: lv_canvas_boundary_fill4 function interface enhancement 2019-01-31 16:07:59 +03:00
Gabor Kiss-Vamosi
215cdda238 Update README.md 2019-01-31 14:06:54 +01:00
Gabor Kiss-Vamosi
ffbabfc8fe Merge pull request #782 from littlevgl/badges
Get rid of links on badges
2019-01-31 14:03:42 +01:00
Themba D
5a62ac79e9 Merge branch 'master' into badges 2019-01-31 08:02:57 -05:00
Themba D
846a470717 Merge branch 'master' into badges 2019-01-31 08:02:13 -05:00
Gabor Kiss-Vamosi
f6f8f09bce Update README.md 2019-01-31 14:01:56 +01:00
Themba D
6ffd1475c5 Get rid of links on badges 2019-01-31 08:00:46 -05:00
Gabor Kiss-Vamosi
5bbc3e69e9 Update README.md 2019-01-31 14:00:42 +01:00
Gabor Kiss-Vamosi
f1d5e9c4a2 Update README.md 2019-01-31 13:59:53 +01:00
Gabor Kiss-Vamosi
68f25fa999 add_lv_fs_is_ready() 2019-01-31 13:24:02 +01:00
Gabor Kiss-Vamosi
ef7aa132a6 Update README.md 2019-01-31 10:25:08 +01:00
Gabor Kiss-Vamosi
f41ce51bf9 Update README.md 2019-01-31 10:20:11 +01:00
Gabor Kiss-Vamosi
ed38f7dcb5 Merge pull request #780 from amirgon/dev-5.3
lv_label_set_text_id must be declared conditionally
2019-01-31 09:34:34 +01:00
Amir Gonnen
cc77d78d5a lv_label_set_text_id must be declared conditionally otherwise lv_micropython would create a wrapper to an undefined function 2019-01-31 09:39:59 +02:00
Gabor Kiss-Vamosi
159e07a8ea indev_drag bugfix if dragged on a page 2019-01-31 03:17:30 +01:00
Gabor Kiss-Vamosi
cf434828dc Merge pull request #778 from MiSimon/lv_group_key_ascii_codes
Changed LV_GROUP_KEY macros to the corresponding ascii values
2019-01-31 01:21:56 +01:00
MiSimon
649a21ad86 Changed LV_GROUP_KEY macros to the corresponding ascii values 2019-01-31 01:18:04 +01:00
Gabor Kiss-Vamosi
dd5f66e125 inialize _lv_indev_list adn _lv_disp_list in lv_init 2019-01-31 00:25:15 +01:00
Gabor Kiss-Vamosi
c8920b0c06 Update README.md 2019-01-30 23:05:21 +01:00
Gabor Kiss-Vamosi
09bcf9dd12 Update README.md 2019-01-30 22:17:04 +01:00
Gabor Kiss-Vamosi
d1b593be66 Merge pull request #775 from littlevgl/license-origin
Add note about origin of function
2019-01-30 17:05:50 +01:00
Gabor Kiss-Vamosi
3acd6c3cd0 lv_refr: remove unneccesary waiting for flush 2019-01-30 16:13:11 +01:00
Gabor Kiss-Vamosi
aca2a2d428 lv_refr: formatting 2019-01-30 16:07:56 +01:00
Gabor Kiss-Vamosi
d3dc1f8bf1 Merge pull request #772 from amirgon/dev-5.3
bugfix: return int not pointer
2019-01-30 14:09:04 +01:00
Themba D
a91c142b3c Add note about origin of function 2019-01-30 07:02:03 -05:00
Gabor Kiss-Vamosi
fa28cee957 disable multi-lang related functions if USE_LV_MULTI_LANG = 0 2019-01-30 10:49:59 +01:00
Gabor Kiss-Vamosi
93ec0a512a Update README.md 2019-01-30 10:04:03 +01:00
Gabor Kiss-Vamosi
1bf36221f4 Update README.md 2019-01-30 10:00:50 +01:00
Gabor Kiss-Vamosi
0e3f95c1a9 Update README.md 2019-01-30 07:16:43 +01:00
Gabor Kiss-Vamosi
01e2bf2374 Update README.md 2019-01-30 06:37:51 +01:00
Gabor Kiss-Vamosi
34bcab34d8 Update README.md 2019-01-30 06:35:56 +01:00
Gabor Kiss-Vamosi
fceaf167a4 Update README.md 2019-01-29 21:33:18 +01:00
Amir Gonnen
950fb33206 bugfix: return int not pointer 2019-01-29 22:06:36 +02:00
Gabor Kiss-Vamosi
7b23f7a8fd Update README.md 2019-01-29 20:59:14 +01:00
Gabor Kiss-Vamosi
43e852d43a Update README.md 2019-01-29 20:57:46 +01:00
Gabor Kiss-Vamosi
0bef3ab1bf Update README.md 2019-01-29 15:50:29 +01:00
Gabor Kiss-Vamosi
967d3b54a3 Update README.md 2019-01-29 15:46:30 +01:00
Gabor Kiss-Vamosi
ec31125af3 Update README.md 2019-01-29 15:42:59 +01:00
Gabor Kiss-Vamosi
84d44b2487 Update README.md 2019-01-29 15:41:07 +01:00
Gabor Kiss-Vamosi
9f2f89163f Update README.md 2019-01-29 14:15:28 +01:00
Gabor Kiss-Vamosi
d29536673a Update README.md 2019-01-29 14:10:55 +01:00
Gabor Kiss-Vamosi
8283fcc2d7 Update README.md 2019-01-29 14:10:41 +01:00
Gabor Kiss-Vamosi
5e33e5574e Update README.md 2019-01-29 13:51:49 +01:00
Gabor Kiss-Vamosi
dd41f411e6 lv_conf_checker.py handle prerocessor indentations (e.g. # define ...) 2019-01-29 10:28:48 +01:00
Gabor Kiss-Vamosi
92be58d1d8 fix to work without display 2019-01-29 04:58:21 +01:00
Gabor Kiss-Vamosi
fd1e8483a5 multi-lang: fix function names 2019-01-29 04:41:44 +01:00
Gabor Kiss-Vamosi
855dc44e32 solve warings 2019-01-28 16:02:11 +01:00
Gabor Kiss-Vamosi
9185e1c4a6 add GC to lv_conf_templ.h 2019-01-28 16:01:59 +01:00
Gabor Kiss-Vamosi
08007aa4d5 Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2019-01-28 15:41:08 +01:00
Gabor Kiss-Vamosi
3b7a468c6a update lv_conf_checker.h 2019-01-28 15:32:50 +01:00
Gabor Kiss-Vamosi
fba3337925 Merge branch 'multi-lang' into dev-5.3 2019-01-28 15:32:12 +01:00
Gabor Kiss-Vamosi
811f3c0834 lv_lang: disable the whole file id USE_LV_MULTI_LANG == 0 2019-01-28 15:18:59 +01:00
Gabor Kiss-Vamosi
31d0a7f3ae lv_mem: add LV_MEM_ADR to set wotk memory address externally 2019-01-28 15:18:59 +01:00
Brian Pugh
4adbdad9b3 Added lv_gc.c to lv_misc.mk 2019-01-28 15:18:59 +01:00
Gabor Kiss-Vamosi
120a431766 lv_slider: reduce bg size if knob_in = 1 too 2019-01-28 15:18:59 +01:00
Brian Pugh
9cecebfe0a lv_sw.c: lv_sw_toggle_anim initial commit 2019-01-28 15:18:59 +01:00
Brian Pugh
514511c15a lv_sw: lv_sw_toggle doc fix 2019-01-28 15:18:59 +01:00
Brian Pugh
610548ba3d lv_sw: lv_sw_toggle initial commit 2019-01-28 15:18:59 +01:00
Amir Gonnen
dd3c65df7a add missing include to stdlib, needed for 'abs' function on integers 2019-01-28 15:18:59 +01:00
seyyah
195a3d3768 lv_canvas: add the function comments to the header file too 2019-01-28 15:18:59 +01:00
seyyah
65236ede89 lv_canvas: add basic drawing functionalities 2019-01-28 15:18:59 +01:00
Amir Gonnen
0e8984d121 Fix compilation errors: comment out unused variables. cast memcpy dest since it's defined as const. 2019-01-28 15:18:59 +01:00
manison
9f84fb1749 replace inclusion of nonstandard header <strings.h> with standard header <string.h> 2019-01-28 15:18:59 +01:00
manison
b6046a8e23 allow disabling text area password char animation without needing to disable all animations 2019-01-28 15:18:59 +01:00
Amir Gonnen
af3cb73fbc Fixed refernce to anim_ll. LV_GC_ROOT must be used for Micropython gc support 2019-01-28 15:18:59 +01:00
Amir Gonnen
c816847a3c remove historic pycparser. It is here before micropython sources moved to another repository and history rewritten 2019-01-28 15:18:59 +01:00
Amir Gonnen
652809d005 restore LV_COLOR_HEX macros and add inline functions in addition to them, not instead of them 2019-01-28 15:18:59 +01:00
Amir Gonnen
8bfa8ff721 lv_colors.h: move OPA macros to enum, move LV_COLOR_HEX macros to inline funcs, this exposes them to Micropython. If enum member is a number (as in OPA), prefix it by underscore to create a valid python attribute. Bugfix: when returning to a struct by value, copy it first. lv_mpy.c renamed to lv_mpy_example.c since the actual lv_mpy.c should be generated by the build script automatically based on current H files and lv_conf.h 2019-01-28 15:18:59 +01:00
Amir Gonnen
a6c89ee54f add '_lv_' prefix to global roots 2019-01-28 15:18:59 +01:00
Amir Gonnen
0935110284 gc: add undescore to roots, arranged lv_mem.c regarding gc defines. Added support to Symbols using the numstr technique of encoding the characters as a number in an enum. Globals: register them directly witout the need for constructor to access them. Updated example code. Updated lv_mpy.c 2019-01-28 15:18:59 +01:00
Amir Gonnen
f5bd68fa77 Enable Micropython gc (Garbage Collection) on lvgl. This is controlled by LV_ENABLE_GC macro defined in lv_conf.h. When enabled, lv_conf.h should also define LV_MEM_CUSTOM_REALLOC, LV_MEM_CUSTOM_GET_SIZE, LV_GC_INCLUDE and LV_GC_ROOT 2019-01-28 15:18:59 +01:00
Amir Gonnen
d44a618169 Initial revision for Mpy extension generation script 2019-01-28 15:18:59 +01:00
neverxie
ae3eca803d [del] extra spaces 2019-01-28 15:18:59 +01:00
Themba D
b087c1153c Merge pull request #770 from manison/patch-typo-ta-add-char
Fix typo in new line char detection
2019-01-28 06:57:29 -05:00
Gabor Kiss-Vamosi
e12a8b06f0 lv_img_set_src_id fix 2019-01-28 09:17:22 +01:00
manison
fce445e464 lv_ta: fixes typo in new line char detection 2019-01-28 08:55:57 +01:00
Gabor Kiss-Vamosi
5bb66ef268 Merge pull request #769 from joltwallet/square_knob
lv_slider: make knob a perfect square (fix 1 pixel error)
2019-01-28 06:33:13 +01:00
Gabor Kiss-Vamosi
eca9245382 lv_mem: add LV_MEM_ADR to set wotk memory address externally 2019-01-28 06:09:06 +01:00
Brian Pugh
aaa969dc8a lv_slider: make knob a perfect square (fix 1 pixel error) 2019-01-27 16:28:55 -08:00
Themba D
28414505bc Merge pull request #767 from joltwallet/lv_gc_mk
Added lv_gc.c to lv_misc.mk
2019-01-27 17:58:56 -05:00
Brian Pugh
ac8ce1f643 Added lv_gc.c to lv_misc.mk 2019-01-27 12:30:25 -08:00
Gabor Kiss-Vamosi
5ed73c1918 lv_slider: reduce bg size if knob_in = 1 too 2019-01-27 07:16:24 +01:00
Themba D
79e973bfeb Merge pull request #762 from joltwallet/sw_toggle
Add lv_sw_toggle() and lv_sw_toggle_anim()
2019-01-26 15:29:32 -05:00
Brian Pugh
64c87e0e4a lv_sw.c: lv_sw_toggle_anim initial commit 2019-01-25 20:17:43 -08:00
Brian Pugh
6af285adb8 lv_sw: lv_sw_toggle doc fix 2019-01-25 17:42:08 -08:00
Brian Pugh
d962e36dbb lv_sw: lv_sw_toggle initial commit 2019-01-25 17:09:59 -08:00
Themba D
7713b5f941 Merge pull request #761 from amirgon/dev-5.3
Dev 5.3  fix compilation errors on lv_mpy
2019-01-25 16:45:03 -05:00
Amir Gonnen
8764388033 Merge remote-tracking branch 'upstream/dev-5.3' into dev-5.3 2019-01-25 23:18:49 +02:00
Gabor Kiss-Vamosi
2ae3733cd9 Merge pull request #752 from manison/patch-disable-pwd-anim
allow disabling text area password char animation without needing to disable all animations
2019-01-25 16:29:34 +01:00
Gabor Kiss-Vamosi
2762222fcc rename multi-lang functions 2019-01-25 16:19:50 +01:00
Amir Gonnen
a337e25fb1 add missing include to stdlib, needed for 'abs' function on integers 2019-01-25 16:01:52 +02:00
seyyah
fe5eab8f9a lv_canvas: add the function comments to the header file too 2019-01-25 14:50:31 +03:00
seyyah
bdb3bb778e erge branch 'dev-5.3' of github.com:seyyah/lvgl into dev-5.3 2019-01-25 14:14:46 +03:00
seyyah
98b6e446f0 lv_canvas: add basic drawing functionalities 2019-01-25 14:14:22 +03:00
Gabor Kiss-Vamosi
c8f5638780 Merge pull request #756 from amirgon/dev-5.3
Fix compilation errors
2019-01-25 08:27:14 +01:00
Amir Gonnen
c6bafdf203 Fix compilation errors: comment out unused variables. cast memcpy dest since it's defined as const. 2019-01-25 00:27:28 +02:00
Themba D
1bbc482f1a Merge pull request #753 from manison/patch-replace-strings-h
Replace nonstandard <strings.h> with standard <string.h> header
2019-01-24 11:02:08 -05:00
manison
a89fc9460b replace inclusion of nonstandard header <strings.h> with standard header <string.h> 2019-01-24 16:36:13 +01:00
manison
fd2e78965c allow disabling text area password char animation without needing to disable all animations 2019-01-24 16:16:19 +01:00
Amir Gonnen
10f3928169 Fixed refernce to anim_ll. LV_GC_ROOT must be used for Micropython gc support 2019-01-24 00:51:46 +02:00
Amir Gonnen
bf01817ab8 remove historic pycparser. It is here before micropython sources moved to another repository and history rewritten 2019-01-24 00:17:37 +02:00
Amir Gonnen
b58e526a0b restore LV_COLOR_HEX macros and add inline functions in addition to them, not instead of them 2019-01-24 00:17:37 +02:00
Amir Gonnen
fe479fe261 lv_colors.h: move OPA macros to enum, move LV_COLOR_HEX macros to inline funcs, this exposes them to Micropython. If enum member is a number (as in OPA), prefix it by underscore to create a valid python attribute. Bugfix: when returning to a struct by value, copy it first. lv_mpy.c renamed to lv_mpy_example.c since the actual lv_mpy.c should be generated by the build script automatically based on current H files and lv_conf.h 2019-01-24 00:17:37 +02:00
Amir Gonnen
473c2276dd add '_lv_' prefix to global roots 2019-01-24 00:14:33 +02:00
Amir Gonnen
1e8ea6b15b gc: add undescore to roots, arranged lv_mem.c regarding gc defines. Added support to Symbols using the numstr technique of encoding the characters as a number in an enum. Globals: register them directly witout the need for constructor to access them. Updated example code. Updated lv_mpy.c 2019-01-24 00:14:33 +02:00
Amir Gonnen
a883f0b39a Enable Micropython gc (Garbage Collection) on lvgl. This is controlled by LV_ENABLE_GC macro defined in lv_conf.h. When enabled, lv_conf.h should also define LV_MEM_CUSTOM_REALLOC, LV_MEM_CUSTOM_GET_SIZE, LV_GC_INCLUDE and LV_GC_ROOT 2019-01-24 00:14:33 +02:00
Amir Gonnen
848939683e Initial revision for Mpy extension generation script 2019-01-24 00:14:33 +02:00
Gabor Kiss-Vamosi
6cd62851bb lv_img multi lang fixes 2019-01-23 15:24:56 +01:00
Gabor Kiss-Vamosi
97b9fce748 lv_img: add multi language support 2019-01-23 15:07:22 +01:00
Gabor Kiss-Vamosi
c18be9809d Merge branch 'dev-5.3' into mixed 2019-01-23 14:44:18 +01:00
Gabor Kiss-Vamosi
68a860b958 lv_lang: minor fixes 2019-01-23 12:30:50 +01:00
Gabor Kiss-Vamosi
a6ead395a0 lv_lang: minor fixes 2019-01-23 12:30:10 +01:00
Gabor Kiss-Vamosi
e0fe252b90 lv_lang: add const return value to the get text function 2019-01-23 12:29:10 +01:00
Gabor Kiss-Vamosi
0a673294c8 add lv_lang.h to lvgl.h 2019-01-23 12:27:54 +01:00
Gabor Kiss-Vamosi
15d08b6692 multi_lang rework: use separate arrays for each language 2019-01-23 12:25:33 +01:00
Gabor Kiss-Vamosi
b500f0c8f3 lv_porting fixes 2019-01-23 12:25:33 +01:00
Gabor Kiss-Vamosi
5c33fb67e5 Merge pull request #748 from neverxie/master
[delete] extra spaces
2019-01-23 09:36:35 +01:00
neverxie
50dc23f42c [del] extra spaces 2019-01-23 13:53:22 +08:00
Gabor Kiss-Vamosi
10b86cea37 lv_anim: add ease_in/out path 2019-01-22 15:52:47 +01:00
Gabor Kiss-Vamosi
7c6d92ec10 Merge pull request #744 from manison/patch-dont-redefine-msvcrt-symbols
don't redefine _CRT_SECURE_NO_WARNINGS symbol if already defined
2019-01-22 13:16:12 +01:00
manison
4a39e2b731 don't redefine _CRT_SECURE_NO_WARNINGS symbol if already defined 2019-01-22 10:31:36 +01:00
Gabor Kiss-Vamosi
ce94a1ad5b editorconfig: remove duplicated insert_final_newline 2019-01-21 07:04:44 +01:00
Gabor Kiss-Vamosi
264f630467 lv_canvas: fix typo 2019-01-20 21:37:56 +01:00
Themba Dube
9711cf9d9a Merge remote-tracking branch 'origin/master' into dev-5.3 2019-01-20 06:52:10 -05:00
Gabor Kiss-Vamosi
a005c62d17 add .editorconfig 2019-01-18 06:59:16 +01:00
Gabor Kiss-Vamosi
7b193a40ef add lv_canvas_mult_buf 2019-01-17 16:24:01 +01:00
Gabor Kiss-Vamosi
6718decbb7 Update README.md 2019-01-17 12:18:09 +01:00
Gabor Kiss-Vamosi
87e262f27a lv_porting fixes 2019-01-16 17:50:57 +01:00
Gabor Kiss-Vamosi
a7207af953 multi_lang: rename functions 2019-01-16 10:01:27 +01:00
Gabor Kiss-Vamosi
d0f42c26cc add multi language support system + lv_label_set_text_multi 2019-01-16 09:57:07 +01:00
Gabor Kiss-Vamosi
6d449962ff lv_canvas: lv_canvas_copy_to_buf 2019-01-16 08:37:18 +01:00
Gabor Kiss-Vamosi
8ddc9f21fe Set LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN default value to 1 to avoide warnings 2019-01-15 15:36:35 +01:00
Gabor Kiss-Vamosi
3ab541949f add lv_canvas.c/h files 2019-01-14 19:39:21 +01:00
Themba D
b9e61de4d2 Merge pull request #724 from turoksama/dev-5.3
Fix an error in get_row_height.
2019-01-14 10:56:02 -05:00
Samuel
38d0e5b6e7 Fix an error in get_row_height.
Fix get_row_height error.
2019-01-14 23:38:28 +08:00
Gabor Kiss-Vamosi
bb4b37c6b3 add new object type: lv_ canvas 2019-01-14 16:03:40 +01:00
Gabor Kiss-Vamosi
6f12166af2 lv_task_handler: revert the addition of return value. See: #708 2019-01-14 15:21:04 +01:00
Gabor Kiss-Vamosi
eec348132f turn LV_OPA_.. defines to enum 2019-01-14 15:08:54 +01:00
Gabor Kiss-Vamosi
623fc13407 lv_table: minor fix for cell_crop 2019-01-14 07:13:09 +01:00
Themba Dube
a3f50c61f9 Merge branch 'master' into dev-5.3 2019-01-13 08:40:59 -05:00
Themba Dube
da01b4dd31 Change 'issue' to 'issue or pull request' in stale.yml 2019-01-13 08:40:38 -05:00
Themba D
ae0ceee8f6 Merge pull request #723 from joltwallet/lv_list_get_btn_index
Get btn index without providing list object
2019-01-13 08:30:09 -05:00
Gabor Kiss-Vamosi
088936e7f8 add return value to lv_task_handler. resolves #708 2019-01-13 07:46:12 +01:00
Gabor Kiss-Vamosi
d76b9c5b17 Merge pull request #721 from joltwallet/long_word_wrap2
Break long words immediately if word is longer than wrap width 2
2019-01-13 06:20:34 +01:00
Gabor Kiss-Vamosi
645eeae16c update lv_porting with file system examples 2019-01-13 05:28:42 +01:00
Brian Pugh
84bcf11d57 retabbed 2019-01-12 14:28:20 -08:00
Themba D
6d8b8a878d Fix documentation links in CONTRIBUTING.md 2019-01-12 17:21:28 -05:00
Brian Pugh
bd30245492 Get btn index without providing list object 2019-01-12 12:08:41 -08:00
Brian Pugh
48cd728693 move LV_TXT_BREAK_LONG defines to lv_conf.h 2019-01-12 10:59:15 -08:00
Brian Pugh
1a4a35f5a1 Change LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN to 0; see discussion #721 2019-01-12 08:44:16 -08:00
Brian Pugh
5b8e2cb6e1 Fixed off by one error for LV_TXT_LINE_BREAK_LONG_POST_MIN_LEN 2019-01-12 08:42:37 -08:00
Gabor Kiss-Vamosi
8a3b60e0c5 lv_conf_templ.h: minor fix 2019-01-12 15:23:21 +01:00
Brian Pugh
6c55ba5d31 Fixed characters jumping after character after future break character 2019-01-11 08:57:23 -08:00
Gabor Kiss-Vamosi
440c6415bc lv_table: crop improvements 2019-01-11 17:37:26 +01:00
Gabor Kiss-Vamosi
fcb95272b9 fix typo 2019-01-11 16:46:36 +01:00
Gabor Kiss-Vamosi
ff21f5a590 Merge pull request #712 from joltwallet/get_txt_width_fix
Correctly count text width
2019-01-11 16:42:57 +01:00
Gabor Kiss-Vamosi
ec19c8c87e lv_imgbtn_get_src_middle fix typo 2019-01-11 16:03:40 +01:00
Brian Pugh
d25f0db948 fix SYMBOL_DOWN 2019-01-10 23:11:48 -08:00
Brian Pugh
62d7b3b034 Added pretty breaks for long, but not widht-long words 2019-01-10 19:52:47 -08:00
Brian Pugh
d8aa9bfa1d move define macro to lv_txt.c 2019-01-10 19:07:36 -08:00
Brian Pugh
56fd6d944c Fixed last character from being cutoff 2019-01-10 19:05:19 -08:00
Gabor Kiss-Vamosi
a4d6c628e3 lv_table: add crop poperty 2019-01-10 16:06:20 +01:00
Gabor Kiss-Vamosi
9bbdd5840c Update stale.yml 2019-01-10 06:59:32 +01:00
Gabor Kiss-Vamosi
52bb50550d Merge pull request #713 from joltwallet/roller_visible_row_count_align_fix
Roller visible height fix
2019-01-07 11:31:27 +01:00
Gabor Kiss-Vamosi
1468da5c33 lv_style: revert defult line_space (modified during testing) 2019-01-07 07:17:58 +01:00
Gabor Kiss-Vamosi
d3fab62f8f txt position fixes 2019-01-07 07:06:31 +01:00
Gabor Kiss-Vamosi
c64a7f1f9c Merge pull request #711 from joltwallet/remove_group_ordering
Remove from group before deleting children
2019-01-07 05:58:09 +01:00
Brian Pugh
db219daeda Roller visible 1 should have a full line-width height padding 2019-01-06 19:24:00 -08:00
Brian Pugh
ee2ddf26f3 in roller, set lv_ddlist_set_fix_height 1 text.line_space less than row_cnt 2019-01-06 19:02:29 -08:00
Brian Pugh
ced3903100 reduce redundant width calculations in lv_label 2019-01-06 18:32:26 -08:00
Brian Pugh
b5e40a44b1 lv_draw_label don't add letter_spaces for 0 width characters 2019-01-06 18:24:47 -08:00
Brian Pugh
5f11d67812 remove duplicate lv_txt_get_width code in lv_label 2019-01-06 18:17:24 -08:00
Brian Pugh
4b2cd9030c Correctly count characters. Also remove letter spaces from 0-width characters 2019-01-06 17:49:07 -08:00
Brian Pugh
239ed85889 Remove from group before deleting children 2019-01-06 11:25:10 -08:00
Gabor Kiss-Vamosi
61bb01e06d lv_chart: fix uninitialized variable 2019-01-06 15:38:31 +01:00
Gabor Kiss-Vamosi
666136851c lv_btnm: last row y2 align bugfix 2019-01-06 15:20:06 +01:00
Gabor Kiss-Vamosi
a6714bbe47 Create stale.yml 2019-01-05 23:30:05 +01:00
Gabor Kiss-Vamosi
167e26a243 lv_mbox: use a unique anim end cb to avoid casting 2019-01-05 19:45:05 +01:00
Themba D
7c322c36ed Merge pull request #705 from joltwallet/vdb-fix
single vdb macro fix for get_active and get_inactive
2019-01-05 07:56:23 -05:00
Brian Pugh
752e752dbd single vdb macro fix for get_active and get_inactive 2019-01-04 20:48:34 -08:00
Brian Pugh
ab1a9b41e6 Add a minimum number of characters to print on a super long screen before wrapping it to the next line 2019-01-04 18:43:20 -08:00
Brian Pugh
b7c08e8aed Proper word wrapping taking into account letter_space 2019-01-04 09:10:27 -08:00
Gabor Kiss-Vamosi
9c675a8e82 Merge pull request #700 from joltwallet/list_fix
bug fix: initialize list size to 0; feature: select first added item …
2019-01-04 14:40:15 +01:00
Gabor Kiss-Vamosi
22e1ccdfa9 Merge pull request #699 from joltwallet/lv_group_send_data_returntype
Change lv_group_send_data() return type to lv_res_t
2019-01-04 14:36:30 +01:00
embeddedt
a4bfd51401 Merge branch 'master' into dev-5.3 2019-01-04 08:27:43 -05:00
Themba D
10b648c96e Merge pull request #704 from Fabien-Chouteau/patch-1
lv_hal_tick: Fix typo
2019-01-04 08:26:31 -05:00
Fabien Chouteau
d109f409fb lv_hal_tick: Fix typo 2019-01-04 12:13:33 +01:00
Gabor Kiss-Vamosi
83cadc8abe LV_VDB_TRUE_DOUBLE_BUFFERED: improvements 2019-01-04 08:40:33 +01:00
Gabor Kiss-Vamosi
31d18a21b2 Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2019-01-04 08:33:30 +01:00
Gabor Kiss-Vamosi
20150c1418 LV_VDB_TRUE_DOUBLE_BUFFERED: improvements 2019-01-04 08:33:19 +01:00
Gabor Kiss-Vamosi
9610d914e9 lv_tabview: initialize the btn_hide field 2019-01-04 08:32:45 +01:00
Brian Pugh
0a0df60f77 Long word breaking algorithm 2019-01-03 23:17:19 -08:00
Brian Pugh
b4960b19fb bug fix: initialize list size to 0; feature: select first added item to a focused list object 2019-01-03 15:31:03 -08:00
Brian Pugh
3922c18054 Change lv_group_send_data() return type to lv_res_t 2019-01-03 14:57:45 -08:00
Themba Dube
53c19167f3 Merge branch 'master' into dev-5.3 2019-01-03 13:36:02 -05:00
Themba D
20464832da Merge pull request #697 from MCF/warning-preproc-fix
Remove unneeded #warning pre-processor command in lv_vdb.h
2019-01-03 13:35:25 -05:00
Mike Fellows
73ecaefde8 Remove unneeded #warning pre-processor command in lv_vdb.h
That directive breaks non-gcc builds (e.g. for the pc simulator) and is
not very valuable from a user point of view.
2019-01-03 10:31:02 -08:00
Gabor Kiss-Vamosi
2ab274542a Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2019-01-03 18:04:38 +01:00
Gabor Kiss-Vamosi
280cba0c54 fix warnings 2019-01-03 15:57:31 +01:00
Gabor Kiss-Vamosi
bbe78633a2 Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2019-01-03 15:51:06 +01:00
Gabor Kiss-Vamosi
c20af89a11 fix warnings 2019-01-03 15:50:55 +01:00
Gabor Kiss-Vamosi
72fa6f092d Merge pull request #696 from littlevgl/embeddedt-patch-1
Fix uninitialized values reported in #695
2019-01-03 15:50:14 +01:00
Themba D
db26a60320 Fix another uninitialized value reported in #695 2019-01-03 07:16:25 -05:00
Themba D
e6126bc218 Fix uninitialized value reported in #695 2019-01-03 07:15:33 -05:00
Gabor Kiss-Vamosi
29200c8814 Merge pull request #691 from Ferruck/fix/limits-error
lv_log: Fix type limits error
2019-01-03 11:19:45 +01:00
Gabor Kiss-Vamosi
5bbb83c68b Merge pull request #693 from joltwallet/dirty_heap
Don't dirty heap if the lv_btn action deletes the button obj
2019-01-03 10:07:34 +01:00
Themba D
8ec482fdbd Coding standard update 2019-01-02 16:13:04 -05:00
Brian Pugh
f2c4aadfe1 Don't dirty heap if the action deletes the button 2019-01-02 15:09:27 -06:00
Philipp Trommler
75f3198c3d lv_log: Fix type limits error
When building LittlevGL with a rather recent compiler (tested with GCC
7.3.1 provided by Arm), `-Wall`, `-Wextra` and `-Werror` activated and
`LV_LOG_LEVEL` set to `LV_LOG_LEVEL_TRACE`, compilation fails due to a
type limits error in lv_log.c

     if(level >= LV_LOG_LEVEL) {
              ^~

because the comparison is always true, since level is a `lv_log_level_t`
(that is a typedef for `uint8_t`) and `LV_LOG_LEVEL_TRACE` equals 0.

Fix that by making `lv_log_level_t` a typedef to `int8_t`.

Fixes #690
2019-01-02 15:18:02 +01:00
Gabor Kiss-Vamosi
d3101f8e96 lv_bar: add symmetric feature to start the indicator from zero 2019-01-01 14:14:17 +01:00
Gabor Kiss-Vamosi
1927a4cf47 lv_table: minor fixes 2019-01-01 13:48:30 +01:00
Gabor Kiss-Vamosi
0bd55a1fa1 lv_table: add 4 CELL styles and horizontal line drawing on '\n' 2019-01-01 13:44:19 +01:00
Gabor Kiss-Vamosi
cda531fc56 lv_circ.c: include lv_circ.h for consistency 2019-01-01 01:34:29 +01:00
Gabor Kiss-Vamosi
8b3786db40 remove unused function declarations 2019-01-01 01:33:18 +01:00
Gabor Kiss-Vamosi
639edca434 fix incosistent function parameter names. See #681 2019-01-01 01:32:16 +01:00
Gabor Kiss-Vamosi
bf43316942 add themes to spinbox, table and tileview 2019-01-01 01:20:14 +01:00
Gabor Kiss-Vamosi
9c7c200048 lv_porting: add display and indev porting skeleton functions 2018-12-31 18:19:38 +01:00
Gabor Kiss-Vamosi
ceab2ac138 lv_gauge: add interpolation for needle between degrees 2018-12-30 22:00:59 +01:00
Gabor Kiss-Vamosi
6322798b61 lv_trigo_sin: bugfix for with 179 degree 2018-12-30 22:00:59 +01:00
Gabor Kiss-Vamosi
a9921c78e8 lv_btnm: drawing bugfix 2018-12-30 15:58:14 +01:00
Gabor Kiss-Vamosi
7ac12cd071 lv_ta: refresh only the cursor area on cursor blink 2018-12-30 15:02:16 +01:00
Gabor Kiss-Vamosi
d7ae21ce85 lv_vdb: add comments 2018-12-29 09:18:58 +01:00
Gabor Kiss-Vamosi
31468efc8e update lv_conf_temp with extra info 2018-12-29 09:12:46 +01:00
Gabor Kiss-Vamosi
f25dec516b add LV_VDB_TRUE_DOUBLE_BUFFERED 2018-12-29 09:12:32 +01:00
Gabor Kiss-Vamosi
8bca90a40b Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-12-28 18:07:11 +01:00
Gabor Kiss-Vamosi
62b3b2c578 update mk files to use absolute path 2018-12-28 18:06:57 +01:00
Themba Dube
ae68e0a449 Merge branch 'master' into dev-5.3 2018-12-27 12:36:19 -05:00
Gabor Kiss-Vamosi
6536a30b03 Merge pull request #676 from embeddedt/kb_bksp
Change lv_kb delete key to backspace
2018-12-27 18:35:07 +01:00
Themba Dube
0dcaa505fa Replace "Del" key on keyboard with backspace since that is its function 2018-12-27 10:32:05 -05:00
Gabor Kiss-Vamosi
963d91f07d Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-12-26 23:49:55 +01:00
Gabor Kiss-Vamosi
65cfdd1bf6 lv_table: fix size (add 1 px) 2018-12-26 23:49:41 +01:00
Gabor Kiss-Vamosi
67972f787b Merge pull request #673 from ErichStyger/master
Several typo and spelling fixes
2018-12-26 23:38:57 +01:00
Gabor Kiss-Vamosi
d78c2f0ef5 Merge pull request #661 from tjstyle/master
lv_log: fix warnings
2018-12-26 23:36:15 +01:00
Gabor Kiss-Vamosi
a114a42b74 Update README.md 2018-12-26 23:35:18 +01:00
Gabor Kiss-Vamosi
3e8e94d49c fix warning in lv_anim_path_bounce 2018-12-26 19:31:00 +01:00
Gabor Kiss-Vamosi
fa89846ee3 lv_sw: call action when released 2018-12-26 19:29:17 +01:00
Gabor Kiss-Vamosi
bffa23c4b2 add LV_VERSION_CHECK 2018-12-26 08:24:47 +01:00
Gabor Kiss-Vamosi
d19792289d add LV_BORDER_INTERNAL 2018-12-26 08:24:18 +01:00
Erich Styger
2bfcce40e2 typo and spelling fixes in comments 2018-12-26 07:58:06 +01:00
Erich Styger
9cf4cc1533 Merge pull request #1 from littlevgl/master
Syncing with original repo
2018-12-26 07:42:33 +01:00
Teguh Sobirin
60ee852587 lv_log: fix warnings 2018-12-24 00:49:16 +07:00
Themba Dube
9531f04abf Merge branch 'master' into dev-5.3 2018-12-23 06:40:11 -05:00
Themba Dube
6f5c1ba629 Fix wrong return value of lv_arc_get_angle_end (Closes #663) 2018-12-23 06:38:54 -05:00
Gabor Kiss-Vamosi
4c2df29808 lv_group: do not modify the focused style if the syle_mod function is NULL 2018-12-22 20:41:20 +01:00
Gabor Kiss-Vamosi
bfba1c477f rename bool '..._en' function paramter names to be more consistent 2018-12-22 19:45:55 +01:00
Gabor Kiss-Vamosi
8c74a23ec1 rename lv_line_y_inv to lv_line_y_invert 2018-12-22 19:32:27 +01:00
Gabor Kiss-Vamosi
fd5ca1e52b Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-12-22 19:08:55 +01:00
Gabor Kiss-Vamosi
f46958bb3f minor fixes 2018-12-22 19:08:40 +01:00
Gabor Kiss-Vamosi
1787b63599 reworks VDB to work with true double buffering 2018-12-22 19:08:03 +01:00
Gabor Kiss-Vamosi
f80c6ab178 Merge pull request #656 from littlevgl/tabview_hide
Add lv_tabview_set_hidden/lv_tabview_get_hidden
2018-12-21 19:10:34 +01:00
Gabor Kiss-Vamosi
7947a991a4 lv_draw_label: optimization 2018-12-21 15:25:45 +01:00
Gabor Kiss-Vamosi
391fda7ba6 Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-12-21 14:35:40 +01:00
Gabor Kiss-Vamosi
19a5f5cd54 minor fixes 2018-12-21 14:35:25 +01:00
Gabor Kiss-Vamosi
8cd0fcefef add lv_table to the makefile 2018-12-20 23:40:52 +01:00
Gabor Kiss-Vamosi
a4a98617c7 lv_table: fix uninitialized new cells 2018-12-20 23:15:29 +01:00
Gabor Kiss-Vamosi
222ef3a76a lv_img: fix memory leak 2018-12-20 22:48:10 +01:00
Themba Dube
4fbfbc3dd7 Add lv_tabview_set_hidden/lv_tabview_get_hidden 2018-12-20 10:07:28 -05:00
Gabor Kiss-Vamosi
693ab86a6c Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-12-20 00:04:21 +01:00
Gabor Kiss-Vamosi
837cb2b695 add comment to lv_conf_checker.h 2018-12-20 00:04:09 +01:00
Gabor Kiss-Vamosi
cc20e4cb7d add lv_conf_checker.h 2018-12-20 00:01:24 +01:00
Gabor Kiss-Vamosi
789775d8d7 minor fixes 2018-12-20 00:01:05 +01:00
Gabor Kiss-Vamosi
1314eff237 Merge pull request #641 from littlevgl/indev_feedback
Input device feedback API
2018-12-19 20:28:03 +01:00
Gabor Kiss-Vamosi
47f507ff62 Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-12-19 16:35:58 +01:00
Gabor Kiss-Vamosi
e32c35905a lv_img: use style.image.color for texts 2018-12-19 16:35:44 +01:00
Gabor Kiss-Vamosi
61caef8e94 lv_indev_set_cursor: don't enable cursor for LV_INDEV_TYPE_BUTTON 2018-12-18 07:33:55 +01:00
Gabor Kiss-Vamosi
e6c4845983 lv_label: remove space from LV_LABEL_LONG_ROLL/SCROLL anims 2018-12-18 07:25:34 +01:00
Gabor Kiss-Vamosi
e5f449e74f indev feedback: update signal names 2018-12-17 14:54:12 +01:00
Gabor Kiss-Vamosi
93781909bb lv_draw_label: optimization for long texts (uncomment some lines) 2018-12-17 14:34:26 +01:00
Gabor Kiss-Vamosi
60c07120c7 lv_draw_label: optimization for long texts 2018-12-17 14:33:50 +01:00
Themba Dube
4c0cd82d9c Initial lv_indev_set_feedback support 2018-12-16 20:16:48 -05:00
embeddedt
f0aa7abf21 Merge pull request #636 from littlevgl/btnm_recolor
Add ability to recolor btnm and mbox button labels
2018-12-16 09:35:18 -05:00
Themba Dube
35901db2cd Add mbox recoloring support 2018-12-16 09:33:10 -05:00
Gabor Kiss-Vamosi
0fa3fecfe4 Fix ifdef guards around lv_sw animation code 2018-12-16 08:43:35 -05:00
Gabor Kiss-Vamosi
8a0868e2e0 Merge branch 'dev-5.3' into btnm_recolor 2018-12-16 11:33:42 +01:00
Gabor Kiss-Vamosi
59151b375c Merge pull request #633 from upbeat27/dev-5.3
Add wrap enable/disable for lv_group
2018-12-16 09:52:50 +01:00
Gabor Kiss-Vamosi
5e080ad61d Merge pull request #622 from turoksama/dev-5.3
Attempt to fix an LV_BORDER_RIGHT drawing issue.
2018-12-16 08:32:24 +01:00
Themba Dube
ea224d409e Add lv_btnm_set_recolor/lv_btnm_get_recolor 2018-12-15 21:44:44 -05:00
Themba Dube
37761540d0 Fix warning in lv_table.c 2018-12-15 21:26:14 -05:00
Themba Dube
b4d4759383 Merge branch 'master' into dev-5.3 2018-12-15 09:17:49 -05:00
Gabor Kiss-Vamosi
52ffa29ebe lv_kb: bugfix update 2018-12-15 09:16:47 -05:00
Themba Dube
c74f4656fc Fix OK and close button symbols appearing in text area 2018-12-15 09:16:39 -05:00
Josh
92747ec37a Fix missing temporary setting of wrap to 1 2018-12-14 16:02:29 -08:00
Gabor Kiss-Vamosi
3b81dc2a55 lv_kb: bugfix update 2018-12-15 00:11:28 +01:00
Josh
47bdf497b6 Fix lv_group wrap behavior when removing head or tail object from group 2018-12-14 14:24:47 -08:00
Themba Dube
b1712325a7 Fix OK and close button symbols appearing in text area 2018-12-14 16:32:22 -05:00
Josh
9817e050e0 Add wrap enable/disable for lv_group
Allows for controlling whether focus next/prev will wrap at the boundaries, or if they will stop at the boundaries.
2018-12-14 13:05:00 -08:00
Themba Dube
001f788631 Merge remote-tracking branch 'origin/dev-5.3' into embeddedt-dev-5.3 2018-12-14 16:01:58 -05:00
Gabor Kiss-Vamosi
6f1d0ef97b fixes because of sending LV_SIGNAL_PRESSED in LV_GROUP_KEY_ENTER press 2018-12-14 10:33:18 +01:00
Gabor Kiss-Vamosi
964965be9d Merge branch 'table' into dev-5.3 2018-12-13 17:42:14 +01:00
Gabor Kiss-Vamosi
4919f24985 lv_table updates 2018-12-13 17:41:59 +01:00
Gabor Kiss-Vamosi
1e23df926c lv_table updates 2018-12-13 17:38:27 +01:00
Gabor Kiss-Vamosi
dea81daa79 add lv_font_remove 2018-12-13 15:18:06 +01:00
Themba Dube
1ccec72f8c Move ifdef guard around lv_sw_set_anim_time 2018-12-12 20:15:09 -05:00
Themba Dube
bd38e5a7f2 Merge branch 'dev-5.3' into embeddedt-dev-5.3 2018-12-12 20:04:45 -05:00
Gabor Kiss-Vamosi
6c552e8447 ta: fix cursor draw with LV_TXT_UTF8 == 0 2018-12-12 23:45:06 +01:00
Gabor Kiss-Vamosi
86de6f5fbc lv_font: fix typo 2018-12-12 18:55:32 +01:00
Gabor Kiss-Vamosi
a7bc41b528 ddlist and roller delete fix 2018-12-12 09:08:10 +01:00
Samuel
49b136191f Update lv_btnm.c
Attempt to fix an LV_BORDER_RIGHT drawing issue.
2018-12-12 11:30:17 +08:00
Gabor Kiss-Vamosi
e68c3ab725 line draw updates with width = 1 2018-12-11 18:00:48 +01:00
Themba Dube
a2a03d8d53 Merge remote-tracking branch 'origin/master' into dev-5.3 2018-12-11 07:34:09 -05:00
embeddedt
d712a12db1 Merge pull request #619 from mheranco/master
* Swapped two comments in lv_list.c
* Removed unused variables in lv_theme_alien and lv_theme_mono
2018-12-11 07:31:50 -05:00
Martin Herancourt
e60482ca0e minor fixes 2018-12-11 10:21:22 +01:00
Themba Dube
42a8c59886 Handle USE_LV_ANIMATION being disabled in lv_page and lv_sw 2018-12-10 15:35:57 -05:00
embeddedt
b1499cd954 Merge pull request #614 from embeddedt/ddlist_align
Add lv_ddlist_set_align and lv_ddlist_get_align
2018-12-09 20:52:48 -05:00
Themba Dube
f504d01644 Add lv_ddlist_set_align and lv_ddlist_get_align 2018-12-09 20:51:32 -05:00
embeddedt
e084fb022b Merge pull request #607 from aenchevich/dev-5.3
lv_roller_set_align and some minor bug fixes
2018-12-09 20:41:15 -05:00
embeddedt
3fc3c9d0cf Merge pull request #604 from turoksama/dev-5.3
Add ability to have only one button selected on a list at a time
2018-12-09 20:32:42 -05:00
Themba Dube
e5dabf716a Rename btn_single_selected_mode to single_mode 2018-12-09 20:30:36 -05:00
Themba Dube
739b0d4399 Merge branch 'master' into dev-5.3 2018-12-08 10:02:27 -05:00
embeddedt
92d1e5cefd Merge pull request #613 from embeddedt/dev-5.3
Fix compilation error in lv_chart
2018-12-08 10:01:32 -05:00
Themba Dube
429dca127d Fix compilation error in lv_chart 2018-12-08 09:59:56 -05:00
Themba Dube
303f55f3a3 Merge remote-tracking branch 'upstream/dev-5.3' into dev-5.3 2018-12-08 09:31:47 -05:00
Themba Dube
648c3430ef Add bool single_selected_mode to lv_list_ext_t 2018-12-08 09:22:41 -05:00
Alexander
50fe1ba14d lv_roller_set_align / lv_roller_get_align funcs (user can align the Options: left, right or center) 2018-12-07 15:11:24 +02:00
Samuel
c7846c827b Update lv_list.c
Use setter function enable/disable single selected mode.
2018-12-07 15:22:07 +08:00
Samuel
be8d241e06 Update lv_list.h 2018-12-07 15:21:35 +08:00
Gabor Kiss-Vamosi
545b97de65 Update CONTRIBUTING.md 2018-12-06 22:07:35 +01:00
Alexander
64a2a85077 Compilation error fixes 2018-12-05 11:28:16 +02:00
Gabor Kiss-Vamosi
efa9f0a5d1 Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-12-05 06:42:57 +01:00
Gabor Kiss-Vamosi
546262df38 add PRESS action handling to keypad indev 2018-12-05 06:42:37 +01:00
Gabor Kiss-Vamosi
6eb9a636d1 Merge branch 'master' into dev-5.3 2018-12-03 14:52:48 +01:00
Gabor Kiss-Vamosi
33f0900ab7 lv_draw_label: inline recolor bugfix 2018-12-03 14:52:06 +01:00
Samuel
cde5f31135 Update lv_list.h 2018-12-03 19:45:47 +08:00
Samuel
7da01d8683 Update lv_list.c 2018-12-03 19:44:58 +08:00
Gabor Kiss-Vamosi
ccea31d3ab Merge branch 'master' into dev-5.3 2018-12-02 16:49:13 +01:00
Gabor Kiss-Vamosi
aebe5c1dfc lv_img_set_src: bugfix 2018-12-02 16:48:50 +01:00
Gabor Kiss-Vamosi
1efd06ef56 Merge pull request #597 from stheil/master
lv_chart: Use circular buffer to avoid memcopy for every new data point
2018-12-02 12:01:59 +01:00
Gabor Kiss-Vamosi
7d7a85c78f lv_chart:fixes 2018-12-02 09:37:24 +01:00
Gabor Kiss-Vamosi
28c4599436 Merge branch 'master' of https://github.com/stheil/lvgl into stheil-master 2018-12-02 09:07:34 +01:00
Themba Dube
7933435ffc Merge remote-tracking branch 'origin/master' into dev-5.3 2018-12-01 09:44:02 -05:00
embeddedt
1baaf560c5 Merge pull request #600 from ukulili/patch-1
Update lv_conf_templ.h
2018-12-01 09:31:42 -05:00
Cabe Lee
0002d6f833 Update lv_conf_templ.h
Modify "# define _CRT_SECURE_NO_WARNINGS" to "#define _CRT_SECURE_NO_WARNINGS";
2018-12-01 17:48:30 +08:00
Gabor Kiss-Vamosi
0c8782c0ff Merge branch 'master' into dev-5.3 2018-11-30 10:05:51 +01:00
Gabor Kiss-Vamosi
23a0b28326 fix warning 2018-11-30 10:05:30 +01:00
Stefan Theil
8e10f79075 lv_chart: Use circular buffer to avoid memcopy for every new data point
This makes the cost of adding a data point independent of array size.
Changing the array size is more complicated, but that will most likely
happen a lot less than adding a data point.
2018-11-29 22:03:56 +01:00
Gabor Kiss-Vamosi
1e19574645 lv_table: fix 2018-11-29 10:02:34 +01:00
Gabor Kiss-Vamosi
e7058e9135 table updates 2018-11-29 08:52:21 +01:00
Gabor Kiss-Vamosi
c1140ec6a7 begin lv_table 2018-11-28 22:02:51 +01:00
Gabor Kiss-Vamosi
47127e9e4e tileview updates 2018-11-28 20:54:23 +01:00
Gabor Kiss-Vamosi
04e42a8d70 Merge pull request #588 from aenchevich/dev-5.3
Fixing C standard related error, formatting lv_conf_templ.h
2018-11-28 14:37:13 +01:00
Alexander
1d7dd0a227 Fixing C standard related error, formatting lv_conf_templ.h 2018-11-26 18:34:37 +02:00
Gabor Kiss-Vamosi
63b86cab2e lv_anim_bounce updates 2018-11-26 15:04:02 +01:00
Gabor Kiss-Vamosi
9bd7847afb Merge branch 'bounce' into dev-5.3 2018-11-26 15:02:29 +01:00
embeddedt
097a0c4a90 Merge pull request #586 from embeddedt/win_drag
Add `lv_win_set_drag` and `lv_win_get_drag`
2018-11-26 07:18:41 -05:00
Gabor Kiss-Vamosi
916c6b3b2f Merge pull request #585 from kisvegabor/tileview
Tileview: new object type
2018-11-26 10:33:48 +01:00
Gabor Kiss-Vamosi
e82638fa03 Merge pull request #569 from littlevgl/imgbtn_update
lv_imgbtn: add tiling (repeated center) feature
2018-11-26 10:33:23 +01:00
Gabor Kiss-Vamosi
dd26bcb22b Merge pull request #576 from kisvegabor/realign
Add realign feature
2018-11-26 10:33:03 +01:00
Themba Dube
47ec7141ac Merge branch 'dev-5.3' into win_drag 2018-11-25 21:34:51 -05:00
Themba Dube
b42cc9f4ad Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-11-25 21:34:38 -05:00
Themba Dube
4bde73d7a9 Add lv_win_set_drag and lv_win_get_drag 2018-11-25 21:31:54 -05:00
Gabor Kiss-Vamosi
a9eb9f9ea5 tileview asn scroll propagation improvments 2018-11-25 19:40:19 +01:00
Gabor Kiss-Vamosi
2cda0fc1fe Merge branch 'page_flash' of https://github.com/kisvegabor/lvgl into tileview 2018-11-25 12:02:28 +01:00
Gabor Kiss-Vamosi
c62cd4dfcb lv_tileview: add the new object type 2018-11-25 12:02:16 +01:00
Gabor Kiss-Vamosi
c37cd19a23 page edge flah updates 2018-11-25 09:54:13 +01:00
Gabor Kiss-Vamosi
dd8f1c7b38 lv_page: add edge flash animation 2018-11-24 20:31:06 +01:00
Gabor Kiss-Vamosi
3785fc4887 lv_line_draw: compensate y2 coordinate if AA is enabled 2018-11-24 19:05:00 +01:00
Gabor Kiss-Vamosi
f6fb219ab2 lv_calendar: day names padding update 2018-11-24 09:38:10 +01:00
Gabor Kiss-Vamosi
6a2b4a81b5 Merge branch 'dev-5.3' of https://github.com/turoksama/lvgl into dev-5.3 2018-11-24 09:31:18 +01:00
Gabor Kiss-Vamosi
15dae7dcbc define LV_ATTRIBUTE_FLUSH_READY as empty if not defined 2018-11-24 07:49:49 +01:00
Gabor Kiss-Vamosi
e8013a4252 Merge branch 'master' into dev-5.3 2018-11-24 07:42:02 +01:00
Gabor Kiss-Vamosi
f6bc6a0bf6 lv_indev: fix warnings 2018-11-24 07:41:18 +01:00
Gabor Kiss-Vamosi
57dc4ed476 lv_anim_bounce path 2018-11-24 07:38:07 +01:00
Gabor Kiss-Vamosi
9d3f6dacb8 Merge pull request #577 from mharizanov/master
Define a custom attribute to `lv_flush_ready` function
2018-11-24 07:28:00 +01:00
Samuel
cc651d0b4c Update lv_calendar.c 2018-11-24 11:11:36 +08:00
Gabor Kiss-Vamosi
f30f3ea8ed realign: fix warnings 2018-11-23 11:35:13 +01:00
Gabor Kiss-Vamosi
f317ff6d43 Merge pull request #578 from littlevgl/embeddedt-use-uintptr_t
Replace uint64_t with uintptr_t in lv_theme.c
2018-11-23 10:07:50 +01:00
embeddedt
d277e80d81 Replace uint64_t with uintptr_t in lv_theme.c
This resolves #574.
2018-11-22 15:04:35 -05:00
mharizanov
cc801277ce Define a custom attribute to lv_flush_ready function 2018-11-22 19:39:01 +02:00
mharizanov
45cf22ebf5 Define a custom attribute to lv_flush_ready function 2018-11-22 19:36:46 +02:00
Gabor Kiss-Vamosi
ce1a1f749a realign: fix typo 2018-11-22 15:19:22 +01:00
Gabor Kiss-Vamosi
d797d10376 add realign feature 2018-11-22 14:59:38 +01:00
Gabor Kiss-Vamosi
e04a3e7fce Merge branch 'master' into dev-5.3 2018-11-22 11:47:56 +01:00
Gabor Kiss-Vamosi
b8009d7c9a Merge pull request #560 from kisvegabor/indev_data_init
lv_indev: init data before calling of indev_read
2018-11-22 11:46:24 +01:00
Themba Dube
be783a65e0 Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-11-21 15:01:35 -05:00
Gabor Kiss-Vamosi
6dc8b2f9f7 Merge branch 'AloyseTech-chart_optimize' into dev-5.3 2018-11-21 15:28:28 +01:00
Gabor Kiss-Vamosi
e37846bdcb Merge branch 'chart_optimize' of https://github.com/AloyseTech/lvgl into AloyseTech-chart_optimize 2018-11-21 15:20:08 +01:00
Gabor Kiss-Vamosi
9b4e5e57d6 Merge branch 'dev-5.3' into imgbtn_update 2018-11-21 14:35:51 +01:00
Gabor Kiss-Vamosi
e68969daa6 Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-11-21 14:01:21 +01:00
Gabor Kiss-Vamosi
c584586985 lv_refr/draw: enable the drawing even with body.opa == LV_OPA_TRANSP
E.g. labels don't care with body paramters
2018-11-21 14:00:30 +01:00
embeddedt
c255e4bf8d Merge pull request #553 from embeddedt/animated_switch
Add animations to switch control
2018-11-21 07:58:48 -05:00
embeddedt
c1c7cfd234 Merge pull request #563 from kisvegabor/lv_btnm_api_ext
add lv_btnm_get_pressed
2018-11-21 07:57:29 -05:00
Gabor Kiss-Vamosi
dc436a66cc lv_imgbtn: add tiled option 2018-11-20 17:05:59 +01:00
Gabor Kiss-Vamosi
699f40c9b2 lv_anim: add overshoot path 2018-11-20 14:49:16 +01:00
Gabor Kiss-Vamosi
84d20442a4 Merge branch 'animated_switch' of https://github.com/embeddedt/lvgl into embeddedt-animated_switch 2018-11-20 07:33:53 +01:00
Gabor Kiss-Vamosi
5416c2b778 lv_sw: aniamtion improvements 2018-11-20 07:33:32 +01:00
Themba Dube
5d09a25abc Merge branch 'animated_switch' of github.com:embeddedt/lvgl into animated_switch 2018-11-19 07:42:11 -05:00
Themba Dube
74f8c0e06a Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into animated_switch 2018-11-19 07:40:32 -05:00
Gabor Kiss-Vamosi
892f2be487 add lv_btnm_get_pressed 2018-11-19 07:00:17 +01:00
Gabor Kiss-Vamosi
bf557a1bb0 lv_sw: add comment 2018-11-19 06:35:11 +01:00
Gabor Kiss-Vamosi
073e99e538 lv_indev: init data before calling of indev_read 2018-11-18 11:54:02 +01:00
Themba Dube
ee544893f6 Merge branch 'master' into dev-5.3 2018-11-17 08:02:49 -05:00
embeddedt
2c8cf7d7ea Update README.md 2018-11-17 08:02:11 -05:00
Gabor Kiss-Vamosi
2c74944566 git push origin dev-5.3Merge branch 'AloyseTech-preload-anim' into dev-5.3 2018-11-17 10:49:39 +01:00
Gabor Kiss-Vamosi
042147b010 add LV_PRELOAD_DEF_ANIM to lv_conf_templ.h 2018-11-17 10:48:17 +01:00
Gabor Kiss-Vamosi
0d3cc14c5e Merge branch 'preload-anim' of https://github.com/AloyseTech/lvgl into AloyseTech-preload-anim 2018-11-17 10:44:29 +01:00
Gabor Kiss-Vamosi
07f2e18dfc lv_sw: animation fixes 2018-11-16 18:36:12 +01:00
Gabor Kiss-Vamosi
938819a8b8 lv_sw: simplify animation 2018-11-16 17:42:29 +01:00
AloyseTech
4de708b5ad add api for setting/getting the animation type of preloader 2018-11-15 11:37:00 +01:00
Themba Dube
65d6c82f81 Add off animation and correct initial switch state 2018-11-14 20:24:13 -05:00
Themba Dube
1da612e8a0 Prevent switch from jumping when clicked 2018-11-14 20:20:35 -05:00
Themba Dube
e6214480c4 Very rough prototype of animated switch 2018-11-14 20:11:32 -05:00
Themba Dube
6de61f3f5b Very rough prototype of animated switch 2018-11-14 20:09:09 -05:00
Gabor Kiss-Vamosi
81634d410b fix version number conflict 2018-11-15 00:33:23 +01:00
Gabor Kiss-Vamosi
7528e2a9b2 start v5.2.1-dev 2018-11-15 00:30:42 +01:00
Gabor Kiss-Vamosi
a9a55321c7 fix version number: release v5.2 2018-11-15 00:21:09 +01:00
Gabor Kiss-Vamosi
4cbd8ea8c9 release v5.3 2018-11-15 00:18:45 +01:00
Gabor Kiss-Vamosi
91f250d4d2 lv_conf.h minor formatting 2018-11-15 00:17:12 +01:00
AloyseTech
5102e71e84 add optimized chart drawing for test 2018-11-15 00:01:05 +01:00
AloyseTech
7b9710aa4e Use define to enable or not double animation on preload 2018-11-14 23:01:22 +01:00
AloyseTech
624939f6ba change the second animation range 2018-11-14 17:33:44 +01:00
AloyseTech
16aaa93e76 Better looking preload animation 2018-11-14 17:00:59 +01:00
Gabor Kiss-Vamosi
7897500c1e lv_group: apply lv_group_refocus update again, because it was overwrittetn from the reverted master 2018-11-14 11:27:15 +01:00
Gabor Kiss-Vamosi
64558e138b Merge branch 'master' into dev-5.3 2018-11-14 11:26:06 +01:00
Gabor Kiss-Vamosi
cc995b625b Merge branch 'dev-5.3' of https://github.com/littlevgl/lvgl into dev-5.3 2018-11-14 11:21:09 +01:00
Gabor Kiss-Vamosi
c81d1b5dd0 lv_group: revert accidentally added merge fron dev-5.3 2018-11-14 10:49:09 +01:00
embeddedt
9ae58caadb Merge pull request #540 from turoksama/dev-5.3
[PR] Add a DOWN symbol within ddlist.
2018-11-11 21:09:10 -05:00
Samuel
f2f7681be2 Update lv_ddlist.c 2018-11-12 10:02:29 +08:00
Gabor Kiss-Vamosi
970d8e813a Merge branch 'master' into dev-5.3 2018-11-11 19:56:44 +01:00
Gabor Kiss-Vamosi
4007834f15 minor fixes 2018-11-11 19:56:30 +01:00
Gabor Kiss-Vamosi
96cd245463 lv_ddlist: minor fixes 2018-11-11 15:16:26 +01:00
Samuel
6742d626e7 Update lv_ddlist.c 2018-11-11 10:16:01 +08:00
Gabor Kiss-Vamosi
e1bde8c730 merge master 2018-11-11 00:03:56 +01:00
Gabor Kiss-Vamosi
b44da3c27f lv_group: fix lv_group_remove_obj() if there is only object is the group 2018-11-11 00:02:44 +01:00
Gabor Kiss-Vamosi
8e70d18a32 lv_ddlist: fix arrow area calculation 2018-11-10 09:16:22 +01:00
Gabor Kiss-Vamosi
f6ce901132 Merge branch 'dev-5.3' of https://github.com/turoksama/lvgl into turoksama-dev-5.3 2018-11-10 07:07:05 +01:00
Themba Dube
4637f4085d Fix compilation error in lv_roller 2018-11-09 16:44:26 -05:00
Themba Dube
134b887adc Add getter function for lv_ddlist_set_draw_arrow 2018-11-09 16:37:40 -05:00
Samuel
4a4d7209ba Update lv_ddlist.c 2018-11-09 21:27:36 +08:00
Samuel
e159e1a8bd Update lv_ddlist.c 2018-11-09 20:32:08 +08:00
Samuel
ac9ee5d1f8 Update lv_roller.c 2018-11-09 20:29:59 +08:00
Samuel
54435fce60 Update lv_ddlist.h 2018-11-09 20:27:59 +08:00
Samuel
4092adbe28 Update lv_ddlist.c 2018-11-09 20:25:48 +08:00
Samuel
06f81e8a61 Update lv_conf_templ.h 2018-11-09 20:13:26 +08:00
Gabor Kiss-Vamosi
e94774ccec Merge branch 'dev-5.3' of https://github.com/turoksama/lvgl into turoksama-dev-5.3 2018-11-09 12:36:58 +01:00
Gabor Kiss-Vamosi
a4d950a2f2 lv_anim: add lv_anim_count_running 2018-11-09 12:36:38 +01:00
Gabor Kiss-Vamosi
63bc66c40d lv_page: remove debug printfs 2018-11-09 07:22:38 +01:00
Gabor Kiss-Vamosi
2a053b86bf lv_ta: with ENCODER show cursor only in edit mode 2018-11-09 07:11:20 +01:00
Gabor Kiss-Vamosi
d643219ee8 lv_group: don't edit the first obj in the group, becuase some indev types (e.g. TP) not supports it 2018-11-09 07:10:10 +01:00
Samuel
74015d6d18 Update lv_conf_templ.h 2018-11-08 23:30:13 +08:00
Samuel
224bd55d50 Update lv_roller.c 2018-11-08 23:28:41 +08:00
Samuel
4f51940274 Update lv_ddlist.c 2018-11-08 23:28:04 +08:00
Samuel
d2263c121a Update lv_ddlist.h 2018-11-08 23:27:30 +08:00
Samuel
075f8740d4 Update lv_ddlist.c 2018-11-08 23:26:43 +08:00
Samuel
8fd442531f Update lv_conf_templ.h 2018-11-08 23:24:23 +08:00
Samuel
4f49061084 Update lv_ddlist.c 2018-11-08 22:47:43 +08:00
Samuel
d02cdc2fec Update lv_ddlist.c 2018-11-08 22:46:20 +08:00
Samuel
29a695b4a6 Add files via upload 2018-11-08 22:39:08 +08:00
Gabor Kiss-Vamosi
9504cb8531 Merge branch 'master' into dev-5.3 2018-11-08 06:23:31 +01:00
Gabor Kiss-Vamosi
8a341d78b1 Merge pull request #539 from C47D/fix_lv_btnm_get_style
Fix lv btnm get style (#513)
2018-11-08 06:21:27 +01:00
Carlos
63075b73bd Add missing = in lv_btnm_get_style function 2018-11-07 21:54:51 -06:00
Carlos
2a27c469fe Fix warning in lv_img_src_get_type 2018-11-07 21:54:18 -06:00
Gabor Kiss-Vamosi
b3c159d968 lv_list: add API for scroll propagation 2018-11-07 20:59:03 +01:00
Gabor Kiss-Vamosi
fa25d7c428 lv_page: scroll propagation buf fix 2018-11-07 20:58:36 +01:00
Gabor Kiss-Vamosi
ba769623be lv_page: add scroll propagation feature 2018-11-07 20:41:52 +01:00
Gabor Kiss-Vamosi
82ff19092b lv_spinbox: fix warnings 2018-11-07 20:41:04 +01:00
Gabor Kiss-Vamosi
e5f59799ee lv_list: use 'last_sel' with encoder too 2018-11-07 17:58:19 +01:00
Gabor Kiss-Vamosi
88392f9bd3 Merge branch 'AloyseTech-spinbox' into dev-5.3 2018-11-07 17:52:22 +01:00
Gabor Kiss-Vamosi
0a3621cdee fix typo 2018-11-07 17:48:50 +01:00
Gabor Kiss-Vamosi
7c32c9c6e7 fix conflicts when merging from master 2018-11-07 17:47:50 +01:00
Gabor Kiss-Vamosi
3f059575ee Merge pull request #529 from joltwallet/rem_last_sel
Remember list last selected
2018-11-07 10:18:50 +01:00
AloyseTech
d4fb9b1343 reverse encoder direction (CCW==decrement, CW==increment) 2018-11-06 17:55:11 +01:00
Brian Pugh
9c2b0ac5ea valid action not necessary to save last_sel 2018-11-06 08:23:57 -08:00
Gabor Kiss-Vamosi
5088e903cb Merge pull request #526 from AloyseTech/single-obj-group
Avoid object defocusing in single group object
2018-11-06 17:01:05 +01:00
Gabor Kiss-Vamosi
5e8a6924b6 Merge pull request #535 from C47D/fix_all_5133
Fixes all functions reported in #513 and add a missing semicolon in #531
2018-11-06 16:50:42 +01:00
Gabor Kiss-Vamosi
7c76a46cbc Remove unused code
Co-Authored-By: AloyseTech <AloyseTech@users.noreply.github.com>
2018-11-06 16:42:30 +01:00
Carlos
fbf44f1991 Fixes all functions reported in #513 and add a missing semicolon in #531 2018-11-05 22:21:20 -06:00
Brian Pugh
e37e0079be Set lv_list last_sel to NULL upon creation 2018-11-05 09:33:05 -08:00
Brian Pugh
96c0050cb8 Remember list last selected 2018-11-05 08:46:51 -08:00
AloyseTech
2c7b51ca56 Add left digit padding handling 2018-11-05 14:48:33 +01:00
AloyseTech
d5747a0379 fix set_digit_format 2018-11-05 14:47:30 +01:00
AloyseTech
b0962095f3 Merge branch 'spinbox' of github.com:AloyseTech/lvgl into spinbox 2018-11-05 14:02:13 +01:00
AloyseTech
77162e7784 Avoid object defocusing in signle group object 2018-11-05 13:15:34 +01:00
AloyseTech
6e116d9e59 Add digit padding feature [WIP] 2018-11-05 11:52:21 +01:00
Gabor Kiss-Vamosi
a81b735016 Merge pull request #522 from C47D/Fix_513
Fixes #513
2018-11-04 20:54:03 +01:00
Gabor Kiss-Vamosi
e5464f5be7 spinbox: formatting 2018-11-04 20:21:51 +01:00
Carlos
d86f8a8981 Fixes #513 2018-11-04 12:24:45 -06:00
Gabor Kiss-Vamosi
deb8048da5 lv_draw_vbasic.c: remove unnecessary cast 2018-11-04 16:11:49 +01:00
AloyseTech
a88ad62af3 Add/fix comment 2018-11-03 18:41:06 +01:00
AloyseTech
8cafd07e0a Remove double api, add increment/decrement api 2018-11-03 18:26:59 +01:00
AloyseTech
46309f7333 update spinbox object when int value change 2018-11-03 18:07:25 +01:00
Gabor Kiss-Vamosi
612c618240 minor fixes 2018-11-02 14:21:10 +01:00
Gabor Kiss-Vamosi
e2bbbefb04 Merge branch 'spinbox' of https://github.com/AloyseTech/lvgl into AloyseTech-spinbox 2018-11-02 13:57:00 +01:00
Gabor Kiss-Vamosi
f1b59388bb Merge branch 'chartSerieClear' of https://github.com/AloyseTech/lvgl into AloyseTech-chartSerieClear 2018-11-02 13:37:23 +01:00
Gabor Kiss-Vamosi
c083150072 lv_list: fix warnings 2018-11-02 12:53:36 +01:00
Gabor Kiss-Vamosi
3353a74e1d Merge branch 'master' of https://github.com/fallstool/lvgl into dev-5.3 2018-11-02 12:50:22 +01:00
Gabor Kiss-Vamosi
79b5b0f1fc lv_list: update comments 2018-11-02 12:45:09 +01:00
Gabor Kiss-Vamosi
ed53728010 Merge branch 'master' into dev-5.3 2018-11-02 12:42:51 +01:00
AloyseTech
0fceadc529 add spinbox object to include list in lvgl.h 2018-11-01 19:45:48 +01:00
AloyseTech
404c52e3c2 create spinbox object, derivating lv_ta 2018-11-01 18:48:13 +01:00
AloyseTech
9b5ec3572e move LV_CHART_POINT_DEF to header and define it to LV_COORD_MIN 2018-11-01 18:40:13 +01:00
fallstool
46b4186216 Update lv_list.c
change the code style
2018-11-01 09:58:55 +08:00
AloyseTech
bcf0a42674 Negative chart point not rendered, add function to clear points from a serie 2018-10-30 17:26:26 +01:00
Gabor Kiss-Vamosi
029d0af946 lv_roller: save preserve the touchpad selected value on defucus 2018-10-30 13:46:49 +01:00
Gabor Kiss-Vamosi
f5e397341d lv_ll: fix comment typo 2018-10-30 13:46:49 +01:00
Gabor Kiss-Vamosi
32843f9f91 lv_roller: save preserve the touchpad selected value on defucus 2018-10-30 13:45:29 +01:00
fallstool
6ecd3f1f8a Update lv_list.c 2018-10-30 18:08:38 +08:00
fallstool
17bc493612 Update lv_list.c 2018-10-30 17:05:27 +08:00
fallstool
34f8013465 Update lv_list.h 2018-10-30 17:04:11 +08:00
fallstool
5b05afe948 Update lv_list.c 2018-10-30 16:38:39 +08:00
fallstool
686c6c9033 Update lv_list.h 2018-10-30 16:38:00 +08:00
Gabor Kiss-Vamosi
04239f9287 lv_ll: fix comment typo 2018-10-30 09:18:45 +01:00
fallstool
e163a796b2 Merge pull request #1 from littlevgl/master
merge
2018-10-30 15:16:19 +08:00
Gabor Kiss-Vamosi
63f1bf2d45 Merge pull request #495 from joltwallet/group_refocus_pr_squashed
Group refocus on deletion
2018-10-28 23:51:19 +01:00
Brian Pugh
0e7d25ba85 Group refocus on deletion 2018-10-28 15:44:58 -07:00
Gabor Kiss-Vamosi
b7792f0aa2 updates from dev-5.3 2018-10-28 23:18:22 +01:00
Gabor Kiss-Vamosi
429a188318 minor fixes in symbol fonts 2018-10-28 23:15:32 +01:00
Gabor Kiss-Vamosi
0ff6026df8 improve page focus styling 2018-10-28 23:14:59 +01:00
Gabor Kiss-Vamosi
984b35e2b0 fix version number conflict 2018-10-28 10:30:22 +01:00
Gabor Kiss-Vamosi
fc319a4502 lv_tabview: add lv_res_t return value to prevent tab laoding on LV_RES_INV 2018-10-28 10:29:06 +01:00
Gabor Kiss-Vamosi
4f11ad7adb lv_draw_img: fix buffer size 2018-10-28 09:07:00 +01:00
Gabor Kiss-Vamosi
436c09aa51 lv_ll: fix comment typo 2018-10-27 11:11:24 +02:00
Gabor Kiss-Vamosi
cd3f6340da add rc tag 2018-10-27 11:11:24 +02:00
Gabor Kiss-Vamosi
78428b523f lv_draw_img: fix to draw images with LV_COLOR_DEPTH 1 2018-10-27 11:11:24 +02:00
Gabor Kiss-Vamosi
f259b56e67 LV_GROUP_KEY_BACKSPACE 2018-10-20 00:43:42 +02:00
Gabor Kiss-Vamosi
e0afb3b8b4 Merge branch 'master' into dev-5.3 2018-10-20 00:39:12 +02:00
Gabor Kiss-Vamosi
e2ddaf7577 add rc tag 2018-10-20 00:38:56 +02:00
Gabor Kiss-Vamosi
63b9c5265f lv_draw_img: fix to draw images with LV_COLOR_DEPTH 1 2018-10-18 06:59:41 +02:00
Gabor Kiss-Vamosi
88b8e982b4 lv_task and lv_ll: stability improvents 2018-10-17 14:31:16 +02:00
Gabor Kiss-Vamosi
bf00102f83 lv_ta: cursor type bit size fix 2018-10-17 12:41:30 +02:00
Gabor Kiss-Vamosi
4751cb16c9 minor fixes 2018-10-17 11:27:31 +02:00
Gabor Kiss-Vamosi
c9111563b1 add lv_cont/page_get_width/height 2018-10-17 11:27:31 +02:00
Gabor Kiss-Vamosi
f7d25a8ee9 Merge pull request #465 from fallstool/master
Update lv_ta.h
2018-10-17 11:13:08 +02:00
fallstool
be24c90532 Update lv_ta.h 2018-10-17 14:20:39 +08:00
Gabor Kiss-Vamosi
3c5093f3cb Merge pull request #460 from ali-rostami/master
action functions for calendar object
2018-10-16 16:37:28 +02:00
Ali Rostami
dd7072c875 pressed_date getter deceleration
A declaration added for pressed_date getter function.
2018-10-16 18:04:43 +03:30
Ali Rostami
6610929eaf pressed date getter
A getter function added for pressed_date.
2018-10-16 18:01:57 +03:30
Gabor Kiss-Vamosi
39395465a2 fix version number 2018-10-16 16:08:13 +02:00
Gabor Kiss-Vamosi
071b10f3f4 lv_calendar: add action API + minor fixes 2018-10-16 14:15:54 +02:00
Gabor Kiss-Vamosi
5a8fb4651c Merge branch 'master' of https://github.com/ali-rostami/lvgl into dev-5.3 2018-10-16 14:07:03 +02:00
Gabor Kiss-Vamosi
eab7a961df Merge branch 'master' into dev-5.3 2018-10-16 14:05:32 +02:00
Ali Rostami
23166f43d7 pressed_date initialization
pressed_date inited in create function.
2018-10-16 08:35:09 +03:30
Gabor Kiss-Vamosi
7427e01b60 lv_group related updates mainly with ENCODER indev 2018-10-15 20:12:12 +02:00
Gabor Kiss-Vamosi
7e4187e89a fixes if an object is deleted in its action 2018-10-15 19:33:34 +02:00
Gabor Kiss-Vamosi
603e9336d4 fixes if the freed memory become dirty 2018-10-15 19:00:03 +02:00
Gabor Kiss-Vamosi
03e6b1bff7 lv_group_remove_obj: stop iterating when the obj is found 2018-10-15 18:22:52 +02:00
Gabor Kiss-Vamosi
d833a65d1e lv_ddlist and lv_roller bugfix when deleted while being in a group 2018-10-15 17:29:15 +02:00
Ali Rostami
e315170c8d init action function
In the lv_calendar_create function, I added some lines to init action functions of the calendar.
2018-10-15 18:14:44 +03:30
Gabor Kiss-Vamosi
c444d43fe8 Merge branch 'master' into dev-5.3 2018-10-15 12:44:39 +02:00
Gabor Kiss-Vamosi
c6d8f8ee28 move the bdf_font_converter to the lv_utils repo 2018-10-15 12:44:17 +02:00
Gabor Kiss-Vamosi
108278c4b5 Merge branch 'master' into dev-5.3 2018-10-15 12:38:27 +02:00
Gabor Kiss-Vamosi
556306a269 add lv_page/cont_fit_width/height functions 2018-10-15 12:38:13 +02:00
Ali Rostami
49b1fe421e Update lv_calendar.h 2018-10-14 14:08:43 +03:30
Ali Rostami
def0169dda Update lv_calendar.c 2018-10-14 14:03:51 +03:30
Gabor Kiss-Vamosi
a482132652 lv_bar and lv_slider: fix indicator size at amy value 2018-10-12 21:12:13 +02:00
Gabor Kiss-Vamosi
4cf6a4c22e Merge pull request #458 from BrianPugh/master
BDF Font Converter
2018-10-12 21:05:27 +02:00
Brian Pugh
10dddd85c5 Documentation update 2018-10-12 09:38:31 -07:00
Brian Pugh
fe24ce53b7 initial bdf font converter 2018-10-12 09:35:46 -07:00
Gabor Kiss-Vamosi
0ee104d155 lv_btnm: ignore clicks on inactive buttons 2018-10-12 09:09:10 +02:00
Gabor Kiss-Vamosi
b6b77f4b45 lv_img_color_format_get_px_size fix for true color apha format 2018-10-11 14:23:03 +02:00
Gabor Kiss-Vamosi
0fdfa32d4a set version number 2018-10-09 17:29:12 +02:00
Gabor Kiss-Vamosi
7d1e1e6147 exclude some code when USE_LV_GROUP 0 2018-10-09 15:10:17 +02:00
Gabor Kiss-Vamosi
a4b4ebaf7d Merge pull request #448 from BrianPugh/master
Add monospace font to makefile
2018-10-09 07:15:37 +02:00
Gabor Kiss-Vamosi
4677c5955d lv_conf_templ.h LV_VDB_PX_BPP comment update 2018-10-09 07:06:51 +02:00
Gabor Kiss-Vamosi
ca7f8e66bb Mark this release as release candidate insted 2018-10-09 07:04:47 +02:00
Brian Pugh
0a6151ade9 added monospace to fonts makefile 2018-10-08 09:40:55 -04:00
Brian Pugh
039deed864 Merge remote-tracking branch 'upstream/master' 2018-10-08 09:39:45 -04:00
Gabor Kiss-Vamosi
83cef11a78 lv_roller: fix for focus change in callback function 2018-10-08 07:28:25 +02:00
Gabor Kiss-Vamosi
0825819586 Merge pull request #445 from ErichStyger/master
removed duplicated define in configuration template file
2018-10-06 12:22:35 +02:00
Erich Styger
2d0c21f8a8 removed duplicated define in configuration template file 2018-10-06 10:41:00 +02:00
Gabor Kiss-Vamosi
41695bf9ac astyle code formatting 2018-10-05 17:22:49 +02:00
Gabor Kiss-Vamosi
23b65ca454 lv_font: add glyph_cnt 2018-10-05 16:00:48 +02:00
Gabor Kiss-Vamosi
96f8392555 set version number 2018-10-05 15:16:04 +02:00
Gabor Kiss-Vamosi
6df5de17c6 solve warnings 2018-10-05 15:15:19 +02:00
Gabor Kiss-Vamosi
a539909972 lv_refr: VDB row height calculation bugfix 2018-10-05 14:44:17 +02:00
Gabor Kiss-Vamosi
85c022e1e7 lv_conf_templ.h minor updates 2018-10-05 10:38:49 +02:00
Gabor Kiss-Vamosi
dd60df83a1 lv_page: improve focus when boith the background and the scrollabe are transparent 2018-10-05 10:10:16 +02:00
Gabor Kiss-Vamosi
e42605590f lv_color: add error for LV_COLOR_DEPTH 24 2018-10-05 09:37:36 +02:00
Gabor Kiss-Vamosi
1a28d8d5d2 lv_conf_templ.h update 2018-10-03 09:00:32 +02:00
Gabor Kiss-Vamosi
b945fc01dd fix incorrent buffer size in img_draw with LV_COMPILER_VLA_SUPPORTED == 0 2018-10-03 08:58:14 +02:00
Gabor Kiss-Vamosi
85bd5a9933 lv_btnm: minor fix on label's position with transparent button style 2018-10-03 08:47:42 +02:00
Brian Pugh
63be4a3dd1 Added mono themes source file to theme submakefile 2018-10-01 19:44:20 -04:00
Gabor Kiss-Vamosi
fbff08080a set the corerct range for symbol fonts 2018-10-01 10:13:24 +02:00
Gabor Kiss-Vamosi
1e37afc49d Merge pull request #436 from airlonyan/patch-1
Update lv_ta_signal in lv_ta.c
2018-09-29 21:14:36 +02:00
rudy yan
23f72ac774 Update lv_ta_signal in lv_ta.c
add code processing LV_SIGNAL_DEFOCUS and LV_SIGNAL_FOCUS signals.
2018-09-29 10:43:53 +08:00
Gabor Kiss-Vamosi
5c1a1d6e94 lv_page: do not force scrl width when scrl fit is false 2018-09-27 16:23:39 +02:00
Gabor Kiss-Vamosi
cef6b09b68 minor theme updates 2018-09-27 15:06:49 +02:00
Gabor Kiss-Vamosi
789532a95f lv_ll_move_before bugfix 2018-09-27 15:03:35 +02:00
Gabor Kiss-Vamosi
be2174b1d2 lv_indev: add some 'focused != NULL' tests 2018-09-26 14:28:49 +02:00
Gabor Kiss-Vamosi
f4449d1c9d minor fixes related to encoder 2018-09-26 14:21:39 +02:00
Gabor Kiss-Vamosi
7c52aa6932 fix warnings 2018-09-25 23:33:17 +02:00
Gabor Kiss-Vamosi
76f663d31c lv_label_draw bugfix in ROLL mode 2018-09-25 16:30:49 +02:00
Gabor Kiss-Vamosi
e18e14f779 add lv_ta_set_text_align() 2018-09-25 16:21:31 +02:00
Gabor Kiss-Vamosi
0a7d5b8e32 lv_group: invalidate object on edit mode change 2018-09-25 11:56:45 +02:00
Gabor Kiss-Vamosi
675715a917 fix warnings 2018-09-25 11:23:50 +02:00
Gabor Kiss-Vamosi
590ca9c7a6 lv_img: make possible to disabel palette and alpha index support 2018-09-25 11:16:37 +02:00
Gabor Kiss-Vamosi
0d07a7be65 fix warnings 2018-09-24 23:14:59 +02:00
Gabor Kiss-Vamosi
d3af29fada LV_INDEV_TYPE_ENCODER added 2018-09-24 22:59:48 +02:00
Gabor Kiss-Vamosi
522d20d9e4 Update README.md 2018-09-24 11:42:32 +02:00
Gabor Kiss-Vamosi
f38ac2cc7d Update README.md 2018-09-24 11:42:13 +02:00
Gabor Kiss-Vamosi
d7654190f7 updates on encoder support 2018-09-24 00:35:19 +02:00
Gabor Kiss-Vamosi
36369325e7 minor fixes for better encoder support 2018-09-23 23:27:28 +02:00
Gabor Kiss-Vamosi
0835e0584a fix warnings 2018-09-23 21:54:55 +02:00
Gabor Kiss-Vamosi
0ef64fde73 lv_img: add logs 2018-09-23 21:24:51 +02:00
Gabor Kiss-Vamosi
0bebaf410a add const prefix to draw_fp variables: px_fp, fill_fp ...) 2018-09-21 14:22:13 +02:00
Gabor Kiss-Vamosi
8712598ca1 lv_conf_templ.h minor updates 2018-09-21 14:16:10 +02:00
Gabor Kiss-Vamosi
258e1f2348 lv_conf_templ.h minor updates 2018-09-21 14:15:26 +02:00
Gabor Kiss-Vamosi
ad553f3782 lv_conf_templ.h minor updates 2018-09-21 14:14:38 +02:00
Gabor Kiss-Vamosi
2b15c6f204 lv_font_dsc_t: minor memory usage optimization 2018-09-21 14:10:53 +02:00
Alexander
0bf87e554c Adding missing #ifdef LV_CONF_INCLUDE_SIMPLE 2018-09-21 14:10:53 +02:00
Gabor Kiss-Vamosi
64d1fcbe9c Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-09-21 12:19:11 +02:00
Gabor Kiss-Vamosi
224550a50c lv_fs_open: fix memory leak 2018-09-21 12:19:05 +02:00
Gabor Kiss-Vamosi
60231ca8d9 lv_img: add log 2018-09-21 10:32:23 +02:00
Gabor Kiss-Vamosi
92acc6d991 Change LV_COLOR_DEPTH 24 to 32 because it's really 32 bit 2018-09-21 07:23:44 +02:00
Gabor Kiss-Vamosi
d2dfabee3f theme updates 2018-09-21 06:56:37 +02:00
Gabor Kiss-Vamosi
a9df82a0af imgbtn copy bugfix 2018-09-20 23:31:26 +02:00
Gabor Kiss-Vamosi
fa683200b5 preloader and arc theme and design updates 2018-09-20 23:31:26 +02:00
Gabor Kiss-Vamosi
044194c64e minor fixes 2018-09-20 23:31:26 +02:00
Gabor Kiss-Vamosi
651fd7b133 add LV_COLOR_SCREEN_TRANSP 2018-09-20 23:31:26 +02:00
Gabor Kiss-Vamosi
f4ac890a3c arc and preload fixes 2018-09-20 23:31:26 +02:00
Gabor Kiss-Vamosi
f7d8cfd5c8 theme: add arc and preload style to some themes 2018-09-20 23:31:26 +02:00
Gabor Kiss-Vamosi
5f14079695 add lv_refr_now() 2018-09-20 22:00:02 +02:00
Gabor Kiss-Vamosi
fa2a36311f lv_fs: add lv_fs_trunc and lv_fs_rename 2018-09-20 22:00:02 +02:00
Gabor Kiss-Vamosi
18988f0059 Merge pull request #415 from fallstool/dev-5.2
lv_cb: fix press lost bug
2018-09-19 21:09:37 +02:00
fallstool
6fce22c555 Update lv_cb.c 2018-09-19 16:32:25 +08:00
fallstool
71fb5185a4 Update lv_cb.c 2018-09-19 16:31:08 +08:00
fallstool
fc3b3d5c96 Update lv_cb.c
fix bug: when out of the range of the checkbox, and press, when move to the checkbox, the checkbox's state will change.
2018-09-19 16:28:23 +08:00
Gabor Kiss-Vamosi
839757e6c8 enum refactor fixes 2018-09-18 14:30:48 +02:00
Zaltora
589e7f28e0 refactoring enum declaration 2018-09-18 13:59:40 +02:00
Gabor Kiss-Vamosi
bf8eb078ca nemo theme fixes 2018-09-18 07:50:05 +02:00
Gabor Kiss-Vamosi
25bd7b13b6 Merge pull request #412 from ajithpv/master
Added a new theme, Fixed Typo and ordered colors
2018-09-18 07:20:49 +02:00
Gabor Kiss-Vamosi
f726622241 Merge branch 'dev-5.2' into master 2018-09-18 07:20:33 +02:00
Ajith
b5806968cb added a new theme based on 'finding nemo' movie 2018-09-17 18:47:19 +05:30
Ajith P Venugopal
602332a97c Fixed minor typos on CONTRIBUTING.md 2018-09-17 17:12:11 +05:30
Ajith P Venugopal
3d95d9a8ee Fixed typo and minor grammar mistakes on README.md 2018-09-17 16:35:41 +05:30
Gabor Kiss-Vamosi
745c6e57c2 Merge pull request #408 from aenchevich/dev-5.2
Removing unused var
2018-09-17 06:23:58 +02:00
Gabor Kiss-Vamosi
21f21dbe75 lv_img: symbol bugfix 2018-09-14 21:58:43 +02:00
Alexander
faeb4b9cd3 Removing unused var 2018-09-14 14:31:28 +03:00
Gabor Kiss-Vamosi
071343da5e Merge pull request #405 from aenchevich/dev-5.2
Fixing some compile-time errors and warning (on mipsel-gcc 4.6)
2018-09-14 12:19:20 +02:00
Alexander
91f4b8f504 Fixing lv_conf.h file include order - it must come first, because
it contains global defines governing which features will be used,
(and in particular - whether the .h file where lv_conf is included
will be used at all).
2018-09-14 12:40:30 +03:00
Gabor Kiss-Vamosi
1391df3948 add LV_VDB_SIZE_IN_BYTES to hide the compilacted expression 2018-09-14 07:33:22 +02:00
Gabor Kiss-Vamosi
5a301bff76 Merge pull request #406 from fallstool/dev-5.2
Update lv_win.h
2018-09-13 22:56:12 +02:00
Gabor Kiss-Vamosi
c8ac841fbb minor fixes 2018-09-13 22:51:42 +02:00
Gabor Kiss-Vamosi
9c601ef49b indev fix: don't send release signal if the release happend next to a press lost protected object 2018-09-13 22:50:10 +02:00
Gabor Kiss-Vamosi
4c2ccf1d6b preload: fix style usage 2018-09-13 22:13:00 +02:00
Gabor Kiss-Vamosi
16e7e4403e minor comment changes 2018-09-13 22:11:09 +02:00
Alexander
47dacc09ef Adding missing #ifdef LV_CONF_INCLUDE_SIMPLE 2018-09-13 15:09:05 +03:00
fallstool
4479080864 Update lv_win.h
arm cross compile error: invalid conversion from void* to lv_win_ext_t*
2018-09-13 16:41:59 +08:00
Gabor Kiss-Vamosi
73695aa413 lv_arc: use line styles 2018-09-13 00:57:20 +02:00
Gabor Kiss-Vamosi
d6793e792d line draw bugfix: skew lines' width was incorrect 2018-09-13 00:56:25 +02:00
Gabor Kiss-Vamosi
89e946cc51 add lv_calendar to themes 2018-09-12 23:34:23 +02:00
Gabor Kiss-Vamosi
17785070a4 bugfix type in comment 2018-09-12 21:17:55 +02:00
Gabor Kiss-Vamosi
0cd6c6eb08 Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-09-12 20:56:38 +02:00
Gabor Kiss-Vamosi
9780277e48 Merge branch 'master' of https://github.com/littlevgl/lvgl into dev-5.2 2018-09-12 20:56:16 +02:00
Alexander
a6b3addb4f Fixing some compile-time errors and warning (on mipsel-gcc 4.6) 2018-09-12 18:55:28 +03:00
Ajith
17d2782182 added a new theme named nemo 2018-09-12 18:02:08 +05:30
Ajith P Venugopal
086dac4444 Ordered the colors and fixed the typo
The color definitions are ordered according to the HTML color names (https://en.wikipedia.org/wiki/Web_colors). Fixed the typo of the color maroon
2018-09-12 15:38:58 +05:30
Gabor Kiss-Vamosi
9777cf3416 add lv_vdb_set_adr 2018-09-12 09:03:48 +02:00
Gabor Kiss-Vamosi
a89548ed48 Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-09-11 15:33:18 +02:00
Gabor Kiss-Vamosi
7abfa7609e shadow draw bugifx 2018-09-11 14:58:33 +02:00
Gabor Kiss-Vamosi
e332e8586f theme: begin to add calendar to themes 2018-09-10 21:32:08 +02:00
Gabor Kiss-Vamosi
d06c2f93da lv_calendar: minor fixes 2018-09-10 21:30:44 +02:00
Gabor Kiss-Vamosi
4b25f24175 lv_win: revert the delete of page (content) specific API function 2018-09-10 21:30:25 +02:00
Gabor Kiss-Vamosi
b894c423d3 Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-09-10 06:27:10 +02:00
Gabor Kiss-Vamosi
c84f114dd6 rename lv_...clear to lv_..._clean 2018-09-07 17:09:09 +02:00
Gabor Kiss-Vamosi
61a2540ed4 rename LV_IMG_FORMAT_... to LV_IMG_CF_... 2018-09-06 21:15:29 +02:00
Gabor Kiss-Vamosi
4db5e54737 add lv_imgbtn 2018-09-06 20:57:59 +02:00
Gabor Kiss-Vamosi
59464fa41b Merge pull request #397 from koutheir/patch-1
Fixed a typo
2018-09-06 10:11:13 +02:00
Dr. Koutheir Attouchi
6d2a69113b Fixed a typo 2018-09-06 09:57:10 +02:00
Gabor Kiss-Vamosi
467fd77a28 lv_theme: add live update feature 2018-09-06 01:29:21 +02:00
Gabor Kiss-Vamosi
54f6e42a44 lv_label: LONG_ROLL and ALIGN_CENTER undate 2018-09-05 23:53:29 +02:00
Gabor Kiss-Vamosi
b9a295afaf report_style_mod_core bugfix 2018-09-05 11:42:18 +02:00
Gabor Kiss-Vamosi
f49dcdd62a lv_label_set_long_mode: add comment about size should be set after it 2018-09-04 07:30:18 +02:00
Gabor Kiss-Vamosi
42722d0fd6 refresh the top and sys layers if LV_VDB_SIZE = 0 too 2018-09-04 07:25:07 +02:00
Gabor Kiss-Vamosi
aa83d9109b lv_gauge: add comments about how to calculate the line_cnt 2018-09-04 07:03:47 +02:00
Gabor Kiss-Vamosi
8db4e97d65 code formating 2018-09-03 16:02:54 +02:00
Gabor Kiss-Vamosi
657a3b76c5 add LV_SYMBOL_DUMMY (if added before a string then lv_img will draw it as a label) 2018-09-03 15:56:57 +02:00
Gabor Kiss-Vamosi
cafdce69fe add LV_PROTECT_CLICK_FOCUS 2018-09-03 15:45:12 +02:00
Gabor Kiss-Vamosi
298cba3c01 Merge branch 'img_decoder' into dev-5.2 2018-09-03 14:55:24 +02:00
Gabor Kiss-Vamosi
f6173cdb0d rename lv_..._clean to lv_..._clear 2018-09-03 14:43:43 +02:00
Gabor Kiss-Vamosi
025b829638 lv_img_draw: add alpha bin support 2018-09-02 23:04:23 +02:00
Gabor Kiss-Vamosi
a50b6f56d5 Merge pull request #384 from Krastanov/external_ticks
Add a system time callback to be used without `lv_tick_inc`.
2018-08-31 07:24:10 +02:00
Stefan Krastanov
4e70bbc49f Add a system time callback to be used without lv_tick_inc.
With a new configuration option one can now remove the need for
repeatedly calling `lv_tick_inc` for hardware that already provides
system time in another way.

The configuration example is set for an Arduino, but this was initially
developed for an nrf52 with the following config:

```
 #define LV_TICK_CUSTOM    1
 #if LV_TICK_CUSTOM == 1
 #define LV_TICK_CUSTOM_INCLUDE  "app_timer.h"
 #define LV_TICK_CUSTOM_SYS_TIME_EXPR (app_timer_cnt_get()/APP_TIMER_TICKS(1))
 #endif     /*LV_TICK_CUSTOM*/
```
2018-08-29 15:13:51 -04:00
Gabor Kiss-Vamosi
32805d8e36 lv_bar: don't draw indicator if cur_value == min_value 2018-08-29 20:59:48 +02:00
Gabor Kiss-Vamosi
20ab09a1d5 lv_btn: ink bugfix 2018-08-29 20:42:38 +02:00
Gabor Kiss-Vamosi
225afe0d6d lv_obj.h: fic lv_prot_t typos 2018-08-28 14:43:02 +02:00
Gabor Kiss-Vamosi
c335e46384 add mutex to lv_task_handler to avoid concurent call 2018-08-28 14:41:32 +02:00
Gabor Kiss-Vamosi
fe7971759c fix typo (#382) 2018-08-28 08:04:42 +02:00
Gabor Kiss-Vamosi
d4b8fab303 Merge pull request #381 from pfalcon/patch-1
README: Clarify lv_tick_inc() usage.
2018-08-28 07:43:06 +02:00
Gabor Kiss-Vamosi
55ae32362e lv_list. make lv_list_get_next/prev_btn() public 2018-08-27 19:55:17 +02:00
Paul Sokolovsky
db6d15624d README: Clarify lv_tick_inc() usage.
"in" word is not needed there.

Also, update number of steps in "Porting" section.
2018-08-27 08:19:33 +03:00
Gabor Kiss-Vamosi
4e6c0b6976 Update README.md 2018-08-26 19:24:41 +02:00
Gabor Kiss-Vamosi
87fd28f0c2 lv_mbox: add comment about the action callback parameters 2018-08-26 17:04:31 +02:00
Gabor Kiss-Vamosi
8e0dc2055f lv_obj_Set_style: bugfux 2018-08-26 17:04:10 +02:00
Gabor Kiss-Vamosi
d8d583ee57 lv_win:get_contet added instead of lv_page wrappers 2018-08-26 15:55:22 +02:00
Gabor Kiss-Vamosi
f0753a82b5 Merge branch 'img_decoder' of https://github.com/littlevgl/lvgl into img_decoder 2018-08-26 14:22:26 +02:00
Gabor Kiss-Vamosi
372605440c lv_btn_ink updates
lv_btn_ink updates
2018-08-26 14:21:48 +02:00
Gabor Kiss-Vamosi
b39a802336 lv_img_draw: support indexed images from file 2018-08-22 01:33:46 +02:00
Gabor Kiss-Vamosi
bc430db812 Update README.md 2018-08-21 08:40:12 +02:00
Gabor Kiss-Vamosi
6f308aba11 lv_img_dsc_t: add data_size filed 2018-08-20 22:54:37 +02:00
Gabor Kiss-Vamosi
1714caae58 Merge branch 'img_decoder' of https://github.com/littlevgl/lvgl into img_decoder 2018-08-20 22:25:40 +02:00
Gabor Kiss-Vamosi
1ec7d264cf image decoder bugfixes 2018-08-20 22:25:28 +02:00
Gabor Kiss-Vamosi
27a082c325 lv_btn: copy ink paramters too 2018-08-20 10:56:17 +02:00
Gabor Kiss-Vamosi
25a6b0cde6 lv_color.h: delete unused commented code 2018-08-20 10:45:17 +02:00
Gabor Kiss-Vamosi
415a176f6b Merge pull request #372 from pfalcon/patch-1
README: Typo/punctuation/grammar fixes
2018-08-19 01:46:28 +02:00
Gabor Kiss-Vamosi
9d844ef113 indexed imgade draw added 2018-08-19 00:45:57 +02:00
Paul Sokolovsky
40c70cf06b README: Typo/punctuation/grammar fixes 2018-08-18 22:53:44 +03:00
Gabor Kiss-Vamosi
9337cb591d built in img dacoder improvements 2018-08-18 12:11:02 +02:00
Gabor Kiss-Vamosi
91385e13eb add image decoder interface (wip) 2018-08-16 00:15:19 +02:00
Gabor Kiss-Vamosi
1bf8ad6366 Merge branch 'dev-5.2' into img_decoder 2018-08-15 22:13:03 +02:00
Gabor Kiss-Vamosi
507235a681 minor formatting 2018-08-15 12:36:35 +02:00
Gabor Kiss-Vamosi
e96bbdd31a lv_obj_set_parent: test input paramters 2018-08-15 12:33:11 +02:00
Gabor Kiss-Vamosi
ad79620983 Merge pull request #362 from ErichStyger/dev-5.2
fixed wrong comment
2018-08-14 09:16:55 +02:00
Gabor Kiss-Vamosi
1b800e2499 remove debug printfs 2018-08-14 01:22:17 +02:00
Gabor Kiss-Vamosi
eaef1c70d6 begin indexed interface 2018-08-14 01:20:18 +02:00
Gabor Kiss-Vamosi
f12c24ce0a lv_ta_set/get_action added 2018-08-13 19:09:46 +02:00
Gabor Kiss-Vamosi
e9eeb767e4 Merge pull request #357 from ErichStyger/dev-5.2
fixed name for lv_theme_get_night()
2018-08-13 10:37:25 +02:00
Erich Styger
37f38b3211 fixed wrong comment 2018-08-13 06:34:00 +02:00
Erich Styger
0297bb1870 fixed name for lv_theme_get_night() 2018-08-12 18:12:17 +02:00
Gabor Kiss-Vamosi
e33f3e31bc Merge pull request #351 from Zaltora/fix_attribute
[dev-5.2] Fix attribute
2018-08-10 14:55:52 +02:00
Zaltora
1e20118645 add backward 'lv_conf.h' compatibility 2018-08-10 13:18:10 +02:00
Zaltora
1ece6c1612 Merge branch 'dev-5.2' into fix_attribute 2018-08-10 13:13:54 +02:00
Gabor Kiss-Vamosi
d8c88fa510 lv_ddlist: fix wrong declration lv_ddlist_close in lv_ddlist.h 2018-08-10 01:22:42 +02:00
Gabor Kiss-Vamosi
e9abfe3cc8 minor lv_page and lv_ddlist fixes 2018-08-10 01:11:20 +02:00
Gabor Kiss-Vamosi
1fa580f6f0 lv_page: add LV_SB_MODE_HIDE/UNHIDE and use it in ddlist 2018-08-10 01:04:20 +02:00
Gabor Kiss-Vamosi
a4812c4706 add missing defines to lv_font_symbol_30 2018-08-09 23:46:38 +02:00
Gabor Kiss-Vamosi
b521c8b97e lv_ta: check all characters in lv_ta_add/set_text agains accapted chars and max length 2018-08-09 23:37:00 +02:00
Gabor Kiss-Vamosi
b0f7aeabbb Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-08-09 20:42:06 +02:00
Gabor Kiss-Vamosi
604ee63096 lv_indev_get_key() added 2018-08-09 07:30:10 +02:00
Gabor Kiss-Vamosi
8fbf1267a5 lv_draw_shadow fixed 2018-08-09 07:20:23 +02:00
Gabor Kiss-Vamosi
31ad141f7e lv_draw_shadow fixes (wip) 2018-08-08 09:50:21 +02:00
Gabor Kiss-Vamosi
e7f55612b0 basics image decoder interface impemented (wip) 2018-08-08 09:50:01 +02:00
Gabor Kiss-Vamosi
9b2097e5e4 add LV_COLOR_16_SWAP option 2018-08-07 08:20:34 +02:00
Gabor Kiss-Vamosi
73bc138b70 opacity related bug fixes in draw functions 2018-08-06 15:22:46 +02:00
Zaltora
58134f78dc multiple definition LV_ATTRIBUTE_TICK_INC 2018-08-06 10:12:38 +02:00
Gabor Kiss-Vamosi
8105bced11 img_if: formattig 2018-08-04 22:24:16 +02:00
Gabor Kiss-Vamosi
bcba74d0e7 revert built-in styles (there were some test values in them) 2018-08-04 22:13:34 +02:00
Gabor Kiss-Vamosi
b352e67088 add lv_page_scroll_up/down() and lv_win_scroll_up/down() 2018-08-04 21:48:40 +02:00
Gabor Kiss-Vamosi
1561b7a08a lv_ta: fixes with USE_LV_ANIMATION 0 2018-08-04 09:04:37 +02:00
Gabor Kiss-Vamosi
586fbbe925 Merge branch 'app_vdb' into dev-5.2 2018-08-04 08:49:01 +02:00
Gabor Kiss-Vamosi
c4e26724a4 lv_ta: fix init value of max_length and accepted_chars 2018-08-04 08:48:47 +02:00
Gabor Kiss-Vamosi
5931c23695 lv_ta: add 'max_length' and 'accepted_chars' features 2018-08-04 08:46:44 +02:00
Gabor Kiss-Vamosi
7a2693e4f1 minor fixes 2018-08-04 08:45:22 +02:00
Gabor Kiss-Vamosi
f968792286 add the optional VDB write interface to the display driver (vdb_wr) 2018-08-04 01:46:00 +02:00
Gabor Kiss-Vamosi
fbf0303b2d lv_list: add lv_list_set/get_btn_selected() 2018-07-30 07:42:36 +02:00
Gabor Kiss-Vamosi
390ef3b2ba add 'const' in lv_obj_align 2018-07-30 06:57:58 +02:00
Gabor Kiss-Vamosi
c2712963d6 merge beta 2018-07-30 06:56:31 +02:00
Gabor Kiss-Vamosi
769c7b28ff add 'const' attribute to pointer where possible 2018-07-30 06:52:29 +02:00
Gabor Kiss-Vamosi
a005d832cb fix declaration of real draw function pointers 2018-07-29 23:26:56 +02:00
Gabor Kiss-Vamosi
c9508d9b7e fix opa calcualtion from opa_scale in draw_function 2018-07-29 21:53:22 +02:00
Gabor Kiss-Vamosi
39ba305f73 lv_mem: remove ENVIRONMENT32 only leave ENVIRONMENT64 define 2018-07-27 06:48:44 +02:00
Gabor Kiss-Vamosi
857becbd66 lv_draw fiw redecleration of px_fp, fill_fp etc 2018-07-27 06:39:59 +02:00
Gabor Kiss-Vamosi
412710884c lv_conf_templ updated 2018-07-26 00:31:07 +02:00
Gabor Kiss-Vamosi
15fa3beb6d lv_conf_templ updated 2018-07-26 00:30:36 +02:00
Gabor Kiss-Vamosi
81a20ef328 add character encoder interface issue #131 2018-07-26 00:10:20 +02:00
Gabor Kiss-Vamosi
bcd583914f LV_LABEL_ALIGN_RIGHT bug fix 2018-07-25 23:01:29 +02:00
Gabor Kiss-Vamosi
a1abe14414 add lv_font_monospace_8 (uniscii) as built-in font 2018-07-25 22:57:36 +02:00
Gabor Kiss-Vamosi
7cc8e74d1a add editable attribute for better encoder control 2018-07-25 21:52:50 +02:00
Gabor Kiss-Vamosi
678cbdc23d improve logging 2018-07-25 20:39:24 +02:00
Gabor Kiss-Vamosi
2d5fa3b9dc remove LV_TXT_FLAG_NO_BREAK. Text area in one line mode handle's it in its own 2018-07-25 19:36:53 +02:00
Gabor Kiss-Vamosi
c4aec5ae33 update lv_long in lv_conf_templ.h 2018-07-25 17:58:34 +02:00
Gabor Kiss-Vamosi
69434c8b7d place some lv_log_add calls 2018-07-25 17:57:08 +02:00
Gabor Kiss-Vamosi
2d8b3b2b6e add lv_mem_assert to memory reallocations 2018-07-25 14:43:46 +02:00
Gabor Kiss-Vamosi
2e17562e51 add lv_mem_assert to memory allocations 2018-07-25 13:33:53 +02:00
Gabor Kiss-Vamosi
405acfcbba lv_mem: remove debug printf 2018-07-25 12:24:47 +02:00
Gabor Kiss-Vamosi
e6516c3a90 lv_mem: fix 8 byte alignment 2018-07-25 11:37:01 +02:00
Gabor Kiss-Vamosi
1b9845e38f lv_mem: support 8 byte aligned alloaction 2018-07-25 06:52:59 +02:00
Gabor Kiss-Vamosi
818cd278b2 lv_label_no_break: fixes 2018-07-25 06:12:05 +02:00
Gabor Kiss-Vamosi
1fa77fa5d7 lv_obj: apply theme on non-screen base objects too 2018-07-22 22:34:28 +02:00
Gabor Kiss-Vamosi
6d9888462c lv_task: fix misspelling 2018-07-22 22:03:38 +02:00
Gabor Kiss-Vamosi
d7c9193662 Merge pull request #322 from yuanzhaoming/beta
Fix misspelt comments
2018-07-22 21:12:15 +02:00
Gabor Kiss-Vamosi
de3ef5fc1f Merge branch 'beta' into beta 2018-07-22 21:11:38 +02:00
wit_yuan
97f3ed08c0 change the comment at line 149,154 2018-07-22 11:12:47 +08:00
wit_yuan
d0b5c705bf change line 50 'fir' to 'fit' 2018-07-21 16:09:51 +08:00
Gabor Kiss-Vamosi
d094d0262b draw shadow fix (line_2d_blur was overindexed) 2018-07-18 23:46:41 +02:00
Gabor Kiss-Vamosi
8b70eccca6 draw shadow fix (line_2d_blur was overindexed) 2018-07-18 23:45:00 +02:00
Gabor Kiss-Vamosi
8005f1bb28 merge beta 2018-07-18 23:19:45 +02:00
Gabor Kiss-Vamosi
dc4541f267 fix a typo of LV_COMPILER_VLA_SUPPORTED in lv_draw.c 2018-07-18 23:16:42 +02:00
Gabor Kiss-Vamosi
edf94bf1b2 rename lv_area_union to lv_area_intersect 2018-07-17 16:40:52 +02:00
Gabor Kiss-Vamosi
f4a66c4b22 add LV_GROUP_KEY_DEL 2018-07-17 00:22:43 +02:00
Gabor Kiss-Vamosi
4e2f371fc9 lv_indev: make possible to delete objects in the read function 2018-07-16 23:24:34 +02:00
Gabor Kiss-Vamosi
3fec97db45 lv_conf_templ.h: fix typo 2018-07-15 16:52:14 +02:00
kisvegabor
6e7cc4414a fix non const initialization 2018-07-13 21:54:11 +02:00
kisvegabor
8746d3de45 fix non const initialization 2018-07-13 21:47:56 +02:00
kisvegabor
f803f8b92a Merge branch 'master' into beta 2018-07-13 21:41:12 +02:00
kisvegabor
0a4c00c5f2 lv_conf_templ: add config option for Visual Studio 2018-07-13 21:40:56 +02:00
Gabor Kiss-Vamosi
4773dfd53f add LV_FONT_CUSTOM_DECLARE only if defined 2018-07-13 13:54:41 +02:00
Gabor Kiss-Vamosi
fecc974ade lv_group: click_focus improvements 2018-07-13 00:37:28 +02:00
Gabor Kiss-Vamosi
43ec140124 lv_list: make the clicked button selected if the list is in a group 2018-07-13 00:01:10 +02:00
Gabor Kiss-Vamosi
d483d14c8e lv_group: add click_focus option 2018-07-12 23:38:27 +02:00
Gabor Kiss-Vamosi
9a28e559a4 merge beta 2018-07-12 19:09:57 +02:00
Gabor Kiss-Vamosi
29e810dd2a Merge pull request #309 from hydra/fix-page-performance-issue
Fix incorrect calculation of area that needs to be invalidated for the scrollbars.
2018-07-12 18:35:37 +02:00
Gabor Kiss-Vamosi
cfc811900d send LV_SIGNAL_LONG_PRESS on LV_GROUP_KEY_ENTER long press 2018-07-12 18:18:43 +02:00
Dominic Clifton
43cfd5fea5 Fix incorrect calculation of area that needs to be invalidated for the scrollbars. 2018-07-12 17:18:50 +02:00
Gabor Kiss-Vamosi
bac918d4c8 lv_btn: use opa_scale in the design function 2018-07-11 20:27:56 +02:00
Gabor Kiss-Vamosi
e0c600eb14 lv_ink: draw circle at the beginning until it is possible (fnt into the button) 2018-07-11 20:20:08 +02:00
Gabor Kiss-Vamosi
d67096f58c lv_draw_label: trim the traling whitespaces when aligned to the middle 2018-07-11 19:07:16 +02:00
Gabor Kiss-Vamosi
fde3ee73af lv_txt_get_width: don't trim the closing spaces because it would result unwanted text wrap 2018-07-11 19:05:08 +02:00
Gabor Kiss-Vamosi
9c0bb3d392 lv_draw_label: trim the traling whitespaces when aligned to the middle 2018-07-11 18:56:54 +02:00
Gabor Kiss-Vamosi
8a7a966a7b lv_txt_get_width: don't trim the closing spaces because it would result unwanted text wrap 2018-07-11 18:46:49 +02:00
Gabor Kiss-Vamosi
4b44e07188 lv_btn ink: start from the clicked point 2018-07-08 09:03:33 +02:00
Gabor Kiss-Vamosi
9676c2e486 lv_btn ink improvements and fixes 2018-07-08 03:25:07 +02:00
Gabor Kiss-Vamosi
5e8c1d0221 lv_btn ink improvements 2018-07-08 02:01:58 +02:00
Gabor Kiss-Vamosi
08a17fd5b2 lv_btn: fix typo in API 2018-07-08 01:13:36 +02:00
Gabor Kiss-Vamosi
a78df87f8e update the new objects with LV_CONF_INCLUDE_SIMPLE 2018-07-08 01:12:20 +02:00
Gabor Kiss-Vamosi
ddd2b740c8 add API to set ink time 2018-07-08 01:11:59 +02:00
Gabor Kiss-Vamosi
87de768af4 Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-07-08 01:02:46 +02:00
Gabor Kiss-Vamosi
a23a6f7c90 Merge branch 'beta' into dev-5.2 2018-07-08 01:01:05 +02:00
Gabor Kiss-Vamosi
2c1255ffb6 lv_btn: add ink effect support 2018-07-08 01:00:56 +02:00
Gabor Kiss-Vamosi
bcab0ffcc6 lv_tabview: fix return to the original tab on small slideing 2018-07-07 22:24:47 +02:00
Gabor Kiss-Vamosi
dbc7957a50 merge beta 2018-07-07 12:45:50 +02:00
Gabor Kiss-Vamosi
41dbff4d76 initialize the built-in fonts in a spearete file 2018-07-07 12:43:57 +02:00
Gabor Kiss-Vamosi
a6ee4a680c move lv_fonts from lv_misc next to lv_misc 2018-07-07 12:21:36 +02:00
Gabor Kiss-Vamosi
90679c2cf5 add LV_CONF_INCLUDE_SIMPLE to choose between relative or simple include of lv_conf.h 2018-07-07 11:53:22 +02:00
Gabor Kiss-Vamosi
dd9324ac05 lv_conf.h: add LV_FONT_CUSTOM_DECLARE to enable global defination of custom fonts 2018-07-07 11:26:24 +02:00
Gabor Kiss-Vamosi
94702f63ff Merge pull request #299 from aenchevich/beta
fix compile errors related to USE_LV_ANIMATION, format code
2018-07-07 09:05:03 +02:00
Gabor Kiss-Vamosi
b65b03765d Update CONTRIBUTING.md 2018-07-07 08:58:49 +02:00
Gabor Kiss-Vamosi
c4eaa1359d add log interface (lv_log) but still there are no log messages added 2018-07-07 08:54:40 +02:00
Gabor Kiss-Vamosi
48375bb780 Merge branch 'beta' into dev-5.2 2018-07-07 08:09:14 +02:00
Alexander Enchevich
70d5e5a012 Code formatting 2018-07-06 17:12:06 +03:00
Alexander Enchevich
8083432925 fix compile errors related to USE_LV_ANIMATION 2018-07-06 16:29:45 +03:00
Gabor Kiss-Vamosi
a4a210c9e5 lv_page_focus: delete all positioning animations to be sure the new focus won't be overwritten 2018-07-03 14:27:53 +02:00
Gabor Kiss-Vamosi
7bd4775b01 lv_page: add scrolling on LV_GROUP_KEY_UP/DOWN/LEFT/RIGHT 2018-07-03 14:19:04 +02:00
Gabor Kiss-Vamosi
75878b96e6 Update CONTRIBUTING.md 2018-07-02 20:04:21 +02:00
Gabor Kiss-Vamosi
3379467484 Update CONTRIBUTING.md 2018-07-02 20:02:32 +02:00
Gabor Kiss-Vamosi
930673c2f2 Update CONTRIBUTING.md 2018-07-02 20:02:04 +02:00
Gabor Kiss-Vamosi
dd7c562c96 lv_ddlist: fix the selection of options with non ASCII characters 2018-06-26 18:30:38 +02:00
Gabor Kiss-Vamosi
46ae9146d8 lv_font: add monospace support 2018-06-22 23:32:21 +02:00
Gabor Kiss-Vamosi
7503242a6a lv_anim bugfix: was error when the object is delete end callback 2018-06-22 22:58:26 +02:00
Gabor Kiss-Vamosi
7db7482ac5 fixes in lv_roller, lv_ddlist design to be pixel prefect 2018-06-21 22:15:19 +02:00
Gabor Kiss-Vamosi
a659d40202 merge beta 2018-06-19 15:45:28 +02:00
Gabor Kiss-Vamosi
11dcf5b970 lv_slider_design bugfix 2018-06-19 12:08:55 +02:00
Gabor Kiss-Vamosi
3484cb7964 lv_draw: SHADOW_OPA_EXTRA_PRECISION to 8 (was 0) 2018-06-19 12:08:43 +02:00
Gabor Kiss-Vamosi
880171aa08 group: fix typo and the defult style_mod_edit_cb for monochrome displays 2018-06-19 11:19:26 +02:00
Gabor Kiss-Vamosi
ab0b60c584 lv_group: add edit feature (change to edit moed on ENTER long press) 2018-06-19 11:13:03 +02:00
Gabor Kiss-Vamosi
76bc18cb12 Merge branch 'beta' into dev-5.2 2018-06-19 10:15:13 +02:00
Gabor Kiss-Vamosi
12237142da move astyle files to docs and add it's README to CONTRIBUTING.md 2018-06-19 10:14:31 +02:00
Gabor Kiss-Vamosi
3c2dca13ab merge formatted beta 2018-06-19 10:03:29 +02:00
Gabor Kiss-Vamosi
383ce0599e format with astyler 2018-06-19 09:49:58 +02:00
Gabor Kiss-Vamosi
175f06a7f9 lv_calendar: add opa_scale support 2018-06-19 09:33:32 +02:00
Gabor Kiss-Vamosi
c33a26b2f9 Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-06-19 09:07:10 +02:00
Gabor Kiss-Vamosi
dc918930ab merge beta 2018-06-19 09:06:49 +02:00
Gabor Kiss-Vamosi
a7d616c224 lv_task bugfix: not call tasks with LV_TASK_PRIO_OFF 2018-06-19 08:49:34 +02:00
Gabor Kiss-Vamosi
df598675fb use opa_scale in cover check 2018-06-19 08:49:02 +02:00
Alexander
5ff4125c56 Formatting all header files (*.h) in accordance with project coding style, using the astyle tool and the rules file _astylerc-h. 2018-06-18 13:52:14 +03:00
Alexander
8e9335d49f Formatting all source file (*.c) in accordance with project coding style, using the astyle tool and the rules file _astylerc-c. 2018-06-18 13:51:01 +03:00
Alexander
6038064e71 Preparing repo for semi-automatic code formatting in accordance with project coding style, using the astyle open source tool. Creating README.astyle and 2 astyle config files containing rules for format of .c and .h files 2018-06-18 13:49:39 +03:00
Gabor Kiss-Vamosi
4ac1c29ca9 lv_group_remove_obj: fix when delete the last object from the group 2018-06-17 16:43:32 +02:00
Gabor Kiss-Vamosi
31b3a2a350 tabview: fix unwanted sending of tab change action on page click 2018-06-16 13:03:32 +02:00
Gabor Kiss-Vamosi
2e2f5bc165 lv_anim: bugfix when animation is ready 2018-06-15 12:41:17 +02:00
Gabor Kiss-Vamosi
49a54e0978 Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-06-15 09:29:26 +02:00
Gabor Kiss-Vamosi
bf366ea075 lv_stye: style anim return with the dsc 2018-06-15 09:29:10 +02:00
Gabor Kiss-Vamosi
1cf5d5db9e lv_theme_mono: add more line space to ddlist and roller 2018-06-14 20:54:47 +02:00
Gabor Kiss-Vamosi
73c83cbd25 lv_ddlist: fix incorrect hegiht on style change 2018-06-14 20:05:15 +02:00
Gabor Kiss-Vamosi
001fcb43e7 fix misplaced line in lv_draw_rect.c 2018-06-14 13:20:10 +02:00
Gabor Kiss-Vamosi
75ea3b9edb add opa_scale attribute 2018-06-14 13:08:19 +02:00
Gabor Kiss-Vamosi
2a15cffbb9 lv_obj_del: remove from the group before delete the children (DEFOCUS might need children) 2018-06-14 11:17:49 +02:00
Gabor Kiss-Vamosi
1eb3e1711a lv_arc: add rounding feature 2018-06-13 11:08:19 +02:00
Gabor Kiss-Vamosi
1cac01280a Merge pull request #272 from upbeat27/bar_slider_max_fix
Small fix for bar/slider to make the fill more symmetric when near the min/max
2018-06-12 12:45:50 +02:00
Gabor Kiss-Vamosi
3d315a891b Merge pull request #271 from upbeat27/page_focus_fix
Fix page focus not focusing objects the same way when moving up or down the page
2018-06-12 12:44:17 +02:00
Gabor Kiss-Vamosi
bed22463dc lv_preloader: use anchestor design functions 2018-06-12 09:30:58 +02:00
Gabor Kiss-Vamosi
90f97f14ee Merge branch 'dev-5.2' of https://github.com/littlevgl/lvgl into dev-5.2 2018-06-12 09:23:05 +02:00
Gabor Kiss-Vamosi
c092fb3303 lv_draw: make anti aliasing function public 2018-06-12 09:22:45 +02:00
Josh McAtee
a30b117c60 Small fix for bar/slider to make the fill more symmetric when near the min/max 2018-06-11 16:53:45 -07:00
Josh McAtee
f6e054ba73 Fix page focus not focusing objects the same way when moving up or down the page 2018-06-11 16:00:30 -07:00
Gabor Kiss-Vamosi
cb79f816a0 lv_preload: make animator function public 2018-06-11 17:06:24 +02:00
Gabor Kiss-Vamosi
bd0d0eead7 lv_list: set LV_PROT_PRESS_LOST for list elements 2018-06-11 15:45:23 +02:00
Gabor Kiss-Vamosi
e4a12b22b4 add lv_prloader 2018-06-11 10:36:36 +02:00
Gabor Kiss-Vamosi
df226053cf add bezier solver function and combine math and trigo files 2018-06-11 10:30:06 +02:00
Gabor Kiss-Vamosi
ebac219ba3 lv_txt_get_width: trim letter space of trailing non-printoble characters 2018-06-09 08:49:27 +02:00
Gabor Kiss-Vamosi
c858a13aa3 add lv_preload.c/h 2018-06-09 08:47:09 +02:00
Gabor Kiss-Vamosi
bfe1760904 new object type: lv_preload 2018-06-09 08:45:38 +02:00
Gabor Kiss-Vamosi
ea323d260e add new object type: lv_arc 2018-06-08 10:26:10 +02:00
Gabor Kiss-Vamosi
f2d380ce96 merge calendar 2018-06-08 09:51:11 +02:00
Gabor Kiss-Vamosi
f9f542e7e3 Merge pull request #159 from BenArtes/btns_pos
Add btns_pos to ext_attr w/ get + set functions and TOP / BOTTOM impl.
2018-06-07 15:44:56 +02:00
Gabor Kiss-Vamosi
e241e4334f merge new draw structure 2018-06-07 15:42:41 +02:00
Gabor Kiss-Vamosi
8826892b00 merge beta 2018-06-07 15:41:22 +02:00
Gabor Kiss-Vamosi
cc1c20d6fe add arc drawing and restructure draw functions 2018-06-07 15:40:08 +02:00
Gabor Kiss-Vamosi
3890e85527 lv_line: test with adding circles to corner points 2018-06-07 15:40:08 +02:00
Gabor Kiss-Vamosi
e4dea6da91 lv_lmeter: set_tyle function rename for consistency 2018-06-07 15:40:08 +02:00
Gabor Kiss-Vamosi
d08c0953fb add new line draw algorithm which supports perpendicular ending 2018-06-07 15:39:25 +02:00
Gabor Kiss-Vamosi
ceae0c539e lv_draw_img: further fix on buffer oveflow 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
25b978126e lv_draw_img: fix buffer oveflow with alpha byte 2018-06-07 15:38:48 +02:00
Michael Simon
5189991b53 Added include for lv_theme_material.h to lv_theme.h 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
ae10bd8332 Update TODO_MINOR.md 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
8d87846907 Update TODO_PATCH.md 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
098267f942 lv_tabview_set_tab_act: enable to set the act tab again: 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
b92705f414 Update TODO_PATCH.md 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
8937ae9073 Update CONTRIBUTING.md 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
fb6b2c7d23 Update TODO_PATCH.md 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
bc9473a439 Update TODO_PATCH.md 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
47412da33a LV_GROUP_KEY_ENTER_LONG: improve objects behaviour 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
7d563b8789 remove the LV_GROUP_KEY_ENTER_LONG from some objects + fix ddlist and roller ENTER 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
4d617a1aab remove debug printf 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
d0d73ca2c0 start lv_refr_task immediately on start up (don't need to wait it's period to refresh the screen) 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
32b0170c3b release v5.1.1 2018-06-07 15:38:48 +02:00
Gabor Kiss-Vamosi
d7904efccf lv_draw_img: further fix on buffer oveflow 2018-06-01 12:41:58 +02:00
Gabor Kiss-Vamosi
8441f8bff7 lv_draw_img: fix buffer oveflow with alpha byte 2018-06-01 12:39:34 +02:00
Gabor Kiss-Vamosi
47cafb52b5 lv_draw_img: fix buffer oveflow with alpha byte 2018-06-01 12:38:37 +02:00
Gabor Kiss-Vamosi
20c8e12e09 further test on draw line 2018-06-01 12:36:27 +02:00
Gabor Kiss-Vamosi
61645fe5a9 Merge pull request #265 from MiSimon/lv_theme_material_include
Added include for lv_theme_material.h to lv_theme.h
2018-05-31 15:27:12 +02:00
Michael Simon
bc917a33b6 Added include for lv_theme_material.h to lv_theme.h 2018-05-30 20:27:18 +02:00
Gabor Kiss-Vamosi
9751a9c8cb line draw: move the main line to keep it's center position 2018-05-26 22:40:09 +02:00
Gabor Kiss-Vamosi
ad22d4b9b5 LV_GROUP_KEY_ENTER_LONG: improve objects behaviour 2018-05-26 10:28:58 +02:00
Gabor Kiss-Vamosi
e5bba0529a remove the LV_GROUP_KEY_ENTER_LONG from some objects + fix ddlist and roller ENTER 2018-05-26 10:03:43 +02:00
Gabor Kiss-Vamosi
c17df70f8e lv_calendar_create: implement copy 2018-05-26 09:52:28 +02:00
Gabor Kiss-Vamosi
5d37d87cf1 lv_calendar: bugfixes 2018-05-26 09:48:46 +02:00
Gabor Kiss-Vamosi
6a610949e9 lv_txt_get_width: trim the last letter space 2018-05-26 09:48:26 +02:00
Gabor Kiss-Vamosi
eba3105cae start a brand new line drawing algorithm 2018-05-25 23:14:19 +02:00
Gabor Kiss-Vamosi
47fb0afe79 Update TODO_MINOR.md 2018-05-22 13:10:34 +02:00
Gabor Kiss-Vamosi
bf6d114893 Update TODO_PATCH.md 2018-05-22 12:49:56 +02:00
Gabor Kiss-Vamosi
f5d4bf8fc4 lv_tabview_set_tab_act: enable to set the act tab again: 2018-05-20 21:49:04 +02:00
Gabor Kiss-Vamosi
1254020b8b Merge branch 'beta' 2018-05-20 21:33:21 +02:00
Gabor Kiss-Vamosi
7f03c17a08 remove debug printf 2018-05-20 21:32:16 +02:00
Gabor Kiss-Vamosi
4440506858 Merge branch 'beta' of https://github.com/littlevgl/lvgl into beta 2018-05-20 21:31:23 +02:00
Gabor Kiss-Vamosi
01b4820b93 release v5.1.1 2018-05-20 21:30:36 +02:00
Gabor Kiss-Vamosi
6bf1a8ffda restructure lv_draw folder and lv_line rework started 2018-05-20 21:27:57 +02:00
Gabor Kiss-Vamosi
fc8ee11955 start lv_refr_task immediately on start up (don't need to wait it's period to refresh the screen) 2018-05-17 17:07:21 +02:00
Gabor Kiss-Vamosi
fe30f9739b Update TODO_PATCH.md 2018-05-17 13:05:54 +02:00
Gabor Kiss-Vamosi
6be0089cac lv_group_del: remove the objects from the groups too 2018-05-16 23:30:04 +02:00
Gabor Kiss-Vamosi
80cb93f8e1 don't invalidate hidden objects 2018-05-16 23:19:22 +02:00
Gabor Kiss-Vamosi
a3ad4b3616 in lv_objx set functions apply the new value only if it's different from the current 2018-05-16 23:09:30 +02:00
Gabor Kiss-Vamosi
5fedbdf414 fix drawing of 1px border with zero radius and AA 2018-05-16 22:35:19 +02:00
Gabor Kiss-Vamosi
125555afcf lv_calendar added 2018-05-16 22:34:39 +02:00
Gabor Kiss-Vamosi
89b5907eb6 lv_slider: draw greater background on negative padding if knob_in == 1 2018-05-08 11:28:26 +02:00
Gabor Kiss-Vamosi
68d262ba93 lv_draw: remove debug printf-s 2018-05-08 11:28:26 +02:00
Gabor Kiss-Vamosi
ee3a44388c lv_draw: shadow draw fix array over indexing 2018-05-08 11:28:26 +02:00
Gabor Kiss-Vamosi
5ae4ebccba implement basic calendar functionalites 2018-05-08 10:33:02 +02:00
Gabor Kiss-Vamosi
51e15ced3f add lv_theme_zen.h to lv_theme.h 2018-04-18 18:11:20 +02:00
Gabor Kiss-Vamosi
aac716d497 lv_task: lv_task_set_prio fix 2018-04-18 13:23:43 +02:00
Gabor Kiss-Vamosi
420fe9710b merge beta 2018-04-17 14:39:27 +02:00
Gabor Kiss-Vamosi
e57954ef2e remove old define 2018-04-17 14:38:17 +02:00
Gabor Kiss-Vamosi
2353ca0621 fix overflow in lv_anim_speed_to_time 2018-04-17 14:11:39 +02:00
Gabor Kiss-Vamosi
8bc5770c28 lv_del_obj: fix if delted while pressed 2018-04-14 22:06:13 +02:00
Gabor Kiss-Vamosi
913517f19d lv_kb: before ok/close action don't deassign the lv_ta if there is user defived action 2018-04-13 20:09:14 +02:00
Gabor Kiss-Vamosi
0d385c237a lv_font: remove const number return values 2018-04-09 12:39:58 +02:00
Gabor Kiss-Vamosi
94bf21b9be lv_fs: fix duplicated error cheching 2018-04-09 12:33:33 +02:00
Gabor Kiss-Vamosi
a4b697f41e in style animation add opacity handling to image, text and line 2018-04-09 12:29:56 +02:00
Gabor Kiss-Vamosi
b047c1318f minor comment fixes 2018-04-05 22:21:50 +02:00
Gabor Kiss-Vamosi
a5d6881e9e Merge pull request #187 from upbeat27/group_missing_def
Add missing function definition for lv_group_del
2018-04-05 17:54:29 +02:00
Josh McAtee
eddbbc58b1 Add missing function definition for lv_group_del 2018-04-04 10:24:53 -07:00
Gabor Kiss-Vamosi
908db3cd59 Update CONTRIBUTING.md 2018-04-04 00:17:37 +02:00
Gabor Kiss-Vamosi
8a42ab14ad Merge branch 'master' into beta 2018-04-03 12:22:11 +02:00
Gabor Kiss-Vamosi
c2f70d1cc7 mono theme: fix typo 2018-04-03 12:21:59 +02:00
Gabor Kiss-Vamosi
89452a9d8e lv_cont_set_fit: fix wrong signal paramter 2018-04-03 12:21:45 +02:00
Gabor Kiss-Vamosi
563411a33a lv_indev: drag test use absolute coosdinates 2018-04-03 12:21:07 +02:00
Gabor Kiss-Vamosi
d1889b77e5 lv_slider: inicator draw bugfix 2018-03-29 13:56:21 +02:00
Gabor Kiss-Vamosi
e8a9d1bdc7 lv_line: set line.width ext. size to not trim parts on x = 0, y = 0 coordinates 2018-03-22 14:45:15 +01:00
Gabor Kiss-Vamosi
9b2de5f215 Update TODO_PATCH.md 2018-03-22 14:42:56 +01:00
Gabor Kiss-Vamosi
779cac9b77 Update TODO_PATCH.md 2018-03-22 14:42:41 +01:00
Gabor Kiss-Vamosi
a4d77bec6b Disable Visual Studio warnings 2018-03-22 14:41:55 +01:00
Gabor Kiss-Vamosi
dd6bad1b6e fix of 16 bit image draw with alpha byte 2018-03-22 12:39:58 +01:00
Gabor Kiss-Vamosi
0d93816827 lv_group_create: init focus_cb 2018-03-22 10:37:00 +01:00
Gabor Kiss-Vamosi
ca95d76659 lv_conf.h: add LV_COMPILER_VLA_SUPPORTED 2018-03-22 10:09:00 +01:00
Gabor Kiss-Vamosi
d58a83cda7 lv_mbox: Translate LV_GROUP_KEY_UP/DOWN to LV_GROUP_KEY_LEFT/RIGHT 2018-03-21 13:15:02 +01:00
Gabor Kiss-Vamosi
5256656efa Merge pull request #169 from BenArtes/obj_scrl_clean_fix
Obj scrl clean fix
2018-03-19 10:24:35 +01:00
Benjamin Artes
bb1e00a263 Merge branch 'master' into obj_scrl_clean_fix 2018-03-16 11:59:32 -04:00
Benjamin Artes
b2f0ed0cb9 Merge branch 'master' into btns_pos 2018-03-16 11:58:56 -04:00
Benjamin Artes
75a43a536c Adds sub-object specific clean functions to prevent breaking with lv_obj_clean 2018-03-16 11:53:27 -04:00
Gabor Kiss-Vamosi
0263c2cf68 start v5.2.0 2018-03-12 17:20:55 +01:00
Gabor Kiss-Vamosi
69c5373db0 start v5.1.1 2018-03-12 17:20:24 +01:00
Gabor Kiss-Vamosi
a55d02dd31 Merge pull request #158 from Zaltora/patch-1
Non constant declaration
2018-03-12 13:17:11 +01:00
Zaltora
02d318e66d Non constant declaration
I got an error when compilation. I fix the compilation problem but a proper way to initialize this variable is maybe needed. maybe in lv_init ?
You can fix it and close this pull request.
2018-03-12 11:40:24 +01:00
Gabor Kiss-Vamosi
9f72ca2329 Update TODO_MAJOR.md 2018-03-12 10:44:02 +01:00
Gabor Kiss-Vamosi
2d12ad9251 Update TODO_PATCH.md 2018-03-12 10:43:42 +01:00
Gabor Kiss-Vamosi
09c072bda6 Update TODO_MINOR.md 2018-03-12 10:43:12 +01:00
Gabor Kiss-Vamosi
9909a4123f Update TODO_PATCH.md 2018-03-12 10:42:03 +01:00
Gabor Kiss-Vamosi
63c59b6570 Update CONTRIBUTING.md 2018-03-10 09:26:35 +01:00
Gabor Kiss-Vamosi
ee4cd4756b Update README.md 2018-03-10 07:47:28 +01:00
Gabor Kiss-Vamosi
bd0c6c9ce3 regenerate buil in fonts 2018-03-09 14:14:06 +01:00
Gabor Kiss-Vamosi
213e621412 fix text opacity 2018-03-09 14:13:51 +01:00
Benjamin Artes
2d9056aa78 Add btns_pos to ext_attr w/ get + set functions and TOP / BOTTOM impl.
Leaving LEFT / RIGHT for someone else or when I have more time.
2018-03-07 15:45:11 -05:00
Gabor Kiss-Vamosi
5d53a9edaf fix warnings 2018-03-07 14:46:38 +01:00
Gabor Kiss-Vamosi
c2fb0fffbd Update README.md 2018-03-07 13:51:59 +01:00
Gabor Kiss-Vamosi
fc05fad277 release v5.1 2018-03-07 13:39:51 +01:00
Gabor Kiss-Vamosi
1466d2b97e Merge branch 'master' of https://github.com/littlevgl/lvgl 2018-03-07 13:36:50 +01:00
Gabor Kiss-Vamosi
13351c0091 lv_math: lv_math_num_to_str: return with buf 2018-03-07 13:10:20 +01:00
Gabor Kiss-Vamosi
19f98ce8ea merge dev-5.1 2018-03-07 13:08:53 +01:00
Gabor Kiss-Vamosi
4b5fefa521 Merge branch 'beta' of https://github.com/littlevgl/lvgl into beta 2018-03-07 13:07:17 +01:00
Gabor Kiss-Vamosi
f8b4dc3a2d merge beta 2018-03-07 13:07:00 +01:00
Gabor Kiss-Vamosi
4d571290c7 Update TODO_PATCH.md 2018-03-07 12:48:31 +01:00
Gabor Kiss-Vamosi
3a35da8f27 lv_btnm (and lv_kb): add up/down navigation with LV_GROUP_KEY_UP/DOWN 2018-03-07 11:37:38 +01:00
Gabor Kiss-Vamosi
1b1efbd0f0 lv_area_is_on bugfix 2018-03-07 10:49:25 +01:00
Gabor Kiss-Vamosi
d068c85e80 minor updates on LV_ATTRIBUTE_... 2018-03-07 09:22:37 +01:00
Gabor Kiss-Vamosi
145ea416be ddlist: auto-open on LV_GROUP_KEY_LEF/RIGHT/UP/DOWN 2018-03-07 09:22:10 +01:00
Gabor Kiss-Vamosi
0b6be3a0f6 bottom shadow: add blur 2018-03-05 17:14:45 +01:00
Gabor Kiss-Vamosi
7cf2cf0756 Update TODO_MINOR.md 2018-03-05 14:16:53 +01:00
Gabor Kiss-Vamosi
69eb3a9756 updae comments 2018-03-04 17:57:51 +01:00
Gabor Kiss-Vamosi
7b20da2276 remove debug printf 2018-03-04 17:56:32 +01:00
Gabor Kiss-Vamosi
eb376899ce remove sprintf from lv_gauge the save ROM (custom BCD converter added to lv_math.c) 2018-03-04 17:51:41 +01:00
Gabor Kiss-Vamosi
2123ee0218 fixes with USE_LV_FILESYSTEM = 0 2018-03-04 17:03:37 +01:00
Gabor Kiss-Vamosi
6e94c70fbb replace the only sscanf with a custom function (save 30 kB ROM) 2018-03-04 16:34:14 +01:00
Gabor Kiss-Vamosi
80b181293a fix lv_rfill screen sized area size 2018-03-04 15:36:45 +01:00
Gabor Kiss-Vamosi
fb59508ad1 typo fix: lv_refr_set_round_cb() 2018-03-02 15:34:22 +01:00
Gabor Kiss-Vamosi
9e20b3a18e Merge pull request #136 from chenshijianworkgit/beta
fix keyboard cursor management invalid
2018-03-02 10:59:43 +01:00
jian
505c44a4d3 fix keyboard cursor management invalid 2018-03-02 09:44:05 +08:00
Gabor Kiss-Vamosi
c0d55112b4 Merge remote-tracking branch 'origin/beta' into dev-5.1 2018-03-01 13:18:50 +01:00
Gabor Kiss-Vamosi
e246db4604 minor updates 2018-03-01 13:17:29 +01:00
Gabor Kiss-Vamosi
2d5e41d566 lv_conf_templ: minor updates 2018-03-01 12:52:35 +01:00
Gabor Kiss-Vamosi
c3e248ec79 ddlist and roller group updates + updates with USE_LV_ANIMATION = 0 2018-03-01 12:21:49 +01:00
Gabor Kiss-Vamosi
7da60e219d Merge pull request #134 from chenshijianworkgit/beta
gauge's label count is not inherited
2018-03-01 10:12:05 +01:00
jian
8978f27145 fix the number of gauge's label count is not inherited 2018-03-01 11:37:54 +08:00
Gabor Kiss-Vamosi
a6749c0a26 Update TODO_MINOR.md 2018-02-28 16:31:40 +01:00
Gabor Kiss-Vamosi
d20fe1f4ee add special default style_mod function in lv_group for LV_COLOR_DEPTH = 1 2018-02-28 16:17:56 +01:00
Gabor Kiss-Vamosi
05fe9b6b81 add lv_obj_get_type 2018-02-28 15:37:41 +01:00
Gabor Kiss-Vamosi
e4b677be3d lv_hal_disp: fix linked list issue whan adding more displays 2018-02-28 09:45:51 +01:00
Gabor Kiss-Vamosi
05a98a0107 Update TODO_MINOR.md 2018-02-28 09:42:44 +01:00
Gabor Kiss-Vamosi
769f864360 makefle update 2018-02-27 13:24:49 +01:00
Gabor Kiss-Vamosi
af3012abff border draw bugfix with radius = 0 2018-02-27 13:24:41 +01:00
Gabor Kiss-Vamosi
cdebffe462 remove debug printf-s 2018-02-27 11:47:21 +01:00
Gabor Kiss-Vamosi
5b9c9c4833 fix: USE_LV_SHADOW = 0 with LV_ANTIALAIS = 1 2018-02-27 11:45:38 +01:00
Gabor Kiss-Vamosi
9605a6b712 image draw: minor optimization 2018-02-27 11:43:14 +01:00
Gabor Kiss-Vamosi
6f304736c5 image draw bugfix with NO_GPU 2018-02-26 17:19:51 +01:00
Gabor Kiss-Vamosi
dbe7ef7a0c lv_color.h fix uninitialized alpha chanel with 24 bit color 2018-02-26 15:57:40 +01:00
Gabor Kiss-Vamosi
f0a705595b minor shadow bottom draw bugfix 2018-02-24 15:36:19 +01:00
Gabor Kiss-Vamosi
076540752b prevent refresh after drag is no movement happened 2018-02-24 15:36:06 +01:00
Gabor Kiss-Vamosi
5bc8f819f0 Update TODO_MINOR.md 2018-02-24 14:50:58 +01:00
Gabor Kiss-Vamosi
f3e1df3997 add LV_GROUP_KEY_ENETER_LONG to trigger long press evets of the objects 2018-02-24 14:39:15 +01:00
Gabor Kiss-Vamosi
465ce80e41 Update TODO_MINOR.md 2018-02-24 13:37:53 +01:00
Gabor Kiss-Vamosi
b2f72d3f70 LV_INDEV_TYPE_BUTTON added 2018-02-24 13:17:39 +01:00
Gabor Kiss-Vamosi
a676590e30 add group focus callback and invalid area rounding callback option 2018-02-24 11:55:39 +01:00
Gabor Kiss-Vamosi
7688535204 Update TODO_MINOR.md 2018-02-24 11:54:45 +01:00
Gabor Kiss-Vamosi
7310a2c6cc add LV_PROTECT_PRESS_LOST 2018-02-24 11:26:06 +01:00
Gabor Kiss-Vamosi
3bbc052794 Update TODO_MINOR.md 2018-02-24 11:25:06 +01:00
Gabor Kiss-Vamosi
d57749ec98 Update TODO_MINOR.md 2018-02-23 20:55:21 +01:00
Gabor Kiss-Vamosi
5b637c68ee Update TODO_MINOR.md 2018-02-23 18:09:05 +01:00
Gabor Kiss-Vamosi
3e8ca224a8 Update TODO_MAJOR.md 2018-02-23 17:10:58 +01:00
Gabor Kiss-Vamosi
6e6a7de1a8 lv_conf_templ.h update 2018-02-23 17:07:02 +01:00
Gabor Kiss-Vamosi
ff2e425b48 comment updates 2018-02-23 17:03:00 +01:00
Gabor Kiss-Vamosi
f7ee864709 Update TODO_MINOR.md 2018-02-23 16:31:15 +01:00
Gabor Kiss-Vamosi
93330eaf1d rename LV_IMG_FORMAT_RAW_INTERNAL to LV_IMG_FORMAT_INTERNAL_RAW 2018-02-23 15:22:23 +01:00
Gabor Kiss-Vamosi
c4503cb8f8 lv_draw_label bugfix (old rounding from LV_FONT_ANTIALIAS) 2018-02-23 15:19:39 +01:00
Gabor Kiss-Vamosi
a11957d0b4 new font and anti-alising system release for test 2018-02-23 13:56:32 +01:00
Gabor Kiss-Vamosi
2177e51857 lv_slider: fix knob_in with not zero min value 2018-02-23 13:56:32 +01:00
Gabor Kiss-Vamosi
ff3bbc56bc Update lv_txt.c
fix lv_txt_ut8_size() with 4 byte characters.
2018-02-23 13:56:32 +01:00
Gabor Kiss-Vamosi
3e5d43fd8b Merge pull request #116 from CapnBry/dev-5.1
Add user pointer to indev driver for state storage between read() calls
2018-02-20 14:29:33 +01:00
Bryan Mayland
fada3aabfa Add user pointer to indev driver for state storage between read() calls 2018-02-20 13:25:36 +00:00
Gabor Kiss-Vamosi
7a09086c6b Update TODO_MAJOR.md 2018-02-20 08:48:52 +01:00
Gabor Kiss-Vamosi
890829aa93 Update TODO_MINOR.md 2018-02-17 20:15:02 +01:00
Gabor Kiss-Vamosi
88096cbbfe merge change 2018-02-16 13:16:40 +01:00
Gabor Kiss-Vamosi
c56f5421f0 shadow drawing optimized 2018-02-16 12:55:05 +01:00
Gabor Kiss-Vamosi
fa6eb2fc22 lv_anim: delete unused global variable 2018-02-15 13:37:23 +01:00
Gabor Kiss-Vamosi
c547d2cf67 Merge branch 'master' into beta 2018-02-15 13:25:37 +01:00
Gabor Kiss-Vamosi
2f5f63ed13 lv_task: faster and clearer handler 2018-02-15 13:24:56 +01:00
Gabor Kiss-Vamosi
2237ebd46e work in progress with new anti aliasing 2018-02-15 10:12:28 +01:00
Gabor Kiss-Vamosi
f4679bffc3 lv_draw_label: letter position bugfix with no anti aliasing 2018-02-09 12:41:48 +01:00
Gabor Kiss-Vamosi
133bfe161c add new fonts 2018-02-09 12:40:00 +01:00
Gabor Kiss-Vamosi
39961a686f Update TODO_MINOR.md 2018-02-07 13:32:34 +01:00
Gabor Kiss-Vamosi
dfedda8e28 Update TODO_PATCH.md 2018-02-07 13:08:28 +01:00
Gabor Kiss-Vamosi
7e17d38754 Merge pull request #105 from upbeat27/indev-proc-fix
Fix input device processing
2018-02-07 13:07:39 +01:00
Gabor Kiss-Vamosi
9f7e091aba Update TODO_MINOR.md 2018-02-07 13:00:26 +01:00
Josh McAtee
55a276ff9a Fix input device processing 2018-02-06 11:42:50 -08:00
Gabor Kiss-Vamosi
5f5c5f3d42 Update TODO_MAJOR.md 2018-02-05 21:46:01 +01:00
Gabor Kiss-Vamosi
83aab8f825 Update TODO_MAJOR.md 2018-02-05 21:45:45 +01:00
Gabor Kiss-Vamosi
d5bc4c0522 Update TODO_MINOR.md 2018-02-05 21:43:28 +01:00
Gabor Kiss-Vamosi
e5133e27e6 Update TODO_PATCH.md 2018-02-05 21:33:32 +01:00
Gabor Kiss-Vamosi
bbbf822561 lv_slider: fix knob_in with not zero min value 2018-02-05 11:35:07 +01:00
Gabor Kiss-Vamosi
b0e26d865c new font system WIP 2018-02-05 11:27:08 +01:00
Gabor Kiss-Vamosi
0bf1d14756 Update lv_txt.c
fix lv_txt_ut8_size() with 4 byte characters.
2018-02-03 06:25:42 +01:00
Gabor Kiss-Vamosi
e5676aaf9b lv_label_set_anim_time: fix (was no effect in LONG_ROLL) 2018-01-31 10:07:20 +01:00
Gabor Kiss-Vamosi
acc4d77fe9 lv_label_set_anim_time: fix (was no effect in LONG_ROLL) 2018-01-31 10:06:39 +01:00
Gabor Kiss-Vamosi
241c2e5d38 Merge pull request #95 from upbeat27/beta
Fix dropdown bug
2018-01-31 10:00:10 +01:00
Josh McAtee
cab6ce93d6 Fix ddlist controlled via keyboard
The selected option is tracked correctly when scrolling through the
dropdown list via keyboard
2018-01-30 11:58:40 -08:00
upbeat27
aad9f76a39 Merge pull request #1 from littlevgl/beta
Beta
2018-01-30 11:09:23 -08:00
Gabor Kiss-Vamosi
ec19ceb22f typo fixes 2018-01-30 14:48:35 +01:00
Gabor Kiss-Vamosi
1689a121e5 label draw bugfix: upscale offset with anti-aliasing 2018-01-30 14:48:35 +01:00
Gabor Kiss-Vamosi
120a694324 Update README.md 2018-01-29 12:32:14 +01:00
Gabor Kiss-Vamosi
90c67d8f64 Update TODO_PATCH.md 2018-01-26 10:03:57 +01:00
Gabor Kiss-Vamosi
a2db424eb1 Merge pull request #86 from upbeat27/tabview-spelling-fix
Tabview spelling fix
2018-01-26 10:03:44 +01:00
Gabor Kiss-Vamosi
bff582d5ed Merge pull request #85 from upbeat27/patch-1
Chart draw bug
2018-01-26 10:00:59 +01:00
Josh McAtee
8bc9868705 Fix spelling of "handler"
Correct instances of hadler -> handler
2018-01-25 13:14:10 -08:00
Josh McAtee
7b46bfa0d1 Merge remote-tracking branch 'upstream/beta' 2018-01-25 13:10:17 -08:00
upbeat27
2770752813 Fix incorrect storage size for loop counter
When drawing chart lines/points/columns, execution will stay in loop forever when point count > 255.
The loop counter i was set to uint8_t when it should be the same size as point_cnt, uint16_t.
2018-01-25 11:34:47 -08:00
Gabor Kiss-Vamosi
2d83b6edb2 Update TODO_MAJOR.md 2018-01-23 19:49:13 +01:00
Gabor Kiss-Vamosi
39e76b0e4f Update TODO_MAJOR.md 2018-01-23 19:46:23 +01:00
Gabor Kiss-Vamosi
e9805c98d5 Update TODO_MAJOR.md 2018-01-23 11:22:51 +01:00
Kiss-Vamosi Gabor
177af6cae7 start v5.0.3 beta 2018-01-21 12:45:35 +01:00
Kiss-Vamosi Gabor
cb1bbeaf3a fix utf-8 encoding with 4 byte long codes 2018-01-21 12:43:47 +01:00
Gabor Kiss-Vamosi
46a1a8dfde Update TODO_MINOR.md 2018-01-19 15:59:48 +01:00
Gabor Kiss-Vamosi
4b4ac7c706 Update TODO_PATCH.md 2018-01-19 15:57:28 +01:00
Gabor Kiss-Vamosi
ad0ad2c4e1 lv_color: set 0xFF as default alpha for 24 bit colors 2018-01-19 15:56:29 +01:00
Gabor Kiss-Vamosi
df2204d50f Merge branch 'beta' 2018-01-19 15:45:58 +01:00
Gabor Kiss-Vamosi
fa883a0220 Merge branch 'master' of https://github.com/littlevgl/lvgl 2018-01-19 15:41:37 +01:00
Gabor Kiss-Vamosi
436833f138 Release: v5.0.2 2018-01-19 15:41:05 +01:00
Gabor Kiss-Vamosi
4ecee47caa add dependecy check to some object types 2018-01-19 15:40:22 +01:00
Gabor Kiss-Vamosi
5db75661cf lv_conf_templ.h: use LV_FONT_ANTIALIAS by default instead of LV_ANTIALAIS 2018-01-19 15:21:51 +01:00
Gabor Kiss-Vamosi
64b5010b15 change 0b.. number to 0x... and add big endian support to LV_COLOR_MAKE 2018-01-19 15:19:13 +01:00
Gabor Kiss-Vamosi
0733018ba5 Update TODO_MINOR.md 2018-01-19 14:10:59 +01:00
Gabor Kiss-Vamosi
6f43efde23 Merge branch 'beta' of https://github.com/littlevgl/lvgl into beta 2018-01-19 13:28:28 +01:00
Gabor Kiss-Vamosi
fb75153d29 lv_list: group focus fixes 2018-01-19 13:28:14 +01:00
Gabor Kiss-Vamosi
339227877a Update TODO_PATCH.md 2018-01-18 11:54:11 +01:00
Gabor Kiss-Vamosi
7710b1df43 Update TODO_MINOR.md 2018-01-18 11:54:05 +01:00
Gabor Kiss-Vamosi
c0a8460575 Update TODO_PATCH.md 2018-01-18 11:44:00 +01:00
Gabor Kiss-Vamosi
7027c7486b Merge pull request #75 from Zaltora/warn_err_compiler
fix warning/error with lv_conf.h option
2018-01-18 11:18:14 +01:00
Gabor Kiss-Vamosi
a42b56c7c7 lv_roller: add missing action handling 2018-01-16 15:35:35 +01:00
Gabor Kiss-Vamosi
c331659026 fix compile issue with undefined LV_ATTRIBUTE_TICK_INC/TASK_HANDLER 2018-01-16 15:26:02 +01:00
Zaltora
01088f77ab dependencies fix 2018-01-16 13:16:48 +01:00
Zaltora
7d302574cc fix warning/error for Graphics feature usage 2018-01-16 11:54:35 +01:00
Zaltora
ee4a419019 fix warning with VDB and shadow selection 2018-01-16 10:44:24 +01:00
Gabor Kiss-Vamosi
1173b33715 Merge pull request #72 from Zaltora/tick_optimization
Specific compiler attribute for tick
2018-01-15 11:17:11 +01:00
Zaltora
0fe5a3ba5e fix typo 2018-01-15 11:13:16 +01:00
Zaltora
6c06bfbf41 miss include fix 2018-01-15 11:07:33 +01:00
Zaltora
6bab1d2840 add handle fn to attribute + reorganize 2018-01-15 11:03:50 +01:00
Zaltora
89044a8649 Add specific otion for tick function + inline it 2018-01-14 10:23:16 +01:00
Gabor Kiss-Vamosi
94e686ba44 lv_obj_get_style: with NULL style check if the parent is focused and use the focused style 2018-01-13 08:18:24 +01:00
Gabor Kiss-Vamosi
86110cf1de lv_roller: lv_roller_get_selected_str: bugfix 2018-01-10 09:43:19 +01:00
Gabor Kiss-Vamosi
9b664e2944 LV_INDEV_READ_PERIOD 0 build bugfix 2018-01-10 09:42:52 +01:00
Gabor Kiss-Vamosi
78ff568dfb Merge pull request #66 from iromero91/master
Add configuration options for whole row and column invalid areas
2018-01-09 20:32:14 +01:00
Jose I Romero
e1d2709431 Add configuration options for whole row and column invalid areas
Some displays like the Sharp memory LCDs require whole rows to be updated at
a time, LV_INV_FULL_ROW ensures that every screen flush is a whole number of
rows.

LV_INV_FULL_COL is provided too for convenience when rotating the screen 90
degrees, making all updates be whole columns instead. Enabling both flags will
make lvgl update the whole screen every time.
2018-01-09 12:38:52 -06:00
Gabor Kiss-Vamosi
47556f2290 lv_ufs_remove: check file existance 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
531eb4b417 line width bugfox width anti-aliasing 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
7f8b1e920a Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
2f084d204e Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
a93fedf945 Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
8fd88300ce Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
d3f0331e8e Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
9fb0da69cc Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
4675bf9ae8 Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
da631cd441 Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
fd40f53d2e Update README.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
9f420af5e2 Update TODO_MINOR.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
9ff4b0e5b2 Update TODO_MAJOR.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
901cb1fab0 Update TODO_MAJOR.md 2018-01-08 09:48:27 +01:00
Gabor Kiss-Vamosi
809c93a19e update version 2018-01-05 13:52:43 +01:00
Gabor Kiss-Vamosi
62c307d6f2 lv_fs: lv_dir_open: bugifx (use rddir_size instead of file_fize) 2018-01-05 13:49:15 +01:00
Gabor Kiss-Vamosi
31488478c1 Merge pull request #60 from BenQoo/beta
lv_group: fix memory leak.
2018-01-04 09:13:03 +01:00
BenQoo
59fa14f989 lv_group: fix memory leak.
The items lack of memory deallocation
* `lv_group->obj_ll`
* `lv_group`
2018-01-04 14:54:37 +08:00
Gabor Kiss-Vamosi
1c34777024 line width bugfox width anti-aliasing 2018-01-02 12:59:18 +01:00
Gabor Kiss-Vamosi
dc3bc9f30d Merge branch 'beta' 2018-01-02 12:43:21 +01:00
Gabor Kiss-Vamosi
96692bfc3b material_theme: darker bg 2018-01-02 12:43:11 +01:00
Gabor Kiss-Vamosi
4aa3927b55 btnm: bottom border fix 2018-01-02 12:43:11 +01:00
Gabor Kiss-Vamosi
6eea879a14 Release v5.0.1 2018-01-02 12:40:53 +01:00
Gabor Kiss-Vamosi
c7862fd701 lv_conf_templ.h update 2018-01-02 12:40:09 +01:00
Gabor Kiss-Vamosi
e1f4426f76 Update README.md 2017-12-31 23:31:10 +01:00
Gabor Kiss-Vamosi
cc37769c91 Update README.md 2017-12-31 23:28:28 +01:00
Gabor Kiss-Vamosi
337d533dd5 Update README.md 2017-12-31 23:17:28 +01:00
Gabor Kiss-Vamosi
bc4a62da96 lv_list: group behaviour fixes 2017-12-31 11:11:46 +01:00
Gabor Kiss-Vamosi
4a58c778e4 Update README.md 2017-12-24 11:04:09 +01:00
Gabor Kiss-Vamosi
866e9e73b1 Update README.md 2017-12-24 11:03:16 +01:00
Gabor Kiss-Vamosi
3582f6501a Update README.md 2017-12-24 11:00:46 +01:00
Gabor Kiss-Vamosi
dfa0970585 lv_mem: bugfix 2017-12-23 09:17:42 +01:00
Gabor Kiss-Vamosi
33f2d2fbd8 Update README.md 2017-12-22 17:09:44 +01:00
Gabor Kiss-Vamosi
85bb30a19d Update README.md 2017-12-22 17:08:17 +01:00
Gabor Kiss-Vamosi
90ee83fb3e Update README.md 2017-12-22 17:08:03 +01:00
Gabor Kiss-Vamosi
bb30cac9df lv_conf_templ update 2017-12-22 15:47:12 +01:00
Gabor Kiss-Vamosi
d8ecb4afec material_theme: darker bg 2017-12-22 15:37:24 +01:00
Gabor Kiss-Vamosi
9d097c7cc1 btnm: bottom border fix 2017-12-22 15:37:06 +01:00
Gabor Kiss-Vamosi
e7356bfbb6 Update TODO_MINOR.md 2017-12-21 03:14:42 +01:00
Gabor Kiss-Vamosi
b0d84a4a3d Update TODO_MAJOR.md 2017-12-21 03:14:02 +01:00
Gabor Kiss-Vamosi
ee795362ba Update TODO_MAJOR.md 2017-12-21 03:13:23 +01:00
Gabor Kiss-Vamosi
e5e76f163c Update README.md 2017-12-21 01:06:11 +01:00
Gabor Kiss-Vamosi
d47db72584 move README to the root 2017-12-21 00:37:29 +01:00
Gabor Kiss-Vamosi
cde8738f0e release v5.0.0 2017-12-21 00:30:00 +01:00
Gabor Kiss-Vamosi
925a174ae2 update templates and themes 2017-12-21 00:19:59 +01:00
Gabor Kiss-Vamosi
5654c97c6b minor bugfixes 2017-12-20 21:27:39 +01:00
Gabor Kiss-Vamosi
d9590baf4c ddlist: define name fix 2017-12-20 17:04:08 +01:00
Gabor Kiss-Vamosi
dda1a38143 chart:init_points and set_points added 2017-12-20 16:51:34 +01:00
Gabor Kiss-Vamosi
d239b319ef lv_task: add idle measurement 2017-12-20 00:47:50 +01:00
Gabor Kiss-Vamosi
8164e8eac3 Update README.md 2017-12-19 22:09:06 +01:00
Gabor Kiss-Vamosi
60cbe5ec4c add zen theme 2017-12-19 22:00:43 +01:00
Gabor Kiss-Vamosi
b9b735ce9f minor updates 2017-12-19 22:00:32 +01:00
Gabor Kiss-Vamosi
65032619e2 add material theme 2017-12-17 20:11:28 +01:00
Gabor Kiss-Vamosi
da581072b4 minor fixes 2017-12-17 20:11:14 +01:00
Gabor Kiss-Vamosi
f242eba9c1 anim path reworked + minor changes 2017-12-17 01:54:09 +01:00
Gabor Kiss-Vamosi
7dad802981 minor fixes 2017-12-13 15:12:04 +01:00
Gabor Kiss-Vamosi
3f54e37143 minor renames 2017-12-11 23:11:15 +01:00
Gabor Kiss-Vamosi
ad3c0ebbfe minor updates 2017-12-11 15:42:23 +01:00
Gabor Kiss-Vamosi
4fce2f394d LV_INDEV_POINT_MARKER bugfix 2017-12-11 15:22:58 +01:00
Gabor Kiss-Vamosi
ce61609900 release rc-1 2017-12-11 14:40:46 +01:00
Gabor Kiss-Vamosi
ae23300c07 indev: add inactivity timer 2017-12-11 12:53:58 +01:00
Gabor Kiss-Vamosi
e7055bedf8 slider: lv_slider_is_dragged added 2017-12-11 11:42:27 +01:00
Gabor Kiss-Vamosi
dffc613d46 indev: add get_inactive_time 2017-12-11 10:59:33 +01:00
Gabor Kiss-Vamosi
7fb2974259 regenerate the fonts 2017-12-08 15:56:01 +01:00
Gabor Kiss-Vamosi
4138785a4e lv_tanview: minor renames 2017-12-08 14:34:07 +01:00
Gabor Kiss-Vamosi
91b788dc57 minor fixes 2017-12-08 08:59:37 +01:00
Gabor Kiss-Vamosi
0bfb73b632 lv_conf_templ update 2017-12-07 19:27:13 +01:00
Gabor Kiss-Vamosi
893475ad89 Hide anti aliasing. No x << LV_AA rewuired from now 2017-12-07 19:22:23 +01:00
Gabor Kiss-Vamosi
8bd9ab7b84 LV_GROUP rename 2017-12-07 10:38:25 +01:00
Gabor Kiss-Vamosi
266487fdab makefiles updated 2017-12-06 11:50:38 +01:00
Gabor Kiss-Vamosi
76902e00eb fonts regenerated 2017-12-06 11:50:27 +01:00
Gabor Kiss-Vamosi
2cf7ed0d26 lv_draw: use Variable Length Arrays 2017-12-06 09:48:52 +01:00
Gabor Kiss-Vamosi
1060e3c25a solve warnings 2017-12-03 22:41:32 +01:00
Gabor Kiss-Vamosi
562486c14e FS_RES_... rename to LV_FS_RES_... 2017-12-03 22:32:09 +01:00
Gabor Kiss-Vamosi
acd0a98641 lv_conf_templ: update 2017-12-03 00:38:30 +01:00
Gabor Kiss-Vamosi
92e75fe05d lv_theme_mono: add monochrome theme 2017-12-03 00:38:30 +01:00
Gabor Kiss-Vamosi
43646b78ef lv_mem_realloc: just truncate mem if smaller then then the old 2017-12-03 00:38:30 +01:00
Gabor Kiss-Vamosi
03d076197f minor fixes for objects 2017-12-03 00:38:30 +01:00
Gabor Kiss-Vamosi
596b15799d lv_page: draw border after the content 2017-12-03 00:38:30 +01:00
Gabor Kiss-Vamosi
d6e1705a1a fix a lot of warnings 2017-12-02 20:43:50 +01:00
Gabor Kiss-Vamosi
525c8d3dd9 minor renames 2017-12-02 15:04:44 +01:00
Gabor Kiss-Vamosi
defa3a0922 Merge branch 'dev-5.0' of https://github.com/littlevgl/lvgl into dev-5.0 2017-12-02 14:53:39 +01:00
Gabor Kiss-Vamosi
15c2187c57 night theme bugfix 2017-12-02 14:53:27 +01:00
Gabor Kiss-Vamosi
cabf623e11 color_int_t reanme to lv_color_int_t 2017-12-01 19:40:12 +01:00
Gabor Kiss-Vamosi
47f2e0a8f7 solve warnings 2017-11-30 14:46:16 +01:00
Gabor Kiss-Vamosi
b5af497aad makefile update 2017-11-30 11:44:24 +01:00
Gabor Kiss-Vamosi
514d2b38b4 lv_obj folder rename to lv_core 2017-11-30 11:35:49 +01:00
Gabor Kiss-Vamosi
2f5a09bc99 LV_VDB_ADR added to place vdb to sepcific address 2017-11-30 09:53:26 +01:00
Gabor Kiss-Vamosi
11c2d5dce4 lv_indev_registr rename to lv_indev_drv_regster 2017-11-29 16:28:20 +01:00
Gabor Kiss-Vamosi
bfc735a004 lv_conf_templ: add LV_VDB_DOUBLE 2017-11-29 15:41:57 +01:00
Gabor Kiss-Vamosi
b26bb2e5b7 lv_tick_inc: update with 'tick_period' parameter 2017-11-29 15:34:37 +01:00
Gabor Kiss-Vamosi
366ac0c03c Update README.md 2017-11-29 15:33:29 +01:00
Gabor Kiss-Vamosi
617438d770 lv_draw_vbasic: minor updates 2017-11-29 15:21:47 +01:00
Gabor Kiss-Vamosi
dfb0789191 makefile revert 2017-11-29 13:40:43 +01:00
Gabor Kiss-Vamosi
8db441d6a8 solve warnings 2017-11-29 13:22:44 +01:00
Gabor Kiss-Vamosi
1a1840ae11 lv_hal_indev and tick updates 2017-11-29 13:22:44 +01:00
Gabor Kiss-Vamosi
cc7128ce4c lv_hal_disp: add disp_flush 2017-11-29 13:22:44 +01:00
Gabor Kiss-Vamosi
9d87a82210 Update README.md 2017-11-29 11:43:09 +01:00
Gabor Kiss-Vamosi
d6692e3ead Update README.md 2017-11-29 11:42:23 +01:00
Gabor Kiss-Vamosi
80b408f9a6 Update README.md 2017-11-29 11:41:34 +01:00
Gabor Kiss-Vamosi
7f486ac48f Update README.md 2017-11-29 11:37:26 +01:00
Gabor Kiss-Vamosi
1ea356688f Update README.md 2017-11-29 11:32:38 +01:00
Gabor Kiss-Vamosi
193ca45248 Update README.md 2017-11-29 11:24:39 +01:00
Gabor Kiss-Vamosi
6678e48ccc Update README.md 2017-11-29 11:10:12 +01:00
Gabor Kiss-Vamosi
1eab2ccba3 add makefile 2017-11-28 16:15:42 +01:00
Gabor Kiss-Vamosi
2d09b3dbdf lv_area: add 'lv_' prefix 2017-11-28 16:15:13 +01:00
Gabor Kiss-Vamosi
83b01aa627 add LV_NO_ANIM and LV_NO_SHADOW 2017-11-27 17:48:54 +01:00
Gabor Kiss-Vamosi
0a3ff11223 lv_hal: add init funtion to call prior driver registration 2017-11-27 09:38:10 +01:00
Gabor Kiss-Vamosi
c9b28c7692 lv_hal: use less general structur elements 2017-11-27 00:48:16 +01:00
Gabor Kiss-Vamosi
c890dc8d43 use only relative include paths 2017-11-26 23:58:05 +01:00
Gabor Kiss-Vamosi
84477fccee lv draw corner: color mix bugfix and speed up 2017-11-26 22:09:37 +01:00
Gabor Kiss-Vamosi
1d103f11c3 lv_theme_night: list remove inner padding 2017-11-26 19:16:32 +01:00
Gabor Kiss-Vamosi
c157f0cdad tabview: add slide disable/enable 2017-11-26 18:58:11 +01:00
Gabor Kiss-Vamosi
8e1f54a213 misc integration bugfixes 2017-11-26 14:39:22 +01:00
Gabor Kiss-Vamosi
17a691ad39 lv_conf_templ update 2017-11-26 13:13:45 +01:00
Gabor Kiss-Vamosi
2ff3c37a54 macro remames 2017-11-26 13:09:43 +01:00
Gabor Kiss-Vamosi
c48a521882 misc is completly removed 2017-11-26 11:38:28 +01:00
Gabor Kiss-Vamosi
a8ceb6bcaf lv_misc: all functions are renamed 2017-11-24 17:48:47 +01:00
Gabor Kiss-Vamosi
1fcda8092e rename a lot of functions in lv_misc 2017-11-23 21:28:36 +01:00
Gabor Kiss-Vamosi
c3471fd04e lv_misc files added from misc repo 2017-11-23 20:42:14 +01:00
Gabor Kiss-Vamosi
c5b9a4eb17 lv_theme_night ready 2017-11-22 23:04:02 +01:00
Gabor Kiss-Vamosi
b90f3c7d32 theme_night: minor update on buttons 2017-11-22 21:11:50 +01:00
Gabor Kiss-Vamosi
38663e1365 Merge branch 'beta' of https://github.com/littlevgl/lvgl into beta 2017-11-22 18:53:45 +01:00
Gabor Kiss-Vamosi
d8d49d1835 theme updates 2017-11-22 16:03:40 +01:00
Gabor Kiss-Vamosi
25f9500d5a solve warnings 2017-11-22 13:26:20 +01:00
Gabor Kiss-Vamosi
7de9b97c6c lv_indev_t element rename 2017-11-22 10:34:30 +01:00
Gabor Kiss-Vamosi
bd60d7cd3b lv_tabview: drag bugfix 2017-11-22 10:34:08 +01:00
Gabor Kiss-Vamosi
eaacc34c6e Update TODO_MAJOR.md 2017-11-21 17:48:53 +01:00
Gabor Kiss-Vamosi
b2ef660b3a lv_tabview: obj type check in realign 2017-11-21 17:04:06 +01:00
Gabor Kiss-Vamosi
22f9c69fc1 bugfixes 2017-11-21 14:52:23 +01:00
Gabor Kiss-Vamosi
2f896ab068 slider knob shadow bugfix 2017-11-21 12:26:46 +01:00
Gabor Kiss-Vamosi
9d2d7ee869 revert include paths 2017-11-21 10:51:10 +01:00
Gabor Kiss-Vamosi
b749236724 revert adding misc submodule 2017-11-21 10:48:21 +01:00
Gabor Kiss-Vamosi
fc6f7ceba4 add misc as submodule 2017-11-21 10:38:31 +01:00
Gabor Kiss-Vamosi
d4aba14fea misc remove 2017-11-21 10:37:09 +01:00
Gabor Kiss-Vamosi
cff1c299ab add misc as submodule 2017-11-21 10:35:57 +01:00
Gabor Kiss-Vamosi
8fd12c53d2 style renames 2017-11-20 14:26:18 +01:00
Gabor Kiss-Vamosi
68133801d8 lv_hal_disp: remove the unused hor_res and ver_res 2017-11-20 13:20:53 +01:00
Gabor Kiss-Vamosi
79e3951ac8 lv_indev: keyboard ignor key == 0 2017-11-20 13:00:55 +01:00
Gabor Kiss-Vamosi
4ca6a04ce3 minor fixes 2017-11-19 22:24:57 +01:00
Gabor Kiss-Vamosi
cc687c8ead merge to beta 2017-11-19 21:54:07 +01:00
Gabor Kiss-Vamosi
1e139dc86c Release v5.0.0-beta 2017-11-19 21:30:28 +01:00
Gabor Kiss-Vamosi
552e7a8cf1 integrate img_conf into lv_conf.h 2017-11-19 21:16:53 +01:00
Gabor Kiss-Vamosi
dc9b619307 minor API updates 2017-11-19 20:45:40 +01:00
Gabor Kiss-Vamosi
1f6855f085 Update TODO_MINOR.md 2017-11-19 20:44:33 +01:00
Gabor Kiss-Vamosi
fef902f1da keyboard device support 2017-11-19 19:28:45 +01:00
Gabor Kiss-Vamosi
ec8deaad69 Update TODO_MINOR.md 2017-11-19 12:53:52 +01:00
Gabor Kiss-Vamosi
f66a45ba8b Update TODO_MINOR.md 2017-11-19 12:53:50 +01:00
Gabor Kiss-Vamosi
40f8a12c40 Update TODO_MINOR.md 2017-11-19 12:53:19 +01:00
Gabor Kiss-Vamosi
3ca4aa6858 Update TODO_MINOR.md 2017-11-19 09:58:40 +01:00
Gabor Kiss-Vamosi
4004153a5a Update TODO_MINOR.md 2017-11-19 09:48:34 +01:00
Gabor Kiss-Vamosi
a006082a47 rename enums to be general (e.g. lv_cont_layout_t -> lv_layout_t) 2017-11-18 00:18:19 +01:00
Gabor Kiss-Vamosi
7753257842 theme: add default 2017-11-18 00:17:21 +01:00
Gabor Kiss-Vamosi
63d54b0212 some api updates and style border.part added 2017-11-17 15:43:08 +01:00
Gabor Kiss-Vamosi
feb445d558 Update TODO_MINOR.md 2017-11-16 17:09:06 +01:00
Gabor Kiss-Vamosi
b973dd342a lv_theme: integrate into the library
add lv_theme
2017-11-16 15:38:02 +01:00
Gabor Kiss-Vamosi
e3378d23d4 consistent abbreviations 2017-11-16 10:20:44 +01:00
Gabor Kiss-Vamosi
38c799e27e lv_roller: add text recolor in selected area 2017-11-15 22:23:17 +01:00
Gabor Kiss-Vamosi
350ceddf3f name fixes 2017-11-15 21:06:44 +01:00
Gabor Kiss-Vamosi
86daac1424 add lv_xxx_style_t and unify style set/get 2017-11-15 15:50:33 +01:00
Gabor Kiss-Vamosi
39075fe06d update label, image and line API 2017-11-13 16:11:05 +01:00
Gabor Kiss-Vamosi
b8b0869a54 Update TODO_MINOR.md 2017-11-13 08:39:32 +01:00
Gabor Kiss-Vamosi
eb0383ea89 refresh with font_get_height_scale() 2017-11-11 14:23:05 +01:00
Gabor Kiss-Vamosi
cab8e4e7f5 update lv_objx_templ 2017-11-10 15:29:53 +01:00
Gabor Kiss-Vamosi
f03efd9460 btn style rename 2017-11-10 15:26:35 +01:00
Gabor Kiss-Vamosi
8f715434ac set function order 2017-11-10 15:01:40 +01:00
Gabor Kiss-Vamosi
4ecd589d84 slider and sw update 2017-11-09 17:13:10 +01:00
Gabor Kiss-Vamosi
0a5bd40430 lv_slider: bugfix on update drag-set mechanism 2017-11-09 08:37:43 +01:00
Gabor Kiss-Vamosi
6862cbdec2 lv_slider: update drag-set mechanism 2017-11-08 11:37:01 +01:00
Gabor Kiss-Vamosi
72605cac51 lv_mbox: fix duplicated function names 2017-11-08 11:11:40 +01:00
Gabor Kiss-Vamosi
a2ab0cde79 mbox: add btn width attribute 2017-11-08 11:07:34 +01:00
Gabor Kiss-Vamosi
d6739192fd add early return on LV_RES_INV in signal function 2017-11-07 17:00:55 +01:00
Gabor Kiss-Vamosi
410ea1f8f1 mbox further api update 2017-11-07 16:18:38 +01:00
Gabor Kiss-Vamosi
e42d63c7be mbox api update 2017-11-07 15:13:34 +01:00
Gabor Kiss-Vamosi
f7baf2716a lv_list: api update 2017-11-07 14:31:35 +01:00
Gabor Kiss-Vamosi
0671556002 lv_indev: remve debug printfs 2017-11-07 14:31:18 +01:00
Gabor Kiss-Vamosi
36f236bc44 lv_label: roll long mode bugfix on size change 2017-11-07 14:30:52 +01:00
Gabor Kiss-Vamosi
b160b1d1d5 indev: stop drag thorw when it already does nothing (e.g. page scrollable) 2017-11-06 16:27:00 +01:00
Gabor Kiss-Vamosi
1246878f00 lv_roller: API added 2017-11-05 22:37:03 +01:00
Gabor Kiss-Vamosi
27237acc88 Update TODO_MAJOR.md 2017-11-05 15:49:47 +01:00
Gabor Kiss-Vamosi
8eb4317e37 lv_ta: minor updates on API 2017-11-05 15:19:36 +01:00
Gabor Kiss-Vamosi
4412b13928 ta api updated and tested 2017-11-05 14:12:50 +01:00
Gabor Kiss-Vamosi
9497090093 Update TODO_MINOR.md 2017-11-05 01:05:46 +01:00
Gabor Kiss-Vamosi
8175e4e723 Update TODO_MINOR.md 2017-11-05 01:05:09 +01:00
Gabor Kiss-Vamosi
a256f58de1 Update TODO_MAJOR.md 2017-11-05 01:04:24 +01:00
Gabor Kiss-Vamosi
44818d3527 further api updates (begin to move signal function as static) 2017-11-05 00:48:57 +01:00
Gabor Kiss-Vamosi
c517d73a71 add static inline function to clraify API (bar, slider, sw, cb, btn, btnm) 2017-11-03 13:39:37 +01:00
Gabor Kiss-Vamosi
4076c8ddaf lv_bar: range bugfix 2017-11-03 10:22:40 +01:00
Gabor Kiss-Vamosi
5325a93990 minor style updates 2017-11-02 17:44:00 +01:00
Gabor Kiss-Vamosi
a1afdc5f3c label: move align to obj. attribut from style 2017-11-02 09:25:37 +01:00
Gabor Kiss-Vamosi
6e5db9e44e style: move opa to body.opa and make border.opa independent from it 2017-11-02 01:37:32 +01:00
Gabor Kiss-Vamosi
2b6a69068c Update TODO_MAJOR.md 2017-11-01 11:16:51 +01:00
Gabor Kiss-Vamosi
21475e86f2 apply the new (global variable oriented) font system 2017-11-01 11:14:12 +01:00
Gabor Kiss-Vamosi
c13507ae0c lv_kb: Enter key name fix 2017-10-31 17:10:10 +01:00
Gabor Kiss-Vamosi
0646509b9a lv_style anim solve warning 2017-10-31 16:47:44 +01:00
Gabor Kiss-Vamosi
0dbc0f0442 lv_btn_set_styles() revert to set all styles paramter list 2017-10-31 16:25:52 +01:00
Gabor Kiss-Vamosi
919a8e81ea styles: make styles to global variables 2017-10-30 17:31:48 +01:00
Gabor Kiss-Vamosi
5608bf868e bugfixes 2017-10-30 17:11:56 +01:00
Gabor Kiss-Vamosi
df238e2f44 Update TODO_MAJOR.md 2017-10-26 21:22:26 +02:00
Gabor Kiss-Vamosi
f0080b944d fixes and updates according to test results 2017-10-26 21:20:10 +02:00
Gabor Kiss-Vamosi
a1b4da6a30 Update TODO_PATCH.md 2017-10-24 10:03:06 +02:00
Gabor Kiss-Vamosi
816327f4f7 lv_hal: comment update 2017-10-20 22:41:10 +02:00
Gabor Kiss-Vamosi
964499a06f lv_hal: update function names and typedefs 2017-10-20 22:11:18 +02:00
Gabor Kiss-Vamosi
866f53658e remove lv_example because it is moved to seperate repo 2017-10-20 21:34:43 +02:00
Gabor Kiss-Vamosi
8707f3f122 Update TODO_MINOR.md 2017-10-20 21:20:35 +02:00
Gabor Kiss-Vamosi
09c51d1a6a Update TODO_MAJOR.md 2017-10-20 21:18:10 +02:00
Gabor Kiss-Vamosi
bf1903d17b API updates 2017-10-20 15:37:50 +02:00
Gabor Kiss-Vamosi
2ea1af59b9 further style renames + remove LV_DOWNSCALE 2017-10-20 10:17:02 +02:00
Gabor Kiss-Vamosi
8c9d4b58ed further renames in styles 2017-10-19 12:46:49 +02:00
Gabor Kiss-Vamosi
0856790760 lv_style: mass attribute renames 2017-10-18 16:07:19 +02:00
Gabor Kiss-Vamosi
d9205adc60 add lv_hal as normal folder (not from hal repo) 2017-10-18 14:09:25 +02:00
Gabor Kiss-Vamosi
2b44c68794 lv_hal_disp_copy updated 2017-10-18 13:47:35 +02:00
Gabor Kiss-Vamosi
c9b1d0c75f Merge pull request #41 from BenQoo/beta
Add Missing Right Curly Bracket
2017-10-17 10:23:53 +02:00
BenQoo
7a65dca973 Add missing right curly bracket. 2017-10-17 15:34:18 +08:00
Gabor Kiss-Vamosi
bfb3a105ac lv_ta: OUTLINE cursor vpad bugfix 2017-10-16 08:22:18 +02:00
Gabor Kiss-Vamosi
c96b1d4db3 Update CONTRIBUTING.md 2017-10-15 12:32:12 +02:00
Gabor Kiss-Vamosi
dbe741da12 lv_obj: lv_obj_del: bugfix 2017-10-12 17:00:18 +02:00
Gabor Kiss-Vamosi
49547a33f8 lv_btnm: control byte added 2017-10-12 16:59:51 +02:00
Gabor Kiss-Vamosi
49a50152cc lv_indev: update indev reset behavior 2017-10-12 16:59:09 +02:00
Gabor Kiss-Vamosi
f1ba07eab7 Update TODO_MAJOR.md 2017-10-12 15:36:01 +02:00
Gabor Kiss-Vamosi
7b24b47adf lv_bar: bugfix to handle negative range correctly 2017-10-11 16:04:19 +02:00
Gabor Kiss-Vamosi
bf8cf9fb81 lv_label: scroll anim position bugifx 2017-10-11 16:03:43 +02:00
Gabor Kiss-Vamosi
a7a6812a19 rename lv_top/sys_layer() to lv_layer_top/sys() 2017-10-11 09:11:29 +02:00
Gabor Kiss-Vamosi
af2b6f8034 update default screen style to white baclground 2017-10-11 09:10:47 +02:00
Gabor Kiss-Vamosi
9aac004c2c Update TODO_MAJOR.md 2017-10-11 08:58:17 +02:00
Gabor Kiss-Vamosi
7f6bdbe6eb Merge branch 'beta' into dev-5.0 2017-10-10 16:39:57 +02:00
Gabor Kiss-Vamosi
f06534eb2e Merge remote-tracking branch 'origin/beta' into dev-5.0 2017-10-10 16:39:45 +02:00
Gabor Kiss-Vamosi
e42fe2fead Merge branch 'beta' of https://github.com/littlevgl/lvgl into beta 2017-10-10 16:34:37 +02:00
Gabor Kiss-Vamosi
a78ea8f2e8 lv_hal update 2017-10-10 16:34:15 +02:00
Gabor Kiss-Vamosi
dcf50104f0 lv_obj: add top and sys layers 2017-10-10 16:17:23 +02:00
Gabor Kiss-Vamosi
57619fca06 fix a style refresh issue 2017-10-10 16:15:59 +02:00
Gabor Kiss-Vamosi
748009735c lv_ta: apply hpad/vpad on cursor position/size 2017-10-09 16:30:47 +02:00
Gabor Kiss-Vamosi
577fc7b528 lv_page: refresh size according to vpad/hpad on STYLE_CHANGE 2017-10-09 16:11:54 +02:00
Gabor Kiss-Vamosi
d6fe59bf73 Merge branch 'beta' of https://github.com/littlevgl/lvgl into dev-5.0 2017-10-09 15:30:08 +02:00
Gabor Kiss-Vamosi
dedad11102 remove all app. related includes 2017-10-09 15:29:50 +02:00
Gabor Kiss-Vamosi
d32692922b lv_conf_templ: remove app. related parts 2017-10-09 15:28:15 +02:00
Gabor Kiss-Vamosi
7b3c0009f6 delete application (moved as examples to a new repo) 2017-10-09 15:26:54 +02:00
Gabor Kiss-Vamosi
a5c85244a7 dispi->indev rework and integration 2017-10-09 15:21:26 +02:00
Gabor Kiss-Vamosi
aea3154b3b Merge pull request #40 from scopa90/patch-1
lv_btn: lv_btn_set_styles() do not change style on NULL
2017-10-09 14:27:44 +02:00
scopa90
f7c8fe9857 Update lv_btn.c
Allow NULL as parameter to lv_btn_set_styles for any style which is not to be changed.
2017-10-09 13:24:28 +01:00
Gabor Kiss-Vamosi
eb067af098 Update TODO_MAJOR.md 2017-10-09 08:31:52 +02:00
Gabor Kiss-Vamosi
71c5c5814c solve conflicts 2017-10-05 13:46:59 +02:00
Gabor Kiss-Vamosi
73b042cc82 add the new hal folder 2017-10-05 13:38:45 +02:00
Gabor Kiss-Vamosi
4d2714facc lv_tabview: set the first tab as active when added 2017-10-05 12:55:32 +02:00
Gabor Kiss-Vamosi
d27d8fd087 lv_roller: now works with drag throw 2017-10-05 12:51:29 +02:00
Gabor Kiss-Vamosi
e468f0d5fc fumbling with git... 2017-10-05 11:35:41 +02:00
Gabor Kiss-Vamosi
c0715b4c63 rever reset 2017-10-05 11:29:21 +02:00
Gabor Kiss-Vamosi
445b5ad231 Merge branch 'new_objs' into beta 2017-10-05 11:11:35 +02:00
Gabor Kiss-Vamosi
315bf64ccb merge utf8 2017-10-05 11:10:44 +02:00
Gabor Kiss-Vamosi
d6ccc48963 lv_ta: LINE and UNDERLINE cursor aligned symmetrically 2017-10-03 13:16:55 +02:00
Gabor Kiss-Vamosi
1544f6b6ed Update TODO_MINOR.md 2017-10-03 11:37:13 +02:00
Gabor Kiss-Vamosi
d1dcc41f69 lv_ta: remove forgotten printf 2017-10-03 11:35:53 +02:00
Gabor Kiss-Vamosi
0777561390 lv_ta: utf8 update 2017-10-03 10:42:38 +02:00
Gabor Kiss-Vamosi
0c473c6ccb lv_roller: make roller_scrl_signal to static 2017-10-02 17:19:25 +02:00
Gabor Kiss-Vamosi
974540cc63 lv_ta: fix cursor pos in one_line mode at line end 2017-10-02 16:50:34 +02:00
Gabor Kiss-Vamosi
fc3b967f33 Merge branch 'dev-5.0' of https://github.com/littlevgl/lvgl into dev-5.0 2017-10-02 15:15:42 +02:00
Gabor Kiss-Vamosi
b1abcb9310 all 3 hal elements are integrated 2017-10-02 15:14:14 +02:00
Gabor Kiss-Vamosi
3d38150563 move misc back to root folder 2017-09-27 16:07:33 +02:00
Gabor Kiss-Vamosi
380c0b1408 move misc beck to root folder 2017-09-27 16:03:01 +02:00
Gabor Kiss-Vamosi
5dabd945bd Merge branch 'new_objs' of https://github.com/littlevgl/lvgl into utf8 2017-09-27 15:19:19 +02:00
Gabor Kiss-Vamosi
9cd49f1554 lv_ta: remove a forgotten debug printf 2017-09-27 15:15:47 +02:00
Gabor Kiss-Vamosi
c72bb4502a lv_ta: cursor style bugfix on '\n' 2017-09-27 15:12:29 +02:00
Gabor Kiss-Vamosi
ebfe8fbfd4 update to the new font desciption 2017-09-27 13:05:35 +02:00
Gabor Kiss-Vamosi
5a6350df2a lv_ta: cursor style bugfix on '\n' 2017-09-25 12:11:42 +02:00
Gabor Kiss-Vamosi
0afd6cee46 Update README.md 2017-09-23 23:28:06 +02:00
Gabor Kiss-Vamosi
a6f5141f42 Update README.md 2017-09-23 23:27:17 +02:00
Gabor Kiss-Vamosi
fbb88452fb Update README.md 2017-09-23 23:25:12 +02:00
Kiss-Vamosi Gabor
af11110e0f lv_roller: comments added 2017-09-23 22:14:31 +02:00
Gabor Kiss-Vamosi
d07d4f5300 Update TODO_MAJOR.md 2017-09-22 23:56:56 +02:00
Kiss-Vamosi Gabor
b557331d63 lv_roller updates 2017-09-22 23:55:54 +02:00
Kiss-Vamosi Gabor
280e039e19 lv_ddlist: change auto_size to fix_height 2017-09-22 23:55:42 +02:00
Kiss-Vamosi Gabor
4935b88588 lv_objx_templ: minor update in comments 2017-09-22 23:55:03 +02:00
Kiss-Vamosi Gabor
d950ae0ee4 lv_obj_set_style refresh NULL styles behind glass styles 2017-09-22 23:54:31 +02:00
Gabor Kiss-Vamosi
1bbe6e1068 lv_ta: full UTF-8 support 2017-09-22 13:58:01 +02:00
Gabor Kiss-Vamosi
6e3445c2d6 Merge branch 'new_objs' into utf8 2017-09-22 09:54:22 +02:00
Gabor Kiss-Vamosi
569edb7685 utf-8: lv_label full support, lv_ta in pwd_mode still not working 2017-09-22 09:52:53 +02:00
Gabor Kiss-Vamosi
d610872ee7 Update TODO_MAJOR.md 2017-09-21 14:18:54 +02:00
Gabor Kiss-Vamosi
8414b1de2b lv_ta: cursor types addd (line, block, outline, underline) 2017-09-15 10:22:12 +02:00
Gabor Kiss-Vamosi
0b8daf5283 Update TODO_MINOR.md 2017-09-14 06:46:31 +02:00
Gabor Kiss-Vamosi
cb6824755d Update TODO_MINOR.md 2017-09-13 15:41:51 +02:00
Gabor Kiss-Vamosi
1782af2abb Update TODO_MINOR.md 2017-09-13 15:41:32 +02:00
Gabor Kiss-Vamosi
45f4b64cd4 Update TODO_PATCH.md 2017-09-13 12:44:16 +02:00
Gabor Kiss-Vamosi
cf69a7ae33 lv_ta: cursor style come from page bg. is scrl. has glass == 1 2017-09-13 10:08:21 +02:00
Gabor Kiss-Vamosi
637a41d392 lv_ta: fix height when one_line and FONT_ANTIALIAS 2017-09-12 10:55:36 +02:00
Gabor
45b8364b0e lv_roller: lv_ddlist_set_selected() updated to work with roller too 2017-09-11 12:43:14 +02:00
Gabor
f55d6fa640 lv_ta: label width bugfix 2017-09-11 10:28:14 +02:00
Gabor
ecc8c8af8f lv_label: draw background if the style explictly set 2017-09-11 10:15:40 +02:00
Gabor
0c45e9eac4 lv_ta: lv_ta_del() fix in pwd mode 2017-09-03 16:09:03 +02:00
Gabor
b6820e7e79 Merge branch 'beta' of https://github.com/littlevgl/lvgl into beta 2017-09-03 16:03:16 +02:00
Gabor
024d776d2c lv_btnm.h add missing semi colon 2017-09-03 16:02:37 +02:00
Gabor
7148f377c4 lv_roller: lv_roler added but not ready yet 2017-09-03 16:01:51 +02:00
Gabor
9cefda4f7b lv_label: lv_label_append_text() renamed and upgraded to lv_label_ins_text() 2017-09-03 16:01:03 +02:00
Kiss-Vamosi Gabor
f78046acce lv_ta_get_txt bugfix in pwm_mode 2017-08-29 15:08:18 +02:00
Gabor
9405abb3fd Add misc and hal 2017-08-24 17:01:54 +02:00
Gabor
eaf7a123d4 Merge branch 'beta' into dev-5.0 2017-08-24 15:56:11 +02:00
Gabor
fce6d2982e add 'misc' as submodule 2017-08-24 15:56:02 +02:00
Gabor
99dbf35953 lv_tabview: free allocated memory on in clean up signal 2017-08-24 14:30:14 +02:00
Gabor
892745a592 lv_kb: action call bugfix 2017-08-24 14:29:28 +02:00
Gabor
922d0ab150 lv_btnm_set_styles support trel, tpr and ina styles (API change) 2017-08-24 14:28:02 +02:00
Gabor Kiss-Vamosi
ed8df15de4 Update TODO_MAJOR.md 2017-08-24 14:24:35 +02:00
Gabor
ad2a9a4cea Merge branch 'new_objs' into beta 2017-08-23 16:42:52 +02:00
Gabor
ce50c08e91 Merge branch 'bugfix' into beta 2017-08-23 14:39:39 +02:00
Gabor
64852194ea use relative includes where it is possible 2017-08-23 14:39:09 +02:00
Gabor
0ef1fa0627 lv_tabview: add API 2017-08-23 14:24:34 +02:00
Gabor
fea552511e lv_objx_templ: create 'Add/remove functions' section 2017-08-23 14:24:11 +02:00
Gabor
7c90b4630b lv_conf_templ, lvgl.h: update with lv_tabview and lv_kb 2017-08-23 14:23:07 +02:00
Gabor
90d8a11917 lv_ta: lv_ta_cursor_show() don't let cursor visible if disabled 2017-08-23 14:19:42 +02:00
Gabor
1bdc650635 lv_kb: lv_kb_set_mode bugfix 2017-08-23 14:15:33 +02:00
Gabor Kiss-Vamosi
d0d46d482e Update TODO_MINOR.md 2017-08-23 09:25:25 +02:00
Gabor
af0c8d57b5 lv_kb: add Keyboard object type 2017-08-23 09:24:23 +02:00
Gabor Kiss-Vamosi
dc7ac427b5 Update CONTRIBUTING.md 2017-08-23 05:32:17 +02:00
Gabor
ebf7fd20ae Merge branch 'beta' into new_objs 2017-08-22 16:41:32 +02:00
Gabor
6d68aabc41 lv_objx_templ: formatting 2017-08-22 16:41:23 +02:00
Gabor
8ad9b481a8 lv_img: check the USE_FSINT and USE_UFS better 2017-08-22 12:51:18 +02:00
Gabor Kiss-Vamosi
e6028a913c Update CONTRIBUTING.md 2017-08-22 09:41:13 +02:00
Gabor Kiss-Vamosi
53b7ef0429 Update TODO_PATCH.md 2017-08-21 15:35:38 +02:00
Gabor
14cd444f8d lv_list work without lv_img 2017-08-21 14:55:06 +02:00
Gabor
525a9e381f lv_objx_templ: updated 2017-08-21 14:41:50 +02:00
Gabor
3a4463d2e4 lv_tab: all working, API not ready 2017-08-21 14:41:28 +02:00
Gabor Kiss-Vamosi
2aab61b91d Update TODO_PATCH.md 2017-08-20 19:26:16 +02:00
Gabor Kiss-Vamosi
4b59ae0976 Update TODO_MINOR.md 2017-08-20 02:20:01 +02:00
Gabor Kiss-Vamosi
fa5edfb53e Update TODO_PATCH.md 2017-08-20 02:18:38 +02:00
Gabor
3980f08440 lv_btnm: add lv_btnm_set_tgl() 2017-08-20 02:16:21 +02:00
Gabor
237edae7df lv_sw: all feature is working 2017-08-18 21:14:11 +02:00
Gabor
61c5777a6b lv_slider: knob_in + handle negative hpad/vpad to make bigger bg. then knob 2017-08-18 21:11:22 +02:00
Gabor
6852f6ee80 Merge branch 'beta' into lv_sw 2017-08-18 17:43:55 +02:00
Gabor
2965b351a5 lv_sw: skeleton added 2017-08-18 17:43:14 +02:00
Gabor Kiss-Vamosi
798e021803 Update TODO_PATCH.md 2017-08-17 13:19:59 +02:00
Gabor Kiss-Vamosi
def6cb2c92 Update TODO_MINOR.md 2017-08-17 11:16:09 +02:00
Gabor Kiss-Vamosi
a053641ea5 Update TODO_PATCH.md 2017-08-17 11:15:42 +02:00
Gabor Kiss-Vamosi
c6bf07973e Update TODO_MINOR.md 2017-08-17 11:15:08 +02:00
373 changed files with 223328 additions and 27353 deletions

7
.editorconfig Normal file
View File

@@ -0,0 +1,7 @@
[*.{c,h}]
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

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

@@ -0,0 +1 @@
custom: ["https://littlevgl.com/donate"]

View File

@@ -0,0 +1,14 @@
---
name: All other issues
about: Questions and enhancement requests should go to the forum.
title: ''
labels: not-template
assignees: ''
---
# All enhancement requests or questions should be directed to the Forum.
We use GitHub issues for development related discussions.
Please use the [forum](https://forum.littlevgl.com/) to ask questions.

29
.github/ISSUE_TEMPLATE/bug-report.md vendored Normal file
View File

@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
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.
**To Reproduce**
Please provide a small, independent code sample that can be used to reproduce the issue. Ideally this should work in the PC simulator unless the problem is specific to one platform.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

17
.github/stale.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 21
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 7
# Issues with these labels will never be considered stale
exemptLabels:
- architecture
- pinned
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue or pull request has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

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

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

8
.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
**/*.o
**/*bin
**/*.swp
**/*.swo
tags
docs/api_doc
scripts/cppcheck_res.txt
scripts/built_in_font/lv_font_*

109
CHANGELOG.md Normal file
View File

@@ -0,0 +1,109 @@
# Changelog
## v7.0.0 - under development
To try the new version use the `dev-7.0` branch of LVGL and the [Simulator](https://github.com/littlevgl/lv_sim_eclipse_sdl/tree/dev-7.0).
### Documentation
The docs for v7 is available at https://docs.littlevgl.com/v7/en/html/index.html
### Legal changes
*In progress*
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_templ.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.

398
README.md Normal file
View File

@@ -0,0 +1,398 @@
<h1 align="center"> LittlevGL - Open-source Embedded GUI 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/v6.1.2"><img src="https://img.shields.io/badge/version-6.1.2-blue.svg"></a>
</p>
<p align="center">
<img src="https://littlevgl.com/github/cover_ori_reduced_2.gif">
</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.
</p>
<h4 align="center">
<a href="https://littlevgl.com">Website </a> &middot;
<a href="https://littlevgl.com/live-demo">Live demo</a> &middot;
<a href="https://docs.littlevgl.com/en/html/get-started/pc-simulator.html">Simulator</a> &middot;
<a href="https://forum.littlevgl.com">Forum</a> &middot;
<a href="https://docs.littlevgl.com/">Docs</a> &middot;
<a href="https://blog.littlevgl.com/">Blog</a>
</h4>
---
- [Features](#features)
- [Supported devices](#supported-devices)
- [Quick start in a simulator](#quick-start-in-a-simulator)
- [Add LittlevGL to your project](#add-littlevgl-to-your-project)
- [Learn the basics](#learn-the-basics)
- [Examples](#examples)
- [Contributing](#contributing)
- [Donate](#donate)
## Features
* **Powerful building blocks** buttons, charts, lists, sliders, images, etc.
* **Advanced graphics** with animations, anti-aliasing, opacity, smooth scrolling
* **Simultaneously use various input devices** touchscreen, mouse, keyboard, encoder, buttons, etc.
* **Simultaneously use multiple displays** i.e. monochrome and color display
* **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
## 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 is recommended
- Flash/ROM: &gt; 64 kB for the very essential components (&gt; 180 kB is recommended)
- RAM:
- Static RAM usage: ~8..16 kB depending on the used features and objects types
- Stack: &gt; 2kB (&gt; 4 kB is recommended)
- Dynamic data (heap): &gt; 4 KB (&gt; 16 kB is recommended if using several objects).
Set by `LV_MEM_SIZE` in *lv_conf.h*.
- Display buffer: &gt; *"Horizontal resolution"* pixels (&gt; 10 &times; *"Horizontal resolution"* is recommended)
- C99 or newer compiler
*Note that the memory usage might vary depending on the architecture, compiler and build options.*
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)
- 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/lv_port_esp32)
- Nordic nrf52
- Quectell M66
## 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.
Choose a project with your favourite IDE:
| 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<br>(Recommended on<br>Linux and Mac) | Native Windows | Windows<br>with SDL | Cross-platform<br>with SDL | Cross-platform<br>with SDL |
## Add LittlevGL to your project
The steps below show how to setup LittlevGL on an embedded system with a display and a touchpad.
You can use the [Simulators](https://docs.littlevgl.com/en/html/get-started/pc-simulator) to get ready to use projects which can be run on your PC.
1. [Download](https://littlevgl.com/download) or [Clone](https://github.com/littlevgl/lvgl) the library
2. Copy the `lvgl` folder into your project
3. Copy `lvgl/lv_conf_template.h` as `lv_conf.h` next to the `lvgl` folder and set at least `LV_HOR_RES_MAX`, `LV_VER_RES_MAX` and `LV_COLOR_DEPTH`. Don't forget to **change the `#if 0` statement near the top of the file to `#if 1`**, otherwise you will get compilation errors.
4. Include `lvgl/lvgl.h` where you need to use LittlevGL related functions.
5. 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.
6. Call `lv_init()`
7. Create a display buffer for LittlevGL
```c
static lv_disp_buf_t disp_buf;
static lv_color_t buf[LV_HOR_RES_MAX * 10]; /*Declare a buffer for 10 lines*/
lv_disp_buf_init(&disp_buf, buf, NULL, LV_HOR_RES_MAX * 10); /*Initialize the display buffer*/
```
8. Implement and register a function which can **copy a pixel array** to an area of your display:
```c
lv_disp_drv_t disp_drv; /*Descriptor of a display driver*/
lv_disp_drv_init(&disp_drv); /*Basic initialization*/
disp_drv.flush_cb = my_disp_flush; /*Set your driver function*/
disp_drv.buffer = &disp_buf; /*Assign the buffer to the display*/
lv_disp_drv_register(&disp_drv); /*Finally register the driver*/
void my_disp_flush(lv_disp_t * disp, const lv_area_t * area, lv_color_t * color_p)
{
int32_t x, y;
for(y = area->y1; y <= area->y2; y++) {
for(x = area->x1; x <= area->x2; x++) {
set_pixel(x, y, *color_p); /* Put a pixel to the display.*/
color_p++;
}
}
lv_disp_flush_ready(disp); /* Indicate you are ready with the flushing*/
}
```
9. Implement and 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_cb = my_touchpad_read; /*Set your driver function*/
lv_indev_drv_register(&indev_drv); /*Finally register the driver*/
bool my_touchpad_read(lv_indev_drv_t * indev_driver, 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*/
}
```
10. 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.
## Learn the basics
### Objects (Widgets)
The graphical elements like Buttons, Labels, Sliders, Charts etc are called objects in LittelvGL. Go to [Object types](https://docs.littlevgl.com/en/html/object-types/index) to see the full list of available types.
Every object has a parent object. The child object moves with the parent and if you delete the parent the children will be deleted too. Children can be visible only on their parent.
The *screen* are the "root" parents. To get the current screen call `lv_scr_act()`.
You can create a new object with `lv_<type>_create(parent, obj_to_copy)`. It will return an `lv_obj_t *` variable which should be used as a reference to the object to set its parameters.
The first parameter is the desired *parent*, te second parameters can be an object to copy (`NULL` is unused).
For example:
```c
lv_obj_t * slider1 = lv_slider_create(lv_scr_act(), NULL);
```
To set some basic attribute `lv_obj_set_<paramters_name>(obj, <value>)` function can be used. For example:
```c
lv_obj_set_x(btn1, 30);
lv_obj_set_y(btn1, 10);
lv_obj_set_size(btn1, 200, 50);
```
The objects has type specific parameters too which can be set by `lv_<type>_set_<paramters_name>(obj, <value>)` functions. For example:
```c
lv_slider_set_value(slider1, 70, LV_ANIM_ON);
```
To see the full API visit the documentation of the object types or the related header file (e.g. `lvgl/src/lv_objx/lv_slider.h`).
### Styles
Styles can be assigned to the objects to changed their appearance. A style describes the appearance of rectangle-like objects (like a button or slider), texts, images and lines at once.
You can create a new style like this:
```c
static lv_style_t style1; /*Declare a new style. Should be `static`*/
lv_style_copy(&style1, &lv_style_plain); /*Copy a built-in style*/
style1.body.main_color = LV_COLOR_RED; /*Main color*/
style1.body.grad_color = lv_color_hex(0xffd83c) /*Gradient color (orange)*/
style1.body.radius = 3;
style1.text.color = lv_color_hex3(0x0F0) /*Label color (green)*/
style1.text.font = &lv_font_dejavu_22; /*Change font*/
...
```
To set a new style for an object use the `lv_<type>set_style(obj, LV_<TYPE>_STYLE_<NAME>, &my_style)` functions. For example:
```c
lv_slider_set_style(slider1, LV_SLIDER_STYLE_BG, &slider_bg_style);
lv_slider_set_style(slider1, LV_SLIDER_STYLE_INDIC, &slider_indic_style);
lv_slider_set_style(slider1, LV_SLIDER_STYLE_KNOB, &slider_knob_style);
```
If an object's style is `NULL` then it will inherit its parent's style. For example, the labels' style are `NULL` by default. If you place them on a button then they will use the `style.text` properties from the button's style.
Learn more in [Style overview](https://docs.littlevgl.com/en/html/overview/style) section.
### Events
Events are used to inform the user if something has happened with an object. You can assign a callback to an object which will be called if the object is clicked, released, dragged, being deleted etc. It should look like this:
```c
lv_obj_set_event_cb(btn, btn_event_cb); /*Assign a callback to the button*/
...
void btn_event_cb(lv_obj_t * btn, lv_event_t event)
{
if(event == LV_EVENT_CLICKED) {
printf("Clicked\n");
}
}
```
Learn more about the events in the [Event overview](https://docs.littlevgl.com/en/html/overview/event) section.
## Examples
### Button with label
```c
lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL); /*Add a button 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_obj_t * label = lv_label_create(btn, NULL); /*Add a label to the button*/
lv_label_set_text(label, "Button"); /*Set the labels text*/
...
void btn_event_cb(lv_obj_t * btn, lv_event_t event)
{
if(event == LV_EVENT_CLICKED) {
printf("Clicked\n");
}
}
```
![LittlevGL button with label example](https://docs.littlevgl.com/en/misc/simple_button_example.gif)
### Button with styles
Add styles to the previously button from the previous example
```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*/
```
![Stylsd button is LittelvGL](https://docs.littlevgl.com/en/misc/button_style_example.gif)
### Slider and object alignment
```c
lv_obj_t * label;
...
/* Create a slider in the center of the display */
lv_obj_t * slider = lv_slider_create(lv_scr_act(), NULL);
lv_obj_set_width(slider, 200); /*Set the width*/
lv_obj_align(slider, NULL, LV_ALIGN_CENTER, 0, 0); /*Align to the center of the parent (screen)*/
lv_obj_set_event_cb(slider, slider_event_cb); /*Assign an event function*/
/* Create a label below the slider */
label = lv_label_create(lv_scr_act(), NULL);
lv_label_set_text(label, "0");
lv_obj_set_auto_realign(slider, true);
lv_obj_align(label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
...
void slider_event_cb(lv_obj_t * slider, lv_event_t event)
{
if(event == LV_EVENT_VALUE_CHANGED) {
static char buf[4]; /* max 3 bytes for number plus 1 null terminating byte */
snprintf(buf, 4, "%u", lv_slider_get_value(slider));
lv_label_set_text(slider_label, buf); /*Refresh the text*/
}
}
```
![Slider example with LittlevGL](https://docs.littlevgl.com/en/misc/slider_example.gif)
### List and themes
```c
/*Texts of the list elements*/
const char * txts[] = {"First", "Second", "Third", "Forth", "Fifth", "Sixth", NULL};
/* Initialize and set a theme. `LV_THEME_NIGHT` needs to enabled in lv_conf.h. */
lv_theme_t * th = lv_theme_night_init(20, NULL);
lv_theme_set_current(th);
/*Create a list*/
lv_obj_t* list = lv_list_create(lv_scr_act(), NULL);
lv_obj_set_size(list, 120, 180);
lv_obj_set_pos(list, 10, 10);
/*Add buttons*/
uint8_t i;
for(i = 0; txts[i]; i++) {
lv_obj_t * btn = lv_list_add_btn(list, LV_SYMBOL_FILE, txts[i]);
lv_obj_set_event_cb(btn, list_event); /*Assign event function*/
lv_btn_set_toggle(btn, true); /*Enable on/off states*/
}
/* Initialize and set an other theme. `LV_THEME_MATERIAL` needs to enabled in lv_conf.h.
* If `LV_TEHE_LIVE_UPDATE 1` then the previous list's style will be updated too.*/
th = lv_theme_material_init(210, NULL);
lv_theme_set_current(th);
/*Create an other list*/
list = lv_list_create(lv_scr_act(), NULL);
lv_obj_set_size(list, 120, 180);
lv_obj_set_pos(list, 150, 10);
/*Add buttons with the same texts*/
for(i = 0; txts[i]; i++) {
lv_obj_t * btn = lv_list_add_btn(list, LV_SYMBOL_FILE, txts[i]);
lv_obj_set_event_cb(btn, list_event);
lv_btn_set_toggle(btn, true);
}
...
static void list_event(lv_obj_t * btn, lv_event_t e)
{
if(e == LV_EVENT_CLICKED) {
printf("%s\n", lv_list_get_btn_text(btn));
}
}
```
![List and theme example with LittlevGL](https://docs.littlevgl.com/en/misc/list_theme_example.gif)
### Use LittlevGL from Micropython
Learn more about [Micropython](https://docs.littlevgl.com/en/html/get-started/micropython).
```python
# Create a Button and a Label
scr = lv.obj()
btn = lv.btn(scr)
btn.align(lv.scr_act(), lv.ALIGN.CENTER, 0, 0)
label = lv.label(btn)
label.set_text("Button")
# Load the screen
lv.scr_load(scr)
```
## 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).
If you are interested in contributing to LittlevGL you can
- **Help others** in the [Forum](https://forum.littlevgl.com).
- **Inspire people** by speaking about your project in [My project](https://forum.littlevgl.com/c/my-projects) category in the Forum or add it to the [References](https://blog.littlevgl.com/2018-12-26/references) post
- **Improve and/or translate the documentation.** Go to the [Documentation](https://github.com/littlevgl/docs) repository to learn more
- **Write a blog post** about your experiences. See how to do it in the [Blog](https://github.com/littlevgl/blog) repository
- **Report and/or fix bugs** in [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues)
- **Help in the developement**. Check the [Open issues](https://github.com/littlevgl/lvgl/issues) especially the ones with [Help wanted](https://github.com/littlevgl/lvgl/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) label and tell your ideas about a topic or implement a feature.
It should be useful to read the
- [Contributing guide](https://blog.littlevgl.com/2018-12-06/contributing)
- [Coding style guide](https://github.com/littlevgl/lvgl/blob/master/docs/CODING_STYLE.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)

94
docs/CODING_STYLE.md Normal file
View File

@@ -0,0 +1,94 @@
## File format
Use [lv_misc/lv_templ.c](https://github.com/littlevgl/lvgl/blob/master/src/lv_misc/lv_templ.c) and [lv_misc/lv_templ.h](https://github.com/littlevgl/lvgl/blob/master/src/lv_misc/lv_templ.h)
## 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:
* Use abbreviations on public names only if they become longer than 32 characters
* Use only very straightforward (e.g. pos: position) or well-established (e.g. pr: press) abbreviations
## Coding guide
* Functions:
* Try to write function shorter than is 50 lines
* Always shorter than 100 lines (except very straightforwards)
* Variables:
* One line, one declaration (BAD: char x, y;)
* Use `<stdint.h>` (*uint8_t*, *int32_t* etc)
* Declare variables when needed (not all at function start)
* 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. The required config flies are: `docs/astyle_c` and `docs/astyle_h`.
To format the source files:
`$ find . -type f -name "*.c" | xargs astyle --options=docs/astyle_c`
To format the header files:
`$ find . -type f -name "*.h" | xargs astyle --options=docs/astyle_h`
Append `-n` to the end to skip creation of backup file OR use `$ find . -type f -name "*.bak" -delete` (for source file's backups) and `find . -type f -name "*.orig" -delete` (for header file's backups)

View File

@@ -1,180 +1,111 @@
# Contributing to Littlev Graphics Library
First of all thank you for reading these guide before contributing!
In this guide you can read how can you help in developing the Littlev Graphic Library. These are not strict rules rather just suggestions. If you have a constructive idea just create pull request on this document!
**Do you have some free time to spend with programming?
Are you working on an Embedded GUI project with LittlevGL?
See how can you help to improve the graphics library!**
### Table Of Content
* [Who can contribute?](#who-can-contribute)
* [How to report an issue?](#how-to-report-an-issue)
* [Simple issue](#simple-issue)
* [Complex issue](#complex-issue)
* [How to suggest a feature?](#how-to-suggest-a-feature)
* [How to implement a feature?](#how-to-implement-a-feature)
* [Styling guide](#styling-guide)
* [Git Commit Messages](#Git-commit-messages)
* [File format](#file-format)
* [Functions](#functions)
* [Variables](#variables)
* [Defines](#defines)
* [Comments](#comments)
* [Formatting](#formatting)
There are many ways to join the community. If you have some time to work with us I'm sure you will find something that fits you! You can:
- help others in the [Forum](https://forum.littlevgl.com/)
- improve and/or translate the documentation
- write a blog post about your experiences
- report and/or fix bugs
- suggest and/or implement new features
But first, start with the most Frequently Asked Questions.
# FAQ about contributing
## Where can I write my question and remarks?
We use the [Forum](https://forum.littlevgl.com/) to ask and answer questions and [GitHub's issue tracker](https://github.com/littlevgl/lvgl/issues) for development-related discussion.
We have some simple rules:
- Be kind and friendly.
- Speak about one thing in one issue/topic.
- Give feedback and close the issue or mark the topic as solved if your question is answered.
- Tell what you experience or expect. _"The button is not working"_ is not enough info to get help.
- If possible send an absolute minimal code example in order to reproduce the issue
- Use [Markdown](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) to format your post.
## How can I send fixes and improvements?
Merging new code happens via Pull Requests. If you are still not familiar with the Pull Requests (PR for short) here is a quick guide:
1. **Fork** the [lvgl repository](https://github.com/littlevgl/lvgl). To do this click the "Fork" button in the top right corner. It will "copy" the `lvgl` repository to your GitHub account (`https://github.com/your_name?tab=repositories`)
2. **Clone** the forked repository and add your changes
3. **Create a PR** on GitHub from the page of your `lvgl` repository (`https://github.com/your_name/lvgl`) by hitting the "New pull request" button
4. **Set the base branch**. It means where you want to merge your update. Fixes go to `master`, new features to the actual `dev-x.y` branch.
5. **Describe** what is in the update. An example code is welcome if applicable.
Some advice:
- If you are not sure about your fix or feature it's better to open an issue first and discuss the details there.
- Maybe your fix or update won't be perfect at first. Don't be afraid, just improve it and push the new commits. The PR will be updated accordingly.
- If your update needs some extra work it's okay to say: _"I'm busy now and I will improve it soon"_ or _"Sorry, I don't have time to improve it, I hope it helps in this form too"_.
So it's better to say don't have time to continue than saying nothing.
- Please read and follow this [guide about the coding style](https://github.com/littlevgl/lvgl/blob/master/docs/CODING_STYLE.md)
## Who can contribute?
Everybody is welcome in contributing independently from skills, programming level or any personal attribute.
## Where is the documentation?
There are several ways to contribute in the graphics library like:
* Report an issue
* Suggest feature
* Fix an issue
* Implement a feature
You can read the documentation here: <https://docs.littlevgl.com/>
You can edit the documentation here: <https://github.com/littlevgl/doc>
Please, take a look at [CODE_OF_CONDUCT](https://github.com/littlevgl/lvgl/blob/master/docs/CODE_OF_CONDUCT.md)
## Where is the blog?
## How to report an issue?
There are 3 permanent branches:
* `master` for stable, released versions
* `beta` for developers, all feature branches merged here first
* `bugfix` for hotfixes, not new features
You can read the blog here: <https://blog.littlevgl.com/>
You can edit the blog here: <https://github.com/littlevgl/blog>
### Simple issue
If you find an issue which is very simple to fix, and you fixed it, please send a pull request against `beta` branch.
A simple issue could be:
* Misspelled names
* Comment: misspelling or grammatical error in comments
* Variable: misspelled variable name (e.g. ***ojb**_next* instead of ***obj**_next*)
* Define: only local defines in files because global defines affect API
* Function: only static function name because global functions affect API
* Not handled error case:
* A parameter can be NULL (during normal usage)
* Negative index in array or over indexing
* Overflow in variable
* Anything which is local an can be fixed with a few lines of code
# So how and where can you contribute?
### Complex issue
If you find a complex issue which:
* might be simple but you don't know its origin
* affects a whole file, module or even the architecture
* needs deeper discussion
## Help others in the Forum
please create a **new issue** and describe
* what you experience
* how to reproduce the issue (maybe with example code)
* version you are using (lvgl.h)
* misc library version (misc.h)
It's a great way to contribute to the library if you already use it.
Just go to [https://forum.littlevgl.com/](https://forum.littlevgl.com/) a register (Google and GitHub login also works).
Log in, read the titles and if you are already familiar with a topic, don't be shy, and write your suggestion.
## How to suggest a feature?
If you have a good and useful idea you can use GitHub issues to suggest a new feature. Please note the followings on feature requests:
* What the new feature is about?
* Why/Where/In which case is it useful/helpful/relevant?
* Can you help in implementing it?
## Improving and/or translating the documentation
After a discussion we figure out the specification of the new feature and the technical details/implementation possibilities.
With the knowledge of how to do it somebody can implement the new feature.
If you would like to contribute to LittlevGL the documentation is the best place to start.
The new feature should be in a new branch.
### Fix typos, add missing parts
Keep in mind if you wouldn't like to do the implementation there is no guarantee that it will be ready in the new future.
However if you would like to force it, take a look at this page: [Feature request service](http://www.gl.littlev.hu/services#feature)
If you find a typo, an obscure sentence or something which is not explained well enough in the [English documentation](https://docs.littlevgl.com/en/html/index.html)
click the *"Edit on GitHub"* button in the top right corner and fix the issue by sending a Pull Request.
## How to implement a feature?
In [docs/TODO_MINOR.md](https://github.com/littlevgl/lvgl/blob/master/docs/TODO_MINOR.md) and [docs/TODO_PATCH.md](https://github.com/littlevgl/lvgl/blob/master/docs/TODO_PATCH.md) you can see some ideas which are waiting for somebody to realize them! If want to deal with a feature from this files, please start an issue and discusse the details.
### Translate the documentation
## Styling guide
If you have time and interest you can translate the documentation to your native language or any language you speak.
You can join others to work on an already existing language or you can start a new one.
### Git Commit Messages
* Use the present tense ("Add feature" not "Added feature")
* Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
* Limit the first line to 72 characters or less
* Reference issues and pull requests liberally after the first line
To translate the documentation we use [Zanata](https://zanata.org) which is an online translation platform.
You will find the LittlevGL project here: [LittlevGL on Zanata](https://translate.zanata.org/iteration/view/littlevgl-docs/v6.0-doc1?dswid=3430)
### File format
Use [misc/templ/templ.c](https://github.com/littlevgl/misc/blob/master/templ/templ.c) and [misc/templ/templ.h](https://github.com/littlevgl/misc/blob/master/templ/templ.h)
To get started you need to:
- register at [Zanata](https://zanata.org) which is an online translation platform.
- comment to [this post](https://forum.littlevgl.com/t/translate-the-documentation/238?u=kisvegabor)
- tell your username at *Zanata* and your selected language(s) to get permission the edit the translations
### Functions
* try to write function shorter then is 40 lines
* always shorter then 100 lines (except very straightforwards)
* in function names:
* words sparated by '_'
* only lower case letters
* only clear abbreviation (OK: *lv_xy_get_title_txt*, BAD: *lv_xy_get_ttxt*)
Note that a translation will be added to the documentation only if at least the [Porting section](https://docs.littlevgl.com/en/html/porting/index.html) is translated.
#### Global functions names (API)
An example: *lv_btn_set_state()*
* starts with *lv*
* followed by module name: *btn*, *label*, *style* etc.
* followed by the action: *set*, *get*, *refr* etc.
* closed with subject: *name*, *size*, *state* etc.
* optional like in *lv_obj_del()* it is missing
* could contain more words: *long_mode*, *point_all*
#### Static functions names
Names can be used freely.
## Writing a blog post about your experiences
### Variables
* words sparated by '_'
* always lower case
* one line one declaration (BAD: char x, y;)
* use `<stdint.h>` (*uint8_t*, *int32_t* etc)
* declare variables when needed (not all at function start)
* 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)
Have you ported LittlevGL to a new platform? Have you created a fancy GUI? Do you know a great trick?
You can share your knowledge on LittlevGL's blog! It's super easy to add your own post:
- Fork and clone the [blog repository](https://github.com/littlevgl/blog)
- Add your post in Markdown to the `_posts` folder.
- Store the images and other resources in a dedicated folder in `assets`
- Create a Pull Request
### Defines
* always upper case
* starts with *LV_*
* followed by the modul: *OBJ*, *BTN* etc.
* closed by the subject: *ANIM_TIME*, *VALUE_MIN*, *WIDTH_DEF*
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
### Comments
Before every function have a comment like this:
## 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.
```
/**
* 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);
```
## 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.
Always use `/* Something */` format and NOT `//Something`
During the implementation don't forget the [Code style guide](https://github.com/littlevgl/lvgl/blob/master/docs/CODING_STYLE.md).
Write readable code to avoid descriptive comments like:
`x++; /* Add 1 to x */`.
The code should show clearly what you are doing.
# Summary
You should write **why** have you done this:
`x++; /*Because of closing '\0' of the string */`
### Formatting
Here is example to show bracket placing and using of white spaces:
```
/**
* 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 bracket 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 start inline*/
lv_label_refr_text(label);
return;
}
.
.
.
}
```
Use 4 spaces indentation instead of tab.
I hope you have taken a liking to contribute to LittlevGL. A helpful and friendly community is waiting for you! :)

View File

@@ -1,83 +0,0 @@
# LittleV Graphics Libraray
![LittlevGL cover](http://www.gl.littlev.hu/home/main_cover_small.png)
LittlevGL is a graphics library to create Graphical User Interfaces (GUI) on TFT, LCD or monochrome displays using microcontroller based embedded systems.
Transparency, anti-aliassing and smooth animations can be used with no double buffering so typically no external memories are required.
The graphics library is written in C and it is completely hardware independent. You can even run it in a PC simulator without any embedded hardware.
Homepage: http://gl.littlev.hu
## Key features
* Hardware independent, support any modern microcontroller
* High resolution TFTs, monochrome or any type of display supported (24/16/8/1 bit color depth)
* External RAM, FPU or GPU not required just optional
* Build GUI from simple graphical objects
* Buttons, Labels, Images
* Charts, Lists, Bars, Sliders, Text areas etc.
* High level graphical features without double buffering
* Antialiassing (font or full screen)
* Animations
* Transparency
* Gradient colors
* Smooth dragging and scrolling
* Layers
* Customizable appearance with styles
* Applications for complex tasks
* Can run in a PC simulator
* Modular and well-structured source code
* Actively developed
## Porting
The following functions has to be provided
* hal/disp `disp_fill(x1, y1, x2, y2, color)` to fill area with a color
* hal/disp `disp_map(x1, y1, x2, y2, &color_array)` copy a color map to an area
* hal/disp `disp_color_cpy(dest, src, length, opa)` copy pixel, optional for GPU
* hal/indev `indev_get(id, &x, &y)` get the *x* and *y* coordinates from an input device (e.g. touch pad)
* hal/systick `systick_get()` get a system tick with 1 ms resolution
* hal/systick `systick_elapse(prev_time)` get the elapsed milliseconds sience *prev_time*
See the [example HAL](https://github.com/littlevgl/hal) repository!
## Requirements
* [Misc. library](https://github.com/littlevgl/misc) is used by the graphics library
## Project set-up
1. Clone or download the following repositories:
* lvgl:`git clone https://github.com/littlevgl/lvgl.git`
* misc: `git clone https://github.com/littlevgl/misc.git`
* hal: `git clone https://github.com/littlevgl/hal.git`
2. Create project with your prefered IDE and add the **lvgl**, **misc** and **hal** folders
3. Add your projects **root directory as include path**
4. Write your display, touch pad and system tick **drivers in hal**
5. Copy *lvgl/lv_conf_templ.h* as **lv_conf.h** and *misc/misc_conf_templ.h* as **misc_conf.h** to the projects root folder
6. In the *_conf.h files delete the first `#if 0` and its `#endif`. Let the default configurations at first.
7. In your *main.c* include:
* #include "misc/misc.h"
* #include "misc/os/ptask.h"
* #include "lvgl/lvgl.h"
8. In your *main.c* intialize:
* **misc_init()**;
* your_systick_init();
* your_disp_init();
* your_indev_init();
* **lv_init()**;
10. To **test** create a label: `lv_obj_t * label = lv_label_create(lv_scr_act(), NULL);`
11. In the main *while(1)* call `ptask_handler();` and make a few milliseconds delay (e.g. `your_delay_ms(5);`)
12. Compile the code and load it to your embedded hardware
## PC Simulator
If you don't have got an embedded hardware you can test the graphics library in a PC simulator. The simulator uses [SDL2](https://www.libsdl.org/) to emulate a display on your monitor and a touch pad with your mouse.
There is a pre-configured PC project for **Eclipse CDT** in this repository: https://github.com/littlevgl/proj_pc
## Contributing
See [CONTRIBUTING.md](https://github.com/littlevgl/lvgl/blob/master/docs/CONTRIBUTING.md)
## Donate
If you are pleased with the graphics library and found it useful please support its further development:
[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GJV3SC5EHDANS)

View File

@@ -1,12 +0,0 @@
# TODOs for major versions
Major versions released typically when API changes are required
## Contributing
Please create an issue to suggest a new feature instead of adding pull request to this file.
## v5
- [ ] rename repository from *lvgl* to *littlevgl*
- [ ] define renames: e.g. *USE_LV_BTN* to *LV_BTN_USE*
- [ ] Remove LV_DOWNSCALE (LV_ANTIALIAS will be used instead)
- [ ] *lv_ta_get_txt* rename to *lv_ta_get_text*
- [ ] btnm_action pass text instead of text_id

View File

@@ -1,30 +0,0 @@
# TODOs for minor versions
Minor versions (x.1.0, x.2.0 ...) released when one or more new feature is addded without changing the API. New features can be added with major versions (1.0.0, 2.0.0 ...) too.
## Contributing
Please create an issue to suggest a new feature instead of adding pull request to this file.
## Ideas
Here are ideas which are not assigned to a minor version yet:
- label: add a horzintal line (e.g. underline or line through).
- label long mode: dot begin
- music player app
- files app update: show content as text
- GUI remote control
- automatically build GUI from file (e.g. XML, JSON or HTML)
- lv_split: new object type, a hor. or ver. line for decoration purpose
- lv_valset: new object type, a label with "+" and "-" buttons
- lv_tabview: new object type to organise content with tabs
- lv_btngrp: new object type to display more buttons to choose an option from them
- lv_switch: new object type, turn on/off by tap (a little slider)
- lv_roller: new object type, a roller to select a value (like on smartphones)
## v4.2
- [x] Double VDB support: one for rendering, another to transfer former rendered image to frame buffer in the background (e.g. with DMA) [#15](https://github.com/littlevgl/lvgl/issues/15)
- [x] lv_group: to control without touch pad. Issue [#14](https://github.com/littlevgl/lvgl/issues/14)
- [x] lv_page: scrl def fit modification: hor:false, ver:true, and always set width to parent width
- [x] lv_btn: add lv_btn_get_..._action
- [x] lv_list: add lv_list_get_element_label/img
- [x] lv_ta: lv_ta_set_one_line to configure the Text area to one lined input field
- [x] style animations add
- [x] lv_btnm: besides 0. byte (width dsc) 1. byte: hidden (\177, 0x7F, delete)

View File

@@ -1,13 +0,0 @@
# TODOs for patch versions
Patch versions (x.y.1, x.y.2) contain bugfixes without changing the API but they can apppear in minor (x.1.0, x.2.0) or major (1.0.0, 2.0.0) versions too.
Bugfixes are done in `bugfix` branche.
The bugfixes of the still not released version are in `beta` branche.
## Contributing
Please create an issue to introduce a bug instead of adding pull request to this file.
## Next release
- [x] lv_slider: don't let indicator or bar to disappear because of hpad/vpad
- [x] lv_ta: memory leak if deleted in password mode

View File

@@ -1,41 +0,0 @@
/**
* @file img_conf.h
*
*/
#if 0 /*Remove this to enable the content (Delete the last #endif too!)*/
#ifndef IMG_CONF_H
#define IMG_CONF_H
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/* Enable here the used images
* For example:
* #define USE_IMG_EXAMPLE 1
*
* This is compatible with the images
* generated by the image converter utility
* For more information see: www.littlev.hu */
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**********************
* MACROS
**********************/
#endif
#endif /*Remove this to enable the content*/

14
library.json Normal file
View File

@@ -0,0 +1,14 @@
{
"name": "lvgl",
"version": "v6.1.2",
"keywords": "graphics, gui, embedded, littlevgl",
"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/littlevgl/lvgl.git"
},
"build": {
"includeDir": "."
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,270 +0,0 @@
/**
* @file lv_app.h
*
*/
#ifndef LV_APP_H
#define LV_APP_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lvgl.h"
#if LV_APP_ENABLE != 0
/*********************
* DEFINES
*********************/
/*Check dependencies*/
#if LV_OBJ_FREE_P == 0
#error "lv_app: Free pointer is required for application. Enable it lv_conf.h: LV_OBJ_FREE_P 1"
#endif
#if LV_OBJ_FREE_NUM == 0
#error "lv_app: Free number is required for application. Enable it lv_conf.h: LV_OBJ_FREE_NUM 1"
#endif
#if DM_CUSTOM == 0 && DM_MEM_SIZE < (2 * 1024)
#error "lv_app: not enough dynamic memory. Increase it in misc_conf.h: DM_MEM_SIZE"
#endif
/**********************
* TYPEDEFS
**********************/
typedef enum
{
LV_APP_MODE_NONE = 0x0000,
LV_APP_MODE_NOT_LIST = 0x0001, /*Do not list the application*/
LV_APP_MODE_NO_SC_TITLE = 0x0002, /*No short cut title*/
}lv_app_mode_t;
typedef enum
{
LV_APP_COM_TYPE_CHAR, /*Stream of characters. Not '\0' terminated*/
LV_APP_COM_TYPE_INT, /*Stream of 'int32_t' numbers*/
LV_APP_COM_TYPE_LOG, /*String about an event to log*/
LV_APP_COM_TYPE_TRIG, /*A trigger to do some specific action (data is ignored)*/
LV_APP_COM_TYPE_INV, /*Invalid type*/
LV_APP_COM_TYPE_NUM, /*Indicates the number of com. types*/
}lv_app_com_type_t;
struct __LV_APP_DSC_T;
typedef struct
{
const struct __LV_APP_DSC_T * dsc;
char * name;
lv_obj_t * sc;
lv_obj_t * sc_title;
lv_obj_t * win;
lv_obj_t * conf_win;
void * app_data;
void * sc_data;
void * win_data;
}lv_app_inst_t;
typedef struct __LV_APP_DSC_T
{
const char * name;
lv_app_mode_t mode;
void (*app_run)(lv_app_inst_t *, void *);
void (*app_close) (lv_app_inst_t *);
void (*com_rec) (lv_app_inst_t *, lv_app_inst_t *, lv_app_com_type_t, const void *, uint32_t);
void (*sc_open) (lv_app_inst_t *, lv_obj_t *);
void (*sc_close) (lv_app_inst_t *);
void (*win_open) (lv_app_inst_t *, lv_obj_t *);
void (*win_close) (lv_app_inst_t *);
void (*conf_open) (lv_app_inst_t *, lv_obj_t * );
uint16_t app_data_size;
uint16_t sc_data_size;
uint16_t win_data_size;
}lv_app_dsc_t;
typedef struct {
lv_style_t menu;
lv_style_t menu_btn_rel;
lv_style_t menu_btn_pr;
lv_style_t sc_rel;
lv_style_t sc_pr;
lv_style_t sc_send_rel;
lv_style_t sc_send_pr;
lv_style_t sc_rec_rel;
lv_style_t sc_rec_pr;
lv_style_t sc_title;
lv_style_t win_header;
lv_style_t win_scrl;
lv_style_t win_cbtn_rel;
lv_style_t win_cbtn_pr;
}lv_app_style_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the application system
*/
void lv_app_init(void);
/**
* Get screen of the applications
*/
lv_obj_t * lv_scr_app(void);
/**
* Allocate a new application descriptor
* @return pointer to an lv_app_dsc_t pointer. Save here a pointer to an app. dsc.
* E.g. *dsc = &my_app_dsc;
*/
lv_app_dsc_t ** lv_app_add_dsc(void);
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to an application specific configuration structure or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
lv_app_inst_t * lv_app_run(const lv_app_dsc_t * app_dsc, void * conf);
/**
* Close a running application. Close the Window and the Shortcut too if opened.
* @param app pointer to an application
*/
void lv_app_close(lv_app_inst_t * app);
/**
* Open a shortcut for an application
* @param app pointer to an application
* @return pointer to the shortcut
*/
lv_obj_t * lv_app_sc_open(lv_app_inst_t * app);
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
void lv_app_sc_close(lv_app_inst_t * app);
/**
* Open the application in a window
* @param app pointer to an application
* @return pointer to the shortcut
*/
lv_obj_t * lv_app_win_open(lv_app_inst_t * app);
/**
* Close the window of an application
* @param app pointer to an application
*/
void lv_app_win_close(lv_app_inst_t * app);
/**
* Send data to other applications
* @param app_send pointer to the application which is sending the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
* @return number application which were received the message
*/
uint16_t lv_app_com_send(lv_app_inst_t * app_send, lv_app_com_type_t type , const void * data, uint32_t size);
/**
* Test an application communication connection
* @param sender pointer to an application which sends data
* @param receiver pointer to an application which receives data
* @return false: no connection, true: there is connection
*/
bool lv_app_con_check(lv_app_inst_t * sender, lv_app_inst_t * receiver);
/**
* Create a new connection between two applications
* @param sender pointer to a data sender application
* @param receiver pointer to a data receiver application
*/
void lv_app_con_set(lv_app_inst_t * sender, lv_app_inst_t * receiver);
/**
* Delete a communication connection
* @param sender pointer to a data sender application or NULL to be true for all sender
* @param receiver pointer to a data receiver application or NULL to be true for all receiver
*/
void lv_app_con_del(lv_app_inst_t * sender, lv_app_inst_t * receiver);
/**
* Get the application descriptor from its name
* @param name name of the app. dsc.
* @return pointer to the app. dsc.
*/
const lv_app_dsc_t * lv_app_dsc_get(const char * name);
/**
* Rename an application
* @param app pointer to an application
* @param name a string with the new name
*/
void lv_app_rename(lv_app_inst_t * app, const char * name);
/**
* Get the window object from an object located on the window
* @param obj pointer to an object on the window
* @return pointer to the window of 'obj'
*/
lv_obj_t * lv_app_win_get_from_obj(lv_obj_t * obj);
/**
* Read the list of the running applications. (Get he next element)
* @param prev the previous application (at the first call give NULL to get the first application)
* @param dsc pointer to an application descriptor to filer the applications (NULL to do not filter)
* @return pointer to the next running application or NULL if no more
*/
lv_app_inst_t * lv_app_get_next(lv_app_inst_t * prev, lv_app_dsc_t * dsc);
/**
* Read the list of applications descriptors. (Get he next element)
* @param prev the previous application descriptors(at the first call give NULL to get the first)
* @return pointer to the next application descriptors or NULL if no more
*/
lv_app_dsc_t ** lv_app_dsc_get_next(lv_app_dsc_t ** prev);
/**
* Get a pointer to the application style structure. If modified then 'lv_app_refr_style' should be called
* @return pointer to the application style structure
*/
lv_app_style_t * lv_app_style_get(void);
/**********************
* MACROS
**********************/
/**********************
* POST-INCLUDES
*********************/
#include "lvgl/lv_app/lv_app_util/lv_app_kb.h"
#include "lvgl/lv_app/lv_app_util/lv_app_fsel.h"
#include "lvgl/lv_app/lv_app_util/lv_app_notice.h"
#include "lvgl/lv_appx/lv_app_example.h"
#include "lvgl/lv_appx/lv_app_phantom.h"
#include "lvgl/lv_appx/lv_app_sysmon.h"
#include "lvgl/lv_appx/lv_app_terminal.h"
#include "lvgl/lv_appx/lv_app_files.h"
#include "lvgl/lv_appx/lv_app_wifi.h"
#include "lvgl/lv_appx/lv_app_gsm.h"
#include "lvgl/lv_appx/lv_app_ethernet.h"
#include "lvgl/lv_appx/lv_app_benchmark.h"
#endif /*LV_APP_ENABLE*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_APP_H*/

View File

@@ -1,381 +0,0 @@
/**
* @file lv_app_fsel.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_fsel.h"
#if USE_LV_APP_FSEL != 0
#include <stdio.h>
#include "lv_app_notice.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void fsel_refr(void);
static lv_action_res_t fsel_close_action(lv_obj_t * close, lv_dispi_t * dispi);
static lv_action_res_t fsel_up_action(lv_obj_t * up, lv_dispi_t * dispi);
static lv_action_res_t fsel_next_action(lv_obj_t * next, lv_dispi_t * dispi);
static lv_action_res_t fsel_prev_action(lv_obj_t * prev, lv_dispi_t * dispi);
static lv_action_res_t fsel_drv_action(lv_obj_t * drv, lv_dispi_t * dispi);
static lv_action_res_t fsel_drv_lpr_action(lv_obj_t * drv, lv_dispi_t * dispi);
static lv_action_res_t fsel_folder_action(lv_obj_t * folder, lv_dispi_t * dispi);
static lv_action_res_t fsel_folder_lpr_action(lv_obj_t * folder, lv_dispi_t * dispi);
static lv_action_res_t fsel_file_action(lv_obj_t * file, lv_dispi_t * dispi);
/**********************
* STATIC VARIABLES
**********************/
static const char * fsel_filter;
static char fsel_path[LV_APP_FSEL_PATH_MAX_LEN];
static uint16_t fsel_file_cnt;
static lv_obj_t * fsel_win;
static lv_obj_t * fsel_list;
static void * fsel_param;
static void (*fsel_ok_action)(void *, const char *);
static lv_style_t style_btn_symbol;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the File selector utility
*/
void lv_app_fsel_init(void)
{
lv_style_get(LV_STYLE_BTN_REL, &style_btn_symbol);
style_btn_symbol.font = font_get(LV_IMG_DEF_SYMBOL_FONT);
}
/**
* Open the File selector
* @param path start path
* @param filter show only files with a specific extension, e.g. "wav".
* "/" means filter to folders.
* @param param a free parameter which will be added to 'ok_action'
* @param ok_action an action to call when a file or folder is chosen
*/
void lv_app_fsel_open(const char * path, const char * filter, void * param, void (*ok_action)(void *, const char *))
{
/*Save the parameters*/
strcpy(fsel_path, path);
fsel_filter = filter;
fsel_file_cnt = 0;
fsel_param = param;
fsel_ok_action = ok_action;
/*Trim the extra '\' or '/' from the end of path*/
uint16_t i;
for(i = strlen(fsel_path) -1 ; fsel_path[i] == '/' || fsel_path[i] == '\\'; i--) {
fsel_path[i] = '\0';
}
/*Check filter: NULL and "" mean no filtering*/
if(fsel_filter == NULL) fsel_filter = "";
lv_app_style_t * app_style = lv_app_style_get();
/*Create a window for the File selector*/
fsel_win = lv_win_create(lv_scr_act(), NULL);
lv_obj_set_size(fsel_win, LV_HOR_RES, LV_VER_RES);
lv_win_set_styles_cbtn(fsel_win, &app_style->win_cbtn_rel, &app_style->win_cbtn_pr);
lv_obj_set_style(lv_win_get_header(fsel_win), &app_style->menu);
lv_win_add_cbtn(fsel_win, SYMBOL_CLOSE, fsel_close_action);
fsel_refr(); /*Refresh the list*/
/*Show instruction when first open with folder filter*/
static bool first_folder_call = false;
if(first_folder_call == false && fsel_filter[0] == '/') {
lv_app_notice_add("Press a folder long\nto choose it!");
first_folder_call = true;
}
}
/**
* Close the File selector
*/
void lv_app_fsel_close(void)
{
if(fsel_win != NULL) {
lv_obj_del(fsel_win);
}
fsel_win = NULL;
fsel_list = NULL;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Refresh the file list according to the current path and filter
*/
static void fsel_refr(void)
{
/*Delete the previous list*/
if(fsel_list != NULL) {
lv_obj_del(fsel_list);
}
lv_win_set_title(fsel_win, fsel_path);
/*Create a new list*/
fsel_list = lv_list_create(fsel_win, NULL);
lv_obj_set_width(fsel_list, lv_win_get_width(fsel_win));
lv_list_set_style_img(fsel_list, &style_btn_symbol);
lv_obj_set_style(lv_page_get_scrl(fsel_list), lv_style_get(LV_STYLE_TRANSP_TIGHT, NULL));
lv_obj_set_drag_parent(fsel_list, true);
lv_obj_set_drag_parent(lv_page_get_scrl(fsel_list), true);
lv_cont_set_fit(fsel_list, false, true);
fs_res_t res = FS_RES_OK;
lv_obj_t * liste;
/*At empty path show the drivers */
if(fsel_path[0] == '\0') {
char drv[16];
char buf[2];
fs_get_letters(drv);
uint8_t i;
for(i = 0; drv[i] != '\0'; i++) {
buf[0] = drv[i];
buf[1] = '\0';
liste = lv_list_add(fsel_list, SYMBOL_DRIVE, buf, fsel_drv_action);
/*Add long press action to choose the driver as a folder*/
if(fsel_filter[0] == '/') lv_btn_set_lpr_action(liste, fsel_drv_lpr_action);
}
}
/*List the files/folders with fs interface*/
else {
liste = lv_list_add(fsel_list, SYMBOL_UP, "Up", fsel_up_action);
fs_readdir_t rd;
res = fs_readdir_init(&rd, fsel_path);
if(res != FS_RES_OK) {
lv_app_notice_add("Can not read the path\nin File selector");
return;
}
/*At not first page add prev. page button */
if(fsel_file_cnt != 0) {
liste = lv_list_add(fsel_list, SYMBOL_LEFT, "Previous page", fsel_prev_action);
}
char fn[LV_APP_FSEL_FN_MAX_LEN];
/*Read the files from the previous pages*/
uint16_t file_cnt = 0;
while(file_cnt <= fsel_file_cnt) {
res = fs_readdir(&rd, fn);
if(res != FS_RES_OK){
lv_app_notice_add("Can not read the path\nin File selector");
return;
}
file_cnt ++;
}
/*Add list elements from the files and folders*/
while(res == FS_RES_OK && fn[0] != '\0') {
if(fn[0] == '/') { /*Add a folder*/
lv_obj_t * liste;
liste = lv_list_add(fsel_list, SYMBOL_FOLDER, &fn[1], fsel_folder_action);
/*Add long press action to choose a folder*/
if(fsel_filter[0] == '/') lv_btn_set_lpr_action(liste, fsel_folder_lpr_action);
fsel_file_cnt ++;
file_cnt ++;
}
/*Add a file if it is not filtered*/
else if(fsel_filter[0] == '\0' || /*No filtering or ...*/
(strcmp(fs_get_ext(fn), fsel_filter) == 0 && /*.. the filter matches*/
fsel_filter[0] != '/')) {
liste = lv_list_add(fsel_list, SYMBOL_FILE, fn, fsel_file_action);
fsel_file_cnt ++;
file_cnt ++;
}
/*Get the next element*/
res = fs_readdir(&rd, fn);
/*Show only LV_APP_FSEL_MAX_FILE elements and add a Next page button*/
if(fsel_file_cnt != 0 && fsel_file_cnt % LV_APP_FSEL_PAGE_SIZE == 0) {
liste = lv_list_add(fsel_list, SYMBOL_RIGHT, "Next page", fsel_next_action);
break;
}
}
/*Close the read directory*/
fs_readdir_close(&rd);
}
if(res != FS_RES_OK) {
lv_app_notice_add("Can not read the path\nin File selector");
}
/*Focus to the top of the list*/
lv_obj_set_y(lv_page_get_scrl(fsel_list), 0);
}
/**
* Called when the File selector window close button is released
* @param close pointer to the close button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the window is deleted in the function
*/
static lv_action_res_t fsel_close_action(lv_obj_t * close, lv_dispi_t * dispi)
{
lv_app_fsel_close();
return LV_ACTION_RES_INV;
}
/**
* Called when the Up list element is released to step one level
* @param up pointer to the Up button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t fsel_up_action(lv_obj_t * up, lv_dispi_t * dispi)
{
fs_up(fsel_path);
fsel_file_cnt = 0;
fsel_refr();
return LV_ACTION_RES_INV;
}
/**
* Called when the Next list element is released to go to the next page
* @param next pointer to the Next button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t fsel_next_action(lv_obj_t * next, lv_dispi_t * dispi)
{
fsel_refr();
return LV_ACTION_RES_INV;
}
/**
* Called when the Prev list element is released to previous page
* @param prev pointer to the Prev button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t fsel_prev_action(lv_obj_t * prev, lv_dispi_t * dispi)
{
if(fsel_file_cnt <= 2 * LV_APP_FSEL_PAGE_SIZE) fsel_file_cnt = 0;
else if(fsel_file_cnt % LV_APP_FSEL_PAGE_SIZE == 0) {
fsel_file_cnt -= 2 * LV_APP_FSEL_PAGE_SIZE;
} else {
fsel_file_cnt = ((fsel_file_cnt / LV_APP_FSEL_PAGE_SIZE) - 1) * LV_APP_FSEL_PAGE_SIZE;
}
fsel_refr();
return LV_ACTION_RES_INV;
}
/**
* Called when the Driver list element is released to step into a driver
* @param drv pointer to the Driver button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t fsel_drv_action(lv_obj_t * drv, lv_dispi_t * dispi)
{
sprintf(fsel_path, "%s:", lv_list_get_element_text(drv));
fsel_file_cnt = 0;
fsel_refr();
return LV_ACTION_RES_INV;
}
/**
* Called when the Driver list element is long pressed to choose it
* @param drv pointer to the Driver button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t fsel_drv_lpr_action(lv_obj_t * drv, lv_dispi_t * dispi)
{
sprintf(fsel_path, "%s:", lv_list_get_element_text(drv));
if(fsel_ok_action != NULL) {
fsel_ok_action(fsel_param, fsel_path);
}
lv_app_fsel_close();
return LV_ACTION_RES_INV;
}
/**
* Called when a folder list element is released to enter into it
* @param folder pointer to a folder button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t fsel_folder_action(lv_obj_t * folder, lv_dispi_t * dispi)
{
sprintf(fsel_path, "%s/%s", fsel_path, lv_list_get_element_text(folder));
fsel_file_cnt = 0;
fsel_refr();
return LV_ACTION_RES_INV;
}
/**
* Called when a folder list element is long pressed to choose it
* @param folder pointer to a folder button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t fsel_folder_lpr_action(lv_obj_t * folder, lv_dispi_t * dispi)
{
sprintf(fsel_path, "%s/%s", fsel_path, lv_list_get_element_text(folder));
if(fsel_ok_action != NULL) {
fsel_ok_action(fsel_param, fsel_path);
}
lv_app_fsel_close();
return LV_ACTION_RES_INV;
}
/**
* Called when a file list element is released to choose it
* @param file pointer to a file button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t fsel_file_action(lv_obj_t * file, lv_dispi_t * dispi)
{
sprintf(fsel_path, "%s/%s", fsel_path, lv_list_get_element_text(file));
if(fsel_ok_action != NULL) {
fsel_ok_action(fsel_param, fsel_path);
}
lv_app_fsel_close();
return LV_ACTION_RES_INV;
}
#endif /*LV_APP_ENABLE != 0*/

View File

@@ -1,75 +0,0 @@
/**
* @file lv_app_fsel.h
*
*/
#ifndef LV_APP_FSEL_H
#define LV_APP_FSEL_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "../lv_app.h"
#if USE_LV_APP_FSEL != 0
/*********************
* DEFINES
*********************/
/*Add the required configurations*/
#ifndef LV_APP_FSEL_FN_MAX_LEN
#define LV_APP_FSEL_FN_MAX_LEN 128
#endif
#ifndef LV_APP_FSEL_PATH_MAX_LEN
#define LV_APP_FSEL_PATH_MAX_LEN 256
#endif
#ifndef LV_APP_FSEL_PAGE_SIZE
#define LV_APP_FSEL_PAGE_SIZE 8
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the File selector utility
*/
void lv_app_fsel_init(void);
/**
* Open the File selector
* @param path start path
* @param filter show only files with a specific extension, e.g. "wav".
* "/" means filter to folders.
* @param param a free parameter which will be added to 'ok_action'
* @param ok_action an action to call when a file or folder is chosen (give 'param' and the path as parameters)
*/
void lv_app_fsel_open(const char * path, const char * filter, void * param,
void (*ok_action)(void *, const char *));
/**
* Close the File selector
*/
void lv_app_fsel_close(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_APP_FSEL_H*/

View File

@@ -1,278 +0,0 @@
/**
* @file lv_app_kb.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_kb.h"
#if USE_LV_APP_KB != 0
#include "lvgl/lv_objx/lv_btnm.h"
#include "lvgl/lv_objx/lv_ta.h"
/*********************
* DEFINES
*********************/
#ifndef LV_APP_KB_ANIM_TIME
#define LV_APP_KB_ANIM_TIME 300 /*ms*/
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static lv_action_res_t lv_app_kb_action(lv_obj_t * btnm, uint16_t i);
/**********************
* STATIC VARIABLES
**********************/
static lv_obj_t * kb_btnm;
static lv_obj_t * kb_win;
static lv_obj_t * kb_ta;
static const char * kb_map_lc[] = {
"\0051#", "\004q", "\004w", "\004e", "\004r", "\004t", "\004y", "\004u", "\004i", "\004o", "\004p", "\007Del", "\n",
"\006ABC", "\003a", "\003s", "\003d", "\003f", "\003g", "\003h", "\003j", "\003k", "\003l", "\010Enter", "\n",
"_", "-", "z", "x", "c", "v", "b", "n", "m", ".", ",", ":", "\n",
"\003Hide", "\003Left", "\006 ", "\003Right", "\003Ok", ""
};
static const char * kb_map_uc[] = {
"\0051#", "\004Q", "\004W", "\004E", "\004R", "\004T", "\004Y", "\004U", "\004I", "\004O", "\004P", "\007Del", "\n",
"\006abc", "\003A", "\003S", "\003D", "\003F", "\003G", "\003H", "\003J", "\003K", "\003L", "\010Enter", "\n",
"_", "-", "Z", "X", "C", "V", "B", "N", "M", ".", ",", ":", "\n",
"\003Hide", "\003Left", "\006 ", "\003Right", "\003Ok", ""
};
static const char * kb_map_spec[] = {
"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "\002Del", "\n",
"\002abc", "+", "-", "/", "*", "=", "%", "!", "?", "#", "<", ">", "\n",
"\\", "@", "$", "(", ")", "{", "}", "[", "]", ";", "\"", "'", "\n",
"\003Hide", "\003Left", "\006 ", "\003Right", "\003Ok", ""
};
static const char * kb_map_num[] = {
"1", "2", "3", "\002Hide","\n",
"4", "5", "6", "\002Ok", "\n",
"7", "8", "9", "\002Del", "\n",
"+/-", "0", ".", "Left", "Right", ""
};
static cord_t kb_ta_ori_size;
static uint8_t kb_mode;
static void (*kb_close_action)(lv_obj_t *);
static void (*kb_ok_action)(lv_obj_t *);
static lv_style_t style_bg;
static lv_style_t style_btn_rel;
static lv_style_t style_btn_pr;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application keyboard
*/
void lv_app_kb_init(void)
{
lv_app_style_t * app_style = lv_app_style_get();
memcpy(&style_bg, &app_style->menu, sizeof(lv_style_t));
style_bg.opa = OPA_COVER;
style_bg.hpad = 0;
style_bg.vpad = 0;
style_bg.opad = 0;
memcpy(&style_btn_rel, &app_style->menu_btn_rel, sizeof(lv_style_t));
style_btn_rel.radius = 0;
style_btn_rel.bwidth = 1;
memcpy(&style_btn_pr, &app_style->menu_btn_pr, sizeof(lv_style_t));
style_btn_pr.radius = 0;
style_btn_pr.bwidth = 1;
}
/**
* Open a keyboard for a text area object
* @param ta pointer to a text area object
* @param mode 'OR'd values of 'lv_app_kb_mode_t' enum
* @param close a function to call when the keyboard is closed
* @param ok a function to called when the "Ok" button is pressed
* @return the created button matrix objects
*/
lv_obj_t * lv_app_kb_open(lv_obj_t * ta, lv_app_kb_mode_t mode, void (*close)(lv_obj_t *), void (*ok)(lv_obj_t *))
{
/*Close the previous keyboard*/
if(kb_btnm != NULL) {
lv_app_kb_close(false);
}
/*Save some parameters*/
kb_ta = ta;
kb_mode = mode;
kb_close_action = close;
kb_ok_action = ok;
/*Create a button matrix for the keyboard */
kb_btnm = lv_btnm_create(lv_scr_act(), NULL);
lv_obj_set_style(kb_btnm, &style_bg);
lv_obj_set_size(kb_btnm, LV_HOR_RES, LV_VER_RES / 2);
lv_obj_align(kb_btnm, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
lv_btnm_set_action(kb_btnm, lv_app_kb_action);
if(mode & LV_APP_KB_MODE_TXT) {
style_btn_rel.font = font_get(LV_APP_FONT_MEDIUM);
style_btn_pr.font = font_get(LV_APP_FONT_MEDIUM);
lv_btnm_set_map(kb_btnm, kb_map_lc);
}
else if(mode & LV_APP_KB_MODE_NUM) {
style_btn_rel.font = font_get(LV_APP_FONT_LARGE);
style_btn_pr.font = font_get(LV_APP_FONT_LARGE);
lv_btnm_set_map(kb_btnm, kb_map_num);
}
lv_btnm_set_styles_btn(kb_btnm, &style_btn_rel, &style_btn_pr);
kb_win = NULL;
kb_ta_ori_size = 0;
if(mode & LV_APP_KB_MODE_WIN_RESIZE) {
/*Reduce the size of the window and align it to the top*/
kb_win = lv_app_win_get_from_obj(kb_ta);
lv_obj_set_height(kb_win, LV_VER_RES / 2);
lv_obj_set_y(kb_win, 0);
/*If the text area is higher then the new size of the window reduce its size too*/
cord_t cont_h = lv_obj_get_height(kb_win) - lv_obj_get_height(lv_win_get_header(kb_win));
kb_ta_ori_size = lv_obj_get_height(kb_ta);
if(lv_obj_get_height(kb_ta) > cont_h - LV_DPI / 10) {
lv_obj_set_height(kb_ta, cont_h - LV_DPI / 10);
}
lv_page_focus(lv_win_get_page(kb_win), kb_ta, 0);
}
lv_ta_set_cursor_pos(kb_ta, LV_TA_CUR_LAST);
if(kb_mode & LV_APP_KB_MODE_CUR_MANAGE) {
lv_ta_set_cursor_show(kb_ta, true);
}
if(kb_mode & LV_APP_KB_MODE_ANIM_IN) {
lv_obj_anim(kb_btnm, LV_ANIM_FLOAT_BOTTOM | ANIM_IN, LV_APP_KB_ANIM_TIME, 0, NULL);
}
return kb_btnm;
}
/**
* Close the keyboard
* @param ok true: call the ok function, false: call the close function
*/
void lv_app_kb_close(bool ok)
{
if(kb_btnm == NULL) return;
if(ok == false) {
if(kb_close_action != NULL) kb_close_action(kb_ta);
} else {
if(kb_ok_action != NULL) kb_ok_action(kb_ta);
}
/*Reset the modified sizes*/
if((kb_mode & LV_APP_KB_MODE_WIN_RESIZE) && kb_win != NULL) {
lv_obj_set_height(kb_ta, kb_ta_ori_size);
lv_obj_set_size(kb_win, LV_HOR_RES, LV_VER_RES);
kb_win = NULL;
}
if(kb_mode & LV_APP_KB_MODE_CUR_MANAGE) {
lv_ta_set_cursor_show(kb_ta, false);
}
if(kb_mode & LV_APP_KB_MODE_ANIM_OUT) {
lv_obj_anim(kb_btnm, LV_ANIM_FLOAT_BOTTOM | ANIM_OUT, LV_APP_KB_ANIM_TIME, 0, lv_obj_del);
} else {
lv_obj_del(kb_btnm);
}
kb_btnm = NULL;
kb_ta = NULL;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Called when a button of 'kb_btnm' is released
* @param btnm pointer to 'kb_btnm'
* @param i the index of the released button from the current btnm map
* @return LV_ACTION_RES_INV if the btnm is deleted else LV_ACTION_RES_OK
*/
static lv_action_res_t lv_app_kb_action(lv_obj_t * btnm, uint16_t i)
{
const char ** map = lv_btnm_get_map(btnm);
const char * txt = map[i];
/*Ignore the unit size number of the text*/
if(txt[0] <= '\011') txt++;
/*Do the corresponding action according to the text of the button*/
if(strcmp(txt, "abc") == 0) {
lv_btnm_set_map(btnm, kb_map_lc);
} else if(strcmp(txt, "ABC") == 0) {
lv_btnm_set_map(btnm, kb_map_uc);
} else if(strcmp(txt, "1#") == 0) {
lv_btnm_set_map(btnm, kb_map_spec);
} else if(strcmp(txt, "Enter") == 0) {
lv_ta_add_char(kb_ta, '\n');
} else if(strcmp(txt, "Left") == 0) {
lv_ta_cursor_left(kb_ta);
} else if(strcmp(txt, "Right") == 0) {
lv_ta_cursor_right(kb_ta);
} else if(strcmp(txt, "Del") == 0) {
lv_ta_del(kb_ta);
} else if(strcmp(txt, "+/-") == 0) {
uint16_t cur = lv_ta_get_cursor_pos(kb_ta);
const char * ta_txt = lv_ta_get_txt(kb_ta);
if(ta_txt[0] == '-') {
lv_ta_set_cursor_pos(kb_ta, 1);
lv_ta_del(kb_ta);
lv_ta_add_char(kb_ta, '+');
lv_ta_set_cursor_pos(kb_ta, cur);
} else if(ta_txt[0] == '+') {
lv_ta_set_cursor_pos(kb_ta, 1);
lv_ta_del(kb_ta);
lv_ta_add_char(kb_ta, '-');
lv_ta_set_cursor_pos(kb_ta, cur);
} else {
lv_ta_set_cursor_pos(kb_ta, 0);
lv_ta_add_char(kb_ta, '-');
lv_ta_set_cursor_pos(kb_ta, cur + 1);
}
} else if(strcmp(txt, "Hide") == 0) {
lv_app_kb_close(false);
return LV_ACTION_RES_INV;
} else if(strcmp(txt, "Ok") == 0) {
lv_app_kb_close(true);
return LV_ACTION_RES_INV;
} else {
lv_ta_add_text(kb_ta, txt);
}
if(kb_mode & LV_APP_KB_MODE_WIN_RESIZE) {
#if LV_APP_ANIM_LEVEL != 0
lv_page_focus(lv_win_get_content(kb_win), kb_ta, true);
#else
lv_page_focus(lv_win_get_page(kb_win), kb_ta, 0);
#endif
}
return LV_ACTION_RES_OK;
}
#endif /*LV_APP_ENABLE != 0*/

View File

@@ -1,71 +0,0 @@
/**
* @file lv_app_kb.h
*
*/
#ifndef LV_APP_KB_H
#define LV_APP_KB_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "../lv_app.h"
#if USE_LV_APP_KB != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef enum
{
LV_APP_KB_MODE_TXT = 0x0001,
LV_APP_KB_MODE_NUM = 0x0002,
LV_APP_KB_MODE_WIN_RESIZE = 0x0004,
LV_APP_KB_MODE_CUR_MANAGE = 0x0008,
LV_APP_KB_MODE_ANIM_IN = 0x0010,
LV_APP_KB_MODE_ANIM_OUT = 0x0020,
}lv_app_kb_mode_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the application keyboard
*/
void lv_app_kb_init(void);
/**
* Open a keyboard for a text area object
* @param ta pointer to a text area object
* @param mode 'OR'd values of 'lv_app_kb_mode_t' enum
* @param close a function to call when the keyboard is closed
* @param ok a function to called when the "Ok" button is pressed
* @return the created button matrix objects
*/
lv_obj_t * lv_app_kb_open(lv_obj_t * ta, lv_app_kb_mode_t mode, void (*close)(lv_obj_t *), void (*ok)(lv_obj_t *));
/**
* Close the keyboard
* @param ok true: call the ok function, false: call the close function
*/
void lv_app_kb_close(bool ok);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_APP_KB_H*/

View File

@@ -1,95 +0,0 @@
/**
* @file lv_app_notice.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_notice.h"
#if USE_LV_APP_NOTICE != 0
#include <lvgl/lv_objx/lv_cont.h>
#include "lvgl/lv_objx/lv_label.h"
#include "misc/gfx/anim.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
static lv_obj_t * notice_h;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the Notifications
*/
void lv_app_notice_init(void)
{
notice_h = lv_cont_create(lv_scr_act(), NULL);
lv_obj_set_size(notice_h, LV_HOR_RES, LV_VER_RES - LV_DPI / 8);
lv_obj_set_y(notice_h, LV_DPI / 8);
lv_obj_set_click(notice_h, false);
lv_obj_set_style(notice_h, lv_style_get(LV_STYLE_TRANSP, NULL));
lv_cont_set_layout(notice_h, LV_CONT_LAYOUT_COL_R);
}
/**
* Add a notification with a given text
* @param format pritntf-like format string
* @return pointer the notice which is a message box (lv_mbox) object
*/
lv_obj_t * lv_app_notice_add(const char * format, ...)
{
char txt[LV_APP_NOTICE_MAX_LEN];
va_list va;
va_start(va, format);
vsprintf(txt,format, va);
va_end(va);
lv_obj_t * mbox;
mbox = lv_mbox_create(notice_h, NULL);
lv_mbox_set_text(mbox, txt);
lv_mbox_set_anim_close_time(mbox, LV_APP_NOTICE_CLOSE_ANIM_TIME);
#if LV_APP_NOTICE_SHOW_TIME != 0
lv_mbox_start_auto_close(mbox, LV_APP_NOTICE_SHOW_TIME);
#endif
/*Delete the last children if there are too many*/
uint32_t child_num = lv_obj_get_child_num(notice_h);
if(child_num > LV_APP_NOTICE_MAX_NUM) {
lv_obj_t * last_child = ll_get_tail(&notice_h->child_ll);
lv_obj_del(last_child);
}
/*make sure the notices are on the top*/
lv_obj_set_parent(notice_h, lv_scr_act());
return mbox;
}
/**********************
* STATIC FUNCTIONS
**********************/
#endif

View File

@@ -1,72 +0,0 @@
/**
* @file lv_app_notice.h
*
*/
#ifndef LV_APP_NOTICE_H
#define LV_APP_NOTICE_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "../lv_app.h"
#include <stdarg.h>
#if USE_LV_APP_NOTICE != 0
/*********************
* DEFINES
*********************/
/*Add the required configurations*/
#ifndef LV_APP_NOTICE_SHOW_TIME
#define LV_APP_NOTICE_SHOW_TIME 4000
#endif
#ifndef LV_APP_NOTICE_CLOSE_ANIM_TIME
#define LV_APP_NOTICE_CLOSE_ANIM_TIME 300
#endif
#ifndef LV_APP_NOTICE_MAX_NUM
#define LV_APP_NOTICE_MAX_NUM 6
#endif
#ifndef LV_APP_NOTICE_MAX_LEN
#define LV_APP_NOTICE_MAX_LEN 256
#endif
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the Notifications
*/
void lv_app_notice_init(void);
/**
* Add a notification with a given text
* @param format pritntf-like format string
* @return pointer the notice which is a message box (lv_mbox) object
*/
lv_obj_t * lv_app_notice_add(const char * format, ...);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_APP_NOTICE_H*/

View File

@@ -1,698 +0,0 @@
/**
* @file lv_app_benchmark.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_benchmark.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_BENCHMARK != 0
#include "../lv_app/lv_app_util/lv_app_kb.h"
#include "lvgl/lv_obj/lv_refr.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
#define SHADOW_WIDTH (LV_DPI / 8)
#define IMG_RECOLOR OPA_30
#define OPACITY OPA_60
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
uint8_t wp :1;
uint8_t recolor :1;
uint8_t upscalse :1;
uint8_t shdw :1;
uint8_t opa :1;
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
lv_obj_t * wp;
lv_obj_t * value_l;
lv_style_t style_wp;
lv_style_t style_value_l;
lv_style_t style_btn_rel;
lv_style_t style_btn_pr;
lv_style_t style_btn_trel;
lv_style_t style_btn_tpr;
lv_style_t style_btn_ina;
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * label;
}my_sc_data_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec, lv_app_com_type_t type , const void * data, uint32_t size);
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc);
static void my_sc_close(lv_app_inst_t * app);
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win);
static void my_win_close(lv_app_inst_t * app);
static void refr_monitor(uint32_t time_ms, uint32_t px_num);
static lv_action_res_t run_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t wp_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t recolor_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t upscale_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t shadow_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t opa_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "Benchmark",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = my_win_open,
.win_close = my_win_close,
.sc_open = my_sc_open,
.sc_close = my_sc_close,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
static lv_style_t style_win_scrl;
static lv_style_t style_sc_btn_rel;
static lv_style_t style_sc_btn_pr;
static bool caputre_next;
static const color_int_t img_benchmark_bg[];
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_benchmark_init(void)
{
lv_refr_set_monitor_cb(refr_monitor);
lv_img_create_file("app_bm_wp", img_benchmark_bg);
lv_style_get(LV_STYLE_TRANSP, &style_win_scrl);
style_win_scrl.opad = 2 * SHADOW_WIDTH + SHADOW_WIDTH / 8 ;
style_win_scrl.hpad = SHADOW_WIDTH;
style_win_scrl.vpad = SHADOW_WIDTH;
lv_style_get(LV_STYLE_BTN_REL, &style_sc_btn_rel);
style_sc_btn_rel.font = font_get(LV_IMG_DEF_SYMBOL_FONT);
lv_style_get(LV_STYLE_BTN_PR, &style_sc_btn_pr);
style_sc_btn_pr.font = font_get(LV_IMG_DEF_SYMBOL_FONT);
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_benchmark_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
/*Initialize the application*/
my_app_data_t * ad = app->app_data;
ad->opa = 0;
ad->recolor = 0;
ad->shdw = 0;
ad->upscalse = 0;
ad->wp = 0;
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
}
/**
* Read the data have been sent to this application
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
if(type == LV_APP_COM_TYPE_CHAR) { /*data: string*/
my_sc_data_t * sc_data = app_rec->sc_data;
if (sc_data->label != NULL) {
lv_label_set_text_array(sc_data->label, data, size);
lv_obj_align(sc_data->label , NULL,LV_ALIGN_CENTER, 0, 0);
}
}
}
/**
* Open a shortcut for an application
* @param app pointer to an application
* @param sc pointer to an object where the application
* can create content of the shortcut
*/
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
{
my_sc_data_t * sc_data = app->sc_data;
lv_cont_set_layout(sc, LV_CONT_LAYOUT_CENTER);
sc_data->label = lv_label_create(sc, NULL);
lv_label_set_text(sc_data->label, "N/A ms");
lv_obj_t * btn = lv_btn_create(sc, NULL);
lv_btn_set_rel_action(btn, run_rel_action);
lv_cont_set_fit(btn, true, true);
lv_btn_set_styles(btn, &style_sc_btn_rel, &style_sc_btn_pr, NULL, NULL, NULL);
lv_obj_t * btn_l = lv_label_create(btn, NULL);
lv_label_set_text(btn_l, SYMBOL_PLAY);
}
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
static void my_sc_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_sc_data'*/
}
/**
* Open the application in a window
* @param app pointer to an application
* @param win pointer to a window object where
* the application can create content
*/
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{
my_win_data_t * wdata = app->win_data;
my_app_data_t * adata = app->app_data;
lv_style_get(LV_STYLE_BTN_INA, &wdata->style_value_l);
wdata->style_value_l.ccolor = COLOR_BLACK;
lv_style_get(LV_STYLE_BTN_REL, &wdata->style_btn_rel);
lv_style_get(LV_STYLE_BTN_PR, &wdata->style_btn_pr);
lv_style_get(LV_STYLE_BTN_TREL, &wdata->style_btn_trel);
lv_style_get(LV_STYLE_BTN_TPR, &wdata->style_btn_tpr);
lv_style_get(LV_STYLE_BTN_INA, &wdata->style_btn_ina);
lv_style_get(LV_STYLE_PLAIN, &wdata->style_wp);
wdata->style_wp.ccolor = COLOR_RED;//MAKE(0x10, 0x20, 0x30);
if(adata->opa == 0) {
wdata->style_btn_rel.opa = OPA_COVER;
wdata->style_btn_pr.opa = OPA_COVER;
wdata->style_btn_trel.opa =OPA_COVER;
wdata->style_btn_tpr.opa = OPA_COVER;
wdata->style_btn_ina.opa = OPA_COVER;
} else {
wdata->style_btn_rel.opa = OPACITY;
wdata->style_btn_pr.opa = OPACITY;
wdata->style_btn_trel.opa =OPACITY;
wdata->style_btn_tpr.opa = OPACITY;
wdata->style_btn_ina.opa = OPACITY;
}
if(adata->shdw == 0) {
wdata->style_btn_rel.swidth = 0;
wdata->style_btn_pr.swidth = 0;
wdata->style_btn_trel.swidth = 0;
wdata->style_btn_tpr.swidth = 0;
wdata->style_btn_ina.swidth = 0;
} else {
wdata->style_btn_rel.swidth = SHADOW_WIDTH;
wdata->style_btn_pr.swidth = SHADOW_WIDTH;
wdata->style_btn_trel.swidth = SHADOW_WIDTH;
wdata->style_btn_tpr.swidth = SHADOW_WIDTH;
wdata->style_btn_ina.swidth = SHADOW_WIDTH;
}
if(adata->recolor == 0) {
wdata->style_wp.img_recolor = OPA_TRANSP;
} else {
wdata->style_wp.img_recolor = IMG_RECOLOR;
}
lv_obj_set_style(lv_page_get_scrl(lv_win_get_page(win)), &style_win_scrl);
wdata->wp = lv_img_create(win, NULL);
lv_obj_set_protect(wdata->wp, LV_PROTECT_PARENT);
lv_obj_set_parent(wdata->wp, lv_win_get_page(win));
lv_img_set_file(wdata->wp, "U:/app_bm_wp");
lv_obj_set_size(wdata->wp, LV_HOR_RES, LV_VER_RES - lv_obj_get_height(lv_win_get_header(win)));
lv_obj_set_pos(wdata->wp, 0, 0);
lv_obj_set_style(wdata->wp, &wdata->style_wp);
lv_img_set_auto_size(wdata->wp, false);
if(adata->wp == 0) lv_obj_set_hidden(wdata->wp, true);
if(adata->upscalse != 0) lv_img_set_upscale(wdata->wp, true);
/* The order is changed because the wallpaper's parent change
* Therefore add the scrollable again */
lv_obj_set_parent(lv_page_get_scrl(lv_win_get_page(win)), lv_win_get_page(win));
lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY);
lv_obj_t * holder;
holder = lv_cont_create(win, NULL);
lv_cont_set_fit(holder, true, true);
lv_obj_set_style(holder, &wdata->style_btn_ina);
lv_page_glue_obj(holder, true);
wdata->value_l = lv_label_create(holder, NULL);
lv_obj_set_style(wdata->value_l, &wdata->style_value_l);
lv_label_set_text(wdata->value_l, "Screen load: N/A ms\nN/A px/ms");
lv_obj_t * btn;
btn = lv_btn_create(win, NULL);
lv_obj_set_free_p(btn, app);
lv_page_glue_obj(btn, true);
lv_cont_set_fit(btn, true, true);
lv_btn_set_styles(btn, &wdata->style_btn_rel, &wdata->style_btn_pr, &wdata->style_btn_trel, &wdata->style_btn_tpr, NULL);
lv_btn_set_rel_action(btn, run_rel_action);
lv_obj_t * btn_l;
btn_l = lv_label_create(btn, NULL);
lv_label_set_text(btn_l, "Run\ntest!");
lv_obj_set_protect(btn, LV_PROTECT_FOLLOW);
btn = lv_btn_create(win, btn);
lv_btn_set_tgl(btn, true);
lv_obj_clr_protect(btn, LV_PROTECT_FOLLOW);
if(adata->wp != 0) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
else lv_btn_set_state(btn, LV_BTN_STATE_REL);
lv_btn_set_rel_action(btn, wp_rel_action);
btn_l = lv_label_create(btn, btn_l);
lv_label_set_text(btn_l, "Wallpaper");
btn = lv_btn_create(win, btn);
if(adata->recolor != 0) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
else lv_btn_set_state(btn, LV_BTN_STATE_REL);
lv_btn_set_rel_action(btn, recolor_rel_action);
btn_l = lv_label_create(btn, btn_l);
lv_label_set_text(btn_l, "Wp. recolor!");
btn = lv_btn_create(win, btn);
if(adata->upscalse != 0) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
else lv_btn_set_state(btn, LV_BTN_STATE_REL);
lv_btn_set_rel_action(btn, upscale_rel_action);
btn_l = lv_label_create(btn, btn_l);
lv_label_set_text(btn_l, "Wp. upscalse!");
btn = lv_btn_create(win, btn);
if(adata->shdw != 0) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
else lv_btn_set_state(btn, LV_BTN_STATE_REL);
lv_btn_set_rel_action(btn, shadow_rel_action);
btn_l = lv_label_create(btn, btn_l);
lv_label_set_text(btn_l, "Shadow");
btn = lv_btn_create(win, btn);
if(adata->opa != 0) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
else lv_btn_set_state(btn, LV_BTN_STATE_REL);
lv_btn_set_rel_action(btn, opa_rel_action);
btn_l = lv_label_create(btn, btn_l);
lv_label_set_text(btn_l, "Opacity");
}
/**
* Close the window of an application
* @param app pointer to an application
*/
static void my_win_close(lv_app_inst_t * app)
{
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
static void refr_monitor(uint32_t time_ms, uint32_t px_num)
{
if(caputre_next != false) {
lv_app_inst_t * app = NULL;
app = lv_app_get_next(app, &my_app_dsc);
char w_buf[256];
if(time_ms != 0) sprintf(w_buf, "Screen load: %d ms\n%d px/ms", time_ms, px_num/time_ms);
else sprintf(w_buf, "Screen load: %d ms\nN/A px/ms", time_ms);
char s_buf[16];
sprintf(s_buf, "%d ms", time_ms);
while(app != NULL) {
if(app->win_data != NULL) {
my_win_data_t * wdata = app->win_data;
lv_label_set_text(wdata->value_l, w_buf);
}
if(app->sc_data != NULL) {
my_sc_data_t * sdata = app->sc_data;
lv_label_set_text(sdata->label, s_buf);
}
app = lv_app_get_next(app, &my_app_dsc);
}
caputre_next = false;
}
}
static lv_action_res_t run_rel_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_obj_inv(lv_scr_act());
caputre_next = true;
return LV_ACTION_RES_OK;
}
static lv_action_res_t wp_rel_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(btn);
my_win_data_t * wdata = app->win_data;
my_app_data_t * adata = app->app_data;
if(lv_btn_get_state(btn) == LV_BTN_STATE_TREL) {
adata->wp = 1;
lv_obj_set_hidden(wdata->wp, false);
} else {
adata->wp = 0;
lv_obj_set_hidden(wdata->wp, true);
}
return LV_ACTION_RES_OK;
}
static lv_action_res_t recolor_rel_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(btn);
my_win_data_t * wdata = app->win_data;
my_app_data_t * adata = app->app_data;
if(lv_btn_get_state(btn) == LV_BTN_STATE_TREL) {
adata->recolor = 1;
wdata->style_wp.img_recolor = IMG_RECOLOR;
} else {
adata->recolor = 0;
wdata->style_wp.img_recolor = OPA_TRANSP;
}
lv_obj_refr_style(wdata->wp);
return LV_ACTION_RES_OK;
}
static lv_action_res_t upscale_rel_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(btn);
my_win_data_t * wdata = app->win_data;
my_app_data_t * adata = app->app_data;
if(lv_btn_get_state(btn) == LV_BTN_STATE_TREL) {
adata->upscalse = 1;
lv_img_set_upscale(wdata->wp, true);
} else {
adata->upscalse = 0;
lv_img_set_upscale(wdata->wp, false);
}
lv_obj_set_size(wdata->wp, LV_HOR_RES, LV_VER_RES - lv_obj_get_height(lv_win_get_header(app->win)));
return LV_ACTION_RES_OK;
}
static lv_action_res_t shadow_rel_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(btn);
my_win_data_t * wdata = app->win_data;
my_app_data_t * adata = app->app_data;
if(lv_btn_get_state(btn) == LV_BTN_STATE_TREL) {
adata->shdw = 1;
wdata->style_btn_rel.swidth = SHADOW_WIDTH;
wdata->style_btn_pr.swidth = SHADOW_WIDTH;
wdata->style_btn_trel.swidth = SHADOW_WIDTH;
wdata->style_btn_tpr.swidth = SHADOW_WIDTH;
wdata->style_btn_ina.swidth = SHADOW_WIDTH;
} else {
adata->shdw = 0;
wdata->style_btn_rel.swidth = 0;
wdata->style_btn_pr.swidth = 0;
wdata->style_btn_trel.swidth =0;
wdata->style_btn_tpr.swidth = 0;
wdata->style_btn_ina.swidth = 0;
}
lv_style_refr_objs(&wdata->style_btn_rel);
lv_style_refr_objs(&wdata->style_btn_pr);
lv_style_refr_objs(&wdata->style_btn_trel);
lv_style_refr_objs(&wdata->style_btn_tpr);
lv_style_refr_objs(&wdata->style_btn_ina);
return LV_ACTION_RES_OK;
}
static lv_action_res_t opa_rel_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(btn);
my_win_data_t * wdata = app->win_data;
my_app_data_t * adata = app->app_data;
if(lv_btn_get_state(btn) == LV_BTN_STATE_TREL) {
adata->opa = 1;
wdata->style_btn_rel.opa = OPACITY;
wdata->style_btn_pr.opa = OPACITY;
wdata->style_btn_trel.opa =OPACITY;
wdata->style_btn_tpr.opa = OPACITY;
wdata->style_btn_ina.opa = OPACITY;
} else {
adata->opa = 0;
wdata->style_btn_rel.opa = OPA_COVER;
wdata->style_btn_pr.opa = OPA_COVER;
wdata->style_btn_trel.opa =OPA_COVER;
wdata->style_btn_tpr.opa = OPA_COVER;
wdata->style_btn_ina.opa = OPA_COVER;
}
lv_style_refr_objs(&wdata->style_btn_rel);
lv_style_refr_objs(&wdata->style_btn_pr);
lv_style_refr_objs(&wdata->style_btn_trel);
lv_style_refr_objs(&wdata->style_btn_tpr);
lv_style_refr_objs(&wdata->style_btn_ina);
return LV_ACTION_RES_OK;
}
/*Exceptionally store the data because the big array would be bothering*/
#if COLOR_DEPTH == 8
static const color_int_t img_benchmark_bg[] = {
/*HEADER
Width = 40
Height = 40
Transp: 0
Color depth: 8*/
40, 128, 2, 2,
/*IMAGE DATA*/
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 5, 0, 5, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 5, 5, 0, 5, 5, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 5, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 5, 0, 0, 5, 5, 5, 5, 5, 5, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 0, 0, 0, 5, 5, 5, 0, 5, 5, 5, 5, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 0, 5, 5, 5, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 0, 5, 5, 5, 0, 5, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 5, 5, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 0, 5, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 5, 5, 5, 5, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0, 0, 5, 5, 5, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
#endif /*COLOR_DEPTH*/
#if COLOR_DEPTH == 16
static const color_int_t img_benchmark_bg[] = {
/*HEADER
Width = 40
Height = 40
Transp: 0
Color depth: 16*/
32808, 1026,
/*IMAGE DATA*/
32, 32, 32, 2113, 2113, 4258, 6339, 4258, 4258, 4226, 4226, 2145, 4226, 2113, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 2145, 2145, 4226, 4226, 4226, 4226, 4226, 2145, 32, 32, 32, 32,
0, 32, 2113, 32, 6339, 10565, 8452, 4258, 4226, 4226, 2145, 4226, 6339, 4226, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 2145, 4226, 2145, 2145, 4226, 4226, 4226, 6371, 6339, 4226, 32, 32, 32,
32, 32, 2113, 4226, 8484, 8484, 8452, 6371, 4226, 2145, 4226, 4258, 4258, 4258, 2145, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 32, 2145, 4226, 4226, 4226, 4226, 2145, 2145, 4226, 6339, 4258, 4258, 4226, 32, 32,
32, 32, 4258, 6371, 8452, 6371, 6371, 6339, 4226, 2145, 4226, 4226, 2145, 4226, 4226, 2113, 32, 0, 0, 0, 0, 32, 0, 0, 32, 2113, 2145, 2145, 2145, 4226, 4226, 4226, 2145, 4226, 6339, 4226, 6371, 6339, 2145, 32,
2113, 2145, 6371, 6339, 4226, 4226, 4226, 4226, 4258, 4258, 4226, 2145, 4226, 2145, 2145, 4226, 4258, 32, 0, 0, 0, 0, 0, 2113, 6339, 4226, 2113, 2145, 2145, 2145, 4226, 4226, 4258, 4226, 4258, 4258, 4258, 6339, 6339, 2145,
4226, 4258, 6339, 4226, 4226, 2145, 2145, 2145, 4226, 4226, 4226, 2145, 2145, 2145, 4226, 6339, 8452, 6339, 32, 0, 0, 0, 2113, 6339, 6371, 6339, 2145, 2113, 2145, 2145, 4226, 4226, 4226, 4226, 4226, 4226, 4226, 4258, 4258, 4226,
4226, 4226, 2145, 4226, 2145, 2145, 4226, 4226, 2145, 4226, 4226, 4226, 2145, 4226, 6371, 6371, 6371, 8452, 4258, 32, 0, 2113, 6371, 6371, 6371, 6339, 6339, 2145, 2145, 4226, 2145, 2145, 2145, 4226, 4258, 4226, 4226, 4226, 2145, 4226,
4226, 2145, 4226, 2145, 2145, 4226, 4226, 4226, 4226, 4226, 2145, 2145, 4258, 6371, 8452, 6371, 6371, 6371, 8452, 6339, 2145, 6339, 8452, 6371, 6339, 6371, 6371, 6339, 4226, 2145, 2145, 2145, 2145, 2145, 4258, 4258, 2145, 2145, 2145, 2145,
4226, 2145, 4226, 2113, 2145, 4226, 4258, 4226, 2145, 2145, 2145, 4258, 6371, 8452, 6371, 6339, 6371, 6371, 8452, 8452, 6339, 8452, 8452, 8452, 6371, 6371, 8452, 8452, 6339, 4226, 2145, 2145, 2145, 2145, 4226, 4258, 2145, 2113, 2145, 2145,
2145, 2145, 2113, 2145, 4226, 4226, 4226, 2145, 2145, 2113, 4226, 6339, 6371, 6371, 6371, 6371, 6371, 8452, 6371, 8452, 8452, 6371, 8452, 8452, 6339, 6371, 8452, 8452, 8452, 6371, 4226, 2145, 4226, 4226, 4226, 4226, 4226, 4226, 2145, 4226,
4226, 4226, 2145, 4226, 4226, 2145, 4226, 2145, 2113, 2145, 6339, 6371, 6371, 8452, 8452, 8452, 8484, 8452, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 6339, 2145, 2145, 4226, 4226, 2145, 4226, 4226, 2145, 4226,
2145, 4226, 4258, 2145, 2145, 2145, 2113, 2145, 4226, 6339, 6371, 6371, 6371, 8452, 8484, 8484, 8452, 6371, 6371, 6371, 6371, 6371, 6371, 8452, 6371, 6339, 6371, 6371, 6371, 8452, 8452, 6339, 4226, 2145, 2145, 4226, 4226, 2145, 4226, 2145,
32, 2113, 4226, 4226, 2145, 2145, 2113, 2145, 8452, 8452, 6371, 6371, 6339, 8484, 8484, 8484, 8484, 8452, 6371, 6339, 6371, 6371, 6371, 6371, 6371, 6371, 6339, 6339, 6339, 6339, 8452, 8484, 6371, 2145, 2145, 4226, 2145, 4226, 4226, 2113,
0, 0, 2145, 4226, 4226, 4226, 4258, 6371, 6371, 8452, 6371, 6339, 6339, 8452, 8484, 8452, 8452, 8452, 6371, 6371, 8452, 8452, 8452, 6371, 6371, 6339, 6371, 6339, 6371, 6371, 8452, 8452, 8484, 8452, 4226, 4226, 4258, 4258, 2113, 32,
0, 0, 32, 2113, 2145, 6339, 8452, 8452, 6339, 6339, 8452, 6371, 6339, 6371, 10565, 8484, 8452, 8484, 8452, 6371, 6339, 8452, 8452, 6371, 6371, 6339, 6371, 6371, 6371, 8452, 8452, 8452, 8484, 10565, 6371, 4258, 4226, 2145, 32, 0,
0, 0, 0, 0, 2113, 6339, 8452, 6371, 6371, 6339, 6371, 8452, 6371, 6371, 8452, 8484, 8452, 8452, 8484, 8452, 4258, 8452, 8452, 6339, 6339, 6339, 6339, 6371, 6371, 6371, 6371, 8452, 8452, 8452, 8484, 8452, 2113, 0, 0, 32,
0, 0, 0, 0, 0, 4258, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 8452, 8484, 8452, 2145, 32, 4226, 6371, 6371, 6371, 6339, 6371, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 8452, 4226, 32, 0, 0, 32,
0, 0, 0, 0, 0, 0, 4226, 8452, 6371, 6371, 6371, 6339, 6371, 8452, 8452, 8452, 8484, 8452, 2145, 0, 0, 0, 4226, 8452, 6371, 6371, 6371, 6339, 6339, 6371, 6371, 6371, 8452, 8484, 4258, 0, 32, 32, 32, 0,
0, 0, 0, 0, 0, 0, 32, 4258, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 8452, 8452, 2145, 0, 0, 32, 0, 0, 4226, 6371, 6371, 6339, 6339, 6371, 6371, 6371, 6371, 6371, 2145, 0, 0, 32, 32, 32, 0,
0, 0, 0, 0, 0, 0, 0, 32, 6339, 6371, 6371, 6371, 6371, 8452, 8484, 8452, 4226, 32, 0, 0, 0, 0, 0, 0, 4226, 6339, 6339, 6339, 6371, 6371, 6371, 6371, 4226, 0, 32, 32, 32, 32, 0, 0,
0, 0, 0, 0, 0, 0, 0, 2113, 6339, 6371, 6371, 6371, 6371, 8452, 8484, 8484, 4258, 32, 0, 0, 0, 0, 0, 32, 4258, 6339, 6339, 6371, 6371, 6371, 8452, 8452, 4258, 32, 32, 32, 32, 32, 0, 32,
0, 0, 0, 32, 0, 0, 2113, 6339, 8484, 8452, 6371, 6371, 8452, 8484, 8484, 8484, 8452, 4226, 0, 0, 0, 0, 32, 6339, 8452, 6371, 6371, 6371, 6371, 6371, 8452, 8452, 8484, 6371, 2113, 32, 32, 32, 32, 32,
0, 0, 0, 0, 0, 2113, 6339, 8452, 8484, 8484, 8452, 6371, 8452, 10597, 8452, 8452, 8452, 6371, 4226, 0, 0, 32, 4258, 8452, 8452, 8452, 8452, 6371, 6339, 6371, 6371, 6371, 8484, 8484, 6339, 2113, 0, 32, 32, 32,
0, 0, 0, 0, 2113, 6371, 8452, 8452, 8452, 8452, 8452, 8452, 8484, 10597, 8452, 8452, 6371, 8452, 8452, 4258, 2113, 6339, 8452, 8452, 8452, 6371, 8452, 8452, 8452, 8452, 6371, 6371, 8452, 8484, 8484, 6371, 2113, 32, 32, 32,
0, 0, 0, 32, 2145, 6339, 8484, 8452, 8452, 8452, 8452, 8452, 8484, 8484, 8452, 8452, 6371, 8452, 8452, 10565, 8484, 8452, 8484, 8452, 8452, 6371, 8452, 8484, 8452, 8484, 8452, 6371, 8484, 8484, 10597, 6371, 6339, 2145, 0, 32,
0, 0, 0, 2145, 4226, 2145, 6339, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8452, 8484, 8452, 8452, 8452, 8452, 8452, 6371, 8452, 8452, 8452, 8484, 8484, 8484, 8484, 12678, 6371, 4226, 6371, 4258, 32, 0,
0, 32, 2145, 4226, 4226, 2145, 2145, 6339, 8484, 10565, 8452, 8452, 8452, 8452, 8484, 8484, 8452, 8452, 6371, 6371, 6371, 6339, 8452, 8452, 8452, 8452, 6371, 8452, 8484, 8484, 8452, 8484, 10565, 8484, 4258, 4226, 6339, 6339, 2145, 32,
2113, 4226, 4258, 4226, 4226, 4226, 2145, 2145, 8452, 8484, 8452, 6371, 8452, 8452, 8484, 8452, 8452, 6371, 6339, 6339, 6339, 6371, 6371, 8452, 8452, 8452, 6371, 6371, 6339, 8452, 8484, 8484, 6371, 4226, 4258, 6339, 4226, 4258, 6339, 4226,
2145, 2145, 4226, 4226, 4226, 4226, 2145, 2145, 2145, 10565, 8452, 8452, 8452, 6371, 8452, 8452, 8452, 6371, 8452, 6371, 6339, 6371, 6371, 6371, 8452, 6371, 6371, 6339, 6339, 6371, 6371, 6339, 4226, 4258, 4226, 6339, 6339, 4258, 6339, 4226,
2145, 2145, 2113, 4226, 4226, 4226, 4226, 4226, 2145, 4226, 6339, 6371, 6371, 8452, 8452, 8452, 8452, 8452, 6371, 6371, 6371, 6339, 8452, 8452, 8452, 8452, 8452, 8452, 6371, 6371, 4258, 2145, 4226, 4258, 6339, 4258, 4258, 4226, 4226, 4258,
2145, 2145, 2145, 2145, 2145, 4226, 4226, 4226, 4226, 2145, 2145, 6371, 8484, 8452, 8452, 8452, 8452, 8452, 8452, 6371, 6371, 6371, 8452, 8484, 8452, 8452, 8452, 8484, 8484, 6339, 2145, 2145, 4226, 4226, 4258, 6339, 4226, 2145, 4226, 4226,
2145, 2145, 4226, 4226, 4226, 4258, 4226, 4258, 4258, 4226, 2145, 4226, 6371, 8452, 8452, 6371, 8452, 8452, 8452, 8452, 6339, 8452, 8452, 8452, 8484, 10565, 8452, 8484, 6371, 4226, 4226, 4258, 6339, 6339, 6339, 6339, 4226, 2145, 2145, 4226,
2145, 2145, 2145, 4226, 4226, 6339, 6339, 6339, 4226, 4226, 4226, 2145, 4258, 6339, 8452, 8452, 8452, 8452, 8484, 4258, 2113, 6339, 8452, 8452, 8452, 8484, 8452, 6339, 4258, 4226, 6339, 6339, 6339, 6339, 6339, 6339, 4226, 2145, 2145, 4258,
2145, 4226, 4226, 4226, 4258, 4226, 6371, 6339, 4226, 4226, 4226, 4226, 2145, 4226, 6339, 8452, 8452, 8452, 4258, 32, 0, 2113, 6339, 8484, 10565, 8484, 6339, 4226, 4258, 6339, 6339, 6339, 6339, 4258, 4226, 2145, 4258, 4226, 4226, 4258,
2145, 4226, 4258, 4258, 4226, 4226, 4226, 4258, 6339, 4258, 4226, 2145, 2145, 2145, 4226, 6371, 8452, 4226, 32, 0, 0, 0, 32, 6371, 10565, 8452, 4226, 4226, 4258, 4258, 6339, 6339, 6371, 4226, 2145, 4226, 4226, 4226, 4258, 4226,
32, 2113, 6339, 4258, 4258, 4226, 4226, 4226, 4258, 4258, 4226, 4226, 4226, 4226, 4226, 4226, 4226, 32, 0, 0, 0, 0, 0, 2113, 8452, 6339, 4258, 4226, 4226, 4226, 4258, 6339, 4258, 4258, 4226, 4258, 6339, 4258, 4226, 2113,
0, 0, 2113, 4258, 4258, 4258, 4258, 4226, 2145, 2145, 4226, 4226, 4226, 4258, 4258, 2113, 32, 32, 32, 32, 32, 0, 32, 2113, 2145, 4258, 6371, 6339, 4258, 6339, 4258, 4226, 4258, 8484, 6371, 8452, 8484, 6339, 2113, 0,
0, 0, 0, 2113, 6339, 6339, 4258, 4226, 2145, 2145, 2145, 4226, 6339, 4258, 2145, 32, 32, 32, 32, 32, 0, 0, 32, 32, 2113, 2145, 6339, 8452, 8452, 4258, 4226, 4258, 6339, 8484, 10565, 10597, 8452, 2145, 32, 0,
0, 0, 0, 0, 4258, 6371, 6339, 4226, 4226, 2145, 2145, 4226, 4258, 4226, 32, 0, 32, 32, 32, 32, 0, 32, 0, 32, 32, 32, 2145, 8452, 8452, 4258, 4226, 4226, 4258, 8484, 8452, 8484, 4226, 0, 0, 0,
0, 0, 0, 0, 32, 4226, 4258, 6339, 4226, 4226, 4226, 4226, 2145, 32, 32, 0, 0, 32, 32, 32, 0, 0, 0, 0, 32, 2113, 2113, 2145, 4226, 4226, 4226, 4226, 6339, 6371, 4226, 2145, 32, 0, 0, 0,
};
#endif /*COLOR_DEPTH == 16*/
#if COLOR_DEPTH == 24
static const color_int_t img_benchmark_bg[] = {
/*HEADER
Width = 40
Height = 40
Transp: 0
Color depth: 24*/
100827176,
/*IMAGE DATA*/
263172, 460551, 460551, 526344, 723723, 1447446, 1644825, 1447446, 1447446, 1052688, 1052688, 921102, 1052688, 723723, 263172, 197379, 131586, 65793, 65793, 0, 65793, 0, 65793, 65793, 65793, 65793, 65793, 328965, 789516, 855309, 1250067, 1052688, 1052688, 1184274, 1184274, 986895, 394758, 394758, 394758, 328965,
131586, 460551, 526344, 394758, 1776411, 2631720, 2105376, 1447446, 1250067, 1052688, 855309, 1052688, 1579032, 1250067, 460551, 65793, 65793, 65793, 65793, 65793, 0, 65793, 65793, 0, 0, 0, 328965, 986895, 1184274, 789516, 921102, 1250067, 1052688, 1052688, 1842204, 1644825, 1052688, 328965, 263172, 328965,
394758, 460551, 526344, 1052688, 2434341, 2434341, 2236962, 1907997, 1052688, 855309, 1052688, 1315860, 1381653, 1447446, 855309, 263172, 0, 0, 131586, 131586, 131586, 131586, 131586, 65793, 0, 263172, 855309, 1052688, 1052688, 1052688, 1118481, 921102, 986895, 1052688, 1579032, 1513239, 1513239, 1118481, 394758, 328965,
263172, 460551, 1447446, 1842204, 2171169, 1973790, 1973790, 1776411, 1052688, 986895, 1184274, 1250067, 921102, 1118481, 1118481, 723723, 263172, 0, 65793, 131586, 197379, 263172, 131586, 131586, 328965, 657930, 921102, 855309, 921102, 1052688, 1052688, 1052688, 855309, 1250067, 1579032, 1250067, 1842204, 1710618, 986895, 263172,
657930, 921102, 1842204, 1776411, 1250067, 1118481, 1052688, 1118481, 1315860, 1381653, 1052688, 855309, 1052688, 855309, 921102, 1184274, 1381653, 394758, 65793, 131586, 131586, 131586, 65793, 526344, 1579032, 1052688, 723723, 789516, 855309, 921102, 1052688, 1184274, 1315860, 1052688, 1315860, 1447446, 1513239, 1710618, 1644825, 855309,
1052688, 1315860, 1710618, 1250067, 1052688, 986895, 921102, 921102, 1052688, 1052688, 1184274, 855309, 855309, 921102, 1052688, 1776411, 2302755, 1644825, 394758, 0, 131586, 131586, 657930, 1776411, 1907997, 1710618, 855309, 723723, 855309, 986895, 1052688, 1052688, 1184274, 1184274, 1052688, 1184274, 1250067, 1513239, 1447446, 1184274,
1184274, 1052688, 986895, 1052688, 921102, 986895, 1184274, 1052688, 921102, 1052688, 1052688, 1052688, 986895, 1118481, 1907997, 1907997, 1973790, 2171169, 1513239, 394758, 65793, 657930, 1973790, 1973790, 1842204, 1776411, 1579032, 855309, 789516, 1052688, 986895, 986895, 986895, 1250067, 1315860, 1118481, 1250067, 1118481, 986895, 1118481,
1250067, 986895, 1052688, 855309, 986895, 1250067, 1184274, 1052688, 1052688, 1052688, 986895, 921102, 1315860, 1973790, 2105376, 1842204, 1842204, 1973790, 2171169, 1579032, 789516, 1710618, 2105376, 1973790, 1776411, 1907997, 1973790, 1710618, 1118481, 855309, 855309, 855309, 921102, 986895, 1315860, 1381653, 986895, 855309, 789516, 986895,
1250067, 855309, 1052688, 657930, 986895, 1118481, 1315860, 1118481, 986895, 986895, 855309, 1381653, 1907997, 2105376, 1842204, 1776411, 1842204, 1907997, 2105376, 2171169, 1776411, 2105376, 2236962, 2105376, 1842204, 1973790, 2171169, 2236962, 1776411, 1052688, 855309, 986895, 921102, 921102, 1118481, 1513239, 921102, 657930, 921102, 855309,
986895, 855309, 657930, 855309, 1052688, 1118481, 1118481, 986895, 855309, 657930, 1052688, 1776411, 1907997, 1907997, 1973790, 1907997, 1907997, 2171169, 1973790, 2236962, 2171169, 1973790, 2105376, 2105376, 1776411, 1973790, 2236962, 2236962, 2302755, 1842204, 1118481, 855309, 1052688, 1052688, 1052688, 1184274, 1118481, 1052688, 921102, 1052688,
1250067, 1250067, 855309, 1052688, 1052688, 986895, 1052688, 855309, 657930, 855309, 1710618, 1907997, 1907997, 2105376, 2171169, 2302755, 2368548, 2105376, 1973790, 1907997, 1842204, 1842204, 1907997, 1907997, 1842204, 1907997, 1973790, 1973790, 2171169, 2302755, 1776411, 855309, 855309, 1052688, 1052688, 986895, 1184274, 1184274, 855309, 1052688,
986895, 1052688, 1315860, 855309, 855309, 855309, 723723, 789516, 1052688, 1710618, 1973790, 1842204, 1973790, 2302755, 2434341, 2434341, 2302755, 1973790, 1842204, 1842204, 1842204, 1973790, 1907997, 2236962, 1907997, 1776411, 1907997, 1907997, 1973790, 2105376, 2236962, 1776411, 1052688, 855309, 855309, 1184274, 1052688, 986895, 1184274, 986895,
328965, 657930, 1052688, 1052688, 855309, 855309, 723723, 921102, 2105376, 2236962, 1907997, 1973790, 1710618, 2368548, 2434341, 2434341, 2368548, 2236962, 1842204, 1710618, 1842204, 1842204, 1907997, 1973790, 1907997, 1842204, 1776411, 1710618, 1776411, 1776411, 2171169, 2368548, 1907997, 855309, 986895, 1052688, 986895, 1118481, 1052688, 723723,
131586, 131586, 855309, 1118481, 1052688, 1118481, 1447446, 1907997, 1842204, 2105376, 1907997, 1776411, 1776411, 2171169, 2500134, 2171169, 2171169, 2236962, 1907997, 1907997, 2105376, 2105376, 2171169, 1973790, 1842204, 1776411, 1842204, 1776411, 1842204, 1842204, 2171169, 2105376, 2434341, 2105376, 1118481, 1052688, 1381653, 1315860, 657930, 328965,
65793, 131586, 263172, 657930, 855309, 1579032, 2236962, 2171169, 1776411, 1776411, 2105376, 1842204, 1776411, 1973790, 2631720, 2434341, 2302755, 2368548, 2105376, 1842204, 1776411, 2236962, 2171169, 1842204, 1842204, 1776411, 1842204, 1842204, 1842204, 2105376, 2105376, 2105376, 2500134, 2631720, 1907997, 1381653, 1052688, 789516, 263172, 197379,
65793, 131586, 131586, 131586, 526344, 1644825, 2105376, 1842204, 1907997, 1776411, 1907997, 2105376, 1842204, 1973790, 2105376, 2368548, 2236962, 2302755, 2368548, 2171169, 1513239, 2105376, 2171169, 1776411, 1644825, 1710618, 1644825, 1842204, 1973790, 1973790, 1842204, 2105376, 2236962, 2236962, 2565927, 2105376, 657930, 131586, 131586, 328965,
65793, 131586, 197379, 131586, 197379, 1315860, 1973790, 1973790, 1907997, 1907997, 1907997, 1842204, 1842204, 1973790, 2171169, 2236962, 2302755, 2434341, 2302755, 855309, 263172, 1184274, 1842204, 1973790, 1842204, 1710618, 1907997, 1842204, 1842204, 1973790, 1973790, 1842204, 2105376, 2302755, 2105376, 1184274, 328965, 197379, 131586, 263172,
65793, 131586, 131586, 65793, 0, 197379, 1250067, 2105376, 1973790, 1907997, 1973790, 1776411, 1842204, 2236962, 2171169, 2105376, 2500134, 2171169, 789516, 131586, 197379, 197379, 1184274, 2171169, 1907997, 1907997, 1842204, 1710618, 1710618, 1842204, 1907997, 1842204, 2171169, 2368548, 1315860, 65793, 263172, 394758, 263172, 197379,
65793, 131586, 131586, 131586, 65793, 0, 263172, 1315860, 1907997, 1907997, 1842204, 1907997, 1973790, 2302755, 2302755, 2236962, 2171169, 855309, 131586, 131586, 263172, 131586, 197379, 1052688, 1973790, 1907997, 1710618, 1710618, 1907997, 1842204, 1907997, 1973790, 1973790, 986895, 131586, 197379, 394758, 394758, 263172, 131586,
65793, 197379, 65793, 131586, 131586, 131586, 65793, 394758, 1579032, 1907997, 1907997, 1907997, 1973790, 2171169, 2565927, 2171169, 1118481, 263172, 131586, 197379, 197379, 131586, 131586, 197379, 1118481, 1776411, 1776411, 1776411, 1842204, 1907997, 1973790, 1973790, 1052688, 131586, 263172, 328965, 394758, 328965, 197379, 197379,
131586, 131586, 131586, 197379, 131586, 131586, 131586, 592137, 1644825, 1973790, 1842204, 1973790, 1973790, 2236962, 2500134, 2368548, 1447446, 263172, 65793, 197379, 197379, 131586, 131586, 394758, 1447446, 1776411, 1776411, 1842204, 1907997, 1973790, 2105376, 2171169, 1513239, 394758, 328965, 460551, 460551, 328965, 197379, 263172,
197379, 197379, 197379, 328965, 197379, 131586, 592137, 1710618, 2368548, 2302755, 1907997, 1907997, 2236962, 2434341, 2368548, 2434341, 2236962, 1052688, 131586, 65793, 197379, 131586, 328965, 1579032, 2302755, 1973790, 1842204, 1842204, 1842204, 1907997, 2105376, 2302755, 2500134, 1907997, 657930, 394758, 394758, 394758, 394758, 328965,
131586, 131586, 131586, 197379, 131586, 526344, 1776411, 2302755, 2434341, 2368548, 2171169, 1842204, 2302755, 2894892, 2302755, 2236962, 2171169, 1907997, 1118481, 197379, 131586, 394758, 1513239, 2236962, 2171169, 2105376, 2105376, 1842204, 1710618, 1842204, 1907997, 1907997, 2368548, 2565927, 1644825, 592137, 197379, 394758, 328965, 328965,
65793, 131586, 131586, 65793, 526344, 1842204, 2302755, 2236962, 2302755, 2302755, 2105376, 2105376, 2434341, 2894892, 2302755, 2105376, 1973790, 2105376, 2105376, 1381653, 592137, 1644825, 2236962, 2302755, 2105376, 1973790, 2171169, 2171169, 2105376, 2105376, 1973790, 1973790, 2171169, 2565927, 2565927, 1973790, 657930, 460551, 460551, 263172,
0, 65793, 65793, 263172, 855309, 1776411, 2434341, 2105376, 2236962, 2105376, 2302755, 2302755, 2368548, 2368548, 2105376, 2105376, 1973790, 2171169, 2302755, 2829099, 2565927, 2302755, 2500134, 2105376, 2105376, 1842204, 2171169, 2368548, 2302755, 2368548, 2171169, 1907997, 2368548, 2500134, 2894892, 1842204, 1579032, 789516, 197379, 263172,
0, 0, 197379, 789516, 1052688, 921102, 1710618, 2302755, 2105376, 2171169, 2302755, 2236962, 2105376, 2105376, 2302755, 2171169, 2171169, 2302755, 2105376, 2434341, 2302755, 2171169, 2302755, 2105376, 2105376, 1973790, 2105376, 2302755, 2302755, 2368548, 2434341, 2368548, 2500134, 3158064, 1973790, 1118481, 1907997, 1315860, 328965, 131586,
65793, 263172, 986895, 1184274, 1052688, 855309, 921102, 1644825, 2368548, 2631720, 2302755, 2236962, 2171169, 2302755, 2565927, 2368548, 2105376, 2105376, 1907997, 1907997, 1973790, 1776411, 2105376, 2171169, 2171169, 2105376, 1907997, 2302755, 2500134, 2434341, 2236962, 2434341, 2829099, 2434341, 1513239, 1184274, 1644825, 1776411, 921102, 394758,
657930, 1052688, 1381653, 1184274, 1052688, 1052688, 855309, 855309, 2105376, 2368548, 2105376, 1973790, 2171169, 2302755, 2565927, 2302755, 2171169, 1907997, 1776411, 1710618, 1776411, 1973790, 1842204, 2105376, 2236962, 2105376, 1907997, 1842204, 1776411, 2236962, 2368548, 2500134, 1973790, 1184274, 1513239, 1710618, 1250067, 1381653, 1776411, 1118481,
855309, 921102, 1118481, 1118481, 1184274, 1052688, 986895, 855309, 855309, 2631720, 2105376, 2105376, 2105376, 1973790, 2236962, 2302755, 2105376, 1907997, 2171169, 1907997, 1710618, 1842204, 1842204, 1842204, 2236962, 1842204, 1842204, 1710618, 1776411, 1842204, 1842204, 1579032, 1118481, 1513239, 1250067, 1579032, 1579032, 1513239, 1644825, 1052688,
986895, 855309, 723723, 1052688, 1052688, 1052688, 1250067, 1052688, 986895, 1052688, 1644825, 1907997, 1973790, 2302755, 2236962, 2236962, 2236962, 2236962, 1973790, 1907997, 1907997, 1710618, 2105376, 2302755, 2105376, 2105376, 2105376, 2105376, 1973790, 1973790, 1315860, 789516, 1118481, 1513239, 1579032, 1381653, 1513239, 1118481, 1052688, 1315860,
855309, 855309, 855309, 855309, 986895, 1184274, 1052688, 1118481, 1052688, 921102, 855309, 1842204, 2368548, 2302755, 2236962, 2105376, 2105376, 2236962, 2171169, 1973790, 1907997, 1842204, 2105376, 2434341, 2236962, 2171169, 2302755, 2434341, 2500134, 1776411, 986895, 855309, 1118481, 1250067, 1513239, 1776411, 1184274, 855309, 1052688, 1118481,
855309, 789516, 1052688, 1052688, 1052688, 1381653, 1250067, 1315860, 1447446, 1052688, 855309, 1052688, 1973790, 2302755, 2105376, 1973790, 2105376, 2171169, 2302755, 2171169, 1710618, 2105376, 2171169, 2171169, 2500134, 2631720, 2105376, 2434341, 1907997, 1052688, 1118481, 1513239, 1579032, 1579032, 1776411, 1776411, 1184274, 789516, 986895, 1184274,
986895, 855309, 789516, 1052688, 1250067, 1644825, 1776411, 1579032, 1184274, 1052688, 1052688, 986895, 1315860, 1776411, 2171169, 2171169, 2105376, 2302755, 2368548, 1315860, 592137, 1710618, 2236962, 2236962, 2171169, 2500134, 2171169, 1710618, 1315860, 1184274, 1644825, 1776411, 1776411, 1776411, 1644825, 1579032, 1184274, 921102, 855309, 1315860,
921102, 1052688, 1052688, 1184274, 1315860, 1250067, 1842204, 1776411, 1250067, 1184274, 1118481, 1052688, 986895, 1052688, 1710618, 2302755, 2302755, 2302755, 1315860, 263172, 65793, 526344, 1644825, 2368548, 2631720, 2434341, 1644825, 1052688, 1315860, 1644825, 1579032, 1710618, 1579032, 1447446, 1052688, 921102, 1315860, 1118481, 1118481, 1315860,
855309, 1184274, 1513239, 1315860, 1052688, 1118481, 1184274, 1513239, 1579032, 1381653, 1118481, 986895, 986895, 986895, 1052688, 1907997, 2302755, 1184274, 263172, 131586, 131586, 131586, 460551, 1973790, 2829099, 2171169, 1052688, 1184274, 1315860, 1381653, 1644825, 1644825, 1842204, 1250067, 986895, 1184274, 1052688, 1250067, 1513239, 1250067,
394758, 657930, 1644825, 1381653, 1315860, 1184274, 1184274, 1184274, 1315860, 1381653, 1052688, 1052688, 1052688, 1184274, 1118481, 1118481, 1052688, 328965, 131586, 197379, 131586, 131586, 197379, 592137, 2105376, 1710618, 1447446, 1184274, 1052688, 1250067, 1447446, 1579032, 1513239, 1513239, 1250067, 1513239, 1579032, 1513239, 1118481, 592137,
197379, 197379, 657930, 1381653, 1513239, 1315860, 1315860, 1250067, 789516, 855309, 1250067, 1250067, 1052688, 1513239, 1315860, 657930, 328965, 328965, 328965, 263172, 263172, 197379, 328965, 526344, 855309, 1513239, 1973790, 1710618, 1315860, 1579032, 1381653, 1184274, 1447446, 2368548, 1907997, 2105376, 2500134, 1644825, 657930, 131586,
197379, 131586, 131586, 657930, 1710618, 1776411, 1447446, 1052688, 855309, 855309, 921102, 1118481, 1579032, 1447446, 855309, 328965, 328965, 394758, 328965, 263172, 131586, 197379, 263172, 460551, 657930, 789516, 1710618, 2236962, 2105376, 1447446, 1250067, 1381653, 1776411, 2368548, 2631720, 3026478, 2236962, 789516, 263172, 131586,
197379, 197379, 131586, 197379, 1381653, 1973790, 1579032, 1184274, 1052688, 921102, 855309, 1052688, 1447446, 1052688, 328965, 131586, 328965, 460551, 460551, 328965, 131586, 263172, 197379, 328965, 460551, 460551, 921102, 2236962, 2105376, 1447446, 1118481, 1250067, 1513239, 2434341, 2302755, 2565927, 1052688, 131586, 131586, 131586,
197379, 131586, 131586, 131586, 328965, 1052688, 1447446, 1644825, 1250067, 1052688, 1184274, 1052688, 855309, 394758, 263172, 197379, 131586, 263172, 328965, 263172, 197379, 131586, 197379, 197379, 263172, 592137, 657930, 921102, 1118481, 1250067, 1118481, 1118481, 1710618, 1973790, 1250067, 855309, 263172, 131586, 197379, 131586,
};
#endif /*COLOR_DEPTH == 24*/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_BENCHMARK != 0*/

View File

@@ -1,47 +0,0 @@
/**
* @file lv_app_benchmark.h
*
*/
#ifndef LV_APP_BENCHMARK_H
#define LV_APP_BENCHMARK_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_BENCHMARK != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
}lv_app_benchmark_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_benchmark_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_BENCHMARK != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_BENCHMARK_H */

View File

@@ -1,227 +0,0 @@
/**
* @file lv_app_ethernet.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_ethernet.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_ETHERNET != 0
#include "../lv_app/lv_app_util/lv_app_kb.h"
#include "hal/eth/eth.h"
#include "misc/os/ptask.h"
#include "hal/systick/systick.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
#define ETH_MONITOR_PERIOD 1000 /*ms*/
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
uint8_t * last_msg_dp;
uint16_t last_msg_size;
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * label;
}my_sc_data_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec, lv_app_com_type_t type , const void * data, uint32_t size);
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc);
static void my_sc_close(lv_app_inst_t * app);
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win);
static void my_win_close(lv_app_inst_t * app);
static void eth_state_monitor_task(void * param);
static void tcp_transf_cb(eth_state_t state, const char * txt);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "Ethernet",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = my_win_open,
.win_close = my_win_close,
.sc_open = my_sc_open,
.sc_close = my_sc_close,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
static lv_app_inst_t * app_act_com = NULL;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_ethernet_init(void)
{
ptask_create(eth_state_monitor_task, ETH_MONITOR_PERIOD, PTASK_PRIO_LOW, NULL);
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_ethernet_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
/*Initialize the application*/
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
}
/**
* Read the data have been sent to this application
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
if(type == LV_APP_COM_TYPE_CHAR) { /*data: string*/
eth_tcp_transf(data, size, tcp_transf_cb);
app_act_com = app_rec;
my_app_data_t * adata = app_act_com->app_data;
if(adata->last_msg_dp != NULL) dm_free(adata->last_msg_dp);
adata->last_msg_dp = dm_alloc(size);
memcpy(adata->last_msg_dp, data, size);
adata->last_msg_size = size;
}
}
/**
* Open a shortcut for an application
* @param app pointer to an application
* @param sc pointer to an object where the application
* can create content of the shortcut
*/
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
{
my_sc_data_t * sc_data = app->sc_data;
sc_data->label = lv_label_create(sc, NULL);
lv_label_set_text(sc_data->label, "Empty");
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
static void my_sc_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_sc_data'*/
}
/**
* Open the application in a window
* @param app pointer to an application
* @param win pointer to a window object where
* the application can create content
*/
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{
}
/**
* Close the window of an application
* @param app pointer to an application
*/
static void my_win_close(lv_app_inst_t * app)
{
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
static void eth_state_monitor_task(void * param)
{
/* The eth. should be busy if there is sg. to send.
* It means fail during last send. Try again*/
if(app_act_com != NULL && eth_busy() == false) {
/*Try to send the message again*/
lv_app_notice_add("Resend Ethernet message");
my_app_data_t * adata = app_act_com->app_data;
eth_tcp_transf(adata->last_msg_dp, adata->last_msg_size, tcp_transf_cb);
}
}
static void tcp_transf_cb(eth_state_t state, const char * txt)
{
if(state == ETH_STATE_OK) {
uint16_t size = txt[0] + ((txt[1] << 8) & 0xFF00);
char buf[256];
memcpy(buf, &txt[2], size);
buf[size] = '\0';
lv_app_com_send(app_act_com, LV_APP_COM_TYPE_CHAR, &txt[2], size);
my_app_data_t * adata = app_act_com->app_data;
dm_free(adata->last_msg_dp);
adata->last_msg_dp = NULL;
adata->last_msg_size = 0;
app_act_com = NULL;
}else if(state == ETH_STATE_ERROR) {
lv_app_notice_add("Ethernet TCP transfer error\n%s", txt);
}
}
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_ETHERNET != 0*/

View File

@@ -1,48 +0,0 @@
/**
* @file lv_app_ethernet.h
*
*/
#ifndef LV_APP_ETHERNET_H
#define LV_APP_ETHERNET_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_ETHERNET != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
}lv_app_ethernet_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_ethernet_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_ETHERNET != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_ETHERNET_H */

View File

@@ -1,216 +0,0 @@
/**
* @file lv_app_example.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_example.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0
#include "../lv_app/lv_app_util/lv_app_kb.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * label;
}my_sc_data_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec, lv_app_com_type_t type , const void * data, uint32_t size);
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc);
static void my_sc_close(lv_app_inst_t * app);
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win);
static void my_win_close(lv_app_inst_t * app);
static lv_action_res_t ta_rel_action(lv_obj_t * ta, lv_dispi_t * dispi);
static void kb_ok_action(lv_obj_t * ta);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "Example",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = my_win_open,
.win_close = my_win_close,
.sc_open = my_sc_open,
.sc_close = my_sc_close,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_example_init(void)
{
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_example_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
/*Initialize the application*/
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
}
/**
* Read the data have been sent to this application
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
if(type == LV_APP_COM_TYPE_CHAR) { /*data: string*/
my_sc_data_t * sc_data = app_rec->sc_data;
if (sc_data->label != NULL) {
lv_label_set_text_array(sc_data->label, data, size);
lv_obj_align(sc_data->label , NULL,LV_ALIGN_CENTER, 0, 0);
}
}
}
/**
* Open a shortcut for an application
* @param app pointer to an application
* @param sc pointer to an object where the application
* can create content of the shortcut
*/
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
{
my_sc_data_t * sc_data = app->sc_data;
sc_data->label = lv_label_create(sc, NULL);
lv_label_set_text(sc_data->label, "Empty");
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
static void my_sc_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_sc_data'*/
}
/**
* Open the application in a window
* @param app pointer to an application
* @param win pointer to a window object where
* the application can create content
*/
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{
lv_obj_t * ta;
ta = lv_ta_create(win, NULL);
lv_obj_set_size_us(ta, 200, 100);
lv_obj_set_pos_us(ta, 0, 0);
lv_obj_set_free_p(ta, app);
lv_page_set_rel_action(ta, ta_rel_action);
lv_ta_set_text(ta, "Write a text to send to the other applications");
}
/**
* Close the window of an application
* @param app pointer to an application
*/
static void my_win_close(lv_app_inst_t * app)
{
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
/**
* Called when the text area on the window is released to open the app. keyboard
* @param ta pointer to the text area on the window
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the text area is not deleted
*/
static lv_action_res_t ta_rel_action(lv_obj_t * ta, lv_dispi_t * dispi)
{
lv_ta_set_text(ta, ""); /*Clear the ta*/
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE, NULL, kb_ok_action);
return LV_ACTION_RES_OK;
}
/**
* Called when the "Ok" button is pressed on the app. keyboard
* @param ta pointer to the text area assigned to the app. kexboard
*/
static void kb_ok_action(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
const char * txt = lv_ta_get_txt(ta);
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, txt, strlen(txt));
}
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0*/

View File

@@ -1,48 +0,0 @@
/**
* @file lv_app_example.h
*
*/
#ifndef LV_APP_EXAMPLE_H
#define LV_APP_EXAMPLE_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
}lv_app_example_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_example_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_EXAMPLE_H */

View File

@@ -1,897 +0,0 @@
/**
* @file lv_app_example.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_files.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_FILES != 0
#include <stdio.h>
#include "misc/os/ptask.h"
#include "../lv_app/lv_app_util/lv_app_kb.h"
#include "../lv_app/lv_app_util/lv_app_notice.h"
/*********************
* DEFINES
*********************/
#define LV_APP_FILES_CHUNK_MIN_SIZE 32
#define LV_APP_FILES_CHUNK_MIN_TIME 10
#define LV_APP_FILES_CHUNK_MAX_TIME 10000
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
char path[LV_APP_FILES_PATH_MAX_LEN];
char fn[LV_APP_FILES_FN_MAX_LEN];
fs_file_t file;
uint8_t file_cnt;
uint16_t chunk_delay;
uint16_t chunk_size;
uint8_t send_fn :1;
uint8_t send_size :1;
uint8_t send_crc :1;
uint8_t send_in_prog :1;
ptask_t * send_task;
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
lv_obj_t * file_list;
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * label;
}my_sc_data_t;
typedef enum
{
SEND_SETTINGS_FN,
SEND_SETTINGS_SIZE,
SEND_SETTINGS_CRC,
SEND_SETTINGS_CHUNK_SIZE,
SEND_SETTINGS_CHUNK_DELAY,
}send_settings_id_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec, lv_app_com_type_t type , const void * data, uint32_t size);
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc);
static void my_sc_close(lv_app_inst_t * app);
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win);
static void my_win_close(lv_app_inst_t * app);
static void my_conf_open(lv_app_inst_t * app, lv_obj_t * conf_win);
static void win_load_file_list(lv_app_inst_t * app);
static void win_create_list(lv_app_inst_t * app);
static lv_action_res_t win_up_action(lv_obj_t * up, lv_dispi_t * dispi);
static lv_action_res_t win_next_action(lv_obj_t * next, lv_dispi_t * dispi);
static lv_action_res_t win_prev_action(lv_obj_t * prev, lv_dispi_t * dispi);
static lv_action_res_t win_drv_action(lv_obj_t * drv, lv_dispi_t * dispi);
static lv_action_res_t win_folder_action(lv_obj_t * folder, lv_dispi_t * dispi);
static lv_action_res_t win_file_action(lv_obj_t * file, lv_dispi_t * dispi);
static lv_action_res_t win_send_rel_action(lv_obj_t * send, lv_dispi_t * dispi);
static lv_action_res_t win_send_settings_element_rel_action(lv_obj_t * element, lv_dispi_t * dispi);
static lv_action_res_t win_back_action(lv_obj_t * back, lv_dispi_t * dispi);
static lv_action_res_t win_del_rel_action(lv_obj_t * del, lv_dispi_t * dispi);
static lv_action_res_t win_del_lpr_action(lv_obj_t * del, lv_dispi_t * dispi);
static void send_settings_kb_close_action(lv_obj_t * ta);
static void send_settings_kb_ok_action(lv_obj_t * ta);
static void start_send(lv_app_inst_t * app, const char * path);
static void send_task(void * param);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "Files",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = my_win_open,
.win_close = my_win_close,
.sc_open = my_sc_open,
.sc_close = my_sc_close,
.conf_open = my_conf_open,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
static lv_style_t style_sc_label;
static lv_style_t style_btn_symbol;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_files_init(void)
{
lv_app_style_t * app_style = lv_app_style_get();
memcpy(&style_sc_label, &app_style->sc_rec_rel, sizeof(lv_style_t));
style_sc_label.font = font_get(LV_APP_FONT_LARGE);
lv_style_get(LV_STYLE_BTN_REL, &style_btn_symbol);
style_btn_symbol.font = font_get(LV_IMG_DEF_SYMBOL_FONT);
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_example_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
/*Initialize the application*/
my_app_data_t * app_data = app->app_data;
app_data->file_cnt = 0;
app_data->path[0] = '\0';
app_data->fn[0] = '\0';
app_data->send_fn = 0;
app_data->send_size = 0;
app_data->send_crc = 0;
app_data->chunk_size = LV_APP_FILES_CHUNK_DEF_SIZE;
app_data->chunk_delay = LV_APP_FILES_CHUNK_DEF_TIME;
app_data->send_in_prog = 0;
app_data->send_task = ptask_create(send_task, LV_APP_FILES_CHUNK_DEF_TIME, PTASK_PRIO_OFF, app);
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
my_app_data_t * app_data = app->app_data;
ptask_del(app_data->send_task);
if(app_data->send_in_prog != 0) fs_close(&app_data->file);
}
/**
* Read the data have been sent to this application
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
if(type == LV_APP_COM_TYPE_CHAR) {
/*Check for file query. E.g. "U:/file.txt?"*/
const char * path = data;
if(path[size - 1] == '?') {
if(size > LV_APP_FILES_PATH_MAX_LEN + LV_APP_FILES_FN_MAX_LEN) {
lv_app_notice_add("Can not send file:\ntoo long path");
}
char path_fn[LV_APP_FILES_PATH_MAX_LEN + LV_APP_FILES_FN_MAX_LEN];
memcpy(path_fn, data, size - 1); /*-1 to ignore the '?' at the end*/
path_fn[size - 1] = '\0';
start_send(app_rec, path_fn);
}
}
}
/**
* Open a shortcut for an application
* @param app pointer to an application
* @param sc pointer to an object where the application
* can create content of the shortcut
*/
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
{
my_sc_data_t * sc_data = app->sc_data;
my_app_data_t * app_data = app->app_data;
sc_data->label = lv_label_create(sc, NULL);
lv_obj_set_style(sc_data->label, &style_sc_label);
lv_label_set_text(sc_data->label, fs_get_last(app_data->path));
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
static void my_sc_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_sc_data'*/
}
/**
* Open the application in a window
* @param app pointer to an application
* @param win pointer to a window object where
* the application can create content
*/
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{
my_win_data_t * win_data = app->win_data;
my_app_data_t * app_data = app->app_data;
app_data->file_cnt = 0;
win_data->file_list = NULL;
lv_win_set_title(win, app_data->path);
win_load_file_list(app);
}
/**
* Close the window of an application
* @param app pointer to an application
*/
static void my_win_close(lv_app_inst_t * app)
{
}
/**
* Create objects to configure the applications
* @param app pointer to an application which settings should be created
* @param conf_win pointer to a window where the objects can be created
* (the window has the proper layout)
*/
static void my_conf_open(lv_app_inst_t * app, lv_obj_t * conf_win)
{
my_app_data_t * app_data = app->app_data;
/*Create check boxes*/
lv_obj_t * cb;
/*Send file name check box*/
cb = lv_cb_create(conf_win, NULL);
lv_cb_set_text(cb, "Send file name");
lv_obj_set_free_num(cb, SEND_SETTINGS_FN);
lv_obj_set_free_p(cb, app);
lv_btn_set_rel_action(cb, win_send_settings_element_rel_action);
if(app_data->send_fn != 0) lv_btn_set_state(cb, LV_BTN_STATE_TREL);
else lv_btn_set_state(cb, LV_BTN_STATE_REL);
/*Send size check box*/
cb = lv_cb_create(conf_win, cb);
lv_cb_set_text(cb, "Send size");
lv_obj_set_free_num(cb, SEND_SETTINGS_SIZE);
if(app_data->send_size != 0) lv_btn_set_state(cb, LV_BTN_STATE_TREL);
else lv_btn_set_state(cb, LV_BTN_STATE_REL);
/*Send CRC check box*/
cb = lv_cb_create(conf_win, cb);
lv_cb_set_text(cb, "Send CRC");
lv_obj_set_free_num(cb, SEND_SETTINGS_CRC);
if(app_data->send_crc != 0) lv_btn_set_state(cb, LV_BTN_STATE_TREL);
else lv_btn_set_state(cb, LV_BTN_STATE_REL);
/*Create a text area to type chunk size*/
lv_obj_t * val_set_h;
val_set_h = lv_cont_create(conf_win, NULL);
lv_obj_set_style(val_set_h, lv_style_get(LV_STYLE_PLAIN_COLOR, NULL));
lv_obj_set_click(val_set_h, false);
lv_cont_set_fit(val_set_h, true, true);
lv_cont_set_layout(val_set_h, LV_CONT_LAYOUT_ROW_M);
lv_obj_t * label;
label = lv_label_create(val_set_h, NULL);
lv_label_set_text(label, "Chunk size");
lv_obj_t * ta;
char buf[32];
ta = lv_ta_create(val_set_h, NULL);
lv_cont_set_fit(ta, false, true);
lv_obj_set_free_num(ta, SEND_SETTINGS_CHUNK_SIZE);
lv_obj_set_free_p(ta, app);
lv_page_set_rel_action(ta, win_send_settings_element_rel_action);
sprintf(buf, "%d", app_data->chunk_size);
lv_ta_set_text(ta, buf);
/*Create a text area to type the chunk delay*/
val_set_h = lv_cont_create(conf_win, val_set_h);
label = lv_label_create(val_set_h, NULL);
lv_label_set_text(label, "Inter-chunk delay");
ta = lv_ta_create(val_set_h, ta);
lv_obj_set_free_num(ta, SEND_SETTINGS_CHUNK_DELAY);
sprintf(buf, "%d", app_data->chunk_delay);
lv_ta_set_text(ta, buf);
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
/**
* Create an mpty list on the window. 'win_load_file_list' will fill it.
* @param app pointer to a Files application
*/
static void win_create_list(lv_app_inst_t * app)
{
my_win_data_t * win_data = app->win_data;
/*Delete the previous list*/
if(win_data->file_list != NULL) {
lv_obj_del(win_data->file_list);
}
/*Create a new list*/
win_data->file_list = lv_list_create(app->win, NULL);
lv_obj_set_width(win_data->file_list, lv_win_get_width(app->win));
lv_list_set_style_img(win_data->file_list, &style_btn_symbol);
lv_obj_set_style(lv_page_get_scrl(win_data->file_list), lv_style_get(LV_STYLE_TRANSP_TIGHT, NULL));
lv_obj_set_drag_parent(win_data->file_list, true);
lv_obj_set_drag_parent(lv_page_get_scrl(win_data->file_list), true);
lv_cont_set_fit(win_data->file_list, false, true);
lv_cont_set_layout(lv_page_get_scrl(win_data->file_list), LV_CONT_LAYOUT_COL_L);
}
/**
* Load the file list from the current path on the window
* @param app pointer to a Files application
*/
static void win_load_file_list(lv_app_inst_t * app)
{
my_app_data_t * app_data = app->app_data;
my_win_data_t * win_data = app->win_data;
/*Create a new list*/
win_create_list(app);
fs_res_t res = FS_RES_OK;
/*At empty path show the drivers */
lv_obj_t * liste;
if(app_data->path[0] == '\0') {
char drv[16];
char buf[2];
fs_get_letters(drv);
uint8_t i;
for(i = 0; drv[i] != '\0'; i++) {
buf[0] = drv[i];
buf[1] = '\0';
liste = lv_list_add(win_data->file_list, SYMBOL_DRIVE, buf, win_drv_action);
lv_obj_set_free_p(liste, app);
}
}
/*List the files/folders with fs interface*/
else {
liste = lv_list_add(win_data->file_list, SYMBOL_UP, "Up", win_up_action);
lv_obj_set_free_p(liste, app);
fs_readdir_t rd;
res = fs_readdir_init(&rd, app_data->path);
if(res != FS_RES_OK) {
lv_app_notice_add("Can not read the\npath in Files");
return;
}
/*At not first page add prev. page button */
if(app_data->file_cnt != 0) {
liste = lv_list_add(win_data->file_list, SYMBOL_LEFT, "Previous page", win_prev_action);
lv_obj_set_free_p(liste, app);
}
char fn[LV_APP_FILES_FN_MAX_LEN];
/*Read the files from the previous pages*/
uint16_t file_cnt = 0;
while(file_cnt <= app_data->file_cnt) {
res = fs_readdir(&rd, fn);
if(res != FS_RES_OK ){
lv_app_notice_add("Can not read\nthe path in Files");
return;
}
file_cnt ++;
}
/*Add list elements from the files and folders*/
while(res == FS_RES_OK && fn[0] != '\0') {
if(fn[0] == '/') { /*Add a folder*/
lv_obj_t * liste;
liste = lv_list_add(win_data->file_list, SYMBOL_FOLDER, &fn[1], win_folder_action);
lv_obj_set_free_p(liste, app);
app_data->file_cnt ++;
}
/*Add a file*/
else {
liste = lv_list_add(win_data->file_list, SYMBOL_FILE, fn, win_file_action);
lv_obj_set_free_p(liste, app);
app_data->file_cnt ++;
}
/*Get the next element*/
res = fs_readdir(&rd, fn);
/*Show only LV_APP_FSEL_MAX_FILE elements and add a Next page button*/
if(app_data->file_cnt != 0 && app_data->file_cnt % LV_APP_FILES_PAGE_SIZE == 0) {
liste = lv_list_add(win_data->file_list, SYMBOL_RIGHT, "Next page", win_next_action);
lv_obj_set_free_p(liste, app);
break;
}
}
/*Close the read directory*/
fs_readdir_close(&rd);
}
if(res != FS_RES_OK) {
lv_app_notice_add("Can not read\nthe path in Files");
}
/*Focus to the top of the list*/
lv_obj_set_y(lv_page_get_scrl(win_data->file_list), 0);
return;
}
/**
* Called when the Up list element is released to step one level
* @param up pointer to the Up button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t win_up_action(lv_obj_t * up, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(up);
my_app_data_t * app_data = app->app_data;
fs_up(app_data->path);
app_data->file_cnt = 0;
lv_win_set_title(app->win, app_data->path);
my_sc_data_t * sc_data = app->sc_data;
if(sc_data != NULL) {
lv_label_set_text(sc_data->label, fs_get_last(app_data->path));
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
win_load_file_list(app);
return LV_ACTION_RES_INV;
}
/**
* Called when the Next list element is released to go to the next page
* @param next pointer to the Next button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t win_next_action(lv_obj_t * next, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(next);
win_load_file_list(app);
return LV_ACTION_RES_INV;
}
/**
* Called when the Prev list element is released to previous page
* @param prev pointer to the Prev button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t win_prev_action(lv_obj_t * prev, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(prev);
my_app_data_t * app_data = app->app_data;
if(app_data->file_cnt <= 2 * LV_APP_FILES_PAGE_SIZE) app_data->file_cnt = 0;
else if(app_data->file_cnt % LV_APP_FILES_PAGE_SIZE == 0) {
app_data->file_cnt -= 2 * LV_APP_FILES_PAGE_SIZE;
} else {
app_data->file_cnt = ((app_data->file_cnt / LV_APP_FILES_PAGE_SIZE) - 1) * LV_APP_FILES_PAGE_SIZE;
}
win_load_file_list(app);
return LV_ACTION_RES_INV;
}
/**
* Called when the Driver list element is released to step into a driver
* @param drv pointer to the Driver button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t win_drv_action(lv_obj_t * drv, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(drv);
my_app_data_t * app_data = app->app_data;
sprintf(app_data->path, "%s:", lv_list_get_element_text(drv));
app_data->file_cnt = 0;
lv_win_set_title(app->win, app_data->path);
my_sc_data_t * sc_data = app->sc_data;
if(sc_data != NULL) {
lv_label_set_text(sc_data->label, fs_get_last(app_data->path));
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
win_load_file_list(app);
return LV_ACTION_RES_INV;
}
/**
* Called when a folder list element is released to enter into it
* @param folder pointer to a folder button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t win_folder_action(lv_obj_t * folder, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(folder);
my_app_data_t * app_data = app->app_data;
sprintf(app_data->path, "%s/%s", app_data->path, lv_list_get_element_text(folder));
app_data->file_cnt = 0;
lv_win_set_title(app->win, app_data->path);
my_sc_data_t * sc_data = app->sc_data;
if(sc_data != NULL) {
lv_label_set_text(sc_data->label, fs_get_last(app_data->path));
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
win_load_file_list(app);
return LV_ACTION_RES_INV;
}
/**
* Called when a file list element is released to show the list of operation on it
* @param file pointer to a file button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t win_file_action(lv_obj_t * file, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(file);
my_app_data_t * app_data = app->app_data;
my_win_data_t * win_data = app->win_data;
sprintf(app_data->fn, "%s", lv_list_get_element_text(file));
win_create_list(app);
/*Create the list of operations*/
lv_obj_t * liste;
liste = lv_list_add(win_data->file_list, SYMBOL_LEFT, "Back", win_back_action);
lv_obj_set_free_p(liste, app);
/*Send button*/
liste = lv_list_add(win_data->file_list, NULL, "Send", win_send_rel_action);
lv_obj_set_free_p(liste, app);
/*Delete button*/
liste = lv_list_add(win_data->file_list, NULL, "Delete", win_del_rel_action);
lv_btn_set_lpr_action(liste, win_del_lpr_action);
lv_obj_set_free_p(liste, app);
return LV_ACTION_RES_INV;
}
/**
* Called when the Back list element is released to when a file chosen to
* go back to the file list from file operation
* @param back pointer to the back button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_INV because the list is deleted in the function
*/
static lv_action_res_t win_back_action(lv_obj_t * up, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(up);
my_app_data_t * app_data = app->app_data;
app_data->file_cnt = 0;
win_load_file_list(app);
return LV_ACTION_RES_INV;
}
/**
* Called when the Send list element is released to send the file
* @param sed pointer to the Up button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the list is NOT deleted in the function
*/
static lv_action_res_t win_send_rel_action(lv_obj_t * send, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(send);
my_app_data_t * app_data = app->app_data;
if(app_data->send_in_prog != 0) {
lv_app_notice_add("File sending\nin progress");
return LV_ACTION_RES_OK;
}
char path_fn[LV_APP_FILES_PATH_MAX_LEN + LV_APP_FILES_FN_MAX_LEN];
sprintf(path_fn, "%s/%s", app_data->path, app_data->fn);
start_send(app, path_fn);
return LV_ACTION_RES_OK;
}
/**
* Called when a send settings element is released
* @param element pointer to a chekbox or text area
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the list is NOT deleted in the function
*/
static lv_action_res_t win_send_settings_element_rel_action(lv_obj_t * element, lv_dispi_t * dispi)
{
send_settings_id_t id = lv_obj_get_free_num(element);
lv_app_inst_t * app = lv_obj_get_free_p(element);
my_app_data_t * app_data = app->app_data;
if(id == SEND_SETTINGS_FN) {
app_data->send_fn = lv_btn_get_state(element) == LV_BTN_STATE_REL ? 0 : 1;
} else if(id == SEND_SETTINGS_SIZE) {
app_data->send_size = lv_btn_get_state(element) == LV_BTN_STATE_REL ? 0 : 1;
} else if(id == SEND_SETTINGS_CRC) {
app_data->send_crc = lv_btn_get_state(element) == LV_BTN_STATE_REL ? 0 : 1;
/*TODO CRC sending is not supported yet*/
if(app_data->send_crc != 0) {
lv_app_notice_add("CRC sending is\nnot supported yet");
}
} else if(id == SEND_SETTINGS_CHUNK_SIZE) {
lv_app_kb_open(element, LV_APP_KB_MODE_NUM | LV_APP_KB_MODE_WIN_RESIZE, send_settings_kb_close_action, send_settings_kb_ok_action);
} else if(id == SEND_SETTINGS_CHUNK_DELAY) {
lv_app_kb_open(element, LV_APP_KB_MODE_NUM | LV_APP_KB_MODE_WIN_RESIZE, send_settings_kb_close_action, send_settings_kb_ok_action);
}
return LV_ACTION_RES_OK;
}
/**
* Called when the Delete list element is released.
* It will show a notification to long press the Delete button to remove the file
* @param del pointer to the back button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the list is NOT deleted in the function
*/
static lv_action_res_t win_del_rel_action(lv_obj_t * del, lv_dispi_t * dispi)
{
lv_app_notice_add("Press long the Delete button\n"
"to remove the file");
return LV_ACTION_RES_OK;
}
/**
* Called when the Delete list element is long pressed to remove a file
* @param del pointer to the Delete button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the list is NOT deleted in the function
*/
static lv_action_res_t win_del_lpr_action(lv_obj_t * del, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(del);
my_app_data_t * app_data = app->app_data;
char path_fn[LV_APP_FILES_PATH_MAX_LEN + LV_APP_FILES_FN_MAX_LEN];
sprintf(path_fn, "%s/%s", app_data->path, app_data->fn);
fs_res_t res = fs_remove(path_fn);
if(res == FS_RES_OK) lv_app_notice_add("%s deleted", app_data->fn);
else lv_app_notice_add("Can not delete\n%s", app_data->fn);
return LV_ACTION_RES_OK;
}
/**
* Called when a send setting is typed and 'Close' pressed on the App. keyboard.
* The function reverts the original value in the text area.
* @param ta pointer to a text area
*/
static void send_settings_kb_close_action(lv_obj_t * ta)
{
send_settings_id_t id = lv_obj_get_free_num(ta);
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * app_data = app->app_data;
char buf[32];
buf[0] = '\0';
if(id == SEND_SETTINGS_CHUNK_DELAY) {
sprintf(buf, "%d", app_data->chunk_size);
} else if(id == SEND_SETTINGS_CHUNK_SIZE) {
sprintf(buf, "%d", app_data->chunk_size);
}
lv_ta_set_text(ta, buf);
}
/**
* Called when a send setting is typed and 'Ok' pressed on the App. keyboard.
* The function saves teh new value.
* @param ta pointer to a text area
*/
static void send_settings_kb_ok_action(lv_obj_t * ta)
{
send_settings_id_t id = lv_obj_get_free_num(ta);
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * app_data = app->app_data;
int num;
sscanf(lv_ta_get_txt(ta), "%d", &num);
if(id == SEND_SETTINGS_CHUNK_DELAY) {
if(num > LV_APP_FILES_CHUNK_MAX_TIME) num = LV_APP_FILES_CHUNK_MAX_TIME;
if(num < LV_APP_FILES_CHUNK_MIN_TIME) num = LV_APP_FILES_CHUNK_MIN_TIME;
app_data->chunk_delay = (uint16_t) num;
} else if(id == SEND_SETTINGS_CHUNK_SIZE) {
if(num > LV_APP_FILES_CHUNK_MAX_SIZE) num = LV_APP_FILES_CHUNK_MAX_SIZE;
if(num < LV_APP_FILES_CHUNK_MIN_SIZE) num = LV_APP_FILES_CHUNK_MIN_SIZE;
app_data->chunk_size= (uint16_t) num;
}
}
/**
* Start the sending of a file
* @param app pointer to a Files application
* @param path path of the file to send
*/
static void start_send(lv_app_inst_t * app, const char * path)
{
my_app_data_t * app_data = app->app_data;
/*Open the file*/
fs_res_t res = fs_open(&app_data->file, path, FS_MODE_RD);
if(res == FS_RES_OK) {
app_data->send_in_prog = 1;
/*Send the header*/
if(app_data->send_fn != 0) {
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, app_data->path, strlen(app_data->path));
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, "/", 1);
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, app_data->fn, strlen(app_data->fn));
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, "\n", 1);
}
if(app_data->send_size != 0) {
char buf[64];
uint32_t size;
fs_size(&app_data->file, &size);
sprintf(buf,"%d", (int) size);
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, buf, strlen(buf));
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, "\n", 1);
}
if(app_data->send_crc != 0) {
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, "0x0000", 6);
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, "\n", 1);
}
/*Add an extra \n to separate the header from the file data*/
if(app_data->send_fn != 0 || app_data->send_size != 0 || app_data->send_crc != 0) {
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, "\n", 1);
}
}
/*If an error occurred close the file*/
if(res != FS_RES_OK) {
fs_close(&app_data->file);
ptask_set_prio(app_data->send_task, PTASK_PRIO_OFF);
app_data->send_in_prog = 0;
lv_app_notice_add("Can not send\nthe file in Files");
}
/*If no error show notification, start the sender task and refresh the shortcut*/
else {
/*Start the sender task*/
ptask_set_period(app_data->send_task, app_data->chunk_delay);
ptask_reset(app_data->send_task);
ptask_set_prio(app_data->send_task, PTASK_PRIO_HIGH);
lv_app_notice_add("Sending\n%s", fs_get_last(path));
/*Refresh the shortcut with the percentage of the sending*/
if(app->sc_data != NULL) {
my_sc_data_t * sc_data = app->sc_data;
uint32_t size;
fs_size(&app_data->file, &size);
uint32_t pos;
fs_tell(&app_data->file, &pos);
int pct = (uint32_t) (pos * 100) / size;
char buf[256];
sprintf(buf, "Sending\n%d%%", pct);
lv_label_set_text(sc_data->label, buf);
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
}
}
/**
* Periodically send the next chunk of the file
* @param app pointer to a Files application
*/
static void send_task(void * param)
{
lv_app_inst_t * app = param;
my_app_data_t * app_data = app->app_data;
if(app_data->send_in_prog == 0) return;
/*Read a chunk*/
uint32_t rn;
char rd_buf[LV_APP_FILES_CHUNK_MAX_SIZE];
fs_res_t res = fs_read(&app_data->file, rd_buf, app_data->chunk_size, &rn);
if(res == FS_RES_OK) {
app_data->send_in_prog = 1;
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, rd_buf, rn);
}
/*If the read failed close the file and show an error*/
if(res != FS_RES_OK) {
fs_close(&app_data->file);
app_data->send_in_prog = 0;
lv_app_notice_add("Can not send\nthe file in Files");
}
/*If the read was successful*/
else {
my_sc_data_t * sc_data = app->sc_data;
/*If the file is read close it a show a notification*/
if(rn < app_data->chunk_size) {
lv_app_notice_add("File sent");
fs_close(&app_data->file);
app_data->send_in_prog = 0;
/*Refresh the shortut*/
if(sc_data != NULL) {
lv_label_set_text(sc_data->label, fs_get_last(app_data->path));
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
}
/*If the file is not sent yet refresh the shortcut with percentage of sending*/
else {
if(sc_data != NULL) {
uint32_t size;
fs_size(&app_data->file, &size);
uint32_t pos;
fs_tell(&app_data->file, &pos);
uint8_t pct = (uint32_t) (pos * 100) / size;
char buf[256];
sprintf(buf, "Sending\n%d%%", pct);
lv_label_set_text(sc_data->label, buf);
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
}
}
}
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_FILES != 0*/

View File

@@ -1,47 +0,0 @@
/**
* @file lv_app_files.h
*
*/
#ifndef LV_APP_FILES_H
#define LV_APP_FILES_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_FILES != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
}lv_app_files_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_files_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_FILES != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_EXAMPLE_H */

View File

@@ -1,477 +0,0 @@
/**
* @file lv_app_gsm.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_gsm.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_GSM != 0
#include "../lv_app/lv_app_util/lv_app_kb.h"
#include "hal/gsm/gsm.h"
#include "misc/os/ptask.h"
#include "hal/systick/systick.h"
#include "misc/comm/gsmmng.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
#define GSM_MONITOR_PERIOD 1000 /*ms*/
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
char set_apn[128];
char set_ip[32];
char set_port[16];
uint8_t * last_msg_dp;
uint16_t last_msg_size;
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
lv_obj_t * title;
lv_obj_t * netw_apn_ta;
lv_obj_t * tcp_ip_ta;
lv_obj_t * tcp_port_ta;
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * label;
}my_sc_data_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec, lv_app_com_type_t type , const void * data, uint32_t size);
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc);
static void my_sc_close(lv_app_inst_t * app);
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win);
static void my_win_close(lv_app_inst_t * app);
static void gsm_state_monitor_task(void * param);
static lv_action_res_t netw_con_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t netw_apn_rel_action( lv_obj_t * ta, lv_dispi_t * dispi);
static lv_action_res_t tcp_ip_rel_action( lv_obj_t * ta, lv_dispi_t * dispi);
static lv_action_res_t tcp_port_rel_action( lv_obj_t * ta, lv_dispi_t * dispi);
static void netw_apn_kb_ok(lv_obj_t * ta);
static void netw_apn_kb_close(lv_obj_t * ta);
static void tcp_ip_kb_ok(lv_obj_t * ta);
static void tcp_ip_kb_close(lv_obj_t * ta);
static void tcp_port_kb_ok(lv_obj_t * ta);
static void tcp_port_kb_close(lv_obj_t * ta);
static void tcp_transf_cb(gsm_state_t state, const char * txt);
static void win_title_refr(void);
static void save_conf(lv_app_inst_t * app);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "GSM",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = my_win_open,
.win_close = my_win_close,
.sc_open = my_sc_open,
.sc_close = my_sc_close,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
static lv_app_inst_t * app_act_com;
static char def_apn[128];
static char def_ip[32];
static char def_port[16];
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_gsm_init(void)
{
#ifdef LV_APP_GSM_CONF_PATH
fs_file_t f;
fs_res_t res;
res = fs_open(&f, LV_APP_GSM_CONF_PATH, FS_MODE_RD);
if(res == FS_RES_NOT_EX) {
res = fs_open(&f, LV_APP_GSM_CONF_PATH, FS_MODE_WR | FS_MODE_RD);
if(res == FS_RES_OK) {
const char * def_conf = "apn\n100.101.102.103\n1234";
fs_write(&f, def_conf, strlen(def_conf) + 1, NULL);
fs_seek(&f, 0);
}
}
if(res == FS_RES_OK) {
volatile char buf[256];
volatile uint32_t rn;
fs_read(&f, (char *)buf, sizeof(buf) - 1, (uint32_t *)&rn);
volatile uint16_t i;
volatile uint16_t j = 0;
volatile uint8_t line_cnt = 0;
for(i = 0; i < rn; i++) {
if(buf[i] != '\n') {
if(line_cnt == 0) def_apn[j] = buf[i];
if(line_cnt == 1) def_ip[j] = buf[i];
if(line_cnt == 2) def_port[j] = buf[i];
j++;
} else {
if(line_cnt == 0) def_apn[j] = '\0';
if(line_cnt == 1) def_ip[j] = '\0';
if(line_cnt == 2) def_port[j] = '\0';
j = 0;
line_cnt ++;
}
}
fs_close(&f);
} else {
lv_app_notice_add("SD card error");
}
#else
strcpy(def_apn, LV_APP_GSM_APN_DEF);
strcpy(def_ip, LV_APP_GSM_IP_DEF);
strcpy(def_port, LV_APP_GSM_PORT_DEF);
#endif
#if LV_APP_GSM_AUTO_CONNECT != 0
gsmmng_set_last_apn(def_apn);
gsmmng_set_last_tcp(def_ip, def_port);
#endif
ptask_create(gsm_state_monitor_task, GSM_MONITOR_PERIOD, PTASK_PRIO_LOW, NULL);
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_example_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
/*Initialize the application*/
my_app_data_t * adata = app->app_data;
strcpy(adata->set_apn, def_apn);
strcpy(adata->set_ip, def_ip);
strcpy(adata->set_port, def_port);
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
}
/**
* Read the data have been sent to this application
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
if(type == LV_APP_COM_TYPE_CHAR) { /*data: string*/
app_act_com = app_rec;
gsm_tcp_transf(data, size, tcp_transf_cb);
my_app_data_t * adata = app_act_com->app_data;
if(adata->last_msg_dp != NULL) dm_free(adata->last_msg_dp);
adata->last_msg_dp = dm_alloc(size);
memcpy(adata->last_msg_dp, data, size);
adata->last_msg_size = size;
}
}
/**
* Open a shortcut for an application
* @param app pointer to an application
* @param sc pointer to an object where the application
* can create content of the shortcut
*/
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
{
my_sc_data_t * sc_data = app->sc_data;
sc_data->label = lv_label_create(sc, NULL);
lv_label_set_text(sc_data->label, "Empty");
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
static void my_sc_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_sc_data'*/
}
/**
* Open the application in a window
* @param app pointer to an application
* @param win pointer to a window object where
* the application can create content
*/
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{
my_app_data_t * adata = app->app_data;
my_win_data_t * wdata = app->win_data;
wdata->title = lv_label_create(win, NULL);
lv_obj_t * ta_cont = lv_cont_create(win, NULL);
lv_cont_set_fit(ta_cont, true, true);
lv_cont_set_layout(ta_cont, LV_CONT_LAYOUT_COL_L);
lv_obj_set_style(ta_cont, lv_style_get(LV_STYLE_TRANSP_TIGHT, NULL));
wdata->netw_apn_ta = lv_ta_create(ta_cont, NULL);
lv_cont_set_fit(wdata->netw_apn_ta, false, true);
lv_obj_set_free_p(wdata->netw_apn_ta, app);
lv_obj_set_width(wdata->netw_apn_ta, LV_DPI * 3);
lv_page_set_rel_action(wdata->netw_apn_ta, netw_apn_rel_action);
lv_ta_set_text(wdata->netw_apn_ta, adata->set_apn);
lv_ta_set_cursor_show(wdata->netw_apn_ta, false);
wdata->tcp_ip_ta = lv_ta_create(ta_cont, wdata->netw_apn_ta);
lv_page_set_rel_action(wdata->tcp_ip_ta, tcp_ip_rel_action);
lv_ta_set_text(wdata->tcp_ip_ta, adata->set_ip);
wdata->tcp_port_ta = lv_ta_create(ta_cont, wdata->netw_apn_ta);
lv_page_set_rel_action(wdata->tcp_port_ta, tcp_port_rel_action);
lv_ta_set_text(wdata->tcp_port_ta, adata->set_port);
lv_obj_t * con_btn = lv_btn_create(win, NULL);
lv_obj_set_free_p(con_btn, app);
lv_btn_set_rel_action(con_btn, netw_con_rel_action);
lv_obj_t * label = lv_label_create(con_btn, NULL);
lv_label_set_text(label, "Connect");
lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY);
win_title_refr();
}
/**
* Close the window of an application
* @param app pointer to an application
*/
static void my_win_close(lv_app_inst_t * app)
{
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
static void gsm_state_monitor_task(void * param)
{
static gsmmng_state_t state_prev = GSMMNG_STATE_WAIT;
gsmmng_state_t state_act = gsmmng_get_state();
if(state_prev != state_act && state_act == GSMMNG_STATE_READY) {
lv_app_notice_add("GSM connected to:\n%s\n%s:%s",
gsmmng_get_last_apn(), gsmmng_get_last_ip(), gsmmng_get_last_port());
win_title_refr();
}
/* The GSM should be busy if there is sg. to send.
* It means fail during last send. Try again*/
if(app_act_com != NULL) {
if(gsm_busy() == false && state_act == GSMMNG_STATE_READY) {
/*Try to send the message again*/
lv_app_notice_add("Resend GSM message");
my_app_data_t * adata = app_act_com->app_data;
gsm_tcp_transf(adata->last_msg_dp, adata->last_msg_size, tcp_transf_cb);
}
}
state_prev = state_act;
}
static lv_action_res_t netw_con_rel_action(lv_obj_t * btn, lv_dispi_t* dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(btn);
my_app_data_t * adata = app->app_data;
gsmmng_set_last_apn(adata->set_apn);
gsmmng_set_last_tcp(adata->set_ip, adata->set_port);
gsmmng_reconnect();
save_conf(app);
lv_app_notice_add("Connecting to GSM network\n%s\n %s:%s",
adata->set_apn, adata->set_ip, adata->set_port);
return LV_ACTION_RES_OK;
}
static lv_action_res_t netw_apn_rel_action( lv_obj_t * ta, lv_dispi_t* dispi)
{
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE | LV_APP_KB_MODE_CUR_MANAGE, netw_apn_kb_close ,netw_apn_kb_ok);
return LV_ACTION_RES_OK;
}
static lv_action_res_t tcp_ip_rel_action( lv_obj_t * ta, lv_dispi_t* dispi)
{
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE | LV_APP_KB_MODE_CUR_MANAGE, tcp_ip_kb_close ,tcp_ip_kb_ok);
return LV_ACTION_RES_OK;
}
static lv_action_res_t tcp_port_rel_action( lv_obj_t * ta, lv_dispi_t* dispi)
{
lv_app_kb_open(ta, LV_APP_KB_MODE_NUM | LV_APP_KB_MODE_WIN_RESIZE | LV_APP_KB_MODE_CUR_MANAGE, tcp_port_kb_close ,tcp_port_kb_ok);
return LV_ACTION_RES_OK;
}
static void netw_apn_kb_ok(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
strcpy(adata->set_apn, lv_ta_get_txt(ta));
}
static void netw_apn_kb_close(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
lv_ta_set_text(ta, adata->set_apn);
}
static void tcp_ip_kb_ok(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
strcpy(adata->set_ip, lv_ta_get_txt(ta));
}
static void tcp_ip_kb_close(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
lv_ta_set_text(ta, adata->set_ip);
}
static void tcp_port_kb_ok(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
strcpy(adata->set_port, lv_ta_get_txt(ta));
}
static void tcp_port_kb_close(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
lv_ta_set_text(ta, adata->set_port);
}
static void tcp_transf_cb(gsm_state_t state, const char * txt)
{
if(state == GSM_STATE_OK) {
uint16_t size = txt[0] + ((txt[1] << 8) & 0xFF00);
char buf[256];
memcpy(buf, &txt[2], size);
buf[size] = '\0';
lv_app_com_send(app_act_com, LV_APP_COM_TYPE_CHAR, &txt[2], size);
my_app_data_t * adata = app_act_com->app_data;
dm_free(adata->last_msg_dp);
adata->last_msg_dp = NULL;
adata->last_msg_size = 0;
app_act_com = NULL;
}else if(state == GSM_STATE_ERROR) {
lv_app_notice_add("GSM TCP transfer error\n%s", txt);
lv_app_notice_add("Reconnecting to GSM...");
gsmmng_reconnect();
}
}
static void win_title_refr(void)
{
lv_app_inst_t * app;
app = lv_app_get_next(NULL, &my_app_dsc);
while(app != NULL) {
if(app->win != NULL) {
my_win_data_t * wdata = app->win_data;
if(gsmmng_get_state() == GSMMNG_STATE_IDLE) {
lv_label_set_text(wdata->title, "Not connected");
} else if(gsmmng_get_state() == GSMMNG_STATE_READY) {
lv_label_set_text(wdata->title, "Connecting ...");
} else {
char buf[256];
sprintf(buf, "%s - %s:%s", gsmmng_get_last_apn(), gsmmng_get_last_ip(), gsmmng_get_last_port());
lv_label_set_text(wdata->title, buf);
}
lv_obj_set_width(wdata->title, lv_win_get_width(app->win));
}
app = lv_app_get_next(app, &my_app_dsc);
}
}
static void save_conf(lv_app_inst_t * app)
{
#ifdef LV_APP_GSM_CONF_PATH
my_app_data_t * adata = app->app_data;
fs_file_t f;
fs_res_t res;
res = fs_open(&f, LV_APP_GSM_CONF_PATH, FS_MODE_WR);
if(res == FS_RES_OK) {
char buf[256];
sprintf(buf,"%s\n%s\n%s", adata->set_apn, adata->set_ip, adata->set_port);
fs_write(&f, buf, strlen(buf) + 1, NULL);
fs_close(&f);
}
#endif
}
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0*/

View File

@@ -1,47 +0,0 @@
/**
* @file lv_app_gsm.h
*
*/
#ifndef LV_APP_GSM_H
#define LV_APP_GSM_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_GSM != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
}lv_app_gsm_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_gsm_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_EXAMPLE_H */

View File

@@ -1,143 +0,0 @@
/**
* @file lv_app_example.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_phantom.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_PHANTOM != 0
#include "../lv_app/lv_app_util/lv_app_kb.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
void (*com_listen)(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size);
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * label;
}my_sc_data_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "Phantom",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = NULL,
.win_close = NULL,
.sc_open = NULL,
.sc_close = NULL,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_phantom_init(void)
{
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_phantom_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
/*Initialize the application*/
my_app_data_t * app_data = app->app_data;
app_data->com_listen = NULL;
if(conf != NULL) {
lv_app_phantom_conf_t * my_conf = conf;
app_data->com_listen = my_conf->com_listen;
}
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
}
/**
* Read the data have been sent to this application
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
my_app_data_t * app_data = app_rec->app_data;
if(app_data->com_listen != NULL) {
app_data->com_listen(app_send, app_rec, type, data, size);
}
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0*/

View File

@@ -1,50 +0,0 @@
/**
* @file lv_app_phantom.h
*
*/
#ifndef LV_APP_PHANTOM_H
#define LV_APP_PHANTOM_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_PHANTOM != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
void (*com_listen)(lv_app_inst_t * app_send,
lv_app_inst_t * app_rec,
lv_app_com_type_t type ,
const void * data, uint32_t size);
}lv_app_phantom_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_phantom_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_PHANTOM != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_PHANTOM_H */

View File

@@ -1,399 +0,0 @@
/**
* @file lv_app_sysmon.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_sysmon.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_SYSMON != 0
#include <stdio.h>
#include "misc/os/ptask.h"
#include "misc/os/idle.h"
#include "lvgl/lv_objx/lv_chart.h"
#include "lvgl/lv_app/lv_app_util/lv_app_notice.h"
#include "hal/systick/systick.h"
/*********************
* DEFINES
*********************/
#define CPU_LABEL_COLOR "FF0000"
#define MEM_LABEL_COLOR "0000FF"
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
lv_obj_t * chart;
lv_chart_dl_t * cpu_dl;
lv_chart_dl_t * mem_dl;
lv_obj_t * label;
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * bar_cpu;
lv_obj_t * bar_mem;
}my_sc_data_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec, lv_app_com_type_t type , const void * data, uint32_t size);
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc);
static void my_sc_close(lv_app_inst_t * app);
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win);
static void my_win_close(lv_app_inst_t * app);
static void sysmon_task(void * param);
static void lv_app_sysmon_refr(void);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "Sys. monitor",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = my_win_open,
.win_close = my_win_close,
.sc_open = my_sc_open,
.sc_close = my_sc_close,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
static uint8_t mem_pct[LV_APP_SYSMON_PNUM];
static uint8_t cpu_pct[LV_APP_SYSMON_PNUM];
static lv_style_t cpu_bar_bg;
static lv_style_t mem_bar_bg;
static lv_style_t cpu_bar_indic;
static lv_style_t mem_bar_indic;
#if USE_DYN_MEM != 0 && DM_CUSTOM == 0
static dm_mon_t mem_mon;
#endif
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_sysmon_init(void)
{
ptask_create(sysmon_task, LV_APP_SYSMON_REFR_TIME, PTASK_PRIO_LOW, NULL);
memset(mem_pct, 0, sizeof(mem_pct));
memset(cpu_pct, 0, sizeof(cpu_pct));
/*Create bar styles for the shortcut*/
lv_style_get(LV_STYLE_PRETTY, &cpu_bar_bg);
cpu_bar_bg.ccolor = COLOR_MAKE(0x40, 0x00, 0x00);
cpu_bar_bg.font = font_get(LV_APP_FONT_MEDIUM);
cpu_bar_bg.line_space = 0;
cpu_bar_bg.txt_align = 1;
cpu_bar_bg.hpad = 0;
cpu_bar_bg.vpad = 0;
memcpy(&mem_bar_bg, &cpu_bar_bg, sizeof(lv_style_t));
mem_bar_bg.ccolor = COLOR_MAKE(0x00, 0x40, 0x00);
lv_style_get(LV_STYLE_PRETTY_COLOR, &cpu_bar_indic);
cpu_bar_indic.gcolor = COLOR_MARRON;
cpu_bar_indic.mcolor = COLOR_RED;
cpu_bar_indic.bcolor = COLOR_BLACK;
//cpu_bar_indic.bwidth = 1 * LV_DOWNSCALE;
cpu_bar_indic.bopa = OPA_50;
cpu_bar_indic.hpad = 0 * LV_DOWNSCALE;
cpu_bar_indic.vpad = 0 * LV_DOWNSCALE;
memcpy(&mem_bar_indic, &cpu_bar_indic, sizeof(lv_style_t));
mem_bar_indic.gcolor = COLOR_GREEN;
mem_bar_indic.mcolor = COLOR_LIME;
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_sysmon_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
}
/**
* Read the data have been sent to this application
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
}
/**
* Open a shortcut for an application
* @param app pointer to an application
* @param sc pointer to an object where the application
* can create content of the shortcut
*/
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
{
my_sc_data_t * sc_data = app->sc_data;
cord_t w = lv_obj_get_width(sc) / 5;
/*Create 2 bars for the CPU and the Memory*/
sc_data->bar_cpu = lv_bar_create(sc, NULL);
lv_obj_set_size(sc_data->bar_cpu, w, 5 * lv_obj_get_height(sc) / 8);
lv_obj_align(sc_data->bar_cpu, NULL, LV_ALIGN_IN_BOTTOM_LEFT, w, - lv_obj_get_height(sc) / 8);
lv_obj_set_style(sc_data->bar_cpu, &cpu_bar_bg);
lv_bar_set_style_indic(sc_data->bar_cpu, &cpu_bar_indic);
lv_obj_set_click(sc_data->bar_cpu, false);
lv_bar_set_range(sc_data->bar_cpu, 0, 100);
lv_obj_t * label = lv_label_create(sc_data->bar_cpu, NULL);
lv_label_set_text(label, "C\nP\nU");
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
sc_data->bar_mem = lv_bar_create(sc, sc_data->bar_cpu);
lv_obj_align(sc_data->bar_mem, sc_data->bar_cpu, LV_ALIGN_OUT_RIGHT_MID, w, 0);
lv_obj_set_style(sc_data->bar_mem, &mem_bar_bg);
lv_bar_set_style_indic(sc_data->bar_mem, &mem_bar_indic);
label = lv_label_create(sc_data->bar_mem, NULL);
lv_label_set_text(label, "M\nE\nM");
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
lv_app_sysmon_refr();
}
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
static void my_sc_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_sc_data'*/
}
/**
* Open the application in a window
* @param app pointer to an application
* @param win pointer to a window object where
* the application can create content
*/
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{
my_win_data_t * win_data = app->win_data;
/*Make the window content responsive*/
lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY);
/*Create a chart with two data lines*/
win_data->chart = lv_chart_create(win, NULL);
lv_obj_set_size(win_data->chart, LV_HOR_RES / 2, LV_VER_RES / 2);
lv_obj_set_pos(win_data->chart, LV_DPI / 10, LV_DPI / 10);
lv_chart_set_pnum(win_data->chart, LV_APP_SYSMON_PNUM);
lv_chart_set_range(win_data->chart, 0, 100);
lv_chart_set_type(win_data->chart, LV_CHART_LINE);
lv_chart_set_dl_width(win_data->chart, 2 * LV_DOWNSCALE);
win_data->cpu_dl = lv_chart_add_data_line(win_data->chart, COLOR_RED);
win_data->mem_dl = lv_chart_add_data_line(win_data->chart, COLOR_BLUE);
uint16_t i;
for(i = 0; i < LV_APP_SYSMON_PNUM; i ++) {
win_data->cpu_dl->points[i] = cpu_pct[i];
win_data->mem_dl->points[i] = mem_pct[i];
}
/*Create a label for the details of Memory and CPU usage*/
win_data->label = lv_label_create(win, NULL);
lv_label_set_recolor(win_data->label, true);
lv_obj_align(win_data->label, win_data->chart, LV_ALIGN_OUT_RIGHT_TOP, LV_DPI / 4, 0);
lv_app_sysmon_refr();
}
/**
* Close the window of an application
* @param app pointer to an application
*/
static void my_win_close(lv_app_inst_t * app)
{
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
/**
* Called periodically to monitor the CPU and memory usage.
* It refreshes the shortcuts and windows and also add notifications if there is any problem.
* @param param unused
*/
static void sysmon_task(void * param)
{
/*Shift out the oldest data*/
uint16_t i;
for(i = 1; i < LV_APP_SYSMON_PNUM; i++) {
mem_pct[i - 1] = mem_pct[i];
cpu_pct[i - 1] = cpu_pct[i];
}
/*Get CPU and memory information */
uint8_t cpu_busy = 0;
#if USE_IDLE != 0 /*Use the more precise idle module if enabled*/
cpu_busy = 100 - idle_get();
#else
cpu_busy = 100 - ptask_get_idle();
#endif
uint8_t mem_used_pct = 0;
#if USE_DYN_MEM != 0 && DM_CUSTOM == 0
dm_monitor(&mem_mon);
mem_used_pct = mem_mon.pct_used;
#endif
/*Add the CPU and memory data*/
cpu_pct[LV_APP_SYSMON_PNUM - 1] = cpu_busy;
mem_pct[LV_APP_SYSMON_PNUM - 1] = mem_used_pct;
/*Refresh the shortcuts and windows*/
lv_app_sysmon_refr();
#if USE_DYN_MEM != 0 && DM_CUSTOM == 0
/*Handle periodic defrag. if enabled*/
#if LV_APP_SYSMON_DEFRAG_PERIOD != 0
static uint32_t last_defrag = 0;
if(systick_elaps(last_defrag) > LV_APP_SYSMON_DEFRAG_PERIOD) {
dm_defrag();
last_defrag = systick_get();
}
#endif
/*Add notifications if something is critical*/
static bool mem_warn_report = false;
if(mem_mon.size_free < LV_APP_SYSMON_MEM_WARN && mem_warn_report == false) {
mem_warn_report = true;
lv_app_notice_add("Critically low memory");
}
if(mem_mon.size_free > LV_APP_SYSMON_MEM_WARN) mem_warn_report = false;
static bool frag_warn_report = false;
if(mem_mon.pct_frag > LV_APP_SYSMON_FRAG_WARN) {
if(frag_warn_report == false) {
frag_warn_report = true;
lv_app_notice_add("Critical memory\nfragmentation");
dm_defrag(); /*Defrag. if the fragmentation is critical*/
}
}
if(mem_mon.pct_frag < LV_APP_SYSMON_FRAG_WARN) frag_warn_report = false;
#endif
}
/**
* Refresh the shortcuts and windows.
*/
static void lv_app_sysmon_refr(void)
{
char buf_long[256];
char buf_short[128];
sprintf(buf_long, "%c%s CPU: %d %%%c\n\n",TXT_RECOLOR_CMD, CPU_LABEL_COLOR, cpu_pct[LV_APP_SYSMON_PNUM - 1], TXT_RECOLOR_CMD);
sprintf(buf_short, "CPU: %d %%\n", cpu_pct[LV_APP_SYSMON_PNUM - 1]);
#if USE_DYN_MEM != 0 && DM_CUSTOM == 0
sprintf(buf_long, "%s%c%s MEMORY: %d %%%c\nTotal: %d bytes\nUsed: %d bytes\nFree: %d bytes\nFrag: %d %%",
buf_long,
TXT_RECOLOR_CMD,
MEM_LABEL_COLOR,
mem_pct[LV_APP_SYSMON_PNUM - 1],
TXT_RECOLOR_CMD,
(int)mem_mon.size_total,
(int)mem_mon.size_total - mem_mon.size_free, mem_mon.size_free, mem_mon.pct_frag);
sprintf(buf_short, "%sMem: %d %%\nFrag: %d %%\n",
buf_short, mem_pct[LV_APP_SYSMON_PNUM - 1], mem_mon.pct_frag);
#else
sprintf(buf_long, "%s%c%s MEMORY: N/A%c", buf_long, TXT_RECOLOR_CMD, MEM_LABEL_COLOR, TXT_RECOLOR_CMD);
sprintf(buf_short, "%sMem: N/A\nFrag: N/A", buf_short);
#endif
lv_app_inst_t * app;
app = lv_app_get_next(NULL, &my_app_dsc);
while(app != NULL) {
/*Refresh the windows*/
my_win_data_t * win_data = app->win_data;
if(win_data != NULL) {
lv_label_set_text(win_data->label, buf_long);
lv_chart_set_next(win_data->chart, win_data->mem_dl, mem_pct[LV_APP_SYSMON_PNUM - 1]);
lv_chart_set_next(win_data->chart, win_data->cpu_dl, cpu_pct[LV_APP_SYSMON_PNUM - 1]);
}
/*Refresh the shortcut*/
my_sc_data_t * sc_data = app->sc_data;
if(sc_data != NULL) {
lv_bar_set_value(sc_data->bar_cpu, cpu_pct[LV_APP_SYSMON_PNUM - 1]);
lv_bar_set_value(sc_data->bar_mem, mem_pct[LV_APP_SYSMON_PNUM - 1]);
}
lv_app_com_send(app, LV_APP_COM_TYPE_CHAR, buf_short, strlen(buf_short));
app = lv_app_get_next(app, &my_app_dsc);
}
}
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_SYSMON != 0*/

View File

@@ -1,47 +0,0 @@
/**
* @file lv_app_example.h
*
*/
#ifndef LV_APP_SYSMON_H
#define LV_APP_SYSMON_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_SYSMON != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
}lv_app_sysmon_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_sysmon_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_SYSMON != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_SYSMON_H */

View File

@@ -1,498 +0,0 @@
/**
* @file lv_app_terminal.c
*
*/
/*********************
* INCLUDES
*********************/
#include <lv_conf.h>
#include <misc/gfx/area.h>
#include <lvgl/lv_obj/lv_dispi.h>
#include <lvgl/lv_obj/lv_obj.h>
#include <lvgl/lv_objx/lv_btn.h>
#include <lvgl/lv_objx/lv_cont.h>
#include <lvgl/lv_objx/lv_ddlist.h>
#include <lvgl/lv_objx/lv_label.h>
#include <lvgl/lv_objx/lv_page.h>
#include <lvgl/lv_objx/lv_ta.h>
#include <misc/gfx/color.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "lv_app_terminal.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_TERMINAL != 0
#include "lvgl/lv_app/lv_app_util/lv_app_kb.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
#define OBJ_PAD (LV_DPI / 12)
#define AUTO_CONNECT_TCP_DELAY 5000 /*Wait before TCS server connect when the WiFi connect is ready*/
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
char txt[LV_APP_TERMINAL_LENGTH + 1];
lv_app_com_type_t com_type;
lv_app_terminal_format_t format;
lv_app_inst_t * last_sender;
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
lv_obj_t * label;
lv_obj_t * ta;
lv_obj_t * clear_btn;
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * label;
}my_sc_data_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec, lv_app_com_type_t type , const void * data, uint32_t size);
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc);
static void my_sc_close(lv_app_inst_t * app);
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win);
static void my_win_close(lv_app_inst_t * app);
static void my_conf_open(lv_app_inst_t * app, lv_obj_t * conf_win);
static void add_data(lv_app_inst_t * app, const void * data, uint16_t data_len);
static lv_action_res_t win_ta_rel_action(lv_obj_t * ta, lv_dispi_t * dispi);
static lv_action_res_t win_comtype_action(lv_obj_t * ddlist, lv_dispi_t * dispi);
static lv_action_res_t win_format_action(lv_obj_t * ddlist, lv_dispi_t * dispi);
static lv_action_res_t win_clear_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static void win_ta_kb_ok_action(lv_obj_t * ta);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "Terminal",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = my_win_open,
.win_close = my_win_close,
.sc_open = my_sc_open,
.sc_close = my_sc_close,
.conf_open = my_conf_open,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
static const char * com_type_list_txt[] = {"Character", "Integer", "Log", "None", ""};
static lv_app_com_type_t com_type_list[] = {LV_APP_COM_TYPE_CHAR, LV_APP_COM_TYPE_INT, LV_APP_COM_TYPE_LOG, LV_APP_COM_TYPE_INV};
static const char * txt_format_list_txt[] = {"ASCII", "Hexadecimal", ""};
static lv_style_t style_sc_term;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_terminal_init(void)
{
lv_style_get(LV_STYLE_PLAIN, &style_sc_term);
style_sc_term.line_space = 0;
style_sc_term.letter_space = 0;
style_sc_term.txt_align = 0;
style_sc_term.ccolor = COLOR_WHITE;
style_sc_term.mcolor = COLOR_MAKE(0x20, 0x20, 0x20);
style_sc_term.gcolor = COLOR_MAKE(0x20, 0x20, 0x20);
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_example_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
/*Initialize the application*/
my_app_data_t * app_data = app->app_data;
if(conf != NULL) {
app_data->com_type = ((lv_app_terminal_conf_t * ) conf)->com_type;
app_data->format = ((lv_app_terminal_conf_t * ) conf)->format;
} else {
app_data->com_type = LV_APP_COM_TYPE_CHAR;
app_data->format = LV_APP_TERMINAL_FORMAT_ASCII;
}
app_data->last_sender = NULL;
memset(app_data->txt, 0, sizeof(app_data->txt));
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
}
/**
* Read the data have been sent to this applicationstring
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
my_app_data_t * app_data = app_rec->app_data;
/*Add the received data if the type is matches*/
if(type == app_data->com_type) {
/*Insert the name of the sender application if it is not the last*/
if(app_data->last_sender != app_send) {
add_data(app_rec, "\n@", 2);
add_data(app_rec, app_send->name, strlen(app_send->name));
add_data(app_rec, "\n", 1);
}
if(app_data->format == LV_APP_TERMINAL_FORMAT_HEX) {
char hex_buf[8];
const char * data_buf = data;
uint32_t i;
for(i = 0; i < size; i++) {
sprintf(hex_buf, "%02x", data_buf[i]);
add_data(app_rec, hex_buf, 2);
}
} else {
add_data(app_rec, data, size);
}
}
app_data->last_sender = app_send;
}
/**
* Open a shortcut for an application
* @param app pointer to an application
* @param sc pointer to an object where the application
* can create content of the shortcut
*/
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
{
my_sc_data_t * sc_data = app->sc_data;
my_app_data_t * app_data = app->app_data;
/*Create a dark background*/
lv_obj_t * txt_bg = lv_obj_create(sc, NULL);
lv_obj_set_size(txt_bg, 7 * LV_APP_SC_WIDTH / 8 , app->sc->cords.y2 - app->sc_title->cords.y2 - 10 * LV_DOWNSCALE);
lv_obj_set_style(txt_bg, &style_sc_term);
lv_obj_align(txt_bg, app->sc_title, LV_ALIGN_OUT_BOTTOM_MID, 0, 3 * LV_DOWNSCALE);
lv_obj_set_click(txt_bg, false);
/*Add a text with the text of the terminal*/
sc_data->label = lv_label_create(txt_bg, NULL);
lv_label_set_long_mode(sc_data->label, LV_LABEL_LONG_BREAK);
lv_obj_set_width(sc_data->label, lv_obj_get_width(txt_bg) - LV_APP_SC_WIDTH / 8);
lv_label_set_text_static(sc_data->label, app_data->txt);
lv_obj_align(sc_data->label, txt_bg, LV_ALIGN_IN_BOTTOM_MID, 0, 0);
}
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
static void my_sc_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_sc_data'*/
}
/**
* Open the application in a window
* @param app pointer to an application
* @param win pointer to a window object where
* the application can create content
*/
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{
my_win_data_t * win_data = app->win_data;
my_app_data_t * app_data = app->app_data;
/*Make the window content responsive*/
lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY);
/*Create a label for the text of the terminal*/
win_data->label = lv_label_create(win, NULL);
lv_label_set_long_mode(win_data->label, LV_LABEL_LONG_BREAK);
lv_obj_set_width(win_data->label, lv_win_get_width(win));
lv_label_set_text_static(win_data->label, app_data->txt); /*Use the app. data text directly*/
/*Create a text area. Text can be added to the terminal from here by app. keyboard.*/
win_data->ta = lv_ta_create(win, NULL);
lv_obj_set_size(win_data->ta, 3 * LV_HOR_RES / 5, LV_VER_RES / 4);
lv_obj_set_free_p(win_data->ta, app);
lv_page_set_rel_action(win_data->ta, win_ta_rel_action);
lv_page_glue_obj(win_data->ta, true);
lv_ta_set_text(win_data->ta, "");
/*Create a clear button*/
win_data->clear_btn = lv_btn_create(win, NULL);
lv_cont_set_fit(win_data->clear_btn, true, true);
lv_obj_set_free_p(win_data->clear_btn, app);
lv_page_glue_obj(win_data->ta, true);
lv_btn_set_rel_action(win_data->clear_btn, win_clear_rel_action);
lv_obj_t * btn_label = lv_label_create(win_data->clear_btn, NULL);
lv_label_set_text(btn_label, "Clear");
/*Align the window to see the text area on the bottom*/
lv_obj_t * page = lv_win_get_page(app->win);
lv_obj_align(lv_page_get_scrl(page), NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, - LV_VER_RES);
}
/**
* Close the window of an application
* @param app pointer to an application
*/
static void my_win_close(lv_app_inst_t * app)
{
}
/**
* Create objects to configure the applications
* @param app pointer to an application which settings should be created
* @param conf_win pointer to a window where the objects can be created
* (the window has the proper layout)
*/
static void my_conf_open(lv_app_inst_t * app, lv_obj_t * conf_win)
{
my_app_data_t * app_data = app->app_data;
lv_obj_t * label;
label = lv_label_create(conf_win, NULL);
lv_label_set_text(label, "Communication type");
lv_obj_t * ddl;
ddl = lv_ddlist_create(conf_win, NULL);
lv_obj_set_free_p(ddl, app);
lv_ddlist_set_options(ddl, com_type_list_txt);
lv_ddlist_set_action(ddl, win_comtype_action);
lv_ddlist_set_selected(ddl, app_data->com_type);
label = lv_label_create(conf_win, label);
lv_label_set_text(label, "\nText format"); /*First '\n' keeps space from the list above*/
ddl = lv_ddlist_create(conf_win, ddl);
lv_ddlist_set_options(ddl, txt_format_list_txt);
lv_ddlist_set_selected(ddl, app_data->format);
lv_ddlist_set_action(ddl, win_format_action);
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
/**
* Called when the Text area is released to open the app. keybard
* @param ta pointer to the text area
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the text area is not deleted
*/
static lv_action_res_t win_ta_rel_action(lv_obj_t * ta, lv_dispi_t * dispi)
{
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE, NULL, win_ta_kb_ok_action);
return LV_ACTION_RES_OK;
}
/**
* Called when an option is chosen in the communication type drop down list on the configuration window
* @param ddl pointer to the drop down list
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the list is not deleted
*/
static lv_action_res_t win_comtype_action(lv_obj_t * ddlist, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(ddlist);
my_app_data_t * app_data = app->app_data;
app_data->com_type = com_type_list[lv_ddlist_get_selected(ddlist)];
return LV_ACTION_RES_OK;
}
/**
* Called when an option is chosen in the format drop down list on the configuration window
* @param ddl pointer to the drop down list
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the list is not deleted
*/
static lv_action_res_t win_format_action(lv_obj_t * ddlist, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(ddlist);
my_app_data_t * app_data = app->app_data;
uint16_t opt = lv_ddlist_get_selected(ddlist);
if(strcmp(txt_format_list_txt[opt], "Hexadecimal") == 0) {
app_data->format = LV_APP_TERMINAL_FORMAT_HEX;
} else if (strcmp(txt_format_list_txt[opt], "ASCII") == 0) {
app_data->format = LV_APP_TERMINAL_FORMAT_ASCII;
}
return LV_ACTION_RES_OK;
}
/**
* Called when the Clear button is released to clear the text of the terminal
* @param btn pointer to the clear button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK because the button is not deleted
*/
static lv_action_res_t win_clear_rel_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(btn);
my_app_data_t * app_data = app->app_data;
my_win_data_t * win_data = app->win_data;
my_sc_data_t * sc_data = app->sc_data;
app_data->txt[0] = '\0';
if(sc_data != NULL) {
lv_label_set_text_static(sc_data->label, app_data->txt);
lv_obj_align(sc_data->label, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
}
if(win_data != NULL) {
lv_label_set_text_static(win_data->label, app_data->txt);
lv_obj_t * page = lv_win_get_page(app->win);
lv_obj_align(lv_page_get_scrl(page), NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, - LV_VER_RES);
}
return LV_ACTION_RES_OK;
}
/**
* Called when the 'Ok' button of the keyboard in the window
* is pressed to write to the Terminal
* @param ta pointer to the Text area in the window
*/
static void win_ta_kb_ok_action(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * app_data = app->app_data;
const char * ta_txt = lv_ta_get_txt(ta);
uint32_t ta_txt_len = strlen(ta_txt);
if(app_data->txt[0] != '\0') add_data(app, "\n", 1);
add_data(app, ">", 1);
add_data(app, ta_txt, ta_txt_len);
lv_app_com_send(app, app_data->com_type, ta_txt, ta_txt_len);
lv_ta_set_text(ta, "");
app_data->last_sender = NULL; /*Now the least data in the terminal is from this app*/
}
/**
* Add data to the terminal
* @param app pointer to a Terminal application
* @param data pointer to the data
* @param data_len length of 'data' in bytes
*/
static void add_data(lv_app_inst_t * app, const void * data, uint16_t data_len)
{
my_app_data_t * app_data = app->app_data;
uint16_t old_len = strlen(app_data->txt);
const char * txt = data;
/*IF the data is longer then the terminal ax size show the last part of data*/
if(data_len > LV_APP_TERMINAL_LENGTH) {
txt += (data_len - LV_APP_TERMINAL_LENGTH);
data_len = LV_APP_TERMINAL_LENGTH;
old_len = 0;
}
/*If the text become too long 'forget' the oldest lines*/
else if(old_len + data_len > LV_APP_TERMINAL_LENGTH) {
uint16_t new_start;
for(new_start = 0; new_start < old_len; new_start++) {
if(app_data->txt[new_start] == '\n') {
/*If there is enough space break*/
if(new_start >= data_len) {
/*Ignore line breaks*/
while(app_data->txt[new_start] == '\n' || app_data->txt[new_start] == '\r') new_start++;
break;
}
}
}
/* If it wasn't able to make enough space on line breaks
* simply forget the oldest characters*/
if(new_start == old_len) {
new_start = old_len - (LV_APP_TERMINAL_LENGTH - data_len);
}
/*Move the remaining text to the beginning*/
uint16_t j;
for(j = new_start; j < old_len; j++) {
app_data->txt[j - new_start] = app_data->txt[j];
}
old_len = old_len - new_start;
app_data->txt[old_len] = '\0';
}
memcpy(&app_data->txt[old_len], txt, data_len);
app_data->txt[old_len + data_len] = '\0';
my_win_data_t * win_data = app->win_data;
my_sc_data_t * sc_data = app->sc_data;
if(win_data != NULL) {
lv_label_set_text_static(win_data->label, app_data->txt);
lv_obj_t * page = lv_win_get_page(app->win);
lv_obj_align(lv_page_get_scrl(page), NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, - LV_VER_RES);
}
/*Set the last line on the shortcut*/
if(sc_data != NULL) {
lv_label_set_text_static(sc_data->label, app_data->txt);
lv_obj_align(sc_data->label, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0);
}
}
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_TERMINAL != 0*/

View File

@@ -1,54 +0,0 @@
/**
* @file lv_app_terminal.h
*
*/
#ifndef LV_APP_TERMINAL_H
#define LV_APP_TERMINAL_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_TERMINAL != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef enum
{
LV_APP_TERMINAL_FORMAT_ASCII,
LV_APP_TERMINAL_FORMAT_HEX,
}lv_app_terminal_format_t;
typedef struct
{
lv_app_terminal_format_t format; /*Data display format*/
lv_app_com_type_t com_type; /*The listened communication type (channel) */
}lv_app_terminal_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_terminal_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_TERMINAL != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_TERMINAL_H */

View File

@@ -1,593 +0,0 @@
/**
* @file lv_app_wifi.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_app_wifi.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_WIFI != 0
#include "../lv_app/lv_app_util/lv_app_kb.h"
#include "hal/wifi/wifi.h"
#include "misc/os/ptask.h"
#include "hal/systick/systick.h"
#include "misc/comm/wifimng.h"
#include "misc/fs/fat32/integer.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
#define SSID_LIST_MAX_LENGTH 512
#define WIFI_MONITOR_PERIOD 1000 /*ms*/
/**********************
* TYPEDEFS
**********************/
/*Application specific data for an instance of this application*/
typedef struct
{
char set_ssid[64];
char set_pwd[64];
char set_ip[32];
char set_port[16];
uint8_t * last_msg_dp;
uint16_t last_msg_size;
}my_app_data_t;
/*Application specific data a window of this application*/
typedef struct
{
lv_obj_t * list;
lv_obj_t * title;
lv_obj_t * netw_ssid_ta;
lv_obj_t * netw_pwd_ta;
lv_obj_t * tcp_ip_ta;
lv_obj_t * tcp_port_ta;
}my_win_data_t;
/*Application specific data for a shortcut of this application*/
typedef struct
{
lv_obj_t * label;
}my_sc_data_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void my_app_run(lv_app_inst_t * app, void * conf);
static void my_app_close(lv_app_inst_t * app);
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec, lv_app_com_type_t type , const void * data, uint32_t size);
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc);
static void my_sc_close(lv_app_inst_t * app);
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win);
static void my_win_close(lv_app_inst_t * app);
static void wifi_state_monitor_task(void * param);
static lv_action_res_t netw_list_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t netw_con_rel_action(lv_obj_t * btn, lv_dispi_t* dispi);
static lv_action_res_t netw_ssid_rel_action( lv_obj_t * ta, lv_dispi_t* dispi);
static lv_action_res_t netw_pwd_rel_action( lv_obj_t * ta, lv_dispi_t* dispi);
static lv_action_res_t tcp_ip_rel_action( lv_obj_t * ta, lv_dispi_t* dispi);
static lv_action_res_t tcp_port_rel_action( lv_obj_t * ta, lv_dispi_t* dispi);
static lv_action_res_t wifi_ap_select_action( lv_obj_t * ddlist, lv_dispi_t* dispi);
static void netw_ssid_kb_ok(lv_obj_t * ta);
static void netw_ssid_kb_close(lv_obj_t * ta);
static void netw_pwd_kb_ok(lv_obj_t * ta);
static void netw_pwd_kb_close(lv_obj_t * ta);
static void tcp_ip_kb_ok(lv_obj_t * ta);
static void tcp_ip_kb_close(lv_obj_t * ta);
static void tcp_port_kb_ok(lv_obj_t * ta);
static void tcp_port_kb_close(lv_obj_t * ta);
static void list_cb(wifi_state_t state, const char * txt);
static void tcp_transf_cb(wifi_state_t state, const char * txt);
static void win_title_refr(void);
static void save_conf(lv_app_inst_t * app);
/**********************
* STATIC VARIABLES
**********************/
static lv_app_dsc_t my_app_dsc =
{
.name = "WiFi",
.mode = LV_APP_MODE_NONE,
.app_run = my_app_run,
.app_close = my_app_close,
.com_rec = my_com_rec,
.win_open = my_win_open,
.win_close = my_win_close,
.sc_open = my_sc_open,
.sc_close = my_sc_close,
.app_data_size = sizeof(my_app_data_t),
.sc_data_size = sizeof(my_sc_data_t),
.win_data_size = sizeof(my_win_data_t),
};
static char def_ssid[64];
static char def_pwd[64];
static char def_ip[32];
static char def_port[16];
static char ssid_list[SSID_LIST_MAX_LENGTH];
static lv_app_inst_t * app_act_com;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the application
* @return pointer to the application descriptor of this application
*/
const lv_app_dsc_t * lv_app_wifi_init(void)
{
strcpy(ssid_list, "");
#ifdef LV_APP_WIFI_CONF_PATH
fs_file_t f;
fs_res_t res;
res = fs_open(&f, LV_APP_WIFI_CONF_PATH, FS_MODE_RD);
if(res == FS_RES_NOT_EX) {
res = fs_open(&f, LV_APP_WIFI_CONF_PATH, FS_MODE_WR | FS_MODE_RD);
if(res == FS_RES_OK) {
const char * def_conf = "ssid\npwd\n100.101.102.103\n1234";
fs_write(&f, def_conf, strlen(def_conf) + 1, NULL);
fs_seek(&f, 0);
}
}
if(res == FS_RES_OK) {
volatile char buf[256];
volatile uint32_t rn;
fs_read(&f, (char *)buf, sizeof(buf) - 1, (uint32_t *)&rn);
volatile uint16_t i;
volatile uint16_t j = 0;
volatile uint8_t line_cnt = 0;
for(i = 0; i < rn; i++) {
if(buf[i] != '\n') {
if(line_cnt == 0) def_ssid[j] = buf[i];
if(line_cnt == 1) def_pwd[j] = buf[i];
if(line_cnt == 2) def_ip[j] = buf[i];
if(line_cnt == 3) def_port[j] = buf[i];
j++;
} else {
if(line_cnt == 0) def_ssid[j] = '\0';
if(line_cnt == 1) def_pwd[j] = '\0';
if(line_cnt == 2) def_ip[j] = '\0';
if(line_cnt == 3) def_port[j] = '\0';
j = 0;
line_cnt ++;
}
}
fs_close(&f);
} else {
lv_app_notice_add("SD card error");
}
#else
strcpy(def_ssid, LV_APP_WIFI_SSID_DEF);
strcpy(def_pwd, LV_APP_WIFI_PWD_DEF);
strcpy(def_ip, LV_APP_WIFI_IP_DEF);
strcpy(def_port, LV_APP_WIFI_PORT_DEF);
#endif
#if LV_APP_WIFI_AUTO_CONNECT != 0
wifimng_set_last_netw(def_ssid, def_pwd);
wifimng_set_last_tcp(def_ip, def_port);
#endif
ptask_create(wifi_state_monitor_task, WIFI_MONITOR_PERIOD, PTASK_PRIO_LOW, NULL);
return &my_app_dsc;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Run an application according to 'app_dsc'
* @param app_dsc pointer to an application descriptor
* @param conf pointer to a lv_app_example_conf_t structure with configuration data or NULL if unused
* @return pointer to the opened application or NULL if any error occurred
*/
static void my_app_run(lv_app_inst_t * app, void * conf)
{
/*Initialize the application*/
my_app_data_t * adata = app->app_data;
strcpy(adata->set_ssid, def_ssid);
strcpy(adata->set_pwd, def_pwd);
strcpy(adata->set_ip, def_ip);
strcpy(adata->set_port, def_port);
adata->last_msg_dp = NULL;
adata->last_msg_size = 0;
}
/**
* Close a running application.
* Close the Window and the Shortcut too if opened.
* Free all the allocated memory by this application.
* @param app pointer to an application
*/
static void my_app_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_app_data'*/
}
/**
* Read the data have been sent to this application
* @param app_send pointer to an application which sent the message
* @param app_rec pointer to an application which is receiving the message
* @param type type of data from 'lv_app_com_type_t' enum
* @param data pointer to the sent data
* @param size length of 'data' in bytes
*/
static void my_com_rec(lv_app_inst_t * app_send, lv_app_inst_t * app_rec,
lv_app_com_type_t type , const void * data, uint32_t size)
{
if(type == LV_APP_COM_TYPE_CHAR) { /*data: string*/
app_act_com = app_rec;
my_app_data_t * adata = app_act_com->app_data;
if(adata->last_msg_dp != NULL) dm_free(adata->last_msg_dp);
adata->last_msg_dp = dm_alloc(size);
memcpy(adata->last_msg_dp, data, size);
adata->last_msg_size = size;
wifi_tcp_transf(data, size, tcp_transf_cb);
}
}
/**
* Open a shortcut for an application
* @param app pointer to an application
* @param sc pointer to an object where the application
* can create content of the shortcut
*/
static void my_sc_open(lv_app_inst_t * app, lv_obj_t * sc)
{
my_sc_data_t * sc_data = app->sc_data;
sc_data->label = lv_label_create(sc, NULL);
lv_label_set_text(sc_data->label, "Empty");
lv_obj_align(sc_data->label, NULL, LV_ALIGN_CENTER, 0, 0);
}
/**
* Close the shortcut of an application
* @param app pointer to an application
*/
static void my_sc_close(lv_app_inst_t * app)
{
/*No dynamically allocated data in 'my_sc_data'*/
}
/**
* Open the application in a window
* @param app pointer to an application
* @param win pointer to a window object where
* the application can create content
*/
static void my_win_open(lv_app_inst_t * app, lv_obj_t * win)
{
my_app_data_t * adata = app->app_data;
my_win_data_t * wdata = app->win_data;
wdata->title = lv_label_create(win, NULL);
wdata->list = lv_ddlist_create(win, NULL);
lv_obj_set_free_p(wdata->list, app);
lv_ddlist_set_options_str(wdata->list, ssid_list);
lv_ddlist_set_action(wdata->list, wifi_ap_select_action);
lv_obj_t * list_btn = lv_btn_create(win, NULL);
lv_obj_set_free_p(list_btn, app);
lv_btn_set_rel_action(list_btn, netw_list_rel_action);
lv_obj_t * label = lv_label_create(list_btn, NULL);
lv_label_set_text(label, "List\nrefresh");
lv_obj_t * ta_cont = lv_cont_create(win, NULL);
lv_cont_set_fit(ta_cont, true, true);
lv_cont_set_layout(ta_cont, LV_CONT_LAYOUT_COL_L);
lv_obj_set_style(ta_cont, lv_style_get(LV_STYLE_TRANSP_TIGHT, NULL));
wdata->netw_ssid_ta = lv_ta_create(ta_cont, NULL);
lv_cont_set_fit(wdata->netw_ssid_ta, false, true);
lv_obj_set_free_p(wdata->netw_ssid_ta, app);
lv_page_set_rel_action(wdata->netw_ssid_ta, netw_ssid_rel_action);
lv_ta_set_text(wdata->netw_ssid_ta, adata->set_ssid);
lv_ta_set_cursor_show(wdata->netw_ssid_ta, false);
wdata->netw_pwd_ta = lv_ta_create(ta_cont, wdata->netw_ssid_ta);
lv_page_set_rel_action(wdata->netw_pwd_ta, netw_pwd_rel_action);
lv_ta_set_text(wdata->netw_pwd_ta, adata->set_pwd);
wdata->tcp_ip_ta = lv_ta_create(ta_cont, wdata->netw_ssid_ta);
lv_page_set_rel_action(wdata->tcp_ip_ta, tcp_ip_rel_action);
lv_ta_set_text(wdata->tcp_ip_ta, adata->set_ip);
wdata->tcp_port_ta = lv_ta_create(ta_cont, wdata->netw_ssid_ta);
lv_page_set_rel_action(wdata->tcp_port_ta, tcp_port_rel_action);
lv_ta_set_text(wdata->tcp_port_ta, adata->set_port);
lv_obj_t * con_btn = lv_btn_create(win, NULL);
lv_obj_set_free_p(con_btn, app);
lv_btn_set_rel_action(con_btn, netw_con_rel_action);
label = lv_label_create(con_btn, NULL);
lv_label_set_text(label, "Connect");
lv_cont_set_layout(lv_page_get_scrl(lv_win_get_page(win)), LV_CONT_LAYOUT_PRETTY);
win_title_refr();
}
/**
* Close the window of an application
* @param app pointer to an application
*/
static void my_win_close(lv_app_inst_t * app)
{
}
/*--------------------
* OTHER FUNCTIONS
---------------------*/
static void wifi_state_monitor_task(void * param)
{
static wifimng_state_t state_prev = WIFIMNG_STATE_WAIT;
wifimng_state_t state_act = wifimng_get_state();
if(state_prev != state_act && state_act == WIFIMNG_STATE_READY) {
lv_app_notice_add("WiFi connected to:\n%s\n%s:%s",
wifimng_get_last_ssid(), wifimng_get_last_ip(), wifimng_get_last_port());
win_title_refr();
}
/* The wifi should be busy if there is sg. to send.
* It means fail during last send. Try again*/
if(app_act_com != NULL) {
if(wifi_busy() == false && state_act == WIFIMNG_STATE_READY) {
/*Try to send the message again*/
lv_app_notice_add("Resend WiFi message");
my_app_data_t * adata = app_act_com->app_data;
wifi_tcp_transf(adata->last_msg_dp, adata->last_msg_size, tcp_transf_cb);
}
}
state_prev = state_act;
}
static lv_action_res_t netw_list_rel_action(lv_obj_t * btn, lv_dispi_t* dispi)
{
wifi_state_t ret;
ret = wifi_netw_list(list_cb);
if(ret == WIFI_STATE_OK) {
lv_app_notice_add("Listing WiFi networks");
} else {
lv_app_notice_add("Cannot list networks\nWiFi was busy. Try again");
}
return LV_ACTION_RES_OK;
}
static lv_action_res_t netw_con_rel_action(lv_obj_t * btn, lv_dispi_t* dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(btn);
my_app_data_t * adata = app->app_data;
wifimng_set_last_netw(adata->set_ssid, adata->set_pwd);
wifimng_set_last_tcp(adata->set_ip, adata->set_port);
wifimng_reconnect();
save_conf(app);
lv_app_notice_add("Connecting to WiFi network\n%s, %s:%s",
adata->set_ssid, adata->set_ip, adata->set_port);
return LV_ACTION_RES_OK;
}
static lv_action_res_t netw_ssid_rel_action( lv_obj_t * ta, lv_dispi_t* dispi)
{
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE | LV_APP_KB_MODE_CUR_MANAGE, netw_ssid_kb_close ,netw_ssid_kb_ok);
return LV_ACTION_RES_OK;
}
static lv_action_res_t netw_pwd_rel_action( lv_obj_t * ta, lv_dispi_t* dispi)
{
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE | LV_APP_KB_MODE_CUR_MANAGE, netw_pwd_kb_close ,netw_pwd_kb_ok);
return LV_ACTION_RES_OK;
}
static lv_action_res_t tcp_ip_rel_action( lv_obj_t * ta, lv_dispi_t* dispi)
{
lv_app_kb_open(ta, LV_APP_KB_MODE_TXT | LV_APP_KB_MODE_WIN_RESIZE | LV_APP_KB_MODE_CUR_MANAGE, tcp_ip_kb_close ,tcp_ip_kb_ok);
return LV_ACTION_RES_OK;
}
static lv_action_res_t tcp_port_rel_action( lv_obj_t * ta, lv_dispi_t* dispi)
{
lv_app_kb_open(ta, LV_APP_KB_MODE_NUM | LV_APP_KB_MODE_WIN_RESIZE | LV_APP_KB_MODE_CUR_MANAGE, tcp_port_kb_close ,tcp_port_kb_ok);
return LV_ACTION_RES_OK;
}
static lv_action_res_t wifi_ap_select_action( lv_obj_t * ddlist, lv_dispi_t* dispi)
{
lv_app_inst_t * app = lv_obj_get_free_p(ddlist);
my_app_data_t * adata = app->app_data;
char ssid[256];
lv_ddlist_get_selected_str(ddlist, ssid);
my_win_data_t * wdata = app->win_data;
lv_ta_set_text(wdata->netw_ssid_ta, ssid);
strcpy(adata->set_ssid, ssid);
return LV_ACTION_RES_OK;
}
static void netw_ssid_kb_ok(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
strcpy(adata->set_ssid, lv_ta_get_txt(ta));
}
static void netw_ssid_kb_close(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
lv_ta_set_text(ta, adata->set_ssid);
}
static void netw_pwd_kb_ok(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
strcpy(adata->set_pwd, lv_ta_get_txt(ta));
}
static void netw_pwd_kb_close(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
lv_ta_set_text(ta, adata->set_pwd);
}
static void tcp_ip_kb_ok(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
strcpy(adata->set_ip, lv_ta_get_txt(ta));
}
static void tcp_ip_kb_close(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
lv_ta_set_text(ta, adata->set_ip);
}
static void tcp_port_kb_ok(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
strcpy(adata->set_port, lv_ta_get_txt(ta));
}
static void tcp_port_kb_close(lv_obj_t * ta)
{
lv_app_inst_t * app = lv_obj_get_free_p(ta);
my_app_data_t * adata = app->app_data;
lv_ta_set_text(ta, adata->set_port);
}
static void list_cb(wifi_state_t state, const char * txt)
{
if(state == WIFI_STATE_OK) {
if(txt[0] == '\0') {
lv_app_notice_add("WiFi network list ready");
return;
}
if(strlen(ssid_list) + strlen(txt) + 4 < sizeof(ssid_list)) {
sprintf(ssid_list, "%s\n%s", ssid_list, txt);
}
lv_app_inst_t * app = lv_app_get_next(NULL, &my_app_dsc);
while(app != NULL) {
if(app->win_data != NULL) {
my_win_data_t * wdata = app->win_data;
lv_ddlist_set_options_str(wdata->list, ssid_list);
}
app = lv_app_get_next(app, &my_app_dsc);
}
} else if(state == WIFI_STATE_ERROR) {
lv_app_notice_add("WiFi network list error\n%s", txt);
}
}
static void tcp_transf_cb(wifi_state_t state, const char * txt)
{
if(state == WIFI_STATE_OK) {
uint16_t size = txt[0] + ((txt[1] << 8) & 0xFF00);
char buf[256];
memcpy(buf, &txt[2], size);
buf[size] = '\0';
lv_app_com_send(app_act_com, LV_APP_COM_TYPE_CHAR, &txt[2], size);
my_app_data_t * adata = app_act_com->app_data;
dm_free(adata->last_msg_dp);
adata->last_msg_dp = NULL;
adata->last_msg_size = 0;
app_act_com = NULL;
}else if(state == WIFI_STATE_ERROR) {
lv_app_notice_add("WiFi TCP transfer error\n%s", txt);
lv_app_notice_add("Reconnecting to WiFi...");
wifimng_reconnect();
}
}
static void win_title_refr(void)
{
lv_app_inst_t * app;
app = lv_app_get_next(NULL, &my_app_dsc);
while(app != NULL) {
if(app->win != NULL) {
my_win_data_t * wdata = app->win_data;
if(wifimng_get_state() == WIFIMNG_STATE_IDLE) {
lv_label_set_text(wdata->title, "Not connected");
}
else if(wifimng_get_state() == WIFIMNG_STATE_READY) {
char buf[256];
sprintf(buf, "%s - %s:%s", wifimng_get_last_ssid(), wifimng_get_last_ip(), wifimng_get_last_port());
lv_label_set_text(wdata->title, buf);
}
else {
lv_label_set_text(wdata->title, "Connecting ...");
}
lv_obj_set_width(wdata->title, lv_win_get_width(app->win));
}
app = lv_app_get_next(app, &my_app_dsc);
}
}
static void save_conf(lv_app_inst_t * app)
{
#ifdef LV_APP_WIFI_CONF_PATH
my_app_data_t * adata = app->app_data;
fs_file_t f;
fs_res_t res;
res = fs_open(&f, LV_APP_WIFI_CONF_PATH, FS_MODE_WR);
if(res == FS_RES_OK) {
char buf[256];
sprintf(buf,"%s\n%s\n%s\n%s", adata->set_ssid, adata->set_pwd, adata->set_ip, adata->set_port);
fs_write(&f, buf, strlen(buf) + 1, NULL);
fs_close(&f);
}
#endif
}
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0*/

View File

@@ -1,47 +0,0 @@
/**
* @file lv_app_example.h
*
*/
#ifndef LV_APP_WIFI_H
#define LV_APP_WIFI_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lvgl/lv_app/lv_app.h"
#if LV_APP_ENABLE != 0 && USE_LV_APP_WIFI != 0
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
}lv_app_wifi_conf_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
const lv_app_dsc_t * lv_app_wifi_init(void);
/**********************
* MACROS
**********************/
#endif /*LV_APP_ENABLE != 0 && USE_LV_APP_EXAMPLE != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* LV_APP_EXAMPLE_H */

View File

@@ -1,296 +0,0 @@
/**
* @file lv_conf.h
*
*/
#if 0 /*Remove this to enable the content (Delete the last #endif too!)*/
#ifndef LV_CONF_H
#define LV_CONF_H
/*===================
Graphical settings
*=====================*/
/* Horizontal and vertical resolution of the library.
* Screen resolution multiplied by LV_DOWN_SCALE*/
#define LV_HOR_RES (320 * LV_DOWNSCALE)
#define LV_VER_RES (240 * LV_DOWNSCALE)
#define LV_DPI (80 * LV_DOWNSCALE)
/* Enable anti-aliasing
* If enabled everything will half-sized
* Use LV_DOWNSCALE to compensate he down scaling effect of anti-aliasing*/
#define LV_ANTIALIAS 1
#define LV_DOWNSCALE (1 << LV_ANTIALIAS) /*Set the downscaling value*/
/* Buffered rendering: >= LV_DOWNSCALE * LV_HOR_RES or 0 to disable buffering*/
#define LV_VDB_SIZE (LV_HOR_RES * LV_VER_RES / 20)
#if LV_VDB_SIZE
/* Double virtual buffering
* One for rendering another to transfer former rendered image to frame buffer in the background*/
#define LV_VDB_DOUBLE 0
#endif
#define LV_REFR_PERIOD 40 /*Screen refresh period in milliseconds*/
#define LV_INV_FIFO_SIZE 32 /*The average number of objects on a screen */
/*=================
Misc. setting
*=================*/
/*Display Input settings*/
#define LV_DISPI_READ_PERIOD 50 /*Input device read period milliseconds*/
#define LV_DISPI_TP_MARKER 0 /*Mark the pressed points (Value means marker point size)*/
#define LV_DISPI_DRAG_LIMIT (10 * LV_DOWNSCALE) /*Drag threshold in pixels */
#define LV_DISPI_DRAG_THROW 20 /*Drag throw slow-down in [%]. Greater value means faster slow-down */
#define LV_DISPI_LONG_PRESS_TIME 400 /*Long press time in milliseconds*/
#define LV_DISPI_LONG_PRESS_REP_TIME 100 /*Repeated trigger period in long press [ms] */
/*lv_obj (base object) settings*/
#define LV_OBJ_FREE_NUM 1 /*Enable the free number attribute*/
#define LV_OBJ_FREE_P 1 /*Enable the free pointer attribute*/
#define LV_OBJ_GROUP 1 /*Enable object groups*/
/*Others*/
#define LV_COLOR_TRANSP COLOR_LIME /*This could mean transparent pixel*/
#define USE_LV_EXAMPLE 1 /*Enable examples (lvgl/lv_examples/). Disable to save memory*/
/*==================
* LV OBJ X USAGE
* ================*/
/*****************
* Simple object
*****************/
/*Label (dependencies: -*/
#define USE_LV_LABEL 1
#if USE_LV_LABEL != 0
#define LV_LABEL_SCROLL_SPEED (25 * LV_DOWNSCALE) /*Hor, or ver. scroll speed (px/sec) in 'LV_LABEL_LONG_SCROLL' mode*/
#define LV_LABEL_SCROLL_SPEED_VER (10 * LV_DOWNSCALE) /*Ver. scroll speed if hor. scroll is applied too*/
#define LV_LABEL_SCROLL_PLAYBACK_PAUSE 500 /*Wait before the scroll turns back in ms*/
#define LV_LABEL_SCROLL_REPEAT_PAUSE 500 /*Wait before the scroll begins again in ms*/
#endif
/*Image (dependencies: lv_label (if symbols are enabled) from misc: FSINT, UFS)*/
#define USE_LV_IMG 1
#if USE_LV_IMG != 0
//#define LV_IMG_DEF_WALLPAPER img_square_x1 /*Comment this line to NOT use wallpaper*/
/* 1: enables to interpret the file names as symbol name
* from symbol_def.h if they begin with a lower case letter.
* (driver letters are always upper case)*/
#define LV_IMG_ENABLE_SYMBOLS 1
#if LV_IMG_ENABLE_SYMBOLS != 0
#define LV_IMG_DEF_SYMBOL_FONT FONT_SYMBOL_30
#endif /*LV_IMG_ENABLE_SYMBOLS*/
#endif /*USE_LV_IMG*/
/*Line (dependencies: -*/
#define USE_LV_LINE 1
/*******************
* Container object
*******************/
/*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
/*************************
* Data visualizer object
*************************/
/*Bar (dependencies: -)*/
#define USE_LV_BAR 1
/*Line meter (dependencies: bar; misc: trigo)*/
#define USE_LV_LMETER 1
/*Gauge (dependencies:bar, lmeter; misc: trigo)*/
#define USE_LV_GAUGE 1
#if USE_LV_GAUGE != 0
#define LV_GAUGE_MAX_NEEDLE 4 /*Max number of needles. Used in the style.*/
#endif
/*Chart (dependencies: -)*/
#define USE_LV_CHART 1
/*LED (dependencies: -)*/
#define USE_LV_LED 1
/*Message box (dependencies: lv_rect, lv_btn, 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_MAX_LENGTH 256
#define LV_TA_CUR_BLINK_TIME 400 /*ms*/
#define LV_TA_PWD_SHOW_TIME 1500 /*ms*/
#endif
/*************************
* User input object
*************************/
/*Button (dependencies: lv_cont*/
#define USE_LV_BTN 1
/*Button matrix (dependencies: -)*/
#define USE_LV_BTNM 1
/*Check box (dependencies: lv_btn, lv_label)*/
#define USE_LV_CB 1
/*List (dependencies: lv_page, lv_btn, lv_label, lv_img)*/
#define USE_LV_LIST 1
#if USE_LV_LIST != 0
#define LV_LIST_FOCUS_TIME 100 /*Animation time of focusing to the a list element [ms] (0: no animation) */
#endif
/*Drop down list (dependencies: lv_page, lv_label)*/
#define USE_LV_DDLIST 1
/*Slider (dependencies: lv_bar)*/
#define USE_LV_SLIDER 1
/*==================
* LV APP SETTINGS
* =================*/
/*Enable the application system*/
#define LV_APP_ENABLE 0
#if LV_APP_ENABLE != 0
/****************************
* Basic application settings
*****************************/
#define LV_APP_DESKTOP 1 /*Create a desktop-like environment*/
#define LV_APP_SC_WIDTH (LV_DPI * 2) /*Shortcut width*/
#define LV_APP_SC_HEIGHT (3 * LV_DPI / 2) /*Shortcut height*/
#define LV_APP_FONT_SMALL FONT_DEJAVU_20 /*A small font*/
#define LV_APP_FONT_MEDIUM FONT_DEFAULT /*A medium font*/
#define LV_APP_FONT_LARGE FONT_DEJAVU_40 /*A large font*/
/***********************
* Animation settings
***********************/
#define LV_APP_ANIM_WIN 200 /*Animation time of windows [ms] (0: turn off animations)*/
#define LV_APP_ANIM_DESKTOP 200 /*Animation time the desktop [ms] (0: turn off animations)*/
/************************
* App. utility settings
************************/
/*Notice*/
#define USE_LV_APP_NOTICE 1
#if USE_LV_APP_NOTICE != 0
#define LV_APP_NOTICE_SHOW_TIME 4000 /*Notices will be shown for this time [ms]*/
#define LV_APP_NOTICE_CLOSE_ANIM_TIME 300 /*Notice close animation time. [ms] 0: no animation */
#define LV_APP_NOTICE_MAX_NUM 6 /*Max. number of notices*/
#define LV_APP_NOTICE_MAX_LEN 256 /*Max. number of characters on a notice*/
#endif
/*File selector*/
#define USE_LV_APP_FSEL 1
#if USE_LV_APP_FSEL != 0
#define LV_APP_FSEL_PAGE_SIZE 8 /*Max. number of files/folder on a page*/
#define LV_APP_FSEL_FN_MAX_LEN 32 /*Max file name length*/
#define LV_APP_FSEL_PATH_MAX_LEN 256 /*Max path length*/
#endif
/*Keyboard*/
#define USE_LV_APP_KB 1
#if USE_LV_APP_KB != 0
#define LV_APP_KB_ANIM_TIME 300 /*ms*/
#endif
/*==================
* LV APP X USAGE
* ================*/
/*Example application*/
#define USE_LV_APP_EXAMPLE 1
/*Phantom application*/
#define USE_LV_APP_PHANTOM 1
#if USE_LV_APP_PHANTOM != 0
/*No settings*/
#endif
/*System monitor*/
#define USE_LV_APP_SYSMON 1
#if USE_LV_APP_SYSMON != 0
#define LV_APP_SYSMON_REFR_TIME 500 /*Mem. and CPU usage read period [ms]*/
#define LV_APP_SYSMON_PNUM 64 /*Number of point on the window's chart*/
#define LV_APP_SYSMON_MEM_WARN (2 * 1024) /*Make a notice less then this remaining memory [bytes]*/
#define LV_APP_SYSMON_FRAG_WARN (70) /*Make a notice above this fragmentation level [%]*/
#define LV_APP_SYSMON_DEFRAG_PERIOD (5000) /*Auto-defrag period [ms]*/
#endif /*USE_LV_APP_SYSMON != 0*/
/*Terminal*/
#define USE_LV_APP_TERMINAL 1
#if USE_LV_APP_TERMINAL != 0
#define LV_APP_TERMINAL_LENGTH 512 /*Memory of the terminal [character number]*/
#endif /*USE_LV_APP_TERMINAL != 0*/
/*Files*/
#define USE_LV_APP_FILES 1
#if USE_LV_APP_FILES != 0
#define LV_APP_FILES_PAGE_SIZE 8 /*Max. number of files/folder on a page*/
#define LV_APP_FILES_FN_MAX_LEN 32 /*Max file name length*/
#define LV_APP_FILES_PATH_MAX_LEN 256 /*Max path length*/
#define LV_APP_FILES_CHUNK_DEF_SIZE 256 /*Chunk size when sending a file*/
#define LV_APP_FILES_CHUNK_DEF_TIME 100 /*Delay between sent chunks*/
#define LV_APP_FILES_CHUNK_MAX_SIZE 1024 /*Max chunk size when the user sets it*/
#endif /*USE_LV_APP_FILES != 0*/
/*Benchmark*/
#define USE_LV_APP_BENCHMARK 1
#if USE_LV_APP_BENCHMARK != 0
/*No settings*/
#endif
/*WiFi*/
#define USE_LV_APP_WIFI 0
#if USE_LV_APP_WIFI != 0
#define LV_APP_WIFI_CONF_PATH "S:/wifi_conf.txt" /*Save config. here. Comment to use def. value*/
#ifndef LV_APP_WIFI_CONF_PATH
#define LV_APP_WIFI_SSID_DEF "ssid"
#define LV_APP_WIFI_PWD_DEF "pwd"
#define LV_APP_WIFI_IP_DEF "100.101.102.103"
#define LV_APP_WIFI_PORT_DEF "1234"
#endif /*LV_APP_WIFI_CONF_PATH*/
#define LV_APP_WIFI_AUTO_CONNECT 1 /*Try to connect at start up to the deafult SSID and IP:PORT*/
#endif /*USE_LV_APP_WIFI != 0*/
/*GSM*/
#define USE_LV_APP_GSM 0
#if USE_LV_APP_GSM != 0
#define LV_APP_GSM_CONF_PATH "S:/gsm_conf.txt" /*Save config. here. Comment to use def. value*/
#ifndef LV_APP_GSM_CONF_PATH
#define LV_APP_GSM_APN_DEF "apn"
#define LV_APP_GSM_IP_DEF "101.102.103.104"
#define LV_APP_GSM_PORT_DEF "1234"
#endif /*LV_APP_GSM_CONF_PATH*/
#define LV_APP_GSM_AUTO_CONNECT 1 /*Try to connect at start up with the deafult APN and IP:PORT*/
#endif /*USE_LV_APP_GSM != 0*/
/*Ethernet*/
#define USE_LV_APP_ETHERNET 0
#if USE_LV_APP_ETHERNET != 0
/*No settings*/
#endif /*USE_LV_APP_ETHERNET != 0*/
#endif /*LV_APP_ENABLE != 0*/
#endif /*LV_CONF_H*/
#endif /*Remove this to enable the content*/

683
lv_conf_template.h Normal file
View File

@@ -0,0 +1,683 @@
/**
* @file lv_conf.h
*
*/
/*
* 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: RGB233
* - 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 chroma keying for indexed images. */
#define LV_INDEXED_CHROMA 1
/* 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*/
/* 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 20
/* 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*/
#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: 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: 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
#define LV_USE_GPU_STM32_DMA2D 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
/*========================
* 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
*====================*/
/* 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
/* With size optimization (-Os) the compiler might not align data to
* 4 or 8 byte boundary. This alignment will be explicitly applied where needed.
* E.g. __attribute__((aligned(4))) */
#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
/*===================
* 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 "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*/
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.littlevgl.com/#Fonts
* To create a new font go to: https://littlevgl.com/ttf-font-to-c-array
*/
/* Montserrat fonts with bpp = 4
* https://fonts.google.com/specimen/Montserrat */
#define LV_FONT_MONTSERRAT_12 0
#define LV_FONT_MONTSERRAT_14 0
#define LV_FONT_MONTSERRAT_16 1
#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
/* 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
/*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*/
#define LV_USE_THEME_EMPTY 0 /*No theme, you can apply your styles as you need*/
#define LV_USE_THEME_TEMPLATE 0 /*Simple to the create your theme based on it*/
#define LV_USE_THEME_MATERIAL 1 /*A fast and impressive theme*/
#define LV_USE_THEME_MONO 0 /*Mono-color theme for monochrome displays*/
#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_RED
#define LV_THEME_DEFAULT_COLOR_SECONDARY LV_COLOR_BLUE
#define LV_THEME_DEFAULT_FLAG LV_THEME_MATERIAL_FLAG_LIGHT
#define LV_THEME_DEFAULT_FONT_SMALL &lv_font_montserrat_16
#define LV_THEME_DEFAULT_FONT_NORMAL &lv_font_montserrat_16
#define LV_THEME_DEFAULT_FONT_SUBTITLE &lv_font_montserrat_16
#define LV_THEME_DEFAULT_FONT_TITLE &lv_font_montserrat_16
/*=================
* 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
#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_realaign()` 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.littlevgl.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
#if LV_USE_BTN != 0
/*Enable button-state animations - draw a circle on click (dependencies: LV_USE_ANIMATION)*/
# define LV_BTN_INK_EFFECT 0
#endif
/*Button matrix (dependencies: -)*/
#define LV_USE_BTNMATRIX 1
/*Calendar (dependencies: -)*/
#define LV_USE_CALENDAR 1
/*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 0
#endif
/*Mask (dependencies: -)*/
#define LV_USE_OBJMASK 0
/*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
#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"*/

File diff suppressed because it is too large Load Diff

View File

@@ -1,93 +0,0 @@
/**
* @file lv_draw.h
*
*/
#ifndef LV_DRAW_H
#define LV_DRAW_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "misc_conf.h"
#include "misc/gfx/text.h"
#include "../lv_obj/lv_style.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Draw a rectangle
* @param cords_p the coordinates of the rectangle
* @param mask_p the rectangle will be drawn only in this mask
* @param style_p pointer to a style
*/
void lv_draw_rect(const area_t * cords_p, const area_t * mask_p, const lv_style_t * style_p);
/*Experimental use for 3D modeling*/
#define USE_LV_TRIANGLE 0
#if USE_LV_TRIANGLE != 0
/**
*
* @param points pointer to an array with 3 points
* @param mask_p the triangle will be drawn only in this mask
* @param color color of the triangle
*/
void lv_draw_triangle(const point_t * points, const area_t * mask_p, color_t color);
#endif
/**
* Write a text
* @param cords_p coordinates of the label
* @param mask_p the label will be drawn only in this area
* @param style_p pointer to a style
* @param txt 0 terminated text to write
* @param flags 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 area_t * cords_p,const area_t * mask_p, const lv_style_t * style_p,
const char * txt, txt_flag_t flag, point_t * offset);
/**
* Draw an image
* @param cords_p the coordinates of the image
* @param mask_p the image will be drawn only in this area
* @param map_p pointer to a color_t array which contains the pixels of the image
*/
void lv_draw_img(const area_t * cords_p, const area_t * mask_p,
const lv_style_t * style_p, const char * fn);
/**
* Draw a line
* @param p1 first point of the line
* @param p2 second point of the line
* @param mask_pthe line will be drawn only on this area
* @param style_p pointer to a style
*/
void lv_draw_line(const point_t * p1, const point_t * p2, const area_t * mask_p,
const lv_style_t * style_p);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_H*/

View File

@@ -1,216 +0,0 @@
/**
* @file lv_draw_rbasic.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_draw_rbasic.h"
#include "lv_conf.h"
#include "hal/disp/disp.h"
#include "misc/gfx/font.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* 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(cord_t x, cord_t y, const area_t * mask_p, color_t color, opa_t opa)
{
area_t area;
area.x1 = x;
area.y1 = y;
area.x2 = x;
area.y2 = y;
lv_rfill(&area, mask_p, color, 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 area_t * cords_p, const area_t * mask_p,
color_t color, opa_t opa)
{
area_t masked_area;
bool union_ok = true;
if(mask_p != NULL) {
union_ok = area_union(&masked_area, cords_p, mask_p);
} else {
area_t scr_area;
area_set(&scr_area, 0, 0, LV_HOR_RES - 1, LV_VER_RES - 1);
union_ok = area_union(&masked_area, cords_p, &scr_area);
}
if(union_ok != false){
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 point_t * pos_p, const area_t * mask_p,
const font_t * font_p, uint8_t letter,
color_t color, opa_t opa)
{
uint8_t w = font_get_width(font_p, letter);
const uint8_t * bitmap_p = font_get_bitmap(font_p, letter);
uint8_t col, col_sub, row;
#if FONT_ANTIALIAS == 0
for(row = 0; row < font_p->height_row; row ++) {
for(col = 0, col_sub = 7; col < w; col ++, col_sub--) {
if(*bitmap_p & (1 << col_sub)) {
lv_rpx(pos_p->x + col, pos_p->y + row, mask_p, color, opa);
}
if(col_sub == 0) {
bitmap_p++;
col_sub = 8;
}
}
/*Correction if the letter is short*/
bitmap_p += font_p->width_byte - ((w >> 3) + 1);
/*Go to the next row*/
bitmap_p ++;
}
#else
const uint8_t * map1_p = bitmap_p;
const uint8_t * map2_p = bitmap_p + font_p->width_byte;
uint8_t px_cnt;
uint8_t col_byte_cnt;
for(row = 0; row < (font_p->height_row >> 1); row ++) {
col_byte_cnt = 0;
col_sub = 7;
for(col = 0; col < (w >> 1); col ++) {
px_cnt = 0;
if((*map1_p & (1 << col_sub)) != 0) px_cnt++;
if((*map2_p & (1 << col_sub)) != 0) px_cnt++;
if(col_sub != 0) col_sub --;
else {
col_sub = 7;
col_byte_cnt ++;
map1_p ++;
map2_p ++;
}
if((*map1_p & (1 << col_sub)) != 0) px_cnt++;
if((*map2_p & (1 << col_sub)) != 0) px_cnt++;
if(col_sub != 0) col_sub --;
else {
col_sub = 7;
col_byte_cnt ++;
map1_p ++;
map2_p ++;
}
if(px_cnt != 0) {
lv_rpx(pos_p->x + col, pos_p->y + row, mask_p, color_mix(color, COLOR_SILVER, 63 * px_cnt), OPA_COVER);
}
}
map1_p += font_p->width_byte;
map2_p += font_p->width_byte;
map1_p += font_p->width_byte - col_byte_cnt;
map2_p += font_p->width_byte - col_byte_cnt;
}
#endif
}
/**
* Draw a color map to the display
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area
* @param map_p pointer to a color_t array
* @param opa opacity of the map (ignored, only for compatibility with lv_vmap)
* @param transp true: enable transparency of LV_IMG_COLOR_TRANSP color pixels
* @param upscale true: upscale to double size (not supported)
* @param recolor mix the pixels with this color (not supported)
* @param recolor_opa the intense of recoloring (not supported)
*/
void lv_rmap(const area_t * cords_p, const area_t * mask_p,
const color_t * map_p, opa_t opa, bool transp, bool upscale,
color_t recolor, opa_t recolor_opa)
{
area_t masked_a;
bool union_ok;
union_ok = area_union(&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*/
cord_t map_width = area_get_width(cords_p);
map_p+= (masked_a.y1 - cords_p->y1) * map_width;
map_p += masked_a.x1 - cords_p->x1;
if(transp == false) {
cord_t row;
cord_t mask_w = area_get_width(&masked_a) - 1;
for(row = 0; row < area_get_height(&masked_a); row++) {
disp_map(masked_a.x1, masked_a.y1 + row, masked_a.x1 + mask_w, masked_a.y1 + row, map_p);
map_p += map_width;
}
}else {
color_t transp_color = LV_COLOR_TRANSP;
cord_t row;
for(row = 0; row < area_get_height(&masked_a); row++) {
cord_t col;
for(col = 0; col < area_get_width(&masked_a); col ++) {
if(map_p[col].full != transp_color.full) {
lv_rpx(masked_a.x1 + col, masked_a.y1 + row, mask_p, map_p[col], opa);
}
}
map_p += map_width;
}
}
}
/**********************
* STATIC FUNCTIONS
**********************/

View File

@@ -1,80 +0,0 @@
/**
* @file lv_draw_rbasic..h
*
*/
#ifndef LV_DRAW_RBASIC_H
#define LV_DRAW_RBASIC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "misc/gfx/color.h"
#include "misc/gfx/area.h"
#include "misc/gfx/font.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_rpx(cord_t x, cord_t y, const area_t * mask_p, color_t color, 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 area_t * cords_p, const area_t * mask_p,
color_t color, 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 point_t * pos_p, const area_t * mask_p,
const font_t * font_p, uint8_t letter,
color_t color, opa_t opa);
/**
* Draw a color map to the display
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area
* @param map_p pointer to a color_t array
* @param opa opacity of the map (ignored, only for compatibility with lv_vmap)
* @param transp true: enable transparency of LV_IMG_COLOR_TRANSP color pixels
* @param upscale true: upscale to double size (not supported)
* @param recolor mix the pixels with this color (not supported)
* @param recolor_opa the intense of recoloring (not supported)
*/
void lv_rmap(const area_t * cords_p, const area_t * mask_p,
const color_t * map_p, opa_t opa, bool transp, bool upscale,
color_t recolor, opa_t recolor_opa);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_RBASIC_H*/

View File

@@ -1,533 +0,0 @@
/**
* @file lv_vdraw.c
*
*/
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include "lv_conf.h"
#include "misc/gfx/area.h"
#include "misc/gfx/font.h"
#include "misc/gfx/color.h"
#include "hal/disp/disp.h"
#if LV_VDB_SIZE != 0
#include <stddef.h>
#include "lvgl/lv_obj/lv_vdb.h"
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void sw_color_cpy(color_t * dest, const color_t * src, uint32_t length, opa_t opa);
static void sw_color_fill(area_t * mem_area, color_t * mem, const area_t * fill_area, color_t color, opa_t opa);
/**********************
* 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(cord_t x, cord_t y, const area_t * mask_p, color_t color, opa_t opa)
{
lv_vdb_t * vdb_p = lv_vdb_get();
/*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 = area_get_width(&vdb_p->area);
/*Make the coordinates relative to VDB*/
x-=vdb_p->area.x1;
y-=vdb_p->area.y1;
color_t * vdb_px_p = vdb_p->buf + y * vdb_width + x;
if(opa == OPA_COVER) {
*vdb_px_p = color;
}
else {
*vdb_px_p = color_mix(color,*vdb_px_p, 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 (truncated to VDB area)
* @param color fill color
* @param opa opacity of the area (0..255)
*/
void lv_vfill(const area_t * cords_p, const area_t * mask_p,
color_t color, opa_t opa)
{
area_t res_a;
bool union_ok;
lv_vdb_t * vdb_p = lv_vdb_get();
/*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 = area_union(&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;
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;
color_t * vdb_buf_tmp = vdb_p->buf;
uint32_t vdb_width = area_get_width(&vdb_p->area);
/*Move the vdb_tmp to the first row*/
vdb_buf_tmp += vdb_width * vdb_rel_a.y1;
#if DISP_HW_ACC == 0
sw_color_fill(&vdb_p->area, vdb_buf_tmp, &vdb_rel_a, color, opa);
#else
static color_t color_map[LV_HOR_RES];
static cord_t last_width = 0;
cord_t map_width = area_get_width(&vdb_rel_a);
if(color_map[0].full != color.full || last_width != map_width) {
uint16_t i;
for(i = 0; i < map_width; i++) {
color_map[i].full = color.full;
}
last_width = map_width;
}
cord_t row;
for(row = vdb_rel_a.y1;row <= vdb_rel_a.y2; row++) {
disp_color_cpy(&vdb_buf_tmp[vdb_rel_a.x1], color_map, map_width, opa);
vdb_buf_tmp += vdb_width;
}
#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 point_t * pos_p, const area_t * mask_p,
const font_t * font_p, uint8_t letter,
color_t color, opa_t opa)
{
if(font_p == NULL) return;
uint8_t letter_w = font_get_width(font_p, letter);
uint8_t letter_h = font_get_height(font_p);
const uint8_t * map_p = 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_vdb_t * vdb_p = lv_vdb_get();
cord_t vdb_width = area_get_width(&vdb_p->area);
color_t * vdb_buf_tmp = vdb_p->buf;
cord_t col, row;
uint8_t col_bit;
uint8_t col_byte_cnt;
/* Calculate the col/row start/end on the map
* If font anti alaiassing is enabled use the reduced letter sizes*/
cord_t col_start = pos_p->x > mask_p->x1 ? 0 : mask_p->x1 - pos_p->x;
cord_t col_end = pos_p->x + (letter_w >> FONT_ANTIALIAS) < mask_p->x2 ? (letter_w >> FONT_ANTIALIAS) : mask_p->x2 - pos_p->x + 1;
cord_t row_start = pos_p->y > mask_p->y1 ? 0 : mask_p->y1 - pos_p->y;
cord_t row_end = pos_p->y + (letter_h >> FONT_ANTIALIAS) < mask_p->y2 ? (letter_h >> FONT_ANTIALIAS) : mask_p->y2 - pos_p->y + 1;
/*Set a pointer on VDB to the first pixel of the letter*/
vdb_buf_tmp += ((pos_p->y - vdb_p->area.y1) * vdb_width)
+ pos_p->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 << FONT_ANTIALIAS) * font_p->width_byte) + ((col_start << FONT_ANTIALIAS) >> 3);
#if FONT_ANTIALIAS != 0
opa_t opa_tmp = opa;
if(opa_tmp != OPA_COVER) opa_tmp = opa_tmp >> 2; /*Opacity per pixel (used when sum the pixels)*/
const uint8_t * map1_p = map_p;
const uint8_t * map2_p = map_p + font_p->width_byte;
uint8_t px_cnt;
for(row = row_start; row < row_end; row ++) {
col_byte_cnt = 0;
col_bit = 7 - ((col_start << FONT_ANTIALIAS) % 8);
for(col = col_start; col < col_end; col ++) {
px_cnt = 0;
if((*map1_p & (1 << col_bit)) != 0) px_cnt++;
if((*map2_p & (1 << col_bit)) != 0) px_cnt++;
if(col_bit != 0) col_bit --;
else {
col_bit = 7;
col_byte_cnt ++;
map1_p ++;
map2_p ++;
}
if((*map1_p & (1 << col_bit)) != 0) px_cnt++;
if((*map2_p & (1 << col_bit)) != 0) px_cnt++;
if(col_bit != 0) col_bit --;
else {
col_bit = 7;
col_byte_cnt ++;
map1_p ++;
map2_p ++;
}
if(px_cnt != 0) {
if(opa == OPA_COVER) *vdb_buf_tmp = color_mix(color, *vdb_buf_tmp, 63*px_cnt);
else *vdb_buf_tmp = color_mix(color, *vdb_buf_tmp, opa_tmp * px_cnt);
}
vdb_buf_tmp++;
}
map1_p += font_p->width_byte;
map2_p += font_p->width_byte;
map1_p += font_p->width_byte - col_byte_cnt;
map2_p += font_p->width_byte - col_byte_cnt;
vdb_buf_tmp += vdb_width - ((col_end) - (col_start)); /*Next row in VDB*/
}
#else
for(row = row_start; row < row_end; row ++) {
col_byte_cnt = 0;
col_bit = 7 - (col_start % 8);
for(col = col_start; col < col_end; col ++) {
if((*map_p & (1 << col_bit)) != 0) {
if(opa == OPA_COVER) *vdb_buf_tmp = color;
else *vdb_buf_tmp = color_mix(color, *vdb_buf_tmp, opa);
}
vdb_buf_tmp++;
if(col_bit != 0) col_bit --;
else {
col_bit = 7;
col_byte_cnt ++;
map_p ++;
}
}
map_p += font_p->width_byte - col_byte_cnt;
vdb_buf_tmp += vdb_width - (col_end - col_start); /*Next row in VDB*/
}
#endif
}
/**
* Draw a color map to the display
* @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 color_t array
* @param opa opacity of the map (ignored, only for compatibility with lv_vmap)
* @param transp true: enable transparency of LV_IMG_COLOR_TRANSP color pixels
* @param upscale true: upscale to double size
* @param recolor mix the pixels with this color
* @param recolor_opa the intense of recoloring
*/
void lv_vmap(const area_t * cords_p, const area_t * mask_p,
const color_t * map_p, opa_t opa, bool transp, bool upscale,
color_t recolor, opa_t recolor_opa)
{
area_t masked_a;
bool union_ok;
lv_vdb_t * vdb_p = lv_vdb_get();
/*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 = area_union(&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;
uint8_t ds_shift = 0;
if(upscale != false) ds_shift = 1;
/*If the map starts OUT of the masked area then calc. the first pixel*/
cord_t map_width = area_get_width(cords_p) >> ds_shift;
if(cords_p->y1 < masked_a.y1) {
map_p += (uint32_t) map_width * ((masked_a.y1 - cords_p->y1) >> ds_shift);
}
if(cords_p->x1 < masked_a.x1) {
map_p += (masked_a.x1 - cords_p->x1) >> ds_shift;
}
/*Stores coordinates relative to the act 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;
cord_t vdb_width = area_get_width(&vdb_p->area);
color_t * vdb_buf_tmp = vdb_p->buf;
vdb_buf_tmp += (uint32_t) vdb_width * masked_a.y1; /*Move to the first row*/
map_p -= (masked_a.x1 >> ds_shift); /*Move back. It will be easier to index 'map_p' later*/
/*No upscalse*/
if(upscale == false) {
if(transp == false) { /*Simply copy the pixels to the VDB*/
cord_t row;
cord_t map_useful_w = area_get_width(&masked_a);
for(row = masked_a.y1; row <= masked_a.y2; row++) {
#if DISP_HW_ACC == 0
sw_color_cpy(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa);
#else
disp_color_cpy(&vdb_buf_tmp[masked_a.x1], &map_p[masked_a.x1], map_useful_w, opa);
#endif
map_p += map_width; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
}
/*To recolor draw simply a rectangle above the image*/
if(recolor_opa != OPA_TRANSP) {
lv_vfill(cords_p, mask_p, recolor, recolor_opa);
}
} else { /*transp == true: Check all pixels */
cord_t row;
cord_t col;
color_t transp_color = LV_COLOR_TRANSP;
if(recolor_opa == OPA_TRANSP) {/*No recolor*/
if(opa == OPA_COVER) { /*no opa */
for(row = masked_a.y1; row <= masked_a.y2; row++) {
for(col = masked_a.x1; col <= masked_a.x2; col ++) {
if(map_p[col].full != transp_color.full) {
vdb_buf_tmp[col] = map_p[col];
}
}
map_p += map_width; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
}
} else {
for(row = masked_a.y1; row <= masked_a.y2; row++) {
for(col = masked_a.x1; col <= masked_a.x2; col ++) {
if(map_p[col].full != transp_color.full) {
vdb_buf_tmp[col] = color_mix( map_p[col], vdb_buf_tmp[col], opa);
}
}
map_p += map_width; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
}
}
} else { /*Recolor needed*/
color_t color_tmp;
if(opa == OPA_COVER) { /*no opa */
for(row = masked_a.y1; row <= masked_a.y2; row++) {
for(col = masked_a.x1; col <= masked_a.x2; col ++) {
if(map_p[col].full != transp_color.full) {
color_tmp = color_mix(recolor, map_p[col], recolor_opa);
vdb_buf_tmp[col] = color_tmp;
}
}
map_p += map_width; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
}
} else {
for(row = masked_a.y1; row <= masked_a.y2; row++) {
for(col = masked_a.x1; col <= masked_a.x2; col ++) {
if(map_p[col].full != transp_color.full) {
color_tmp = color_mix(recolor, map_p[col], recolor_opa);
vdb_buf_tmp[col] = color_mix(color_tmp, vdb_buf_tmp[col], opa);
}
}
map_p += map_width; /*Next row on the map*/
vdb_buf_tmp += vdb_width; /*Next row on the VDB*/
}
}
}
}
}
/*Upscalse*/
else {
cord_t row;
cord_t col;
color_t transp_color = LV_COLOR_TRANSP;
color_t color_tmp;
color_t prev_color = COLOR_BLACK;
cord_t map_col;
/*The most simple case (but upscale): 0 opacity, no recolor, no transp. pixels*/
if(transp == false && opa == OPA_COVER && recolor_opa == OPA_TRANSP) {
cord_t map_col_start = masked_a.x1 >> 1;
cord_t map_col_end = masked_a.x2 >> 1;
cord_t vdb_col; /*Col. in this row*/
cord_t vdb_col2; /*Col. in next row*/
for(row = masked_a.y1; row <= masked_a.y2; row += 2) {
map_col_start = masked_a.x1 >> 1;
map_col_end = masked_a.x2 >> 1;
vdb_col = masked_a.x1;
vdb_col2 = masked_a.x1 + vdb_width;
for(map_col = map_col_start; map_col <= map_col_end; map_col ++, vdb_col += 2, vdb_col2 += 2) {
vdb_buf_tmp[vdb_col].full = map_p[map_col].full;
vdb_buf_tmp[vdb_col + 1].full = map_p[map_col].full;
vdb_buf_tmp[vdb_col2].full = map_p[map_col].full;
vdb_buf_tmp[vdb_col2 + 1].full = map_p[map_col].full;
}
map_p += map_width;
vdb_buf_tmp += 2 * vdb_width ; /*+ 2 row on the VDB (2 rows are filled because of the upscale)*/
}
}
/*Handle other cases*/
else {
color_tmp = color_mix(recolor, prev_color, recolor_opa);
for(row = masked_a.y1; row <= masked_a.y2; row++) {
for(col = masked_a.x1; col <= masked_a.x2; col ++) {
map_col = col >> 1;
/*Handle recoloring*/
if(recolor_opa == OPA_TRANSP) {
color_tmp.full = map_p[map_col].full;
} else {
if(map_p[map_col].full != prev_color.full) {
prev_color.full = map_p[map_col].full;
color_tmp = color_mix(recolor, prev_color, recolor_opa);
}
}
/*Put the NOT transparent pixels*/
if(transp == false || map_p[map_col].full != transp_color.full) {
/*Handle opacity*/
if(opa == OPA_COVER) {
vdb_buf_tmp[col] = color_tmp;
} else {
vdb_buf_tmp[col] = color_mix( color_tmp, vdb_buf_tmp[col], opa);
}
}
}
if((row & 0x1) != 0) map_p += map_width; /*Next row on the map*/
vdb_buf_tmp += vdb_width ; /*Next row on the VDB*/
}
}
}
}
/**********************
* STATIC FUNCTIONS
**********************/
#if DISP_HW_ACC == 0
/**
* Copy 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, OPA_TRANSP: transparent ... 255, OPA_COVER, fully cover)
*/
static void sw_color_cpy(color_t * dest, const color_t * src, uint32_t length, opa_t opa)
{
if(opa == OPA_COVER) {
memcpy(dest, src, length * sizeof(color_t));
} else {
cord_t col;
for(col = 0; col < length; col++) {
dest[col] = color_mix(src[col], dest[col], opa);
}
}
}
/**
*
* @param mem_area coordinates of 'mem' memory area
* @param mem a memory address. Considered to a rectangual 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, OPA_TRANSP: transparent ... 255, OPA_COVER, fully cover)
*/
static void sw_color_fill(area_t * mem_area, color_t * mem, const area_t * fill_area, color_t color, opa_t opa)
{
/*Set all row in vdb to the given color*/
cord_t row;
uint32_t col;
cord_t mem_width = area_get_width(mem_area);
/*Run simpler function without opacity*/
if(opa == 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*/
color_t * mem_first = &mem[fill_area->x1];
cord_t copy_size = (fill_area->x2 - fill_area->x1 + 1) * sizeof(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 {
color_t bg_tmp = COLOR_BLACK;
color_t opa_tmp = color_mix(color, bg_tmp, opa);
for(row = fill_area->y1; row <= fill_area->y2; row++) {
for(col = fill_area->x1; col <= fill_area->x2; col++) {
/*If the bg color changed recalculate the result color*/
if(mem[col].full != bg_tmp.full) {
bg_tmp = mem[col];
opa_tmp = color_mix(color, bg_tmp, opa);
}
mem[col] = opa_tmp;
}
mem += mem_width;
}
}
}
#endif /*DISP_HW_ACC == 0*/
#endif

View File

@@ -1,87 +0,0 @@
/**
* @file lv_draw_vbasic.h
*
*/
#ifndef LV_DRAW_VBASIC_H
#define LV_DRAW_VBASIC_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#if LV_VDB_SIZE != 0
#include "misc/gfx/color.h"
#include "misc/gfx/area.h"
#include "misc/gfx/font.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* GLOBAL PROTOTYPES
**********************/
void lv_vpx(cord_t x, cord_t y, const area_t * mask_p, color_t color, 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 area_t * cords_p, const area_t * mask_p,
color_t color, 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 point_t * pos_p, const area_t * mask_p,
const font_t * font_p, uint8_t letter,
color_t color, opa_t opa);
/**
* Draw a color map to the display
* @param cords_p coordinates the color map
* @param mask_p the map will drawn only on this area
* @param map_p pointer to a color_t array
* @param opa opacity of the map (ignored, only for compatibility with lv_vmap)
* @param transp true: enable transparency of LV_IMG_COLOR_TRANSP color pixels
* @param upscale true: upscale to double size
* @param recolor mix the pixels with this color
* @param recolor_opa the intense of recoloring
*/
void lv_vmap(const area_t * cords_p, const area_t * mask_p,
const color_t * map_p, opa_t opa, bool transp, bool upscale,
color_t recolor, opa_t recolor_opa);
/**********************
* MACROS
**********************/
#endif /*LV_VDB_SIZE != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DRAW_RBASIC_H*/

View File

@@ -1,67 +0,0 @@
/**
* @file lv_ex_hello_world.c
*
*/
/*
* Greetings,
* this is the first example in the tutorial hence this is the most simple one.
* It only creates a Label, set its text, and align to the middle.
*
* Be sure in lv_conf.h LV_APP_ENEBLE is 0 (just for simplicity)
*/
/*********************
* INCLUDES
*********************/
#include "lv_ex_hello_world.h"
#if USE_LV_EXAMPLE != 0
#include "lvgl/lvgl.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Create a simple 'Hello world!' label
*/
void lv_ex_hello_world(void)
{
/*Create a Label on the current screen*/
lv_obj_t * label1 = lv_label_create(lv_scr_act(), NULL);
/*Modify the Label's text*/
lv_label_set_text(label1, "Hello world!");
/* Align the Label to the center
* NULL means align on parent (which is the screen now)
* 0, 0 at the and means an x, y offset after alignment*/
lv_obj_align_us(label1, NULL, LV_ALIGN_CENTER, 0, 0);
}
/**********************
* STATIC FUNCTIONS
**********************/
#endif /*USE_LV_EXAMPLE != 0*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -1,218 +0,0 @@
/**
* @file lv_hello_world.c
*
*/
/*
* The basic building blocks (components or widgets) in LittlevGL are the graphical objects.
* For example:
* - Buttons
* - Labels
* - Charts
* - Sliders etc
*
* In this part you can learn the basics of the objects like creating, positioning, sizing etc.
* You will also meet some different object types and their attributes.
*
* Regardless to the object type the 'lv_obj_t' variable type is used stores the objects
* and you can refer to an object with an lv_obj_t pointer (lv_obj_t *)
*
* INHERITANCE
* -------------
* Similarly to object oriented languages some kind of inheritance is used
* among the object types.
*
* Every object is derived from the 'Basic object'. (lv_obj)
*
* The types are backward compatible which means a type can use all the ancestor
* attributes/functions too.
*
* For example a 'Button' is derived from 'Container' which is derived from 'Basic objects'.
* Therefore a button can use container attributes like automatically fit size to the content.
*
* PARENT-CHILD
* -------------
* A parent can be considered as the container of its children.
* Every object has exactly one parent object (except screens).
* A parent can have unlimited number of children.
* There is no limitation for the type of the parent.
*
* The children are visible only on their parent. The parts outside will be cropped (not displayed)
*
* If the parent is moved the children will be moved with it.
*
* The earlier created object (and its children) will drawn earlier.
* Using this layers can be built.
*
* LEARN MORE
* -------------
* - General overview: http://www.gl.littlev.hu/objects
* - Detailed description of types: http://www.gl.littlev.hu/object-types
*
* NOTES
* -------------
* - Be sure 'LV_OBJ_FREE_P' is enabled in 'lv_conf.h'
*/
/*********************
* INCLUDES
*********************/
#include "lv_ex_objects.h"
#if USE_LV_EXAMPLE != 0
#include "lvgl/lvgl.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static lv_action_res_t btn_rel_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t ddlist_action(lv_obj_t * ddlist, lv_dispi_t * dispi);
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the Object usage example
*/
void lv_ex_objects(void)
{
/********************
* CREATE A SCREEN
*******************/
/* Create a new screen and load it
* Screen can be created from any type object
* Now a Page is used which is an objects with scrollable content*/
lv_obj_t * scr = lv_page_create(NULL, NULL);
lv_scr_load(scr);
/****************
* ADD A TITLE
****************/
lv_obj_t * label = lv_label_create(scr, NULL); /*First parameters (scr) is the parent*/
lv_label_set_text(label, "Object usage demo"); /*Set the text*/
lv_obj_set_x(label, 50); /*Labels are inherited from Basic object so 'lv_obj_...' functions can be used*/
/********************
* CREATE TWO BUTTONS
********************/
/*Create a button*/
lv_obj_t * btn1 = lv_btn_create(lv_scr_act(), NULL); /*Create a button on the currently loaded screen*/
lv_btn_set_rel_action(btn1, btn_rel_action); /*Set function to call when the button is released*/
lv_obj_align(btn1, label, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); /*Align below the label*/
label = lv_label_create(btn1, NULL); /*Create a label on the button (the 'label' variable can be reused)*/
lv_label_set_text(label, "Button 1");
/*Copy the previous button*/
lv_obj_t * btn2 = lv_btn_create(lv_scr_act(), btn1); /*Second parameter is an object to copy*/
lv_obj_align(btn2, btn1, LV_ALIGN_OUT_RIGHT_MID, 50, 0);/*Align next to the prev. button.*/
label = lv_label_create(btn2, NULL); /*Create a label on the button*/
lv_label_set_text(label, "Button 2");
/****************
* ADD A SLIDER
****************/
/*Add a slider (inheritance: lv_obj -> lv_bar -> lv_slider)*/
lv_obj_t * slider = lv_slider_create(scr, NULL); /*Create a slider*/
lv_obj_set_size(slider, lv_obj_get_width(lv_scr_act()) / 3, LV_DPI / 3); /*Set the size*/
lv_obj_align(slider, btn1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); /*Align below the first button*/
lv_bar_set_value(slider, 30); /*Slider is a 'bar' so set its value like a 'bar'*/
/***********************
* ADD A DROP DOWN LIST
************************/
lv_obj_t * ddlist = lv_ddlist_create(lv_scr_act(), NULL);
lv_obj_align(ddlist, slider, LV_ALIGN_OUT_RIGHT_TOP, 20, 0); /*Align next to the slider*/
lv_obj_set_free_p(ddlist, slider); /*Save the pointer of the slider in the ddlist (used in 'ddlist_action()')*/
lv_ddlist_set_options_str(ddlist, "None\nLittle\nHalf\nA lot\nAll"); /*Set the options*/
lv_ddlist_set_action(ddlist, ddlist_action); /*Set function to call on new option choose*/
lv_obj_set_top(ddlist, true); /*Enable the drop down list always be on the top*/
/****************
* CREATE A CHART
****************/
lv_obj_t * chart = lv_chart_create(lv_scr_act(), NULL); /*Craete the chart*/
lv_obj_set_size(chart, lv_obj_get_width(scr) / 2, lv_obj_get_width(scr) / 4); /*Set the size*/
lv_obj_align(chart, slider, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); /*Align below the slider*/
lv_chart_set_dl_width(chart, 3 * LV_DOWNSCALE); /*Set the line width (LV_DOWNSCALE compensates anti-aliasing if enabled)*/
/*Add a RED data line and set some points*/
lv_chart_dl_t * dl1 = lv_chart_add_data_line(chart, COLOR_RED);
lv_chart_set_next(chart, dl1, 10);
lv_chart_set_next(chart, dl1, 25);
lv_chart_set_next(chart, dl1, 45);
lv_chart_set_next(chart, dl1, 80);
/*Add a BLUE data line and set some points*/
lv_chart_dl_t * dl2 = lv_chart_add_data_line(chart, COLOR_MAKE(0x40, 0x70, 0xC0));
lv_chart_set_next(chart, dl2, 10);
lv_chart_set_next(chart, dl2, 25);
lv_chart_set_next(chart, dl2, 45);
lv_chart_set_next(chart, dl2, 80);
lv_chart_set_next(chart, dl2, 75);
lv_chart_set_next(chart, dl2, 505);
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Called when a button is released
* @param btn pointer to the released button
* @param dispi pointer to caller display input (e.g. touchpad)
* @return LV_ACTION_RES_OK because the object is not deleted in this function
*/
static lv_action_res_t btn_rel_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
/*Increase the button width*/
cord_t width = lv_obj_get_width(btn);
lv_obj_set_width(btn, width + 20);
return LV_ACTION_RES_OK;
}
/**
* Called when a new option is chosen in the drop down list
* @param ddlist pointer to the drop down list
* @param dispi pointer to caller display input (e.g. touchpad)
* @return LV_ACTION_RES_OK because the object is not deleted in this function
*/
static lv_action_res_t ddlist_action(lv_obj_t * ddlist, lv_dispi_t * dispi)
{
uint16_t opt = lv_ddlist_get_selected(ddlist); /*Get the id of selected option*/
lv_obj_t * slider = lv_obj_get_free_p(ddlist); /*Get the saved slider*/
lv_bar_set_value(slider, (opt * 100) / 4); /*Modify the slider value according to the selection*/
return LV_ACTION_RES_OK;
}
#endif /*USE_LV_EXAMPLE != 0*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,161 +0,0 @@
/**
* @file lv_ex_styles.h
*
*/
/*
* You can modify the appearance of the graphical objects with styles.
* A style is simple 'lv_style_t' variable.
* Objects save the address of this variable so it has to be 'static or 'global'.
*
* A style contains various attributes to describe rectangle, image or text like
* objects at same time. To know which attribute is used by an object see:
* http://www.gl.littlev.hu/object-types
*
* To set a new style for an object use: 'lv_obj_set_style(obj, &style);
* If NULL is set as style then the object will inherit the parents style.
* For example is you create a style for button the label appearance can be defined there as well.
*
* You can use built-in styles. 'lv_style_get(LV_STYLE_... , &copy)' will give you a pointer to built in style
* and copy it to variable (second parameter) if it is not NULL.
* By default the objects use the built-in styles.
* The built-in styles can be modified in run time to give a new default skin to your GUI.
*
* Learn more here: http://www.gl.littlev.hu/objects#style
* */
/*********************
* INCLUDES
*********************/
#include "lv_ex_styles.h"
#if USE_LV_EXAMPLE != 0
#include "lvgl/lvgl.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Create a simple 'Hello world!' label
*/
void lv_ex_styles(void)
{
/****************************************
* BASE OBJECT + LABEL WITH DEFAULT STYLE
****************************************/
lv_obj_t * obj1;
obj1 = lv_obj_create(lv_scr_act(), NULL); /*Create a simple objects*/
lv_obj_set_pos(obj1, 10, 10);
lv_obj_t * label = lv_label_create(obj1, NULL);
/*Add a label to the object*/
lv_label_set_text(label, "Default");
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
/****************************************
* BASE OBJECT WITH PRETTY COLOR STYLE
****************************************/
lv_obj_t * obj2;
obj2 = lv_obj_create(lv_scr_act(), NULL);
lv_obj_align(obj2, obj1, LV_ALIGN_OUT_RIGHT_MID, 20, 0); /*Align next to the previous object*/
lv_obj_set_style(obj2, lv_style_get(LV_STYLE_PRETTY_COLOR, NULL)); /*Set built in style*/
label = lv_label_create(obj2, NULL);
/* Add a label to the object.
* Labels by default inherit the parent's style */
lv_label_set_text(label, "Pretty\ncolor");
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
/*****************************
* BASE OBJECT WITH NEW STYLE
*****************************/
/* Create a new style */
static lv_style_t style_new; /*Styles can't be local variables*/
lv_style_get(LV_STYLE_PRETTY_COLOR, &style_new); /*Copy a built-in style as a starting point*/
style_new.radius = LV_RADIUS_CIRCLE; /*Fully round corners*/
style_new.swidth = 8; /*8 px shadow*/
style_new.bwidth = 2; /*2 px border width*/
style_new.mcolor = COLOR_WHITE; /*White main color*/
style_new.gcolor = color_mix(COLOR_BLUE, COLOR_WHITE, OPA_40); /*light blue gradient color*/
style_new.scolor = COLOR_MAKE(0xa0, 0xa0, 0xa0); /*Light gray shadow color*/
style_new.ccolor = color_mix(COLOR_BLUE, COLOR_WHITE, OPA_90); /*Blue content color (text color)*/
style_new.letter_space = 10; /*10 px letter space*/
style_new.txt_align = LV_TXT_ALIGN_MID; /*Middel text align*/
/*Create a base object and apply the new style*/
lv_obj_t * obj3;
obj3 = lv_obj_create(lv_scr_act(), NULL);
lv_obj_align(obj3, obj2, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
lv_obj_set_style(obj3, &style_new);
/* Add a label to the object.
* Labels by default inherit the parent's style */
label = lv_label_create(obj3, NULL);
lv_label_set_text(label, "New\nstyle");
lv_obj_align(label, NULL, LV_ALIGN_CENTER, 0, 0);
/************************
* CREATE A STYLED LED
***********************/
/*Create a style for the LED*/
static lv_style_t style_led;
lv_style_get(LV_STYLE_PRETTY_COLOR, &style_led);
style_led.swidth = 15;
style_led.radius = LV_RADIUS_CIRCLE;
style_led.bwidth = 3;
style_led.bopa = OPA_30;
style_led.mcolor = COLOR_MAKE(0xb5, 0x0f, 0x04);
style_led.gcolor = COLOR_MAKE(0x50, 0x07, 0x02);
style_led.bcolor = COLOR_MAKE(0xfa, 0x0f, 0x00);
style_led.scolor = COLOR_MAKE(0xb5, 0x0f, 0x04);
/*Create a LED and switch it ON*/
lv_obj_t * led1 = lv_led_create(lv_scr_act(), NULL);
lv_obj_set_style(led1, &style_led);
lv_obj_align_us(led1, obj1, LV_ALIGN_OUT_BOTTOM_MID, 0, 40);
lv_led_on(led1);
/*Copy the previous LED and set a brightness*/
lv_obj_t * led2 = lv_led_create(lv_scr_act(), led1);
lv_obj_align_us(led2, obj2, LV_ALIGN_OUT_BOTTOM_MID, 0, 40);
lv_led_set_bright(led2, 190);
/*Copy the previous LED and switch it OFF*/
lv_obj_t * led3 = lv_led_create(lv_scr_act(), led1);
lv_obj_align_us(led3, obj3, LV_ALIGN_OUT_BOTTOM_MID, 0, 40);
lv_led_off(led3);
}
/**********************
* STATIC FUNCTIONS
**********************/
#endif /*USE_LV_EXAMPLE != 0*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1,328 +0,0 @@
/**
* @file lv_ex_encoder_ctrl.c
*
*/
/*
* Create a simple GUI to demonstrate how to control it with an encoder
* using 'lv_group'.
*
* Be sure in lv_conf.h:
* - LV_OBJ_GROUP 1 to enable groups
* - LV_APP_ENABLE 0 to disable applications because they might bother now
*
* lv_group:
* - you can create groups and add object to them
* - it can be a focused object within a group
* - the style of the focused object will be automatically modified
* - different style modifier functions can be applied in each groups
* - you can focus on the next or previous object (lv_group_focus_next/prev)
* - letters can be sent to the focused object to do something (lv_group_send):
* - LV_GROUP_KEY_RIGHT/UP: increment action in the object
* - LV_GROUP_KEY_LEFT/DOWN: decrement action in the object
* - LV_GROUP_KEY_ENTER: ok or select action in the object
* - LV_GROUP_KEY_ESC: close or back action action in the object
* - or any character for example to a text area
*
* The encoder is replaced by 4 button on the screen:
* - [>] Next (lv_group_focus_next): focus on the next object in the group (simulates encoder press)
* - [+] IncrementNext (LV_GROUP_KEY_RIGHT): increment signal to the object (simulates rotate right)
* - [-] DecrementNext (LV_GROUP_KEY_LEFT): increment signal to the object (simulates rotate left)
* - [!] SelectNext (LV_GROUP_KEY_ENTER): Select something (simulates encoder long press or an 'Select' button)
*/
/*********************
* INCLUDES
*********************/
#include "lv_ex_encoder_ctrl.h"
#if USE_LV_EXAMPLE != 0
#include "lvgl/lvgl.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void gui_create(void);
static void enc_create(void);
static lv_action_res_t mbox_yes_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t mbox_no_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t enable_action(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t enc_next(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t enc_inc(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t enc_dec(lv_obj_t * btn, lv_dispi_t * dispi);
static lv_action_res_t enc_sel(lv_obj_t * btn, lv_dispi_t * dispi);
/**********************
* STATIC VARIABLES
**********************/
static lv_obj_t * scr; /*The screen for the demo*/
static lv_obj_t * btn_enable; /*An enable button*/
static lv_style_t style_mbox_bg; /*Black bg. style with opacity*/
static lv_group_t * g; /*An Object Group*/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Create a simple GUI to demonstrate encoder control capability
*/
void lv_ex_encoder_ctrl(void)
{
/* Create a Page screen (to make it scrollable)
* and use Pretty layout to make the content responsive.
* See the 'responsive' example for more information */
scr = lv_page_create(NULL, NULL);
lv_cont_set_layout(lv_page_get_scrl(scr), LV_CONT_LAYOUT_PRETTY);
lv_page_set_sb_mode(scr, LV_PAGE_SB_MODE_AUTO);
lv_scr_load(scr);
/*Create an object group for objects to focus*/
g = lv_group_create();
/* Create a dark plain style for a message box's background*/
lv_style_get(LV_STYLE_PLAIN, &style_mbox_bg);
style_mbox_bg.mcolor = COLOR_BLACK;
style_mbox_bg.gcolor = COLOR_BLACK;
style_mbox_bg.opa = OPA_50;
/*Create a demo GUI*/
gui_create();
/*Create virtual encoder*/
enc_create();
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Create a demo GUI
*/
static void gui_create(void)
{
/*Create a title*/
lv_obj_t * title = lv_label_create(scr, NULL);
lv_label_set_text(title, "Encoder control");
lv_obj_set_protect(title, LV_PROTECT_FOLLOW); /*Make a line break in the layout*/
/*Create a drop down list*/
lv_obj_t * ddlist = lv_ddlist_create(scr, NULL);
lv_ddlist_set_options_str(ddlist, "Low\nMedium\nHigh");
lv_group_add_obj(g, ddlist); /*Add the object to the group*/
/*Create a holder an check boxes on it*/
lv_obj_t * holder = lv_cont_create(scr, NULL); /*Create a transparent holder*/
lv_cont_set_fit(holder, true, true);
lv_cont_set_layout(holder, LV_CONT_LAYOUT_COL_L);
lv_obj_set_style(holder, lv_style_get(LV_STYLE_TRANSP, NULL));
lv_obj_t * cb = lv_cb_create(holder, NULL); /*First check box*/
lv_cb_set_text(cb, "Red");
lv_group_add_obj(g, cb); /*Add to the group*/
cb = lv_cb_create(holder, cb); /*Copy the first check box. Automatically added to the same group*/
lv_cb_set_text(cb, "Green");
cb = lv_cb_create(holder, cb); /*Copy the second check box. Automatically added to the same group*/
lv_cb_set_text(cb, "Blue");
/*Create a sliders*/
lv_obj_t * slider = lv_slider_create(scr, NULL);
lv_obj_set_size_us(slider, 180, 30);
lv_bar_set_range(slider, 0, 20);
lv_group_add_obj(g, slider); /*Add to the group*/
/*Create a button*/
btn_enable = lv_btn_create(scr, NULL);
lv_btn_set_rel_action(btn_enable, enable_action);
lv_cont_set_fit(btn_enable, true, true);
lv_group_add_obj(g, btn_enable); /*Add to the group*/
lv_obj_t * l = lv_label_create(btn_enable, NULL);
lv_label_set_text(l, "Enable");
lv_obj_set_protect(btn_enable, LV_PROTECT_FOLLOW); /*Make a line break in the layout*/
}
/**
* Create virtual encoder using 4 buttons:
* - [>] Next: focus on the next object in the group (simulates encoder press)
* - [+] Increment: increment signal to the object (simulates rotate right)
* - [-] Decrement: increment signal to the object (simulates rotate left)
* - [!] Select: Select something (simulates encoder long press or an 'Select' button)
*/
static void enc_create(void)
{
/*Next button*/
lv_obj_t * btn = lv_btn_create(lv_scr_act(), NULL);
lv_btn_set_rel_action(btn, enc_next);
lv_cont_set_fit(btn, true, true);
lv_obj_t * l = lv_label_create(btn, NULL);
lv_label_set_text(l, ">");
/*Increment button*/
btn = lv_btn_create(lv_scr_act(), btn);
lv_btn_set_rel_action(btn, enc_dec);
l = lv_label_create(btn, NULL);
lv_label_set_text(l, "-");
/*Decrement button*/
btn = lv_btn_create(lv_scr_act(), btn);
lv_btn_set_rel_action(btn, enc_inc);
l = lv_label_create(btn, NULL);
lv_label_set_text(l, "+");
/*Select button*/
btn = lv_btn_create(lv_scr_act(), btn);
lv_btn_set_rel_action(btn, enc_sel);
l = lv_label_create(btn, NULL);
lv_label_set_text(l, "!");
}
/**
* Called when the Enable button is released. Show a message box to really enable or not?
* @param btn pointer to the Enable button
* @param dispi pointer to the caller display input or NULL if the encoder used
* @return LV_ACTION_RES_OK: because the button is not deleted
*/
static lv_action_res_t enable_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
/*If the butto nsi released the show message box to be sure about the Enable*/
if(lv_btn_get_state(btn) == LV_BTN_STATE_REL) {
/* Create a dark screen sized bg. with opacity to show
* the other objects are not available now*/
lv_obj_t * bg = lv_obj_create(scr, NULL);
lv_obj_set_protect(bg, LV_PROTECT_PARENT); /*The page screen move it to scrollable area*/
lv_obj_set_parent(bg, scr); /*So movi it back ater protected*/
lv_obj_set_style(bg, &style_mbox_bg);
lv_obj_set_size(bg, LV_HOR_RES, LV_VER_RES);
lv_obj_set_pos(bg, 0, 0);
lv_obj_set_click(bg, false); /*For test disable click there fore buttons under it remain clickable*/
/*Create a message box*/
lv_obj_t * mbox = lv_mbox_create(bg, NULL);
lv_mbox_set_text(mbox, "Really Enable the outputs?");
lv_group_add_obj(g, mbox); /*Add to he group*/
/*Add two buttons*/
lv_mbox_add_btn(mbox, "Yes", mbox_yes_action);
lv_mbox_add_btn(mbox, "No", mbox_no_action);
lv_obj_align(mbox, NULL, LV_ALIGN_CENTER, 0, - LV_DPI / 2);
/*Focus on the new message box, can freeze focus on it*/
lv_group_focus_obj(mbox);
lv_group_focus_freeze(g, true);
}
/*Disable is not dangerous so just change the button state*/
else {
lv_btn_set_state(btn_enable, LV_BTN_STATE_REL);
}
return LV_ACTION_RES_OK;
}
/**
* Called when the message box's 'Yes' button is released
* @param btn pointer to the 'Yes' button
* @param dispi pointer to the caller display input or NULL if the encoder used
* @return LV_ACTION_RES_INV: because the button along with the message box will be deleted
*/
static lv_action_res_t mbox_yes_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_group_focus_freeze(g, false); /*Release the freeze*/
lv_obj_t * mbox = lv_mbox_get_from_btn(btn);
lv_obj_del(lv_obj_get_parent(mbox)); /*Delete the black background. (it will delete the mbox too)*/
/*Mark the enabled state by toggling the button*/
lv_btn_set_state(btn_enable, LV_BTN_STATE_TREL);
/* In a real case you can add some specific actions here
* to really enable something */
return LV_ACTION_RES_INV;
}
/**
* Called when the message box's 'No' button is released
* @param btn pointer to the 'No' button
* @param dispi pointer to the caller display input or NULL if the encoder used
* @return LV_ACTION_RES_INV: because the button along with the message box will be deleted
*/
static lv_action_res_t mbox_no_action(lv_obj_t * btn, lv_dispi_t * dispi)
{
lv_group_focus_freeze(g, false); /*Release the freeze*/
lv_obj_t * mbox = lv_mbox_get_from_btn(btn);
lv_obj_del(lv_obj_get_parent(mbox)); /*Delete the black background. (it will delete the mbox too)*/
return LV_ACTION_RES_INV;
}
/**
* Called when the Encoder emulator's Next button is released
* @param btn pointer to the button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK: because the button is not deleted
*/
static lv_action_res_t enc_next(lv_obj_t * btn, lv_dispi_t * dispi)
{
/*Focus on the next object in the group*/
lv_group_focus_next(g);
return LV_ACTION_RES_OK;
}
/**
* Called when the Encoder emulator's Increment button is released
* @param btn pointer to the button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK: because the button is not deleted
*/
static lv_action_res_t enc_inc(lv_obj_t * btn, lv_dispi_t * dispi)
{
/* Send RIGHT key when rotate to right.
* It will trigger an increment like action in the object */
lv_group_send(g, LV_GROUP_KEY_RIGHT);
return LV_ACTION_RES_OK;
}
/**
* Called when the Encoder emulator's Increment button is released
* @param btn pointer to the button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK: because the button is not deleted
*/
static lv_action_res_t enc_dec(lv_obj_t * btn, lv_dispi_t * dispi)
{
/* Send LEFT key when rotate to left.
* It will trigger a decrement like action in the object */
lv_group_send(g, LV_GROUP_KEY_LEFT);
return LV_ACTION_RES_OK;
}
/**
* Called when the Encoder emulator's Send button is released
* @param btn pointer to the button
* @param dispi pointer to the caller display input
* @return LV_ACTION_RES_OK: because the button is not deleted
*/
static lv_action_res_t enc_sel(lv_obj_t * btn, lv_dispi_t * dispi)
{
/* Send ENTER key.
* It will trigger an 'OK' or 'Select' action in the object */
lv_group_send(g, LV_GROUP_KEY_ENTER);
return LV_ACTION_RES_OK;
}
#endif /*USE_LV_EXAMPLE != 0*/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -1,41 +0,0 @@
# EXAMPLES FOR LITTLEV GRAPHICS LIBRARY
## Introduction
In the folders you will find simple hardware independent examples to know the key features of Littlev Graphics Library.
The examples are organized in consistent way and can be used as a **Tutorial**.
Every example consist of least an *example_name.c* and *example_name.h* files. You can load an example in your *main* function with **example_name_init()**. The header file has to be included too.
You will find **detailed explanation** in the *c* and *h* files.
The examples can be enabled/disabled in *lv_conf.h* with **USE_LV_EXAMPLES**.
## 1_x Getting started
With examples in this section you can learn the basics from a simple *Hello world* label to a complex full featured GUI with animations and other effects. You will learn about
- creating, deleting graphical objects
- modify their attributes
- change their style
- and even creating a new object type
## 2_x GUI control without Touchpad
You can control your GUI not only with Touchpad. The most simple way to put real buttons next to the graphical ones and simulate *touch pad-like press* on the display. An other way is to organize the objects in groups and *focus* on one of objects. Then you can control the object-in-focus with simple character instructions. Or using a cursor and mouse is also possible. So an external control device can be
- push buttons
- encoders
- keyboard
- or a mouse
In this section you will find examples for them!
## 3_x Applications
The applications are high level components to do complex thing with a nice user interface. An application can be for example
- WiFi network manager
- File system browser
- System monitor
- Terminal etc.
Here you will find examples how to run application, and communicate with them.
## Final words
If you also have codes which could be useful for others, please share it via *Pull requests* on *GitHub*!
Thank you in advance!

View File

@@ -1,494 +0,0 @@
/**
* @file lv_dispi.c
*
*/
/*********************
* INCLUDES
********************/
#include "lv_conf.h"
#include "misc/os/ptask.h"
#include "misc/math/math_base.h"
#include "lv_dispi.h"
#include "../lv_draw/lv_draw_rbasic.h"
#include "hal/indev/indev.h"
#include "hal/systick/systick.h"
#include "lv_obj.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void dispi_task(void * param);
static void dispi_proc_point(lv_dispi_t * dispi_p, cord_t x, cord_t y);
static void dispi_proc_press(lv_dispi_t * dispi_p);
static void disi_proc_release(lv_dispi_t * dispi_p);
static lv_obj_t * dispi_search_obj(const lv_dispi_t * dispi_p, lv_obj_t * obj);
static void dispi_drag(lv_dispi_t * dispi_p);
static void dispi_drag_throw(lv_dispi_t * dispi_p);
/**********************
* STATIC VARIABLES
**********************/
static ptask_t* dispi_task_p;
static bool lv_dispi_reset_qry;
static bool lv_dispi_reset_now;
static lv_dispi_t dispi_array[INDEV_NUM];
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Initialize the display input subsystem
*/
void lv_dispi_init(void)
{
lv_dispi_reset_qry = false;
lv_dispi_reset_now = false;
#if LV_DISPI_READ_PERIOD != 0
dispi_task_p = ptask_create(dispi_task, LV_DISPI_READ_PERIOD, PTASK_PRIO_MID, NULL);
#else
dispi_task_p = ptask_create(dispi_task, 1, PTASK_PRIO_OFF); /*Not use lv_dispi*/
#endif
}
/**
* Get an array with all the display inputs. Contains (INDEV_NUM elements)
* @return pointer to a an lv_dispi_t array.
*/
lv_dispi_t * lv_dispi_get_array(void)
{
return dispi_array;
}
/**
* Reset all display inputs
*/
void lv_dispi_reset(void)
{
lv_dispi_reset_qry = true;
}
/**
* Reset the long press state of a display input
* @param dispi pointer to a display input
*/
void lv_dispi_reset_lpr(lv_dispi_t * dispi)
{
dispi->long_press_sent = 0;
dispi->lpr_rep_time_stamp = systick_get();
dispi->press_time_stamp = systick_get();
}
/**
* Get the last point on display input
* @param dispi pointer to a display input
* @param point pointer to a point to store the result
*/
void lv_dispi_get_point(lv_dispi_t * dispi, point_t * point)
{
point->x = dispi->act_point.x;
point->y = dispi->act_point.y;
}
/**
* Check if there is dragging on display input or not
* @param dispi pointer to a display input
* @return true: drag is in progress
*/
bool lv_dispi_is_dragging(lv_dispi_t * dispi)
{
return dispi->drag_in_prog == 0 ? false : true;
}
/**
* Get the vector of dragging on a display input
* @param dispi pointer to a display input
* @param point pointer to a point to store the vector
*/
void lv_dispi_get_vect(lv_dispi_t * dispi, point_t * point)
{
point->x = dispi->vect.x;
point->y = dispi->vect.y;
}
/**
* Do nothing until the next release
* @param dispi pointer to a display input
*/
void lv_dispi_wait_release(lv_dispi_t * dispi)
{
dispi->wait_release = 1;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Called periodically to handle the display inputs
* @param param unused
*/
static void dispi_task(void * param)
{
cord_t x;
cord_t y;
uint8_t i;
for (i = 0; i < INDEV_NUM; i++) {
dispi_array[i].pressed = indev_get(i, &x, &y);
dispi_proc_point(&dispi_array[i], x, y);
}
/*If reset query occurred in this round then set a flag to
* ask the dispis to reset themself in the next round */
if(lv_dispi_reset_qry != false) {
lv_dispi_reset_qry = false;
lv_dispi_reset_now = true;
}
/*If now a reset occurred then clear the flag*/
else if (lv_dispi_reset_now != false){
lv_dispi_reset_now = false;
}
}
/**
* Process new points by a display input. dispi_p->pressed has to be set
* @param dispi_p pointer to a display input
* @param x x coordinate of the next point
* @param y y coordinate of the next point
*/
static void dispi_proc_point(lv_dispi_t * dispi_p, cord_t x, cord_t y)
{
#if LV_ANTIALIAS != 0 && LV_VDB_SIZE != 0
dispi_p->act_point.x = x * LV_DOWNSCALE;
dispi_p->act_point.y = y * LV_DOWNSCALE;
#else
dispi_p->act_point.x = x;
dispi_p->act_point.y = y;
#endif
/*Handle the reset query*/
if(lv_dispi_reset_now != false) {
dispi_p->act_obj = NULL;
dispi_p->last_obj = NULL;
dispi_p->drag_range_out = 0;
dispi_p->drag_in_prog = 0;
dispi_p->long_press_sent = 0;
dispi_p->press_time_stamp = 0;
dispi_p->lpr_rep_time_stamp = 0;
dispi_p->vect_sum.x = 0;
dispi_p->vect_sum.y = 0;
}
if(dispi_p->pressed != false){
#if LV_DISPI_TP_MARKER != 0
area_t area;
area.x1 = x - (LV_DISPI_TP_MARKER >> 1);
area.y1 = y - (LV_DISPI_TP_MARKER >> 1);
area.x2 = x + ((LV_DISPI_TP_MARKER >> 1) | 0x1);
area.y2 = y + ((LV_DISPI_TP_MARKER >> 1) | 0x1);
lv_rfill(&area, NULL, COLOR_MAKE(0xFF, 0, 0), OPA_COVER);
#endif
dispi_proc_press(dispi_p);
} else {
disi_proc_release(dispi_p);
}
dispi_p->last_point.x = dispi_p->act_point.x;
dispi_p->last_point.y = dispi_p->act_point.y;
}
/**
* Process the pressed state
* @param dispi_p pointer to a display input
*/
static void dispi_proc_press(lv_dispi_t * dispi_p)
{
lv_obj_t * pr_obj = dispi_p->act_obj;
if(dispi_p->wait_release != 0) return;
/*If there is no last object then search*/
if(dispi_p->act_obj == NULL) {
pr_obj = dispi_search_obj(dispi_p, lv_scr_act());
}
/*If there is last object but it is not dragged also search*/
else if(dispi_p->drag_in_prog == 0) {/*Now act_obj != NULL*/
pr_obj = dispi_search_obj(dispi_p, lv_scr_act());
}
/*If a dragable 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 != dispi_p->act_obj) {
dispi_p->last_point.x = dispi_p->act_point.x;
dispi_p->last_point.y = dispi_p->act_point.y;
/*If a new object found the previous was lost, so send a signal*/
if(dispi_p->act_obj != NULL) {
dispi_p->act_obj->signal_f(dispi_p->act_obj,
LV_SIGNAL_PRESS_LOST, dispi_p);
}
if(pr_obj != NULL) {
/* Save the time when the obj pressed.
* It is necessary to count the long press time.*/
dispi_p->press_time_stamp = systick_get();
dispi_p->long_press_sent = 0;
dispi_p->drag_range_out = 0;
dispi_p->drag_in_prog = 0;
dispi_p->vect_sum.x = 0;
dispi_p->vect_sum.y = 0;
/*Search for 'top' attribute*/
lv_obj_t * i = pr_obj;
lv_obj_t * last_top = NULL;
while(i != NULL){
if(i->top_en != 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*/
ll_chg_list(&par->child_ll, &par->child_ll, last_top);
lv_obj_inv(last_top);
}
/*Send a signal about the press*/
pr_obj->signal_f(pr_obj, LV_SIGNAL_PRESSED, dispi_p);
}
}
/* The reset can be set in the signal function.
* In case of reset query ignore the remaining parts.*/
if(lv_dispi_reset_qry == false) {
dispi_p->act_obj = pr_obj; /*Save the pressed object*/
dispi_p->last_obj = dispi_p->act_obj; /*Refresh the last_obj*/
/*Calculate the vector*/
dispi_p->vect.x = dispi_p->act_point.x - dispi_p->last_point.x;
dispi_p->vect.y = dispi_p->act_point.y - dispi_p->last_point.y;
/*If there is active object and it can be dragged run the drag*/
if(dispi_p->act_obj != NULL) {
dispi_p->act_obj->signal_f(dispi_p->act_obj, LV_SIGNAL_PRESSING, dispi_p);
dispi_drag(dispi_p);
/*If there is no drag then check for long press time*/
if(dispi_p->drag_in_prog == 0 && dispi_p->long_press_sent == 0) {
/*Send a signal about the long press if enough time elapsed*/
if(systick_elaps(dispi_p->press_time_stamp) > LV_DISPI_LONG_PRESS_TIME) {
pr_obj->signal_f(pr_obj, LV_SIGNAL_LONG_PRESS, dispi_p);
/*Mark the signal sending to do not send it again*/
dispi_p->long_press_sent = 1;
/*Save the long press time stamp for the long press repeat handler*/
dispi_p->lpr_rep_time_stamp = systick_get();
}
}
/*Send long press repeated signal*/
if(dispi_p->drag_in_prog == 0 && dispi_p->long_press_sent == 1) {
/*Send a signal about the long press repeate if enough time elapsed*/
if(systick_elaps(dispi_p->lpr_rep_time_stamp) > LV_DISPI_LONG_PRESS_REP_TIME) {
pr_obj->signal_f(pr_obj, LV_SIGNAL_LONG_PRESS_REP, dispi_p);
dispi_p->lpr_rep_time_stamp = systick_get();
}
}
}
}
}
/**
* Process the released state
* @param dispi_p pointer to a display input
*/
static void disi_proc_release(lv_dispi_t * dispi_p)
{
if(dispi_p->wait_release != 0) {
dispi_p->act_obj = NULL;
dispi_p->last_obj = NULL;
dispi_p->press_time_stamp = 0;
dispi_p->lpr_rep_time_stamp = 0;
dispi_p->wait_release = 0;
}
/*Forgot the act obj and send a released signal */
if(dispi_p->act_obj != NULL) {
dispi_p->act_obj->signal_f(dispi_p->act_obj,
LV_SIGNAL_RELEASED, dispi_p);
dispi_p->act_obj = NULL;
dispi_p->press_time_stamp = 0;
dispi_p->lpr_rep_time_stamp = 0;
}
/*The reset can be set in the signal function.
* In case of reset query ignore the remaining parts.*/
if(dispi_p->last_obj != NULL && lv_dispi_reset_qry == false) {
dispi_drag_throw(dispi_p);
}
}
/**
* Search the most top, clickable object on the last point of a display input
* @param dispi_p pointer to a display input
* @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 * dispi_search_obj(const lv_dispi_t * dispi_p, lv_obj_t * obj)
{
lv_obj_t * found_p = NULL;
/*If the point is on this object*/
/*Check its children too*/
if(area_is_point_on(&obj->cords, &dispi_p->act_point)) {
lv_obj_t * i;
LL_READ(obj->child_ll, i) {
found_p = dispi_search_obj(dispi_p, i);
/*If a child was found then break*/
if(found_p != NULL) {
break;
}
}
/*If then the children was not ok, but 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 * i = obj;
while(i != NULL) {
if(lv_obj_get_hidden(i) == true) break;
i = lv_obj_get_parent(i);
}
/*No parent found with hidden == true*/
if(i == NULL) found_p = obj;
}
}
return found_p;
}
/**
* Handle the dragging of dispi_p->act_obj
* @param dispi_p pointer to a display input
*/
static void dispi_drag(lv_dispi_t * dispi_p)
{
lv_obj_t * drag_obj = dispi_p->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;
/*If still there is no drag then count the movement*/
if(dispi_p->drag_range_out == 0) {
dispi_p->vect_sum.x += dispi_p->vect.x;
dispi_p->vect_sum.y += dispi_p->vect.y;
/*If a move is greater then LV_DRAG_LIMIT then begin the drag*/
if(MATH_ABS(dispi_p->vect_sum.x) >= LV_DISPI_DRAG_LIMIT ||
MATH_ABS(dispi_p->vect_sum.y) >= LV_DISPI_DRAG_LIMIT)
{
dispi_p->drag_range_out = 1;
}
}
/*If the drag limit is stepped over then handle the dragging*/
if(dispi_p->drag_range_out != 0) {
/*Set new position if the vector is not zero*/
if(dispi_p->vect.x != 0 ||
dispi_p->vect.y != 0) {
/*Get the coordinates of the object end modify them*/
cord_t act_x = lv_obj_get_x(drag_obj);
cord_t act_y = lv_obj_get_y(drag_obj);
lv_obj_set_pos(drag_obj, act_x + dispi_p->vect.x, act_y + dispi_p->vect.y);
/*Set the drag in progress flag if the object is really moved*/
if(lv_obj_get_x(drag_obj) != act_x || lv_obj_get_y(drag_obj) != act_y) {
if(dispi_p->drag_range_out != 0) { /*Send the drag begin signal on first move*/
drag_obj->signal_f(drag_obj, LV_SIGNAL_DRAG_BEGIN, dispi_p);
}
dispi_p->drag_in_prog = 1;
}
}
}
}
/**
* Handle throwing by drag if the drag is ended
* @param dispi_p pointer to a display input
*/
static void dispi_drag_throw(lv_dispi_t * dispi_p)
{
if(dispi_p->drag_in_prog == 0) return;
/*Set new position if the vector is not zero*/
lv_obj_t * drag_obj = dispi_p->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 ){
dispi_p->drag_in_prog = 0;
drag_obj->signal_f(drag_obj, LV_SIGNAL_DRAG_END, dispi_p);
return;
}
/*Reduce the vectors*/
dispi_p->vect.x = dispi_p->vect.x * (100 -LV_DISPI_DRAG_THROW) / 100;
dispi_p->vect.y = dispi_p->vect.y * (100 -LV_DISPI_DRAG_THROW) / 100;
if(dispi_p->vect.x != 0 ||
dispi_p->vect.y != 0)
{
/*Get the coordinates and modify them*/
cord_t act_x = lv_obj_get_x(drag_obj) + dispi_p->vect.x;
cord_t act_y = lv_obj_get_y(drag_obj) + dispi_p->vect.y;
lv_obj_set_pos(drag_obj, act_x, act_y);
}
/*If the vectors become 0 -> drag_in_prog = 0 and send a drag end signal*/
else {
dispi_p->drag_in_prog = 0;
drag_obj->signal_f(drag_obj, LV_SIGNAL_DRAG_END, dispi_p);
}
}

View File

@@ -1,115 +0,0 @@
/**
* @file lv_dispi.h
*
*/
#ifndef LV_DISPI_H
#define LV_DISPI_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_obj.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
bool pressed;
point_t act_point;
point_t last_point;
point_t vect;
point_t vect_sum;
lv_obj_t * act_obj;
lv_obj_t * last_obj;
uint32_t press_time_stamp;
uint32_t lpr_rep_time_stamp;
/*Flags*/
uint8_t drag_range_out :1;
uint8_t drag_in_prog :1;
uint8_t long_press_sent :1;
uint8_t wait_release :1;
}lv_dispi_t;
typedef enum
{
LV_ACTION_RES_INV = 0, /*Typically indicates that the object is deleted (become invalid) in the action function*/
LV_ACTION_RES_OK, /*The object is valid (no deleted) after the action*/
}lv_action_res_t;
typedef lv_action_res_t ( * lv_action_t) (struct __LV_OBJ_T * obj, lv_dispi_t * dispi);
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Initialize the display input subsystem
*/
void lv_dispi_init(void);
/**
* Get an array with all the display inputs. Contains (INDEV_NUM elements)
* @return pointer to a an lv_dispi_t array.
*/
lv_dispi_t * lv_dispi_get_array(void);
/**
* Reset all display inputs
*/
void lv_dispi_reset(void);
/**
* Reset the long press state of a display input
* @param dispi pointer to a display input
*/
void lv_dispi_reset_lpr(lv_dispi_t * dispi);
/**
* Get the last point on display input
* @param dispi pointer to a display input
* @param point pointer to a point to store the result
*/
void lv_dispi_get_point(lv_dispi_t * dispi, point_t * point);
/**
* Check if there is dragging on display input or not
* @param dispi pointer to a display input
* @return true: drag is in progress
*/
bool lv_dispi_is_dragging(lv_dispi_t * dispi);
/**
* Get the vector of dragging on a display input
* @param dispi pointer to a display input
* @param point pointer to a point to store the vector
*/
void lv_dispi_get_vect(lv_dispi_t * dispi, point_t * point);
/**
* Do nothing until the next release
* @param dispi pointer to a display input
*/
void lv_dispi_wait_release(lv_dispi_t * dispi);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_DISPI_H*/

View File

@@ -1,264 +0,0 @@
/**
* @file lv_group.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_group.h"
#if LV_OBJ_GROUP != 0
#include <stddef.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static void style_mod_def(lv_style_t * style);
/**********************
* 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 = dm_alloc(sizeof(lv_group_t));
ll_init(&group->obj_ll, sizeof(lv_obj_t *));
group->style_mod = style_mod_def;
group->obj_focus = NULL;
group->frozen = 0;
return 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)
{
obj->group_p = group;
lv_obj_t ** next = ll_ins_tail(&group->obj_ll);
*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(ll_get_head(&group->obj_ll) == next) {
lv_group_focus_next(group);
}
}
/**
* Remove an object from its group
* @param obj pointer to an objectto remove
*/
void lv_group_rem_obj(lv_obj_t * obj)
{
lv_group_t * g = obj->group_p;
if(g == NULL) return;
lv_obj_t ** i;
LL_READ(g->obj_ll, i) {
if(*i == obj) {
ll_rem(&g->obj_ll, i);
break;
}
}
if(*g->obj_focus == obj) {
g->obj_focus = NULL;
lv_group_focus_next(g);
}
}
/**
* 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;
lv_obj_t ** i;
LL_READ(g->obj_ll, i) {
if(*i == obj) {
if(g->obj_focus != NULL) {
(*g->obj_focus)->signal_f(*g->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
lv_obj_inv(*g->obj_focus);
}
g->obj_focus = i;
if(g->obj_focus != NULL){
(*g->obj_focus)->signal_f(*g->obj_focus, LV_SIGNAL_FOCUS, NULL);
lv_obj_inv(*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 != 0) return;
if(group->obj_focus != NULL) {
(*group->obj_focus)->signal_f(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
lv_obj_inv(*group->obj_focus);
}
lv_obj_t ** obj_next;
if(group->obj_focus == NULL) obj_next = ll_get_head(&group->obj_ll);
else obj_next = ll_get_next(&group->obj_ll, group->obj_focus);
if(obj_next == NULL) obj_next = ll_get_head(&group->obj_ll);
group->obj_focus = obj_next;
if(group->obj_focus != NULL){
(*group->obj_focus)->signal_f(*group->obj_focus, LV_SIGNAL_FOCUS, NULL);
lv_obj_inv(*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 != 0) return;
if(group->obj_focus != NULL) {
(*group->obj_focus)->signal_f(*group->obj_focus, LV_SIGNAL_DEFOCUS, NULL);
lv_obj_inv(*group->obj_focus);
}
lv_obj_t ** obj_next;
if(group->obj_focus == NULL) obj_next = ll_get_tail(&group->obj_ll);
else obj_next = ll_get_prev(&group->obj_ll, group->obj_focus);
if(obj_next == NULL) obj_next = ll_get_tail(&group->obj_ll);
group->obj_focus = obj_next;
if(group->obj_focus != NULL){
(*group->obj_focus)->signal_f(*group->obj_focus, LV_SIGNAL_FOCUS, NULL);
lv_obj_inv(*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 control character (use LV_GROUP_KEY_.. to navigate)
*/
void lv_group_send(lv_group_t * group, char c)
{
lv_obj_t * act = lv_group_get_focused(group);
if(act == NULL) return;
act->signal_f(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_cb the style modifier function pointer
*/
void lv_group_set_style_mod_cb(lv_group_t * group, void (*style_cb)(lv_style_t * style))
{
group->style_mod = style_cb;
if(group->obj_focus != NULL) lv_obj_inv(*group->obj_focus);
}
/**
* 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_cpy(&group->style_tmp, style);
if(group->style_mod != NULL) group->style_mod(&group->style_tmp);
else style_mod_def(&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(lv_group_t * group)
{
if(group == NULL) return NULL;
if(group->obj_focus == NULL) return NULL;
return *group->obj_focus;
}
/**********************
* 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)
{
/*Make the style a little bit orange*/
style->bcolor = COLOR_ORANGE;
style->bopa = OPA_COVER;
if(style->bwidth == 0 && style->empty == 0) style->bwidth = 2 * LV_DOWNSCALE; /*Add border to not transparent styles*/
else style->bwidth = style->bwidth * 2; /*Make the border thicker*/
style->mcolor = color_mix(style->mcolor, COLOR_ORANGE, OPA_80);
style->gcolor = color_mix(style->gcolor, COLOR_ORANGE, OPA_80);
}
#endif /*LV_OBJ_GROUP != 0*/

View File

@@ -1,68 +0,0 @@
/**
* @file lv_group.h
*
*/
#ifndef LV_GROUP_H
#define LV_GROUP_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#include "lv_obj.h"
/*********************
* DEFINES
*********************/
/*Predefined keys to control the focused object via lv_group_send(group, c)*/
/*For compatibility in signal function define the keys regardless to LV_OBJ_GROUP*/
#define LV_GROUP_KEY_UP 17 /*0x11*/
#define LV_GROUP_KEY_DOWN 18 /*0x12*/
#define LV_GROUP_KEY_RIGHT 19 /*0x13*/
#define LV_GROUP_KEY_LEFT 20 /*0x14*/
#define LV_GROUP_KEY_ESC 33 /*0x1B*/
#define LV_GROUP_KEY_ENTER 10 /*0x0A, '\n'*/
#if LV_OBJ_GROUP != 0
/**********************
* TYPEDEFS
**********************/
typedef struct
{
ll_dsc_t obj_ll;
lv_obj_t ** obj_focus;
void (*style_mod)(lv_style_t * style);
lv_style_t style_tmp;
uint8_t frozen:1;
}lv_group_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
lv_group_t * lv_group_create(void);
void lv_group_add_obj(lv_group_t * group, lv_obj_t * obj);
void lv_group_rem_obj(lv_obj_t * obj);
void lv_group_focus_obj(lv_obj_t * obj);
void lv_group_focus_next(lv_group_t * group);
void lv_group_focus_prev(lv_group_t * group);
void lv_group_focus_freeze(lv_group_t * group, bool en);
void lv_group_send(lv_group_t * group, char c);
lv_style_t * lv_group_mod_style(lv_group_t * group, const lv_style_t * style);
lv_obj_t * lv_group_get_focused(lv_group_t * group);
/**********************
* MACROS
**********************/
#endif /*LV_OBJ_GROUP != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_GROUP_H*/

File diff suppressed because it is too large Load Diff

View File

@@ -1,689 +0,0 @@
/**
* @file lv_obj.h
*
*/
#ifndef LV_OBJ_H
#define LV_OBJ_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#include <misc/gfx/area.h>
#include <stddef.h>
#include <stdbool.h>
#include "misc/mem/dyn_mem.h"
#include "misc/mem/linked_list.h"
#include "misc/gfx/color.h"
#include "lv_style.h"
/*********************
* DEFINES
*********************/
/*Error check of lv_conf.h*/
#if LV_HOR_RES == 0 || LV_VER_RES == 0
#error "LV: LV_HOR_RES and LV_VER_RES must be greater then 0"
#endif
#if LV_DOWNSCALE != 1 && LV_DOWNSCALE != 2
#error "LV: LV_DOWNSCALE can be only 1 or 2"
#endif
#if LV_VDB_SIZE == 0 && LV_ANTIALIAS != 0
#error "LV: If LV_VDB_SIZE == 0 the antialaissing must be disabled"
#endif
#if LV_VDB_SIZE != 0 && LV_VDB_SIZE < LV_HOR_RES && LV_ANTIALIAS == 0
#error "LV: Small Virtual Display Buffer (lv_conf.h: LV_VDB_SIZE >= LV_HOR_RES)"
#endif
#if LV_VDB_SIZE != 0 && LV_VDB_SIZE < 2 *LV_HOR_RES && LV_ANTIALIAS != 0
#error "LV: Small Virtual Display Buffer (lv_conf.h: LV_VDB_SIZE >= (2 * LV_HOR_RES))"
#endif
/*New defines*/
#define LV_OBJ_DEF_WIDTH (80 * LV_DOWNSCALE)
#define LV_OBJ_DEF_HEIGHT (60 * LV_DOWNSCALE)
#define ANIM_IN 0x00 /*Animation to show an object. 'OR' it with lv_anim_builtin_t*/
#define ANIM_OUT 0x80 /*Animation to hide an object. 'OR' it with lv_anim_builtin_t*/
#define ANIM_DIR_MASK 0x80 /*ANIM_IN/ANIM_OUT mask*/
/**********************
* TYPEDEFS
**********************/
struct __LV_OBJ_T;
typedef enum
{
LV_DESIGN_DRAW_MAIN,
LV_DESIGN_DRAW_POST,
LV_DESIGN_COVER_CHK,
}lv_design_mode_t;
typedef bool (* lv_design_f_t) (struct __LV_OBJ_T * obj, const area_t * mask_p, lv_design_mode_t mode);
typedef enum
{
/*General signals*/
LV_SIGNAL_CLEANUP,
LV_SIGNAL_CHILD_CHG,
LV_SIGNAL_CORD_CHG,
LV_SIGNAL_STYLE_CHG,
LV_SIGNAL_REFR_EXT_SIZE,
/*Display input 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_t;
typedef bool (* lv_signal_f_t) (struct __LV_OBJ_T * obj, lv_signal_t sign, void * param);
typedef struct __LV_OBJ_T
{
struct __LV_OBJ_T * par; /*Pointer to the parent object*/
ll_dsc_t child_ll; /*Linked list to store the children objects*/
area_t cords; /*Coordinates of the object (x1, y1, x2, y2)*/
lv_signal_f_t signal_f; /*Object type specific signal function*/
lv_design_f_t design_f; /*Object type specific design function*/
void * ext; /*Object type specific extended data*/
lv_style_t * style_p; /*Pointer to the object's style*/
#if LV_OBJ_FREE_P != 0
void * free_p; /*Application specific pointer (set it freely)*/
#endif
void * group_p; /*Pointer to the group of the object*/
/*Attributes and states*/
uint8_t click_en :1; /*1: Can be pressed by a display input device*/
uint8_t drag_en :1; /*1: Enable the dragging*/
uint8_t drag_throw_en: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_en :1; /*1: If the object or its children is clicked it goes to the foreground*/
uint8_t reserved :1;
uint8_t protect; /*Automatically happening actions can be prevented. 'OR'ed values from lv_obj_prot_t*/
cord_t ext_size; /*EXTtend the size of the object in every direction. E.g. for shadow drawing*/
#if LV_OBJ_FREE_NUM != 0
uint8_t free_num; /*Application specific identifier (set it freely)*/
#endif
}lv_obj_t;
/*Protect some attributes (max. 8 bit)*/
typedef 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_t;
typedef 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,
}lv_align_t;
typedef 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*/
}lv_anim_builtin_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Init. the 'lv' library.
*/
void lv_init(void);
/**
* 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, lv_obj_t * copy);
/**
* Delete 'obj' and all of its children
* @param obj pointer to an object to delete
*/
void lv_obj_del(lv_obj_t * obj);
/**
* Signal function of the basic object
* @param obj pointer to an object
* @param sign signal type
* @param param parameter for the signal (depends on signal type)
* @return false: the object become invalid (e.g. deleted)
*/
bool lv_obj_signal(lv_obj_t * obj, lv_signal_t sign, void * param);
/**
* 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_inv(lv_obj_t * obj);
/**
* Load a new screen
* @param scr pointer to a screen
*/
void lv_scr_load(lv_obj_t * scr);
/**
* Set a new parent for an object. Its relative position will be the same.
* @param obj pointer to an object
* @param parent pointer to the new parent object
*/
void lv_obj_set_parent(lv_obj_t * obj, lv_obj_t * parent);
/**
* 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, cord_t x, cord_t y);
/**
* Set relative the position of an object (relative to the parent).
* The coordinates will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object
* @param x new distance from the left side of the parent. (will be multiplied with LV_DOWNSCALE)
* @param y new distance from the top of the parent. (will be multiplied with LV_DOWNSCALE)
*/
void lv_obj_set_pos_us(lv_obj_t * obj, cord_t x, cord_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, cord_t x);
/**
* Set the x coordinate of a object.
* The coordinate will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object
* @param x new distance from the left side from the parent. (will be multiplied with LV_DOWNSCALE)
*/
void lv_obj_set_x_us(lv_obj_t * obj, cord_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, cord_t y);
/**
* Set the y coordinate of a object.
* The coordinate will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object
* @param y new distance from the top of the parent. (will be multiplied with LV_DOWNSCALE)
*/
void lv_obj_set_y_us(lv_obj_t * obj, cord_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, cord_t w, cord_t h);
/**
* Set the size of an object. The coordinates will be upscaled with LV_DOWNSCALE.
* @param obj pointer to an object
* @param w new width (will be multiplied with LV_DOWNSCALE)
* @param h new height (will be multiplied with LV_DOWNSCALE)
*/
void lv_obj_set_size_us(lv_obj_t * obj, cord_t w, cord_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, cord_t w);
/**
* Set the width of an object. The width will be upscaled with LV_DOWNSCALE
* @param obj pointer to an object
* @param w new width (will be multiplied with LV_DOWNSCALE)
*/
void lv_obj_set_width_us(lv_obj_t * obj, cord_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, cord_t h);
/**
* Set the height of an object. The height will be upscaled with LV_DOWNSCALE
* @param obj pointer to an object
* @param h new height (will be multiplied with LV_DOWNSCALE)
*/
void lv_obj_set_height_us(lv_obj_t * obj, cord_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,lv_obj_t * base, lv_align_t align, cord_t x_mod, cord_t y_mod);
/**
* Align an object to an other object. The coordinates will be upscaled with LV_DOWNSCALE.
* @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 (will be multiplied with LV_DOWNSCALE)
* @param y_mod y coordinate shift after alignment (will be multiplied with LV_DOWNSCALE)
*/
void lv_obj_align_us(lv_obj_t * obj,lv_obj_t * base, lv_align_t align, cord_t x_mod, cord_t y_mod);
/**
* Set the extended size of an object
* @param obj pointer to an object
* @param ext_size the extended size
*/
void lv_obj_set_ext_size(lv_obj_t * obj, cord_t ext_size);
/**
* 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_refr_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_style_refr_objs(void * style);
/**
* 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 a bit or bits in the protect filed
* @param obj pointer to an object
* @param prot 'OR'-ed values from lv_obj_prot_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_obj_prot_t
*/
void lv_obj_clr_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_f(lv_obj_t * obj, lv_signal_f_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_f(lv_obj_t * obj, lv_design_f_t fp);
/**
* 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 Normal pointer to the allocated ext
*/
void * lv_obj_alloc_ext(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_refr_ext_size(lv_obj_t * obj);
#if LV_OBJ_FREE_NUM != 0
/**
* 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, uint8_t free_num);
#endif
#if LV_OBJ_FREE_P != 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_p(lv_obj_t * obj, void * free_p);
#endif
/**
* 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_anim(lv_obj_t * obj, lv_anim_builtin_t type, uint16_t time, uint16_t delay, void (*cb) (lv_obj_t *));
/**
* Return with the actual screen
* @return pointer to to the actual screen object
*/
lv_obj_t * lv_scr_act(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_scr(lv_obj_t * obj);
/**
* 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(lv_obj_t * obj);
/**
* Iterate through the children of an object
* @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(lv_obj_t * obj, 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_get_child_num(lv_obj_t * obj);
/**
* 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_cords(lv_obj_t * obj, 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
*/
cord_t lv_obj_get_x(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
*/
cord_t lv_obj_get_y(lv_obj_t * obj);
/**
* Get the width of an object
* @param obj pointer to an object
* @return the width
*/
cord_t lv_obj_get_width(lv_obj_t * obj);
/**
* Get the height of an object
* @param obj pointer to an object
* @return the height
*/
cord_t lv_obj_get_height(lv_obj_t * obj);
/**
* Get the extended size attribute of an object
* @param obj pointer to an object
* @return the extended size attribute
*/
cord_t lv_obj_get_ext_size(lv_obj_t * obj);
/**
* 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(lv_obj_t * obj);
/**
* Get the hidden attribute of an object
* @param obj pointer to an object
* @return true: the object is hidden
*/
bool lv_obj_get_hidden(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(lv_obj_t * obj);
/**
* Get the top enable attribute of an object
* @param obj pointer to an object
* @return true: the auto top feture is enabled
*/
bool lv_obj_get_top(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(lv_obj_t * obj);
/**
* Get the drag thow enable attribute of an object
* @param obj pointer to an object
* @return true: drag throw is enabled
*/
bool lv_obj_get_drag_throw(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(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_obj_prot_t)
*/
uint8_t lv_obj_get_protect(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_obj_prot_t)
* @return false: none of the given bits are set, true: at least one bit is set
*/
bool lv_obj_is_protected(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_f_t lv_obj_get_signal_f(lv_obj_t * obj);
/**
* Get the design function of an object
* @param obj pointer to an object
* @return the design function
*/
lv_design_f_t lv_obj_get_design_f(lv_obj_t * obj);
/**
* 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(lv_obj_t * obj);
#if LV_OBJ_FREE_NUM != 0
/**
* Get the free number
* @param obj pointer to an object
* @return the free number
*/
uint8_t lv_obj_get_free_num(lv_obj_t * obj);
#endif
#if LV_OBJ_FREE_P != 0
/**
* Get the free pointer
* @param obj pointer to an object
* @return the free pointer
*/
void * lv_obj_get_free_p(lv_obj_t * obj);
#endif
#if LV_OBJ_GROUP != 0
/**
* 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(lv_obj_t * obj);
#endif
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_OBJ_H*/

View File

@@ -1,474 +0,0 @@
/**
* @file lv_refr.c
*
*/
/*********************
* INCLUDES
*********************/
#include <stddef.h>
#include "lv_conf.h"
#include "misc/os/ptask.h"
#include "misc/mem/fifo.h"
#include "lv_refr.h"
#include "lv_vdb.h"
#include "hal/systick/systick.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
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 area_t * area_p);
#else
static void lv_refr_area_with_vdb(const area_t * area_p);
static void lv_refr_area_part_vdb(const area_t * area_p);
#endif
static lv_obj_t * lv_refr_get_top_obj(const area_t * area_p, lv_obj_t * obj);
static void lv_refr_make(lv_obj_t * top_p, const area_t * mask_p);
static void lv_refr_obj(lv_obj_t * obj, const 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);
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));
ptask_t* task;
task = ptask_create(lv_refr_task, LV_REFR_PERIOD, PTASK_PRIO_MID, NULL);
dm_assert(task);
}
/**
* Invalidate an area
* @param area_p pointer to area which should be invalidated
*/
void lv_inv_area(const area_t * area_p)
{
/*Clear the invalidate buffer if the parameter is NULL*/
if(area_p == NULL) {
inv_buf_p = 0;
return;
}
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;
area_t com_area;
bool suc;
suc = area_union(&com_area, area_p, &scr_area);
/*The area is truncated to the screen*/
if(suc != false)
{
#if LV_DOWNSCALE == 2
/*Rounding*/
com_area.x1 = com_area.x1 & (~0x1);
com_area.y1 = com_area.y1 & (~0x1);
com_area.x2 = com_area.x2 | 0x1;
com_area.y2 = com_area.y2 | 0x1;
#endif
/*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(area_is_in(&com_area, &inv_buf[i].area) != false) return;
}
/*Save the area*/
if(inv_buf_p < LV_INV_FIFO_SIZE) {
area_cpy(&inv_buf[inv_buf_p].area,&com_area);
} else {/*If no place for the area add the screen*/
inv_buf_p = 0;
area_cpy(&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;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Called periodically to handle the refreshing
* @param param unused
*/
static void lv_refr_task(void * param)
{
uint32_t start = systick_get();
lv_refr_join_area();
lv_refr_areas();
bool refr_done = false;
if(inv_buf_p != 0) refr_done = true;
memset(inv_buf, 0, sizeof(inv_buf));
inv_buf_p = 0;
/* In the callback lv_obj_inv can occur
* therefore be sure the inv_buf is cleared prior to it*/
if(refr_done != false) {
if(monitor_cb != NULL) {
monitor_cb(systick_elaps(start), px_num);
}
}
}
/**
* Join the areas which has got common parts
*/
static void lv_refr_join_area(void)
{
uint32_t join_from;
uint32_t join_in;
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(area_is_on(&inv_buf[join_in].area,
&inv_buf[join_from].area) == false)
{
continue;
}
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(area_get_size(&joined_area) <
(area_get_size(&inv_buf[join_in].area) + area_get_size(&inv_buf[join_from].area))) {
area_cpy(&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 += 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 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_make(top_p, 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 area_t * area_p)
{
/*Calculate the max row num*/
uint32_t max_row = (uint32_t) LV_VDB_SIZE / (area_get_width(area_p));
if(max_row > area_get_height(area_p)) max_row = area_get_height(area_p);
/*Round the row number with downscale*/
#if LV_DOWNSCALE == 2
max_row &= (~0x1);
#endif
/*Always use the full row*/
cord_t row;
cord_t row_last = 0;
for(row = area_p->y1; row + max_row - 1 <= area_p->y2; row += max_row) {
lv_vdb_t * vdb_p = lv_vdb_get();
/*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;
row_last = row + max_row - 1;
lv_refr_area_part_vdb(area_p);
}
/*If the last y coordinates are not handled yet ...*/
if(area_p->y2 != row_last) {
lv_vdb_t * vdb_p = lv_vdb_get();
/*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 = area_p->y2;
/*Refresh this part too*/
lv_refr_area_part_vdb(area_p);
}
}
/**
* 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 area_t * area_p)
{
lv_vdb_t * vdb_p = lv_vdb_get();
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'*/
area_t start_mask;
area_union(&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_make(top_p, &start_mask);
/*Flush the content of the VDB*/
lv_vdb_flush();
}
#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 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(area_is_in(area_p, &obj->cords) && 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->opa == OPA_COVER &&
obj->design_f(obj, area_p, LV_DESIGN_COVER_CHK) != false) {
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_make(lv_obj_t * top_p, const 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 = ll_get_prev(&(par->child_ll), border_p);
while(i != NULL) {
/*Refresh the objects*/
lv_refr_obj(i, mask_p);
i = 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_f(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 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 */
area_t obj_mask;
area_t obj_ext_mask;
area_t obj_area;
cord_t ext_size = obj->ext_size;
lv_obj_get_cords(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 = area_union(&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 */
lv_style_t * style = lv_obj_get_style(obj);
if(style->opa != OPA_TRANSP) {
obj->design_f(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN);
//tick_wait_ms(100); /*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_cords(obj, &obj_area);
union_ok = area_union(&obj_mask, mask_ori_p, &obj_area);
if(union_ok != false) {
area_t mask_child; /*Mask from obj and its child*/
lv_obj_t * child_p;
area_t child_area;
LL_READ_BACK(obj->child_ll, child_p)
{
lv_obj_get_cords(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 = area_union(&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 */
if(style->opa != OPA_TRANSP) {
obj->design_f(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST);
}
}
}

View File

@@ -1,70 +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);
/**
* Invalidate an area
* @param area_p pointer to area which should be invalidated
*/
void lv_inv_area(const 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));
/**********************
* STATIC FUNCTIONS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_REFR_H*/

View File

@@ -1,325 +0,0 @@
/**
* @file lv_style.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#include "lv_style.h"
#include "lv_obj.h"
#include "misc/mem/dyn_mem.h"
/*********************
* DEFINES
*********************/
#define LV_STYLE_ANIM_RES 255 /*Animation max in 1024 steps*/
#define LV_STYLE_ANIM_SHIFT 8 /*log2(LV_STYLE_ANIM_RES)*/
#define VAL_PROP(v1, v2, r) v1 + (((v2-v1) * r) >> LV_STYLE_ANIM_SHIFT)
#define STYLE_ATTR_ANIM(attr, r) if(start->attr != end->attr) act->attr = VAL_PROP(start->attr, end->attr, r)
/**********************
* TYPEDEFS
**********************/
typedef struct {
const lv_style_t * style_start;
const lv_style_t * style_end;
lv_style_t * style_anim;
}lv_style_anim_dsc_t;
/**********************
* STATIC PROTOTYPES
**********************/
static void lv_style_aimator(lv_style_anim_dsc_t * dsc, int32_t val);
/**********************
* STATIC VARIABLES
**********************/
static lv_style_t lv_style_scr;
static lv_style_t lv_style_transp;
static lv_style_t lv_style_transp_tight;
static lv_style_t lv_style_plain;
static lv_style_t lv_style_plain_color;
static lv_style_t lv_style_pretty;
static lv_style_t lv_style_pretty_color;
static lv_style_t lv_style_btn_rel;
static lv_style_t lv_style_btn_pr;
static lv_style_t lv_style_btn_trel;
static lv_style_t lv_style_btn_tpr;
static 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.ccolor = COLOR_MAKE(0x20, 0x20, 0x20);
lv_style_scr.opa = OPA_COVER;
lv_style_scr.mcolor = COLOR_MAKE(0xc9, 0xdb, 0xee);
lv_style_scr.gcolor = COLOR_MAKE(0x4d, 0x91, 0xd5);
lv_style_scr.bcolor = COLOR_BLACK;
lv_style_scr.scolor = COLOR_GRAY;
lv_style_scr.radius = 0;
lv_style_scr.bwidth = 0;
lv_style_scr.swidth = 0;
lv_style_scr.stype = LV_STYPE_FULL;
lv_style_scr.vpad = LV_DPI / 12;
lv_style_scr.hpad = LV_DPI / 12;
lv_style_scr.opad = LV_DPI / 12;
lv_style_scr.bopa = OPA_COVER;
lv_style_scr.empty = 0;
lv_style_scr.glass = 0;
lv_style_scr.font = font_get(FONT_DEFAULT);
lv_style_scr.letter_space = 1 * LV_DOWNSCALE;
lv_style_scr.line_space = 2 * LV_DOWNSCALE;
lv_style_scr.txt_align = LV_TXT_ALIGN_LEFT;
lv_style_scr.img_recolor = OPA_TRANSP;
lv_style_scr.line_width = 1 * LV_DOWNSCALE;
/*Plain style (by default near the same as the screen style)*/
memcpy(&lv_style_plain, &lv_style_scr, sizeof(lv_style_t));
lv_style_plain.mcolor = COLOR_WHITE;
lv_style_plain.gcolor = COLOR_WHITE;
lv_style_plain.bcolor = COLOR_WHITE;
/*Plain color style*/
memcpy(&lv_style_plain_color, &lv_style_plain, sizeof(lv_style_t));
lv_style_plain_color.ccolor = COLOR_MAKE(0xf0, 0xf0, 0xf0);
lv_style_plain_color.mcolor = COLOR_MAKE(0x55, 0x96, 0xd8);
lv_style_plain_color.gcolor = lv_style_plain_color.mcolor;
/*Pretty style */
memcpy(&lv_style_pretty, &lv_style_plain, sizeof(lv_style_t));
lv_style_pretty.ccolor = COLOR_MAKE(0x20, 0x20, 0x20);
lv_style_pretty.mcolor = COLOR_WHITE;
lv_style_pretty.gcolor = COLOR_SILVER;
lv_style_pretty.bcolor = COLOR_MAKE(0x40, 0x40, 0x40);
lv_style_pretty.radius = LV_DPI / 15;
lv_style_pretty.bwidth = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1;
lv_style_pretty.bopa = OPA_50;
/*Pretty color style*/
memcpy(&lv_style_pretty_color, &lv_style_pretty, sizeof(lv_style_t));
lv_style_pretty_color.ccolor = COLOR_MAKE(0xe0, 0xe0, 0xe0);
lv_style_pretty_color.mcolor = COLOR_MAKE(0x6b, 0x9a, 0xc7);
lv_style_pretty_color.gcolor = COLOR_MAKE(0x2b, 0x59, 0x8b);
lv_style_pretty_color.bcolor = COLOR_MAKE(0x15, 0x2c, 0x42);
/*Transparent style*/
memcpy(&lv_style_transp, &lv_style_plain, sizeof(lv_style_t));
lv_style_transp.empty = 1;
lv_style_transp.bwidth = 0;
lv_style_transp.glass = 1;
/*Transparent tight style*/
memcpy(&lv_style_transp_tight, &lv_style_transp, sizeof(lv_style_t));
lv_style_transp_tight.hpad = 0;
lv_style_transp_tight.vpad = 0;
/*Button released style*/
memcpy(&lv_style_btn_rel, &lv_style_plain, sizeof(lv_style_t));
lv_style_btn_rel.mcolor = COLOR_MAKE(0x76, 0xa2, 0xd0);
lv_style_btn_rel.gcolor = COLOR_MAKE(0x19, 0x3a, 0x5d);
lv_style_btn_rel.bcolor = COLOR_MAKE(0x0b, 0x19, 0x28);
lv_style_btn_rel.ccolor = COLOR_MAKE(0xff, 0xff, 0xff);
lv_style_btn_rel.bwidth = LV_DPI / 50 >= 1 ? LV_DPI / 50 : 1;
lv_style_btn_rel.radius = LV_DPI / 15;
lv_style_btn_rel.bopa = OPA_70;
lv_style_btn_rel.scolor = COLOR_GRAY;
lv_style_btn_rel.swidth = 0;
lv_style_btn_rel.hpad = LV_DPI / 4;
lv_style_btn_rel.vpad = LV_DPI / 6;
lv_style_btn_rel.opad = LV_DPI / 10;
lv_style_btn_rel.txt_align = LV_TXT_ALIGN_MID;
/*Button pressed style*/
memcpy(&lv_style_btn_pr, &lv_style_btn_rel, sizeof(lv_style_t));
lv_style_btn_pr.mcolor = COLOR_MAKE(0x33, 0x62, 0x94);
lv_style_btn_pr.gcolor = COLOR_MAKE(0x10, 0x26, 0x3c);
lv_style_btn_pr.ccolor = COLOR_MAKE(0xa4, 0xb5, 0xc6);
/*Button toggle released style*/
memcpy(&lv_style_btn_trel, &lv_style_btn_rel, sizeof(lv_style_t));
lv_style_btn_trel.mcolor = COLOR_MAKE(0x0a, 0x11, 0x22);
lv_style_btn_trel.gcolor = COLOR_MAKE(0x37, 0x62, 0x90);
lv_style_btn_trel.bcolor = COLOR_MAKE(0x01, 0x07, 0x0d);
lv_style_btn_trel.ccolor = COLOR_MAKE(0xc8, 0xdd, 0xf4);
/*Button toggle pressed style*/
memcpy(&lv_style_btn_tpr, &lv_style_btn_rel, sizeof(lv_style_t));
lv_style_btn_tpr.mcolor = COLOR_MAKE(0x02, 0x14, 0x27);
lv_style_btn_tpr.gcolor = COLOR_MAKE(0x2b, 0x4c, 0x70);
lv_style_btn_tpr.ccolor = 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.mcolor = COLOR_MAKE(0xd8, 0xd8, 0xd8);
lv_style_btn_ina.gcolor = COLOR_MAKE(0xd8, 0xd8, 0xd8);
lv_style_btn_ina.bcolor = COLOR_MAKE(0x90, 0x90, 0x90);
lv_style_btn_ina.ccolor = COLOR_MAKE(0x70, 0x70, 0x70);
}
/**
* Get style from its name
* @param style_name an element of the 'lv_style_name_t' enum
* @return pointer to the requested style (lv_style_def by default)
*/
lv_style_t * lv_style_get(lv_style_name_t style_name, lv_style_t * copy)
{
lv_style_t * style = &lv_style_plain;
switch(style_name) {
case LV_STYLE_SCR:
style = &lv_style_scr;
break;
case LV_STYLE_PLAIN:
style = &lv_style_plain;
break;
case LV_STYLE_PLAIN_COLOR:
style = &lv_style_plain_color;
break;
case LV_STYLE_PRETTY:
style = &lv_style_pretty;
break;
case LV_STYLE_PRETTY_COLOR:
style = &lv_style_pretty_color;
break;
case LV_STYLE_TRANSP:
style = &lv_style_transp;
break;
case LV_STYLE_TRANSP_TIGHT:
style = &lv_style_transp_tight;
break;
case LV_STYLE_BTN_REL:
style = &lv_style_btn_rel;
break;
case LV_STYLE_BTN_PR:
style = &lv_style_btn_pr;
break;
case LV_STYLE_BTN_TREL:
style = &lv_style_btn_trel;
break;
case LV_STYLE_BTN_TPR:
style = &lv_style_btn_tpr;
break;
case LV_STYLE_BTN_INA:
style = &lv_style_btn_ina;
break;
default:
style = &lv_style_plain;
}
if(copy != NULL) memcpy(copy, style, sizeof(lv_style_t));
return style;
}
/**
* Copy a style to an other
* @param dest pointer to the destination style
* @param src pointer to the source style
*/
void lv_style_cpy(lv_style_t * dest, const lv_style_t * src)
{
memcpy(dest, src, sizeof(lv_style_t));
}
/**
* 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)
*/
void lv_style_anim_create(lv_style_anim_t * anim)
{
lv_style_anim_dsc_t * dsc;
dsc = dm_alloc(sizeof(lv_style_anim_dsc_t));
dsc->style_anim = anim->style_anim;
dsc->style_start = anim->style_start;
dsc->style_end = anim->style_end;
anim_t a;
a.var = (void*)dsc;
a.start = 0;
a.end = LV_STYLE_ANIM_RES;
a.fp = (anim_fp_t)lv_style_aimator;
a.path = anim_get_path(ANIM_PATH_LIN);
a.end_cb = anim->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;
anim_create(&a);
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* 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 lv_style_aimator(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;
STYLE_ATTR_ANIM(opa, val);
STYLE_ATTR_ANIM(radius, val);
STYLE_ATTR_ANIM(bwidth, val);
STYLE_ATTR_ANIM(swidth, val);
STYLE_ATTR_ANIM(hpad, val);
STYLE_ATTR_ANIM(vpad, val);
STYLE_ATTR_ANIM(opad, val);
STYLE_ATTR_ANIM(line_space, val);
STYLE_ATTR_ANIM(letter_space, val);
STYLE_ATTR_ANIM(line_width, val);
STYLE_ATTR_ANIM(img_recolor, val);
act->mcolor = color_mix(end->mcolor, start->mcolor, val);
act->gcolor = color_mix(end->gcolor, start->gcolor, val);
act->bcolor = color_mix(end->bcolor, start->bcolor, val);
act->scolor = color_mix(end->scolor, start->scolor, val);
act->ccolor = color_mix(end->ccolor, start->ccolor, val);
if(val == 0) {
act->empty = start->empty;
act->glass = start->glass;
act->font = start->font;
act->stype = start->stype;
act->txt_align = start->txt_align;
}
if(val == LV_STYLE_ANIM_RES) {
act->empty = end->empty;
act->glass = end->glass;
act->font = end->font;
act->stype = end->stype;
act->txt_align = end->txt_align;
}
lv_style_refr_objs(dsc->style_anim);
}

View File

@@ -1,155 +0,0 @@
/**
* @file lv_style.h
*
*/
#ifndef LV_STYLE_H
#define LV_STYLE_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include <stdbool.h>
#include "misc/gfx/color.h"
#include "misc/gfx/area.h"
#include "misc/gfx/font.h"
#include "misc/gfx/anim.h"
/*********************
* DEFINES
*********************/
#define LV_RADIUS_CIRCLE (CORD_MAX) /*A very big radius to always draw as circle*/
/**********************
* TYPEDEFS
**********************/
typedef enum {
LV_TXT_ALIGN_LEFT = 0,
LV_TXT_ALIGN_MID,
}lv_txt_align_t;
/*Shadow types*/
typedef enum
{
LV_STYPE_BOTTOM = 0,
LV_STYPE_FULL,
}lv_stype_t;
typedef struct
{
/*Object level styles*/
color_t ccolor; /*Content color (e.g. text or image re-color )*/
opa_t opa; /*Opacity of the object*/
uint8_t glass :1; /*1: Do not inherit this style*/
uint8_t empty :1; /*Transparent background (border drawn)*/
uint8_t stype :2; /*Shadow type from 'lv_shadow_type_t'*/
uint8_t txt_align:2;
color_t mcolor; /*Main color of background*/
color_t gcolor; /*Gradient color of background*/
color_t bcolor; /*Border color of background*/
color_t scolor; /*Shadow color of background*/
cord_t radius; /*Corner radius of background*/
cord_t bwidth; /*Width of the background border*/
cord_t swidth; /*Width of the background shadow effect*/
cord_t vpad; /*Vertical padding*/
cord_t hpad; /*Horizontal padding*/
cord_t opad; /*Object padding on the background*/
opa_t bopa; /*Opacity of background border*/
const font_t * font;
cord_t letter_space;
cord_t line_space;
opa_t img_recolor;
cord_t line_width;
}lv_style_t;
typedef enum {
LV_STYLE_SCR,
LV_STYLE_TRANSP,
LV_STYLE_TRANSP_TIGHT,
LV_STYLE_PLAIN,
LV_STYLE_PLAIN_COLOR,
LV_STYLE_PRETTY,
LV_STYLE_PRETTY_COLOR,
LV_STYLE_BTN_REL,
LV_STYLE_BTN_PR,
LV_STYLE_BTN_TREL,
LV_STYLE_BTN_TPR,
LV_STYLE_BTN_INA,
}lv_style_name_t;
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*/
anim_cb_t end_cb; /*Call it when the animation is ready*/
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);
*/
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Init the basic styles
*/
void lv_style_init (void);
/**
* Get style from its name
* @param style_name an element of the 'lv_style_name_t' enum
* @return pointer to the requested style (lv_style_def by default)
*/
lv_style_t * lv_style_get(lv_style_name_t style_name, lv_style_t * copy);
/**
* Copy a style to an other
* @param dest pointer to the destination style
* @param src pointer to the source style
*/
void lv_style_cpy(lv_style_t * dest, const lv_style_t * src);
/**
* 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)
*/
void lv_style_anim_create(lv_style_anim_t * anim);
/**********************
* MACROS
**********************/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_STYLE_H*/

View File

@@ -1,169 +0,0 @@
/**
* @file lv_vdb.c
*
*/
#include "lv_conf.h"
#if LV_VDB_SIZE != 0
#include "hal/disp/disp.h"
#include <stddef.h>
#include "lv_vdb.h"
/*********************
* INCLUDES
*********************/
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
#if LV_VDB_DOUBLE != 0
typedef enum {
LV_VDB_STATE_FREE = 0,
LV_VDB_STATE_ACTIVE,
LV_VDB_STATE_FLUSH,
} lv_vdb_state_t;
#endif
/**********************
* STATIC PROTOTYPES
**********************/
/**********************
* STATIC VARIABLES
**********************/
#if LV_VDB_DOUBLE == 0
static lv_vdb_t vdb;
#else
static lv_vdb_t vdb[2];
static volatile lv_vdb_state_t vdb_state[2] = {LV_VDB_STATE_FREE, LV_VDB_STATE_FREE};
#endif
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Get the 'vdb' variable or allocate one in LV_VDB_DOUBLE mode
* @return pointer to the 'vdb' variable
*/
lv_vdb_t * lv_vdb_get(void)
{
#if LV_VDB_DOUBLE == 0
return &vdb;
#else
/*If already there is an active do nothing*/
if(vdb_state[0] == LV_VDB_STATE_ACTIVE) return &vdb[0];
if(vdb_state[1] == LV_VDB_STATE_ACTIVE) return &vdb[1];
/*Try to allocate a free VDB*/
if(vdb_state[0] == LV_VDB_STATE_FREE) {
vdb_state[0] = LV_VDB_STATE_ACTIVE;
return &vdb[0];
}
if(vdb_state[1] == LV_VDB_STATE_FREE) {
vdb_state[1] = LV_VDB_STATE_ACTIVE;
return &vdb[1];
}
return NULL; /*There wasn't free VDB (never happen)*/
#endif
}
/**
* Flush the content of the VDB
*/
void lv_vdb_flush(void)
{
lv_vdb_t * vdb_act = lv_vdb_get();
if(vdb_act == NULL) return;
#if LV_VDB_DOUBLE != 0
/* Wait the pending flush before starting this one
* (Don't forget: 'lv_vdb_flush_ready' has to be called when flushing is ready)*/
while(vdb_state[0] == LV_VDB_STATE_FLUSH || vdb_state[1] == LV_VDB_STATE_FLUSH);
/*Turn the active VDB to flushing*/
if(vdb_state[0] == LV_VDB_STATE_ACTIVE) vdb_state[0] = LV_VDB_STATE_FLUSH;
if(vdb_state[1] == LV_VDB_STATE_ACTIVE) vdb_state[1] = LV_VDB_STATE_FLUSH;
#endif
#if LV_ANTIALIAS == 0
disp_map(vdb_act->area.x1, vdb_act->area.y1, vdb_act->area.x2, vdb_act->area.y2, vdb_act->buf);
#else
/* Get the average of 2x2 pixels and put the result back to the VDB
* The reading goes much faster then the write back
* so useful data won't be overwritten
* Example:
* -----------------------------
* in1_buf |2,2|6,8| 3,7
* in2_buf |4,4|7,7| 1,2
* --------- ==>
* in1_buf |1,1|1,3|
* in2_buf |1,1|1,3|
* */
cord_t x;
cord_t y;
cord_t w = area_get_width(&vdb_act->area);
color_t * in1_buf = vdb_act->buf; /*Pointer to the first row*/
color_t * in2_buf = vdb_act->buf + w; /*Pointer to the second row*/
color_t * out_buf = vdb_act->buf; /*Store the result here*/
for(y = vdb_act->area.y1; y < vdb_act->area.y2; y += 2) {
for(x = vdb_act->area.x1; x < vdb_act->area.x2; x += 2) {
/*If the pixels are the same do not calculate the average */
if(in1_buf->full == (in1_buf + 1)->full &&
in1_buf->full == in2_buf->full &&
in1_buf->full == (in2_buf + 1)->full) {
out_buf->full = in1_buf->full;
} else {
/*Get the average of 2x2 red*/
out_buf->red = (in1_buf->red + (in1_buf + 1)->red +
in2_buf->red + (in2_buf+ 1)->red) >> 2;
/*Get the average of 2x2 green*/
out_buf->green = (in1_buf->green + (in1_buf + 1)->green +
in2_buf->green + (in2_buf + 1)->green) >> 2;
/*Get the average of 2x2 blue*/
out_buf->blue = (in1_buf->blue + (in1_buf + 1)->blue +
in2_buf->blue + (in2_buf + 1)->blue) >> 2;
}
in1_buf += 2; /*Skip the next pixel because it is already used above*/
in2_buf += 2;
out_buf ++;
}
/*2 row is ready so go the next 2*/
in1_buf += w; /*Skip the next row because it is processed from in2_buf*/
in2_buf += w;
}
/* Now the full the VDB is filtered and the result is stored in the first quarter of it
* Write out the filtered map to the display*/
disp_map(vdb_act->area.x1 >> 1, vdb_act->area.y1 >> 1, vdb_act->area.x2 >> 1, vdb_act->area.y2 >> 1, vdb_act->buf);
#endif
}
/**
* In 'LV_VDB_DOUBLE' mode has to be called when the 'disp_map'
* is ready with copying the map to a frame buffer.
*/
void lv_vdb_flush_ready(void)
{
#if LV_VDB_DOUBLE != 0
if(vdb_state[0] == LV_VDB_STATE_FLUSH) vdb_state[0] = LV_VDB_STATE_FREE;
if(vdb_state[1] == LV_VDB_STATE_FLUSH) vdb_state[1] = LV_VDB_STATE_FREE;
#endif
}
/**********************
* STATIC FUNCTIONS
**********************/
#endif

View File

@@ -1,69 +0,0 @@
/**
* @file lv_vdb.h
*
*/
#ifndef LV_VDB_H
#define LV_VDB_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#if LV_VDB_SIZE != 0
#include "misc/gfx/color.h"
#include "misc/gfx/area.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
typedef struct
{
area_t area;
color_t buf[LV_VDB_SIZE];
}lv_vdb_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Get the 'vdb' variable or allocate one in LV_VDB_DOUBLE mode
* @return pointer to the 'vdb' variable
*/
lv_vdb_t * lv_vdb_get(void);
/**
* Flush the content of the vdb
*/
void lv_vdb_flush(void);
/**
* In 'LV_VDB_DOUBLE' mode has to be called when 'disp_map()'
* is ready with copying the map to a frame buffer.
*/
void lv_vdb_flush_ready(void);
/**********************
* MACROS
**********************/
#endif /*LV_VDB_SIZE != 0*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_VDB_H*/

View File

@@ -1,306 +0,0 @@
/**
* @file lv_bar.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#if USE_LV_BAR != 0
#include <lvgl/lv_objx/lv_bar.h>
#include "../lv_draw/lv_draw.h"
#include "misc/gfx/anim.h"
#include <stdio.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static bool lv_bar_design(lv_obj_t * bar, const area_t * mask, lv_design_mode_t mode);
/**********************
* STATIC VARIABLES
**********************/
static lv_design_f_t ancestor_design_f;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/*-----------------
* Create function
*-----------------*/
/**
* Create a bar objects
* @param par pointer to an object, it will be the parent of the new bar
* @param copy pointer to a bar object, if not NULL then the new object will be copied from it
* @return pointer to the created bar
*/
lv_obj_t * lv_bar_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor basic object*/
lv_obj_t * new_bar = lv_obj_create(par, copy);
dm_assert(new_bar);
/*Allocate the object type specific extended data*/
lv_bar_ext_t * ext = lv_obj_alloc_ext(new_bar, sizeof(lv_bar_ext_t));
dm_assert(ext);
ext->min_value = 0;
ext->max_value = 100;
ext->act_value = 0;
ext->style_indic = lv_style_get(LV_STYLE_PRETTY_COLOR, NULL);
/* Save the ancient design function.
* It will be used in the bar design function*/
if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_f(new_bar);
lv_obj_set_signal_f(new_bar, lv_bar_signal);
lv_obj_set_design_f(new_bar, lv_bar_design);
/*Init the new bar object*/
if(copy == NULL) {
lv_obj_set_click(new_bar, false);
lv_obj_set_size(new_bar, LV_DPI * 2, LV_DPI / 3);
lv_obj_set_style(new_bar, lv_style_get(LV_STYLE_PRETTY, NULL));
lv_bar_set_value(new_bar, ext->act_value);
} else {
lv_bar_ext_t * ext_copy = lv_obj_get_ext(copy);
ext->min_value = ext_copy->min_value;
ext->max_value = ext_copy->max_value;
ext->act_value = ext_copy->act_value;
ext->style_indic = ext_copy->style_indic;
/*Refresh the style with new signal function*/
lv_obj_refr_style(new_bar);
lv_bar_set_value(new_bar, ext->act_value);
}
return new_bar;
}
/**
* Signal function of the bar
* @param bar pointer to a bar object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param)
{
bool valid;
/* Include the ancient signal function */
valid = lv_obj_signal(bar, sign, param);
/* The object can be deleted so check its validity and then
* make the object specific signal handling */
if(valid != false) {
if(sign == LV_SIGNAL_REFR_EXT_SIZE) {
lv_style_t * style_indic = lv_bar_get_style_indic(bar);
if(style_indic->swidth > bar->ext_size) bar->ext_size = style_indic->swidth;
}
}
return valid;
}
/*=====================
* Setter functions
*====================*/
/**
* Set a new value on the bar
* @param bar pointer to a bar object
* @param value new value
*/
void lv_bar_set_value(lv_obj_t * bar, int16_t value)
{
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
ext->act_value = value > ext->max_value ? ext->max_value : value;
ext->act_value = ext->act_value < ext->min_value ? ext->min_value : ext->act_value;
lv_obj_inv(bar);
}
/**
* Set a new value with animation on the bar
* @param bar pointer to a bar object
* @param value new value
* @param anim_time animation time in milliseconds
*/
void lv_bar_set_value_anim(lv_obj_t * bar, int16_t value, uint16_t anim_time)
{
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
int16_t new_value;
new_value = value > ext->max_value ? ext->max_value : value;
new_value = new_value < ext->min_value ? ext->min_value : new_value;
anim_t a;
a.var = bar;
a.start = ext->act_value;
a.end = new_value;
a.fp = (anim_fp_t)lv_bar_set_value;
a.path = anim_get_path(ANIM_PATH_LIN);
a.end_cb = NULL;
a.act_time = 0;
a.time = anim_time;
a.playback = 0;
a.playback_pause = 0;
a.repeat = 0;
a.repeat_pause = 0;
anim_create(&a);
}
/**
* Set minimum and the maximum values of a bar
* @param bar pointer to he bar object
* @param min minimum value
* @param max maximum value
*/
void lv_bar_set_range(lv_obj_t * bar, int16_t min, int16_t max)
{
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
ext->max_value = max;
ext->max_value = max;
if(ext->act_value > max) {
ext->act_value = max;
lv_bar_set_value(bar, ext->act_value);
}
lv_obj_inv(bar);
}
/**
* Set the style of bar indicator
* @param bar pointer to a bar object
* @param style pointer to a style
*/
void lv_bar_set_style_indic(lv_obj_t * bar, lv_style_t * style)
{
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
ext->style_indic = style;
bar->signal_f(bar, LV_SIGNAL_REFR_EXT_SIZE, NULL);
lv_obj_inv(bar);
}
/*=====================
* Getter functions
*====================*/
/**
* Get the value of a bar
* @param bar pointer to a bar object
* @return the value of the bar
*/
int16_t lv_bar_get_value(lv_obj_t * bar)
{
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
return ext->act_value;
}
/**
* Get the minimum value of a bar
* @param bar pointer to a bar object
* @return the minimum value of the bar
*/
int16_t lv_bar_get_min_value(lv_obj_t * bar)
{
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
return ext->min_value;
}
/**
* Get the maximum value of a bar
* @param bar pointer to a bar object
* @return the maximum value of the bar
*/
int16_t lv_bar_get_max_value(lv_obj_t * bar)
{
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
return ext->max_value;
}
/**
* Get the style of bar indicator
* @param bar pointer to a bar object
* @return pointer to the bar indicator style
*/
lv_style_t * lv_bar_get_style_indic(lv_obj_t * bar)
{
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
if(ext->style_indic == NULL) return lv_obj_get_style(bar);
return ext->style_indic;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Handle the drawing related tasks of the bars
* @param bar pointer to an object
* @param mask the object will be drawn only in this area
* @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
* (return 'true' if yes)
* LV_DESIGN_DRAW: draw the object (always return 'true')
* LV_DESIGN_DRAW_POST: drawing after every children are drawn
* @param return true/false, depends on 'mode'
*/
static bool lv_bar_design(lv_obj_t * bar, const area_t * mask, lv_design_mode_t mode)
{
if(mode == LV_DESIGN_COVER_CHK) {
/*Return false if the object is not covers the mask area*/
return ancestor_design_f(bar, mask, mode);;
} else if(mode == LV_DESIGN_DRAW_MAIN) {
ancestor_design_f(bar, mask, mode);
lv_bar_ext_t * ext = lv_obj_get_ext(bar);
lv_style_t * style_indic = lv_bar_get_style_indic(bar);
area_t indic_area;
area_cpy(&indic_area, &bar->cords);
indic_area.x1 += style_indic->hpad;
indic_area.x2 -= style_indic->hpad;
indic_area.y1 += style_indic->vpad;
indic_area.y2 -= style_indic->vpad;
cord_t w = area_get_width(&indic_area);
cord_t h = area_get_height(&indic_area);
if(w >= h) {
indic_area.x2 = (int32_t) ((int32_t)w * ext->act_value) / (ext->max_value - ext->min_value);
indic_area.x2 += indic_area.x1;
} else {
indic_area.y1 = (int32_t) ((int32_t)h * ext->act_value) / (ext->max_value - ext->min_value);
indic_area.y1 = indic_area.y2 - indic_area.y1;
}
/*Draw the indicator*/
lv_draw_rect(&indic_area, mask, style_indic);
}
return true;
}
#endif

View File

@@ -1,131 +0,0 @@
/**
* @file lv_bar.h
*
*/
#ifndef LV_BAR_H
#define LV_BAR_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#if USE_LV_BAR != 0
#include "../lv_obj/lv_obj.h"
#include <lvgl/lv_objx/lv_cont.h>
#include "lv_btn.h"
#include "lv_label.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/*Data of bar*/
typedef struct
{
/*No inherited ext*/ /*Ext. of ancestor*/
/*New data for this type */
int16_t act_value; /*Current value of the bar*/
int16_t min_value; /*Minimum value of the bar*/
int16_t max_value; /*Maximum value of the bar*/
lv_style_t * style_indic; /*Style of the indicator*/
}lv_bar_ext_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a bar objects
* @param par pointer to an object, it will be the parent of the new bar
* @param copy pointer to a bar object, if not NULL then the new object will be copied from it
* @return pointer to the created bar
*/
lv_obj_t * lv_bar_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the bar
* @param bar pointer to a bar object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_bar_signal(lv_obj_t * bar, lv_signal_t sign, void * param);
/**
* Set a new value on the bar
* @param bar pointer to a bar object
* @param value new value
*/
void lv_bar_set_value(lv_obj_t * bar, int16_t value);
/**
* Set a new value with animation on the bar
* @param bar pointer to a bar object
* @param value new value
* @param anim_time animation time in milliseconds
*/
void lv_bar_set_value_anim(lv_obj_t * bar, int16_t value, uint16_t anim_time);
/**
* Set minimum and the maximum values of a bar
* @param bar pointer to he bar object
* @param min minimum value
* @param max maximum value
*/
void lv_bar_set_range(lv_obj_t * bar, int16_t min, int16_t max);
/**
* Set the style of bar indicator
* @param bar pointer to a bar object
* @param style pointer to a style
*/
void lv_bar_set_style_indic(lv_obj_t * bar, lv_style_t * style);
/**
* Get the value of a bar
* @param bar pointer to a bar object
* @return the value of the bar
*/
int16_t lv_bar_get_value(lv_obj_t * bar);
/**
* Get the minimum value of a bar
* @param bar pointer to a bar object
* @return the minimum value of the bar
*/
int16_t lv_bar_get_min_value(lv_obj_t * bar);
/**
* Get the maximum value of a bar
* @param bar pointer to a bar object
* @return the maximum value of the bar
*/
int16_t lv_bar_get_max_value(lv_obj_t * bar);
/**
* Get the style of bar indicator
* @param bar pointer to a bar object
* @return pointer to the bar indicator style
*/
lv_style_t * lv_bar_get_style_indic(lv_obj_t * bar);
/**********************
* MACROS
**********************/
#endif /*USE_LV_BAR*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_BAR_H*/

View File

@@ -1,437 +0,0 @@
/**
* @file lv_btn.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#if USE_LV_BTN != 0
#include "lv_btn.h"
#include "../lv_obj/lv_group.h"
#include "../lv_draw/lv_draw.h"
#include "misc/gfx/area.h"
#include "misc/gfx/color.h"
#include <stdbool.h>
#include <string.h>
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
#if 0
static bool lv_btn_design(lv_obj_t * btn, const area_t * mask, lv_design_mode_t mode);
#endif
/**********************
* STATIC VARIABLES
**********************/
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/**
* Create a button objects
* @param par pointer to an object, it will be the parent of the new button
* @param copy pointer to a button object, if not NULL then the new object will be copied from it
* @return pointer to the created button
*/
lv_obj_t * lv_btn_create(lv_obj_t * par, lv_obj_t * copy)
{
lv_obj_t * new_btn;
new_btn = lv_cont_create(par, copy);
dm_assert(new_btn);
/*Allocate the extended data*/
lv_btn_ext_t * ext = lv_obj_alloc_ext(new_btn, sizeof(lv_btn_ext_t));
dm_assert(ext);
ext->state = LV_BTN_STATE_REL;
ext->pr_action = NULL;
ext->rel_action = NULL;
ext->lpr_action = NULL;
ext->lpr_rep_action = NULL;
ext->styles[LV_BTN_STATE_REL] = lv_style_get(LV_STYLE_BTN_REL, NULL);
ext->styles[LV_BTN_STATE_PR] = lv_style_get(LV_STYLE_BTN_PR, NULL);
ext->styles[LV_BTN_STATE_TREL] = lv_style_get(LV_STYLE_BTN_TREL, NULL);
ext->styles[LV_BTN_STATE_TPR] = lv_style_get(LV_STYLE_BTN_TPR, NULL);
ext->styles[LV_BTN_STATE_INA] = lv_style_get(LV_STYLE_BTN_INA, NULL);
ext->lpr_exec = 0;
ext->tgl = 0;
lv_obj_set_signal_f(new_btn, lv_btn_signal);
/*If no copy do the basic initialization*/
if(copy == NULL) {
lv_cont_set_layout(new_btn, LV_CONT_LAYOUT_CENTER);
lv_obj_set_style(new_btn, ext->styles[LV_BTN_STATE_REL]);
}
/*Copy 'copy'*/
else {
lv_btn_ext_t * copy_ext = lv_obj_get_ext(copy);
ext->state = copy_ext->state;
ext->pr_action = copy_ext->pr_action;
ext->rel_action = copy_ext->rel_action;
ext->lpr_action = copy_ext->lpr_action;
ext->lpr_rep_action = copy_ext->lpr_action;
ext->styles[LV_BTN_STATE_REL] = copy_ext->styles[LV_BTN_STATE_REL];
ext->styles[LV_BTN_STATE_PR] = copy_ext->styles[LV_BTN_STATE_PR];
ext->styles[LV_BTN_STATE_TREL] = copy_ext->styles[LV_BTN_STATE_TREL];
ext->styles[LV_BTN_STATE_TPR] = copy_ext->styles[LV_BTN_STATE_TPR];
ext->styles[LV_BTN_STATE_INA] = copy_ext->styles[LV_BTN_STATE_INA];
ext->tgl = copy_ext->tgl;
/*Refresh the style with new signal function*/
lv_obj_refr_style(new_btn);
}
return new_btn;
}
/**
* Signal function of the button
* @param btn pointer to a button object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param)
{
bool valid;
/* Include the ancient signal function */
valid = lv_cont_signal(btn, sign, param);
/* The object can be deleted so check its validity and then
* make the object specific signal handling */
if(valid != false) {
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
lv_btn_state_t state = lv_btn_get_state(btn);
bool tgl = lv_btn_get_tgl(btn);
if(sign == LV_SIGNAL_PRESSED) {
/*Refresh the state*/
if(ext->state == LV_BTN_STATE_REL) {
lv_btn_set_state(btn, LV_BTN_STATE_PR);
} else if(ext->state == LV_BTN_STATE_TREL) {
lv_btn_set_state(btn, LV_BTN_STATE_TPR);
}
ext->lpr_exec = 0;
/*Call the press action, 'param' is the caller dispi*/
if(ext->pr_action != NULL && state != LV_BTN_STATE_INA) {
valid = ext->pr_action(btn, param);
}
}
else if(sign == LV_SIGNAL_PRESS_LOST) {
/*Refresh the state*/
if(ext->state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL);
else if(ext->state == LV_BTN_STATE_TPR) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
}
else if(sign == LV_SIGNAL_PRESSING) {
/*When the button begins to drag revert pressed states to released*/
if(lv_dispi_is_dragging(param) != false) {
if(ext->state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_REL);
else if(ext->state == LV_BTN_STATE_TPR) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
}
}
else if(sign == LV_SIGNAL_RELEASED) {
/*If not dragged and it was not long press action then
*change state and run the action*/
if(lv_dispi_is_dragging(param) == false && ext->lpr_exec == 0) {
if(ext->state == LV_BTN_STATE_PR && tgl == false) {
lv_btn_set_state(btn, LV_BTN_STATE_REL);
} else if(ext->state == LV_BTN_STATE_TPR && tgl == false) {
lv_btn_set_state(btn, LV_BTN_STATE_TREL);
} else if(ext->state == LV_BTN_STATE_PR && tgl == true) {
lv_btn_set_state(btn, LV_BTN_STATE_TREL);
} else if(ext->state == LV_BTN_STATE_TPR && tgl == true) {
lv_btn_set_state(btn, LV_BTN_STATE_REL);
}
if(ext->rel_action != NULL && state != LV_BTN_STATE_INA) {
valid = ext->rel_action(btn, param);
}
} else { /*If dragged change back the state*/
if(ext->state == LV_BTN_STATE_PR) {
lv_btn_set_state(btn, LV_BTN_STATE_REL);
} else if(ext->state == LV_BTN_STATE_TPR) {
lv_btn_set_state(btn, LV_BTN_STATE_TREL);
}
}
}
else if(sign == LV_SIGNAL_LONG_PRESS) {
/*Call the long press action, 'param' is the caller dispi*/
if(ext->lpr_action != NULL && state != LV_BTN_STATE_INA) {
ext->lpr_exec = 1;
valid = ext->lpr_action(btn, param);
}
}
else if(sign == LV_SIGNAL_LONG_PRESS_REP) {
/*Call the release action, 'param' is the caller dispi*/
if(ext->lpr_rep_action != NULL && state != LV_BTN_STATE_INA) {
valid = ext->lpr_rep_action(btn, param);
}
} else if(sign == LV_SIGNAL_CONTROLL) {
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
char c = *((char*)param);
if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) {
if(lv_btn_get_tgl(btn) != false) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
if(ext->rel_action != NULL && lv_btn_get_state(btn) != LV_BTN_STATE_INA) {
valid = ext->rel_action(btn, param);
}
} else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) {
if(lv_btn_get_tgl(btn) != false) lv_btn_set_state(btn, LV_BTN_STATE_REL);
if(ext->rel_action != NULL && lv_btn_get_state(btn) != LV_BTN_STATE_INA) {
valid = ext->rel_action(btn, param);
}
} else if(c == LV_GROUP_KEY_ENTER) {
if(lv_btn_get_tgl(btn) != false) {
lv_btn_state_t state = lv_btn_get_state(btn);
if(state == LV_BTN_STATE_REL) lv_btn_set_state(btn, LV_BTN_STATE_TREL);
else if(state == LV_BTN_STATE_PR) lv_btn_set_state(btn, LV_BTN_STATE_TPR);
else if(state == LV_BTN_STATE_TREL) lv_btn_set_state(btn, LV_BTN_STATE_REL);
else if(state == LV_BTN_STATE_TPR) lv_btn_set_state(btn, LV_BTN_STATE_PR);
}
if(ext->rel_action != NULL && lv_btn_get_state(btn) != LV_BTN_STATE_INA) {
valid = ext->rel_action(btn, param);
}
}
}
}
return valid;
}
/*=====================
* Setter functions
*====================*/
/**
* Enable the toggled states
* @param btn pointer to a button object
* @param tgl true: enable toggled states, false: disable
*/
void lv_btn_set_tgl(lv_obj_t * btn, bool tgl)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
ext->tgl = tgl != false ? 1 : 0;
}
/**
* Set the state of the button
* @param btn pointer to a button object
* @param state the new state of the button (from lv_btn_state_t enum)
*/
void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
if(ext->state != state) {
ext->state = state;
lv_obj_set_style(btn, ext->styles[state]);
}
}
/**
* Set a function to call when the button is pressed
* @param btn pointer to a button object
* @param pr_action pointer to function
*/
void lv_btn_set_pr_action(lv_obj_t * btn, lv_action_t pr_action)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
ext->pr_action = pr_action;
}
/**
* Set a function to call when the button is released
* @param btn pointer to a button object
* @param rel_action pointer to functionREL
*/
void lv_btn_set_rel_action(lv_obj_t * btn, lv_action_t rel_action)
{
lv_btn_ext_t * btn_p = lv_obj_get_ext(btn);
btn_p->rel_action = rel_action;
}
/**
* Set a function to call when the button is long pressed
* @param btn pointer to a button object
* @param lpr_action pointer to function
*/
void lv_btn_set_lpr_action(lv_obj_t * btn, lv_action_t lpr_action)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
ext->lpr_action = lpr_action;
}
/**
* Set a function to called periodically after long press.
* @param btn pointer to a button object
* @param lpr_rep_action pointer to function
*/
void lv_btn_set_lpr_rep_action(lv_obj_t * btn, lv_action_t lpr_rep_action)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
ext->lpr_rep_action = lpr_rep_action;
}
/**
* Set styles of a button is each state
* @param btn pointer to button object
* @param rel pointer to a style for releases state
* @param pr pointer to a style for pressed state
* @param trel pointer to a style for toggled releases state
* @param tpr pointer to a style for toggled pressed state
* @param ina pointer to a style for inactive state
*/
void lv_btn_set_styles(lv_obj_t * btn, lv_style_t * rel, lv_style_t * pr,
lv_style_t * trel, lv_style_t * tpr,
lv_style_t * ina)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
ext->styles[LV_BTN_STATE_REL] = rel;
ext->styles[LV_BTN_STATE_PR] = pr;
ext->styles[LV_BTN_STATE_TREL] = trel;
ext->styles[LV_BTN_STATE_TPR] = tpr;
ext->styles[LV_BTN_STATE_INA] = ina;
lv_obj_set_style(btn, ext->styles[ext->state]);
}
/*=====================
* Getter functions
*====================*/
/**
* Get the current state of the button
* @param btn pointer to a button object
* @return the state of the button (from lv_btn_state_t enum)
*/
lv_btn_state_t lv_btn_get_state(lv_obj_t * btn)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
return ext->state;
}
/**
* Get the toggle enable attribute of the button
* @param btn pointer to a button object
* @return ture: toggle enabled, false: disabled
*/
bool lv_btn_get_tgl(lv_obj_t * btn)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
return ext->tgl != 0 ? true : false;
}
/**
* Get the release action of a button
* @param btn pointer to a button object
* @return pointer to the release action function
*/
lv_action_t lv_btn_get_rel_action(lv_obj_t * btn)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
return ext->rel_action;
}
/**
* Get the press action of a button
* @param btn pointer to a button object
* @return pointer to the press action function
*/
lv_action_t lv_btn_get_pr_action(lv_obj_t * btn)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
return ext->pr_action;
}
/**
* Get the long press action of a button
* @param btn pointer to a button object
* @return pointer to the release action function
*/
lv_action_t lv_btn_get_lpr_action(lv_obj_t * btn)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
return ext->lpr_action;
}
/**
* Get the long press repeat action of a button
* @param btn pointer to a button object
* @return pointer to the long press repeat action function
*/
lv_action_t lv_btn_get_lpr_rep_action(lv_obj_t * btn)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
return ext->lpr_rep_action;
}
/**
* Get the style of a button in a given state
* @param btn pointer to a button object
* @param state a state from 'lv_btn_state_t' in which style should be get
* @return pointer to the style in the given state
*/
lv_style_t * lv_btn_get_style(lv_obj_t * btn, lv_btn_state_t state)
{
lv_btn_ext_t * ext = lv_obj_get_ext(btn);
if(ext->styles[state] == NULL) return lv_obj_get_style(btn->par);
return ext->styles[state];
}
/**********************
* STATIC FUNCTIONS
**********************/
#if 0
/**
* Handle the drawing related tasks of the buttons
* @param btn pointer to a button object
* @param mask the object will be drawn only in this area
* @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
* (return 'true' if yes)
* LV_DESIGN_DRAW: draw the object (always return 'true')
* LV_DESIGN_DRAW_POST: drawing after every children are drawn
* @param return true/false, depends on 'mode'
*/
static bool lv_btn_design(lv_obj_t * btn, const area_t * mask, lv_design_mode_t mode)
{
/* Because of the radius it is not sure the area is covered*/
if(mode == LV_DESIGN_COVER_CHK) {
return false;
} else if(mode == LV_DESIGN_DRAW_MAIN || mode == LV_DESIGN_DRAW_POST) {
}
return true;
}
#endif
#endif

View File

@@ -1,195 +0,0 @@
/**
* @file lv_btn.h
*
*/
#ifndef LV_BTN_H
#define LV_BTN_H
#ifdef __cplusplus
extern "C" {
#endif
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#if USE_LV_BTN != 0
/*Testing of dependencies*/
#if USE_LV_CONT == 0
#error "lv_btn: lv_cont is required. Enable it in lv_conf.h (USE_LV_CONT 1) "
#endif
#include <lvgl/lv_objx/lv_cont.h>
#include "../lv_obj/lv_dispi.h"
/*********************
* DEFINES
*********************/
/**********************
* TYPEDEFS
**********************/
/*Button states*/
typedef enum
{
LV_BTN_STATE_REL,
LV_BTN_STATE_PR,
LV_BTN_STATE_TREL,
LV_BTN_STATE_TPR,
LV_BTN_STATE_INA,
LV_BTN_STATE_NUM,
}lv_btn_state_t;
/*Data of button*/
typedef struct
{
lv_cont_ext_t cont; /*Ext. of ancestor*/
/*New data for this type */
lv_action_t pr_action; /*A function to call when the button is pressed (NULL if unused)*/
lv_action_t rel_action; /*A function to call when the button is released (NULL if unused)*/
lv_action_t lpr_action; /*A function to call when the button is long pressed (NULL if unused)*/
lv_action_t lpr_rep_action; /*A function to call periodically after long press (NULL if unused)*/
lv_style_t * styles[LV_BTN_STATE_NUM]; /*Styles in each state*/
lv_btn_state_t state; /*Current state of the button from 'lv_btn_state_t' enum*/
uint8_t tgl :1; /*1: Toggle enabled*/
uint8_t lpr_exec :1; /*1: Long press action executed (Handled by the library)*/
}lv_btn_ext_t;
/**********************
* GLOBAL PROTOTYPES
**********************/
/**
* Create a button objects
* @param par pointer to an object, it will be the parent of the new button
* @param copy pointer to a button object, if not NULL then the new object will be copied from it
* @return pointer to the created button
*/
lv_obj_t * lv_btn_create(lv_obj_t * par, lv_obj_t * copy);
/**
* Signal function of the button
* @param btn pointer to a button object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
*/
bool lv_btn_signal(lv_obj_t * btn, lv_signal_t sign, void * param);
/**
* Enable the toggled states
* @param btn pointer to a button object
* @param tgl true: enable toggled states, false: disable
*/
void lv_btn_set_tgl(lv_obj_t * btn, bool tgl);
/**
* Set the state of the button
* @param btn pointer to a button object
* @param state the new state of the button (from lv_btn_state_t enum)
*/
void lv_btn_set_state(lv_obj_t * btn, lv_btn_state_t state);
/**
* Set a function to call when the button is pressed
* @param btn pointer to a button object
* @param pr_action pointer to function
*/
void lv_btn_set_pr_action(lv_obj_t * btn, lv_action_t pr_action);
/**
* Set a function to call when the button is released
* @param btn pointer to a button object
* @param rel_action pointer to functionREL
*/
void lv_btn_set_rel_action(lv_obj_t * btn, lv_action_t rel_action);
/**
* Set a function to call when the button is long pressed
* @param btn pointer to a button object
* @param lpr_action pointer to function
*/
void lv_btn_set_lpr_action(lv_obj_t * btn, lv_action_t lpr_action);
/**
* Set a function to called periodically after long press.
* @param btn pointer to a button object
* @param lpr_rep_action pointer to function
*/
void lv_btn_set_lpr_rep_action(lv_obj_t * btn, lv_action_t lpr_rep_action);
/**
* Set styles of a button is each state
* @param btn pointer to button object
* @param rel pointer to a style for releases state
* @param pr pointer to a style for pressed state
* @param trel pointer to a style for toggled releases state
* @param tpr pointer to a style for toggled pressed state
* @param ina pointer to a style for inactive state
*/
void lv_btn_set_styles(lv_obj_t * btn, lv_style_t * rel, lv_style_t * pr, lv_style_t * trel, lv_style_t * tpr, lv_style_t * ina);
/**
* Get the current state of the button
* @param btn pointer to a button object
* @return the state of the button (from lv_btn_state_t enum)
*/
lv_btn_state_t lv_btn_get_state(lv_obj_t * btn);
/**
* Get the toggle enable attribute of the button
* @param btn pointer to a button object
* @return ture: toggle enabled, false: disabled
*/
bool lv_btn_get_tgl(lv_obj_t * btn);
/**
* Get the release action of a button
* @param btn pointer to a button object
* @return pointer to the release action function
*/
lv_action_t lv_btn_get_rel_action(lv_obj_t * btn);
/**
* Get the press action of a button
* @param btn pointer to a button object
* @return pointer to the press action function
*/
lv_action_t lv_btn_get_pr_action(lv_obj_t * btn);
/**
* Get the long press action of a button
* @param btn pointer to a button object
* @return pointer to the release action function
*/
lv_action_t lv_btn_get_lpr_action(lv_obj_t * btn);
/**
* Get the long press repeat action of a button
* @param btn pointer to a button object
* @return pointer to the long press repeat action function
*/
lv_action_t lv_btn_get_lpr_rep_action(lv_obj_t * btn);
/**
* Get the style of a button in a given state
* @param btn pointer to a button object
* @param state a state from 'lv_btn_state_t' in which style should be get
* @return pointer to the style in the given state
*/
lv_style_t * lv_btn_get_style(lv_obj_t * btn, lv_btn_state_t state);
/**********************
* MACROS
**********************/
#endif /*USE_LV_BTN*/
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /*LV_BTN_H*/

View File

@@ -1,558 +0,0 @@
/**
* @file lv_btnm.c
*
*/
/*********************
* INCLUDES
*********************/
#include "lv_conf.h"
#if USE_LV_BTNM != 0
#include "lv_btnm.h"
#include "../lv_obj/lv_group.h"
#include "../lv_draw/lv_draw.h"
#include "../lv_obj/lv_refr.h"
#include "misc/gfx/text.h"
/*********************
* DEFINES
*********************/
#define LV_BTNM_PR_NONE 0xFFFF
/**********************
* TYPEDEFS
**********************/
/**********************
* STATIC PROTOTYPES
**********************/
static bool lv_btnm_design(lv_obj_t * btnm, const area_t * mask, lv_design_mode_t mode);
static uint8_t lv_btnm_get_width_unit(const char * btn_str);
static uint16_t lv_btnm_get_btn_from_point(lv_obj_t * btnm, point_t * p);
static uint16_t lv_btnm_get_btn_txt(lv_obj_t * btnm, uint16_t btn_id);
static void lv_btnm_create_btns(lv_obj_t * btnm, const char ** map);
/**********************
* STATIC VARIABLES
**********************/
static const char * lv_btnm_def_map[] = {"Btn1","Btn2", "Btn3","\n",
"\002Btn4","Btn5", ""};
static lv_design_f_t ancestor_design_f;
/**********************
* MACROS
**********************/
/**********************
* GLOBAL FUNCTIONS
**********************/
/*-----------------
* Create function
*-----------------*/
/**
* Create a button matrix objects
* @param par pointer to an object, it will be the parent of the new button matrix
* @param copy pointer to a button matrix object, if not NULL then the new object will be copied from it
* @return pointer to the created button matrix
*/
lv_obj_t * lv_btnm_create(lv_obj_t * par, lv_obj_t * copy)
{
/*Create the ancestor object*/
lv_obj_t * new_btnm = lv_cont_create(par, copy);
dm_assert(new_btnm);
/*Allocate the object type specific extended data*/
lv_btnm_ext_t * ext = lv_obj_alloc_ext(new_btnm, sizeof(lv_btnm_ext_t));
dm_assert(ext);
ext->btn_cnt = 0;
ext->btn_pr = LV_BTNM_PR_NONE;
ext->btn_areas = NULL;
ext->cb = NULL;
ext->map_p = NULL;
ext->style_btn_rel = lv_style_get(LV_STYLE_BTN_REL, NULL);
ext->style_btn_pr = lv_style_get(LV_STYLE_BTN_PR, NULL);
if(ancestor_design_f == NULL) ancestor_design_f = lv_obj_get_design_f(new_btnm);
lv_obj_set_signal_f(new_btnm, lv_btnm_signal);
lv_obj_set_design_f(new_btnm, lv_btnm_design);
/*Init the new button matrix object*/
if(copy == NULL) {
lv_obj_set_size(new_btnm, LV_HOR_RES, LV_VER_RES / 2);
lv_obj_set_style(new_btnm, lv_style_get(LV_STYLE_PLAIN, NULL));
lv_btnm_set_map(new_btnm, lv_btnm_def_map);
}
/*Copy an existing object*/
else {
lv_btnm_ext_t * copy_ext = lv_obj_get_ext(copy);
ext->style_btn_rel = copy_ext->style_btn_rel;
ext->style_btn_pr = copy_ext->style_btn_pr;
lv_btnm_set_map(new_btnm, lv_btnm_get_map(copy));
ext->cb = copy_ext->cb;
}
return new_btnm;
}
/**
* Signal function of the button matrix
* @param btnm pointer to a button matrix object
* @param sign a signal type from lv_signal_t enum
* @param param pointer to a signal specific variable
* @return true: the object is still valid (not deleted), false: the object become invalid
*/
bool lv_btnm_signal(lv_obj_t * btnm, lv_signal_t sign, void * param)
{
bool valid;
/* Include the ancient signal function */
valid = lv_cont_signal(btnm, sign, param);
/* The object can be deleted so check its validity and then
* make the object specific signal handling */
if(valid != false) {
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
area_t btnm_area;
area_t btn_area;
point_t p;
if(sign == LV_SIGNAL_CLEANUP) {
dm_free(ext->btn_areas);
}
else if(sign == LV_SIGNAL_STYLE_CHG || sign == LV_SIGNAL_CORD_CHG) {
lv_btnm_set_map(btnm, ext->map_p);
}
else if(sign == LV_SIGNAL_PRESSING) {
uint16_t btn_pr;
/*Search the pressed area*/
lv_dispi_get_point(param, &p);
btn_pr = lv_btnm_get_btn_from_point(btnm, &p);
/*Invalidate to old and the new areas*/;
lv_obj_get_cords(btnm, &btnm_area);
if(btn_pr != ext->btn_pr) {
lv_dispi_reset_lpr(param);
if(ext->btn_pr != LV_BTNM_PR_NONE) {
area_cpy(&btn_area, &ext->btn_areas[ext->btn_pr]);
btn_area.x1 += btnm_area.x1;
btn_area.y1 += btnm_area.y1;
btn_area.x2 += btnm_area.x1;
btn_area.y2 += btnm_area.y1;
lv_inv_area(&btn_area);
}
if(btn_pr != LV_BTNM_PR_NONE) {
area_cpy(&btn_area, &ext->btn_areas[btn_pr]);
btn_area.x1 += btnm_area.x1;
btn_area.y1 += btnm_area.y1;
btn_area.x2 += btnm_area.x1;
btn_area.y2 += btnm_area.y1;
lv_inv_area(&btn_area);
}
}
ext->btn_pr = btn_pr;
}
else if(sign == LV_SIGNAL_RELEASED || sign == LV_SIGNAL_LONG_PRESS_REP) {
if(ext->cb != NULL && ext->btn_pr != LV_BTNM_PR_NONE) {
uint16_t txt_i = lv_btnm_get_btn_txt(btnm, ext->btn_pr);
if(txt_i != LV_BTNM_PR_NONE) ext->cb(btnm, txt_i);
}
if(sign == LV_SIGNAL_RELEASED && ext->btn_pr != LV_BTNM_PR_NONE) {
/*Invalidate to old area*/;
lv_obj_get_cords(btnm, &btnm_area);
area_cpy(&btn_area, &ext->btn_areas[ext->btn_pr]);
btn_area.x1 += btnm_area.x1;
btn_area.y1 += btnm_area.y1;
btn_area.x2 += btnm_area.x1;
btn_area.y2 += btnm_area.y1;
lv_inv_area(&btn_area);
ext->btn_pr = LV_BTNM_PR_NONE;
}
} else if(sign == LV_SIGNAL_PRESS_LOST || sign == LV_SIGNAL_DEFOCUS) {
ext->btn_pr = LV_BTNM_PR_NONE;
lv_obj_inv(btnm);
} else if(sign == LV_SIGNAL_FOCUS) {
ext->btn_pr = 0;
lv_obj_inv(btnm);
} else if(sign == LV_SIGNAL_CONTROLL) {
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
char c = *((char*)param);
if(c == LV_GROUP_KEY_RIGHT || c == LV_GROUP_KEY_UP) {
if(ext->btn_pr == LV_BTNM_PR_NONE) ext->btn_pr = 0;
else ext->btn_pr++;
if(ext->btn_pr >= ext->btn_cnt - 1) ext->btn_pr = ext->btn_cnt - 1;
lv_obj_inv(btnm);
} else if(c == LV_GROUP_KEY_LEFT || c == LV_GROUP_KEY_DOWN) {
if(ext->btn_pr == LV_BTNM_PR_NONE) ext->btn_pr = 0;
if(ext->btn_pr > 0) ext->btn_pr--;
lv_obj_inv(btnm);
} else if(c == LV_GROUP_KEY_ENTER) {
if(ext->cb != NULL) {
uint16_t txt_i = lv_btnm_get_btn_txt(btnm, ext->btn_pr);
if(txt_i != LV_BTNM_PR_NONE) ext->cb(btnm, txt_i);
}
}
}
}
return valid;
}
/*=====================
* Setter functions
*====================*/
/**
* Set a new map. Buttons will be created/deleted according to the map.
* @param btnm pointer to a button matrix object
* @param map pointer a string array. The last string has to be: "".
* Use "\n" to begin a new line.
* Use octal numbers (e.g. "\003") to set the relative
* width of a button. (max. 9 -> \011)
* (e.g. const char * str[] = {"a", "b", "\n", "\004c", "d", ""}).
* The button do not copy the array so it can not be a local variable.
*/
void lv_btnm_set_map(lv_obj_t * btnm, const char ** map)
{
if(map == NULL) return;
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
ext->map_p = map;
/*Analyze the map and create the required number of buttons*/
lv_btnm_create_btns(btnm, map);
/*Set size and positions of the buttons*/
lv_style_t * btnms = lv_obj_get_style(btnm);
cord_t max_w = lv_obj_get_width(btnm) - 2 * btnms->hpad;
cord_t max_h = lv_obj_get_height(btnm) - 2 * btnms->vpad;
cord_t act_y = btnms->vpad;
/*Count the lines to calculate button height*/
uint8_t line_cnt = 1;
uint8_t li;
for(li = 0; strlen(map[li]) != 0; li++) {
if(strcmp(map[li], "\n") == 0) line_cnt ++;
}
cord_t btn_h = max_h - ((line_cnt - 1) * btnms->opad);
btn_h = btn_h / line_cnt;
/* Count the units and the buttons in a line
* (A button can be 1,2,3... unit wide)*/
uint16_t unit_cnt; /*Number of units in a row*/
uint16_t unit_act_cnt; /*Number of units currently put in a row*/
uint16_t btn_cnt; /*Number of buttons in a row*/
uint16_t i_tot = 0; /*Act. index in the str map*/
uint16_t btn_i = 0; /*Act. index of button areas*/
const char ** map_p_tmp = map;
/*Count the units and the buttons in a line*/
while(1) {
unit_cnt = 0;
btn_cnt = 0;
/*Count the buttons in a line*/
while(strcmp(map_p_tmp[btn_cnt], "\n") != 0 &&
strlen(map_p_tmp[btn_cnt]) != 0) { /*Check a line*/
unit_cnt += lv_btnm_get_width_unit(map_p_tmp[btn_cnt]);
btn_cnt ++;
}
/*Only deal with the non empty lines*/
if(btn_cnt != 0) {
/*Calculate the width of all units*/
cord_t all_unit_w = max_w - ((btn_cnt-1) * btnms->opad);
/*Set the button size and positions and set the texts*/
uint16_t i;
cord_t act_x = btnms->hpad;
cord_t act_unit_w;
unit_act_cnt = 0;
for(i = 0; i < btn_cnt; i++) {
/* one_unit_w = all_unit_w / unit_cnt
* act_unit_w = one_unit_w * button_width
* do this two operation but the multiply first to divide a greater number */
act_unit_w = (all_unit_w * lv_btnm_get_width_unit(map_p_tmp[i])) / unit_cnt;
/*Always recalculate act_x because of rounding errors */
act_x = (unit_act_cnt * all_unit_w) / unit_cnt + i * btnms->opad + btnms->hpad;
area_set(&ext->btn_areas[btn_i], act_x,
act_y,
act_x + act_unit_w,
act_y + btn_h);
unit_act_cnt += lv_btnm_get_width_unit(map_p_tmp[i]);
i_tot ++;
btn_i ++;
}
}
act_y += btn_h + btnms->opad;
if(strlen(map_p_tmp[btn_cnt]) == 0) break; /*Break on end of map*/
map_p_tmp = &map_p_tmp[btn_cnt + 1]; /*Set the map to the next line*/
i_tot ++; /*Skip the '\n'*/
}
lv_obj_inv(btnm);
}
/**
* Set a new callback function for the buttons (It will be called when a button is released)
* @param btnm: pointer to button matrix object
* @param cb pointer to a callback function
*/
void lv_btnm_set_action(lv_obj_t * btnm, lv_btnm_callback_t cb)
{
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
ext->cb = cb;
}
/**
* Set the styles of the buttons of the button matrox
* @param btnm pointer to a button matrix object
* @param state style in this state (LV_BTN_STATE_PR or LV_BTN_STATE_REL)
* @param style pointer to style
*/
void lv_btnm_set_styles_btn(lv_obj_t * btnm, lv_style_t * rel, lv_style_t * pr)
{
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
ext->style_btn_rel = rel;
ext->style_btn_pr = pr;
lv_obj_inv(btnm);
}
/*=====================
* Getter functions
*====================*/
/**
* Get the current map of a button matrix
* @param btnm pointer to a button matrix object
* @return the current map
*/
const char ** lv_btnm_get_map(lv_obj_t * btnm)
{
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
return ext->map_p;
}
/**
* Get a the callback function of the buttons on a button matrix
* @param btnm: pointer to button matrix object
* @return pointer to the callback function
*/
lv_btnm_callback_t lv_btnm_get_action(lv_obj_t * btnm)
{
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
return ext->cb;
}
/**
* Get the style of buttons in button matrix
* @param btnm pointer to a button matrix object
* @param state style in this state (LV_BTN_STATE_PR or LV_BTN_STATE_REL)
* @return pointer the button style in the given state
*/
lv_style_t * lv_btnm_get_style_btn(lv_obj_t * btnm, lv_btn_state_t state)
{
lv_style_t * style;
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
switch(state) {
case LV_BTN_STATE_PR:
style = ext->style_btn_pr;
break;
case LV_BTN_STATE_REL:
style = ext->style_btn_rel;
break;
default:
style = NULL;
}
if(style == NULL) style = lv_obj_get_style(btnm);
return style;
}
/**********************
* STATIC FUNCTIONS
**********************/
/**
* Handle the drawing related tasks of the button matrixs
* @param btnm pointer to a button matrix object
* @param mask the object will be drawn only in this area
* @param mode LV_DESIGN_COVER_CHK: only check if the object fully covers the 'mask_p' area
* (return 'true' if yes)
* LV_DESIGN_DRAW: draw the object (always return 'true')
* LV_DESIGN_DRAW_POST: drawing after every children are drawn
* @param return true/false, depends on 'mode'
*/
static bool lv_btnm_design(lv_obj_t * btnm, const area_t * mask, lv_design_mode_t mode)
{
if(mode == LV_DESIGN_COVER_CHK) {
return ancestor_design_f(btnm, mask, mode);
/*Return false if the object is not covers the mask_p area*/
}
/*Draw the object*/
else if (mode == LV_DESIGN_DRAW_MAIN) {
ancestor_design_f(btnm, mask, mode);
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
lv_style_t * btn_style;
area_t area_btnm;
area_t area_tmp;
cord_t btn_w;
cord_t btn_h;
uint16_t btn_i = 0;
uint16_t txt_i = 0;
for(btn_i = 0; btn_i < ext->btn_cnt; btn_i ++, txt_i ++) {
/*Search the next valid text in the map*/
while(strcmp(ext->map_p[txt_i], "\n") == 0) txt_i ++;
if(ext->map_p[txt_i][1] == '\177') continue;
lv_obj_get_cords(btnm, &area_btnm);
area_cpy(&area_tmp, &ext->btn_areas[btn_i]);
area_tmp.x1 += area_btnm.x1;
area_tmp.y1 += area_btnm.y1;
area_tmp.x2 += area_btnm.x1;
area_tmp.y2 += area_btnm.y1;
btn_w = area_get_width(&area_tmp);
btn_h = area_get_height(&area_tmp);
/*Load the style*/
btn_style = lv_btnm_get_style_btn(btnm, ext->btn_pr == btn_i ? LV_BTN_STATE_PR : LV_BTN_STATE_REL);
lv_draw_rect(&area_tmp, mask, btn_style);
/*Calculate the size of the text*/
const font_t * font = btn_style->font;
point_t txt_size;
txt_get_size(&txt_size, ext->map_p[txt_i], font,
btn_style->letter_space, btn_style->line_space,
area_get_width(&area_btnm), TXT_FLAG_NONE);
area_tmp.x1 += (btn_w - txt_size.x) / 2;
area_tmp.y1 += (btn_h - txt_size.y) / 2;
area_tmp.x2 = area_tmp.x1 + txt_size.x;
area_tmp.y2 = area_tmp.y1 + txt_size.y;
lv_draw_label(&area_tmp, mask, btn_style, ext->map_p[txt_i], TXT_FLAG_NONE, NULL);
}
}
return true;
}
/**
* Create the required number of buttons according to a map
* @param btnm pointer to button matrix object
* @param map_p pointer to a string array
*/
static void lv_btnm_create_btns(lv_obj_t * btnm, const char ** map)
{
/*Count the buttons in the map*/
uint16_t btn_cnt = 0;
uint16_t i = 0;
while(strlen(map[i]) != 0) {
if(strcmp(map[i], "\n") != 0) { /*Do not count line breaks*/
btn_cnt ++;
}
i++;
}
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
if(ext->btn_areas != NULL) {
dm_free(ext->btn_areas);
ext->btn_areas = NULL;
}
ext->btn_areas = dm_alloc(sizeof(area_t) * btn_cnt);
ext->btn_cnt = btn_cnt;
}
/**
* Get the width of a button in units. It comes from the first "letter".
* @param btn_str The descriptor string of a button. E.g. "apple" or "\004banana"
* @return the width of the button in units
*/
static uint8_t lv_btnm_get_width_unit(const char * btn_str)
{
if(btn_str[0] <= '\011') return btn_str[0];
return 1;
}
/**
* Gives the button id of a button under a given point
* @param btnm pointer to a button matrix object
* @param p a point with absolute coordinates
* @return the id of the button or LV_BTNM_PR_NONE.
*/
static uint16_t lv_btnm_get_btn_from_point(lv_obj_t * btnm, point_t * p)
{
area_t btnm_cords;
area_t btn_area;
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
uint16_t i;
lv_obj_get_cords(btnm, &btnm_cords);
for(i = 0; i < ext->btn_cnt; i++) {
area_cpy(&btn_area, &ext->btn_areas[i]);
btn_area.x1 += btnm_cords.x1;
btn_area.y1 += btnm_cords.y1;
btn_area.x2 += btnm_cords.x1;
btn_area.y2 += btnm_cords.y1;
if(area_is_point_on(&btn_area, p) != false) {
break;
}
}
if(i == ext->btn_cnt) i = LV_BTNM_PR_NONE;
return i;
}
/**
* Get the text of a button
* @param btnm pointer to a button matrix object
* @param btn_id button id
* @return text id in ext->map_p or LV_BTNM_PR_NONE if 'btn_id' was invalid
*/
static uint16_t lv_btnm_get_btn_txt(lv_obj_t * btnm, uint16_t btn_id)
{
lv_btnm_ext_t * ext = lv_obj_get_ext(btnm);
if(btn_id > ext->btn_cnt) return LV_BTNM_PR_NONE;
uint16_t txt_i = 0;
uint16_t btn_i = 0;
/* Search the text of ext->btn_pr the buttons text in the map
* Skip "\n"-s*/
while(btn_i != btn_id) {
btn_i ++;
txt_i ++;
if(strcmp(ext->map_p[txt_i], "\n") == 0) txt_i ++;
}
if(btn_i == ext->btn_cnt) return LV_BTNM_PR_NONE;
return txt_i;
}
#endif

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