├── lvgl ├── scripts │ ├── release │ │ ├── commits.txt │ │ └── release.py │ ├── .gitignore │ ├── built_in_font │ │ ├── SimSun.woff │ │ ├── unscii-8.ttf │ │ ├── DejaVuSans.ttf │ │ ├── Montserrat-Medium.ttf │ │ └── FontAwesome5-Solid+Brands+Regular.woff │ ├── cppcheck_run.sh │ ├── filetohex.py │ ├── infer_run.sh │ ├── find_version.sh │ ├── install-prerequisites.sh │ ├── code-format.py │ ├── genexamplelist.sh │ ├── changelog_gen.sh │ └── build_html_examples.sh ├── src │ ├── extra │ │ ├── others │ │ │ ├── fragment │ │ │ │ └── README.md │ │ │ └── lv_others.h │ │ ├── lv_extra.mk │ │ ├── libs │ │ │ ├── freetype │ │ │ │ └── arial.ttf │ │ │ ├── sjpg │ │ │ │ ├── lv_sjpg.h │ │ │ │ └── tjpgdcnf.h │ │ │ ├── bmp │ │ │ │ └── lv_bmp.h │ │ │ ├── png │ │ │ │ └── lv_png.h │ │ │ └── lv_libs.h │ │ ├── themes │ │ │ └── lv_themes.h │ │ ├── layouts │ │ │ └── lv_layouts.h │ │ └── lv_extra.h │ ├── font │ │ ├── korean.ttf │ │ └── lv_font_loader.h │ ├── draw │ │ ├── arm2d │ │ │ └── lv_draw_arm2d.mk │ │ ├── stm32_dma2d │ │ │ └── lv_draw_stm32_dma2d.mk │ │ ├── swm341_dma2d │ │ │ └── lv_draw_swm341_dma2d.mk │ │ ├── nxp │ │ │ ├── pxp │ │ │ │ └── lv_draw_nxp_pxp.mk │ │ │ ├── lv_draw_nxp.mk │ │ │ └── vglite │ │ │ │ └── lv_draw_nxp_vglite.mk │ │ ├── sw │ │ │ └── lv_draw_sw.mk │ │ ├── sdl │ │ │ ├── lv_draw_sdl.mk │ │ │ └── lv_draw_sdl_stack_blur.h │ │ ├── lv_draw.mk │ │ └── lv_draw_triangle.h │ ├── hal │ │ └── lv_hal.mk │ ├── widgets │ │ └── lv_widgets.mk │ ├── core │ │ └── lv_core.mk │ ├── misc │ │ ├── lv_templ.h │ │ ├── lv_misc.mk │ │ └── lv_templ.c │ └── lvgl.h ├── tests │ ├── .gitignore │ ├── ref_imgs │ │ ├── scr1.png │ │ ├── table_1.png │ │ ├── dropdown_1.png │ │ └── dropdown_2.png │ ├── src │ │ ├── test_fonts │ │ │ ├── font_1.fnt │ │ │ ├── font_2.fnt │ │ │ └── font_3.fnt │ │ ├── lv_test_init.h │ │ ├── test_cases │ │ │ ├── test_demo_widgets.c │ │ │ ├── _test_template.c │ │ │ ├── test_mem.c │ │ │ ├── test_config.c │ │ │ ├── test_event.c │ │ │ └── test_demo_stress.c │ │ ├── lv_test_helpers.h │ │ ├── test_files │ │ │ └── readtest.txt │ │ └── lv_test_conf.h │ ├── config.yml │ ├── makefile │ │ ├── test.c │ │ └── Makefile │ └── unity │ │ └── type_sanitizer.rb ├── docs │ ├── get-started │ │ ├── os │ │ │ ├── zephyr.md │ │ │ ├── freertos.md │ │ │ └── index.md │ │ ├── platforms │ │ │ ├── stm32.md │ │ │ └── index.md │ │ └── bindings │ │ │ ├── cpp.md │ │ │ └── index.md │ ├── overview │ │ ├── new_widget.md │ │ ├── renderers │ │ │ ├── dma2d.md │ │ │ ├── sdl.md │ │ │ ├── sw.md │ │ │ ├── pxp-vglite.md │ │ │ └── index.md │ │ └── index.md │ ├── favicon.png │ ├── misc │ │ ├── sys.png │ │ ├── align.png │ │ ├── bidi.png │ │ ├── layers.png │ │ ├── boxmodel.png │ │ ├── eclipse.jpg │ │ ├── symbols.png │ │ ├── btn_example.png │ │ ├── codeblocks.jpg │ │ ├── par_child1.png │ │ ├── par_child2.png │ │ ├── par_child3.png │ │ ├── platformio.jpg │ │ ├── qtcreator.jpg │ │ ├── anim-timeline.png │ │ ├── visualstudio.jpg │ │ ├── button_style_example.gif │ │ ├── button_style_example.png │ │ ├── simple_button_example.gif │ │ └── simple_button_example.png │ ├── logo_lvgl.png │ ├── _static │ │ ├── img │ │ │ ├── home_1.png │ │ │ ├── home_2.png │ │ │ ├── home_3.png │ │ │ ├── home_4.png │ │ │ ├── home_5.png │ │ │ ├── home_6.png │ │ │ └── home_banner.jpg │ │ └── js │ │ │ └── custom.js │ ├── layouts │ │ └── index.md │ ├── widgets │ │ ├── index.md │ │ ├── core │ │ │ └── index.md │ │ └── extra │ │ │ ├── index.md │ │ │ └── spinner.md │ ├── others │ │ ├── index.md │ │ └── imgfont.md │ ├── libs │ │ ├── index.md │ │ └── png.md │ ├── porting │ │ └── index.md │ └── requirements.txt ├── env_support │ ├── zephyr │ │ └── module.yml │ ├── cmsis-pack │ │ ├── LVGL.lvgl.8.3.7.pack │ │ └── LVGL.pidx │ ├── rt-thread │ │ └── squareline │ │ │ ├── SConscript │ │ │ ├── README.md │ │ │ ├── ui │ │ │ └── lvgl │ │ │ │ └── lvgl.h │ │ │ └── lv_ui_entry.c │ └── cmake │ │ ├── zephyr.cmake │ │ └── micropython.cmake ├── demos │ ├── lv_demos.mk │ ├── music │ │ ├── screenshot1.gif │ │ ├── assets │ │ │ └── spectrum.py │ │ └── lv_demo_music_list.h │ ├── stress │ │ ├── screenshot1.gif │ │ ├── screenshot1.png │ │ ├── README.md │ │ └── lv_demo_stress.h │ ├── widgets │ │ ├── screenshot1.gif │ │ ├── screenshot1.png │ │ ├── assets │ │ │ ├── avatar.png │ │ │ ├── clothes.png │ │ │ └── lvgl_logo.png │ │ └── lv_demo_widgets.h │ ├── benchmark │ │ ├── screenshot1.png │ │ ├── screenshot2.png │ │ └── assets │ │ │ ├── img_cogwheel_argb.png │ │ │ ├── img_cogwheel_rgb.png │ │ │ ├── img_cogwheel_indexed16.png │ │ │ └── img_cogwheel_chroma_keyed.png │ └── keypad_encoder │ │ ├── screenshot1.gif │ │ ├── screenshot1.png │ │ ├── README.md │ │ └── lv_demo_keypad_encoder.h ├── examples │ ├── lv_examples.mk │ ├── test_ex.sh │ ├── header.py │ ├── libs │ │ ├── gif │ │ │ ├── bulb.gif │ │ │ ├── index.rst │ │ │ ├── lv_example_gif_1.c │ │ │ ├── lv_example_gif.h │ │ │ └── lv_example_gif_1.py │ │ ├── png │ │ │ ├── wink.png │ │ │ ├── index.rst │ │ │ ├── lv_example_png_1.c │ │ │ └── lv_example_png.h │ │ ├── ffmpeg │ │ │ ├── birds.mp4 │ │ │ ├── ffmpeg.png │ │ │ ├── index.rst │ │ │ ├── lv_example_ffmpeg_1.c │ │ │ ├── lv_example_ffmpeg.h │ │ │ └── lv_example_ffmpeg_2.c │ │ ├── bmp │ │ │ ├── example_16bit.bmp │ │ │ ├── example_24bit.bmp │ │ │ ├── example_32bit.bmp │ │ │ ├── index.rst │ │ │ ├── lv_example_bmp_1.py │ │ │ ├── lv_example_bmp_1.c │ │ │ └── lv_example_bmp.h │ │ ├── sjpg │ │ │ ├── small_image.sjpg │ │ │ ├── index.rst │ │ │ ├── lv_example_sjpg_1.py │ │ │ ├── lv_example_sjpg_1.c │ │ │ └── lv_example_sjpg.h │ │ ├── freetype │ │ │ ├── Lato-Regular.ttf │ │ │ ├── index.rst │ │ │ ├── lv_example_freetype_1.py │ │ │ └── lv_example_freetype.h │ │ ├── qrcode │ │ │ ├── index.rst │ │ │ ├── lv_example_qrcode_1.py │ │ │ ├── lv_example_qrcode.h │ │ │ └── lv_example_qrcode_1.c │ │ ├── rlottie │ │ │ ├── lv_example_rlottie_2.py │ │ │ ├── index.rst │ │ │ ├── lv_example_rlottie_1.py │ │ │ ├── lv_example_rlottie_1.c │ │ │ ├── lv_example_rlottie.h │ │ │ └── lv_example_rlottie_2.c │ │ └── lv_example_libs.h │ ├── assets │ │ ├── animimg001.png │ │ ├── animimg002.png │ │ ├── animimg003.png │ │ ├── caret_down.png │ │ ├── emoji │ │ │ └── F600.png │ │ ├── img_star.png │ │ ├── img_strip.png │ │ ├── imgbtn_mid.png │ │ ├── img_hand_min.png │ │ ├── imgbtn_left.png │ │ ├── imgbtn_right.png │ │ ├── img_caret_down.png │ │ ├── img_hand_hour.png │ │ ├── img_skew_strip.png │ │ ├── img_cogwheel_argb.png │ │ ├── img_cogwheel_rgb.png │ │ ├── font │ │ │ ├── montserrat-16.fnt │ │ │ ├── montserrat-22.fnt │ │ │ └── lv_font_simsun_16_cjk.fnt │ │ ├── img_cogwheel_indexed16.png │ │ ├── img_cogwheel_chroma_keyed.png │ │ └── img_skew_strip_80x20_argb8888.fnt │ ├── widgets │ │ ├── colorwheel │ │ │ ├── lv_example_colorwheel_1.py │ │ │ ├── index.rst │ │ │ └── lv_example_colorwheel_1.c │ │ ├── line │ │ │ ├── index.rst │ │ │ ├── lv_example_line_1.py │ │ │ └── lv_example_line_1.c │ │ ├── win │ │ │ ├── index.rst │ │ │ └── lv_example_win_1.py │ │ ├── bar │ │ │ ├── lv_example_bar_1.py │ │ │ ├── lv_example_bar_1.c │ │ │ ├── lv_example_bar_5.py │ │ │ ├── lv_example_bar_2.py │ │ │ ├── index.rst │ │ │ ├── lv_example_bar_3.py │ │ │ └── lv_example_bar_4.c │ │ ├── led │ │ │ ├── index.rst │ │ │ ├── lv_example_led_1.py │ │ │ └── lv_example_led_1.c │ │ ├── switch │ │ │ ├── index.rst │ │ │ └── lv_example_switch_1.py │ │ ├── imgbtn │ │ │ └── index.rst │ │ ├── span │ │ │ └── index.rst │ │ ├── spinbox │ │ │ └── index.rst │ │ ├── arc │ │ │ ├── lv_example_arc_1.py │ │ │ ├── index.rst │ │ │ └── lv_example_arc_2.py │ │ ├── msgbox │ │ │ ├── index.rst │ │ │ ├── lv_example_msgbox_1.py │ │ │ └── lv_example_msgbox_1.c │ │ ├── spinner │ │ │ ├── index.rst │ │ │ ├── lv_example_spinner_1.py │ │ │ └── lv_example_spinner_1.c │ │ ├── calendar │ │ │ └── index.rst │ │ ├── keyboard │ │ │ ├── index.rst │ │ │ └── lv_example_keyboard_1.py │ │ ├── tileview │ │ │ └── index.rst │ │ ├── animimg │ │ │ ├── index.rst │ │ │ └── lv_example_animimg_1.c │ │ ├── list │ │ │ └── index.rst │ │ ├── checkbox │ │ │ └── index.rst │ │ ├── table │ │ │ └── index.rst │ │ ├── obj │ │ │ ├── index.rst │ │ │ ├── lv_example_obj_1.py │ │ │ ├── lv_example_obj_2.py │ │ │ ├── lv_example_obj_1.c │ │ │ └── lv_example_obj_2.c │ │ ├── tabview │ │ │ ├── index.rst │ │ │ └── lv_example_tabview_1.py │ │ ├── canvas │ │ │ └── index.rst │ │ ├── btn │ │ │ ├── index.rst │ │ │ └── lv_example_btn_1.py │ │ ├── label │ │ │ ├── lv_example_label_5.py │ │ │ ├── index.rst │ │ │ ├── lv_example_label_1.py │ │ │ └── lv_example_label_2.py │ │ ├── roller │ │ │ ├── index.rst │ │ │ └── lv_example_roller_1.py │ │ ├── dropdown │ │ │ ├── index.rst │ │ │ ├── lv_example_dropdown_1.py │ │ │ └── lv_example_dropdown_2.py │ │ ├── slider │ │ │ ├── index.rst │ │ │ └── lv_example_slider_1.py │ │ ├── btnmatrix │ │ │ ├── index.rst │ │ │ └── lv_example_btnmatrix_1.py │ │ ├── textarea │ │ │ └── index.rst │ │ ├── img │ │ │ ├── index.rst │ │ │ ├── lv_example_img_1.c │ │ │ └── lv_example_img_1.py │ │ ├── meter │ │ │ └── index.rst │ │ ├── menu │ │ │ ├── index.rst │ │ │ └── lv_example_menu_1.py │ │ └── chart │ │ │ ├── lv_example_chart_9.py │ │ │ └── lv_example_chart_1.py │ ├── others │ │ ├── snapshot │ │ │ ├── index.rst │ │ │ └── lv_example_snapshot.h │ │ ├── imgfont │ │ │ ├── index.rst │ │ │ └── lv_example_imgfont.h │ │ ├── ime │ │ │ ├── index.rst │ │ │ └── lv_example_ime_pinyin.h │ │ ├── fragment │ │ │ ├── index.rst │ │ │ └── lv_example_fragment.h │ │ ├── monkey │ │ │ ├── index.rst │ │ │ ├── lv_example_monkey_1.c │ │ │ ├── lv_example_monkey_2.c │ │ │ └── lv_example_monkey.h │ │ ├── msg │ │ │ ├── index.rst │ │ │ └── lv_example_msg.h │ │ ├── gridnav │ │ │ ├── index.rst │ │ │ └── lv_example_gridnav.h │ │ └── lv_example_others.h │ ├── styles │ │ ├── lv_example_style_7.py │ │ ├── lv_example_style_12.py │ │ ├── lv_example_style_9.py │ │ ├── lv_example_style_1.py │ │ ├── lv_example_style_4.py │ │ ├── lv_example_style_7.c │ │ ├── lv_example_style_5.py │ │ ├── lv_example_style_2.py │ │ ├── lv_example_style_3.py │ │ ├── lv_example_style_8.py │ │ ├── lv_example_style_12.c │ │ ├── lv_example_style_9.c │ │ ├── lv_example_style_13.py │ │ ├── lv_example_style_4.c │ │ ├── lv_example_style_1.c │ │ ├── lv_example_style_5.c │ │ ├── lv_example_style_2.c │ │ └── lv_example_style_3.c │ ├── anim │ │ ├── index.rst │ │ └── lv_example_anim.h │ ├── event │ │ ├── index.rst │ │ ├── lv_example_event_1.py │ │ ├── lv_example_event_1.c │ │ ├── lv_example_event.h │ │ ├── lv_example_event_3.py │ │ └── lv_example_event_2.py │ ├── layouts │ │ ├── flex │ │ │ ├── lv_example_flex_4.py │ │ │ ├── lv_example_flex_6.py │ │ │ ├── lv_example_flex_3.py │ │ │ ├── lv_example_flex_2.py │ │ │ ├── lv_example_flex_4.c │ │ │ ├── lv_example_flex_6.c │ │ │ ├── lv_example_flex.h │ │ │ ├── lv_example_flex_3.c │ │ │ ├── lv_example_flex_1.py │ │ │ └── index.rst │ │ ├── lv_example_layout.h │ │ └── grid │ │ │ ├── lv_example_grid_6.py │ │ │ ├── lv_example_grid_1.py │ │ │ ├── index.rst │ │ │ ├── lv_example_grid.h │ │ │ └── lv_example_grid_4.py │ ├── get_started │ │ ├── index.rst │ │ ├── lv_example_get_started_3.py │ │ └── lv_example_get_started.h │ ├── scroll │ │ ├── index.rst │ │ ├── lv_example_scroll_5.py │ │ ├── lv_example_scroll_1.py │ │ └── lv_example_scroll.h │ └── porting │ │ ├── lv_port_fs_template.h │ │ └── lv_port_indev_template.h ├── idf_component.yml ├── SConscript ├── library.properties ├── lvgl.mk ├── CMakeLists.txt └── library.json ├── .gitignore ├── readme.md ├── include └── vex.h └── vex └── mkrules.mk /lvgl/scripts/release/commits.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lvgl/src/extra/others/fragment/README.md: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lvgl/scripts/.gitignore: -------------------------------------------------------------------------------- 1 | CHANGELOG_LAST.md 2 | -------------------------------------------------------------------------------- /lvgl/tests/.gitignore: -------------------------------------------------------------------------------- 1 | *.out 2 | *_Runner.c 3 | -------------------------------------------------------------------------------- /lvgl/docs/get-started/os/zephyr.md: -------------------------------------------------------------------------------- 1 | # Zephyr 2 | 3 | TODO -------------------------------------------------------------------------------- /lvgl/docs/get-started/os/freertos.md: -------------------------------------------------------------------------------- 1 | # FreeRTOS 2 | 3 | TODO -------------------------------------------------------------------------------- /lvgl/docs/overview/new_widget.md: -------------------------------------------------------------------------------- 1 | 2 | # New widget 3 | 4 | -------------------------------------------------------------------------------- /lvgl/env_support/zephyr/module.yml: -------------------------------------------------------------------------------- 1 | build: 2 | cmake: . 3 | -------------------------------------------------------------------------------- /lvgl/docs/get-started/platforms/stm32.md: -------------------------------------------------------------------------------- 1 | 2 | # STM32 3 | 4 | TODO 5 | -------------------------------------------------------------------------------- /lvgl/docs/overview/renderers/dma2d.md: -------------------------------------------------------------------------------- 1 | # DMA2D GPU 2 | 3 | TODO 4 | 5 | -------------------------------------------------------------------------------- /lvgl/docs/overview/renderers/sdl.md: -------------------------------------------------------------------------------- 1 | # SDL renderer 2 | 3 | TODO 4 | 5 | -------------------------------------------------------------------------------- /lvgl/docs/overview/renderers/sw.md: -------------------------------------------------------------------------------- 1 | # Software renderer 2 | 3 | TODO 4 | 5 | -------------------------------------------------------------------------------- /lvgl/docs/overview/renderers/pxp-vglite.md: -------------------------------------------------------------------------------- 1 | # NXP PXP and VGLite GPU 2 | 3 | TODO 4 | 5 | -------------------------------------------------------------------------------- /lvgl/demos/lv_demos.mk: -------------------------------------------------------------------------------- 1 | CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/demos -name "*.c") 2 | -------------------------------------------------------------------------------- /lvgl/docs/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/favicon.png -------------------------------------------------------------------------------- /lvgl/docs/misc/sys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/sys.png -------------------------------------------------------------------------------- /lvgl/examples/lv_examples.mk: -------------------------------------------------------------------------------- 1 | CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples -name \*.c) 2 | -------------------------------------------------------------------------------- /lvgl/src/extra/lv_extra.mk: -------------------------------------------------------------------------------- 1 | CSRCS += $(shell find -L $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra -name \*.c) 2 | -------------------------------------------------------------------------------- /lvgl/docs/get-started/bindings/cpp.md: -------------------------------------------------------------------------------- 1 | # Cpp 2 | 3 | In progress: https://github.com/lvgl/lv_binding_cpp 4 | 5 | -------------------------------------------------------------------------------- /lvgl/docs/logo_lvgl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/logo_lvgl.png -------------------------------------------------------------------------------- /lvgl/docs/misc/align.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/align.png -------------------------------------------------------------------------------- /lvgl/docs/misc/bidi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/bidi.png -------------------------------------------------------------------------------- /lvgl/docs/misc/layers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/layers.png -------------------------------------------------------------------------------- /lvgl/examples/test_ex.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cat ../../header.py $1 > test.py 3 | chmod +x test.py 4 | ./test.py 5 | -------------------------------------------------------------------------------- /lvgl/src/font/korean.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/src/font/korean.ttf -------------------------------------------------------------------------------- /lvgl/docs/misc/boxmodel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/boxmodel.png -------------------------------------------------------------------------------- /lvgl/docs/misc/eclipse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/eclipse.jpg -------------------------------------------------------------------------------- /lvgl/docs/misc/symbols.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/symbols.png -------------------------------------------------------------------------------- /lvgl/examples/header.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | 3 | import lvgl as lv 4 | 5 | import display_driver 6 | -------------------------------------------------------------------------------- /lvgl/docs/misc/btn_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/btn_example.png -------------------------------------------------------------------------------- /lvgl/docs/misc/codeblocks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/codeblocks.jpg -------------------------------------------------------------------------------- /lvgl/docs/misc/par_child1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/par_child1.png -------------------------------------------------------------------------------- /lvgl/docs/misc/par_child2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/par_child2.png -------------------------------------------------------------------------------- /lvgl/docs/misc/par_child3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/par_child3.png -------------------------------------------------------------------------------- /lvgl/docs/misc/platformio.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/platformio.jpg -------------------------------------------------------------------------------- /lvgl/docs/misc/qtcreator.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/qtcreator.jpg -------------------------------------------------------------------------------- /lvgl/tests/ref_imgs/scr1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/tests/ref_imgs/scr1.png -------------------------------------------------------------------------------- /lvgl/demos/music/screenshot1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/music/screenshot1.gif -------------------------------------------------------------------------------- /lvgl/docs/_static/img/home_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/_static/img/home_1.png -------------------------------------------------------------------------------- /lvgl/docs/_static/img/home_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/_static/img/home_2.png -------------------------------------------------------------------------------- /lvgl/docs/_static/img/home_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/_static/img/home_3.png -------------------------------------------------------------------------------- /lvgl/docs/_static/img/home_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/_static/img/home_4.png -------------------------------------------------------------------------------- /lvgl/docs/_static/img/home_5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/_static/img/home_5.png -------------------------------------------------------------------------------- /lvgl/docs/_static/img/home_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/_static/img/home_6.png -------------------------------------------------------------------------------- /lvgl/docs/misc/anim-timeline.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/anim-timeline.png -------------------------------------------------------------------------------- /lvgl/docs/misc/visualstudio.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/visualstudio.jpg -------------------------------------------------------------------------------- /lvgl/examples/libs/gif/bulb.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/gif/bulb.gif -------------------------------------------------------------------------------- /lvgl/examples/libs/png/wink.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/png/wink.png -------------------------------------------------------------------------------- /lvgl/tests/ref_imgs/table_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/tests/ref_imgs/table_1.png -------------------------------------------------------------------------------- /lvgl/demos/stress/screenshot1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/stress/screenshot1.gif -------------------------------------------------------------------------------- /lvgl/demos/stress/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/stress/screenshot1.png -------------------------------------------------------------------------------- /lvgl/demos/widgets/screenshot1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/widgets/screenshot1.gif -------------------------------------------------------------------------------- /lvgl/demos/widgets/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/widgets/screenshot1.png -------------------------------------------------------------------------------- /lvgl/examples/assets/animimg001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/animimg001.png -------------------------------------------------------------------------------- /lvgl/examples/assets/animimg002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/animimg002.png -------------------------------------------------------------------------------- /lvgl/examples/assets/animimg003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/animimg003.png -------------------------------------------------------------------------------- /lvgl/examples/assets/caret_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/caret_down.png -------------------------------------------------------------------------------- /lvgl/examples/assets/emoji/F600.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/emoji/F600.png -------------------------------------------------------------------------------- /lvgl/examples/assets/img_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_star.png -------------------------------------------------------------------------------- /lvgl/examples/assets/img_strip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_strip.png -------------------------------------------------------------------------------- /lvgl/examples/assets/imgbtn_mid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/imgbtn_mid.png -------------------------------------------------------------------------------- /lvgl/examples/libs/ffmpeg/birds.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/ffmpeg/birds.mp4 -------------------------------------------------------------------------------- /lvgl/tests/ref_imgs/dropdown_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/tests/ref_imgs/dropdown_1.png -------------------------------------------------------------------------------- /lvgl/tests/ref_imgs/dropdown_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/tests/ref_imgs/dropdown_2.png -------------------------------------------------------------------------------- /lvgl/demos/benchmark/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/benchmark/screenshot1.png -------------------------------------------------------------------------------- /lvgl/demos/benchmark/screenshot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/benchmark/screenshot2.png -------------------------------------------------------------------------------- /lvgl/demos/widgets/assets/avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/widgets/assets/avatar.png -------------------------------------------------------------------------------- /lvgl/demos/widgets/assets/clothes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/widgets/assets/clothes.png -------------------------------------------------------------------------------- /lvgl/docs/_static/img/home_banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/_static/img/home_banner.jpg -------------------------------------------------------------------------------- /lvgl/examples/assets/img_hand_min.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_hand_min.png -------------------------------------------------------------------------------- /lvgl/examples/assets/imgbtn_left.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/imgbtn_left.png -------------------------------------------------------------------------------- /lvgl/examples/assets/imgbtn_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/imgbtn_right.png -------------------------------------------------------------------------------- /lvgl/examples/libs/ffmpeg/ffmpeg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/ffmpeg/ffmpeg.png -------------------------------------------------------------------------------- /lvgl/tests/src/test_fonts/font_1.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/tests/src/test_fonts/font_1.fnt -------------------------------------------------------------------------------- /lvgl/tests/src/test_fonts/font_2.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/tests/src/test_fonts/font_2.fnt -------------------------------------------------------------------------------- /lvgl/tests/src/test_fonts/font_3.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/tests/src/test_fonts/font_3.fnt -------------------------------------------------------------------------------- /lvgl/demos/widgets/assets/lvgl_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/widgets/assets/lvgl_logo.png -------------------------------------------------------------------------------- /lvgl/docs/misc/button_style_example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/button_style_example.gif -------------------------------------------------------------------------------- /lvgl/docs/misc/button_style_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/button_style_example.png -------------------------------------------------------------------------------- /lvgl/docs/misc/simple_button_example.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/simple_button_example.gif -------------------------------------------------------------------------------- /lvgl/docs/misc/simple_button_example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/docs/misc/simple_button_example.png -------------------------------------------------------------------------------- /lvgl/examples/assets/img_caret_down.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_caret_down.png -------------------------------------------------------------------------------- /lvgl/examples/assets/img_hand_hour.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_hand_hour.png -------------------------------------------------------------------------------- /lvgl/examples/assets/img_skew_strip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_skew_strip.png -------------------------------------------------------------------------------- /lvgl/examples/libs/bmp/example_16bit.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/bmp/example_16bit.bmp -------------------------------------------------------------------------------- /lvgl/examples/libs/bmp/example_24bit.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/bmp/example_24bit.bmp -------------------------------------------------------------------------------- /lvgl/examples/libs/bmp/example_32bit.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/bmp/example_32bit.bmp -------------------------------------------------------------------------------- /lvgl/examples/libs/sjpg/small_image.sjpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/sjpg/small_image.sjpg -------------------------------------------------------------------------------- /lvgl/scripts/built_in_font/SimSun.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/scripts/built_in_font/SimSun.woff -------------------------------------------------------------------------------- /lvgl/scripts/built_in_font/unscii-8.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/scripts/built_in_font/unscii-8.ttf -------------------------------------------------------------------------------- /lvgl/src/extra/libs/freetype/arial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/src/extra/libs/freetype/arial.ttf -------------------------------------------------------------------------------- /lvgl/demos/keypad_encoder/screenshot1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/keypad_encoder/screenshot1.gif -------------------------------------------------------------------------------- /lvgl/demos/keypad_encoder/screenshot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/keypad_encoder/screenshot1.png -------------------------------------------------------------------------------- /lvgl/examples/assets/img_cogwheel_argb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_cogwheel_argb.png -------------------------------------------------------------------------------- /lvgl/examples/assets/img_cogwheel_rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_cogwheel_rgb.png -------------------------------------------------------------------------------- /lvgl/scripts/built_in_font/DejaVuSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/scripts/built_in_font/DejaVuSans.ttf -------------------------------------------------------------------------------- /lvgl/examples/assets/font/montserrat-16.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/font/montserrat-16.fnt -------------------------------------------------------------------------------- /lvgl/examples/assets/font/montserrat-22.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/font/montserrat-22.fnt -------------------------------------------------------------------------------- /lvgl/examples/libs/freetype/Lato-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/libs/freetype/Lato-Regular.ttf -------------------------------------------------------------------------------- /lvgl/examples/widgets/colorwheel/lv_example_colorwheel_1.py: -------------------------------------------------------------------------------- 1 | cw = lv.colorwheel(lv.scr_act(), True) 2 | cw.set_size(200, 200) 3 | cw.center() 4 | 5 | -------------------------------------------------------------------------------- /lvgl/docs/layouts/index.md: -------------------------------------------------------------------------------- 1 | 2 | # Layouts 3 | 4 | 5 | ```eval_rst 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | flex 10 | grid 11 | ``` 12 | -------------------------------------------------------------------------------- /lvgl/examples/assets/img_cogwheel_indexed16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_cogwheel_indexed16.png -------------------------------------------------------------------------------- /lvgl/examples/widgets/line/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Line 3 | """""""""""""""" 4 | 5 | .. lv_example:: widgets/line/lv_example_line_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/win/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple window 3 | """"""""""""""" 4 | 5 | .. lv_example:: widgets/win/lv_example_win_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/demos/benchmark/assets/img_cogwheel_argb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/benchmark/assets/img_cogwheel_argb.png -------------------------------------------------------------------------------- /lvgl/demos/benchmark/assets/img_cogwheel_rgb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/benchmark/assets/img_cogwheel_rgb.png -------------------------------------------------------------------------------- /lvgl/env_support/cmsis-pack/LVGL.lvgl.8.3.7.pack: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/env_support/cmsis-pack/LVGL.lvgl.8.3.7.pack -------------------------------------------------------------------------------- /lvgl/examples/assets/img_cogwheel_chroma_keyed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_cogwheel_chroma_keyed.png -------------------------------------------------------------------------------- /lvgl/examples/widgets/bar/lv_example_bar_1.py: -------------------------------------------------------------------------------- 1 | bar1 = lv.bar(lv.scr_act()) 2 | bar1.set_size(200, 20) 3 | bar1.center() 4 | bar1.set_value(70, lv.ANIM.OFF) 5 | 6 | -------------------------------------------------------------------------------- /lvgl/scripts/built_in_font/Montserrat-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/scripts/built_in_font/Montserrat-Medium.ttf -------------------------------------------------------------------------------- /lvgl/examples/assets/font/lv_font_simsun_16_cjk.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/font/lv_font_simsun_16_cjk.fnt -------------------------------------------------------------------------------- /lvgl/demos/benchmark/assets/img_cogwheel_indexed16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/benchmark/assets/img_cogwheel_indexed16.png -------------------------------------------------------------------------------- /lvgl/examples/assets/img_skew_strip_80x20_argb8888.fnt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/examples/assets/img_skew_strip_80x20_argb8888.fnt -------------------------------------------------------------------------------- /lvgl/examples/widgets/led/index.rst: -------------------------------------------------------------------------------- 1 | 2 | LED with custom style 3 | """"""""""""""""""""" 4 | 5 | .. lv_example:: widgets/led/lv_example_led_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/switch/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Switch 3 | """"""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/switch/lv_example_switch_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/demos/benchmark/assets/img_cogwheel_chroma_keyed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/demos/benchmark/assets/img_cogwheel_chroma_keyed.png -------------------------------------------------------------------------------- /lvgl/examples/widgets/imgbtn/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Image button 3 | """"""""""""""""""" 4 | 5 | .. lv_example:: widgets/imgbtn/lv_example_imgbtn_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/span/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Span with custom styles 3 | """""""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/span/lv_example_span_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/spinbox/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Spinbox 3 | """"""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/spinbox/lv_example_spinbox_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/tests/config.yml: -------------------------------------------------------------------------------- 1 | :unity: 2 | :includes: 3 | - lv_test_init.h 4 | :suite_setup: "lv_test_init();" 5 | :suite_teardown: "lv_test_deinit();return num_failures;" 6 | -------------------------------------------------------------------------------- /lvgl/docs/get-started/bindings/index.md: -------------------------------------------------------------------------------- 1 | # Bindings 2 | 3 | 4 | ```eval_rst 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | micropython 10 | cpp 11 | ``` 12 | 13 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/arc/lv_example_arc_1.py: -------------------------------------------------------------------------------- 1 | # Create an Arc 2 | arc = lv.arc(lv.scr_act()) 3 | arc.set_end_angle(200) 4 | arc.set_size(150, 150) 5 | arc.center() 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/colorwheel/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Colorwheel 3 | """"""""""""""""" 4 | 5 | .. lv_example:: widgets/colorwheel/lv_example_colorwheel_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/msgbox/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Message box 3 | """"""""""""""""""" 4 | 5 | .. lv_example:: widgets/msgbox/lv_example_msgbox_1 6 | :language: c 7 | 8 | 9 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/spinner/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple spinner 3 | """""""""""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/spinner/lv_example_spinner_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/docs/widgets/index.md: -------------------------------------------------------------------------------- 1 | # Widgets 2 | 3 | ```eval_rst 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | 8 | obj 9 | core/index 10 | extra/index 11 | ``` 12 | 13 | 14 | -------------------------------------------------------------------------------- /lvgl/examples/libs/sjpg/index.rst: -------------------------------------------------------------------------------- 1 | Load an SJPG image 2 | """"""""""""""""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: libs/sjpg/lv_example_sjpg_1 5 | :language: c 6 | 7 | -------------------------------------------------------------------------------- /lvgl/examples/others/snapshot/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple snapshot example 3 | """"""""""""""""""" 4 | 5 | .. lv_example:: others/snapshot/lv_example_snapshot_1 6 | :language: c 7 | 8 | 9 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/calendar/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Calendar with header 3 | """""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/calendar/lv_example_calendar_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/spinner/lv_example_spinner_1.py: -------------------------------------------------------------------------------- 1 | # Create a spinner 2 | spinner = lv.spinner(lv.scr_act(), 1000, 60) 3 | spinner.set_size(100, 100) 4 | spinner.center() 5 | 6 | 7 | -------------------------------------------------------------------------------- /lvgl/tests/makefile/test.c: -------------------------------------------------------------------------------- 1 | #if LV_BUILD_TEST 2 | #include 3 | #include "lvgl/lvgl.h" 4 | 5 | int main(void) { 6 | lv_init(); 7 | return 0; 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /lvgl/examples/libs/bmp/index.rst: -------------------------------------------------------------------------------- 1 | Open a BMP image from file 2 | """"""""""""""""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: libs/bmp/lv_example_bmp_1 5 | :language: c 6 | 7 | -------------------------------------------------------------------------------- /lvgl/examples/libs/qrcode/index.rst: -------------------------------------------------------------------------------- 1 | Create a QR Code 2 | """"""""""""""""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: libs/qrcode/lv_example_qrcode_1 5 | :language: c 6 | 7 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/keyboard/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Keyboard with text area 3 | """"""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/keyboard/lv_example_keyboard_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/tileview/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Tileview with content 3 | """"""""""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/tileview/lv_example_tileview_1 6 | :language: c 7 | 8 | -------------------------------------------------------------------------------- /lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jpearman/vexcode-lvgllib8_X/HEAD/lvgl/scripts/built_in_font/FontAwesome5-Solid+Brands+Regular.woff -------------------------------------------------------------------------------- /lvgl/docs/get-started/os/index.md: -------------------------------------------------------------------------------- 1 | # (RT)OS 2 | 3 | ```eval_rst 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | nuttx 9 | rt-thread 10 | freertos 11 | zephyr 12 | ``` 13 | 14 | -------------------------------------------------------------------------------- /lvgl/examples/libs/gif/index.rst: -------------------------------------------------------------------------------- 1 | Open a GIF image from file and variable 2 | """"""""""""""""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: libs/gif/lv_example_gif_1 5 | :language: c 6 | 7 | -------------------------------------------------------------------------------- /lvgl/examples/libs/png/index.rst: -------------------------------------------------------------------------------- 1 | Open a PNG image from file and variable 2 | """"""""""""""""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: libs/png/lv_example_png_1 5 | :language: c 6 | 7 | -------------------------------------------------------------------------------- /lvgl/examples/others/imgfont/index.rst: -------------------------------------------------------------------------------- 1 | Use emojis in a text. 2 | """"""""""""""""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: others/imgfont/lv_example_imgfont_1 5 | :language: c 6 | 7 | -------------------------------------------------------------------------------- /lvgl/examples/libs/freetype/index.rst: -------------------------------------------------------------------------------- 1 | Open a front with FreeType 2 | """"""""""""""""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: libs/freetype/lv_example_freetype_1 5 | :language: c 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.vscode 2 | /bin 3 | /build/** 4 | compile_commands.json 5 | 6 | # allow built library and includes 7 | !/build/include 8 | !/build/include/** 9 | !/build/libv5lvgl.a 10 | .DS_Store 11 | -------------------------------------------------------------------------------- /lvgl/scripts/cppcheck_run.sh: -------------------------------------------------------------------------------- 1 | cppcheck -j8 --template="{severity}\t{file}:{line}\t{id}: {message}" --enable=all ../src/ --output-file=cppcheck_res.txt --suppress=unusedFunction --suppress=preprocessorErrorDirective --force 2 | -------------------------------------------------------------------------------- /lvgl/docs/overview/renderers/index.md: -------------------------------------------------------------------------------- 1 | 2 | # Renderers and GPUs 3 | 4 | 5 | ```eval_rst 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | 10 | sw 11 | sdl 12 | arm-2d 13 | pxp-vglite 14 | dma2d 15 | ``` 16 | 17 | -------------------------------------------------------------------------------- /lvgl/docs/others/index.md: -------------------------------------------------------------------------------- 1 | # Others 2 | 3 | 4 | ```eval_rst 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | snapshot 10 | monkey 11 | gridnav 12 | fragment 13 | msg 14 | imgfont 15 | ime_pinyin 16 | ``` 17 | 18 | -------------------------------------------------------------------------------- /lvgl/idf_component.yml: -------------------------------------------------------------------------------- 1 | description: LVGL - Light and Versatile Graphics Library 2 | url: https://lvgl.io/ 3 | repository: https://github.com/lvgl/lvgl.git 4 | documentation: https://docs.lvgl.io/ 5 | issues: https://github.com/lvgl/lvgl/issues 6 | -------------------------------------------------------------------------------- /lvgl/scripts/filetohex.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import sys 3 | 4 | with open(sys.argv[1], 'r') as file: 5 | s = file.read() 6 | 7 | b = bytearray() 8 | b.extend(map(ord, s)) 9 | 10 | for a in b: print(hex(a), end =", ") 11 | 12 | -------------------------------------------------------------------------------- /lvgl/examples/libs/rlottie/lv_example_rlottie_2.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | import lvgl as lv 3 | import display_driver 4 | 5 | lottie = lv.rlottie_create_from_file(lv.scr_act(), 100, 100,"lv_example_rlottie_approve.json") 6 | lottie.center() 7 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/animimg/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Animation Image 3 | """""""""""""""" 4 | 5 | .. lv_example:: widgets/animimg/lv_example_animimg_1 6 | :language: c 7 | :description: A simple example to demonstrate the use of an animation image. 8 | -------------------------------------------------------------------------------- /lvgl/SConscript: -------------------------------------------------------------------------------- 1 | # RT-Thread building script for bridge 2 | 3 | import os 4 | from building import * 5 | 6 | objs = [] 7 | cwd = GetCurrentDir() 8 | 9 | objs = objs + SConscript(cwd + '/env_support/rt-thread/SConscript') 10 | 11 | Return('objs') 12 | -------------------------------------------------------------------------------- /lvgl/tests/unity/type_sanitizer.rb: -------------------------------------------------------------------------------- 1 | module TypeSanitizer 2 | def self.sanitize_c_identifier(unsanitized) 3 | # convert filename to valid C identifier by replacing invalid chars with '_' 4 | unsanitized.gsub(/[-\/\\\.\,\s]/, '_') 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /lvgl/docs/get-started/platforms/index.md: -------------------------------------------------------------------------------- 1 | # Platforms 2 | 3 | ```eval_rst 4 | 5 | .. toctree:: 6 | :maxdepth: 2 7 | 8 | pc-simulator 9 | nxp 10 | stm32 11 | espressif 12 | arduino 13 | tasmota-berry 14 | cmake 15 | ``` 16 | 17 | -------------------------------------------------------------------------------- /lvgl/src/draw/arm2d/lv_draw_arm2d.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_gpu_arm2d.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/arm2d 4 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/arm2d 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/arm2d" 7 | -------------------------------------------------------------------------------- /lvgl/docs/libs/index.md: -------------------------------------------------------------------------------- 1 | # 3rd party libraries 2 | 3 | 4 | ```eval_rst 5 | 6 | .. toctree:: 7 | :maxdepth: 1 8 | 9 | fsdrv 10 | bmp 11 | sjpg 12 | png 13 | gif 14 | freetype 15 | qrcode 16 | rlottie 17 | ffmpeg 18 | ``` 19 | 20 | -------------------------------------------------------------------------------- /lvgl/docs/porting/index.md: -------------------------------------------------------------------------------- 1 | 2 | # Porting 3 | 4 | ```eval_rst 5 | 6 | .. toctree:: 7 | :maxdepth: 2 8 | 9 | project 10 | display 11 | indev 12 | tick 13 | timer-handler 14 | sleep 15 | os 16 | log 17 | gpu 18 | 19 | ``` 20 | 21 | -------------------------------------------------------------------------------- /lvgl/src/hal/lv_hal.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_hal_disp.c 2 | CSRCS += lv_hal_indev.c 3 | CSRCS += lv_hal_tick.c 4 | 5 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/hal 6 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/hal 7 | 8 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/hal" 9 | -------------------------------------------------------------------------------- /lvgl/tests/makefile/Makefile: -------------------------------------------------------------------------------- 1 | LVGL_DIR := $(CURDIR)/../.. 2 | include ../../lvgl.mk 3 | 4 | CSRCS += test.c 5 | CFLAGS += -DLV_CONF_SKIP=1 -DLV_BUILD_TEST=1 -I$(LVGL_DIR)/.. 6 | COBJS := $(patsubst %.c, %.o, $(CSRCS)) 7 | 8 | test_file: $(COBJS) 9 | $(CC) -o $@ $^ 10 | -------------------------------------------------------------------------------- /lvgl/env_support/rt-thread/squareline/SConscript: -------------------------------------------------------------------------------- 1 | from building import * 2 | 3 | cwd = GetCurrentDir() 4 | src = ['lv_ui_entry.c'] 5 | 6 | src += Glob(cwd + '/ui/*.c') 7 | 8 | group = DefineGroup('LVGL-SquareLine', src, depend = ['PKG_USING_LVGL_SQUARELINE']) 9 | 10 | Return('group') 11 | -------------------------------------------------------------------------------- /lvgl/src/draw/stm32_dma2d/lv_draw_stm32_dma2d.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_gpu_stm32_dma2d.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/stm32_dma2d 4 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/stm32_dma2d 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/stm32_dma2d" 7 | -------------------------------------------------------------------------------- /lvgl/src/draw/swm341_dma2d/lv_draw_swm341_dma2d.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_gpu_swm341_dma2d.c 2 | 3 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/swm341_dma2d 4 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/swm341_dma2d 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/swm341_dma2d" 7 | -------------------------------------------------------------------------------- /lvgl/env_support/rt-thread/squareline/README.md: -------------------------------------------------------------------------------- 1 | This folder is for LVGL SquareLine Studio 2 | 3 | SquareLine Studio can automatically put the generated C files into `ui` folder, so that rt-thread will automatically detect them; or, as a user, you can move the generated C files into `ui` folder manually. 4 | 5 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/list/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple List 3 | """""""""""""""" 4 | 5 | .. lv_example:: widgets/list/lv_example_list_1 6 | :language: c 7 | 8 | 9 | Sorting a List using up and down buttons 10 | """""""""""""""" 11 | 12 | .. lv_example:: widgets/list/lv_example_list_2 13 | :language: c 14 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | ### Build LVGL library for use with VEXcode V5 text 2 | 3 | This project will build a static library that can be used with VEXcode and also a demo application. 4 | 5 | The build on Windows may be really slow due to issues with the clangd language server, it may not build at all. 6 | If possible, build on OSX. -------------------------------------------------------------------------------- /lvgl/examples/libs/ffmpeg/index.rst: -------------------------------------------------------------------------------- 1 | Decode image 2 | """"""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: libs/ffmpeg/lv_example_ffmpeg_1 5 | :language: c 6 | 7 | Decode video 8 | """"""""""""""""""""""""""""""""""" 9 | 10 | .. lv_example:: libs/ffmpeg/lv_example_ffmpeg_2 11 | :language: c 12 | 13 | -------------------------------------------------------------------------------- /lvgl/examples/others/ime/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Pinyin IME 26 key input 3 | """"""""""""""""""""""""" 4 | 5 | .. lv_example:: others/ime/lv_example_ime_pinyin_1 6 | :language: c 7 | 8 | Pinyin IME 9 key input 9 | """"""""""""""""""""""""" 10 | 11 | .. lv_example:: others/ime/lv_example_ime_pinyin_2 12 | :language: c 13 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/checkbox/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Checkboxes 3 | """"""""""""""""" 4 | 5 | .. lv_example:: widgets/checkbox/lv_example_checkbox_1 6 | :language: c 7 | 8 | Checkboxes as radio buttons 9 | """"""""""""""""""""""""""" 10 | .. lv_example:: widgets/checkbox/lv_example_checkbox_2 11 | :language: c 12 | 13 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/table/index.rst: -------------------------------------------------------------------------------- 1 | 2 | 3 | Simple table 4 | """"""""""""""""""""""" 5 | 6 | .. lv_example:: widgets/table/lv_example_table_1 7 | :language: c 8 | 9 | Lightweighted list from table 10 | """""""""""""""""""""""""""""" 11 | 12 | .. lv_example:: widgets/table/lv_example_table_2 13 | :language: c 14 | 15 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/obj/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Base objects with custom styles 3 | """""""""""""""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/obj/lv_example_obj_1 6 | :language: c 7 | 8 | Make an object draggable 9 | """""""""""""""""""""""""""" 10 | 11 | .. lv_example:: widgets/obj/lv_example_obj_2 12 | :language: c 13 | 14 | -------------------------------------------------------------------------------- /lvgl/examples/others/fragment/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Basic fragment usage 3 | """"""""""""""""""" 4 | 5 | .. lv_example:: others/fragment/lv_example_fragment_1 6 | :language: c 7 | 8 | 9 | 10 | Stack navigation example 11 | """"""""""""""""""" 12 | 13 | .. lv_example:: others/fragment/lv_example_fragment_2 14 | :language: c 15 | 16 | 17 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_7.py: -------------------------------------------------------------------------------- 1 | # 2 | # Using the Arc style properties 3 | # 4 | style = lv.style_t() 5 | style.init() 6 | 7 | style.set_arc_color(lv.palette_main(lv.PALETTE.RED)) 8 | style.set_arc_width(4) 9 | 10 | # Create an object with the new style 11 | obj = lv.arc(lv.scr_act()) 12 | obj.add_style(style, 0) 13 | obj.center() 14 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/arc/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Arc 3 | """""""""""""""" 4 | 5 | .. lv_example:: widgets/arc/lv_example_arc_1 6 | :language: c 7 | :description: A simple example to demonstrate the use of an arc. 8 | 9 | Loader with Arc 10 | """""""""""""""" 11 | 12 | .. lv_example:: widgets/arc/lv_example_arc_2 13 | :language: c 14 | 15 | -------------------------------------------------------------------------------- /lvgl/docs/widgets/core/index.md: -------------------------------------------------------------------------------- 1 | # Core widgets 2 | 3 | ```eval_rst 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | 8 | arc 9 | bar 10 | btn 11 | btnmatrix 12 | canvas 13 | checkbox 14 | dropdown 15 | img 16 | label 17 | line 18 | roller 19 | slider 20 | switch 21 | table 22 | textarea 23 | 24 | ``` 25 | 26 | 27 | -------------------------------------------------------------------------------- /lvgl/examples/libs/sjpg/lv_example_sjpg_1.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | import lvgl as lv 3 | import display_driver 4 | import fs_driver 5 | 6 | fs_drv = lv.fs_drv_t() 7 | fs_driver.fs_register(fs_drv, 'S') 8 | 9 | wp = lv.img(lv.scr_act()) 10 | # The File system is attached to letter 'S' 11 | 12 | wp.set_src("S:small_image.sjpg") 13 | wp.center() 14 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/bar/lv_example_bar_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_BAR && LV_BUILD_EXAMPLES 3 | 4 | void lv_example_bar_1(void) 5 | { 6 | lv_obj_t * bar1 = lv_bar_create(lv_scr_act()); 7 | lv_obj_set_size(bar1, 200, 20); 8 | lv_obj_center(bar1); 9 | lv_bar_set_value(bar1, 70, LV_ANIM_OFF); 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /lvgl/examples/libs/bmp/lv_example_bmp_1.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | import lvgl as lv 3 | import display_driver 4 | import fs_driver 5 | 6 | fs_drv = lv.fs_drv_t() 7 | fs_driver.fs_register(fs_drv, 'S') 8 | 9 | img = lv.img(lv.scr_act()) 10 | # The File system is attached to letter 'S' 11 | 12 | img.set_src("S:example_32bit.bmp") 13 | img.center() 14 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/colorwheel/lv_example_colorwheel_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_COLORWHEEL && LV_BUILD_EXAMPLES 3 | 4 | void lv_example_colorwheel_1(void) 5 | { 6 | lv_obj_t * cw; 7 | 8 | cw = lv_colorwheel_create(lv_scr_act(), true); 9 | lv_obj_set_size(cw, 200, 200); 10 | lv_obj_center(cw); 11 | } 12 | 13 | #endif 14 | -------------------------------------------------------------------------------- /lvgl/scripts/infer_run.sh: -------------------------------------------------------------------------------- 1 | # https://github.com/facebook/infer 2 | # 3 | # Install: 4 | # VERSION=0.17.0; \ 5 | # curl -sSL "https://github.com/facebook/infer/releases/download/v$VERSION/infer-linux64-v$VERSION.tar.xz" \ 6 | # | sudo tar -C /opt -xJ && \ 7 | # sudoln -s "/opt/infer-linux64-v$VERSION/bin/infer" /usr/local/bin/infer 8 | 9 | infer run -- make -j8 10 | -------------------------------------------------------------------------------- /lvgl/examples/libs/rlottie/index.rst: -------------------------------------------------------------------------------- 1 | Load a Lottie animation from raw data 2 | """"""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: libs/rlottie/lv_example_rlottie_1 5 | :language: c 6 | 7 | Load a Lottie animation from a file 8 | """"""""""""""""""""""""""""""""""" 9 | 10 | .. lv_example:: libs/rlottie/lv_example_rlottie_2 11 | :language: c 12 | 13 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/tabview/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Tabview 3 | """"""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/tabview/lv_example_tabview_1 6 | :language: c 7 | 8 | Tabs on the left, styling and no scrolling 9 | """"""""""""""""""""""""""""""""""""""""""""" 10 | 11 | .. lv_example:: widgets/tabview/lv_example_tabview_2 12 | :language: c 13 | 14 | 15 | -------------------------------------------------------------------------------- /lvgl/src/draw/nxp/pxp/lv_draw_nxp_pxp.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_draw_pxp.c 2 | CSRCS += lv_draw_pxp_blend.c 3 | CSRCS += lv_gpu_nxp_pxp_osa.c 4 | CSRCS += lv_gpu_nxp_pxp.c 5 | 6 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/pxp 7 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/pxp 8 | 9 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/pxp" 10 | -------------------------------------------------------------------------------- /lvgl/tests/src/lv_test_init.h: -------------------------------------------------------------------------------- 1 | 2 | #ifndef LV_TEST_INIT_H 3 | #define LV_TEST_INIT_H 4 | 5 | #ifdef __cplusplus 6 | extern "C" { 7 | #endif 8 | 9 | #include 10 | #include <../lvgl.h> 11 | 12 | void lv_test_init(void); 13 | void lv_test_deinit(void); 14 | 15 | #ifdef __cplusplus 16 | } /*extern "C"*/ 17 | #endif 18 | 19 | #endif /*LV_TEST_INIT_H*/ 20 | 21 | -------------------------------------------------------------------------------- /lvgl/examples/libs/rlottie/lv_example_rlottie_1.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | import lvgl as lv 3 | import display_driver 4 | # 5 | # Load a lottie animation from flash 6 | # 7 | from lv_example_rlottie_approve import lv_example_rlottie_approve 8 | 9 | lottie = lv.rlottie_create_from_raw(lv.scr_act(), 100, 100, lv_example_rlottie_approve) 10 | lottie.center() 11 | 12 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/canvas/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Drawing on the Canvas and rotate 3 | """""""""""""""""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/canvas/lv_example_canvas_1 6 | :language: c 7 | 8 | Transparent Canvas with chroma keying 9 | """""""""""""""""""""""""""""""""""""" 10 | 11 | .. lv_example:: widgets/canvas/lv_example_canvas_2 12 | :language: c 13 | 14 | -------------------------------------------------------------------------------- /lvgl/src/draw/nxp/lv_draw_nxp.mk: -------------------------------------------------------------------------------- 1 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp 2 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp 3 | 4 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp" 5 | 6 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/pxp/lv_draw_nxp_pxp.mk 7 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/vglite/lv_draw_nxp_vglite.mk 8 | -------------------------------------------------------------------------------- /lvgl/tests/src/test_cases/test_demo_widgets.c: -------------------------------------------------------------------------------- 1 | #if LV_BUILD_TEST 2 | #include "../lvgl.h" 3 | #include "../demos/lv_demos.h" 4 | 5 | #include "unity/unity.h" 6 | 7 | #include "lv_test_helpers.h" 8 | #include "lv_test_indev.h" 9 | 10 | void test_demo_widgets(void) 11 | { 12 | #if LV_USE_DEMO_WIDGETS 13 | lv_demo_widgets(); 14 | #endif 15 | } 16 | 17 | #endif 18 | 19 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/spinner/lv_example_spinner_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_SPINNER && LV_BUILD_EXAMPLES 3 | 4 | void lv_example_spinner_1(void) 5 | { 6 | /*Create a spinner*/ 7 | lv_obj_t * spinner = lv_spinner_create(lv_scr_act(), 1000, 60); 8 | lv_obj_set_size(spinner, 100, 100); 9 | lv_obj_center(spinner); 10 | } 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /lvgl/tests/src/test_cases/_test_template.c: -------------------------------------------------------------------------------- 1 | #if LV_BUILD_TEST 2 | #include "../lvgl.h" 3 | 4 | #include "unity/unity.h" 5 | 6 | void setUp(void) 7 | { 8 | /* Function run before every test */ 9 | } 10 | 11 | void tearDown(void) 12 | { 13 | /* Function run after every test */ 14 | } 15 | 16 | void test_func_1(void) 17 | { 18 | TEST_FAIL(); 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /lvgl/docs/widgets/extra/index.md: -------------------------------------------------------------------------------- 1 | # Extra widgets 2 | 3 | ```eval_rst 4 | 5 | .. toctree:: 6 | :maxdepth: 1 7 | 8 | animimg 9 | calendar 10 | chart 11 | colorwheel 12 | imgbtn 13 | keyboard 14 | led 15 | list 16 | menu 17 | meter 18 | msgbox 19 | span 20 | spinbox 21 | spinner 22 | tabview 23 | tileview 24 | win 25 | ``` 26 | 27 | 28 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/msgbox/lv_example_msgbox_1.py: -------------------------------------------------------------------------------- 1 | def event_cb(e): 2 | mbox = e.get_current_target() 3 | print("Button %s clicked" % mbox.get_active_btn_text()) 4 | 5 | btns = ["Apply", "Close", ""] 6 | 7 | mbox1 = lv.msgbox(lv.scr_act(), "Hello", "This is a message box with two buttons.", btns, True) 8 | mbox1.add_event_cb(event_cb, lv.EVENT.VALUE_CHANGED, None) 9 | mbox1.center() 10 | 11 | -------------------------------------------------------------------------------- /lvgl/scripts/find_version.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Credit: https://stackoverflow.com/a/4774063 3 | SCRIPTPATH="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )" 4 | TMPENVFILE=$(mktemp /tmp/lvgl.script.XXXXXX) 5 | cat $SCRIPTPATH/../lvgl.h | grep "#define LVGL_VERSION_" | sed 's/#define //g' | sed -r 's/\s+/=/' > $TMPENVFILE 6 | . $TMPENVFILE 7 | rm $TMPENVFILE 8 | echo $LVGL_VERSION_MAJOR.$LVGL_VERSION_MINOR 9 | -------------------------------------------------------------------------------- /lvgl/scripts/install-prerequisites.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/sh 2 | 3 | # Install Linux package prerequisites needed for LVGL development 4 | # and testing. Some less-common development packages are not included 5 | # here, such as MicroPython and PC simulator packages. 6 | # 7 | # Note: This script is run by the CI workflows. 8 | sudo apt update 9 | sudo apt install gcc python3 libpng-dev ruby-full gcovr cmake 10 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/btn/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Buttons 3 | """""""""""""""" 4 | 5 | .. lv_example:: widgets/btn/lv_example_btn_1 6 | :language: c 7 | 8 | 9 | Styling buttons 10 | """""""""""""""" 11 | 12 | .. lv_example:: widgets/btn/lv_example_btn_2 13 | :language: c 14 | 15 | Gummy button 16 | """""""""""""""" 17 | 18 | .. lv_example:: widgets/btn/lv_example_btn_3 19 | :language: c 20 | 21 | -------------------------------------------------------------------------------- /lvgl/examples/anim/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Start animation on an event 3 | """""""""""""""""""""""""""" 4 | 5 | .. lv_example:: anim/lv_example_anim_1 6 | :language: c 7 | 8 | Playback animation 9 | """"""""""""""""""" 10 | .. lv_example:: anim/lv_example_anim_2 11 | :language: c 12 | 13 | Animation timeline 14 | """"""""""""""""""" 15 | .. lv_example:: anim/lv_example_anim_timeline_1 16 | :language: c 17 | 18 | -------------------------------------------------------------------------------- /lvgl/examples/event/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Button click event 3 | """"""""""""""""""" 4 | 5 | .. lv_example:: event/lv_example_event_1 6 | :language: c 7 | 8 | Handle multiple events 9 | """""""""""""""""""""""" 10 | .. lv_example:: event/lv_example_event_2 11 | :language: c 12 | 13 | 14 | Event bubbling 15 | """""""""""""""""""""""" 16 | .. lv_example:: event/lv_example_event_3 17 | :language: c 18 | 19 | 20 | -------------------------------------------------------------------------------- /lvgl/docs/overview/index.md: -------------------------------------------------------------------------------- 1 | 2 | # Overview 3 | 4 | 5 | ```eval_rst 6 | 7 | .. toctree:: 8 | :maxdepth: 2 9 | 10 | object 11 | coords 12 | style 13 | style-props 14 | scroll 15 | layer 16 | event 17 | indev 18 | display 19 | color 20 | font 21 | image 22 | file-system 23 | animation 24 | timer 25 | drawing 26 | renderers/index 27 | new_widget 28 | ``` 29 | 30 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex_4.py: -------------------------------------------------------------------------------- 1 | # 2 | # Reverse the order of flex items 3 | # 4 | cont = lv.obj(lv.scr_act()) 5 | cont.set_size(300, 220) 6 | cont.center() 7 | cont.set_flex_flow(lv.FLEX_FLOW.COLUMN_REVERSE) 8 | 9 | for i in range(6): 10 | obj = lv.obj(cont) 11 | obj.set_size(100, 50) 12 | 13 | label = lv.label(obj) 14 | label.set_text("Item: " + str(i)) 15 | label.center() 16 | 17 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/label/lv_example_label_5.py: -------------------------------------------------------------------------------- 1 | # 2 | # Show customizing the circular scrolling animation of a label with `LV_LABEL_LONG_SCROLL_CIRCULAR` long mode. 3 | # 4 | 5 | label1 = lv.label(lv.scr_act()) 6 | label1.set_long_mode(lv.label.LONG.SCROLL_CIRCULAR) # Circular scroll 7 | label1.set_width(150) 8 | label1.set_text("It is a circularly scrolling text. ") 9 | label1.align(lv.ALIGN.CENTER, 0, 40) 10 | 11 | -------------------------------------------------------------------------------- /lvgl/env_support/cmake/zephyr.cmake: -------------------------------------------------------------------------------- 1 | if(CONFIG_LVGL) 2 | 3 | zephyr_include_directories(${ZEPHYR_BASE}/lib/gui/lvgl) 4 | 5 | target_include_directories(lvgl INTERFACE ${LVGL_ROOT_DIR}) 6 | 7 | zephyr_compile_definitions(LV_CONF_KCONFIG_EXTERNAL_INCLUDE=) 8 | 9 | zephyr_library() 10 | 11 | file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c) 12 | zephyr_library_sources(${SOURCES}) 13 | 14 | endif(CONFIG_LVGL) 15 | -------------------------------------------------------------------------------- /lvgl/env_support/rt-thread/squareline/ui/lvgl/lvgl.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2021, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: MIT 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2022-11-20 Meco Man The first version 9 | */ 10 | 11 | #ifdef __RTTHREAD__ 12 | 13 | #include "../../../../../lvgl.h" /* back to the root folder's lvgl.h */ 14 | 15 | #endif /* __RTTHREAD__ */ 16 | -------------------------------------------------------------------------------- /lvgl/examples/others/monkey/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Touchpad monkey example 3 | """"""""""""""""""" 4 | 5 | .. lv_example:: others/monkey/lv_example_monkey_1 6 | :language: c 7 | 8 | Encoder monkey example 9 | """"""""""""""""""" 10 | 11 | .. lv_example:: others/monkey/lv_example_monkey_2 12 | :language: c 13 | 14 | Button monkey example 15 | """"""""""""""""""" 16 | 17 | .. lv_example:: others/monkey/lv_example_monkey_3 18 | :language: c 19 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/roller/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Roller 3 | """""""""""""""" 4 | 5 | .. lv_example:: widgets/roller/lv_example_roller_1 6 | :language: c 7 | 8 | Styling the roller 9 | """""""""""""""""" 10 | 11 | .. lv_example:: widgets/roller/lv_example_roller_2 12 | :language: c 13 | 14 | add fade mask to roller 15 | """"""""""""""""""""""" 16 | 17 | .. lv_example:: widgets/roller/lv_example_roller_3 18 | :language: c 19 | 20 | -------------------------------------------------------------------------------- /lvgl/library.properties: -------------------------------------------------------------------------------- 1 | name=lvgl 2 | version=8.3.7 3 | author=kisvegabor 4 | maintainer=kisvegabor,embeddedt,pete-pjb 5 | sentence=Full-featured Graphics Library for Embedded Systems 6 | paragraph=Powerful and easy-to-use embedded GUI with many widgets, advanced visual effects (opacity, antialiasing, animations) and low memory requirements (16K RAM, 64K Flash). 7 | category=Display 8 | url=https://lvgl.io 9 | architectures=* 10 | includes=lvgl.h 11 | -------------------------------------------------------------------------------- /lvgl/env_support/rt-thread/squareline/lv_ui_entry.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2006-2022, RT-Thread Development Team 3 | * 4 | * SPDX-License-Identifier: MIT 5 | * 6 | * Change Logs: 7 | * Date Author Notes 8 | * 2022-05-13 Meco Man First version 9 | */ 10 | 11 | #ifdef __RTTHREAD__ 12 | 13 | void lv_user_gui_init(void) 14 | { 15 | extern void ui_init(void); 16 | ui_init(); 17 | } 18 | 19 | #endif /* __RTTHREAD__ */ 20 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/dropdown/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Drop down list 3 | """""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/dropdown/lv_example_dropdown_1 6 | :language: c 7 | 8 | Drop down in four directions 9 | """""""""""""""""""""""""""" 10 | 11 | .. lv_example:: widgets/dropdown/lv_example_dropdown_2 12 | :language: c 13 | 14 | 15 | Menu 16 | """""""""""" 17 | 18 | .. lv_example:: widgets/dropdown/lv_example_dropdown_3 19 | :language: c 20 | 21 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/obj/lv_example_obj_1.py: -------------------------------------------------------------------------------- 1 | obj1 = lv.obj(lv.scr_act()) 2 | obj1.set_size(100, 50) 3 | obj1.align(lv.ALIGN.CENTER, -60, -30) 4 | 5 | style_shadow = lv.style_t() 6 | style_shadow.init() 7 | style_shadow.set_shadow_width(10) 8 | style_shadow.set_shadow_spread(5) 9 | style_shadow.set_shadow_color(lv.palette_main(lv.PALETTE.BLUE)) 10 | 11 | obj2 = lv.obj(lv.scr_act()) 12 | obj2.add_style(style_shadow, 0) 13 | obj2.align(lv.ALIGN.CENTER, 60, 30) 14 | 15 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/slider/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Slider 3 | """"""""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/slider/lv_example_slider_1 6 | :language: c 7 | 8 | Slider with custom style 9 | """"""""""""""""""""""""" 10 | 11 | .. lv_example:: widgets/slider/lv_example_slider_2 12 | :language: c 13 | 14 | Slider with extended drawer 15 | """""""""""""""""""""""""""" 16 | 17 | .. lv_example:: widgets/slider/lv_example_slider_3 18 | :language: c 19 | 20 | 21 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/btnmatrix/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Button matrix 3 | """""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/btnmatrix/lv_example_btnmatrix_1 6 | :language: c 7 | 8 | 9 | Custom buttons 10 | """""""""""""""""""""" 11 | 12 | .. lv_example:: widgets/btnmatrix/lv_example_btnmatrix_2 13 | :language: c 14 | 15 | 16 | Pagination 17 | """""""""""""""""""""" 18 | 19 | .. lv_example:: widgets/btnmatrix/lv_example_btnmatrix_3 20 | :language: c 21 | 22 | 23 | -------------------------------------------------------------------------------- /lvgl/examples/libs/sjpg/lv_example_sjpg_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_SJPG && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Load an SJPG image 6 | */ 7 | void lv_example_sjpg_1(void) 8 | { 9 | lv_obj_t * wp; 10 | 11 | wp = lv_img_create(lv_scr_act()); 12 | /* Assuming a File system is attached to letter 'A' 13 | * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ 14 | lv_img_set_src(wp, "A:lvgl/examples/libs/sjpg/small_image.sjpg"); 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_12.py: -------------------------------------------------------------------------------- 1 | # 2 | # Local styles 3 | # 4 | 5 | style = lv.style_t() 6 | style.init() 7 | style.set_bg_color(lv.palette_main(lv.PALETTE.GREEN)) 8 | style.set_border_color(lv.palette_lighten(lv.PALETTE.GREEN, 3)) 9 | style.set_border_width(3) 10 | 11 | obj = lv.obj(lv.scr_act()) 12 | obj.add_style(style, 0) 13 | 14 | # Overwrite the background color locally 15 | obj.set_style_bg_color(lv.palette_main(lv.PALETTE.ORANGE), lv.PART.MAIN) 16 | 17 | obj.center() 18 | -------------------------------------------------------------------------------- /lvgl/src/draw/nxp/vglite/lv_draw_nxp_vglite.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_draw_vglite.c 2 | CSRCS += lv_draw_vglite_arc.c 3 | CSRCS += lv_draw_vglite_blend.c 4 | CSRCS += lv_draw_vglite_line.c 5 | CSRCS += lv_draw_vglite_rect.c 6 | CSRCS += lv_vglite_buf.c 7 | CSRCS += lv_vglite_utils.c 8 | 9 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/vglite 10 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/vglite 11 | 12 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/vglite" 13 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/textarea/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Text area 3 | """"""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/textarea/lv_example_textarea_1 6 | :language: c 7 | 8 | 9 | Text area with password field 10 | """"""""""""""""""""""""""""" 11 | 12 | .. lv_example:: widgets/textarea/lv_example_textarea_2 13 | :language: c 14 | 15 | Text auto-formatting 16 | """"""""""""""""""""""""""""" 17 | 18 | .. lv_example:: widgets/textarea/lv_example_textarea_3 19 | :language: c 20 | 21 | -------------------------------------------------------------------------------- /lvgl/examples/others/msg/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Slider to label messaging 3 | """"""""""""""""""""""""" 4 | 5 | .. lv_example:: others/msg/lv_example_msg_1 6 | :language: c 7 | 8 | Handling login and its states 9 | """"""""""""""""""""""""""""" 10 | 11 | .. lv_example:: others/msg/lv_example_msg_2 12 | :language: c 13 | 14 | Setting the same value from many sources 15 | """""""""""""""""""""""""""""""""""""""" 16 | 17 | .. lv_example:: others/msg/lv_example_msg_3 18 | :language: c 19 | 20 | 21 | -------------------------------------------------------------------------------- /lvgl/examples/libs/qrcode/lv_example_qrcode_1.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | import lvgl as lv 3 | import display_driver 4 | 5 | bg_color = lv.palette_lighten(lv.PALETTE.LIGHT_BLUE, 5) 6 | fg_color = lv.palette_darken(lv.PALETTE.BLUE, 4) 7 | 8 | qr = lv.qrcode(lv.scr_act(), 150, fg_color, bg_color) 9 | # Set data 10 | data = "https://lvgl.io" 11 | qr.update(data,len(data)) 12 | qr.center() 13 | # Add a border with bg_color 14 | qr.set_style_border_color(bg_color, 0) 15 | qr.set_style_border_width(5, 0) 16 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_9.py: -------------------------------------------------------------------------------- 1 | # 2 | # Using the line style properties 3 | # 4 | 5 | style = lv.style_t() 6 | style.init() 7 | 8 | style.set_line_color(lv.palette_main(lv.PALETTE.GREY)) 9 | style.set_line_width(6) 10 | style.set_line_rounded(True) 11 | 12 | # Create an object with the new style 13 | obj = lv.line(lv.scr_act()) 14 | obj.add_style(style, 0) 15 | p = [ {"x":10, "y":30}, 16 | {"x":30, "y":50}, 17 | {"x":100, "y":0}] 18 | 19 | obj.set_points(p, 3) 20 | 21 | obj.center() 22 | -------------------------------------------------------------------------------- /lvgl/env_support/cmsis-pack/LVGL.pidx: -------------------------------------------------------------------------------- 1 | 2 | 3 | LVGL 4 | https://raw.githubusercontent.com/lvgl/lvgl/master/env_support/cmsis-pack/ 5 | 2023-05-03 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex_6.py: -------------------------------------------------------------------------------- 1 | # 2 | # RTL base direction changes order of the items. 3 | # Also demonstrate how horizontal scrolling works with RTL. 4 | # 5 | 6 | cont = lv.obj(lv.scr_act()) 7 | cont.set_style_base_dir(lv.BASE_DIR.RTL,0) 8 | cont.set_size(300, 220) 9 | cont.center() 10 | cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP) 11 | 12 | for i in range(20): 13 | obj = lv.obj(cont) 14 | obj.set_size(70, lv.SIZE.CONTENT) 15 | 16 | label = lv.label(obj) 17 | label.set_text(str(i)) 18 | label.center() 19 | 20 | -------------------------------------------------------------------------------- /lvgl/scripts/code-format.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import os 4 | 5 | print("Formatting src") 6 | os.system('astyle --options=code-format.cfg --recursive "../src/*.c,*.h"') 7 | 8 | print("\nFormatting demos") 9 | os.system('astyle --options=code-format.cfg --recursive "../demos/*.c,*.h"') 10 | 11 | print("\nFormatting examples") 12 | os.system('astyle --options=code-format.cfg --recursive "../examples/*.c,*.h"') 13 | 14 | print("\nFormatting tests") 15 | os.system('astyle --options=code-format.cfg --recursive "../tests/src/test_cases/*.c"') 16 | -------------------------------------------------------------------------------- /lvgl/tests/src/test_cases/test_mem.c: -------------------------------------------------------------------------------- 1 | #if LV_BUILD_TEST 2 | #include "../lvgl.h" 3 | 4 | #include "unity/unity.h" 5 | 6 | void setUp(void) 7 | { 8 | /* Function run before every test */ 9 | } 10 | 11 | void tearDown(void) 12 | { 13 | /* Function run after every test */ 14 | } 15 | 16 | /* #3324 */ 17 | void test_mem_buf_realloc(void) 18 | { 19 | #if LV_MEM_CUSTOM == 0 20 | void * buf1 = lv_mem_alloc(20); 21 | void * buf2 = lv_mem_realloc(buf1, LV_MEM_SIZE + 16384); 22 | TEST_ASSERT_NULL(buf2); 23 | #endif 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # Using the Size, Position and Padding style properties 3 | # 4 | style = lv.style_t() 5 | style.init() 6 | style.set_radius(5) 7 | 8 | # Make a gradient 9 | style.set_width(150) 10 | style.set_height(lv.SIZE.CONTENT) 11 | 12 | style.set_pad_ver(20) 13 | style.set_pad_left(5) 14 | 15 | style.set_x(lv.pct(50)) 16 | style.set_y(80) 17 | 18 | # Create an object with the new style 19 | obj = lv.obj(lv.scr_act()) 20 | obj.add_style(style, 0) 21 | 22 | label = lv.label(obj) 23 | label.set_text("Hello") 24 | 25 | -------------------------------------------------------------------------------- /lvgl/lvgl.mk: -------------------------------------------------------------------------------- 1 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/demos/lv_demos.mk 2 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/examples/lv_examples.mk 3 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core/lv_core.mk 4 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/lv_draw.mk 5 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/extra/lv_extra.mk 6 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/font/lv_font.mk 7 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/hal/lv_hal.mk 8 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/misc/lv_misc.mk 9 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/widgets/lv_widgets.mk 10 | -------------------------------------------------------------------------------- /lvgl/examples/others/monkey/lv_example_monkey_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_MONKEY && LV_BUILD_EXAMPLES 3 | 4 | void lv_example_monkey_1(void) 5 | { 6 | /*Create pointer monkey test*/ 7 | lv_monkey_config_t config; 8 | lv_monkey_config_init(&config); 9 | config.type = LV_INDEV_TYPE_POINTER; 10 | config.period_range.min = 10; 11 | config.period_range.max = 100; 12 | lv_monkey_t * monkey = lv_monkey_create(&config); 13 | 14 | /*Start monkey test*/ 15 | lv_monkey_set_enable(monkey, true); 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /lvgl/tests/src/test_cases/test_config.c: -------------------------------------------------------------------------------- 1 | #if LV_BUILD_TEST 2 | #include "../lvgl.h" 3 | 4 | #include "unity/unity.h" 5 | 6 | void test_config(void); 7 | 8 | void test_config(void) 9 | { 10 | TEST_ASSERT_EQUAL(130, LV_DPI_DEF); 11 | TEST_ASSERT_EQUAL(130, lv_disp_get_dpi(NULL)); 12 | TEST_ASSERT_EQUAL(800, LV_HOR_RES); 13 | TEST_ASSERT_EQUAL(800, lv_disp_get_hor_res(NULL)); 14 | TEST_ASSERT_EQUAL(480, LV_VER_RES); 15 | TEST_ASSERT_EQUAL(480, lv_disp_get_ver_res(NULL)); 16 | TEST_ASSERT_EQUAL(32, LV_COLOR_DEPTH); 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /lvgl/scripts/genexamplelist.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "/* Autogenerated */" 3 | echo '#include ' 4 | echo '#include "examplelist.h"' 5 | TMPFILE=$(mktemp) 6 | find examples demos -name \*.h | xargs grep -hE "^void lv_(example|demo)" | sed 's/(/ /g' | awk '{print $2}' > $TMPFILE 7 | cat $TMPFILE | while read -r line; do 8 | echo "extern void ${line}(void);" 9 | done 10 | echo "const struct lv_ci_example lv_ci_example_list[] = {" 11 | cat $TMPFILE | while read -r line; do 12 | echo " { \"$line\", $line },"; 13 | done 14 | echo " { NULL, NULL }" 15 | echo "};" 16 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/obj/lv_example_obj_2.py: -------------------------------------------------------------------------------- 1 | def drag_event_handler(e): 2 | 3 | obj = e.get_target() 4 | 5 | indev = lv.indev_get_act() 6 | 7 | vect = lv.point_t() 8 | indev.get_vect(vect) 9 | x = obj.get_x() + vect.x 10 | y = obj.get_y() + vect.y 11 | obj.set_pos(x, y) 12 | 13 | 14 | # 15 | # Make an object dragable. 16 | # 17 | 18 | obj = lv.obj(lv.scr_act()) 19 | obj.set_size(150, 100) 20 | obj.add_event_cb(drag_event_handler, lv.EVENT.PRESSING, None) 21 | 22 | label = lv.label(obj) 23 | label.set_text("Drag me") 24 | label.center() 25 | 26 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_4.py: -------------------------------------------------------------------------------- 1 | # 2 | # Using the outline style properties 3 | # 4 | 5 | style = lv.style_t() 6 | style.init() 7 | 8 | # Set a background color and a radius 9 | style.set_radius(5) 10 | style.set_bg_opa(lv.OPA.COVER) 11 | style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 1)) 12 | 13 | # Add outline 14 | style.set_outline_width(2) 15 | style.set_outline_color(lv.palette_main(lv.PALETTE.BLUE)) 16 | style.set_outline_pad(8) 17 | 18 | # Create an object with the new style 19 | obj = lv.obj(lv.scr_act()) 20 | obj.add_style(style, 0) 21 | obj.center() 22 | -------------------------------------------------------------------------------- /lvgl/examples/get_started/index.rst: -------------------------------------------------------------------------------- 1 | 2 | A button with a label and react on click event 3 | """"""""""""""""""""""""""""""""""""""""""""""""" 4 | 5 | .. lv_example:: get_started/lv_example_get_started_1 6 | :language: c 7 | 8 | Create styles from scratch for buttons 9 | """"""""""""""""""""""""""""""""""""""" 10 | .. lv_example:: get_started/lv_example_get_started_2 11 | :language: c 12 | 13 | Create a slider and write its value on a label 14 | """"""""""""""""""""""""""""""""""""""""""""""" 15 | .. lv_example:: get_started/lv_example_get_started_3 16 | :language: c 17 | 18 | 19 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/img/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Image from variable and symbol 3 | """"""""""""""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/img/lv_example_img_1 6 | :language: c 7 | 8 | 9 | Image recoloring 10 | """""""""""""""" 11 | 12 | .. lv_example:: widgets/img/lv_example_img_2 13 | :language: c 14 | 15 | 16 | Rotate and zoom 17 | """""""""""""""" 18 | 19 | .. lv_example:: widgets/img/lv_example_img_3 20 | :language: c 21 | 22 | Image offset and styling 23 | """""""""""""""""""""""" 24 | 25 | .. lv_example:: widgets/img/lv_example_img_4 26 | :language: c 27 | 28 | 29 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/led/lv_example_led_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # Create LED's with different brightness and color 3 | # 4 | 5 | # Create a LED and switch it OFF 6 | led1 = lv.led(lv.scr_act()) 7 | led1.align(lv.ALIGN.CENTER, -80, 0) 8 | led1.off() 9 | 10 | # Copy the previous LED and set a brightness 11 | led2 = lv.led(lv.scr_act()) 12 | led2.align(lv.ALIGN.CENTER, 0, 0) 13 | led2.set_brightness(150) 14 | led2.set_color(lv.palette_main(lv.PALETTE.RED)) 15 | 16 | # Copy the previous LED and switch it ON 17 | led3 = lv.led(lv.scr_act()) 18 | led3.align(lv.ALIGN.CENTER, 80, 0) 19 | led3.on() 20 | 21 | -------------------------------------------------------------------------------- /lvgl/src/widgets/lv_widgets.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_arc.c 2 | CSRCS += lv_bar.c 3 | CSRCS += lv_btn.c 4 | CSRCS += lv_btnmatrix.c 5 | CSRCS += lv_canvas.c 6 | CSRCS += lv_checkbox.c 7 | CSRCS += lv_dropdown.c 8 | CSRCS += lv_img.c 9 | CSRCS += lv_label.c 10 | CSRCS += lv_line.c 11 | CSRCS += lv_roller.c 12 | CSRCS += lv_slider.c 13 | CSRCS += lv_switch.c 14 | CSRCS += lv_table.c 15 | CSRCS += lv_textarea.c 16 | 17 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/widgets 18 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/widgets 19 | 20 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/widgets" 21 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_7.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES && LV_USE_ARC 3 | 4 | /** 5 | * Using the Arc style properties 6 | */ 7 | void lv_example_style_7(void) 8 | { 9 | static lv_style_t style; 10 | lv_style_init(&style); 11 | 12 | lv_style_set_arc_color(&style, lv_palette_main(LV_PALETTE_RED)); 13 | lv_style_set_arc_width(&style, 4); 14 | 15 | /*Create an object with the new style*/ 16 | lv_obj_t * obj = lv_arc_create(lv_scr_act()); 17 | lv_obj_add_style(obj, &style, 0); 18 | lv_obj_center(obj); 19 | } 20 | #endif 21 | 22 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/meter/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple meter 3 | """"""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/meter/lv_example_meter_1 6 | :language: c 7 | 8 | 9 | A meter with multiple arcs 10 | """"""""""""""""""""""""""" 11 | 12 | .. lv_example:: widgets/meter/lv_example_meter_2 13 | :language: c 14 | 15 | 16 | A clock from a meter 17 | """"""""""""""""""""""" 18 | 19 | .. lv_example:: widgets/meter/lv_example_meter_3 20 | :language: c 21 | 22 | 23 | Pie chart 24 | """"""""""""""""""""""" 25 | 26 | .. lv_example:: widgets/meter/lv_example_meter_4 27 | :language: c 28 | 29 | -------------------------------------------------------------------------------- /lvgl/src/core/lv_core.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_disp.c 2 | CSRCS += lv_group.c 3 | CSRCS += lv_indev.c 4 | CSRCS += lv_indev_scroll.c 5 | CSRCS += lv_obj.c 6 | CSRCS += lv_obj_class.c 7 | CSRCS += lv_obj_draw.c 8 | CSRCS += lv_obj_pos.c 9 | CSRCS += lv_obj_scroll.c 10 | CSRCS += lv_obj_style.c 11 | CSRCS += lv_obj_style_gen.c 12 | CSRCS += lv_obj_tree.c 13 | CSRCS += lv_event.c 14 | CSRCS += lv_refr.c 15 | CSRCS += lv_theme.c 16 | 17 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core 18 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core 19 | 20 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/core" 21 | -------------------------------------------------------------------------------- /lvgl/src/draw/sw/lv_draw_sw.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_draw_sw.c 2 | CSRCS += lv_draw_sw_arc.c 3 | CSRCS += lv_draw_sw_blend.c 4 | CSRCS += lv_draw_sw_dither.c 5 | CSRCS += lv_draw_sw_gradient.c 6 | CSRCS += lv_draw_sw_img.c 7 | CSRCS += lv_draw_sw_letter.c 8 | CSRCS += lv_draw_sw_line.c 9 | CSRCS += lv_draw_sw_polygon.c 10 | CSRCS += lv_draw_sw_rect.c 11 | CSRCS += lv_draw_sw_transform.c 12 | CSRCS += lv_draw_sw_layer.c 13 | 14 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw 15 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw 16 | 17 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw" 18 | -------------------------------------------------------------------------------- /lvgl/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.12.4) 2 | 3 | if(NOT ESP_PLATFORM) 4 | project(lvgl HOMEPAGE_URL https://github.com/lvgl/lvgl) 5 | endif() 6 | 7 | set(LVGL_ROOT_DIR ${CMAKE_CURRENT_LIST_DIR}) 8 | 9 | if(ESP_PLATFORM) 10 | include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/esp.cmake) 11 | elseif(ZEPHYR_BASE) 12 | include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/zephyr.cmake) 13 | elseif(MICROPY_DIR) 14 | include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/micropython.cmake) 15 | else() 16 | include(${CMAKE_CURRENT_LIST_DIR}/env_support/cmake/custom.cmake) 17 | endif() 18 | -------------------------------------------------------------------------------- /lvgl/library.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "lvgl", 3 | "version": "8.3.7", 4 | "keywords": "graphics, gui, embedded, tft, lvgl", 5 | "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.", 6 | "repository": { 7 | "type": "git", 8 | "url": "https://github.com/lvgl/lvgl.git" 9 | }, 10 | "build": { 11 | "includeDir": "." 12 | }, 13 | "license": "MIT", 14 | "homepage": "https://lvgl.io", 15 | "frameworks": "*", 16 | "platforms": "*" 17 | } 18 | -------------------------------------------------------------------------------- /lvgl/examples/others/gridnav/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Basic grid navigation 3 | """"""""""""""""""""" 4 | 5 | .. lv_example:: others/gridnav/lv_example_gridnav_1 6 | :language: c 7 | 8 | Grid navigation on a list 9 | """""""""""""""""""""""" 10 | 11 | .. lv_example:: others/gridnav/lv_example_gridnav_2 12 | :language: c 13 | 14 | Nested grid navigations 15 | """"""""""""""""""""""" 16 | 17 | .. lv_example:: others/gridnav/lv_example_gridnav_3 18 | :language: c 19 | 20 | Simple navigation on a list widget 21 | """"""""""""""""""""""" 22 | 23 | .. lv_example:: others/gridnav/lv_example_gridnav_4 24 | :language: c -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_5.py: -------------------------------------------------------------------------------- 1 | # 2 | # Using the Shadow style properties 3 | # 4 | 5 | style = lv.style_t() 6 | style.init() 7 | 8 | # Set a background color and a radius 9 | style.set_radius(5) 10 | style.set_bg_opa(lv.OPA.COVER) 11 | style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 1)) 12 | 13 | # Add a shadow 14 | style.set_shadow_width(8) 15 | style.set_shadow_color(lv.palette_main(lv.PALETTE.BLUE)) 16 | style.set_shadow_ofs_x(10) 17 | style.set_shadow_ofs_y(20) 18 | 19 | # Create an object with the new style 20 | obj = lv.obj(lv.scr_act()) 21 | obj.add_style(style, 0) 22 | obj.center() 23 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/img/lv_example_img_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_IMG && LV_BUILD_EXAMPLES 3 | 4 | 5 | void lv_example_img_1(void) 6 | { 7 | LV_IMG_DECLARE(img_cogwheel_argb); 8 | lv_obj_t * img1 = lv_img_create(lv_scr_act()); 9 | lv_img_set_src(img1, &img_cogwheel_argb); 10 | lv_obj_align(img1, LV_ALIGN_CENTER, 0, -20); 11 | lv_obj_set_size(img1, 200, 200); 12 | 13 | lv_obj_t * img2 = lv_img_create(lv_scr_act()); 14 | lv_img_set_src(img2, LV_SYMBOL_OK "Accept"); 15 | lv_obj_align_to(img2, img1, LV_ALIGN_OUT_BOTTOM_MID, 0, 20); 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /lvgl/tests/src/lv_test_helpers.h: -------------------------------------------------------------------------------- 1 | #ifndef LV_TEST_HELPERS_H 2 | #define LV_TEST_HELPERS_H 3 | 4 | #ifdef LVGL_CI_USING_SYS_HEAP 5 | /* Skip checking heap as we don't have the info available */ 6 | #define LV_HEAP_CHECK(x) do {} while(0) 7 | /* Pick a non-zero value */ 8 | #define lv_test_get_free_mem() (65536) 9 | #else 10 | #define LV_HEAP_CHECK(x) x 11 | 12 | static inline uint32_t lv_test_get_free_mem(void) 13 | { 14 | lv_mem_monitor_t m1; 15 | lv_mem_monitor(&m1); 16 | return m1.free_size; 17 | } 18 | #endif /* LVGL_CI_USING_SYS_HEAP */ 19 | 20 | 21 | #endif /*LV_TEST_HELPERS_H*/ 22 | 23 | 24 | -------------------------------------------------------------------------------- /lvgl/demos/stress/README.md: -------------------------------------------------------------------------------- 1 | # Stress demo 2 | 3 | ## Overview 4 | 5 | A stress test for LVGL. 6 | It contains a lot of object creation, deletion, animations, styles usage, and so on. It can be used if there is any memory corruption during heavy usage or any memory leaks. 7 | 8 | ![Stress demo with LVGL embedded GUI library](screenshot1.gif) 9 | 10 | ## Run the demo 11 | - In `lv_conf.h` or equivalent places set `LV_USE_DEMO_STRESS 1` 12 | - In `lv_conf.h` enable all the widgets (`LV_USE_BTN 1`) and the animations (`LV_USE_ANIMATION 1`) 13 | - After `lv_init()` and initializing the drivers call `lv_demo_stress()` 14 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_2.py: -------------------------------------------------------------------------------- 1 | # 2 | # Using the background style properties 3 | # 4 | style = lv.style_t() 5 | style.init() 6 | style.set_radius(5) 7 | 8 | # Make a gradient 9 | style.set_bg_opa(lv.OPA.COVER) 10 | style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 1)) 11 | style.set_bg_grad_color(lv.palette_main(lv.PALETTE.BLUE)) 12 | style.set_bg_grad_dir(lv.GRAD_DIR.VER) 13 | 14 | # Shift the gradient to the bottom 15 | style.set_bg_main_stop(128) 16 | style.set_bg_grad_stop(192) 17 | 18 | # Create an object with the new style 19 | obj = lv.obj(lv.scr_act()) 20 | obj.add_style(style, 0) 21 | obj.center() 22 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex_3.py: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate flex grow. 3 | # 4 | 5 | cont = lv.obj(lv.scr_act()) 6 | cont.set_size(300, 220) 7 | cont.center() 8 | cont.set_flex_flow(lv.FLEX_FLOW.ROW) 9 | 10 | obj = lv.obj(cont) 11 | obj.set_size(40, 40) # Fix size 12 | 13 | obj = lv.obj(cont) 14 | obj.set_height(40) 15 | obj.set_flex_grow(1) # 1 portion from the free space 16 | 17 | obj = lv.obj(cont) 18 | obj.set_height(40) 19 | obj.set_flex_grow(2) # 2 portion from the free space 20 | 21 | obj = lv.obj(cont) 22 | obj.set_size(40, 40) # Fix size. It is flushed to the right by the "grow" items 23 | 24 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex_2.py: -------------------------------------------------------------------------------- 1 | # 2 | # Arrange items in rows with wrap and place the items to get even space around them. 3 | # 4 | style = lv.style_t() 5 | style.init() 6 | style.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP) 7 | style.set_flex_main_place(lv.FLEX_ALIGN.SPACE_EVENLY) 8 | style.set_layout(lv.LAYOUT_FLEX.value) 9 | 10 | cont = lv.obj(lv.scr_act()) 11 | cont.set_size(300, 220) 12 | cont.center() 13 | cont.add_style(style, 0) 14 | 15 | for i in range(8): 16 | obj = lv.obj(cont) 17 | obj.set_size(70, lv.SIZE.CONTENT) 18 | 19 | label = lv.label(obj) 20 | label.set_text("{:d}".format(i)) 21 | label.center() 22 | 23 | -------------------------------------------------------------------------------- /lvgl/examples/libs/bmp/lv_example_bmp_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_BMP && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Open a BMP file from a file 6 | */ 7 | void lv_example_bmp_1(void) 8 | { 9 | lv_obj_t * img = lv_img_create(lv_scr_act()); 10 | /* Assuming a File system is attached to letter 'A' 11 | * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ 12 | #if LV_COLOR_DEPTH == 32 13 | lv_img_set_src(img, "A:lvgl/examples/libs/bmp/example_32bit.bmp"); 14 | #elif LV_COLOR_DEPTH == 16 15 | lv_img_set_src(img, "A:lvgl/examples/libs/bmp/example_16bit.bmp"); 16 | #endif 17 | lv_obj_center(img); 18 | 19 | } 20 | 21 | #endif 22 | -------------------------------------------------------------------------------- /lvgl/examples/libs/freetype/lv_example_freetype_1.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | import lvgl as lv 3 | import display_driver 4 | import fs_driver 5 | 6 | info = lv.ft_info_t() 7 | info.name ="./Lato-Regular.ttf" 8 | info.weight = 24 9 | info.style = lv.FT_FONT_STYLE.NORMAL 10 | info.font_init() 11 | 12 | # Create style with the new font 13 | style = lv.style_t() 14 | style.init() 15 | style.set_text_font(info.font) 16 | style.set_text_align(lv.TEXT_ALIGN.CENTER) 17 | 18 | # Create a label with the new style 19 | label = lv.label(lv.scr_act()) 20 | label.add_style(style, 0) 21 | label.set_text("Hello world\nI'm a font created with FreeType") 22 | label.center() 23 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_3.py: -------------------------------------------------------------------------------- 1 | # 2 | # Using the border style properties 3 | # 4 | style = lv.style_t() 5 | style.init() 6 | 7 | # Set a background color and a radius 8 | style.set_radius(10) 9 | style.set_bg_opa(lv.OPA.COVER) 10 | style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 1)) 11 | 12 | # Add border to the bottom+right 13 | style.set_border_color(lv.palette_main(lv.PALETTE.BLUE)) 14 | style.set_border_width(5) 15 | style.set_border_opa(lv.OPA._50) 16 | style.set_border_side(lv.BORDER_SIDE.BOTTOM | lv.BORDER_SIDE.RIGHT) 17 | 18 | # Create an object with the new style 19 | obj = lv.obj(lv.scr_act()) 20 | obj.add_style(style, 0) 21 | obj.center() 22 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/msgbox/lv_example_msgbox_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_MSGBOX && LV_BUILD_EXAMPLES 3 | 4 | static void event_cb(lv_event_t * e) 5 | { 6 | lv_obj_t * obj = lv_event_get_current_target(e); 7 | LV_LOG_USER("Button %s clicked", lv_msgbox_get_active_btn_text(obj)); 8 | } 9 | 10 | void lv_example_msgbox_1(void) 11 | { 12 | static const char * btns[] = {"Apply", "Close", ""}; 13 | 14 | lv_obj_t * mbox1 = lv_msgbox_create(NULL, "Hello", "This is a message box with two buttons.", btns, true); 15 | lv_obj_add_event_cb(mbox1, event_cb, LV_EVENT_VALUE_CHANGED, NULL); 16 | lv_obj_center(mbox1); 17 | } 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /lvgl/src/draw/sdl/lv_draw_sdl.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_draw_sdl.c 2 | CSRCS += lv_draw_sdl_arc.c 3 | CSRCS += lv_draw_sdl_bg.c 4 | CSRCS += lv_draw_sdl_composite.c 5 | CSRCS += lv_draw_sdl_img.c 6 | CSRCS += lv_draw_sdl_label.c 7 | CSRCS += lv_draw_sdl_line.c 8 | CSRCS += lv_draw_sdl_mask.c 9 | CSRCS += lv_draw_sdl_polygon.c 10 | CSRCS += lv_draw_sdl_rect.c 11 | CSRCS += lv_draw_sdl_stack_blur.c 12 | CSRCS += lv_draw_sdl_texture_cache.c 13 | CSRCS += lv_draw_sdl_utils.c 14 | CSRCS += lv_draw_sdl_layer.c 15 | 16 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sdl 17 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sdl 18 | 19 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sdl" 20 | -------------------------------------------------------------------------------- /lvgl/demos/keypad_encoder/README.md: -------------------------------------------------------------------------------- 1 | # Keypad and Encoder demo 2 | 3 | ## Overview 4 | 5 | LVGL allows you to control the widgets with keypad and/or encoder without touchpad. 6 | This demo shows how to handle buttons, drop-down lists, rollers, sliders, switches and text inputs without touchpad. 7 | Learn more about the touchpad-less usage of LVGL [here](https://docs.lvgl.io/master/overview/indev.html#keypad-and-encoder). 8 | 9 | ![Keypad and encoder navigation in LVGL embedded GUI library](screenshot1.gif) 10 | 11 | ## Run the demo 12 | - In `lv_conf.h` or equivalent places set `LV_USE_DEMO_KEYPAD_AND_ENCODER 1` 13 | - After `lv_init()` and initializing the drivers call `lv_demo_keypad_encoder()` 14 | -------------------------------------------------------------------------------- /lvgl/examples/event/lv_example_event_1.py: -------------------------------------------------------------------------------- 1 | class Event_1(): 2 | def __init__(self): 3 | self.cnt = 1 4 | # 5 | # Add click event to a button 6 | # 7 | 8 | btn = lv.btn(lv.scr_act()) 9 | btn.set_size(100, 50) 10 | btn.center() 11 | btn.add_event_cb(self.event_cb, lv.EVENT.CLICKED, None) 12 | 13 | label = lv.label(btn) 14 | label.set_text("Click me!") 15 | label.center() 16 | 17 | def event_cb(self,e): 18 | print("Clicked") 19 | 20 | btn = e.get_target() 21 | label = btn.get_child(0) 22 | label.set_text(str(self.cnt)) 23 | self.cnt += 1 24 | 25 | evt1 = Event_1() 26 | -------------------------------------------------------------------------------- /lvgl/examples/libs/ffmpeg/lv_example_ffmpeg_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | #if LV_USE_FFMPEG 4 | 5 | 6 | /** 7 | * Open an image from a file 8 | */ 9 | void lv_example_ffmpeg_1(void) 10 | { 11 | lv_obj_t * img = lv_img_create(lv_scr_act()); 12 | lv_img_set_src(img, "./lvgl/examples/libs/ffmpeg/ffmpeg.png"); 13 | lv_obj_center(img); 14 | } 15 | 16 | #else 17 | 18 | void lv_example_ffmpeg_1(void) 19 | { 20 | /*TODO 21 | *fallback for online examples*/ 22 | 23 | lv_obj_t * label = lv_label_create(lv_scr_act()); 24 | lv_label_set_text(label, "FFmpeg is not installed"); 25 | lv_obj_center(label); 26 | } 27 | 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/line/lv_example_line_1.py: -------------------------------------------------------------------------------- 1 | # Create an array for the points of the line 2 | line_points = [ {"x":5, "y":5}, 3 | {"x":70, "y":70}, 4 | {"x":120, "y":10}, 5 | {"x":180, "y":60}, 6 | {"x":240, "y":10}] 7 | 8 | # Create style 9 | style_line = lv.style_t() 10 | style_line.init() 11 | style_line.set_line_width(8) 12 | style_line.set_line_color(lv.palette_main(lv.PALETTE.BLUE)) 13 | style_line.set_line_rounded(True) 14 | 15 | # Create a line and apply the new style 16 | line1 = lv.line(lv.scr_act()) 17 | line1.set_points(line_points, 5) # Set the points 18 | line1.add_style(style_line, 0) 19 | line1.center() 20 | 21 | -------------------------------------------------------------------------------- /lvgl/src/misc/lv_templ.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_templ.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEMPL_H 7 | #define LV_TEMPL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | #ifdef __cplusplus 34 | } /*extern "C"*/ 35 | #endif 36 | 37 | #endif /*LV_TEMPL_H*/ 38 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/slider/lv_example_slider_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # A default slider with a label displaying the current value 3 | # 4 | def slider_event_cb(e): 5 | 6 | slider = e.get_target() 7 | slider_label.set_text("{:d}%".format(slider.get_value())) 8 | slider_label.align_to(slider, lv.ALIGN.OUT_BOTTOM_MID, 0, 10) 9 | 10 | # Create a slider in the center of the display 11 | slider = lv.slider(lv.scr_act()) 12 | slider.center() 13 | slider.add_event_cb(slider_event_cb, lv.EVENT.VALUE_CHANGED, None) 14 | 15 | # Create a label below the slider 16 | slider_label = lv.label(lv.scr_act()) 17 | slider_label.set_text("0%") 18 | 19 | slider_label.align_to(slider, lv.ALIGN.OUT_BOTTOM_MID, 0, 10) 20 | 21 | -------------------------------------------------------------------------------- /lvgl/src/misc/lv_misc.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_anim.c 2 | CSRCS += lv_anim_timeline.c 3 | CSRCS += lv_area.c 4 | CSRCS += lv_async.c 5 | CSRCS += lv_bidi.c 6 | CSRCS += lv_color.c 7 | CSRCS += lv_fs.c 8 | CSRCS += lv_gc.c 9 | CSRCS += lv_ll.c 10 | CSRCS += lv_log.c 11 | CSRCS += lv_lru.c 12 | CSRCS += lv_math.c 13 | CSRCS += lv_mem.c 14 | CSRCS += lv_printf.c 15 | CSRCS += lv_style.c 16 | CSRCS += lv_style_gen.c 17 | CSRCS += lv_timer.c 18 | CSRCS += lv_tlsf.c 19 | CSRCS += lv_txt.c 20 | CSRCS += lv_txt_ap.c 21 | CSRCS += lv_utils.c 22 | 23 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/misc 24 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/misc 25 | 26 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/misc" 27 | -------------------------------------------------------------------------------- /lvgl/scripts/changelog_gen.sh: -------------------------------------------------------------------------------- 1 | # Generate CHANGELOG_LAST.md from changes since the last version tag. (vx.y.z-dev tags are ignored) 2 | # CHANGELOG_LAST.md can be edited manually if required and manually added to docs/CHANGELOG.md 3 | # 4 | # Requirements: 5 | # npm install -g auto-changelog 6 | # 7 | # Usage: 8 | # changelog-gen 9 | # 10 | # Example: if the latest verision is v5.6.7 the followings can be used for bugfix, minor or major versions: 11 | # changelog-gen v5.6.8 12 | # changelog-gen v5.7.0 13 | # changelog-gen v6.0.0 14 | 15 | auto-changelog -t changelog-template.hbs -l false --latest-version $1 --unreleased-only --tag-pattern ^v[0-9]+.[0-9]+.[0-9]+$ -o CHANGELOG_LAST.md 16 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/animimg/lv_example_animimg_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_ANIMIMG && LV_BUILD_EXAMPLES 3 | LV_IMG_DECLARE(animimg001) 4 | LV_IMG_DECLARE(animimg002) 5 | LV_IMG_DECLARE(animimg003) 6 | 7 | static const lv_img_dsc_t * anim_imgs[3] = { 8 | &animimg001, 9 | &animimg002, 10 | &animimg003, 11 | }; 12 | 13 | void lv_example_animimg_1(void) 14 | { 15 | lv_obj_t * animimg0 = lv_animimg_create(lv_scr_act()); 16 | lv_obj_center(animimg0); 17 | lv_animimg_set_src(animimg0, (const void **) anim_imgs, 3); 18 | lv_animimg_set_duration(animimg0, 1000); 19 | lv_animimg_set_repeat_count(animimg0, LV_ANIM_REPEAT_INFINITE); 20 | lv_animimg_start(animimg0); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /lvgl/examples/libs/gif/lv_example_gif_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_GIF && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Open a GIF image from a file and a variable 6 | */ 7 | void lv_example_gif_1(void) 8 | { 9 | LV_IMG_DECLARE(img_bulb_gif); 10 | lv_obj_t * img; 11 | 12 | img = lv_gif_create(lv_scr_act()); 13 | lv_gif_set_src(img, &img_bulb_gif); 14 | lv_obj_align(img, LV_ALIGN_LEFT_MID, 20, 0); 15 | 16 | img = lv_gif_create(lv_scr_act()); 17 | /* Assuming a File system is attached to letter 'A' 18 | * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ 19 | lv_gif_set_src(img, "A:lvgl/examples/libs/gif/bulb.gif"); 20 | lv_obj_align(img, LV_ALIGN_RIGHT_MID, -20, 0); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/bar/lv_example_bar_5.py: -------------------------------------------------------------------------------- 1 | # 2 | # Bar with LTR and RTL base direction 3 | # 4 | 5 | bar_ltr = lv.bar(lv.scr_act()) 6 | bar_ltr.set_size(200, 20) 7 | bar_ltr.set_value(70, lv.ANIM.OFF) 8 | bar_ltr.align(lv.ALIGN.CENTER, 0, -30) 9 | 10 | label = lv.label(lv.scr_act()) 11 | label.set_text("Left to Right base direction") 12 | label.align_to(bar_ltr, lv.ALIGN.OUT_TOP_MID, 0, -5) 13 | 14 | bar_rtl = lv.bar(lv.scr_act()) 15 | bar_rtl.set_style_base_dir(lv.BASE_DIR.RTL,0) 16 | bar_rtl.set_size(200, 20) 17 | bar_rtl.set_value(70, lv.ANIM.OFF) 18 | bar_rtl.align(lv.ALIGN.CENTER, 0, 30) 19 | 20 | label = lv.label(lv.scr_act()) 21 | label.set_text("Right to Left base direction") 22 | label.align_to(bar_rtl, lv.ALIGN.OUT_TOP_MID, 0, -5) 23 | -------------------------------------------------------------------------------- /lvgl/examples/libs/png/lv_example_png_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_PNG && LV_USE_IMG && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Open a PNG image from a file and a variable 6 | */ 7 | void lv_example_png_1(void) 8 | { 9 | LV_IMG_DECLARE(img_wink_png); 10 | lv_obj_t * img; 11 | 12 | img = lv_img_create(lv_scr_act()); 13 | lv_img_set_src(img, &img_wink_png); 14 | lv_obj_align(img, LV_ALIGN_LEFT_MID, 20, 0); 15 | 16 | img = lv_img_create(lv_scr_act()); 17 | /* Assuming a File system is attached to letter 'A' 18 | * E.g. set LV_USE_FS_STDIO 'A' in lv_conf.h */ 19 | lv_img_set_src(img, "A:lvgl/examples/libs/png/wink.png"); 20 | lv_obj_align(img, LV_ALIGN_RIGHT_MID, -20, 0); 21 | } 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex_4.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_FLEX && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Reverse the order of flex items 6 | */ 7 | void lv_example_flex_4(void) 8 | { 9 | 10 | lv_obj_t * cont = lv_obj_create(lv_scr_act()); 11 | lv_obj_set_size(cont, 300, 220); 12 | lv_obj_center(cont); 13 | lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_COLUMN_REVERSE); 14 | 15 | uint32_t i; 16 | for(i = 0; i < 6; i++) { 17 | lv_obj_t * obj = lv_obj_create(cont); 18 | lv_obj_set_size(obj, 100, 50); 19 | 20 | lv_obj_t * label = lv_label_create(obj); 21 | lv_label_set_text_fmt(label, "Item: %"LV_PRIu32, i); 22 | lv_obj_center(label); 23 | } 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/menu/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Simple Menu 3 | """""""""""""""" 4 | 5 | .. lv_example:: widgets/menu/lv_example_menu_1 6 | :language: c 7 | 8 | Simple Menu with root btn 9 | """""""""""""""""""""""""""" 10 | 11 | .. lv_example:: widgets/menu/lv_example_menu_2 12 | :language: c 13 | 14 | Simple Menu with custom header 15 | """""""""""""""""""""""""""" 16 | 17 | .. lv_example:: widgets/menu/lv_example_menu_3 18 | :language: c 19 | 20 | Simple Menu with floating btn to add new menu page 21 | """""""""""""""""""""""""""" 22 | 23 | .. lv_example:: widgets/menu/lv_example_menu_4 24 | :language: c 25 | 26 | Complex Menu 27 | """""""""""""""""""""""""""" 28 | 29 | .. lv_example:: widgets/menu/lv_example_menu_5 30 | :language: c 31 | 32 | -------------------------------------------------------------------------------- /lvgl/tests/src/test_files/readtest.txt: -------------------------------------------------------------------------------- 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sed maximus orci. Morbi massa nisi, varius eu convallis ac, venenatis at metus. In in nibh id urna pretium feugiat vitae eu libero. Ut eget fringilla eros. Nunc ullamcorper lectus mauris, vel rhoncus velit volutpat et. Phasellus sed molestie massa. Maecenas quis dui sollicitudin, vulputate nunc ut, dictum quam. Nam a congue lorem. Nulla non facilisis sapien. Ut luctus nulla nibh, sed finibus urna porta non. Duis aliquet augue id urna euismod auctor. Integer pellentesque vulputate enim non mattis. Donec finibus mattis dolor, et feugiat nisi pharetra porta. Mauris ullamcorper cursus magna. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. -------------------------------------------------------------------------------- /lvgl/examples/libs/rlottie/lv_example_rlottie_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | #if LV_USE_RLOTTIE 4 | 5 | /** 6 | * Load an lottie animation from flash 7 | */ 8 | void lv_example_rlottie_1(void) 9 | { 10 | extern const uint8_t lv_example_rlottie_approve[]; 11 | lv_obj_t * lottie = lv_rlottie_create_from_raw(lv_scr_act(), 100, 100, (const void *)lv_example_rlottie_approve); 12 | lv_obj_center(lottie); 13 | } 14 | 15 | #else 16 | void lv_example_rlottie_1(void) 17 | { 18 | /*TODO 19 | *fallback for online examples*/ 20 | 21 | lv_obj_t * label = lv_label_create(lv_scr_act()); 22 | lv_label_set_text(label, "Rlottie is not installed"); 23 | lv_obj_center(label); 24 | } 25 | 26 | #endif 27 | #endif 28 | -------------------------------------------------------------------------------- /lvgl/examples/scroll/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Nested scrolling 3 | """""""""""""""" 4 | 5 | .. lv_example:: scroll/lv_example_scroll_1 6 | :language: c 7 | 8 | Snapping 9 | """""""""""""""" 10 | .. lv_example:: scroll/lv_example_scroll_2 11 | :language: c 12 | 13 | Floating button 14 | """""""""""""""" 15 | .. lv_example:: scroll/lv_example_scroll_3 16 | :language: c 17 | 18 | Styling the scrollbars 19 | """""""""""""""""""""""" 20 | .. lv_example:: scroll/lv_example_scroll_4 21 | :language: c 22 | 23 | Right to left scrolling 24 | """""""""""""""""""""""" 25 | .. lv_example:: scroll/lv_example_scroll_5 26 | :language: c 27 | 28 | Translate on scroll 29 | """""""""""""""""""""""" 30 | .. lv_example:: scroll/lv_example_scroll_6 31 | :language: c 32 | 33 | 34 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_8.py: -------------------------------------------------------------------------------- 1 | # 2 | # Using the text style properties 3 | # 4 | 5 | style = lv.style_t() 6 | style.init() 7 | 8 | style.set_radius(5) 9 | style.set_bg_opa(lv.OPA.COVER) 10 | style.set_bg_color(lv.palette_lighten(lv.PALETTE.GREY, 3)) 11 | style.set_border_width(2) 12 | style.set_border_color(lv.palette_main(lv.PALETTE.BLUE)) 13 | style.set_pad_all(10) 14 | 15 | style.set_text_color(lv.palette_main(lv.PALETTE.BLUE)) 16 | style.set_text_letter_space(5) 17 | style.set_text_line_space(20) 18 | style.set_text_decor(lv.TEXT_DECOR.UNDERLINE) 19 | 20 | # Create an object with the new style 21 | obj = lv.label(lv.scr_act()) 22 | obj.add_style(style, 0) 23 | obj.set_text("Text of\n" 24 | "a label") 25 | 26 | obj.center() 27 | 28 | -------------------------------------------------------------------------------- /lvgl/examples/libs/bmp/lv_example_bmp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_bmp.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_BMP_H 7 | #define LV_EXAMPLE_BMP_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_bmp_1(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EXAMPLE_BMP_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/examples/libs/gif/lv_example_gif.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_gif.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_GIF_H 7 | #define LV_EXAMPLE_GIF_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_gif_1(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EXAMPLE_GIF_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/examples/libs/png/lv_example_png.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_png.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_PNG_H 7 | #define LV_EXAMPLE_PNG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_png_1(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EXAMPLE_PNG_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_12.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES && LV_USE_IMG 3 | 4 | /** 5 | * Local styles 6 | */ 7 | void lv_example_style_12(void) 8 | { 9 | static lv_style_t style; 10 | lv_style_init(&style); 11 | lv_style_set_bg_color(&style, lv_palette_main(LV_PALETTE_GREEN)); 12 | lv_style_set_border_color(&style, lv_palette_lighten(LV_PALETTE_GREEN, 3)); 13 | lv_style_set_border_width(&style, 3); 14 | 15 | lv_obj_t * obj = lv_obj_create(lv_scr_act()); 16 | lv_obj_add_style(obj, &style, 0); 17 | 18 | /*Overwrite the background color locally*/ 19 | lv_obj_set_style_bg_color(obj, lv_palette_main(LV_PALETTE_ORANGE), LV_PART_MAIN); 20 | 21 | lv_obj_center(obj); 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_9.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES && LV_USE_LINE 3 | 4 | /** 5 | * Using the line style properties 6 | */ 7 | void lv_example_style_9(void) 8 | { 9 | static lv_style_t style; 10 | lv_style_init(&style); 11 | 12 | lv_style_set_line_color(&style, lv_palette_main(LV_PALETTE_GREY)); 13 | lv_style_set_line_width(&style, 6); 14 | lv_style_set_line_rounded(&style, true); 15 | 16 | /*Create an object with the new style*/ 17 | lv_obj_t * obj = lv_line_create(lv_scr_act()); 18 | lv_obj_add_style(obj, &style, 0); 19 | 20 | static lv_point_t p[] = {{10, 30}, {30, 50}, {100, 0}}; 21 | lv_line_set_points(obj, p, 3); 22 | 23 | lv_obj_center(obj); 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /lvgl/docs/others/imgfont.md: -------------------------------------------------------------------------------- 1 | # Image font (imgfont) 2 | Draw image in label or span obj with imgfont. 3 | This is often used to display Unicode emoji icons in text. 4 | Supported image formats: determined by LVGL image decoder. 5 | 6 | ## Usage 7 | Enable `LV_USE_IMGFONT` in `lv_conf.h`. 8 | 9 | To create a new imgfont use `lv_imgfont_create(height, path_cb)`. 10 | 11 | `height` used to indicate the size of a imgfont. 12 | `path_cb` Used to get the image path of the specified unicode. 13 | 14 | Use `lv_imgfont_destroy(imgfont)` to destroy a imgfont that is no longer used. 15 | 16 | ## Example 17 | ```eval_rst 18 | .. include:: ../../examples/others/imgfont/index.rst 19 | ``` 20 | 21 | ## API 22 | ```eval_rst 23 | .. doxygenfile:: lv_imgfont.h 24 | :project: lvgl 25 | ``` 26 | -------------------------------------------------------------------------------- /lvgl/examples/libs/sjpg/lv_example_sjpg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_sjpg.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_SJPG_H 7 | #define LV_EXAMPLE_SJPG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_sjpg_1(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EXAMPLE_SJPG_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/menu/lv_example_menu_1.py: -------------------------------------------------------------------------------- 1 | # Create a menu object 2 | menu = lv.menu(lv.scr_act()) 3 | menu.set_size(320, 240) 4 | menu.center() 5 | 6 | # Create a sub page 7 | sub_page = lv.menu_page(menu, None) 8 | cont = lv.menu_cont(sub_page) 9 | label = lv.label(cont) 10 | label.set_text("Hello, I am hiding here") 11 | 12 | # Create a main page 13 | main_page = lv.menu_page(menu, None) 14 | 15 | cont = lv.menu_cont(main_page) 16 | label = lv.label(cont) 17 | label.set_text("Item 1") 18 | 19 | cont = lv.menu_cont(main_page) 20 | label = lv.label(cont) 21 | label.set_text("Item 2") 22 | 23 | cont = lv.menu_cont(main_page) 24 | label = lv.label(cont) 25 | label.set_text("Item 3 (Click me!)") 26 | menu.set_load_page_event(cont, sub_page) 27 | 28 | menu.set_page(main_page) -------------------------------------------------------------------------------- /lvgl/examples/widgets/obj/lv_example_obj_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | 4 | void lv_example_obj_1(void) 5 | { 6 | lv_obj_t * obj1; 7 | obj1 = lv_obj_create(lv_scr_act()); 8 | lv_obj_set_size(obj1, 100, 50); 9 | lv_obj_align(obj1, LV_ALIGN_CENTER, -60, -30); 10 | 11 | static lv_style_t style_shadow; 12 | lv_style_init(&style_shadow); 13 | lv_style_set_shadow_width(&style_shadow, 10); 14 | lv_style_set_shadow_spread(&style_shadow, 5); 15 | lv_style_set_shadow_color(&style_shadow, lv_palette_main(LV_PALETTE_BLUE)); 16 | 17 | lv_obj_t * obj2; 18 | obj2 = lv_obj_create(lv_scr_act()); 19 | lv_obj_add_style(obj2, &style_shadow, 0); 20 | lv_obj_align(obj2, LV_ALIGN_CENTER, 60, 30); 21 | } 22 | #endif 23 | -------------------------------------------------------------------------------- /lvgl/examples/libs/qrcode/lv_example_qrcode.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_qrcode.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_QRCODE_H 7 | #define LV_EXAMPLE_QRCODE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_qrcode_1(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EXAMPLE_QRCODE_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/src/lvgl.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lvgl.h 3 | * This file exists only to be compatible with Arduino's library structure 4 | */ 5 | 6 | #ifndef LVGL_SRC_H 7 | #define LVGL_SRC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "../lvgl.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LVGL_SRC_H*/ 40 | -------------------------------------------------------------------------------- /lvgl/examples/others/snapshot/lv_example_snapshot.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_snapshot.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EX_SNAPSHOT_H 7 | #define LV_EX_SNAPSHOT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_snapshot_1(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EX_GET_STARTED_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/src/extra/libs/sjpg/lv_sjpg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_sjpg.h 3 | * 4 | */ 5 | 6 | #ifndef LV_SJPEG_H 7 | #define LV_SJPEG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #if LV_USE_SJPG 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | void lv_split_jpeg_init(void); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #endif /*LV_USE_SJPG*/ 38 | 39 | #ifdef __cplusplus 40 | } 41 | #endif 42 | 43 | #endif /* LV_SJPEG_H */ 44 | -------------------------------------------------------------------------------- /lvgl/examples/others/imgfont/lv_example_imgfont.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_imgfont.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_IMGFONT_H 7 | #define LV_EXAMPLE_IMGFONT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_imgfont_1(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EXAMPLE_IMGFONT_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/demos/widgets/lv_demo_widgets.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_widgets.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_WIDGETS_H 7 | #define LV_DEMO_WIDGETS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_demos.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | void lv_demo_widgets(void); 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /* extern "C" */ 37 | #endif 38 | 39 | #endif /*LV_DEMO_WIDGETS_H*/ 40 | -------------------------------------------------------------------------------- /lvgl/examples/libs/freetype/lv_example_freetype.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_freetype.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_FREETYPE_H 7 | #define LV_EXAMPLE_FREETYPE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_freetype_1(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EXAMPLE_FREETYPE_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/examples/libs/gif/lv_example_gif_1.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | import lvgl as lv 3 | import display_driver 4 | import fs_driver 5 | from img_bulb_gif import img_bulb_gif_map 6 | 7 | fs_drv = lv.fs_drv_t() 8 | fs_driver.fs_register(fs_drv, 'S') 9 | # 10 | # Open a GIF image from a file and a variable 11 | # 12 | img_bulb_gif = lv.img_dsc_t( 13 | { 14 | "header": {"always_zero": 0, "w": 0, "h": 0, "cf": lv.img.CF.RAW}, 15 | "data_size": 0, 16 | "data": img_bulb_gif_map, 17 | } 18 | ) 19 | img1 = lv.gif(lv.scr_act()) 20 | img1.set_src(img_bulb_gif) 21 | img1.align(lv.ALIGN.RIGHT_MID, -150, 0) 22 | 23 | img2 = lv.gif(lv.scr_act()) 24 | # The File system is attached to letter 'S' 25 | 26 | img2.set_src("S:bulb.gif") 27 | img2.align(lv.ALIGN.RIGHT_MID, -250, 0) 28 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/dropdown/lv_example_dropdown_1.py: -------------------------------------------------------------------------------- 1 | def event_handler(e): 2 | code = e.get_code() 3 | obj = e.get_target() 4 | if code == lv.EVENT.VALUE_CHANGED: 5 | option = " "*10 # should be large enough to store the option 6 | obj.get_selected_str(option, len(option)) 7 | # .strip() removes trailing spaces 8 | print("Option: \"%s\"" % option.strip()) 9 | 10 | # Create a normal drop down list 11 | dd = lv.dropdown(lv.scr_act()) 12 | dd.set_options("\n".join([ 13 | "Apple", 14 | "Banana", 15 | "Orange", 16 | "Cherry", 17 | "Grape", 18 | "Raspberry", 19 | "Melon", 20 | "Orange", 21 | "Lemon", 22 | "Nuts"])) 23 | 24 | dd.align(lv.ALIGN.TOP_MID, 0, 20) 25 | dd.add_event_cb(event_handler, lv.EVENT.ALL, None) 26 | 27 | -------------------------------------------------------------------------------- /lvgl/examples/scroll/lv_example_scroll_5.py: -------------------------------------------------------------------------------- 1 | # 2 | # Scrolling with Right To Left base direction 3 | # 4 | obj = lv.obj(lv.scr_act()) 5 | obj.set_style_base_dir(lv.BASE_DIR.RTL, 0) 6 | obj.set_size(200, 100) 7 | obj.center() 8 | 9 | label = lv.label(obj) 10 | label.set_text("میکروکُنترولر (به انگلیسی: Microcontroller) گونه‌ای ریزپردازنده است که دارای حافظهٔ دسترسی تصادفی (RAM) و حافظهٔ فقط‌خواندنی (ROM)، تایمر، پورت‌های ورودی و خروجی (I/O) و درگاه ترتیبی (Serial Port پورت سریال)، درون خود تراشه است، و می‌تواند به تنهایی ابزارهای دیگر را کنترل کند. به عبارت دیگر یک میکروکنترلر، مدار مجتمع کوچکی است که از یک CPU کوچک و اجزای دیگری مانند تایمر، درگاه‌های ورودی و خروجی آنالوگ و دیجیتال و حافظه تشکیل شده‌است.") 11 | label.set_width(400) 12 | label.set_style_text_font(lv.font_dejavu_16_persian_hebrew, 0) 13 | 14 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_13.py: -------------------------------------------------------------------------------- 1 | # 2 | # Add styles to parts and states 3 | # 4 | 5 | style_indic = lv.style_t() 6 | style_indic.init() 7 | style_indic.set_bg_color(lv.palette_lighten(lv.PALETTE.RED, 3)) 8 | style_indic.set_bg_grad_color(lv.palette_main(lv.PALETTE.RED)) 9 | style_indic.set_bg_grad_dir(lv.GRAD_DIR.HOR) 10 | 11 | style_indic_pr = lv.style_t() 12 | style_indic_pr.init() 13 | style_indic_pr.set_shadow_color(lv.palette_main(lv.PALETTE.RED)) 14 | style_indic_pr.set_shadow_width(10) 15 | style_indic_pr.set_shadow_spread(3) 16 | 17 | # Create an object with the new style_pr 18 | obj = lv.slider(lv.scr_act()) 19 | obj.add_style(style_indic, lv.PART.INDICATOR) 20 | obj.add_style(style_indic_pr, lv.PART.INDICATOR | lv.STATE.PRESSED) 21 | obj.set_value(70, lv.ANIM.OFF) 22 | obj.center() 23 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/tabview/lv_example_tabview_1.py: -------------------------------------------------------------------------------- 1 | # Create a Tab view object 2 | tabview = lv.tabview(lv.scr_act(), lv.DIR.TOP, 50) 3 | 4 | # Add 3 tabs (the tabs are page (lv_page) and can be scrolled 5 | tab1 = tabview.add_tab("Tab 1") 6 | tab2 = tabview.add_tab("Tab 2") 7 | tab3 = tabview.add_tab("Tab 3") 8 | 9 | # Add content to the tabs 10 | label = lv.label(tab1) 11 | label.set_text("""This the first tab 12 | 13 | If the content 14 | of a tab 15 | becomes too 16 | longer 17 | than the 18 | container 19 | then it 20 | automatically 21 | becomes 22 | scrollable. 23 | 24 | 25 | 26 | Can you see it?""") 27 | 28 | label = lv.label(tab2) 29 | label.set_text("Second tab") 30 | 31 | label = lv.label(tab3) 32 | label.set_text("Third tab"); 33 | 34 | label.scroll_to_view_recursive(lv.ANIM.ON) 35 | 36 | -------------------------------------------------------------------------------- /lvgl/examples/libs/qrcode/lv_example_qrcode_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_QRCODE && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Create a QR Code 6 | */ 7 | void lv_example_qrcode_1(void) 8 | { 9 | lv_color_t bg_color = lv_palette_lighten(LV_PALETTE_LIGHT_BLUE, 5); 10 | lv_color_t fg_color = lv_palette_darken(LV_PALETTE_BLUE, 4); 11 | 12 | lv_obj_t * qr = lv_qrcode_create(lv_scr_act(), 150, fg_color, bg_color); 13 | 14 | /*Set data*/ 15 | const char * data = "https://lvgl.io"; 16 | lv_qrcode_update(qr, data, strlen(data)); 17 | lv_obj_center(qr); 18 | 19 | /*Add a border with bg_color*/ 20 | lv_obj_set_style_border_color(qr, bg_color, 0); 21 | lv_obj_set_style_border_width(qr, 5, 0); 22 | } 23 | 24 | #endif 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/label/index.rst: -------------------------------------------------------------------------------- 1 | 2 | Line wrap, recoloring and scrolling 3 | """"""""""""""""""""""""""""""""""" 4 | 5 | .. lv_example:: widgets/label/lv_example_label_1 6 | :language: c 7 | 8 | Text shadow 9 | """""""""""" 10 | 11 | .. lv_example:: widgets/label/lv_example_label_2 12 | :language: c 13 | 14 | Show LTR, RTL and Chinese texts 15 | """""""""""""""""""""""""""""""""""" 16 | 17 | .. lv_example:: widgets/label/lv_example_label_3 18 | :language: c 19 | 20 | Draw label with gradient color 21 | """""""""""""""""""""""""""""""""""" 22 | 23 | .. lv_example:: widgets/label/lv_example_label_4 24 | :language: c 25 | 26 | Customize circular scrolling animation 27 | """""""""""""""""""""""""""""""""""" 28 | 29 | .. lv_example:: widgets/label/lv_example_label_5 30 | :language: c 31 | 32 | -------------------------------------------------------------------------------- /lvgl/scripts/release/release.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Create a new release from master. Execute the followings: 4 | # - On lvgl, lv_demos, and lv_drivers: 5 | # - Detect the current version of master. E.g. 8.1-dev 6 | # - Create a new branch from the master for the release. E.g. release/v8.1 7 | # - Remove the "-dev" postfix from the version numbers 8 | # - Create a tag for the new version. E.g. v8.1 9 | # - Push the new branch and tag 10 | # - Get the relevant changes from docs/CHANGELOG.md and create a blog post from it 11 | # - Increment the version number in master. E.g.g 8.1-dev to 8.2-dev 12 | # - Add a new section to the CHANGELOG with the new version 13 | # - Update the simulator and lv_port projects 14 | # 15 | # USAGE: 16 | # release.py 17 | # - : -minor or -major 18 | -------------------------------------------------------------------------------- /lvgl/src/extra/libs/bmp/lv_bmp.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_bmp.h 3 | * 4 | */ 5 | 6 | #ifndef LV_BMP_H 7 | #define LV_BMP_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../../lv_conf_internal.h" 17 | #if LV_USE_BMP 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | void lv_bmp_init(void); 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | #endif /*LV_USE_BMP*/ 37 | 38 | #ifdef __cplusplus 39 | } /* extern "C" */ 40 | #endif 41 | 42 | #endif /*LV_BMP_H*/ 43 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/lv_example_layout.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_layout.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_LAYOUT_H 7 | #define LV_EXAMPLE_LAYOUT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "flex/lv_example_flex.h" 17 | #include "grid/lv_example_grid.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LV_EXAMPLE_LAYOUT_H*/ 40 | -------------------------------------------------------------------------------- /lvgl/examples/libs/ffmpeg/lv_example_ffmpeg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_ffmpeg.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_FFMPEG_H 7 | #define LV_EXAMPLE_FFMPEG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_ffmpeg_1(void); 29 | void lv_example_ffmpeg_2(void); 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LV_EXAMPLE_FFMPEG_H*/ 40 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/bar/lv_example_bar_2.py: -------------------------------------------------------------------------------- 1 | # 2 | # Example of styling the bar 3 | # 4 | style_bg = lv.style_t() 5 | style_indic = lv.style_t() 6 | 7 | style_bg.init() 8 | style_bg.set_border_color(lv.palette_main(lv.PALETTE.BLUE)) 9 | style_bg.set_border_width(2) 10 | style_bg.set_pad_all(6) # To make the indicator smaller 11 | style_bg.set_radius(6) 12 | style_bg.set_anim_time(1000) 13 | 14 | style_indic.init() 15 | style_indic.set_bg_opa(lv.OPA.COVER) 16 | style_indic.set_bg_color(lv.palette_main(lv.PALETTE.BLUE)) 17 | style_indic.set_radius(3) 18 | 19 | bar = lv.bar(lv.scr_act()) 20 | bar.remove_style_all() # To have a clean start 21 | bar.add_style(style_bg, 0) 22 | bar.add_style(style_indic, lv.PART.INDICATOR) 23 | 24 | bar.set_size(200, 20) 25 | bar.center() 26 | bar.set_value(100, lv.ANIM.ON) 27 | 28 | -------------------------------------------------------------------------------- /lvgl/src/extra/themes/lv_themes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_themes.h 3 | * 4 | */ 5 | 6 | #ifndef LV_THEMES_H 7 | #define LV_THEMES_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "default/lv_theme_default.h" 17 | #include "mono/lv_theme_mono.h" 18 | #include "basic/lv_theme_basic.h" 19 | 20 | /********************* 21 | * DEFINES 22 | *********************/ 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | #ifdef __cplusplus 37 | } /*extern "C"*/ 38 | #endif 39 | 40 | #endif /*LV_THEMES_H*/ 41 | -------------------------------------------------------------------------------- /lvgl/src/font/lv_font_loader.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_font_loader.h 3 | * 4 | */ 5 | 6 | #ifndef LV_FONT_LOADER_H 7 | #define LV_FONT_LOADER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | 29 | lv_font_t * lv_font_load(const char * fontName); 30 | void lv_font_free(lv_font_t * font); 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | #ifdef __cplusplus 37 | } /*extern "C"*/ 38 | #endif 39 | 40 | #endif /*LV_FONT_LOADER_H*/ 41 | -------------------------------------------------------------------------------- /lvgl/examples/libs/rlottie/lv_example_rlottie.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_rlottie.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_RLOTTIE_H 7 | #define LV_EXAMPLE_RLOTTIE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_rlottie_1(void); 29 | void lv_example_rlottie_2(void); 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LV_EXAMPLE_SJPG_H*/ 40 | -------------------------------------------------------------------------------- /lvgl/examples/others/monkey/lv_example_monkey_2.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_MONKEY && LV_BUILD_EXAMPLES 3 | 4 | void lv_example_monkey_2(void) 5 | { 6 | /*Create encoder monkey test*/ 7 | lv_monkey_config_t config; 8 | lv_monkey_config_init(&config); 9 | config.type = LV_INDEV_TYPE_ENCODER; 10 | config.period_range.min = 50; 11 | config.period_range.max = 500; 12 | config.input_range.min = -5; 13 | config.input_range.max = 5; 14 | lv_monkey_t * monkey = lv_monkey_create(&config); 15 | 16 | /*Set the default group*/ 17 | lv_group_t * group = lv_group_create(); 18 | lv_indev_set_group(lv_monkey_get_indev(monkey), group); 19 | lv_group_set_default(group); 20 | 21 | /*Start monkey test*/ 22 | lv_monkey_set_enable(monkey, true); 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /lvgl/examples/others/fragment/lv_example_fragment.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_fragment.h 3 | */ 4 | #ifndef LV_EXAMPLE_FRAGMENT_H 5 | #define LV_EXAMPLE_FRAGMENT_H 6 | 7 | #ifdef __cplusplus 8 | extern "C" { 9 | #endif 10 | 11 | /********************* 12 | * INCLUDES 13 | *********************/ 14 | 15 | /********************* 16 | * DEFINES 17 | *********************/ 18 | 19 | /********************** 20 | * TYPEDEFS 21 | **********************/ 22 | 23 | /********************** 24 | * GLOBAL PROTOTYPES 25 | **********************/ 26 | void lv_example_fragment_1(void); 27 | 28 | void lv_example_fragment_2(void); 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | #ifdef __cplusplus 35 | } /*extern "C"*/ 36 | #endif 37 | 38 | #endif /*LV_EXAMPLE_fragment_H*/ 39 | -------------------------------------------------------------------------------- /lvgl/examples/others/ime/lv_example_ime_pinyin.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_ime_pinyin.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EX_IME_PINYIN_H 7 | #define LV_EX_IME_PINYIN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_ime_pinyin_1(void); 29 | void lv_example_ime_pinyin_2(void); 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /*extern "C"*/ 37 | #endif 38 | 39 | #endif /*LV_EX_IME_PINYIN_H*/ 40 | -------------------------------------------------------------------------------- /lvgl/examples/others/msg/lv_example_msg.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_msg.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_MSG_H 7 | #define LV_EXAMPLE_MSG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_msg_1(void); 29 | void lv_example_msg_2(void); 30 | void lv_example_msg_3(void); 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | #ifdef __cplusplus 37 | } /*extern "C"*/ 38 | #endif 39 | 40 | #endif /*LV_EXAMPLE_MSG_H*/ 41 | -------------------------------------------------------------------------------- /lvgl/demos/stress/lv_demo_stress.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_stress.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_STRESS_H 7 | #define LV_DEMO_STRESS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_demos.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | #define LV_DEMO_STRESS_TIME_STEP 50 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * GLOBAL PROTOTYPES 30 | **********************/ 31 | void lv_demo_stress(void); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #ifdef __cplusplus 38 | } /* extern "C" */ 39 | #endif 40 | 41 | #endif /*LV_DEMO_STRESS_H*/ 42 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/btnmatrix/lv_example_btnmatrix_1.py: -------------------------------------------------------------------------------- 1 | def event_handler(evt): 2 | code = evt.get_code() 3 | obj = evt.get_target() 4 | 5 | if code == lv.EVENT.VALUE_CHANGED : 6 | id = obj.get_selected_btn() 7 | txt = obj.get_btn_text(id) 8 | 9 | print("%s was pressed"%txt) 10 | 11 | btnm_map = ["1", "2", "3", "4", "5", "\n", 12 | "6", "7", "8", "9", "0", "\n", 13 | "Action1", "Action2", ""] 14 | 15 | btnm1 = lv.btnmatrix(lv.scr_act()) 16 | btnm1.set_map(btnm_map) 17 | btnm1.set_btn_width(10, 2) # Make "Action1" twice as wide as "Action2" 18 | btnm1.set_btn_ctrl(10, lv.btnmatrix.CTRL.CHECKABLE) 19 | btnm1.set_btn_ctrl(11, lv.btnmatrix.CTRL.CHECKED) 20 | btnm1.align(lv.ALIGN.CENTER, 0, 0) 21 | btnm1.add_event_cb(event_handler, lv.EVENT.ALL, None) 22 | 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/roller/lv_example_roller_1.py: -------------------------------------------------------------------------------- 1 | def event_handler(e): 2 | code = e.get_code() 3 | obj = e.get_target() 4 | if code == lv.EVENT.VALUE_CHANGED: 5 | option = " "*10 6 | obj.get_selected_str(option, len(option)) 7 | print("Selected month: " + option.strip()) 8 | 9 | # 10 | # An infinite roller with the name of the months 11 | # 12 | 13 | roller1 = lv.roller(lv.scr_act()) 14 | roller1.set_options("\n".join([ 15 | "January", 16 | "February", 17 | "March", 18 | "April", 19 | "May", 20 | "June", 21 | "July", 22 | "August", 23 | "September", 24 | "October", 25 | "November", 26 | "December"]),lv.roller.MODE.INFINITE) 27 | 28 | roller1.set_visible_row_count(4) 29 | roller1.center() 30 | roller1.add_event_cb(event_handler, lv.EVENT.ALL, None) 31 | 32 | -------------------------------------------------------------------------------- /lvgl/tests/src/test_cases/test_event.c: -------------------------------------------------------------------------------- 1 | #if LV_BUILD_TEST 2 | #include "../lvgl.h" 3 | 4 | #include "unity/unity.h" 5 | 6 | static void event_object_deletion_cb(const lv_obj_class_t * cls, lv_event_t * e) 7 | { 8 | LV_UNUSED(cls); 9 | if(lv_event_get_code(e) == LV_EVENT_VALUE_CHANGED) { 10 | lv_obj_del(lv_event_get_current_target(e)); 11 | } 12 | } 13 | 14 | static const lv_obj_class_t event_object_deletion_class = { 15 | .event_cb = event_object_deletion_cb, 16 | .base_class = &lv_obj_class 17 | }; 18 | 19 | 20 | /* Checks for memory leaks/invalid memory accesses on deleted objects */ 21 | void test_event_object_deletion(void) 22 | { 23 | lv_obj_t * obj = lv_obj_class_create_obj(&event_object_deletion_class, lv_scr_act()); 24 | lv_event_send(obj, LV_EVENT_VALUE_CHANGED, NULL); 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /lvgl/demos/keypad_encoder/lv_demo_keypad_encoder.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_keypad_encoder.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_KEYPAD_ENCODER_H 7 | #define LV_DEMO_KEYPAD_ENCODER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lv_demos.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | void lv_demo_keypad_encoder(void); 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | #ifdef __cplusplus 36 | } /* extern "C" */ 37 | #endif 38 | 39 | #endif /*LV_DEMO_KEYPAD_ENCODER_H*/ 40 | -------------------------------------------------------------------------------- /lvgl/docs/_static/js/custom.js: -------------------------------------------------------------------------------- 1 | /* API collapsing */ 2 | document.addEventListener('DOMContentLoaded', (event) => { 3 | document.querySelectorAll("dl.cpp").forEach(cppListing => { 4 | const dt = cppListing.querySelector("dt"); 5 | let shouldBeExpanded = false; 6 | if(dt.id == document.location.hash.substring(1)) 7 | shouldBeExpanded = true; 8 | cppListing.classList.add(shouldBeExpanded ? "expanded" : "unexpanded"); 9 | const button = document.createElement("span"); 10 | button.classList.add("lv-api-expansion-button"); 11 | button.addEventListener("click", () => { 12 | cppListing.classList.toggle("unexpanded"); 13 | cppListing.classList.toggle("expanded"); 14 | }); 15 | 16 | dt.insertBefore(button, dt.firstChild); 17 | }); 18 | }) -------------------------------------------------------------------------------- /lvgl/docs/requirements.txt: -------------------------------------------------------------------------------- 1 | alabaster==0.7.12 2 | Babel==2.9.1 3 | breathe==4.30.0 4 | certifi==2020.12.5 5 | chardet==4.0.0 6 | commonmark==0.9.1 7 | docutils==0.16 8 | idna==2.10 9 | imagesize==1.2.0 10 | importlib-metadata==4.8.1 11 | Jinja2==2.11.3 12 | Markdown==3.3.4 13 | MarkupSafe==1.1.1 14 | packaging==20.9 15 | Pygments==2.9.0 16 | pyparsing==2.4.7 17 | pytz==2021.1 18 | recommonmark==0.6.0 19 | requests==2.25.1 20 | six==1.16.0 21 | snowballstemmer==2.1.0 22 | Sphinx==4.5.0 23 | sphinx-markdown-tables==0.0.15 24 | sphinx-rtd-theme==0.5.2 25 | sphinx-sitemap==2.2.0 26 | sphinxcontrib-applehelp==1.0.2 27 | sphinxcontrib-devhelp==1.0.2 28 | sphinxcontrib-htmlhelp==2.0.0 29 | sphinxcontrib-jsmath==1.0.1 30 | sphinxcontrib-qthelp==1.0.3 31 | sphinxcontrib-serializinghtml==1.1.5 32 | typing-extensions==3.10.0.0 33 | urllib3==1.26.5 34 | zipp==3.4.1 35 | -------------------------------------------------------------------------------- /lvgl/scripts/build_html_examples.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH" 4 | CURRENT_REF="$(git rev-parse HEAD)" 5 | rm -rf emscripten_builder 6 | git clone https://github.com/lvgl/lv_sim_emscripten.git emscripten_builder 7 | scripts/genexamplelist.sh > emscripten_builder/examplelist.c 8 | cd emscripten_builder 9 | git checkout 45e0bc5c8d3e55cfbcaf8214361d2335b8b9a7b4 10 | git submodule update --init -- lvgl 11 | cd lvgl 12 | git checkout $CURRENT_REF 13 | cd .. 14 | git submodule update --init -- lv_drivers 15 | mkdir cmbuild 16 | cd cmbuild 17 | emcmake cmake .. -DLVGL_CHOSEN_DEMO=lv_example_noop -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache 18 | emmake make -j$(nproc) 19 | rm -rf CMakeFiles 20 | cd ../.. 21 | cp -a emscripten_builder/cmbuild docs/_static/built_lv_examples 22 | -------------------------------------------------------------------------------- /lvgl/demos/music/assets/spectrum.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import librosa 3 | import math 4 | import sys 5 | 6 | print("Loading file") 7 | audio, sample_rate = librosa.load(sys.argv[1], duration=60, offset=0, sr=15360) 8 | 9 | print("Getting spectrum") 10 | spectrum = librosa.stft(audio) 11 | S = np.abs(spectrum) 12 | 13 | fout = open("spectrum.h", "w") 14 | 15 | print("Writing file") 16 | fn = 36 17 | fs = int(len(S) / fn) 18 | fout.write("const uint16_t spectrum[][4] = {\n") 19 | for t in range(0,len(S[0]-1)): 20 | fout.write("{ ") 21 | f_prev = 0 22 | for f in [8, 45, 300, 600]: 23 | v = 0 24 | for i in range(f_prev, f): v += S[i][t] 25 | if v != 0: v = int(v/30) 26 | if v < 0: v = 0 27 | f_prev = f 28 | fout.write(str(int(v)) + ", ") 29 | fout.write("},\n") 30 | fout.write("};\n") 31 | fout.close() 32 | 33 | print("Finished") -------------------------------------------------------------------------------- /lvgl/examples/event/lv_example_event_1.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES && LV_USE_SWITCH 3 | 4 | static void event_cb(lv_event_t * e) 5 | { 6 | LV_LOG_USER("Clicked"); 7 | 8 | static uint32_t cnt = 1; 9 | lv_obj_t * btn = lv_event_get_target(e); 10 | lv_obj_t * label = lv_obj_get_child(btn, 0); 11 | lv_label_set_text_fmt(label, "%"LV_PRIu32, cnt); 12 | cnt++; 13 | } 14 | 15 | /** 16 | * Add click event to a button 17 | */ 18 | void lv_example_event_1(void) 19 | { 20 | lv_obj_t * btn = lv_btn_create(lv_scr_act()); 21 | lv_obj_set_size(btn, 100, 50); 22 | lv_obj_center(btn); 23 | lv_obj_add_event_cb(btn, event_cb, LV_EVENT_CLICKED, NULL); 24 | 25 | lv_obj_t * label = lv_label_create(btn); 26 | lv_label_set_text(label, "Click me!"); 27 | lv_obj_center(label); 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/grid/lv_example_grid_6.py: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate RTL direction on grid 3 | # 4 | col_dsc = [60, 60, 60, lv.GRID_TEMPLATE.LAST] 5 | row_dsc = [40, 40, 40, lv.GRID_TEMPLATE.LAST] 6 | 7 | # Create a container with grid 8 | cont = lv.obj(lv.scr_act()) 9 | cont.set_size(300, 220) 10 | cont.center() 11 | cont.set_style_base_dir(lv.BASE_DIR.RTL,0) 12 | cont.set_grid_dsc_array(col_dsc, row_dsc) 13 | 14 | for i in range(9): 15 | col = i % 3 16 | row = i // 3 17 | 18 | obj = lv.obj(cont) 19 | # Stretch the cell horizontally and vertically too 20 | # Set span to 1 to make the cell 1 column/row sized 21 | obj.set_grid_cell(lv.GRID_ALIGN.STRETCH, col, 1, 22 | lv.GRID_ALIGN.STRETCH, row, 1) 23 | 24 | label = lv.label(obj) 25 | label.set_text("{:d},{:d}".format(col, row)) 26 | label.center() 27 | 28 | -------------------------------------------------------------------------------- /include/vex.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------------------------------------*/ 2 | /* */ 3 | /* Module: vex.h */ 4 | /* Author: Vex Robotics */ 5 | /* Created: 1 Feb 2019 */ 6 | /* Description: Default header for V5 projects */ 7 | /* */ 8 | /*----------------------------------------------------------------------------*/ 9 | // 10 | #include 11 | #include 12 | #include 13 | #include 14 | 15 | #include "v5.h" 16 | #include "v5_vcs.h" 17 | 18 | #include "v5lvgl.h" 19 | -------------------------------------------------------------------------------- /lvgl/examples/get_started/lv_example_get_started_3.py: -------------------------------------------------------------------------------- 1 | def slider_event_cb(evt): 2 | slider = evt.get_target() 3 | 4 | # Refresh the text 5 | label.set_text(str(slider.get_value())) 6 | 7 | # 8 | # Create a slider and write its value on a label. 9 | # 10 | 11 | # Create a slider in the center of the display 12 | slider = lv.slider(lv.scr_act()) 13 | slider.set_width(200) # Set the width 14 | slider.center() # Align to the center of the parent (screen) 15 | slider.add_event_cb(slider_event_cb, lv.EVENT.VALUE_CHANGED, None) # Assign an event function 16 | 17 | # Create a label above the slider 18 | label = lv.label(lv.scr_act()) 19 | label.set_text("0") 20 | label.align_to(slider, lv.ALIGN.OUT_TOP_MID, 0, -15) # Align below the slider 21 | 22 | 23 | -------------------------------------------------------------------------------- /lvgl/examples/others/monkey/lv_example_monkey.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_monkey.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_MONKEY_H 7 | #define LV_EXAMPLE_MONKEY_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_monkey_1(void); 29 | void lv_example_monkey_2(void); 30 | void lv_example_monkey_3(void); 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | #ifdef __cplusplus 37 | } /*extern "C"*/ 38 | #endif 39 | 40 | #endif /*LV_EXAMPLE_MONKEY_H*/ 41 | -------------------------------------------------------------------------------- /lvgl/examples/libs/rlottie/lv_example_rlottie_2.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | #if LV_USE_RLOTTIE 4 | 5 | /** 6 | * Load an lottie animation from file 7 | */ 8 | void lv_example_rlottie_2(void) 9 | { 10 | /*The rlottie library uses STDIO file API, so there is no driver letter for LVGL*/ 11 | lv_obj_t * lottie = lv_rlottie_create_from_file(lv_scr_act(), 100, 100, 12 | "lvgl/examples/libs/rlottie/lv_example_rlottie_approve.json"); 13 | lv_obj_center(lottie); 14 | } 15 | 16 | #else 17 | void lv_example_rlottie_2(void) 18 | { 19 | /*TODO 20 | *fallback for online examples*/ 21 | 22 | lv_obj_t * label = lv_label_create(lv_scr_act()); 23 | lv_label_set_text(label, "Rlottie is not installed"); 24 | lv_obj_center(label); 25 | } 26 | 27 | #endif 28 | #endif 29 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/arc/lv_example_arc_2.py: -------------------------------------------------------------------------------- 1 | # 2 | # An `lv_timer` to call periodically to set the angles of the arc 3 | # 4 | class ArcLoader(): 5 | def __init__(self): 6 | self.a = 270 7 | 8 | def arc_loader_cb(self,tim,arc): 9 | # print(tim,arc) 10 | self.a += 5 11 | 12 | arc.set_end_angle(self.a) 13 | 14 | if self.a >= 270 + 360: 15 | tim._del() 16 | 17 | 18 | # 19 | # Create an arc which acts as a loader. 20 | # 21 | 22 | # Create an Arc 23 | arc = lv.arc(lv.scr_act()) 24 | arc.set_bg_angles(0, 360) 25 | arc.set_angles(270, 270) 26 | arc.center() 27 | 28 | # create the loader 29 | arc_loader = ArcLoader() 30 | 31 | # Create an `lv_timer` to update the arc. 32 | 33 | timer = lv.timer_create_basic() 34 | timer.set_period(20) 35 | timer.set_cb(lambda src: arc_loader.arc_loader_cb(timer,arc)) 36 | 37 | 38 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/bar/index.rst: -------------------------------------------------------------------------------- 1 | Simple Bar 2 | """""""""""""""" 3 | 4 | .. lv_example:: widgets/bar/lv_example_bar_1 5 | :language: c 6 | 7 | Styling a bar 8 | """""""""""""""" 9 | 10 | .. lv_example:: widgets/bar/lv_example_bar_2 11 | :language: c 12 | 13 | Temperature meter 14 | """""""""""""""""" 15 | 16 | .. lv_example:: widgets/bar/lv_example_bar_3 17 | :language: c 18 | 19 | Stripe pattern and range value 20 | """""""""""""""""""""""""""""""" 21 | 22 | .. lv_example:: widgets/bar/lv_example_bar_4 23 | :language: c 24 | 25 | Bar with LTR and RTL base direction 26 | """""""""""""""""""""""""""""""""""" 27 | 28 | .. lv_example:: widgets/bar/lv_example_bar_5 29 | :language: c 30 | 31 | Custom drawer to show the current value 32 | """"""""""""""""""""""""""""""""""""""" 33 | 34 | .. lv_example:: widgets/bar/lv_example_bar_6 35 | :language: c 36 | 37 | -------------------------------------------------------------------------------- /lvgl/examples/anim/lv_example_anim.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_anim.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_ANIM_H 7 | #define LV_EXAMPLE_ANIM_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_anim_1(void); 29 | void lv_example_anim_2(void); 30 | void lv_example_anim_3(void); 31 | void lv_example_anim_timeline_1(void); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #ifdef __cplusplus 38 | } /*extern "C"*/ 39 | #endif 40 | 41 | #endif /*LV_EXAMPLE_ANIM_H*/ 42 | -------------------------------------------------------------------------------- /lvgl/examples/event/lv_example_event.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_event.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_EVENT_H 7 | #define LV_EXAMPLE_EVENT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_event_1(void); 29 | void lv_example_event_2(void); 30 | void lv_example_event_3(void); 31 | void lv_example_event_4(void); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #ifdef __cplusplus 38 | } /*extern "C"*/ 39 | #endif 40 | 41 | #endif /*LV_EXAMPLE_EVENT_H*/ 42 | -------------------------------------------------------------------------------- /lvgl/examples/get_started/lv_example_get_started.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_get_started.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EX_GET_STARTED_H 7 | #define LV_EX_GET_STARTED_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_get_started_1(void); 29 | void lv_example_get_started_2(void); 30 | void lv_example_get_started_3(void); 31 | 32 | /********************** 33 | * MACROS 34 | **********************/ 35 | 36 | #ifdef __cplusplus 37 | } /*extern "C"*/ 38 | #endif 39 | 40 | #endif /*LV_EX_GET_STARTED_H*/ 41 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/bar/lv_example_bar_3.py: -------------------------------------------------------------------------------- 1 | def set_temp(bar, temp): 2 | bar.set_value(temp, lv.ANIM.ON) 3 | 4 | # 5 | # A temperature meter example 6 | # 7 | 8 | 9 | style_indic = lv.style_t() 10 | 11 | style_indic.init() 12 | style_indic.set_bg_opa(lv.OPA.COVER) 13 | style_indic.set_bg_color(lv.palette_main(lv.PALETTE.RED)) 14 | style_indic.set_bg_grad_color(lv.palette_main(lv.PALETTE.BLUE)) 15 | style_indic.set_bg_grad_dir(lv.GRAD_DIR.VER) 16 | 17 | bar = lv.bar(lv.scr_act()) 18 | bar.add_style(style_indic, lv.PART.INDICATOR) 19 | bar.set_size(20, 200) 20 | bar.center() 21 | bar.set_range(-20, 40) 22 | 23 | a = lv.anim_t() 24 | a.init() 25 | a.set_time(3000) 26 | a.set_playback_time(3000) 27 | a.set_var(bar) 28 | a.set_values(-20, 40) 29 | a.set_repeat_count(lv.ANIM_REPEAT.INFINITE) 30 | a.set_custom_exec_cb(lambda a, val: set_temp(bar,val)) 31 | lv.anim_t.start(a) 32 | 33 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex_6.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_FLEX && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * RTL base direction changes order of the items. 6 | * Also demonstrate how horizontal scrolling works with RTL. 7 | */ 8 | void lv_example_flex_6(void) 9 | { 10 | lv_obj_t * cont = lv_obj_create(lv_scr_act()); 11 | lv_obj_set_style_base_dir(cont, LV_BASE_DIR_RTL, 0); 12 | lv_obj_set_size(cont, 300, 220); 13 | lv_obj_center(cont); 14 | lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_ROW_WRAP); 15 | 16 | uint32_t i; 17 | for(i = 0; i < 20; i++) { 18 | lv_obj_t * obj = lv_obj_create(cont); 19 | lv_obj_set_size(obj, 70, LV_SIZE_CONTENT); 20 | 21 | lv_obj_t * label = lv_label_create(obj); 22 | lv_label_set_text_fmt(label, "%"LV_PRIu32, i); 23 | lv_obj_center(label); 24 | } 25 | } 26 | #endif 27 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_4.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Using the outline style properties 6 | */ 7 | void lv_example_style_4(void) 8 | { 9 | static lv_style_t style; 10 | lv_style_init(&style); 11 | 12 | /*Set a background color and a radius*/ 13 | lv_style_set_radius(&style, 5); 14 | lv_style_set_bg_opa(&style, LV_OPA_COVER); 15 | lv_style_set_bg_color(&style, lv_palette_lighten(LV_PALETTE_GREY, 1)); 16 | 17 | /*Add outline*/ 18 | lv_style_set_outline_width(&style, 2); 19 | lv_style_set_outline_color(&style, lv_palette_main(LV_PALETTE_BLUE)); 20 | lv_style_set_outline_pad(&style, 8); 21 | 22 | /*Create an object with the new style*/ 23 | lv_obj_t * obj = lv_obj_create(lv_scr_act()); 24 | lv_obj_add_style(obj, &style, 0); 25 | lv_obj_center(obj); 26 | } 27 | 28 | #endif 29 | 30 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/bar/lv_example_bar_4.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_BAR && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Bar with stripe pattern and ranged value 6 | */ 7 | void lv_example_bar_4(void) 8 | { 9 | LV_IMG_DECLARE(img_skew_strip); 10 | static lv_style_t style_indic; 11 | 12 | lv_style_init(&style_indic); 13 | lv_style_set_bg_img_src(&style_indic, &img_skew_strip); 14 | lv_style_set_bg_img_tiled(&style_indic, true); 15 | lv_style_set_bg_img_opa(&style_indic, LV_OPA_30); 16 | 17 | lv_obj_t * bar = lv_bar_create(lv_scr_act()); 18 | lv_obj_add_style(bar, &style_indic, LV_PART_INDICATOR); 19 | 20 | lv_obj_set_size(bar, 260, 20); 21 | lv_obj_center(bar); 22 | lv_bar_set_mode(bar, LV_BAR_MODE_RANGE); 23 | lv_bar_set_value(bar, 90, LV_ANIM_OFF); 24 | lv_bar_set_start_value(bar, 20, LV_ANIM_OFF); 25 | } 26 | 27 | #endif 28 | -------------------------------------------------------------------------------- /lvgl/src/extra/libs/png/lv_png.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_png.h 3 | * 4 | */ 5 | 6 | #ifndef LV_PNG_H 7 | #define LV_PNG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../../../lv_conf_internal.h" 17 | #if LV_USE_PNG 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /** 32 | * Register the PNG decoder functions in LVGL 33 | */ 34 | void lv_png_init(void); 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #endif /*LV_USE_PNG*/ 41 | 42 | #ifdef __cplusplus 43 | } /* extern "C" */ 44 | #endif 45 | 46 | #endif /*LV_PNG_H*/ 47 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/led/lv_example_led_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_LED && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Create LED's with different brightness and color 6 | */ 7 | void lv_example_led_1(void) 8 | { 9 | /*Create a LED and switch it OFF*/ 10 | lv_obj_t * led1 = lv_led_create(lv_scr_act()); 11 | lv_obj_align(led1, LV_ALIGN_CENTER, -80, 0); 12 | lv_led_off(led1); 13 | 14 | /*Copy the previous LED and set a brightness*/ 15 | lv_obj_t * led2 = lv_led_create(lv_scr_act()); 16 | lv_obj_align(led2, LV_ALIGN_CENTER, 0, 0); 17 | lv_led_set_brightness(led2, 150); 18 | lv_led_set_color(led2, lv_palette_main(LV_PALETTE_RED)); 19 | 20 | /*Copy the previous LED and switch it ON*/ 21 | lv_obj_t * led3 = lv_led_create(lv_scr_act()); 22 | lv_obj_align(led3, LV_ALIGN_CENTER, 80, 0); 23 | lv_led_on(led3); 24 | } 25 | 26 | #endif 27 | -------------------------------------------------------------------------------- /lvgl/examples/event/lv_example_event_3.py: -------------------------------------------------------------------------------- 1 | def event_cb(e): 2 | 3 | # The original target of the event. Can be the buttons or the container 4 | target = e.get_target() 5 | # print(type(target)) 6 | 7 | # If container was clicked do nothing 8 | if type(target) != type(lv.btn()): 9 | return 10 | 11 | # Make the clicked buttons red 12 | target.set_style_bg_color(lv.palette_main(lv.PALETTE.RED), 0) 13 | 14 | # 15 | # Demonstrate event bubbling 16 | # 17 | 18 | cont = lv.obj(lv.scr_act()) 19 | cont.set_size(320, 200) 20 | cont.center() 21 | cont.set_flex_flow(lv.FLEX_FLOW.ROW_WRAP) 22 | 23 | for i in range(30): 24 | btn = lv.btn(cont) 25 | btn.set_size(80, 50) 26 | btn.add_flag(lv.obj.FLAG.EVENT_BUBBLE) 27 | 28 | label = lv.label(btn) 29 | label.set_text(str(i)) 30 | label.center() 31 | 32 | cont.add_event_cb(event_cb, lv.EVENT.CLICKED, None) 33 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/grid/lv_example_grid_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # A simple grid 3 | # 4 | 5 | col_dsc = [70, 70, 70, lv.GRID_TEMPLATE.LAST] 6 | row_dsc = [50, 50, 50, lv.GRID_TEMPLATE.LAST] 7 | 8 | # Create a container with grid 9 | cont = lv.obj(lv.scr_act()) 10 | cont.set_style_grid_column_dsc_array(col_dsc, 0) 11 | cont.set_style_grid_row_dsc_array(row_dsc, 0) 12 | cont.set_size(300, 220) 13 | cont.center() 14 | cont.set_layout(lv.LAYOUT_GRID.value) 15 | 16 | for i in range(9): 17 | col = i % 3 18 | row = i // 3 19 | 20 | obj = lv.btn(cont) 21 | # Stretch the cell horizontally and vertically too 22 | # Set span to 1 to make the cell 1 column/row sized 23 | obj.set_grid_cell(lv.GRID_ALIGN.STRETCH, col, 1, 24 | lv.GRID_ALIGN.STRETCH, row, 1) 25 | 26 | label = lv.label(obj) 27 | label.set_text("c" +str(col) + "r" +str(row)) 28 | label.center() 29 | 30 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/dropdown/lv_example_dropdown_2.py: -------------------------------------------------------------------------------- 1 | # 2 | # Create a drop down, up, left and right menus 3 | # 4 | 5 | opts = "\n".join([ 6 | "Apple", 7 | "Banana", 8 | "Orange", 9 | "Melon", 10 | "Grape", 11 | "Raspberry"]) 12 | 13 | dd = lv.dropdown(lv.scr_act()) 14 | dd.set_options_static(opts) 15 | dd.align(lv.ALIGN.TOP_MID, 0, 10) 16 | dd = lv.dropdown(lv.scr_act()) 17 | dd.set_options_static(opts) 18 | dd.set_dir(lv.DIR.BOTTOM) 19 | dd.set_symbol(lv.SYMBOL.UP) 20 | dd.align(lv.ALIGN.BOTTOM_MID, 0, -10) 21 | 22 | dd = lv.dropdown(lv.scr_act()) 23 | dd.set_options_static(opts) 24 | dd.set_dir(lv.DIR.RIGHT) 25 | dd.set_symbol(lv.SYMBOL.RIGHT) 26 | dd.align(lv.ALIGN.LEFT_MID, 10, 0) 27 | 28 | dd = lv.dropdown(lv.scr_act()) 29 | dd.set_options_static(opts) 30 | dd.set_dir(lv.DIR.LEFT) 31 | dd.set_symbol(lv.SYMBOL.LEFT) 32 | dd.align(lv.ALIGN.RIGHT_MID, -10, 0) 33 | 34 | 35 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/line/lv_example_line_1.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_LINE && LV_BUILD_EXAMPLES 3 | 4 | void lv_example_line_1(void) 5 | { 6 | /*Create an array for the points of the line*/ 7 | static lv_point_t line_points[] = { {5, 5}, {70, 70}, {120, 10}, {180, 60}, {240, 10} }; 8 | 9 | /*Create style*/ 10 | static lv_style_t style_line; 11 | lv_style_init(&style_line); 12 | lv_style_set_line_width(&style_line, 8); 13 | lv_style_set_line_color(&style_line, lv_palette_main(LV_PALETTE_BLUE)); 14 | lv_style_set_line_rounded(&style_line, true); 15 | 16 | /*Create a line and apply the new style*/ 17 | lv_obj_t * line1; 18 | line1 = lv_line_create(lv_scr_act()); 19 | lv_line_set_points(line1, line_points, 5); /*Set the points*/ 20 | lv_obj_add_style(line1, &style_line, 0); 21 | lv_obj_center(line1); 22 | } 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /lvgl/tests/src/test_cases/test_demo_stress.c: -------------------------------------------------------------------------------- 1 | #if LV_BUILD_TEST 2 | #include "../lvgl.h" 3 | #include "../demos/lv_demos.h" 4 | 5 | #include "unity/unity.h" 6 | 7 | #include "lv_test_helpers.h" 8 | #include "lv_test_indev.h" 9 | 10 | static void loop_through_stress_test(void) 11 | { 12 | #if LV_USE_DEMO_STRESS 13 | lv_test_indev_wait(LV_DEMO_STRESS_TIME_STEP * 33); /* FIXME: remove magic number of states */ 14 | #endif 15 | } 16 | void test_demo_stress(void) 17 | { 18 | #if LV_USE_DEMO_STRESS 19 | lv_demo_stress(); 20 | #endif 21 | /* loop once to allow objects to be created */ 22 | loop_through_stress_test(); 23 | uint32_t mem_before = lv_test_get_free_mem(); 24 | /* loop 10 more times */ 25 | for(uint32_t i = 0; i < 10; i++) { 26 | loop_through_stress_test(); 27 | } 28 | TEST_ASSERT_EQUAL(mem_before, lv_test_get_free_mem()); 29 | } 30 | 31 | #endif 32 | 33 | -------------------------------------------------------------------------------- /lvgl/examples/others/gridnav/lv_example_gridnav.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_gridnav.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_GRIDNAV_H 7 | #define LV_EXAMPLE_GRIDNAV_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_gridnav_1(void); 29 | void lv_example_gridnav_2(void); 30 | void lv_example_gridnav_3(void); 31 | void lv_example_gridnav_4(void); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #ifdef __cplusplus 38 | } /*extern "C"*/ 39 | #endif 40 | 41 | #endif /*LV_EXAMPLE_GRIDNAV_H*/ 42 | -------------------------------------------------------------------------------- /lvgl/examples/scroll/lv_example_scroll_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate how scrolling appears automatically 3 | # 4 | # Create an object with the new style 5 | panel = lv.obj(lv.scr_act()) 6 | panel.set_size(200, 200) 7 | panel.center() 8 | 9 | child = lv.obj(panel) 10 | child.set_pos(0, 0) 11 | label = lv.label(child) 12 | label.set_text("Zero") 13 | label.center() 14 | 15 | child = lv.obj(panel) 16 | child.set_pos(-40, 100) 17 | label = lv.label(child) 18 | label.set_text("Left") 19 | label.center() 20 | 21 | child = lv.obj(panel) 22 | child.set_pos(90, -30) 23 | label = lv.label(child) 24 | label.set_text("Top") 25 | label.center() 26 | 27 | child = lv.obj(panel) 28 | child.set_pos(150, 80) 29 | label = lv.label(child) 30 | label.set_text("Right") 31 | label.center() 32 | 33 | child = lv.obj(panel) 34 | child.set_pos(60, 170) 35 | label = lv.label(child) 36 | label.set_text("Bottom") 37 | label.center() 38 | 39 | -------------------------------------------------------------------------------- /lvgl/examples/event/lv_example_event_2.py: -------------------------------------------------------------------------------- 1 | def event_cb(e,label): 2 | code = e.get_code() 3 | if code == lv.EVENT.PRESSED: 4 | label.set_text("The last button event:\nLV_EVENT_PRESSED") 5 | elif code == lv.EVENT.CLICKED: 6 | label.set_text("The last button event:\nLV_EVENT_CLICKED") 7 | elif code == lv.EVENT.LONG_PRESSED: 8 | label.set_text("The last button event:\nLV_EVENT_LONG_PRESSED") 9 | elif code == lv.EVENT.LONG_PRESSED_REPEAT: 10 | label.set_text("The last button event:\nLV_EVENT_LONG_PRESSED_REPEAT") 11 | btn = lv.btn(lv.scr_act()) 12 | btn.set_size(100, 50) 13 | btn.center() 14 | 15 | btn_label = lv.label(btn) 16 | btn_label.set_text("Click me!") 17 | btn_label.center() 18 | 19 | info_label = lv.label(lv.scr_act()) 20 | info_label.set_text("The last button event:\nNone") 21 | 22 | btn.add_event_cb(lambda e: event_cb(e,info_label), lv.EVENT.ALL, None) 23 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_1.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES && LV_USE_IMG 3 | 4 | /** 5 | * Using the Size, Position and Padding style properties 6 | */ 7 | void lv_example_style_1(void) 8 | { 9 | static lv_style_t style; 10 | lv_style_init(&style); 11 | lv_style_set_radius(&style, 5); 12 | 13 | /*Make a gradient*/ 14 | lv_style_set_width(&style, 150); 15 | lv_style_set_height(&style, LV_SIZE_CONTENT); 16 | 17 | lv_style_set_pad_ver(&style, 20); 18 | lv_style_set_pad_left(&style, 5); 19 | 20 | lv_style_set_x(&style, lv_pct(50)); 21 | lv_style_set_y(&style, 80); 22 | 23 | /*Create an object with the new style*/ 24 | lv_obj_t * obj = lv_obj_create(lv_scr_act()); 25 | lv_obj_add_style(obj, &style, 0); 26 | 27 | lv_obj_t * label = lv_label_create(obj); 28 | lv_label_set_text(label, "Hello"); 29 | } 30 | 31 | #endif 32 | -------------------------------------------------------------------------------- /lvgl/src/misc/lv_templ.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_templ.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | /********************* 11 | * DEFINES 12 | *********************/ 13 | 14 | /********************** 15 | * TYPEDEFS 16 | **********************/ 17 | 18 | /*This typedef exists purely to keep -Wpedantic happy when the file is empty.*/ 19 | /*It can be removed.*/ 20 | typedef int _keep_pedantic_happy; 21 | 22 | /********************** 23 | * STATIC PROTOTYPES 24 | **********************/ 25 | 26 | /********************** 27 | * STATIC VARIABLES 28 | **********************/ 29 | 30 | /********************** 31 | * MACROS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL FUNCTIONS 36 | **********************/ 37 | 38 | /********************** 39 | * STATIC FUNCTIONS 40 | **********************/ 41 | -------------------------------------------------------------------------------- /vex/mkrules.mk: -------------------------------------------------------------------------------- 1 | # VEXcode mkrules.mk 2019_03_26_01 2 | 3 | # compile C files 4 | $(BUILD)/%.o: %.c $(SRC_H) 5 | $(Q)$(MKDIR) 6 | $(ECHO) "CC $<" 7 | $(Q)$(CC) $(CFLAGS) $(INC) -c -o $@ $< 8 | 9 | # compile C++ files 10 | $(BUILD)/%.o: %.cpp $(SRC_H) $(SRC_A) 11 | $(Q)$(MKDIR) 12 | $(ECHO) "CXX $<" 13 | $(Q)$(CXX) $(CXX_FLAGS) $(INC) -c -o $@ $< 14 | 15 | # create executable 16 | $(BUILD)/$(PROJECT).elf: $(OBJ) $(BUILD)/$(PROJECTLIB).a 17 | $(ECHO) "LINK $@" 18 | $(Q)$(LINK) $(LNK_FLAGS) -o $@ $^ $(LIBS) 19 | $(Q)$(SIZE) $@ 20 | 21 | # create binary 22 | $(BUILD)/$(PROJECT).bin: $(BUILD)/$(PROJECT).elf 23 | $(Q)$(OBJCOPY) -O binary $(BUILD)/$(PROJECT).elf $(BUILD)/$(PROJECT).bin 24 | 25 | # create archive 26 | $(BUILD)/$(PROJECTLIB).a: $(OBJA) 27 | $(ECHO) "Create archive $@" 28 | $(Q)$(ARCH) $(ARCH_FLAGS) $@ $^ 29 | 30 | # clean project 31 | clean: 32 | $(info clean project) 33 | $(Q)$(CLEAN) 34 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/chart/lv_example_chart_9.py: -------------------------------------------------------------------------------- 1 | import display_driver 2 | import lvgl as lv 3 | 4 | def add_data(t): 5 | chart.set_next_value(ser, lv.rand(10, 90)) 6 | 7 | p = chart.get_point_count() 8 | s = chart.get_x_start_point(ser) 9 | a = chart.get_y_array(ser) 10 | 11 | a[(s + 1) % p] = lv.CHART_POINT.NONE 12 | a[(s + 2) % p] = lv.CHART_POINT.NONE 13 | a[(s + 3) % p] = lv.CHART_POINT.NONE 14 | chart.refresh() 15 | 16 | # 17 | # Circular line chart with gap 18 | # 19 | chart = lv.chart(lv.scr_act()) 20 | 21 | chart.set_update_mode(lv.chart.UPDATE_MODE.CIRCULAR) 22 | chart.set_size(200, 150) 23 | chart.center() 24 | 25 | chart.set_point_count(30) 26 | ser = chart.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y) 27 | #Prefill with data 28 | for i in range(0, 30): 29 | chart.set_next_value(ser, lv.rand(10, 90)) 30 | 31 | lv.timer_create(add_data, 200, None) 32 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/label/lv_example_label_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # Show line wrap, re-color, line align and text scrolling. 3 | # 4 | label1 = lv.label(lv.scr_act()) 5 | label1.set_long_mode(lv.label.LONG.WRAP) # Break the long lines*/ 6 | label1.set_recolor(True) # Enable re-coloring by commands in the text 7 | label1.set_text("#0000ff Re-color# #ff00ff words# #ff0000 of a# label, align the lines to the center" 8 | "and wrap long text automatically.") 9 | label1.set_width(150) # Set smaller width to make the lines wrap 10 | label1.set_style_text_align(lv.ALIGN.CENTER, 0) 11 | label1.align(lv.ALIGN.CENTER, 0, -40) 12 | 13 | 14 | label2 = lv.label(lv.scr_act()) 15 | label2.set_long_mode(lv.label.LONG.SCROLL_CIRCULAR) # Circular scroll 16 | label2.set_width(150) 17 | label2.set_text("It is a circularly scrolling text. ") 18 | label2.align(lv.ALIGN.CENTER, 0, 40) 19 | 20 | -------------------------------------------------------------------------------- /lvgl/src/extra/layouts/lv_layouts.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_layouts.h 3 | * 4 | */ 5 | 6 | #ifndef LV_LAYOUTS_H 7 | #define LV_LAYOUTS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "flex/lv_flex.h" 17 | #include "grid/lv_grid.h" 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | #if LV_USE_LOG && LV_LOG_TRACE_LAYOUT 35 | # define LV_TRACE_LAYOUT(...) LV_LOG_TRACE(__VA_ARGS__) 36 | #else 37 | # define LV_TRACE_LAYOUT(...) 38 | #endif 39 | 40 | #ifdef __cplusplus 41 | } /*extern "C"*/ 42 | #endif 43 | 44 | #endif /*LV_LAYOUTS_H*/ 45 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/grid/index.rst: -------------------------------------------------------------------------------- 1 | A simple grid 2 | """"""""""""""" 3 | 4 | .. lv_example:: layouts/grid/lv_example_grid_1 5 | :language: c 6 | 7 | Demonstrate cell placement and span 8 | """"""""""""""""""""""""""""""""""""""""""""""""" 9 | 10 | .. lv_example:: layouts/grid/lv_example_grid_2 11 | :language: c 12 | 13 | Demonstrate grid's "free unit" 14 | """""""""""""""""""""""""""""" 15 | 16 | .. lv_example:: layouts/grid/lv_example_grid_3 17 | :language: c 18 | 19 | Demonstrate track placement 20 | """"""""""""""""""""""""""" 21 | 22 | .. lv_example:: layouts/grid/lv_example_grid_4 23 | :language: c 24 | 25 | Demonstrate column and row gap 26 | """""""""""""""""""""""""""""" 27 | 28 | .. lv_example:: layouts/grid/lv_example_grid_5 29 | :language: c 30 | 31 | Demonstrate RTL direction on grid 32 | """""""""""""""""""""""""""""""""" 33 | 34 | .. lv_example:: layouts/grid/lv_example_grid_6 35 | :language: c 36 | 37 | 38 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_flex.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_FLEX_H 7 | #define LV_EXAMPLE_FLEX_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_flex_1(void); 29 | void lv_example_flex_2(void); 30 | void lv_example_flex_3(void); 31 | void lv_example_flex_4(void); 32 | void lv_example_flex_5(void); 33 | void lv_example_flex_6(void); 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | #ifdef __cplusplus 40 | } /*extern "C"*/ 41 | #endif 42 | 43 | #endif /*LV_EXAMPLE_FLEX_H*/ 44 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/grid/lv_example_grid.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_grid.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_GRID_H 7 | #define LV_EXAMPLE_GRID_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_grid_1(void); 29 | void lv_example_grid_2(void); 30 | void lv_example_grid_3(void); 31 | void lv_example_grid_4(void); 32 | void lv_example_grid_5(void); 33 | void lv_example_grid_6(void); 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | #ifdef __cplusplus 40 | } /*extern "C"*/ 41 | #endif 42 | 43 | #endif /*LV_EXAMPLE_GRID_H*/ 44 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_5.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Using the Shadow style properties 6 | */ 7 | void lv_example_style_5(void) 8 | { 9 | static lv_style_t style; 10 | lv_style_init(&style); 11 | 12 | /*Set a background color and a radius*/ 13 | lv_style_set_radius(&style, 5); 14 | lv_style_set_bg_opa(&style, LV_OPA_COVER); 15 | lv_style_set_bg_color(&style, lv_palette_lighten(LV_PALETTE_GREY, 1)); 16 | 17 | /*Add a shadow*/ 18 | lv_style_set_shadow_width(&style, 55); 19 | lv_style_set_shadow_color(&style, lv_palette_main(LV_PALETTE_BLUE)); 20 | // lv_style_set_shadow_ofs_x(&style, 10); 21 | // lv_style_set_shadow_ofs_y(&style, 20); 22 | 23 | /*Create an object with the new style*/ 24 | lv_obj_t * obj = lv_obj_create(lv_scr_act()); 25 | lv_obj_add_style(obj, &style, 0); 26 | lv_obj_center(obj); 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/btn/lv_example_btn_1.py: -------------------------------------------------------------------------------- 1 | def event_handler(evt): 2 | code = evt.get_code() 3 | 4 | if code == lv.EVENT.CLICKED: 5 | print("Clicked event seen") 6 | elif code == lv.EVENT.VALUE_CHANGED: 7 | print("Value changed seen") 8 | 9 | # create a simple button 10 | btn1 = lv.btn(lv.scr_act()) 11 | 12 | # attach the callback 13 | btn1.add_event_cb(event_handler,lv.EVENT.ALL, None) 14 | 15 | btn1.align(lv.ALIGN.CENTER,0,-40) 16 | label=lv.label(btn1) 17 | label.set_text("Button") 18 | 19 | # create a toggle button 20 | btn2 = lv.btn(lv.scr_act()) 21 | 22 | # attach the callback 23 | #btn2.add_event_cb(event_handler,lv.EVENT.VALUE_CHANGED,None) 24 | btn2.add_event_cb(event_handler,lv.EVENT.ALL, None) 25 | 26 | btn2.align(lv.ALIGN.CENTER,0,40) 27 | btn2.add_flag(lv.obj.FLAG.CHECKABLE) 28 | btn2.set_height(lv.SIZE.CONTENT) 29 | 30 | label=lv.label(btn2) 31 | label.set_text("Toggle") 32 | label.center() 33 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/keyboard/lv_example_keyboard_1.py: -------------------------------------------------------------------------------- 1 | def ta_event_cb(e,kb): 2 | code = e.get_code() 3 | ta = e.get_target() 4 | if code == lv.EVENT.FOCUSED: 5 | kb.set_textarea(ta) 6 | kb.clear_flag(lv.obj.FLAG.HIDDEN) 7 | 8 | if code == lv.EVENT.DEFOCUSED: 9 | kb.set_textarea(None) 10 | kb.add_flag(lv.obj.FLAG.HIDDEN) 11 | 12 | # Create a keyboard to use it with one of the text areas 13 | kb = lv.keyboard(lv.scr_act()) 14 | 15 | # Create a text area. The keyboard will write here 16 | ta = lv.textarea(lv.scr_act()) 17 | ta.set_width(200) 18 | ta.align(lv.ALIGN.TOP_LEFT, 10, 10) 19 | ta.add_event_cb(lambda e: ta_event_cb(e,kb), lv.EVENT.ALL, None) 20 | ta.set_placeholder_text("Hello") 21 | 22 | ta = lv.textarea(lv.scr_act()) 23 | ta.set_width(200) 24 | ta.align(lv.ALIGN.TOP_RIGHT, -10, 10) 25 | ta.add_event_cb(lambda e: ta_event_cb(e,kb), lv.EVENT.ALL, None) 26 | 27 | kb.set_textarea(ta) 28 | 29 | -------------------------------------------------------------------------------- /lvgl/examples/porting/lv_port_fs_template.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_port_fs_templ.h 3 | * 4 | */ 5 | 6 | /*Copy this file as "lv_port_fs.h" and set this value to "1" to enable content*/ 7 | #if 0 8 | 9 | #ifndef LV_PORT_FS_TEMPL_H 10 | #define LV_PORT_FS_TEMPL_H 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | 16 | /********************* 17 | * INCLUDES 18 | *********************/ 19 | #include "lvgl/lvgl.h" 20 | 21 | /********************* 22 | * DEFINES 23 | *********************/ 24 | 25 | /********************** 26 | * TYPEDEFS 27 | **********************/ 28 | 29 | /********************** 30 | * GLOBAL PROTOTYPES 31 | **********************/ 32 | void lv_port_fs_init(void); 33 | 34 | /********************** 35 | * MACROS 36 | **********************/ 37 | 38 | #ifdef __cplusplus 39 | } /*extern "C"*/ 40 | #endif 41 | 42 | #endif /*LV_PORT_FS_TEMPL_H*/ 43 | 44 | #endif /*Disable/Enable content*/ 45 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/win/lv_example_win_1.py: -------------------------------------------------------------------------------- 1 | def event_handler(e): 2 | code = e.get_code() 3 | obj = e.get_target() 4 | if code == lv.EVENT.CLICKED: 5 | print("Button {:d} clicked".format(obj.get_child_id())) 6 | 7 | 8 | win = lv.win(lv.scr_act(), 60) 9 | btn1 = win.add_btn(lv.SYMBOL.LEFT, 40) 10 | btn1.add_event_cb(event_handler, lv.EVENT.ALL, None) 11 | win.add_title("A title") 12 | btn2=win.add_btn(lv.SYMBOL.RIGHT, 40) 13 | btn2.add_event_cb(event_handler, lv.EVENT.ALL, None) 14 | btn3 = win.add_btn(lv.SYMBOL.CLOSE, 60) 15 | btn3.add_event_cb(event_handler, lv.EVENT.ALL, None) 16 | 17 | cont = win.get_content() # Content can be added here 18 | label = lv.label(cont) 19 | label.set_text("""This is 20 | a pretty 21 | long text 22 | to see how 23 | the window 24 | becomes 25 | scrollable. 26 | 27 | 28 | We need 29 | quite some text 30 | and we will 31 | even put 32 | some more 33 | text to be 34 | sure it 35 | overflows. 36 | """) 37 | -------------------------------------------------------------------------------- /lvgl/src/extra/others/lv_others.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_others.h 3 | * 4 | */ 5 | 6 | #ifndef LV_OTHERS_H 7 | #define LV_OTHERS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "snapshot/lv_snapshot.h" 17 | #include "monkey/lv_monkey.h" 18 | #include "gridnav/lv_gridnav.h" 19 | #include "fragment/lv_fragment.h" 20 | #include "imgfont/lv_imgfont.h" 21 | #include "msg/lv_msg.h" 22 | #include "ime/lv_ime_pinyin.h" 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #ifdef __cplusplus 41 | } /*extern "C"*/ 42 | #endif 43 | 44 | #endif /*LV_OTHERS_H*/ 45 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/obj/lv_example_obj_2.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | 4 | static void drag_event_handler(lv_event_t * e) 5 | { 6 | lv_obj_t * obj = lv_event_get_target(e); 7 | 8 | lv_indev_t * indev = lv_indev_get_act(); 9 | if(indev == NULL) return; 10 | 11 | lv_point_t vect; 12 | lv_indev_get_vect(indev, &vect); 13 | 14 | lv_coord_t x = lv_obj_get_x(obj) + vect.x; 15 | lv_coord_t y = lv_obj_get_y(obj) + vect.y; 16 | lv_obj_set_pos(obj, x, y); 17 | } 18 | 19 | 20 | /** 21 | * Make an object dragable. 22 | */ 23 | void lv_example_obj_2(void) 24 | { 25 | lv_obj_t * obj; 26 | obj = lv_obj_create(lv_scr_act()); 27 | lv_obj_set_size(obj, 150, 100); 28 | lv_obj_add_event_cb(obj, drag_event_handler, LV_EVENT_PRESSING, NULL); 29 | 30 | lv_obj_t * label = lv_label_create(obj); 31 | lv_label_set_text(label, "Drag me"); 32 | lv_obj_center(label); 33 | 34 | } 35 | #endif 36 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/img/lv_example_img_1.py: -------------------------------------------------------------------------------- 1 | #!/opt/bin/lv_micropython -i 2 | import usys as sys 3 | import lvgl as lv 4 | import display_driver 5 | from imagetools import get_png_info, open_png 6 | 7 | # Register PNG image decoder 8 | decoder = lv.img.decoder_create() 9 | decoder.info_cb = get_png_info 10 | decoder.open_cb = open_png 11 | 12 | # Create an image from the png file 13 | try: 14 | with open('../../assets/img_cogwheel_argb.png','rb') as f: 15 | png_data = f.read() 16 | except: 17 | print("Could not find img_cogwheel_argb.png") 18 | sys.exit() 19 | 20 | img_cogwheel_argb = lv.img_dsc_t({ 21 | 'data_size': len(png_data), 22 | 'data': png_data 23 | }) 24 | 25 | img1 = lv.img(lv.scr_act()) 26 | img1.set_src(img_cogwheel_argb) 27 | img1.align(lv.ALIGN.CENTER, 0, -20) 28 | img1.set_size(200, 200) 29 | 30 | img2 = lv.img(lv.scr_act()) 31 | img2.set_src(lv.SYMBOL.OK + "Accept") 32 | img2.align_to(img1, lv.ALIGN.OUT_BOTTOM_MID, 0, 20) 33 | -------------------------------------------------------------------------------- /lvgl/src/extra/lv_extra.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_extra.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXTRA_H 7 | #define LV_EXTRA_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #include "layouts/lv_layouts.h" 18 | #include "libs/lv_libs.h" 19 | #include "others/lv_others.h" 20 | #include "themes/lv_themes.h" 21 | #include "widgets/lv_widgets.h" 22 | 23 | /********************* 24 | * DEFINES 25 | *********************/ 26 | 27 | /********************** 28 | * TYPEDEFS 29 | **********************/ 30 | 31 | /********************** 32 | * GLOBAL PROTOTYPES 33 | **********************/ 34 | 35 | /** 36 | * Initialize the extra components 37 | */ 38 | void lv_extra_init(void); 39 | 40 | /********************** 41 | * MACROS 42 | **********************/ 43 | 44 | #ifdef __cplusplus 45 | } /*extern "C"*/ 46 | #endif 47 | 48 | #endif /*LV_EXTRA_H*/ 49 | -------------------------------------------------------------------------------- /lvgl/examples/scroll/lv_example_scroll.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_scroll.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_SCROLL_H 7 | #define LV_EXAMPLE_SCROLL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | /********************* 18 | * DEFINES 19 | *********************/ 20 | 21 | /********************** 22 | * TYPEDEFS 23 | **********************/ 24 | 25 | /********************** 26 | * GLOBAL PROTOTYPES 27 | **********************/ 28 | void lv_example_scroll_1(void); 29 | void lv_example_scroll_2(void); 30 | void lv_example_scroll_3(void); 31 | void lv_example_scroll_4(void); 32 | void lv_example_scroll_5(void); 33 | void lv_example_scroll_6(void); 34 | 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #ifdef __cplusplus 41 | } /*extern "C"*/ 42 | #endif 43 | 44 | #endif /*LV_EXAMPLE_SCROLL_H*/ 45 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/chart/lv_example_chart_1.py: -------------------------------------------------------------------------------- 1 | # Create a chart 2 | chart = lv.chart(lv.scr_act()) 3 | chart.set_size(200, 150) 4 | chart.center() 5 | chart.set_type(lv.chart.TYPE.LINE) # Show lines and points too 6 | 7 | # Add two data series 8 | ser1 = chart.add_series(lv.palette_main(lv.PALETTE.RED), lv.chart.AXIS.PRIMARY_Y) 9 | ser2 = chart.add_series(lv.palette_main(lv.PALETTE.GREEN), lv.chart.AXIS.SECONDARY_Y) 10 | print(ser2) 11 | # Set next points on ser1 12 | chart.set_next_value(ser1,10) 13 | chart.set_next_value(ser1,10) 14 | chart.set_next_value(ser1,10) 15 | chart.set_next_value(ser1,10) 16 | chart.set_next_value(ser1,10) 17 | chart.set_next_value(ser1,10) 18 | chart.set_next_value(ser1,10) 19 | chart.set_next_value(ser1,30) 20 | chart.set_next_value(ser1,70) 21 | chart.set_next_value(ser1,90) 22 | 23 | # Directly set points on 'ser2' 24 | ser2.y_points = [90, 70, 65, 65, 65, 65, 65, 65, 65, 65] 25 | chart.refresh() # Required after direct set 26 | 27 | -------------------------------------------------------------------------------- /lvgl/demos/music/lv_demo_music_list.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_demo_music_list.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DEMO_MUSIC_LIST_H 7 | #define LV_DEMO_MUSIC_LIST_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_demo_music.h" 17 | #if LV_USE_DEMO_MUSIC 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | /********************** 24 | * TYPEDEFS 25 | **********************/ 26 | 27 | /********************** 28 | * GLOBAL PROTOTYPES 29 | **********************/ 30 | lv_obj_t * _lv_demo_music_list_create(lv_obj_t * parent); 31 | void _lv_demo_music_list_btn_check(uint32_t track_id, bool state); 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | #endif /*LV_USE_DEMO_MUSIC*/ 38 | 39 | #ifdef __cplusplus 40 | } /* extern "C" */ 41 | #endif 42 | 43 | #endif /*LV_DEMO_MUSIC_LIST_H*/ 44 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/grid/lv_example_grid_4.py: -------------------------------------------------------------------------------- 1 | # 2 | # Demonstrate track placement 3 | # 4 | 5 | col_dsc = [60, 60, 60, lv.GRID_TEMPLATE.LAST] 6 | row_dsc = [40, 40, 40, lv.GRID_TEMPLATE.LAST] 7 | 8 | 9 | # Add space between the columns and move the rows to the bottom (end) 10 | 11 | # Create a container with grid 12 | cont = lv.obj(lv.scr_act()) 13 | cont.set_grid_align(lv.GRID_ALIGN.SPACE_BETWEEN, lv.GRID_ALIGN.END) 14 | cont.set_grid_dsc_array(col_dsc, row_dsc) 15 | cont.set_size(300, 220) 16 | cont.center() 17 | 18 | 19 | for i in range(9): 20 | col = i % 3 21 | row = i // 3 22 | 23 | obj = lv.obj(cont) 24 | # Stretch the cell horizontally and vertically too 25 | # Set span to 1 to make the cell 1 column/row sized 26 | obj.set_grid_cell(lv.GRID_ALIGN.STRETCH, col, 1, 27 | lv.GRID_ALIGN.STRETCH, row, 1) 28 | 29 | label = lv.label(obj) 30 | label.set_text("{:d}{:d}".format(col, row)) 31 | label.center() 32 | 33 | -------------------------------------------------------------------------------- /lvgl/examples/porting/lv_port_indev_template.h: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * @file lv_port_indev_templ.h 4 | * 5 | */ 6 | 7 | /*Copy this file as "lv_port_indev.h" and set this value to "1" to enable content*/ 8 | #if 0 9 | 10 | #ifndef LV_PORT_INDEV_TEMPL_H 11 | #define LV_PORT_INDEV_TEMPL_H 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | 17 | /********************* 18 | * INCLUDES 19 | *********************/ 20 | #include "lvgl/lvgl.h" 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | /********************** 31 | * GLOBAL PROTOTYPES 32 | **********************/ 33 | void lv_port_indev_init(void); 34 | 35 | /********************** 36 | * MACROS 37 | **********************/ 38 | 39 | #ifdef __cplusplus 40 | } /*extern "C"*/ 41 | #endif 42 | 43 | #endif /*LV_PORT_INDEV_TEMPL_H*/ 44 | 45 | #endif /*Disable/Enable content*/ 46 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/switch/lv_example_switch_1.py: -------------------------------------------------------------------------------- 1 | def event_handler(e): 2 | code = e.get_code() 3 | obj = e.get_target() 4 | if code == lv.EVENT.VALUE_CHANGED: 5 | if obj.has_state(lv.STATE.CHECKED): 6 | print("State: on") 7 | else: 8 | print("State: off") 9 | 10 | 11 | lv.scr_act().set_flex_flow(lv.FLEX_FLOW.COLUMN) 12 | lv.scr_act().set_flex_align(lv.FLEX_ALIGN.CENTER, lv.FLEX_ALIGN.CENTER, lv.FLEX_ALIGN.CENTER) 13 | 14 | sw = lv.switch(lv.scr_act()) 15 | sw.add_event_cb(event_handler,lv.EVENT.ALL, None) 16 | 17 | sw = lv.switch(lv.scr_act()) 18 | sw.add_state(lv.STATE.CHECKED) 19 | sw.add_event_cb(event_handler, lv.EVENT.ALL, None) 20 | 21 | sw = lv.switch(lv.scr_act()) 22 | sw.add_state(lv.STATE.DISABLED) 23 | sw.add_event_cb(event_handler, lv.EVENT.ALL, None) 24 | 25 | sw = lv.switch(lv.scr_act()) 26 | sw.add_state(lv.STATE.CHECKED | lv.STATE.DISABLED) 27 | sw.add_event_cb(event_handler, lv.EVENT.ALL, None) 28 | 29 | -------------------------------------------------------------------------------- /lvgl/src/extra/libs/lv_libs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_libs.h 3 | * 4 | */ 5 | 6 | #ifndef LV_LIBS_H 7 | #define LV_LIBS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "bmp/lv_bmp.h" 17 | #include "fsdrv/lv_fsdrv.h" 18 | #include "png/lv_png.h" 19 | #include "gif/lv_gif.h" 20 | #include "qrcode/lv_qrcode.h" 21 | #include "sjpg/lv_sjpg.h" 22 | #include "freetype/lv_freetype.h" 23 | #include "rlottie/lv_rlottie.h" 24 | #include "ffmpeg/lv_ffmpeg.h" 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /********************** 39 | * MACROS 40 | **********************/ 41 | 42 | #ifdef __cplusplus 43 | } /*extern "C"*/ 44 | #endif 45 | 46 | #endif /*LV_LIBS_H*/ 47 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_2.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Using the background style properties 6 | */ 7 | void lv_example_style_2(void) 8 | { 9 | static lv_style_t style; 10 | lv_style_init(&style); 11 | lv_style_set_radius(&style, 5); 12 | 13 | /*Make a gradient*/ 14 | lv_style_set_bg_opa(&style, LV_OPA_COVER); 15 | static lv_grad_dsc_t grad; 16 | grad.dir = LV_GRAD_DIR_VER; 17 | grad.stops_count = 2; 18 | grad.stops[0].color = lv_palette_lighten(LV_PALETTE_GREY, 1); 19 | grad.stops[1].color = lv_palette_main(LV_PALETTE_BLUE); 20 | 21 | /*Shift the gradient to the bottom*/ 22 | grad.stops[0].frac = 128; 23 | grad.stops[1].frac = 192; 24 | 25 | lv_style_set_bg_grad(&style, &grad); 26 | 27 | /*Create an object with the new style*/ 28 | lv_obj_t * obj = lv_obj_create(lv_scr_act()); 29 | lv_obj_add_style(obj, &style, 0); 30 | lv_obj_center(obj); 31 | } 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /lvgl/examples/styles/lv_example_style_3.c: -------------------------------------------------------------------------------- 1 | #include "../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Using the border style properties 6 | */ 7 | void lv_example_style_3(void) 8 | { 9 | static lv_style_t style; 10 | lv_style_init(&style); 11 | 12 | /*Set a background color and a radius*/ 13 | lv_style_set_radius(&style, 10); 14 | lv_style_set_bg_opa(&style, LV_OPA_COVER); 15 | lv_style_set_bg_color(&style, lv_palette_lighten(LV_PALETTE_GREY, 1)); 16 | 17 | /*Add border to the bottom+right*/ 18 | lv_style_set_border_color(&style, lv_palette_main(LV_PALETTE_BLUE)); 19 | lv_style_set_border_width(&style, 5); 20 | lv_style_set_border_opa(&style, LV_OPA_50); 21 | lv_style_set_border_side(&style, LV_BORDER_SIDE_BOTTOM | LV_BORDER_SIDE_RIGHT); 22 | 23 | /*Create an object with the new style*/ 24 | lv_obj_t * obj = lv_obj_create(lv_scr_act()); 25 | lv_obj_add_style(obj, &style, 0); 26 | lv_obj_center(obj); 27 | } 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /lvgl/tests/src/lv_test_conf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_conf.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_CONF_H 7 | #define LV_TEST_CONF_H 8 | 9 | #define LV_CONF_SUPPRESS_DEFINE_CHECK 1 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | 15 | /********************* 16 | * INCLUDES 17 | *********************/ 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | void lv_test_assert_fail(void); 24 | #define LV_ASSERT_HANDLER lv_test_assert_fail(); 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | uint32_t custom_tick_get(void); 31 | #define LV_TICK_CUSTOM_SYS_TIME_EXPR custom_tick_get() 32 | 33 | typedef void * lv_user_data_t; 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #ifdef __cplusplus 44 | } /*extern "C"*/ 45 | #endif 46 | 47 | #endif /*LV_TEST_CONF_H*/ 48 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex_3.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_USE_FLEX && LV_BUILD_EXAMPLES 3 | 4 | /** 5 | * Demonstrate flex grow. 6 | */ 7 | void lv_example_flex_3(void) 8 | { 9 | lv_obj_t * cont = lv_obj_create(lv_scr_act()); 10 | lv_obj_set_size(cont, 300, 220); 11 | lv_obj_center(cont); 12 | lv_obj_set_flex_flow(cont, LV_FLEX_FLOW_ROW); 13 | 14 | lv_obj_t * obj; 15 | obj = lv_obj_create(cont); 16 | lv_obj_set_size(obj, 40, 40); /*Fix size*/ 17 | 18 | obj = lv_obj_create(cont); 19 | lv_obj_set_height(obj, 40); 20 | lv_obj_set_flex_grow(obj, 1); /*1 portion from the free space*/ 21 | 22 | obj = lv_obj_create(cont); 23 | lv_obj_set_height(obj, 40); 24 | lv_obj_set_flex_grow(obj, 2); /*2 portion from the free space*/ 25 | 26 | obj = lv_obj_create(cont); 27 | lv_obj_set_size(obj, 40, 40); /*Fix size. It is flushed to the right by the "grow" items*/ 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /lvgl/src/draw/sdl/lv_draw_sdl_stack_blur.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_sdl_stack_blur.h 3 | * 4 | */ 5 | #ifndef LV_DRAW_SDL_STACK_BLUR_H 6 | #define LV_DRAW_SDL_STACK_BLUR_H 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | 12 | /********************* 13 | * INCLUDES 14 | *********************/ 15 | 16 | #include "../../lv_conf_internal.h" 17 | 18 | #if LV_USE_GPU_SDL 19 | 20 | #include "../../misc/lv_color.h" 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | /********************** 31 | * GLOBAL PROTOTYPES 32 | **********************/ 33 | 34 | void lv_stack_blur_grayscale(lv_opa_t * buf, uint16_t w, uint16_t h, uint16_t r); 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #endif /*LV_USE_GPU_SDL*/ 41 | 42 | #ifdef __cplusplus 43 | } /*extern "C"*/ 44 | #endif 45 | 46 | #endif /*LV_DRAW_SDL_STACK_BLUR_H*/ 47 | -------------------------------------------------------------------------------- /lvgl/src/extra/libs/sjpg/tjpgdcnf.h: -------------------------------------------------------------------------------- 1 | /*----------------------------------------------*/ 2 | /* TJpgDec System Configurations R0.03 */ 3 | /*----------------------------------------------*/ 4 | 5 | #define JD_SZBUF 512 6 | /* Specifies size of stream input buffer */ 7 | 8 | #define JD_FORMAT 0 9 | /* Specifies output pixel format. 10 | / 0: RGB888 (24-bit/pix) 11 | / 1: RGB565 (16-bit/pix) 12 | / 2: Grayscale (8-bit/pix) 13 | */ 14 | 15 | #define JD_USE_SCALE 1 16 | /* Switches output descaling feature. 17 | / 0: Disable 18 | / 1: Enable 19 | */ 20 | 21 | #define JD_TBLCLIP 1 22 | /* Use table conversion for saturation arithmetic. A bit faster, but increases 1 KB of code size. 23 | / 0: Disable 24 | / 1: Enable 25 | */ 26 | 27 | #define JD_FASTDECODE 0 28 | /* Optimization level 29 | / 0: Basic optimization. Suitable for 8/16-bit MCUs. 30 | / 1: + 32-bit barrel shifter. Suitable for 32-bit MCUs. 31 | / 2: + Table conversion for huffman decoding (wants 6 << HUFF_BIT bytes of RAM) 32 | */ 33 | 34 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/lv_example_flex_1.py: -------------------------------------------------------------------------------- 1 | # 2 | # A simple row and a column layout with flexbox 3 | # 4 | 5 | # Create a container with ROW flex direction 6 | cont_row = lv.obj(lv.scr_act()) 7 | cont_row.set_size(300, 75) 8 | cont_row.align(lv.ALIGN.TOP_MID, 0, 5) 9 | cont_row.set_flex_flow(lv.FLEX_FLOW.ROW) 10 | 11 | # Create a container with COLUMN flex direction 12 | cont_col = lv.obj(lv.scr_act()) 13 | cont_col.set_size(200, 150) 14 | cont_col.align_to(cont_row, lv.ALIGN.OUT_BOTTOM_MID, 0, 5) 15 | cont_col.set_flex_flow(lv.FLEX_FLOW.COLUMN) 16 | 17 | for i in range(10): 18 | # Add items to the row 19 | obj = lv.btn(cont_row) 20 | obj.set_size(100, lv.pct(100)) 21 | 22 | label = lv.label(obj) 23 | label.set_text("Item: {:d}".format(i)) 24 | label.center() 25 | 26 | # Add items to the column 27 | obj = lv.btn(cont_col) 28 | obj.set_size(lv.pct(100), lv.SIZE.CONTENT) 29 | 30 | label = lv.label(obj) 31 | label.set_text("Item: {:d}".format(i)) 32 | label.center() 33 | 34 | -------------------------------------------------------------------------------- /lvgl/examples/libs/ffmpeg/lv_example_ffmpeg_2.c: -------------------------------------------------------------------------------- 1 | #include "../../lv_examples.h" 2 | #if LV_BUILD_EXAMPLES 3 | #if LV_USE_FFMPEG 4 | 5 | /** 6 | * Open a video from a file 7 | */ 8 | void lv_example_ffmpeg_2(void) 9 | { 10 | /*birds.mp4 is downloaded from http://www.videezy.com (Free Stock Footage by Videezy!) 11 | *https://www.videezy.com/abstract/44864-silhouettes-of-birds-over-the-sunset*/ 12 | lv_obj_t * player = lv_ffmpeg_player_create(lv_scr_act()); 13 | lv_ffmpeg_player_set_src(player, "./lvgl/examples/libs/ffmpeg/birds.mp4"); 14 | lv_ffmpeg_player_set_auto_restart(player, true); 15 | lv_ffmpeg_player_set_cmd(player, LV_FFMPEG_PLAYER_CMD_START); 16 | lv_obj_center(player); 17 | } 18 | 19 | #else 20 | 21 | void lv_example_ffmpeg_2(void) 22 | { 23 | /*TODO 24 | *fallback for online examples*/ 25 | 26 | lv_obj_t * label = lv_label_create(lv_scr_act()); 27 | lv_label_set_text(label, "FFmpeg is not installed"); 28 | lv_obj_center(label); 29 | } 30 | 31 | #endif 32 | #endif 33 | -------------------------------------------------------------------------------- /lvgl/src/draw/lv_draw.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_draw_arc.c 2 | CSRCS += lv_draw.c 3 | CSRCS += lv_draw_img.c 4 | CSRCS += lv_draw_label.c 5 | CSRCS += lv_draw_line.c 6 | CSRCS += lv_draw_mask.c 7 | CSRCS += lv_draw_rect.c 8 | CSRCS += lv_draw_transform.c 9 | CSRCS += lv_draw_layer.c 10 | CSRCS += lv_draw_triangle.c 11 | CSRCS += lv_img_buf.c 12 | CSRCS += lv_img_cache.c 13 | CSRCS += lv_img_decoder.c 14 | 15 | DEPPATH += --dep-path $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw 16 | VPATH += :$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw 17 | 18 | CFLAGS += "-I$(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw" 19 | 20 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/arm2d/lv_draw_arm2d.mk 21 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/nxp/lv_draw_nxp.mk 22 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sdl/lv_draw_sdl.mk 23 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/stm32_dma2d/lv_draw_stm32_dma2d.mk 24 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/sw/lv_draw_sw.mk 25 | include $(LVGL_DIR)/$(LVGL_DIR_NAME)/src/draw/swm341_dma2d/lv_draw_swm341_dma2d.mk 26 | -------------------------------------------------------------------------------- /lvgl/docs/widgets/extra/spinner.md: -------------------------------------------------------------------------------- 1 | # Spinner (lv_spinner) 2 | 3 | ## Overview 4 | The Spinner object is a spinning arc over a ring. 5 | 6 | ## Parts and Styles 7 | The parts are identical to the parts of [lv_arc](/widgets/core/arc). 8 | 9 | ## Usage 10 | 11 | ### Create a spinner 12 | 13 | To create a spinner use `lv_spinner_create(parent, spin_time, arc_length)`. `spin time` sets the spin time in milliseconds, `arc_length` sets the length of the spinning arc in degrees. 14 | 15 | ## Events 16 | No special events are sent to the Spinner. 17 | 18 | See the events of the [Arc](/widgets/core/arc) too. 19 | 20 | Learn more about [Events](/overview/event). 21 | 22 | ## Keys 23 | No *Keys* are processed by the object type. 24 | 25 | Learn more about [Keys](/overview/indev). 26 | 27 | 28 | 29 | ## Example 30 | 31 | ```eval_rst 32 | 33 | .. include:: ../../../examples/widgets/spinner/index.rst 34 | 35 | ``` 36 | 37 | ## API 38 | 39 | ```eval_rst 40 | 41 | .. doxygenfile:: lv_spinner.h 42 | :project: lvgl 43 | 44 | ``` 45 | -------------------------------------------------------------------------------- /lvgl/examples/widgets/label/lv_example_label_2.py: -------------------------------------------------------------------------------- 1 | # 2 | # Create a fake text shadow 3 | # 4 | 5 | # Create a style for the shadow 6 | style_shadow = lv.style_t() 7 | style_shadow.init() 8 | style_shadow.set_text_opa(lv.OPA._30) 9 | style_shadow.set_text_color(lv.color_black()) 10 | 11 | # Create a label for the shadow first (it's in the background) 12 | shadow_label = lv.label(lv.scr_act()) 13 | shadow_label.add_style(style_shadow, 0) 14 | 15 | # Create the main label 16 | main_label = lv.label(lv.scr_act()) 17 | main_label.set_text("A simple method to create\n" 18 | "shadows on a text.\n" 19 | "It even works with\n\n" 20 | "newlines and spaces.") 21 | 22 | # Set the same text for the shadow label 23 | shadow_label.set_text(lv.label.get_text(main_label)) 24 | 25 | # Position the main label 26 | main_label.align(lv.ALIGN.CENTER, 0, 0) 27 | 28 | # Shift the second label down and to the right by 2 pixel 29 | shadow_label.align_to(main_label, lv.ALIGN.TOP_LEFT, 2, 2) 30 | 31 | -------------------------------------------------------------------------------- /lvgl/examples/others/lv_example_others.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_others.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_OTHERS_H 7 | #define LV_EXAMPLE_OTHERS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "snapshot/lv_example_snapshot.h" 17 | #include "monkey/lv_example_monkey.h" 18 | #include "gridnav/lv_example_gridnav.h" 19 | #include "fragment/lv_example_fragment.h" 20 | #include "imgfont/lv_example_imgfont.h" 21 | #include "msg/lv_example_msg.h" 22 | #include "ime/lv_example_ime_pinyin.h" 23 | 24 | /********************* 25 | * DEFINES 26 | *********************/ 27 | 28 | /********************** 29 | * TYPEDEFS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL PROTOTYPES 34 | **********************/ 35 | 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | #ifdef __cplusplus 41 | } /*extern "C"*/ 42 | #endif 43 | 44 | #endif /*LV_EXAMPLE_OTHERS_H*/ 45 | -------------------------------------------------------------------------------- /lvgl/env_support/cmake/micropython.cmake: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCES ${LVGL_ROOT_DIR}/src/*.c) 2 | file(GLOB_RECURSE EXAMPLE_SOURCES ${LVGL_ROOT_DIR}/examples/*.c) 3 | 4 | # With micropython, build lvgl as interface library, link chain is: 5 | # lvgl_interface [lvgl] → usermod_lvgl_bindings [lv_bindings] → usermod 6 | # [micropython] → firmware [micropython] 7 | add_library(lvgl_interface INTERFACE) 8 | # ${SOURCES} must NOT be given to add_library directly for some reason (won't be 9 | # built) 10 | target_sources(lvgl_interface INTERFACE ${SOURCES}) 11 | # Micropython builds with -Werror; we need to suppress some warnings, such as: 12 | # 13 | # /home/test/build/lv_micropython/ports/rp2/build-PICO/lv_mp.c:29316:16: error: 14 | # 'lv_style_transition_dsc_t_path_xcb_callback' defined but not used 15 | # [-Werror=unused-function] 29316 | STATIC int32_t 16 | # lv_style_transition_dsc_t_path_xcb_callback(const struct _lv_anim_t * arg0) | 17 | # ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 18 | target_compile_options(lvgl_interface INTERFACE -Wno-unused-function) 19 | -------------------------------------------------------------------------------- /lvgl/examples/libs/lv_example_libs.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_example_libs.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLE_LIBS_H 7 | #define LV_EXAMPLE_LIBS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "bmp/lv_example_bmp.h" 17 | #include "gif/lv_example_gif.h" 18 | #include "png/lv_example_png.h" 19 | #include "sjpg/lv_example_sjpg.h" 20 | #include "qrcode/lv_example_qrcode.h" 21 | #include "freetype/lv_example_freetype.h" 22 | #include "rlottie/lv_example_rlottie.h" 23 | #include "ffmpeg/lv_example_ffmpeg.h" 24 | 25 | /********************* 26 | * DEFINES 27 | *********************/ 28 | 29 | /********************** 30 | * TYPEDEFS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL PROTOTYPES 35 | **********************/ 36 | 37 | /********************** 38 | * MACROS 39 | **********************/ 40 | 41 | #ifdef __cplusplus 42 | } /*extern "C"*/ 43 | #endif 44 | 45 | #endif /*LV_EXAMPLE_LIBS_H*/ 46 | -------------------------------------------------------------------------------- /lvgl/docs/libs/png.md: -------------------------------------------------------------------------------- 1 | 2 | # PNG decoder 3 | 4 | Allow the use of PNG images in LVGL. This implementation uses [lodepng](https://github.com/lvandeve/lodepng) library. 5 | 6 | If enabled in `lv_conf.h` by `LV_USE_PNG` LVGL will register a new image decoder automatically so PNG files can be directly used as any other image sources. 7 | 8 | Note that, a file system driver needs to registered to open images from files. Read more about it [here](https://docs.lvgl.io/master/overview/file-system.html) or just enable one in `lv_conf.h` with `LV_USE_FS_...` 9 | 10 | The whole PNG image is decoded so during decoding RAM equals to `image width x image height x 4` bytes are required. 11 | 12 | As it might take significant time to decode PNG images LVGL's [images caching](https://docs.lvgl.io/master/overview/image.html#image-caching) feature can be useful. 13 | 14 | ## Example 15 | ```eval_rst 16 | 17 | .. include:: ../../examples/libs/png/index.rst 18 | 19 | ``` 20 | 21 | ## API 22 | 23 | ```eval_rst 24 | 25 | .. doxygenfile:: lv_png.h 26 | :project: lvgl 27 | 28 | -------------------------------------------------------------------------------- /lvgl/src/draw/lv_draw_triangle.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_draw_triangle.h 3 | * 4 | */ 5 | 6 | #ifndef LV_DRAW_TRIANGLE_H 7 | #define LV_DRAW_TRIANGLE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "lv_draw_rect.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | 22 | /********************** 23 | * TYPEDEFS 24 | **********************/ 25 | 26 | /********************** 27 | * GLOBAL PROTOTYPES 28 | **********************/ 29 | 30 | void lv_draw_polygon(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * draw_dsc, const lv_point_t points[], 31 | uint16_t point_cnt); 32 | 33 | void lv_draw_triangle(struct _lv_draw_ctx_t * draw_ctx, const lv_draw_rect_dsc_t * draw_dsc, const lv_point_t points[]); 34 | /********************** 35 | * MACROS 36 | **********************/ 37 | 38 | #ifdef __cplusplus 39 | } /*extern "C"*/ 40 | #endif 41 | 42 | #endif /*LV_DRAW_TRIANGLE_H*/ 43 | -------------------------------------------------------------------------------- /lvgl/examples/layouts/flex/index.rst: -------------------------------------------------------------------------------- 1 | A simple row and a column layout with flexbox 2 | """"""""""""""""""""""""""""""""""""""""""""""" 3 | 4 | .. lv_example:: layouts/flex/lv_example_flex_1 5 | :language: c 6 | 7 | Arrange items in rows with wrap and even spacing 8 | """"""""""""""""""""""""""""""""""""""""""""""""" 9 | 10 | .. lv_example:: layouts/flex/lv_example_flex_2 11 | :language: c 12 | 13 | Demonstrate flex grow 14 | """"""""""""""""""""""" 15 | 16 | .. lv_example:: layouts/flex/lv_example_flex_3 17 | :language: c 18 | 19 | Demonstrate flex grow. 20 | """"""""""""""""""""""" 21 | 22 | .. lv_example:: layouts/flex/lv_example_flex_4 23 | :language: c 24 | 25 | Demonstrate column and row gap style properties 26 | """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" 27 | 28 | .. lv_example:: layouts/flex/lv_example_flex_5 29 | :language: c 30 | 31 | RTL base direction changes order of the items 32 | """"""""""""""""""""""""""""""""""""""""""""""" 33 | 34 | .. lv_example:: layouts/flex/lv_example_flex_6 35 | :language: c 36 | 37 | 38 | --------------------------------------------------------------------------------