├── lv_drivers ├── docs │ ├── astyle_h │ └── astyle_c ├── display │ ├── display.mk │ ├── ST7565.h │ ├── monitor.h │ ├── R61581.h │ └── fbdev.h ├── indev │ ├── indev.mk │ ├── XPT2046.h │ ├── FT5406EE8.h │ ├── evdev.h │ ├── mouse.h │ ├── encoder.h │ ├── mousewheel.h │ ├── keyboard.h │ ├── encoder.c │ ├── mouse.c │ └── mousewheel.c └── README.md ├── lv_examples ├── docs │ ├── astyle_h │ └── astyle_c ├── lv_apps │ ├── demo │ │ ├── bubble_pattern.png │ │ ├── demo.mk │ │ └── demo.h │ ├── benchmark │ │ ├── benchmark_bg.png │ │ ├── benchmark.mk │ │ └── benchmark.h │ ├── tpcal │ │ ├── tpcal.mk │ │ └── tpcal.h │ ├── sysmon │ │ ├── sysmon.mk │ │ └── sysmon.h │ └── terminal │ │ ├── terminal.mk │ │ └── terminal.h ├── lv_tutorial │ ├── 5_antialiasing │ │ ├── apple.png │ │ ├── apple_chroma.png │ │ ├── lv_tutorial_antialiasing.mk │ │ └── lv_tutorial_antialiasing.h │ ├── 6_images │ │ ├── blue_flower.jpg │ │ ├── red_flower.png │ │ ├── blue_flower_8.bin │ │ ├── blue_flower_16.bin │ │ ├── blue_flower_32.bin │ │ ├── blue_flower_16_swap.bin │ │ ├── lv_tutorial_images.mk │ │ └── lv_tutorial_images.h │ ├── 3_styles │ │ ├── lv_tutorial_styles.mk │ │ └── lv_tutorial_styles.h │ ├── 4_themes │ │ ├── lv_tutorial_themes.mk │ │ ├── lv_tutorial_themes.h │ │ └── lv_tutorial_themes.c │ ├── 0_porting │ │ ├── lv_tutorial_porting.mk │ │ └── lv_tutorial_porting.h │ ├── 2_objects │ │ ├── lv_tutorial_objects.mk │ │ └── lv_tutorial_objects.h │ ├── 8_animations │ │ ├── lv_tutorial_animations.mk │ │ └── lv_tutorial_animations.h │ ├── 9_responsive │ │ ├── lv_tutorial_responsive.mk │ │ └── lv_tutorial_responsive.h │ ├── 1_hello_world │ │ ├── lv_tutorial_hello_world.mk │ │ ├── lv_tutorial_hello_world.h │ │ └── lv_tutorial_hello_world.c │ ├── 10_keyboard │ │ ├── lv_tutorial_keyboard.mk │ │ └── lv_tutorial_keyboard.h │ └── 7_fonts │ │ ├── lv_tutorial_fonts.mk │ │ └── lv_tutorial_fonts.h ├── lv_tests │ ├── lv_test_obj │ │ ├── lv_test_object_1.png │ │ ├── lv_test_obj.mk │ │ └── lv_test_obj.h │ ├── lv_test_group │ │ ├── lv_test_group_1.png │ │ ├── lv_test_group.mk │ │ └── lv_test_group.h │ ├── lv_test_stress │ │ ├── lv_test_stress.png │ │ ├── lv_test_stress.mk │ │ └── lv_test_stress.h │ ├── lv_test_theme │ │ ├── lv_test_theme_1.png │ │ ├── lv_test_theme.mk │ │ └── lv_test_theme.h │ ├── lv_test_objx │ │ ├── lv_test_arc │ │ │ ├── lv_test_arc_1.png │ │ │ ├── lv_test_arc.mk │ │ │ ├── lv_test_arc.h │ │ │ └── lv_test_arc.c │ │ ├── lv_test_bar │ │ │ ├── lv_test_bar_1.png │ │ │ ├── lv_test_bar.mk │ │ │ ├── lv_test_bar.h │ │ │ └── lv_test_bar.c │ │ ├── lv_test_btn │ │ │ ├── lv_test_btn_1.png │ │ │ ├── lv_test_btn.mk │ │ │ └── lv_test_btn.h │ │ ├── lv_test_cb │ │ │ ├── lv_test_cb_1.png │ │ │ ├── lv_test_cb.mk │ │ │ └── lv_test_cb.h │ │ ├── lv_test_img │ │ │ ├── flower_icon.png │ │ │ ├── lv_test_img_1.png │ │ │ ├── lv_test_img.mk │ │ │ ├── lv_test_img.h │ │ │ └── lv_test_img.c │ │ ├── lv_test_kb │ │ │ ├── lv_test_kb_1.png │ │ │ ├── lv_test_kb_2.png │ │ │ ├── lv_test_kb.mk │ │ │ ├── lv_test_kb.h │ │ │ └── lv_test_kb.c │ │ ├── lv_test_led │ │ │ ├── lv_test_led_1.png │ │ │ ├── lv_test_led.mk │ │ │ ├── lv_test_led.h │ │ │ └── lv_test_led.c │ │ ├── lv_test_sw │ │ │ ├── lv_test_sw_1.png │ │ │ ├── lv_test_sw.mk │ │ │ ├── lv_test_sw.h │ │ │ └── lv_test_sw.c │ │ ├── lv_test_ta │ │ │ ├── lv_test_ta_1.png │ │ │ ├── lv_test_ta_2.png │ │ │ ├── lv_test_ta.mk │ │ │ └── lv_test_ta.h │ │ ├── lv_test_win │ │ │ ├── lv_test_win_1.png │ │ │ ├── lv_test_win.mk │ │ │ ├── lv_test_win.h │ │ │ └── lv_test_win.c │ │ ├── lv_test_btnm │ │ │ ├── lv_test_btnm_1.png │ │ │ ├── lv_test_btnm.mk │ │ │ ├── lv_test_btnm.h │ │ │ └── lv_test_btnm.c │ │ ├── lv_test_cont │ │ │ ├── lv_test_cont_1.png │ │ │ ├── lv_test_cont_2.png │ │ │ ├── lv_test_cont.mk │ │ │ └── lv_test_cont.h │ │ ├── lv_test_line │ │ │ ├── lv_test_line_1.png │ │ │ ├── lv_test_line.mk │ │ │ ├── lv_test_line.h │ │ │ └── lv_test_line.c │ │ ├── lv_test_list │ │ │ ├── lv_test_list_1.png │ │ │ ├── lv_test_list.mk │ │ │ └── lv_test_list.h │ │ ├── lv_test_mbox │ │ │ ├── lv_test_mbox_1.png │ │ │ ├── lv_test_mbox.mk │ │ │ └── lv_test_mbox.h │ │ ├── lv_test_page │ │ │ ├── lv_test_page_1.png │ │ │ ├── lv_test_page_2.png │ │ │ ├── lv_test_page.mk │ │ │ └── lv_test_page.h │ │ ├── lv_test_chart │ │ │ ├── lv_test_chart_1.png │ │ │ ├── lv_test_chart.mk │ │ │ └── lv_test_chart.h │ │ ├── lv_test_gauge │ │ │ ├── lv_test_gauge_1.png │ │ │ ├── lv_test_gauge.mk │ │ │ ├── lv_test_gauge.h │ │ │ └── lv_test_gauge.c │ │ ├── lv_test_label │ │ │ ├── lv_test_label_1.png │ │ │ ├── lv_test_label_2.png │ │ │ ├── lv_test_label_3.png │ │ │ ├── lv_test_label_4.png │ │ │ ├── lv_test_label.mk │ │ │ └── lv_test_label.h │ │ ├── lv_test_ddlist │ │ │ ├── lv_test_ddlist_1.png │ │ │ ├── lv_test_ddlist.mk │ │ │ ├── lv_test_ddlist.h │ │ │ └── lv_test_ddlist.c │ │ ├── lv_test_imgbtn │ │ │ ├── lv_test_imgbtn_1.png │ │ │ ├── lv_test_imgbtn.mk │ │ │ ├── lv_test_imgbtn.h │ │ │ └── lv_test_imgbtn.c │ │ ├── lv_test_lmeter │ │ │ ├── lv_test_lmeter_1.png │ │ │ ├── lv_test_lmeter.mk │ │ │ ├── lv_test_lmeter.h │ │ │ └── lv_test_lmeter.c │ │ ├── lv_test_roller │ │ │ ├── lv_test_roller_1.png │ │ │ ├── lv_test_roller.mk │ │ │ ├── lv_test_roller.h │ │ │ └── lv_test_roller.c │ │ ├── lv_test_slider │ │ │ ├── lv_test_slider_1.png │ │ │ ├── lv_test_slider.mk │ │ │ ├── lv_test_slider.h │ │ │ └── lv_test_slider.c │ │ ├── lv_test_preload │ │ │ ├── lv_test_preload_1.png │ │ │ ├── lv_test_preload.mk │ │ │ ├── lv_test_preload.h │ │ │ └── lv_test_preload.c │ │ └── lv_test_tabview │ │ │ ├── lv_test_tabview_1.png │ │ │ ├── lv_test_tabview.mk │ │ │ └── lv_test_tabview.h │ ├── lv_test_misc │ │ └── lv_test_task.h │ └── lv_test.h ├── lv_examples.h ├── lv_ex_conf_templ.h └── README.md ├── SDL2 ├── lib │ ├── SDL2.dll │ ├── libSDL2.a │ ├── libSDL2.dll.a │ ├── libSDL2_test.a │ ├── libSDL2main.a │ ├── cmake │ │ └── SDL2 │ │ │ └── sdl2-config.cmake │ ├── pkgconfig │ │ └── sdl2.pc │ ├── libSDL2main.la │ ├── libSDL2_test.la │ └── libSDL2.la ├── SDL_revision.h ├── SDL_opengles2_gl2platform.h ├── SDL_types.h ├── SDL_name.h ├── SDL_opengles.h ├── close_code.h ├── SDL_opengles2.h ├── SDL_test_memory.h ├── SDL_test_log.h ├── SDL_clipboard.h ├── SDL_test.h ├── SDL_quit.h ├── SDL_test_compare.h ├── SDL_gesture.h ├── SDL_test_images.h ├── SDL_error.h ├── SDL_touch.h ├── SDL_power.h ├── SDL_test_font.h └── SDL_loadso.h ├── README.md ├── Dockerfile ├── licence.txt └── lv_ex_conf.h /lv_drivers/docs/astyle_h: -------------------------------------------------------------------------------- 1 | --convert-tabs --indent=spaces=4 2 | -------------------------------------------------------------------------------- /lv_examples/docs/astyle_h: -------------------------------------------------------------------------------- 1 | --convert-tabs --indent=spaces=4 2 | -------------------------------------------------------------------------------- /SDL2/lib/SDL2.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/SDL2/lib/SDL2.dll -------------------------------------------------------------------------------- /SDL2/lib/libSDL2.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/SDL2/lib/libSDL2.a -------------------------------------------------------------------------------- /SDL2/lib/libSDL2.dll.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/SDL2/lib/libSDL2.dll.a -------------------------------------------------------------------------------- /SDL2/lib/libSDL2_test.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/SDL2/lib/libSDL2_test.a -------------------------------------------------------------------------------- /SDL2/lib/libSDL2main.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/SDL2/lib/libSDL2main.a -------------------------------------------------------------------------------- /SDL2/SDL_revision.h: -------------------------------------------------------------------------------- 1 | #define SDL_REVISION "hg-12373:8feb5da6f2fb" 2 | #define SDL_REVISION_NUMBER 12373 3 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/demo/bubble_pattern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_apps/demo/bubble_pattern.png -------------------------------------------------------------------------------- /lv_examples/lv_apps/benchmark/benchmark_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_apps/benchmark/benchmark_bg.png -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/5_antialiasing/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tutorial/5_antialiasing/apple.png -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/6_images/blue_flower.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tutorial/6_images/blue_flower.jpg -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/6_images/red_flower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tutorial/6_images/red_flower.png -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/6_images/blue_flower_8.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tutorial/6_images/blue_flower_8.bin -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_obj/lv_test_object_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_obj/lv_test_object_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/6_images/blue_flower_16.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tutorial/6_images/blue_flower_16.bin -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/6_images/blue_flower_32.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tutorial/6_images/blue_flower_32.bin -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Qt-Creator project to run LittlevGL PC Simulator for Windows 2 | ### read tutorial on littlevgl blog: https://blog.littlevgl.com/2019-01-03/qt-creator 3 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_group/lv_test_group_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_group/lv_test_group_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_stress/lv_test_stress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_stress/lv_test_stress.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_theme/lv_test_theme_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_theme/lv_test_theme_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/5_antialiasing/apple_chroma.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tutorial/5_antialiasing/apple_chroma.png -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/6_images/blue_flower_16_swap.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tutorial/6_images/blue_flower_16_swap.bin -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_btn/lv_test_btn_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_btn/lv_test_btn_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_cb/lv_test_cb_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_cb/lv_test_cb_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_img/flower_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_img/flower_icon.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb_2.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta_2.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont_2.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_list/lv_test_list_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_list/lv_test_list_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_mbox/lv_test_mbox_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_mbox/lv_test_mbox_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page_2.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_chart/lv_test_chart_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_chart/lv_test_chart_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_2.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_3.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label_4.png -------------------------------------------------------------------------------- /lv_drivers/docs/astyle_c: -------------------------------------------------------------------------------- 1 | --style=kr --convert-tabs --indent=spaces=4 --indent-switches --pad-oper --unpad-paren --align-pointer=middle --suffix=.bak --lineend=linux --min-conditional-indent= 2 | -------------------------------------------------------------------------------- /lv_examples/docs/astyle_c: -------------------------------------------------------------------------------- 1 | --style=kr --convert-tabs --indent=spaces=4 --indent-switches --pad-oper --unpad-paren --align-pointer=middle --suffix=.bak --lineend=linux --min-conditional-indent= 2 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload_1.png -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_tabview/lv_test_tabview_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ScarsFun/pc_simulator/HEAD/lv_examples/lv_tests/lv_test_objx/lv_test_tabview/lv_test_tabview_1.png -------------------------------------------------------------------------------- /lv_examples/lv_apps/tpcal/tpcal.mk: -------------------------------------------------------------------------------- 1 | CSRCS += tpcal.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_apps/tpcal 4 | VPATH += :lv_examples/lv_apps/tpcal 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/tpcal" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/sysmon/sysmon.mk: -------------------------------------------------------------------------------- 1 | CSRCS += sysmon.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_apps/sysmon 4 | VPATH += :lv_examples/lv_apps/sysmon 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/sysmon" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/terminal/terminal.mk: -------------------------------------------------------------------------------- 1 | CSRCS += terminal.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_apps/terminal 4 | VPATH += :lv_examples/lv_apps/terminal 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/terminal" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/demo/demo.mk: -------------------------------------------------------------------------------- 1 | CSRCS += demo.c 2 | CSRCS += img_bubble_pattern.c 3 | 4 | DEPPATH += --dep-path lv_examples/lv_apps/demo 5 | VPATH += :lv_examples/lv_apps/demo 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/demo" 8 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_obj/lv_test_obj.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_obj.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_obj 4 | VPATH += :lv_examples/lv_tests/lv_test_obj 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_obj" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/benchmark/benchmark.mk: -------------------------------------------------------------------------------- 1 | CSRCS += benchmark.c 2 | CSRCS += benchmark_bg.c 3 | 4 | DEPPATH += --dep-path lv_examples/lv_apps/benchmark 5 | VPATH += :lv_examples/lv_apps/benchmark 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_apps/benchmark" 8 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_group/lv_test_group.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_group.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_group 4 | VPATH += :lv_examples/lv_tests/lv_test_group 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_group" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_theme/lv_test_theme.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_theme.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_theme 4 | VPATH += :lv_examples/lv_tests/lv_test_theme 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_theme" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/3_styles/lv_tutorial_styles.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_styles.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tutorial/3_styles 4 | VPATH += :lv_examples/lv_tutorial/3_styles 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/3_styles" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/4_themes/lv_tutorial_themes.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_themes.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tutorial/4_themes 4 | VPATH += :lv_examples/lv_tutorial/4_themes 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/4_themes" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_stress/lv_test_stress.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_stress.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_stress 4 | VPATH += :lv_examples/lv_tests/lv_test_stress 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_stress" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/0_porting/lv_tutorial_porting.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_porting.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tutorial/0_porting 4 | VPATH += :lv_examples/lv_tutorial/0_porting 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/0_porting" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/2_objects/lv_tutorial_objects.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_objects.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tutorial/2_objects 4 | VPATH += :lv_examples/lv_tutorial/2_objects 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/2_objects" 7 | -------------------------------------------------------------------------------- /lv_drivers/display/display.mk: -------------------------------------------------------------------------------- 1 | CSRCS += fbdev.c 2 | CSRCS += monitor.c 3 | CSRCS += R61581.c 4 | CSRCS += SSD1963.c 5 | CSRCS += ST7565.c 6 | 7 | DEPPATH += --dep-path lv_drivers/display 8 | VPATH += :lv_drivers/display 9 | 10 | CFLAGS += "-I$(LVGL_DIR)/lv_drivers/display" 11 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/6_images/lv_tutorial_images.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_images.c 2 | CSRCS += red_flower.c 3 | 4 | DEPPATH += --dep-path lv_examples/lv_tutorial/6_images 5 | VPATH += :lv_examples/lv_tutorial/6_images 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/6_images" 8 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/8_animations/lv_tutorial_animations.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_animations.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tutorial/8_animations 4 | VPATH += :lv_examples/lv_tutorial/8_animations 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/8_animations" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/9_responsive/lv_tutorial_responsive.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_responsive.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tutorial/9_responsive 4 | VPATH += :lv_examples/lv_tutorial/9_responsive 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/9_responsive" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/1_hello_world/lv_tutorial_hello_world.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_hello_world.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tutorial/1_hello_world 4 | VPATH += :lv_examples/lv_tutorial/1_hello_world 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/1_hello_world" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_cb/lv_test_cb.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_cb.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_cb 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_cb 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_cb" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_kb.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_kb 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_kb 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_kb" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_sw.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_sw 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_sw 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_sw" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_ta.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_ta 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_ta 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_ta" 7 | -------------------------------------------------------------------------------- /lv_drivers/indev/indev.mk: -------------------------------------------------------------------------------- 1 | CSRCS += FT5406EE8.c 2 | CSRCS += keyboard.c 3 | CSRCS += mouse.c 4 | CSRCS += encoder.c 5 | CSRCS += evdev.c 6 | CSRCS += XPT2046.c 7 | 8 | DEPPATH += --dep-path lv_drivers/indev 9 | VPATH += :lv_drivers/indev 10 | 11 | CFLAGS += "-I$(LVGL_DIR)/lv_drivers/indev" 12 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_arc.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_arc 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_arc 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_arc" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_bar.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_bar 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_bar 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_bar" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_btn/lv_test_btn.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_btn.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_btn 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_btn 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_btn" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_led.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_led 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_led 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_led" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_win.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_win 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_win 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_win" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_btnm.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_btnm 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_btnm 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_btnm" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_cont.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_cont 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_cont 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_cont" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_line.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_line 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_line 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_line" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_list/lv_test_list.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_list.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_list 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_list 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_list" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_mbox/lv_test_mbox.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_mbox.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_mbox 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_mbox 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_mbox" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_page.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_page 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_page 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_page" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_chart/lv_test_chart.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_chart.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_chart 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_chart 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_chart" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_gauge.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_gauge 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_gauge 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_gauge" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_label.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_label 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_label 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_label" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_ddlist.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_ddlist 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_ddlist 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_ddlist" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_imgbtn.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_lmeter.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_lmeter 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_lmeter 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_lmeter" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_roller.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_roller 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_roller 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_roller" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_slider.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_slider_bar 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_slider 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_slider" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/10_keyboard/lv_tutorial_keyboard.mk: -------------------------------------------------------------------------------- 1 | #CSRCS += lv_tutorial_keyboard_simkpad.c 2 | CSRCS += lv_tutorial_keyboard.c 3 | 4 | DEPPATH += --dep-path lv_examples/lv_tutorial/10_keyboard 5 | VPATH += :lv_examples/lv_tutorial/10_keyboard 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/10_keyboard" 8 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_preload.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_preload 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_preload 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_preload" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_tabview/lv_test_tabview.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_tabview.c 2 | 3 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_tabview 4 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_tabview 5 | 6 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_tabview" 7 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_test_img.c 2 | CSRCS += img_flower_icon.c 3 | 4 | DEPPATH += --dep-path lv_examples/lv_tests/lv_test_objx/lv_test_img 5 | VPATH += :lv_examples/lv_tests/lv_test_objx/lv_test_img 6 | 7 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tests/lv_test_objx/lv_test_img" 8 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/7_fonts/lv_tutorial_fonts.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_fonts.c 2 | CSRCS += arial_ascii_20.c 3 | CSRCS += arial_cyrillic_20.c 4 | CSRCS += arial_math_20.c 5 | 6 | DEPPATH += --dep-path lv_examples/lv_tutorial/7_fonts 7 | VPATH += :lv_examples/lv_tutorial/7_fonts 8 | 9 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/7_fonts" 10 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/5_antialiasing/lv_tutorial_antialiasing.mk: -------------------------------------------------------------------------------- 1 | CSRCS += lv_tutorial_antialiasing.c 2 | CSRCS += apple_icon_alpha.c 3 | CSRCS += apple_icon_chroma.c 4 | 5 | DEPPATH += --dep-path lv_examples/lv_tutorial/5_antialiasing 6 | VPATH += :lv_examples/lv_tutorial/5_antialiasing 7 | 8 | CFLAGS += "-I$(LVGL_DIR)/lv_examples/lv_tutorial/5_antialiasing" 9 | -------------------------------------------------------------------------------- /lv_drivers/README.md: -------------------------------------------------------------------------------- 1 | # Display and Touch pad drivers 2 | 3 | Display controller and touchpad driver to can be directly used with [LittlevGL](https://littlevgl.com). 4 | 5 | To learn more about using drivers in LittlevGL visit the [Porting guide](https://littlevgl.com/porting). 6 | 7 | If you used a new display or touch pad driver with LittlevGL please share it with other people! 8 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | # To see how to do GUI forwarding in macOS: 2 | # https://cntnr.io/running-guis-with-docker-on-mac-os-x-a14df6a76efc 3 | 4 | FROM ubuntu:16.04 5 | 6 | RUN apt update && apt install -y \ 7 | build-essential \ 8 | cmake \ 9 | gcc \ 10 | git \ 11 | libsdl2-dev \ 12 | mesa-utils \ 13 | libgl1-mesa-glx 14 | 15 | RUN git clone --recursive https://github.com/littlevgl/pc_simulator.git \ 16 | && cd pc_simulator \ 17 | && make 18 | 19 | CMD ["./pc_simulator/demo"] 20 | -------------------------------------------------------------------------------- /SDL2/lib/cmake/SDL2/sdl2-config.cmake: -------------------------------------------------------------------------------- 1 | # sdl2 cmake project-config input for ./configure scripts 2 | 3 | set(prefix "/opt/local/x86_64-w64-mingw32") 4 | set(exec_prefix "${prefix}") 5 | set(libdir "${exec_prefix}/lib") 6 | set(SDL2_PREFIX "/opt/local/x86_64-w64-mingw32") 7 | set(SDL2_EXEC_PREFIX "/opt/local/x86_64-w64-mingw32") 8 | set(SDL2_LIBDIR "${exec_prefix}/lib") 9 | set(SDL2_INCLUDE_DIRS "${prefix}/include/SDL2") 10 | set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} -lmingw32 -lSDL2main -lSDL2 -mwindows") 11 | string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES) 12 | -------------------------------------------------------------------------------- /SDL2/lib/pkgconfig/sdl2.pc: -------------------------------------------------------------------------------- 1 | # sdl pkg-config source file 2 | 3 | prefix=/opt/local/x86_64-w64-mingw32 4 | exec_prefix=${prefix} 5 | libdir=${exec_prefix}/lib 6 | includedir=${prefix}/include 7 | 8 | Name: sdl2 9 | Description: Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. 10 | Version: 2.0.9 11 | Requires: 12 | Conflicts: 13 | Libs: -L${libdir} -lmingw32 -lSDL2main -lSDL2 -mwindows 14 | Libs.private: -lmingw32 -lSDL2main -lSDL2 -mwindows -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid -static-libgcc 15 | Cflags: -I${includedir}/SDL2 -Dmain=SDL_main 16 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/demo/demo.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file demo.h 3 | * 4 | */ 5 | 6 | #ifndef DEMO_H 7 | #define DEMO_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #ifdef LV_CONF_INCLUDE_SIMPLE 18 | #include "lvgl.h" 19 | #include "lv_ex_conf.h" 20 | #else 21 | #include "../../../lvgl/lvgl.h" 22 | #include "../../../lv_ex_conf.h" 23 | #endif 24 | 25 | #if USE_LV_DEMO 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Create a demo application 41 | */ 42 | void demo_create(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_DEMO*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*DEMO_H*/ 55 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/sysmon/sysmon.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file symon.h 3 | * 4 | */ 5 | 6 | #ifndef SYSMON_H 7 | #define SYSMON_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | #if USE_LV_DEMO 24 | 25 | /********************* 26 | * DEFINES 27 | *********************/ 28 | 29 | /********************** 30 | * TYPEDEFS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL PROTOTYPES 35 | **********************/ 36 | 37 | /** 38 | * Initialize the system monitor 39 | */ 40 | void sysmon_create(void); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*USE_LV_SYSMON*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* SYSMON_H */ 53 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/tpcal/tpcal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file tpcal.h 3 | * 4 | */ 5 | 6 | #ifndef TPCAL_H 7 | #define TPCAL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | 25 | #if USE_LV_DEMO 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Create a touch pad calibration screen 41 | */ 42 | void tpcal_create(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_TPCAL*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*TP_CAL_H*/ 55 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/0_porting/lv_tutorial_porting.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_ex_porting.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_PORTING_H 7 | #define LV_TUTORIAL_PORTING_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_porting(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_PORTING_H*/ 50 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/2_objects/lv_tutorial_objects.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_objects.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_OBJECTS_H 7 | #define EX_OBJECTS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_objects(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_OBJECTS_H*/ 50 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/4_themes/lv_tutorial_themes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_themes.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_THEMES_H 7 | #define LV_TUTORIAL_THEMES_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_themes(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_THEMES_H*/ 50 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/7_fonts/lv_tutorial_fonts.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_fonts.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_FONTS_H 7 | #define LV_TUTORIAL_FONTS_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | void lv_tutorial_fonts(void); 39 | 40 | /********************** 41 | * MACROS 42 | **********************/ 43 | 44 | #endif /*USE_LV_TUTORIALS*/ 45 | 46 | #ifdef __cplusplus 47 | } /* extern "C" */ 48 | #endif 49 | 50 | #endif /*LV_TUTORIAL_FONTS_H*/ 51 | -------------------------------------------------------------------------------- /lv_drivers/indev/XPT2046.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file XPT2046.h 3 | * 4 | */ 5 | 6 | #ifndef XPT2046_H 7 | #define XPT2046_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_XPT2046 23 | 24 | #include 25 | #include 26 | #include "lvgl/lv_hal/lv_hal_indev.h" 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | void xpt2046_init(void); 40 | bool xpt2046_read(lv_indev_data_t * data); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /* USE_XPT2046 */ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* XPT2046_H */ 53 | -------------------------------------------------------------------------------- /SDL2/SDL_opengles2_gl2platform.h: -------------------------------------------------------------------------------- 1 | #ifndef __gl2platform_h_ 2 | #define __gl2platform_h_ 3 | 4 | /* $Revision: 10602 $ on $Date:: 2010-03-04 22:35:34 -0800 #$ */ 5 | 6 | /* 7 | * This document is licensed under the SGI Free Software B License Version 8 | * 2.0. For details, see http://oss.sgi.com/projects/FreeB/ . 9 | */ 10 | 11 | /* Platform-specific types and definitions for OpenGL ES 2.X gl2.h 12 | * 13 | * Adopters may modify khrplatform.h and this file to suit their platform. 14 | * You are encouraged to submit all modifications to the Khronos group so that 15 | * they can be included in future versions of this file. Please submit changes 16 | * by sending them to the public Khronos Bugzilla (http://khronos.org/bugzilla) 17 | * by filing a bug against product "OpenGL-ES" component "Registry". 18 | */ 19 | 20 | /*#include */ 21 | 22 | #ifndef GL_APICALL 23 | #define GL_APICALL KHRONOS_APICALL 24 | #endif 25 | 26 | #ifndef GL_APIENTRY 27 | #define GL_APIENTRY KHRONOS_APIENTRY 28 | #endif 29 | 30 | #endif /* __gl2platform_h_ */ 31 | -------------------------------------------------------------------------------- /lv_drivers/indev/FT5406EE8.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file FT5406EE8.h 3 | * 4 | */ 5 | 6 | #ifndef FT5406EE8_H 7 | #define FT5406EE8_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_FT5406EE8 23 | 24 | #include 25 | #include 26 | #include "lvgl/lv_hal/lv_hal_indev.h" 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | void ft5406ee8_init(void); 40 | bool ft5406ee8_read(lv_indev_data_t * data); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /* USE_FT5406EE8 */ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* FT5406EE8_H */ 53 | -------------------------------------------------------------------------------- /licence.txt: -------------------------------------------------------------------------------- 1 | MIT licence 2 | Copyright (c) 2016 Gábor Kiss-Vámosi 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 | 6 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 7 | 8 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 9 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/1_hello_world/lv_tutorial_hello_world.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_hello_world 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_HELLO_WORLD_H 7 | #define LV_TUTORIAL_HELLO_WORLD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_hello_world(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* extern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_HELLO_WORLD_H*/ 50 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/9_responsive/lv_tutorial_responsive.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_responsive.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_RESPONSIVE_H 7 | #define LV_TUTORIAL_RESPONSIVE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | void lv_tutorial_responsive(void); 39 | 40 | /********************** 41 | * MACROS 42 | **********************/ 43 | 44 | #endif /*USE_LV_TUTORIALS*/ 45 | 46 | #ifdef __cplusplus 47 | } /* extern "C" */ 48 | #endif 49 | 50 | #endif /*LV_TUTORIAL_ANTMATION_H*/ 51 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_obj/lv_test_obj.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_object.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_OBJECT_H 7 | #define LV_TEST_OBJECT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create base objects to test their functionalities 40 | */ 41 | void lv_test_object_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /* USE_LV_TESTS */ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_stress/lv_test_stress.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_object.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_OBJECT_H 7 | #define LV_TEST_OBJECT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create and delete a lot of objects and animations. 40 | */ 41 | void lv_test_stress_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /SDL2/lib/libSDL2main.la: -------------------------------------------------------------------------------- 1 | # libSDL2main.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='' 9 | 10 | # Names of this library. 11 | library_names='' 12 | 13 | # The name of the static archive. 14 | old_library='libSDL2main.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs='' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libSDL2main. 26 | current=0 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/Users/valve/release/SDL/SDL2-2.0.9/x86_64-w64-mingw32/lib' 42 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_cb/lv_test_cb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_cb.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_CB_H 7 | #define LV_TEST_CB_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_CB && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create check boxes to test their functionalities 40 | */ 41 | void lv_test_cb_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_CB && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_CB_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_led.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LED_H 7 | #define LV_TEST_LED_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LED && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create LEDs to test their functionalities 40 | */ 41 | void lv_test_led_1(void); 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*USE_LV_LED && USE_LV_TESTS*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /*LV_TEST_LED_H*/ 53 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_sw.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_SW_H 7 | #define LV_TEST_SW_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_SW && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create switches to test their functionalities 40 | */ 41 | void lv_test_sw_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_SW && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_SW_H*/ 54 | -------------------------------------------------------------------------------- /SDL2/lib/libSDL2_test.la: -------------------------------------------------------------------------------- 1 | # libSDL2_test.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='' 9 | 10 | # Names of this library. 11 | library_names='' 12 | 13 | # The name of the static archive. 14 | old_library='libSDL2_test.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs='' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libSDL2_test. 26 | current=0 27 | age=0 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/Users/valve/release/SDL/SDL2-2.0.9/x86_64-w64-mingw32/lib' 42 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_arc.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_ARC_H 7 | #define LV_TEST_ARC_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_ARC && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create arcs to test their functionalities 40 | */ 41 | void lv_test_arc_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_ARC && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_bar.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_BAR_H 7 | #define LV_TEST_BAR_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_BAR && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create bars to test their functionalities 40 | */ 41 | void lv_test_bar_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_BAR && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_btn/lv_test_btn.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_btn.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_BTN_H 7 | #define LV_TEST_BTN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_BTN && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create buttons to test their functionalities 40 | */ 41 | void lv_test_btn_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_BTN*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*USE_LV_BTN && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_img.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_IMG_H 7 | #define LV_TEST_IMG_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_IMG && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create images to test their functionalities 40 | */ 41 | void lv_test_img_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_IMG*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*USE_LV_IMG && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_win.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_WIN_H 7 | #define LV_TEST_WIN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_WIN && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create windows to test their functionalities 40 | */ 41 | void lv_test_win_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_WIN && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_WIN_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_group/lv_test_group.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_group.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_GROUP_H 7 | #define LV_TEST_GROUP_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_GROUP && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create base groups to test their functionalities 40 | */ 41 | void lv_test_group_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /* USE_LV_GROUP && USE_LV_TESTS */ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/6_images/lv_tutorial_images.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_images.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_IMAGES_H 7 | #define LV_TUTORIAL_IMAGES_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | 39 | /** 40 | * Create images from variable and file 41 | */ 42 | void lv_tutorial_image(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_TUTORIALS*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*LV_TUTORIAL_ANTIALIASING_H*/ 55 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_gauge.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_GAUGE_H 7 | #define LV_TEST_GAUGE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_GAUGE && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create gauges to test their functionalities 40 | */ 41 | void lv_test_gauge_1(void); 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*USE_LV_GAUGE*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /*USE_LV_GAUGE && USE_LV_TESTS*/ 53 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_line.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LINE_H 7 | #define LV_TEST_LINE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LINE && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create lines to test their functionalities 40 | */ 41 | void lv_test_line_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_LINE && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_LINE_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_list/lv_test_list.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_list.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LIST_H 7 | #define LV_TEST_LIST_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LIST && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create lists to test their functionalities 40 | */ 41 | void lv_test_list_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_LIST && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_LIST_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/3_styles/lv_tutorial_styles.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_styles.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_STYLES_H 7 | #define LV_TUTORIAL_STYLES_H 8 | 9 | #ifdef __cplusplus 10 | lv_tutorialtern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void lv_tutorial_styles(void); 38 | 39 | /********************** 40 | * MACROS 41 | **********************/ 42 | 43 | #endif /*USE_LV_TUTORIALS*/ 44 | 45 | #ifdef __cplusplus 46 | } /* lv_tutorialtern "C" */ 47 | #endif 48 | 49 | #endif /*LV_TUTORIAL_STYLES_H*/ 50 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_btnm.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_BTNM_H 7 | #define LV_TEST_BTNM_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_BTNM && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create button matrixes to test their functionalities 40 | */ 41 | void lv_test_btnm_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_BTNM*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /* USE_LV_BTNM && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_chart/lv_test_chart.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_chart.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_CHART_H 7 | #define LV_TEST_CHART_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_BTN && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create charts to test their functionalities 40 | */ 41 | void lv_test_chart_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_BTN && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_CHART_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_mbox/lv_test_mbox.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_mbox.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_MBOX_H 7 | #define LV_TEST_MBOX_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_MBOX && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create message boxes to test their functionalities 40 | */ 41 | void lv_test_mbox_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_MBOX && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_MBOX_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_imgbtn.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_IMGBTN_H 7 | #define LV_TEST_IMGBTN_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_IMGBTN && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create imgbtns to test their functionalities 40 | */ 41 | void lv_test_imgbtn_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_IMGBTN && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_lmeter.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LMETER_H 7 | #define LV_TEST_LMETER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LMETER && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | /** 38 | * Create line meters to test their functionalities 39 | */ 40 | void lv_test_lmeter_1(void); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /*USE_LV_LMETER && USE_LV_TESTS*/ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /*LV_TEST_LMETER_H*/ 53 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_slider.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_SLIDER_H 7 | #define LV_TEST_SLIDER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_SLIDER && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create sliders to test their functionalities 40 | */ 41 | void lv_test_slider_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_SLIDER*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*USE_LV_SLIDER && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_roller.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_ROLLER_H 7 | #define LV_TEST_ROLLER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_ROLLER && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create rollers to test their functionalities 40 | */ 41 | void lv_test_roller_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_ROLLER && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_ROLLER_H*/ 54 | -------------------------------------------------------------------------------- /SDL2/SDL_types.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_types.h 24 | * 25 | * \deprecated 26 | */ 27 | 28 | /* DEPRECATED */ 29 | #include "SDL_stdinc.h" 30 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_ddlist.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_DDLIST_H 7 | #define LV_TEST_DDLIST_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_DDLIST && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create drop down lists to test their functionalities 40 | */ 41 | void lv_test_ddlist_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_DDLIST*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*USE_LV_DDLIST && USE_LV_TESTS*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_preload.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_PRELOAD_H 7 | #define LV_TEST_PRELOAD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_PRELOAD && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create preloads to test their functionalities 40 | */ 41 | void lv_test_preload_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_PRELOAD && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_BAR_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_tabview/lv_test_tabview.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_tabview.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_TABVIEW_H 7 | #define LV_TEST_TABVIEW_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TABVIEW && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create tab views to test their functionalities 40 | */ 41 | void lv_test_tabview_1(void); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_TABVIEW && USE_LV_TESTS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TEST_TABVIEW_H*/ 54 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/8_animations/lv_tutorial_animations.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_animation.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_ANIMATION_H 7 | #define LV_TUTORIAL_ANIMATION_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS && USE_LV_ANIMATION 25 | 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Crate some objects an animate them 41 | */ 42 | void lv_tutorial_animations(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_TUTORIALS*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*LV_TUTORIAL_ANTMATION_H*/ 55 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_theme/lv_test_theme.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_theme.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_THEME_H 7 | #define LV_TEST_THEME_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | 39 | /** 40 | * Create a test screen with a lot objects and apply the given theme on them 41 | * @param th pointer to a theme 42 | */ 43 | void lv_test_theme_1(lv_theme_t *th); 44 | 45 | /********************** 46 | * MACROS 47 | **********************/ 48 | 49 | #endif /*USE_LV_TESTS*/ 50 | 51 | #ifdef __cplusplus 52 | } /* extern "C" */ 53 | #endif 54 | 55 | #endif /*LV_TEST_THEME_H*/ 56 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/benchmark/benchmark.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file benchmark.h 3 | * 4 | */ 5 | 6 | #ifndef BENCHMARK_H 7 | #define BENCHMARK_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | 17 | #ifdef LV_CONF_INCLUDE_SIMPLE 18 | #include "lvgl.h" 19 | #include "lv_ex_conf.h" 20 | #else 21 | #include "../../../lvgl/lvgl.h" 22 | #include "../../../lv_ex_conf.h" 23 | #endif 24 | 25 | #if USE_LV_BENCHMARK 26 | 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | 40 | /** 41 | * Open a graphics benchmark 42 | */ 43 | void benchmark_create(void); 44 | 45 | void benchmark_start(void); 46 | 47 | bool benchmark_is_ready(void); 48 | 49 | uint32_t benchmark_get_refr_time(void); 50 | 51 | /********************** 52 | * MACROS 53 | **********************/ 54 | 55 | #endif /*USE_LV_BENCHMARK*/ 56 | 57 | #ifdef __cplusplus 58 | } /* extern "C" */ 59 | #endif 60 | 61 | #endif /* BENCHMARK_H */ 62 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_ta/lv_test_ta.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_ta.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_TA_H 7 | #define LV_TEST_TA_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TA && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create text areas to test their basic functionalities 40 | */ 41 | void lv_test_ta_1(void); 42 | 43 | /** 44 | * Test cursor modes 45 | */ 46 | void lv_test_ta_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_TA && USE_LV_TESTS*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*LV_TEST_TA_H*/ 59 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_kb.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_KB_H 7 | #define LV_TEST_KB_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_KB && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create a default object and test the basic functions 40 | */ 41 | void lv_test_kb_1(void); 42 | 43 | /** 44 | * Create a styles keyboard 45 | */ 46 | void lv_test_kb_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_KB*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*USE_LV_KB && USE_LV_TESTS*/ 59 | -------------------------------------------------------------------------------- /lv_drivers/display/ST7565.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file ST7565.h 3 | * 4 | */ 5 | 6 | #ifndef ST7565_H 7 | #define ST7565_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_ST7565 23 | 24 | #include 25 | #include "lvgl/lv_misc/lv_color.h" 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | void st7565_init(void); 39 | void st7565_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t * color_p); 40 | void st7565_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); 41 | void st7565_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t * color_p); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /* USE_ST7565 */ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /* ST7565_H */ 54 | -------------------------------------------------------------------------------- /lv_drivers/display/monitor.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file monitor.h 3 | * 4 | */ 5 | 6 | #ifndef MONITOR_H 7 | #define MONITOR_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_MONITOR 23 | 24 | #include "lvgl/lv_misc/lv_color.h" 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | void monitor_init(void); 38 | void monitor_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t *color_p); 39 | void monitor_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); 40 | void monitor_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); 41 | 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /* USE_MONITOR */ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* MONITOR_H */ 53 | -------------------------------------------------------------------------------- /SDL2/lib/libSDL2.la: -------------------------------------------------------------------------------- 1 | # libSDL2.la - a libtool library file 2 | # Generated by libtool (GNU libtool) 2.4.2 3 | # 4 | # Please DO NOT delete this file! 5 | # It is necessary for linking the library. 6 | 7 | # The name that we can dlopen(3). 8 | dlname='../bin/SDL2.dll' 9 | 10 | # Names of this library. 11 | library_names='libSDL2.dll.a' 12 | 13 | # The name of the static archive. 14 | old_library='libSDL2.a' 15 | 16 | # Linker flags that can not go in dependency_libs. 17 | inherited_linker_flags='' 18 | 19 | # Libraries that this one depends upon. 20 | dependency_libs=' -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lsetupapi -lversion -luuid' 21 | 22 | # Names of additional weak libraries provided by this library 23 | weak_library_names='' 24 | 25 | # Version information for libSDL2. 26 | current=9 27 | age=9 28 | revision=0 29 | 30 | # Is this an already installed library? 31 | installed=yes 32 | 33 | # Should we warn about portability when linking against -modules? 34 | shouldnotlink=no 35 | 36 | # Files to dlopen/dlpreopen 37 | dlopen='' 38 | dlpreopen='' 39 | 40 | # Directory that this library needs to be installed in: 41 | libdir='/Users/valve/release/SDL/SDL2-2.0.9/x86_64-w64-mingw32/lib' 42 | -------------------------------------------------------------------------------- /lv_drivers/display/R61581.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file R61581.h 3 | * 4 | */ 5 | 6 | #ifndef R61581_H 7 | #define R61581_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_R61581 23 | 24 | #include 25 | #include "lvgl/lv_misc/lv_color.h" 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | void r61581_init(void); 39 | void r61581_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); 40 | void r61581_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); 41 | void r61581_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); 42 | /********************** 43 | * MACROS 44 | **********************/ 45 | 46 | #endif /* USE_R61581 */ 47 | 48 | #ifdef __cplusplus 49 | } /* extern "C" */ 50 | #endif 51 | 52 | #endif /* R61581_H */ 53 | -------------------------------------------------------------------------------- /lv_examples/lv_apps/terminal/terminal.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file terminal.h 3 | * 4 | */ 5 | 6 | #ifndef TERMINAL_H 7 | #define TERMINAL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_DEMO 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Open a terminal 40 | * @return pointer to the terminal window 41 | */ 42 | lv_obj_t * terminal_create(void); 43 | 44 | /** 45 | * Add data to the terminal 46 | * @param txt_in character sting to add to the terminal 47 | */ 48 | void terminal_add(const char * txt_in); 49 | 50 | /********************** 51 | * MACROS 52 | **********************/ 53 | 54 | #endif /*USE_LV_TERMINAL*/ 55 | 56 | #ifdef __cplusplus 57 | } /* extern "C" */ 58 | #endif 59 | 60 | #endif /* LV_TERMINAL_H */ 61 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_page/lv_test_page.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_page.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_PAGE_H 7 | #define LV_TEST_PAGE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_PAGE && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create pages to test their basic functionalities 40 | */ 41 | void lv_test_page_1(void); 42 | 43 | /** 44 | * Test styling, scrollbar modes, layout and action 45 | */ 46 | void lv_test_page_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_PAGE && USE_LV_TESTS*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*LV_TEST_PAGE_H*/ 59 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_cont/lv_test_cont.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_cont.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_CONT_H 7 | #define LV_TEST_CONT_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_CONT && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create containers to test their basic functionalities 40 | */ 41 | void lv_test_cont_1(void); 42 | 43 | /** 44 | * Test nested style inheritance on padding update 45 | */ 46 | void lv_test_cont_2(void); 47 | 48 | /********************** 49 | * MACROS 50 | **********************/ 51 | 52 | #endif /*USE_LV_CONT && USE_LV_TESTS*/ 53 | 54 | #ifdef __cplusplus 55 | } /* extern "C" */ 56 | #endif 57 | 58 | #endif /*LV_TEST_CONT_H*/ 59 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/5_antialiasing/lv_tutorial_antialiasing.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_antialiasing.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_ANTIALIASING_H 7 | #define LV_TUTORIAL_ANTIALIASING_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Create object to see how they change from the anti aliasing 40 | * Modify LV_ANTIALIAS and LV_FONT_ANTIALIAS to see what is changing 41 | */ 42 | void lv_tutorial_antialiasing(void); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_LV_TUTORIALS*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*LV_TUTORIAL_ANTIALIASING_H*/ 55 | -------------------------------------------------------------------------------- /lv_drivers/display/fbdev.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file fbdev.h 3 | * 4 | */ 5 | 6 | #ifndef FBDEV_H 7 | #define FBDEV_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_FBDEV 23 | 24 | #include 25 | #include "lvgl/lv_misc/lv_color.h" 26 | 27 | /********************* 28 | * DEFINES 29 | *********************/ 30 | 31 | /********************** 32 | * TYPEDEFS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL PROTOTYPES 37 | **********************/ 38 | void fbdev_init(void); 39 | void fbdev_exit(void); 40 | void fbdev_flush(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); 41 | void fbdev_fill(int32_t x1, int32_t y1, int32_t x2, int32_t y2, lv_color_t color); 42 | void fbdev_map(int32_t x1, int32_t y1, int32_t x2, int32_t y2, const lv_color_t * color_p); 43 | 44 | /********************** 45 | * MACROS 46 | **********************/ 47 | 48 | #endif /*USE_FBDEV*/ 49 | 50 | #ifdef __cplusplus 51 | } /* extern "C" */ 52 | #endif 53 | 54 | #endif /*FBDEV_H*/ 55 | -------------------------------------------------------------------------------- /lv_examples/lv_examples.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_examples.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EXAMPLES_H 7 | #define LV_EXAMPLES_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #include "../lvgl/lvgl.h" 17 | 18 | /********************* 19 | * DEFINES 20 | *********************/ 21 | /*Test lvgl version*/ 22 | #define LV_EXAMPLES_LVGL_REQ_MAJOR 5 23 | #define LV_EXAMPLES_LVGL_REQ_MINOR 0 24 | #define LV_EXAMPLES_LVGL_REQ_PATCH 0 25 | 26 | #if LV_EXAMPLES_LVGL_REQ_MAJOR != LVGL_VERSION_MAJOR 27 | #error "lv_examples: Wrong lvgl major version" 28 | #endif 29 | 30 | #if LV_EXAMPLES_LVGL_REQ_MINOR > LVGL_VERSION_MINOR 31 | #error "lv_examples: Wrong lvgl minor version" 32 | #endif 33 | 34 | #if LV_EXAMPLES_LVGL_REQ_PATCH > LVGL_VERSION_PATCH 35 | #error "lv_examples: Wrong lvgl bug fix version" 36 | #endif 37 | 38 | /********************** 39 | * TYPEDEFS 40 | **********************/ 41 | 42 | /********************** 43 | * GLOBAL PROTOTYPES 44 | **********************/ 45 | 46 | /********************** 47 | * MACROS 48 | **********************/ 49 | 50 | 51 | #ifdef __cplusplus 52 | } /* extern "C" */ 53 | #endif 54 | 55 | #endif /*LV_EXAMPLES_H*/ 56 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/10_keyboard/lv_tutorial_keyboard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_keyboard.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TUTORIAL_KEYBOARD_H 7 | #define LV_TUTORIAL_KEYBOARD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TUTORIALS && USE_LV_GROUP 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | /** 38 | * Create a simple GUI to demonstrate encoder control capability 39 | * kp_indev optinonally pass a keypad input device to control the object (NULL if unused) 40 | */ 41 | void lv_tutorial_keyboard(lv_indev_t * kp_indev); 42 | 43 | /********************** 44 | * MACROS 45 | **********************/ 46 | 47 | #endif /*USE_LV_TUTORIALS*/ 48 | 49 | #ifdef __cplusplus 50 | } /* extern "C" */ 51 | #endif 52 | 53 | #endif /*LV_TUTORIAL_KEYBOARD_H*/ 54 | -------------------------------------------------------------------------------- /SDL2/SDL_name.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDLname_h_ 23 | #define SDLname_h_ 24 | 25 | #if defined(__STDC__) || defined(__cplusplus) 26 | #define NeedFunctionPrototypes 1 27 | #endif 28 | 29 | #define SDL_NAME(X) SDL_##X 30 | 31 | #endif /* SDLname_h_ */ 32 | 33 | /* vi: set ts=4 sw=4 expandtab: */ 34 | -------------------------------------------------------------------------------- /lv_drivers/indev/evdev.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file evdev.h 3 | * 4 | */ 5 | 6 | #ifndef EVDEV_H 7 | #define EVDEV_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_EVDEV 23 | 24 | #include 25 | #include 26 | #include "lvgl/lv_hal/lv_hal_indev.h" 27 | 28 | /********************* 29 | * DEFINES 30 | *********************/ 31 | 32 | /********************** 33 | * TYPEDEFS 34 | **********************/ 35 | 36 | /********************** 37 | * GLOBAL PROTOTYPES 38 | **********************/ 39 | 40 | /** 41 | * Initialize the evdev 42 | */ 43 | void evdev_init(void); 44 | /** 45 | * Get the current position and state of the evdev 46 | * @param data store the evdev data here 47 | * @return false: because the points are not buffered, so no more data to be read 48 | */ 49 | bool evdev_read(lv_indev_data_t * data); 50 | 51 | 52 | /********************** 53 | * MACROS 54 | **********************/ 55 | 56 | #endif /* USE_EVDEV */ 57 | 58 | #ifdef __cplusplus 59 | } /* extern "C" */ 60 | #endif 61 | 62 | #endif /* EVDEV_H */ 63 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_label/lv_test_label.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_label.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_LABEL_H 7 | #define LV_TEST_LABEL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../../lvgl/lvgl.h" 21 | #include "../../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_LABEL && USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | /** 38 | * Create labels with dynamic, static and array texts 39 | */ 40 | void lv_test_label_1(void); 41 | 42 | /** 43 | * Test label long modes 44 | */ 45 | void lv_test_label_2(void); 46 | 47 | /** 48 | * Test text insert and cut 49 | */ 50 | void lv_test_label_3(void); 51 | 52 | /********************** 53 | * MACROS 54 | **********************/ 55 | 56 | #endif /*USE_LV_LABEL*/ 57 | 58 | #ifdef __cplusplus 59 | } /* extern "C" */ 60 | #endif 61 | 62 | #endif /*USE_LV_LABEL && USE_LV_TESTS*/ 63 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_misc/lv_test_task.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_task.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_TASK_H 7 | #define LV_TEST_TASK_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lvgl.h" 18 | #include "lv_ex_conf.h" 19 | #else 20 | #include "../../../lvgl/lvgl.h" 21 | #include "../../../lv_ex_conf.h" 22 | #endif 23 | 24 | #if USE_LV_TESTS 25 | 26 | /********************* 27 | * DEFINES 28 | *********************/ 29 | 30 | /********************** 31 | * TYPEDEFS 32 | **********************/ 33 | 34 | /********************** 35 | * GLOBAL PROTOTYPES 36 | **********************/ 37 | 38 | /** 39 | * Test the scheduling with various periods and priorities. 40 | */ 41 | void lv_test_task_1(void); 42 | 43 | /** 44 | * Create a lot of short task and see their order. They should be executed according to their priority 45 | */ 46 | void lv_test_task_2(void); 47 | 48 | /** 49 | * Change the priority later 50 | */ 51 | void lv_test_task_3(void); 52 | 53 | /********************** 54 | * MACROS 55 | **********************/ 56 | 57 | #endif 58 | 59 | #ifdef __cplusplus 60 | } /* extern "C" */ 61 | #endif 62 | 63 | #endif /*LV_TEST_TASK_H*/ 64 | -------------------------------------------------------------------------------- /SDL2/SDL_opengles.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 1.X API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifdef __IPHONEOS__ 30 | #include 31 | #include 32 | #else 33 | #include 34 | #include 35 | #endif 36 | 37 | #ifndef APIENTRY 38 | #define APIENTRY 39 | #endif 40 | -------------------------------------------------------------------------------- /lv_ex_conf.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_ex_conf.h 3 | * 4 | */ 5 | 6 | #ifndef LV_EX_CONF_H 7 | #define LV_EX_CONF_H 8 | 9 | 10 | /******************* 11 | * GENERAL SETTING 12 | *******************/ 13 | #define LV_EX_PRINTF 1 /*Enable printf-ing data*/ 14 | #define LV_EX_KEYBOARD 1 /*Add PC keyboard support to some examples (`lv_drvers` repository is required)*/ 15 | #define LV_EX_ENCODER 1 /*Add 'encoder' (mouse wheel) support to some examples (`lv_drivers` repository is required)*/ 16 | 17 | /******************* 18 | * TEST USAGE 19 | *******************/ 20 | #define USE_LV_TESTS 1 21 | 22 | /******************* 23 | * TUTORIAL USAGE 24 | *******************/ 25 | #define USE_LV_TUTORIALS 1 26 | 27 | /********************* 28 | * APPLICATION USAGE 29 | *********************/ 30 | 31 | /* Test the graphical performance of your MCU 32 | * with different settings*/ 33 | #define USE_LV_BENCHMARK 1 34 | 35 | /*A demo application with Keyboard, Text area, List and Chart 36 | * placed on Tab view */ 37 | #define USE_LV_DEMO 1 38 | #if USE_LV_DEMO 39 | #define LV_DEMO_WALLPAPER 1 /*Create a wallpaper too*/ 40 | #define LV_DEMO_SLIDE_SHOW 0 /*Automatically switch between tabs*/ 41 | #endif 42 | 43 | /*MCU and memory usage monitoring*/ 44 | #define USE_LV_SYSMON 1 45 | 46 | /*A terminal to display received characters*/ 47 | #define USE_LV_TERMINAL 1 48 | 49 | /*Touch pad calibration with 4 points*/ 50 | #define USE_LV_TPCAL 1 51 | 52 | #endif /*LV_EX_CONF_H*/ 53 | 54 | -------------------------------------------------------------------------------- /SDL2/close_code.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file close_code.h 24 | * 25 | * This file reverses the effects of begin_code.h and should be included 26 | * after you finish any function and structure declarations in your headers 27 | */ 28 | 29 | #undef _begin_code_h 30 | 31 | /* Reset structure packing at previous byte alignment */ 32 | #if defined(_MSC_VER) || defined(__MWERKS__) || defined(__BORLANDC__) 33 | #ifdef __BORLANDC__ 34 | #pragma nopackwarning 35 | #endif 36 | #pragma pack(pop) 37 | #endif /* Compiler needs structure packing set */ 38 | -------------------------------------------------------------------------------- /lv_drivers/indev/mouse.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mouse.h 3 | * 4 | */ 5 | 6 | #ifndef MOUSE_H 7 | #define MOUSE_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_MOUSE 23 | 24 | #include 25 | #include 26 | #include 27 | #include "lvgl/lv_hal/lv_hal_indev.h" 28 | 29 | 30 | #ifndef MONITOR_SDL_INCLUDE_PATH 31 | #define MONITOR_SDL_INCLUDE_PATH 32 | #endif 33 | 34 | #include MONITOR_SDL_INCLUDE_PATH 35 | 36 | /********************* 37 | * DEFINES 38 | *********************/ 39 | 40 | /********************** 41 | * TYPEDEFS 42 | **********************/ 43 | 44 | /********************** 45 | * GLOBAL PROTOTYPES 46 | **********************/ 47 | 48 | /** 49 | * Initialize the mouse 50 | */ 51 | void mouse_init(void); 52 | /** 53 | * Get the current position and state of the mouse 54 | * @param data store the mouse data here 55 | * @return false: because the points are not buffered, so no more data to be read 56 | */ 57 | bool mouse_read(lv_indev_data_t * data); 58 | 59 | /** 60 | * It will be called from the main SDL thread 61 | */ 62 | void mouse_handler(SDL_Event *event); 63 | 64 | /********************** 65 | * MACROS 66 | **********************/ 67 | 68 | #endif /* USE_MOUSE */ 69 | 70 | #ifdef __cplusplus 71 | } /* extern "C" */ 72 | #endif 73 | 74 | #endif /* MOUSE_H */ 75 | -------------------------------------------------------------------------------- /lv_drivers/indev/encoder.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file encoder.h 3 | * 4 | */ 5 | 6 | #ifndef ENCODER_H 7 | #define ENCODER_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_ENCODER 23 | 24 | #include 25 | #include "lvgl/lv_hal/lv_hal_indev.h" 26 | 27 | #ifndef MONITOR_SDL_INCLUDE_PATH 28 | #define MONITOR_SDL_INCLUDE_PATH 29 | #endif 30 | 31 | #include MONITOR_SDL_INCLUDE_PATH 32 | 33 | /********************* 34 | * DEFINES 35 | *********************/ 36 | 37 | /********************** 38 | * TYPEDEFS 39 | **********************/ 40 | 41 | /********************** 42 | * GLOBAL PROTOTYPES 43 | **********************/ 44 | 45 | /** 46 | * Initialize the encoder 47 | */ 48 | void encoder_init(void); 49 | 50 | /** 51 | * Get the mouse wheel position change. 52 | * @param data store the read data here 53 | * @return false: all ticks and button state are handled 54 | */ 55 | bool encoder_read(lv_indev_data_t * data); 56 | 57 | /** 58 | * It is called periodically from the SDL thread to check a key is pressed/released 59 | * @param event describes the event 60 | */ 61 | void encoder_handler(SDL_Event *event); 62 | 63 | /********************** 64 | * MACROS 65 | **********************/ 66 | 67 | #endif /*USE_ENCODER*/ 68 | 69 | #ifdef __cplusplus 70 | } /* extern "C" */ 71 | #endif 72 | 73 | #endif /*ENCODER_H*/ 74 | -------------------------------------------------------------------------------- /lv_drivers/indev/mousewheel.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mousewheel.h 3 | * 4 | */ 5 | 6 | #ifndef MOUSEWHEEL_H 7 | #define MOUSEWHEEL_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_MOUSEWHEEL 23 | 24 | #include 25 | #include "lvgl/lv_hal/lv_hal_indev.h" 26 | 27 | #ifndef MONITOR_SDL_INCLUDE_PATH 28 | #define MONITOR_SDL_INCLUDE_PATH 29 | #endif 30 | 31 | #include MONITOR_SDL_INCLUDE_PATH 32 | 33 | /********************* 34 | * DEFINES 35 | *********************/ 36 | 37 | /********************** 38 | * TYPEDEFS 39 | **********************/ 40 | 41 | /********************** 42 | * GLOBAL PROTOTYPES 43 | **********************/ 44 | 45 | /** 46 | * Initialize the encoder 47 | */ 48 | void mousewheel_init(void); 49 | 50 | /** 51 | * Get the mouse wheel position change. 52 | * @param data store the read data here 53 | * @return false: all ticks and button state are handled 54 | */ 55 | bool mousewheel_read(lv_indev_data_t * data); 56 | 57 | /** 58 | * It is called periodically from the SDL thread to check a key is pressed/released 59 | * @param event describes the event 60 | */ 61 | void mousewheel_handler(SDL_Event *event); 62 | 63 | /********************** 64 | * MACROS 65 | **********************/ 66 | 67 | #endif /*USE_MOUSEWHEEL*/ 68 | 69 | #ifdef __cplusplus 70 | } /* extern "C" */ 71 | #endif 72 | 73 | #endif /*MOUSEWHEEL_H*/ 74 | -------------------------------------------------------------------------------- /lv_drivers/indev/keyboard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file keyboard.h 3 | * 4 | */ 5 | 6 | #ifndef KEYBOARD_H 7 | #define KEYBOARD_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_drv_conf.h" 18 | #else 19 | #include "../../lv_drv_conf.h" 20 | #endif 21 | 22 | #if USE_KEYBOARD 23 | 24 | #include 25 | #include "lvgl/lv_hal/lv_hal_indev.h" 26 | 27 | #ifndef MONITOR_SDL_INCLUDE_PATH 28 | #define MONITOR_SDL_INCLUDE_PATH 29 | #endif 30 | 31 | #include MONITOR_SDL_INCLUDE_PATH 32 | 33 | /********************* 34 | * DEFINES 35 | *********************/ 36 | 37 | /********************** 38 | * TYPEDEFS 39 | **********************/ 40 | 41 | /********************** 42 | * GLOBAL PROTOTYPES 43 | **********************/ 44 | /** 45 | * Initialize the keyboard 46 | */ 47 | void keyboard_init(void); 48 | 49 | /** 50 | * Get the last pressed or released character from the PC's keyboard 51 | * @param data store the read data here 52 | * @return false: because the points are not buffered, so no more data to be read 53 | */ 54 | bool keyboard_read(lv_indev_data_t * data); 55 | 56 | /** 57 | * It is called periodically from the SDL thread to check a key is pressed/released 58 | * @param event describes the event 59 | */ 60 | void keyboard_handler(SDL_Event *event); 61 | 62 | /********************** 63 | * MACROS 64 | **********************/ 65 | 66 | #endif /*USE_KEYBOARD*/ 67 | 68 | #ifdef __cplusplus 69 | } /* extern "C" */ 70 | #endif 71 | 72 | #endif /*KEYBOARD_H*/ 73 | -------------------------------------------------------------------------------- /lv_examples/lv_ex_conf_templ.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_ex_conf.h 3 | * 4 | */ 5 | /* 6 | * COPY THIS FILE AS lv_ex_conf.h 7 | */ 8 | 9 | #if 0 /*Set it to "1" to enable the content*/ 10 | 11 | #ifndef LV_EX_CONF_H 12 | #define LV_EX_CONF_H 13 | 14 | /******************* 15 | * GENERAL SETTING 16 | *******************/ 17 | #define LV_EX_PRINTF 0 /*Enable printf-ing data*/ 18 | #define LV_EX_KEYBOARD 0 /*Add PC keyboard support to some examples (`lv_drivers` repository is required)*/ 19 | #define LV_EX_MOUSEWHEEL 0 /*Add 'encoder' (mouse wheel) support to some examples (`lv_drivers` repository is required)*/ 20 | 21 | /******************* 22 | * TEST USAGE 23 | *******************/ 24 | #define USE_LV_TESTS 0 25 | 26 | /******************* 27 | * TUTORIAL USAGE 28 | *******************/ 29 | #define USE_LV_TUTORIALS 0 30 | 31 | 32 | /********************* 33 | * APPLICATION USAGE 34 | *********************/ 35 | 36 | /* Test the graphical performance of your MCU 37 | * with different settings*/ 38 | #define USE_LV_BENCHMARK 0 39 | 40 | /*A demo application with Keyboard, Text area, List and Chart 41 | * placed on Tab view */ 42 | #define USE_LV_DEMO 0 43 | #if USE_LV_DEMO 44 | #define LV_DEMO_WALLPAPER 1 /*Create a wallpaper too*/ 45 | #define LV_DEMO_SLIDE_SHOW 0 /*Automatically switch between tabs*/ 46 | #endif 47 | 48 | /*MCU and memory usage monitoring*/ 49 | #define USE_LV_SYSMON 0 50 | 51 | /*A terminal to display received characters*/ 52 | #define USE_LV_TERMINAL 0 53 | 54 | /*Touch pad calibration with 4 points*/ 55 | #define USE_LV_TPCAL 0 56 | 57 | #endif /*LV_EX_CONF_H*/ 58 | 59 | #endif /*End of "Content enable"*/ 60 | 61 | -------------------------------------------------------------------------------- /SDL2/SDL_opengles2.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_opengles2.h 24 | * 25 | * This is a simple file to encapsulate the OpenGL ES 2.0 API headers. 26 | */ 27 | #include "SDL_config.h" 28 | 29 | #ifndef _MSC_VER 30 | 31 | #ifdef __IPHONEOS__ 32 | #include 33 | #include 34 | #else 35 | #include 36 | #include 37 | #include 38 | #endif 39 | 40 | #else /* _MSC_VER */ 41 | 42 | /* OpenGL ES2 headers for Visual Studio */ 43 | #include "SDL_opengles2_khrplatform.h" 44 | #include "SDL_opengles2_gl2platform.h" 45 | #include "SDL_opengles2_gl2.h" 46 | #include "SDL_opengles2_gl2ext.h" 47 | 48 | #endif /* _MSC_VER */ 49 | 50 | #ifndef APIENTRY 51 | #define APIENTRY GL_APIENTRY 52 | #endif 53 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_arc/lv_test_arc.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_arc.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_arc.h" 10 | #if USE_LV_ARC && USE_LV_TESTS 11 | 12 | /********************* 13 | * DEFINES 14 | *********************/ 15 | 16 | /********************** 17 | * TYPEDEFS 18 | **********************/ 19 | 20 | /********************** 21 | * STATIC PROTOTYPES 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC VARIABLES 26 | **********************/ 27 | 28 | /********************** 29 | * MACROS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL FUNCTIONS 34 | **********************/ 35 | 36 | /** 37 | * Create arcs to test their functionalities 38 | */ 39 | void lv_test_arc_1(void) 40 | { 41 | /* Create a default object*/ 42 | lv_obj_t * arc1 = lv_arc_create(lv_scr_act(), NULL); 43 | lv_obj_set_pos(arc1, 10, 10); 44 | 45 | /* Modify size, position and angles*/ 46 | lv_obj_t * arc2 = lv_arc_create(lv_scr_act(), NULL); 47 | lv_obj_set_size(arc2, 100, 100); 48 | lv_obj_align(arc2, arc1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 49 | lv_arc_set_angles(arc2, 0, 250); 50 | 51 | /* Copy 'arc2' and set a new style for it */ 52 | static lv_style_t style1; 53 | lv_style_copy(&style1, &lv_style_plain); 54 | style1.line.color = LV_COLOR_RED; 55 | style1.line.width = 8; 56 | lv_obj_t * arc3 = lv_arc_create(lv_scr_act(), arc2); 57 | lv_obj_set_style(arc3, &style1); 58 | lv_obj_align(arc3, arc2, LV_ALIGN_OUT_RIGHT_TOP, 20, 0); 59 | 60 | } 61 | 62 | 63 | /********************** 64 | * STATIC FUNCTIONS 65 | **********************/ 66 | 67 | #endif /*USE_LV_ARC && USE_LV_TESTS*/ 68 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/1_hello_world/lv_tutorial_hello_world.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_hello_world 3 | * 4 | */ 5 | 6 | /* 7 | *------------------------------------------------------------------------------- 8 | * Create your first object: a "Hello world" label 9 | * ------------------------------------------------------------------------------ 10 | * 11 | * If you have ported the LittlevGL you are ready to create content on your display. 12 | * 13 | * Now you will create a "Hello world!" label and align it to the middle. 14 | */ 15 | 16 | /********************* 17 | * INCLUDES 18 | *********************/ 19 | #include "lv_tutorial_hello_world.h" 20 | #if USE_LV_TUTORIALS 21 | 22 | /********************* 23 | * DEFINES 24 | *********************/ 25 | 26 | /********************** 27 | * TYPEDEFS 28 | **********************/ 29 | 30 | /********************** 31 | * STATIC PROTOTYPES 32 | **********************/ 33 | 34 | /********************** 35 | * STATIC VARIABLES 36 | **********************/ 37 | 38 | /********************** 39 | * MACROS 40 | **********************/ 41 | 42 | /********************** 43 | * GLOBAL FUNCTIONS 44 | **********************/ 45 | 46 | /** 47 | * Create a simple 'Hello world!' label 48 | */ 49 | void lv_tutorial_hello_world(void) 50 | { 51 | /*Create a Label on the currently active screen*/ 52 | lv_obj_t * label1 = lv_label_create(lv_scr_act(), NULL); 53 | 54 | /*Modify the Label's text*/ 55 | lv_label_set_text(label1, "Hello world!"); 56 | 57 | /* Align the Label to the center 58 | * NULL means align on parent (which is the screen now) 59 | * 0, 0 at the end means an x, y offset after alignment*/ 60 | lv_obj_align(label1, NULL, LV_ALIGN_CENTER, 0, 0); 61 | } 62 | 63 | /********************** 64 | * STATIC FUNCTIONS 65 | **********************/ 66 | 67 | #endif /*USE_LV_TUTORIALS*/ 68 | -------------------------------------------------------------------------------- /SDL2/SDL_test_memory.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_memory.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_memory_h_ 31 | #define SDL_test_memory_h_ 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | 40 | /** 41 | * \brief Start tracking SDL memory allocations 42 | * 43 | * \note This should be called before any other SDL functions for complete tracking coverage 44 | */ 45 | int SDLTest_TrackAllocations(); 46 | 47 | /** 48 | * \brief Print a log of any outstanding allocations 49 | * 50 | * \note This can be called after SDL_Quit() 51 | */ 52 | void SDLTest_LogAllocations(); 53 | 54 | 55 | /* Ends C function definitions when using C++ */ 56 | #ifdef __cplusplus 57 | } 58 | #endif 59 | #include "close_code.h" 60 | 61 | #endif /* SDL_test_memory_h_ */ 62 | 63 | /* vi: set ts=4 sw=4 expandtab: */ 64 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_img/lv_test_img.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_img.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_img.h" 10 | 11 | #if USE_LV_IMG && USE_LV_TESTS 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | LV_IMG_DECLARE(img_flower_icon); 17 | 18 | /********************** 19 | * TYPEDEFS 20 | **********************/ 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 | * Create images to test their functionalities 40 | */ 41 | void lv_test_img_1(void) 42 | { 43 | /*Create an image object from a varibale*/ 44 | lv_obj_t * img1 = lv_img_create(lv_scr_act(), NULL); 45 | lv_img_set_src(img1, &img_flower_icon); 46 | lv_obj_set_pos(img1, 10, 10); 47 | 48 | /*Copy the previous image and set a redish style*/ 49 | static lv_style_t style; 50 | lv_style_copy(&style, &lv_style_plain); 51 | style.image.color = LV_COLOR_RED; 52 | style.image.intense = LV_OPA_70; 53 | 54 | lv_obj_t * img2 = lv_img_create(lv_scr_act(), img1); 55 | lv_img_set_style(img2, &style); 56 | lv_obj_align(img2, img1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 57 | 58 | /*Copy the previous image and test the mosaic feature*/ 59 | lv_obj_t * img3 = lv_img_create(lv_scr_act(), img2); 60 | lv_obj_set_size(img3, 100, 100); 61 | lv_obj_align(img3, img2, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 62 | 63 | /*Test symbol drawing*/ 64 | lv_obj_t * img4 = lv_img_create(lv_scr_act(), NULL); 65 | lv_img_set_src(img4, SYMBOL_SETTINGS SYMBOL_OK); 66 | lv_obj_align(img4, img3, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 67 | } 68 | 69 | /********************** 70 | * STATIC FUNCTIONS 71 | **********************/ 72 | 73 | #endif /*USE_LV_IMG && USE_LV_TESTS*/ 74 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_roller/lv_test_roller.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_roller.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_roller.h" 10 | 11 | #if USE_LV_ROLLER && USE_LV_TESTS 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL FUNCTIONS 35 | **********************/ 36 | 37 | /** 38 | * Create rollers to test their functionalities 39 | */ 40 | void lv_test_roller_1(void) 41 | { 42 | /* Default object*/ 43 | lv_obj_t * roller1 = lv_roller_create(lv_scr_act(), NULL); 44 | lv_obj_set_pos(roller1, 10, 10); 45 | 46 | 47 | static lv_style_t bg; 48 | lv_style_copy(&bg, &lv_style_pretty); 49 | bg.body.main_color = LV_COLOR_GRAY; 50 | bg.body.grad_color = LV_COLOR_WHITE; 51 | bg.body.shadow.width = 5; 52 | bg.text.line_space = 10; 53 | bg.text.opa = LV_OPA_60; 54 | bg.text.color = LV_COLOR_GRAY; 55 | 56 | lv_obj_t * roller2 = lv_roller_create(lv_scr_act(), NULL); 57 | lv_obj_set_size(roller2, 80, 120); 58 | lv_roller_set_options(roller2, "0\n1\n2\n3\n4\n5\n6\n7\n8\n9"); 59 | lv_obj_align(roller2, roller1, LV_ALIGN_OUT_RIGHT_TOP, 20, 0); 60 | lv_roller_set_anim_time(roller2, 500); 61 | lv_roller_set_style(roller2, LV_ROLLER_STYLE_BG, &bg); 62 | lv_roller_set_style(roller2, LV_ROLLER_STYLE_SEL, &lv_style_plain); 63 | lv_roller_set_selected(roller2, 4, true); 64 | 65 | lv_obj_t * roller3 = lv_roller_create(lv_scr_act(), roller2); 66 | lv_obj_align(roller3, roller2, LV_ALIGN_OUT_RIGHT_TOP, 20, 0); 67 | lv_roller_set_hor_fit(roller3, false); 68 | lv_obj_set_width(roller3, LV_DPI); 69 | 70 | } 71 | 72 | 73 | /********************** 74 | * STATIC FUNCTIONS 75 | **********************/ 76 | 77 | #endif /*USE_LV_ROLLER && USE_LV_TESTS*/ 78 | -------------------------------------------------------------------------------- /SDL2/SDL_test_log.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_log.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | * 32 | * Wrapper to log in the TEST category 33 | * 34 | */ 35 | 36 | #ifndef SDL_test_log_h_ 37 | #define SDL_test_log_h_ 38 | 39 | #include "begin_code.h" 40 | /* Set up for C function definitions, even when using C++ */ 41 | #ifdef __cplusplus 42 | extern "C" { 43 | #endif 44 | 45 | /** 46 | * \brief Prints given message with a timestamp in the TEST category and INFO priority. 47 | * 48 | * \param fmt Message to be logged 49 | */ 50 | void SDLTest_Log(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 51 | 52 | /** 53 | * \brief Prints given message with a timestamp in the TEST category and the ERROR priority. 54 | * 55 | * \param fmt Message to be logged 56 | */ 57 | void SDLTest_LogError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 58 | 59 | /* Ends C function definitions when using C++ */ 60 | #ifdef __cplusplus 61 | } 62 | #endif 63 | #include "close_code.h" 64 | 65 | #endif /* SDL_test_log_h_ */ 66 | 67 | /* vi: set ts=4 sw=4 expandtab: */ 68 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_line/lv_test_line.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_line.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_line.h" 10 | 11 | #if USE_LV_LINE && USE_LV_TESTS 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL FUNCTIONS 35 | **********************/ 36 | 37 | /** 38 | * Create lines to test their functionalities 39 | */ 40 | void lv_test_line_1(void) 41 | { 42 | static const lv_point_t p[] = {{5, 5}, {60, 5}, {120, 65}}; 43 | 44 | /* Create a default object*/ 45 | lv_obj_t * line1 = lv_line_create(lv_scr_act(), NULL); 46 | lv_obj_set_pos(line1, 10, 10); 47 | lv_line_set_points(line1, p, 3); 48 | 49 | /*Test y invert*/ 50 | lv_obj_t * line2 = lv_line_create(lv_scr_act(), line1); 51 | lv_line_set_y_invert(line2, true); 52 | lv_obj_align(line2, line1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5); 53 | 54 | /*Test styling*/ 55 | static lv_style_t style1; 56 | lv_style_copy(&style1, &lv_style_plain); 57 | 58 | style1.line.color = LV_COLOR_RED; 59 | style1.line.width = 20; 60 | 61 | lv_obj_t * line3 = lv_line_create(lv_scr_act(), line2); 62 | lv_line_set_style(line3, &style1); 63 | lv_obj_align(line3, line1, LV_ALIGN_OUT_RIGHT_TOP, 5, 0); 64 | lv_obj_set_hidden(line3, false); 65 | 66 | /*Test rounding*/ 67 | static lv_style_t style2; 68 | lv_style_copy(&style2, &style1); 69 | style2.line.rounded = 1; 70 | 71 | lv_obj_t * line4 = lv_line_create(lv_scr_act(), line3); 72 | lv_line_set_style(line4, &style2); 73 | lv_obj_align(line4, line3, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 5); 74 | lv_obj_set_hidden(line4, false); 75 | } 76 | 77 | 78 | /********************** 79 | * STATIC FUNCTIONS 80 | **********************/ 81 | 82 | #endif /*USE_LV_LINE && USE_LV_TESTS*/ 83 | -------------------------------------------------------------------------------- /SDL2/SDL_clipboard.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_clipboard.h 24 | * 25 | * Include file for SDL clipboard handling 26 | */ 27 | 28 | #ifndef SDL_clipboard_h_ 29 | #define SDL_clipboard_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | /** 42 | * \brief Put UTF-8 text into the clipboard 43 | * 44 | * \sa SDL_GetClipboardText() 45 | */ 46 | extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text); 47 | 48 | /** 49 | * \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free() 50 | * 51 | * \sa SDL_SetClipboardText() 52 | */ 53 | extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void); 54 | 55 | /** 56 | * \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty 57 | * 58 | * \sa SDL_GetClipboardText() 59 | */ 60 | extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void); 61 | 62 | 63 | /* Ends C function definitions when using C++ */ 64 | #ifdef __cplusplus 65 | } 66 | #endif 67 | #include "close_code.h" 68 | 69 | #endif /* SDL_clipboard_h_ */ 70 | 71 | /* vi: set ts=4 sw=4 expandtab: */ 72 | -------------------------------------------------------------------------------- /SDL2/SDL_test.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_h_ 31 | #define SDL_test_h_ 32 | 33 | #include "SDL.h" 34 | #include "SDL_test_assert.h" 35 | #include "SDL_test_common.h" 36 | #include "SDL_test_compare.h" 37 | #include "SDL_test_crc32.h" 38 | #include "SDL_test_font.h" 39 | #include "SDL_test_fuzzer.h" 40 | #include "SDL_test_harness.h" 41 | #include "SDL_test_images.h" 42 | #include "SDL_test_log.h" 43 | #include "SDL_test_md5.h" 44 | #include "SDL_test_memory.h" 45 | #include "SDL_test_random.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /* Global definitions */ 54 | 55 | /* 56 | * Note: Maximum size of SDLTest log message is less than SDL's limit 57 | * to ensure we can fit additional information such as the timestamp. 58 | */ 59 | #define SDLTEST_MAX_LOGMESSAGE_LENGTH 3584 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_sw/lv_test_sw.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_sw.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include /*For printf in the action*/ 10 | #include "lv_test_sw.h" 11 | 12 | #if USE_LV_SW && USE_LV_TESTS 13 | 14 | /********************* 15 | * DEFINES 16 | *********************/ 17 | 18 | /********************** 19 | * TYPEDEFS 20 | **********************/ 21 | 22 | /********************** 23 | * STATIC PROTOTYPES 24 | **********************/ 25 | static lv_res_t sw_action(lv_obj_t * sw); 26 | 27 | /********************** 28 | * STATIC VARIABLES 29 | **********************/ 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL FUNCTIONS 37 | **********************/ 38 | 39 | /** 40 | * Create switches to test their functionalities 41 | */ 42 | void lv_test_sw_1(void) 43 | { 44 | /* Default object */ 45 | lv_obj_t * sw1 = lv_sw_create(lv_scr_act(), NULL); 46 | lv_obj_set_pos(sw1, 10, 10); 47 | lv_sw_set_action(sw1, sw_action); 48 | 49 | static lv_style_t bg; 50 | static lv_style_t indic; 51 | 52 | lv_style_copy(&bg, &lv_style_pretty); 53 | bg.body.padding.hor = -5; 54 | bg.body.padding.ver = -5; 55 | 56 | lv_style_copy(&indic, &lv_style_pretty_color); 57 | indic.body.padding.hor = 8; 58 | indic.body.padding.ver = 8; 59 | 60 | lv_obj_t * sw2 = lv_sw_create(lv_scr_act(), sw1); 61 | lv_sw_set_style(sw2, LV_SW_STYLE_BG, &bg); 62 | lv_sw_set_style(sw2, LV_SW_STYLE_INDIC, &indic); 63 | lv_sw_set_style(sw2, LV_SW_STYLE_KNOB_OFF, &lv_style_btn_pr); 64 | lv_sw_set_style(sw2, LV_SW_STYLE_KNOB_ON, &lv_style_btn_tgl_pr); 65 | 66 | lv_sw_on(sw2); 67 | lv_obj_align(sw2, sw1, LV_ALIGN_OUT_RIGHT_MID, 20, 0); 68 | 69 | lv_obj_t * sw3 = lv_sw_create(lv_scr_act(), sw2); 70 | lv_obj_align(sw3, sw2, LV_ALIGN_OUT_RIGHT_MID, 20, 0); 71 | 72 | } 73 | 74 | /********************** 75 | * STATIC FUNCTIONS 76 | **********************/ 77 | 78 | static lv_res_t sw_action(lv_obj_t * sw) 79 | { 80 | #if LV_EX_PRINTF 81 | printf("Switch state: %d\n", lv_sw_get_state(sw)); 82 | #endif 83 | return LV_RES_OK; 84 | } 85 | 86 | 87 | #endif /*USE_LV_SW && USE_LV_TESTS*/ 88 | -------------------------------------------------------------------------------- /SDL2/SDL_quit.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_quit.h 24 | * 25 | * Include file for SDL quit event handling. 26 | */ 27 | 28 | #ifndef SDL_quit_h_ 29 | #define SDL_quit_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | 34 | /** 35 | * \file SDL_quit.h 36 | * 37 | * An ::SDL_QUIT event is generated when the user tries to close the application 38 | * window. If it is ignored or filtered out, the window will remain open. 39 | * If it is not ignored or filtered, it is queued normally and the window 40 | * is allowed to close. When the window is closed, screen updates will 41 | * complete, but have no effect. 42 | * 43 | * SDL_Init() installs signal handlers for SIGINT (keyboard interrupt) 44 | * and SIGTERM (system termination request), if handlers do not already 45 | * exist, that generate ::SDL_QUIT events as well. There is no way 46 | * to determine the cause of an ::SDL_QUIT event, but setting a signal 47 | * handler in your application will override the default generation of 48 | * quit events for that signal. 49 | * 50 | * \sa SDL_Quit() 51 | */ 52 | 53 | /* There are no functions directly affecting the quit event */ 54 | 55 | #define SDL_QuitRequested() \ 56 | (SDL_PumpEvents(), (SDL_PeepEvents(NULL,0,SDL_PEEKEVENT,SDL_QUIT,SDL_QUIT) > 0)) 57 | 58 | #endif /* SDL_quit_h_ */ 59 | -------------------------------------------------------------------------------- /lv_examples/README.md: -------------------------------------------------------------------------------- 1 | # Examples for Littlev Graphics Library. 2 | 3 | LittlevGL is a free and open-source graphics library providing everything you need to create a Graphical User Interface (GUI) on embedded systems with easy-to-use graphical elements, beautiful visual effects and low memory footprint. 4 | 5 | GitHub: https://github.com/littlevgl/lvgl 6 | Website: https://littlevgl.com 7 | 8 | ## Add the examples to your projects 9 | 1. Clone this repository: `git clone https://github.com/littlevgl/lv_examples.git` or download from the [Download page](https://littlevgl.com/download). To always use the newest version the cloning is recommended. 10 | 2. The `lv_examples` directory should be next to the `lvgl` directory in your project. 11 | 12 | Similary to `lv_conf.h` there is a configuration file for the examples too. It is called `lv_ex_conf.h`. 13 | 1. Copy `lv_examples/lv_ex-conf_templ.h` next to `lv_examples` directory 14 | 2. Rename is to `lv_ex_conf.h` 15 | 3. Delete the first `#if` and last `#endif` to enable the file's content 16 | 4. Enable or Disable modules 17 | 18 | ## Tutorial 19 | A step-by-step guide to teach the most important parts of the Graphics Library. 20 | * Porting 21 | * Hello world 22 | * Objects (graphical components) 23 | * Styles 24 | * Themes 25 | * Anti-aliasing 26 | * Images 27 | * Fonts 28 | * Animations 29 | * Responsive 30 | * Keyboard 31 | 32 | ## Applications 33 | Real life GUI examples which can be adapted in your own project. The applications are designed to adapt to your screen's resolution. 34 | * Demo 35 | * Benchmark 36 | * System performance monitor 37 | * Touchpad calibrator 38 | * Terminal 39 | 40 | ## Tests 41 | Test cases to validate the features of LittelvGL. You can also use them as examples. The most important and useful tests are: 42 | * Theme test: `lv_test_theme_1()` 43 | * Keyboard interface test: `lv_test_group_1()` 44 | * Tests of object types: `lv_test_..._1/2/3()` e.g. (lv_test_slider_1()) 45 | 46 | ## Contributing 47 | For contribution and coding style guidelines, please refer to the file docs/CONTRIBUTNG.md in the main LittlevGL repo: 48 | https://github.com/littlevgl/lvgl 49 | You are encouraged to use the 'astyle' util to format your code prior to pushing it. The files docs/astyle_(c/h) contain astyle rules to format source and header files according to the project coding guidelines. 50 | 51 | -------------------------------------------------------------------------------- /lv_drivers/indev/encoder.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file encoder.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "encoder.h" 10 | #if USE_ENCODER 11 | 12 | #include "lvgl/lv_core/lv_group.h" 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | static int16_t enc_diff = 0; 29 | static lv_indev_state_t state = LV_INDEV_STATE_REL; 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL FUNCTIONS 37 | **********************/ 38 | 39 | /** 40 | * Initialize the encoder 41 | */ 42 | void encoder_init(void) 43 | { 44 | /*Nothing to init*/ 45 | } 46 | 47 | /** 48 | * Get encoder (i.e. mouse wheel) ticks difference and pressed state 49 | * @param data store the read data here 50 | * @return false: all ticks and button state are handled 51 | */ 52 | bool encoder_read(lv_indev_data_t * data) 53 | { 54 | data->state = state; 55 | data->enc_diff = enc_diff; 56 | enc_diff = 0; 57 | 58 | return false; /*No more data to read so return false*/ 59 | } 60 | 61 | /** 62 | * It is called periodically from the SDL thread to check mouse wheel state 63 | * @param event describes the event 64 | */ 65 | void encoder_handler(SDL_Event * event) 66 | { 67 | switch(event->type) { 68 | case SDL_MOUSEWHEEL: 69 | // Scroll down (y = -1) means positive encoder turn, 70 | // so invert it 71 | enc_diff += -(event->wheel.y); 72 | break; 73 | case SDL_MOUSEBUTTONDOWN: 74 | if(event->button.button == SDL_BUTTON_MIDDLE) { 75 | state = LV_INDEV_STATE_PR; 76 | } 77 | break; 78 | case SDL_MOUSEBUTTONUP: 79 | if(event->button.button == SDL_BUTTON_MIDDLE) { 80 | state = LV_INDEV_STATE_REL; 81 | } 82 | break; 83 | default: 84 | break; 85 | } 86 | } 87 | 88 | /********************** 89 | * STATIC FUNCTIONS 90 | **********************/ 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /lv_drivers/indev/mouse.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mouse.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "mouse.h" 10 | #if USE_MOUSE != 0 11 | 12 | /********************* 13 | * DEFINES 14 | *********************/ 15 | #ifndef MONITOR_ZOOM 16 | #define MONITOR_ZOOM 1 17 | #endif 18 | 19 | /********************** 20 | * TYPEDEFS 21 | **********************/ 22 | 23 | /********************** 24 | * STATIC PROTOTYPES 25 | **********************/ 26 | 27 | /********************** 28 | * STATIC VARIABLES 29 | **********************/ 30 | static bool left_button_down = false; 31 | static int16_t last_x = 0; 32 | static int16_t last_y = 0; 33 | 34 | /********************** 35 | * MACROS 36 | **********************/ 37 | 38 | /********************** 39 | * GLOBAL FUNCTIONS 40 | **********************/ 41 | 42 | /** 43 | * Initialize the mouse 44 | */ 45 | void mouse_init(void) 46 | { 47 | 48 | } 49 | 50 | /** 51 | * Get the current position and state of the mouse 52 | * @param data store the mouse data here 53 | * @return false: because the points are not buffered, so no more data to be read 54 | */ 55 | bool mouse_read(lv_indev_data_t * data) 56 | { 57 | /*Store the collected data*/ 58 | data->point.x = last_x; 59 | data->point.y = last_y; 60 | data->state = left_button_down ? LV_INDEV_STATE_PR : LV_INDEV_STATE_REL; 61 | 62 | return false; 63 | } 64 | 65 | /** 66 | * It will be called from the main SDL thread 67 | */ 68 | void mouse_handler(SDL_Event * event) 69 | { 70 | switch(event->type) { 71 | case SDL_MOUSEBUTTONUP: 72 | if(event->button.button == SDL_BUTTON_LEFT) 73 | left_button_down = false; 74 | break; 75 | case SDL_MOUSEBUTTONDOWN: 76 | if(event->button.button == SDL_BUTTON_LEFT) { 77 | left_button_down = true; 78 | last_x = event->motion.x / MONITOR_ZOOM; 79 | last_y = event->motion.y / MONITOR_ZOOM; 80 | } 81 | break; 82 | case SDL_MOUSEMOTION: 83 | last_x = event->motion.x / MONITOR_ZOOM; 84 | last_y = event->motion.y / MONITOR_ZOOM; 85 | 86 | break; 87 | } 88 | 89 | } 90 | 91 | /********************** 92 | * STATIC FUNCTIONS 93 | **********************/ 94 | 95 | #endif 96 | -------------------------------------------------------------------------------- /lv_drivers/indev/mousewheel.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file mousewheel.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "mousewheel.h" 10 | #if USE_MOUSEWHEEL 11 | 12 | #include "lvgl/lv_core/lv_group.h" 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | static int16_t enc_diff = 0; 29 | static lv_indev_state_t state = LV_INDEV_STATE_REL; 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL FUNCTIONS 37 | **********************/ 38 | 39 | /** 40 | * Initialize the mousewheel 41 | */ 42 | void mousewheel_init(void) 43 | { 44 | /*Nothing to init*/ 45 | } 46 | 47 | /** 48 | * Get encoder (i.e. mouse wheel) ticks difference and pressed state 49 | * @param data store the read data here 50 | * @return false: all ticks and button state are handled 51 | */ 52 | bool mousewheel_read(lv_indev_data_t * data) 53 | { 54 | data->state = state; 55 | data->enc_diff = enc_diff; 56 | enc_diff = 0; 57 | 58 | return false; /*No more data to read so return false*/ 59 | } 60 | 61 | /** 62 | * It is called periodically from the SDL thread to check mouse wheel state 63 | * @param event describes the event 64 | */ 65 | void mousewheel_handler(SDL_Event * event) 66 | { 67 | switch(event->type) { 68 | case SDL_MOUSEWHEEL: 69 | // Scroll down (y = -1) means positive encoder turn, 70 | // so invert it 71 | enc_diff += -(event->wheel.y); 72 | break; 73 | case SDL_MOUSEBUTTONDOWN: 74 | if(event->button.button == SDL_BUTTON_MIDDLE) { 75 | state = LV_INDEV_STATE_PR; 76 | } 77 | break; 78 | case SDL_MOUSEBUTTONUP: 79 | if(event->button.button == SDL_BUTTON_MIDDLE) { 80 | state = LV_INDEV_STATE_REL; 81 | } 82 | break; 83 | default: 84 | break; 85 | } 86 | } 87 | 88 | /********************** 89 | * STATIC FUNCTIONS 90 | **********************/ 91 | 92 | #endif 93 | -------------------------------------------------------------------------------- /SDL2/SDL_test_compare.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_compare.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines comparison functions (i.e. for surfaces). 33 | 34 | */ 35 | 36 | #ifndef SDL_test_compare_h_ 37 | #define SDL_test_compare_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "SDL_test_images.h" 42 | 43 | #include "begin_code.h" 44 | /* Set up for C function definitions, even when using C++ */ 45 | #ifdef __cplusplus 46 | extern "C" { 47 | #endif 48 | 49 | /** 50 | * \brief Compares a surface and with reference image data for equality 51 | * 52 | * \param surface Surface used in comparison 53 | * \param referenceSurface Test Surface used in comparison 54 | * \param allowable_error Allowable difference (=sum of squared difference for each RGB component) in blending accuracy. 55 | * 56 | * \returns 0 if comparison succeeded, >0 (=number of pixels for which the comparison failed) if comparison failed, -1 if any of the surfaces were NULL, -2 if the surface sizes differ. 57 | */ 58 | int SDLTest_CompareSurfaces(SDL_Surface *surface, SDL_Surface *referenceSurface, int allowable_error); 59 | 60 | 61 | /* Ends C function definitions when using C++ */ 62 | #ifdef __cplusplus 63 | } 64 | #endif 65 | #include "close_code.h" 66 | 67 | #endif /* SDL_test_compare_h_ */ 68 | 69 | /* vi: set ts=4 sw=4 expandtab: */ 70 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test.h: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test.h 3 | * 4 | */ 5 | 6 | #ifndef LV_TEST_H 7 | #define LV_TEST_H 8 | 9 | #ifdef __cplusplus 10 | extern "C" { 11 | #endif 12 | 13 | /********************* 14 | * INCLUDES 15 | *********************/ 16 | #ifdef LV_CONF_INCLUDE_SIMPLE 17 | #include "lv_ex_conf.h" 18 | #else 19 | #include "../../lv_ex_conf.h" 20 | #endif 21 | 22 | #if USE_LV_TESTS 23 | 24 | #include "../lv_examples.h" 25 | 26 | #include "lv_test_obj/lv_test_obj.h" 27 | 28 | #include "lv_test_objx/lv_test_arc/lv_test_arc.h" 29 | #include "lv_test_objx/lv_test_bar/lv_test_bar.h" 30 | #include "lv_test_objx/lv_test_btn/lv_test_btn.h" 31 | #include "lv_test_objx/lv_test_btnm/lv_test_btnm.h" 32 | #include "lv_test_objx/lv_test_cb/lv_test_cb.h" 33 | #include "lv_test_objx/lv_test_chart/lv_test_chart.h" 34 | #include "lv_test_objx/lv_test_cont/lv_test_cont.h" 35 | #include "lv_test_objx/lv_test_ddlist/lv_test_ddlist.h" 36 | #include "lv_test_objx/lv_test_gauge/lv_test_gauge.h" 37 | #include "lv_test_objx/lv_test_img/lv_test_img.h" 38 | #include "lv_test_objx/lv_test_imgbtn/lv_test_imgbtn.h" 39 | #include "lv_test_objx/lv_test_kb/lv_test_kb.h" 40 | #include "lv_test_objx/lv_test_label/lv_test_label.h" 41 | #include "lv_test_objx/lv_test_led/lv_test_led.h" 42 | #include "lv_test_objx/lv_test_line/lv_test_line.h" 43 | #include "lv_test_objx/lv_test_list/lv_test_list.h" 44 | #include "lv_test_objx/lv_test_lmeter/lv_test_lmeter.h" 45 | #include "lv_test_objx/lv_test_mbox/lv_test_mbox.h" 46 | #include "lv_test_objx/lv_test_page/lv_test_page.h" 47 | #include "lv_test_objx/lv_test_preload/lv_test_preload.h" 48 | #include "lv_test_objx/lv_test_roller/lv_test_roller.h" 49 | #include "lv_test_objx/lv_test_slider/lv_test_slider.h" 50 | #include "lv_test_objx/lv_test_sw/lv_test_sw.h" 51 | #include "lv_test_objx/lv_test_ta/lv_test_ta.h" 52 | #include "lv_test_objx/lv_test_tabview/lv_test_tabview.h" 53 | #include "lv_test_objx/lv_test_win/lv_test_win.h" 54 | 55 | #include "lv_test_theme/lv_test_theme.h" 56 | 57 | /********************* 58 | * DEFINES 59 | *********************/ 60 | 61 | /********************** 62 | * TYPEDEFS 63 | **********************/ 64 | 65 | /********************** 66 | * GLOBAL PROTOTYPES 67 | **********************/ 68 | 69 | /********************** 70 | * MACROS 71 | **********************/ 72 | 73 | #endif /* USE_LV_TESTS */ 74 | 75 | #ifdef __cplusplus 76 | } /* extern "C" */ 77 | #endif 78 | 79 | #endif /*LV_TEST_H*/ 80 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_led/lv_test_led.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_led.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_led.h" 10 | 11 | #if USE_LV_LED && USE_LV_TESTS 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL FUNCTIONS 35 | **********************/ 36 | 37 | /** 38 | * Create LEDs to test their functionalities 39 | */ 40 | void lv_test_led_1(void) 41 | { 42 | /* Create a default object*/ 43 | lv_obj_t * led1 = lv_led_create(lv_scr_act(), NULL); 44 | lv_obj_set_pos(led1, 20, 20); 45 | 46 | /*Create styles LED*/ 47 | static lv_style_t style; 48 | lv_style_copy(&style, &lv_style_pretty_color); 49 | style.body.shadow.width = 10; 50 | style.body.radius = LV_RADIUS_CIRCLE; 51 | style.body.border.width = 3; 52 | style.body.border.opa = LV_OPA_30; 53 | style.body.main_color = LV_COLOR_MAKE(0xb5, 0x0f, 0x04); 54 | style.body.grad_color = LV_COLOR_MAKE(0x50, 0x07, 0x02); 55 | style.body.border.color = LV_COLOR_MAKE(0xfa, 0x0f, 0x00); 56 | style.body.shadow.color = LV_COLOR_MAKE(0xb5, 0x0f, 0x04); 57 | 58 | lv_obj_t * led2 = lv_led_create(lv_scr_act(), NULL); 59 | lv_led_set_style(led2, &style); 60 | lv_obj_align(led2, led1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 61 | 62 | /*Turned ON LED*/ 63 | lv_obj_t * led_on = lv_led_create(lv_scr_act(), led2); 64 | lv_obj_align(led_on, led2, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 65 | lv_led_on(led_on); 66 | 67 | /*Tuned OFF LED*/ 68 | lv_obj_t * led_off = lv_led_create(lv_scr_act(), led_on); 69 | lv_obj_align(led_off, led_on, LV_ALIGN_OUT_RIGHT_MID, 10, 0); 70 | lv_led_off(led_off); 71 | 72 | /*Arbitrary brightness*/ 73 | lv_obj_t * led_x = lv_led_create(lv_scr_act(), led_off); 74 | lv_obj_align(led_x, led_off, LV_ALIGN_OUT_RIGHT_MID, 10, 0); 75 | lv_led_set_bright(led_x, 170); 76 | 77 | 78 | } 79 | 80 | 81 | /********************** 82 | * STATIC FUNCTIONS 83 | **********************/ 84 | 85 | #endif /*USE_LV_LED && USE_LV_TESTS*/ 86 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_preload/lv_test_preload.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_preload.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_preload.h" 10 | #if USE_LV_PRELOAD && USE_LV_TESTS 11 | 12 | /********************* 13 | * DEFINES 14 | *********************/ 15 | 16 | /********************** 17 | * TYPEDEFS 18 | **********************/ 19 | 20 | /********************** 21 | * STATIC PROTOTYPES 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC VARIABLES 26 | **********************/ 27 | 28 | /********************** 29 | * MACROS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL FUNCTIONS 34 | **********************/ 35 | 36 | /** 37 | * Create preloads to test their functionalities 38 | */ 39 | void lv_test_preload_1(void) 40 | { 41 | /* Create a default object. It will look strange with the default style*/ 42 | lv_obj_t * preload1 = lv_preload_create(lv_scr_act(), NULL); 43 | lv_obj_set_pos(preload1, 10, 10); 44 | 45 | /* Create and apply a style*/ 46 | static lv_style_t style1; 47 | lv_style_copy(&style1, &lv_style_plain); 48 | style1.line.color = LV_COLOR_RED; 49 | style1.line.width = 8; 50 | style1.line.rounded = 1; 51 | style1.body.border.width = 2; 52 | style1.body.border.color = LV_COLOR_MAROON; 53 | style1.body.padding.hor = 3; 54 | style1.body.padding.ver = 3; 55 | lv_obj_t * preload2 = lv_preload_create(lv_scr_act(), NULL); 56 | lv_obj_set_size(preload2, 60, 60); 57 | lv_preload_set_style(preload2, LV_PRELOAD_STYLE_MAIN, &style1); 58 | lv_obj_align(preload2, preload1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 59 | 60 | 61 | lv_obj_t * preload3 = lv_preload_create(lv_scr_act(), preload2); 62 | lv_preload_set_arc_length(preload3, 90); 63 | lv_preload_set_spin_time(preload3, 5000); 64 | lv_obj_align(preload3, preload2, LV_ALIGN_OUT_RIGHT_TOP, 20, 0); 65 | // 66 | // /* Copy 'preload2' and set a new style for it */ 67 | // static lv_style_t style1; 68 | // lv_style_copy(&style1, &lv_style_plain); 69 | // style1.line.color = LV_COLOR_RED; 70 | // style1.line.width = 8; 71 | // lv_obj_t * preload3 = lv_preload_create(lv_scr_act(), preload2); 72 | // lv_obj_set_style(preload3, &style1); 73 | 74 | } 75 | 76 | 77 | /********************** 78 | * STATIC FUNCTIONS 79 | **********************/ 80 | 81 | #endif /*USE_LV_PRELOAD && USE_LV_TESTS*/ 82 | -------------------------------------------------------------------------------- /SDL2/SDL_gesture.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_gesture.h 24 | * 25 | * Include file for SDL gesture event handling. 26 | */ 27 | 28 | #ifndef SDL_gesture_h_ 29 | #define SDL_gesture_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "SDL_touch.h" 36 | 37 | 38 | #include "begin_code.h" 39 | /* Set up for C function definitions, even when using C++ */ 40 | #ifdef __cplusplus 41 | extern "C" { 42 | #endif 43 | 44 | typedef Sint64 SDL_GestureID; 45 | 46 | /* Function prototypes */ 47 | 48 | /** 49 | * \brief Begin Recording a gesture on the specified touch, or all touches (-1) 50 | * 51 | * 52 | */ 53 | extern DECLSPEC int SDLCALL SDL_RecordGesture(SDL_TouchID touchId); 54 | 55 | 56 | /** 57 | * \brief Save all currently loaded Dollar Gesture templates 58 | * 59 | * 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_SaveAllDollarTemplates(SDL_RWops *dst); 62 | 63 | /** 64 | * \brief Save a currently loaded Dollar Gesture template 65 | * 66 | * 67 | */ 68 | extern DECLSPEC int SDLCALL SDL_SaveDollarTemplate(SDL_GestureID gestureId,SDL_RWops *dst); 69 | 70 | 71 | /** 72 | * \brief Load Dollar Gesture templates from a file 73 | * 74 | * 75 | */ 76 | extern DECLSPEC int SDLCALL SDL_LoadDollarTemplates(SDL_TouchID touchId, SDL_RWops *src); 77 | 78 | 79 | /* Ends C function definitions when using C++ */ 80 | #ifdef __cplusplus 81 | } 82 | #endif 83 | #include "close_code.h" 84 | 85 | #endif /* SDL_gesture_h_ */ 86 | 87 | /* vi: set ts=4 sw=4 expandtab: */ 88 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_lmeter/lv_test_lmeter.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_lmeter.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include 10 | 11 | #include "lv_test_lmeter.h" 12 | 13 | #if USE_LV_LMETER && USE_LV_TESTS 14 | 15 | /********************* 16 | * DEFINES 17 | *********************/ 18 | 19 | /********************** 20 | * TYPEDEFS 21 | **********************/ 22 | 23 | /********************** 24 | * STATIC PROTOTYPES 25 | **********************/ 26 | 27 | /********************** 28 | * STATIC VARIABLES 29 | **********************/ 30 | 31 | /********************** 32 | * MACROS 33 | **********************/ 34 | 35 | /********************** 36 | * GLOBAL FUNCTIONS 37 | **********************/ 38 | /** 39 | * Create line meters to test their functionalities 40 | */ 41 | void lv_test_lmeter_1(void) 42 | { 43 | /* Create a default object*/ 44 | lv_obj_t * lmeter1 = lv_lmeter_create(lv_scr_act(), NULL); 45 | lv_obj_set_pos(lmeter1, 10, 10); 46 | lv_lmeter_set_value(lmeter1, 60); 47 | 48 | /*Copy the previous line meter and set smaller size for it*/ 49 | lv_obj_t * lmeter2 = lv_lmeter_create(lv_scr_act(), lmeter1); 50 | lv_obj_set_size(lmeter2, LV_DPI / 2, LV_DPI / 2); 51 | lv_obj_align(lmeter2, lmeter1, LV_ALIGN_OUT_BOTTOM_MID, 0, 10); 52 | 53 | /*Create a styled line meter*/ 54 | static lv_style_t style3; 55 | lv_style_copy(&style3, &lv_style_pretty); 56 | style3.body.main_color = LV_COLOR_GREEN; 57 | style3.body.grad_color = LV_COLOR_RED; 58 | style3.body.padding.hor = 4; 59 | style3.body.border.color = LV_COLOR_GRAY; /*Means the needle middle*/ 60 | style3.line.width = 2; 61 | style3.line.color = LV_COLOR_SILVER; 62 | 63 | lv_obj_t * lmeter3 = lv_lmeter_create(lv_scr_act(), lmeter1); 64 | lv_obj_align(lmeter3, lmeter1, LV_ALIGN_OUT_RIGHT_MID, 20, 0); 65 | lv_obj_set_style(lmeter3, &style3); 66 | lv_lmeter_set_scale(lmeter3, 270, 41); 67 | lv_lmeter_set_range(lmeter3, -100, 100); 68 | lv_lmeter_set_value(lmeter3, 50); 69 | 70 | /*Copy the modified 'lmeter3' and set a smaller size for it*/ 71 | lv_obj_t * lmeter4 = lv_lmeter_create(lv_scr_act(), lmeter3); 72 | lv_obj_set_size(lmeter4, 60, 60); 73 | lv_obj_align(lmeter4, lmeter3, LV_ALIGN_OUT_BOTTOM_MID, 0, 10); 74 | 75 | } 76 | 77 | /********************** 78 | * STATIC FUNCTIONS 79 | **********************/ 80 | 81 | #endif /*USE_LV_LMETER && USE_LV_TESTS*/ 82 | -------------------------------------------------------------------------------- /SDL2/SDL_test_images.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_images.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | /* 31 | 32 | Defines some images for tests. 33 | 34 | */ 35 | 36 | #ifndef SDL_test_images_h_ 37 | #define SDL_test_images_h_ 38 | 39 | #include "SDL.h" 40 | 41 | #include "begin_code.h" 42 | /* Set up for C function definitions, even when using C++ */ 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** 48 | *Type for test images. 49 | */ 50 | typedef struct SDLTest_SurfaceImage_s { 51 | int width; 52 | int height; 53 | unsigned int bytes_per_pixel; /* 3:RGB, 4:RGBA */ 54 | const char *pixel_data; 55 | } SDLTest_SurfaceImage_t; 56 | 57 | /* Test images */ 58 | SDL_Surface *SDLTest_ImageBlit(void); 59 | SDL_Surface *SDLTest_ImageBlitColor(void); 60 | SDL_Surface *SDLTest_ImageBlitAlpha(void); 61 | SDL_Surface *SDLTest_ImageBlitBlendAdd(void); 62 | SDL_Surface *SDLTest_ImageBlitBlend(void); 63 | SDL_Surface *SDLTest_ImageBlitBlendMod(void); 64 | SDL_Surface *SDLTest_ImageBlitBlendNone(void); 65 | SDL_Surface *SDLTest_ImageBlitBlendAll(void); 66 | SDL_Surface *SDLTest_ImageFace(void); 67 | SDL_Surface *SDLTest_ImagePrimitives(void); 68 | SDL_Surface *SDLTest_ImagePrimitivesBlend(void); 69 | 70 | /* Ends C function definitions when using C++ */ 71 | #ifdef __cplusplus 72 | } 73 | #endif 74 | #include "close_code.h" 75 | 76 | #endif /* SDL_test_images_h_ */ 77 | 78 | /* vi: set ts=4 sw=4 expandtab: */ 79 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_imgbtn/lv_test_imgbtn.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_imgbtn.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_imgbtn.h" 10 | #if USE_LV_IMGBTN && USE_LV_TESTS 11 | 12 | #if LV_EX_PRINTF 13 | #include 14 | #endif 15 | 16 | /********************* 17 | * DEFINES 18 | *********************/ 19 | 20 | /********************** 21 | * TYPEDEFS 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC PROTOTYPES 26 | **********************/ 27 | lv_res_t imgbtn_clicked(lv_obj_t * imgbtn); 28 | 29 | /********************** 30 | * STATIC VARIABLES 31 | **********************/ 32 | 33 | /********************** 34 | * MACROS 35 | **********************/ 36 | 37 | /********************** 38 | * GLOBAL FUNCTIONS 39 | **********************/ 40 | 41 | /** 42 | * Create imgbtns to test their functionalities 43 | */ 44 | void lv_test_imgbtn_1(void) 45 | { 46 | /* Create an image button and set images for it*/ 47 | lv_obj_t * imgbtn1 = lv_imgbtn_create(lv_scr_act(), NULL); 48 | lv_obj_set_pos(imgbtn1, 10, 10); 49 | lv_imgbtn_set_toggle(imgbtn1, true); 50 | 51 | LV_IMG_DECLARE(imgbtn_img_1); 52 | LV_IMG_DECLARE(imgbtn_img_2); 53 | LV_IMG_DECLARE(imgbtn_img_3); 54 | LV_IMG_DECLARE(imgbtn_img_4); 55 | 56 | lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_REL, &imgbtn_img_1); 57 | lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_PR, &imgbtn_img_2); 58 | lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_TGL_REL, &imgbtn_img_3); 59 | lv_imgbtn_set_src(imgbtn1, LV_BTN_STATE_TGL_PR, &imgbtn_img_4); 60 | 61 | lv_imgbtn_set_action(imgbtn1, LV_BTN_ACTION_CLICK, imgbtn_clicked); 62 | 63 | /*Add a label*/ 64 | lv_obj_t * label = lv_label_create(imgbtn1, NULL); 65 | lv_label_set_text(label, "Button 1"); 66 | 67 | /*Copy the image button*/ 68 | lv_obj_t * imgbtn2 = lv_imgbtn_create(lv_scr_act(), imgbtn1); 69 | lv_imgbtn_set_state(imgbtn2, LV_BTN_STATE_TGL_REL); 70 | lv_obj_align(imgbtn2, imgbtn1, LV_ALIGN_OUT_RIGHT_MID, 20, 0); 71 | 72 | label = lv_label_create(imgbtn2, NULL); 73 | lv_label_set_text(label, "Button 2"); 74 | } 75 | 76 | 77 | /********************** 78 | * STATIC FUNCTIONS 79 | **********************/ 80 | 81 | lv_res_t imgbtn_clicked(lv_obj_t * imgbtn) 82 | { 83 | (void) imgbtn; /*Unused*/ 84 | 85 | #if LV_EX_PRINTF 86 | printf("Clicked\n"); 87 | #endif 88 | 89 | return LV_RES_OK; 90 | } 91 | 92 | #endif /*USE_LV_IMGBTN && USE_LV_TESTS*/ 93 | -------------------------------------------------------------------------------- /SDL2/SDL_error.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_error.h 24 | * 25 | * Simple error message routines for SDL. 26 | */ 27 | 28 | #ifndef SDL_error_h_ 29 | #define SDL_error_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Public functions */ 40 | /* SDL_SetError() unconditionally returns -1. */ 41 | extern DECLSPEC int SDLCALL SDL_SetError(SDL_PRINTF_FORMAT_STRING const char *fmt, ...) SDL_PRINTF_VARARG_FUNC(1); 42 | extern DECLSPEC const char *SDLCALL SDL_GetError(void); 43 | extern DECLSPEC void SDLCALL SDL_ClearError(void); 44 | 45 | /** 46 | * \name Internal error functions 47 | * 48 | * \internal 49 | * Private error reporting function - used internally. 50 | */ 51 | /* @{ */ 52 | #define SDL_OutOfMemory() SDL_Error(SDL_ENOMEM) 53 | #define SDL_Unsupported() SDL_Error(SDL_UNSUPPORTED) 54 | #define SDL_InvalidParamError(param) SDL_SetError("Parameter '%s' is invalid", (param)) 55 | typedef enum 56 | { 57 | SDL_ENOMEM, 58 | SDL_EFREAD, 59 | SDL_EFWRITE, 60 | SDL_EFSEEK, 61 | SDL_UNSUPPORTED, 62 | SDL_LASTERROR 63 | } SDL_errorcode; 64 | /* SDL_Error() unconditionally returns -1. */ 65 | extern DECLSPEC int SDLCALL SDL_Error(SDL_errorcode code); 66 | /* @} *//* Internal error functions */ 67 | 68 | /* Ends C function definitions when using C++ */ 69 | #ifdef __cplusplus 70 | } 71 | #endif 72 | #include "close_code.h" 73 | 74 | #endif /* SDL_error_h_ */ 75 | 76 | /* vi: set ts=4 sw=4 expandtab: */ 77 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_kb/lv_test_kb.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_kb.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | #include "lv_test_kb.h" 11 | 12 | #if USE_LV_KB != 0 13 | 14 | /********************* 15 | * DEFINES 16 | *********************/ 17 | 18 | /********************** 19 | * TYPEDEFS 20 | **********************/ 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 | * Create a default object and test the basic functions 40 | */ 41 | void lv_test_kb_1(void) 42 | { 43 | 44 | lv_obj_t * ta = lv_ta_create(lv_scr_act(), NULL); 45 | lv_obj_align(ta, NULL, LV_ALIGN_IN_TOP_MID, 0, 30); 46 | 47 | /* Default object*/ 48 | lv_obj_t * kb1 = lv_kb_create(lv_scr_act(), NULL); 49 | lv_obj_align(kb1, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); 50 | lv_kb_set_ta(kb1, ta); 51 | } 52 | 53 | /** 54 | * Create a styles keyboard 55 | */ 56 | void lv_test_kb_2(void) 57 | { 58 | 59 | lv_obj_t * ta = lv_ta_create(lv_scr_act(), NULL); 60 | lv_obj_align(ta, NULL, LV_ALIGN_IN_TOP_MID, 0, 30); 61 | 62 | /* Default object*/ 63 | lv_obj_t * kb1 = lv_kb_create(lv_scr_act(), NULL); 64 | lv_obj_set_size(kb1, LV_HOR_RES / 2, LV_VER_RES / 4); 65 | lv_obj_align(kb1, NULL, LV_ALIGN_IN_BOTTOM_MID, 0, 0); 66 | lv_kb_set_ta(kb1, ta); 67 | 68 | static lv_style_t bg; 69 | static lv_style_t rel; 70 | static lv_style_t pr; 71 | 72 | lv_style_copy(&bg, &lv_style_plain_color); 73 | bg.body.main_color = LV_COLOR_NAVY; 74 | bg.body.grad_color = LV_COLOR_NAVY; 75 | bg.body.padding.hor = 0; 76 | bg.body.padding.ver = 10; 77 | bg.body.padding.inner = 0; 78 | 79 | lv_style_copy(&rel, &lv_style_plain); 80 | rel.body.border.width = 1; 81 | rel.body.main_color = LV_COLOR_WHITE; 82 | rel.body.grad_color = LV_COLOR_SILVER; 83 | rel.body.grad_color = LV_COLOR_SILVER; 84 | rel.text.color = LV_COLOR_NAVY; 85 | lv_style_copy(&pr, &lv_style_plain_color); 86 | 87 | lv_kb_set_style(kb1, LV_KB_STYLE_BG, &bg); 88 | lv_kb_set_style(kb1, LV_KB_STYLE_BTN_REL, &rel); 89 | lv_kb_set_style(kb1, LV_KB_STYLE_BTN_PR, &pr); 90 | } 91 | 92 | /********************** 93 | * STATIC FUNCTIONS 94 | **********************/ 95 | 96 | #endif /*USE_LV_KB && USE_LV_TESTS*/ 97 | -------------------------------------------------------------------------------- /lv_examples/lv_tutorial/4_themes/lv_tutorial_themes.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_tutorial_themes.c 3 | * 4 | */ 5 | 6 | /* 7 | * ------------------------------------------------------------- 8 | * See how the customize with themes much faster and simpler 9 | * -------------------------------------------------------------- 10 | * 11 | * To set up styles you need some deeper knowledge about graphics library and 12 | * requires to be a designer a little bit. In addition it takes quite much time. 13 | * 14 | * To address this issue you can use 'themes'. 15 | * The themes are style collections for every object type with all the required styles. 16 | * 17 | * In 'lv_conf.h' you can enable the themes. E.g.: USE_LV_THEME_ALIEN 1 18 | * 19 | * When you initialize a theme you can assign a HUE (from HSV color space) and a font: 20 | * For example to initialize the 'Alien' theme with a greenish color: 21 | * lv_theme_t *th = lv_theme_alien_init(130, &lv_font_dejavu_40); 22 | * 23 | * You have two options to use the themes: 24 | * 1. Set the styles in it directly: lv_bar_set_style(my_bar, LV_BAR_STYLE_BG, th->bar.bg); 25 | * 2. Set a system theme and let the library to create objects with the theme's styles 26 | * E.g. lv_theme_set_current(th); 27 | */ 28 | 29 | /********************* 30 | * INCLUDES 31 | *********************/ 32 | 33 | #include "lv_tutorial_themes.h" 34 | #if USE_LV_TUTORIALS && USE_LV_THEME_ALIEN 35 | 36 | #include "../2_objects/lv_tutorial_objects.h" 37 | 38 | 39 | /********************* 40 | * DEFINES 41 | *********************/ 42 | 43 | /********************** 44 | * TYPEDEFS 45 | **********************/ 46 | 47 | /********************** 48 | * STATIC PROTOTYPES 49 | **********************/ 50 | 51 | /********************** 52 | * STATIC VARIABLES 53 | **********************/ 54 | 55 | /********************** 56 | * MACROS 57 | **********************/ 58 | 59 | /********************** 60 | * GLOBAL FUNCTIONS 61 | **********************/ 62 | 63 | /** 64 | * Initialize a theme and create the same objects like "lv_tutorial_objects' 65 | */ 66 | void lv_tutorial_themes(void) 67 | { 68 | /*Initialize the alien theme 69 | * 210: a green HUE value 70 | * NULL: use the default font (LV_FONT_DEFAULT)*/ 71 | lv_theme_t * th = lv_theme_alien_init(210, NULL); 72 | 73 | /*Set the surent system theme*/ 74 | lv_theme_set_current(th); 75 | 76 | /*Create the 'lv_tutorial_objects'*/ 77 | lv_tutorial_objects(); 78 | 79 | } 80 | 81 | /********************** 82 | * STATIC FUNCTIONS 83 | **********************/ 84 | 85 | #endif /*USE_LV_TUTORIALS*/ 86 | -------------------------------------------------------------------------------- /SDL2/SDL_touch.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_touch.h 24 | * 25 | * Include file for SDL touch event handling. 26 | */ 27 | 28 | #ifndef SDL_touch_h_ 29 | #define SDL_touch_h_ 30 | 31 | #include "SDL_stdinc.h" 32 | #include "SDL_error.h" 33 | #include "SDL_video.h" 34 | 35 | #include "begin_code.h" 36 | /* Set up for C function definitions, even when using C++ */ 37 | #ifdef __cplusplus 38 | extern "C" { 39 | #endif 40 | 41 | typedef Sint64 SDL_TouchID; 42 | typedef Sint64 SDL_FingerID; 43 | 44 | typedef struct SDL_Finger 45 | { 46 | SDL_FingerID id; 47 | float x; 48 | float y; 49 | float pressure; 50 | } SDL_Finger; 51 | 52 | /* Used as the device ID for mouse events simulated with touch input */ 53 | #define SDL_TOUCH_MOUSEID ((Uint32)-1) 54 | 55 | 56 | /* Function prototypes */ 57 | 58 | /** 59 | * \brief Get the number of registered touch devices. 60 | */ 61 | extern DECLSPEC int SDLCALL SDL_GetNumTouchDevices(void); 62 | 63 | /** 64 | * \brief Get the touch ID with the given index, or 0 if the index is invalid. 65 | */ 66 | extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index); 67 | 68 | /** 69 | * \brief Get the number of active fingers for a given touch device. 70 | */ 71 | extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID); 72 | 73 | /** 74 | * \brief Get the finger object of the given touch, with the given index. 75 | */ 76 | extern DECLSPEC SDL_Finger * SDLCALL SDL_GetTouchFinger(SDL_TouchID touchID, int index); 77 | 78 | /* Ends C function definitions when using C++ */ 79 | #ifdef __cplusplus 80 | } 81 | #endif 82 | #include "close_code.h" 83 | 84 | #endif /* SDL_touch_h_ */ 85 | 86 | /* vi: set ts=4 sw=4 expandtab: */ 87 | -------------------------------------------------------------------------------- /SDL2/SDL_power.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | #ifndef SDL_power_h_ 23 | #define SDL_power_h_ 24 | 25 | /** 26 | * \file SDL_power.h 27 | * 28 | * Header for the SDL power management routines. 29 | */ 30 | 31 | #include "SDL_stdinc.h" 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /** 40 | * \brief The basic state for the system's power supply. 41 | */ 42 | typedef enum 43 | { 44 | SDL_POWERSTATE_UNKNOWN, /**< cannot determine power status */ 45 | SDL_POWERSTATE_ON_BATTERY, /**< Not plugged in, running on the battery */ 46 | SDL_POWERSTATE_NO_BATTERY, /**< Plugged in, no battery available */ 47 | SDL_POWERSTATE_CHARGING, /**< Plugged in, charging battery */ 48 | SDL_POWERSTATE_CHARGED /**< Plugged in, battery charged */ 49 | } SDL_PowerState; 50 | 51 | 52 | /** 53 | * \brief Get the current power supply details. 54 | * 55 | * \param secs Seconds of battery life left. You can pass a NULL here if 56 | * you don't care. Will return -1 if we can't determine a 57 | * value, or we're not running on a battery. 58 | * 59 | * \param pct Percentage of battery life left, between 0 and 100. You can 60 | * pass a NULL here if you don't care. Will return -1 if we 61 | * can't determine a value, or we're not running on a battery. 62 | * 63 | * \return The state of the battery (if any). 64 | */ 65 | extern DECLSPEC SDL_PowerState SDLCALL SDL_GetPowerInfo(int *secs, int *pct); 66 | 67 | /* Ends C function definitions when using C++ */ 68 | #ifdef __cplusplus 69 | } 70 | #endif 71 | #include "close_code.h" 72 | 73 | #endif /* SDL_power_h_ */ 74 | 75 | /* vi: set ts=4 sw=4 expandtab: */ 76 | -------------------------------------------------------------------------------- /SDL2/SDL_test_font.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_test_font.h 24 | * 25 | * Include file for SDL test framework. 26 | * 27 | * This code is a part of the SDL2_test library, not the main SDL library. 28 | */ 29 | 30 | #ifndef SDL_test_font_h_ 31 | #define SDL_test_font_h_ 32 | 33 | #include "begin_code.h" 34 | /* Set up for C function definitions, even when using C++ */ 35 | #ifdef __cplusplus 36 | extern "C" { 37 | #endif 38 | 39 | /* Function prototypes */ 40 | 41 | #define FONT_CHARACTER_SIZE 8 42 | 43 | /** 44 | * \brief Draw a string in the currently set font. 45 | * 46 | * \param renderer The renderer to draw on. 47 | * \param x The X coordinate of the upper left corner of the character. 48 | * \param y The Y coordinate of the upper left corner of the character. 49 | * \param c The character to draw. 50 | * 51 | * \returns Returns 0 on success, -1 on failure. 52 | */ 53 | int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c); 54 | 55 | /** 56 | * \brief Draw a string in the currently set font. 57 | * 58 | * \param renderer The renderer to draw on. 59 | * \param x The X coordinate of the upper left corner of the string. 60 | * \param y The Y coordinate of the upper left corner of the string. 61 | * \param s The string to draw. 62 | * 63 | * \returns Returns 0 on success, -1 on failure. 64 | */ 65 | int SDLTest_DrawString(SDL_Renderer *renderer, int x, int y, const char *s); 66 | 67 | 68 | /** 69 | * \brief Cleanup textures used by font drawing functions. 70 | */ 71 | void SDLTest_CleanupTextDrawing(void); 72 | 73 | /* Ends C function definitions when using C++ */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | #include "close_code.h" 78 | 79 | #endif /* SDL_test_font_h_ */ 80 | 81 | /* vi: set ts=4 sw=4 expandtab: */ 82 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_win/lv_test_win.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_win.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_win.h" 10 | 11 | #if USE_LV_WIN && USE_LV_TESTS 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL FUNCTIONS 35 | **********************/ 36 | 37 | /** 38 | * Create windows to test their functionalities 39 | */ 40 | void lv_test_win_1(void) 41 | { 42 | 43 | lv_obj_t * win1 = lv_win_create(lv_scr_act(), NULL); 44 | lv_obj_set_size(win1, LV_HOR_RES / 2 - LV_DPI / 20, LV_VER_RES / 2 - LV_DPI / 20); 45 | 46 | lv_obj_t * win2 = lv_win_create(lv_scr_act(), win1); 47 | lv_obj_align(win2, NULL, LV_ALIGN_IN_TOP_RIGHT, 0, 0); 48 | lv_win_set_title(win2, "Random title"); 49 | lv_win_add_btn(win2, SYMBOL_CLOSE, NULL); 50 | lv_win_add_btn(win2, SYMBOL_OK, NULL); 51 | lv_win_add_btn(win2, SYMBOL_EDIT, NULL); 52 | 53 | lv_obj_t * label = lv_label_create(win2, NULL); 54 | lv_obj_set_pos(label, 10, 10); 55 | lv_label_set_text(label, "Long\n\n\ntext\n\n\nto\n\n\nsee\n\n\nthe\n\n\nscrollbars"); 56 | 57 | 58 | static lv_style_t header; 59 | lv_style_copy(&header, &lv_style_plain); 60 | header.body.main_color = LV_COLOR_RED; 61 | header.body.grad_color = LV_COLOR_MAROON; 62 | header.body.padding.inner = 0; 63 | header.text.color = LV_COLOR_WHITE; 64 | 65 | lv_obj_t * win3 = lv_win_create(lv_scr_act(), win2); 66 | lv_obj_align(win3, NULL, LV_ALIGN_IN_BOTTOM_LEFT, 0, 0); 67 | lv_win_set_style(win3, LV_WIN_STYLE_HEADER, &header); 68 | lv_win_set_style(win3, LV_WIN_STYLE_BTN_REL, &lv_style_transp); 69 | lv_win_set_style(win3, LV_WIN_STYLE_CONTENT_BG, &lv_style_plain_color); 70 | lv_win_set_style(win3, LV_WIN_STYLE_CONTENT_SCRL, &lv_style_plain); 71 | lv_win_set_style(win3, LV_WIN_STYLE_BG, &lv_style_plain_color); 72 | lv_win_set_btn_size(win3, LV_DPI / 3); 73 | 74 | label = lv_label_create(win3, NULL); 75 | lv_obj_set_pos(label, 10, 10); 76 | lv_label_set_text(label, "Styled window\n\nThe content background has\ndifferent color"); 77 | 78 | lv_obj_t * win4 = lv_win_create(lv_scr_act(), win3); 79 | lv_obj_align(win4, NULL, LV_ALIGN_IN_BOTTOM_RIGHT, 0, 0); 80 | } 81 | 82 | /********************** 83 | * STATIC FUNCTIONS 84 | **********************/ 85 | 86 | #endif /*USE_LV_WIN && USE_LV_TESTS*/ 87 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_bar/lv_test_bar.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_bar.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_bar.h" 10 | #if USE_LV_BAR && USE_LV_TESTS 11 | 12 | /********************* 13 | * DEFINES 14 | *********************/ 15 | 16 | /********************** 17 | * TYPEDEFS 18 | **********************/ 19 | 20 | /********************** 21 | * STATIC PROTOTYPES 22 | **********************/ 23 | 24 | /********************** 25 | * STATIC VARIABLES 26 | **********************/ 27 | 28 | /********************** 29 | * MACROS 30 | **********************/ 31 | 32 | /********************** 33 | * GLOBAL FUNCTIONS 34 | **********************/ 35 | 36 | /** 37 | * Create bars to test their functionalities 38 | */ 39 | void lv_test_bar_1(void) 40 | { 41 | /* Create a default object*/ 42 | lv_obj_t * bar1 = lv_bar_create(lv_scr_act(), NULL); 43 | lv_obj_set_pos(bar1, 10, 10); 44 | lv_bar_set_value(bar1, 40); 45 | 46 | /* Modify size and position, range and set to 75 % */ 47 | lv_obj_t * bar2 = lv_bar_create(lv_scr_act(), NULL); 48 | lv_obj_set_size(bar2, 200, 50); 49 | lv_obj_align(bar2, bar1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 50 | lv_bar_set_range(bar2, -50, 50); 51 | lv_bar_set_value(bar2, 25); 52 | 53 | /* Copy 'bar2' but set its size to be vertical (indicator at 75%)*/ 54 | lv_obj_t * bar3 = lv_bar_create(lv_scr_act(), bar2); 55 | lv_obj_set_size(bar3, 50, 200); 56 | lv_obj_align(bar3, bar2, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 57 | 58 | 59 | /* Copy 'bar2' and set new style for it 60 | * (like 'bar2' on its left but dark bg, thin red indicator with big light)*/ 61 | static lv_style_t bar_bg; 62 | lv_style_copy(&bar_bg, &lv_style_pretty); 63 | bar_bg.body.main_color = LV_COLOR_BLACK; 64 | 65 | static lv_style_t bar_indic; 66 | lv_style_copy(&bar_indic, &lv_style_pretty); 67 | bar_indic.body.main_color = LV_COLOR_RED; 68 | bar_indic.body.grad_color = LV_COLOR_MAROON; 69 | bar_indic.body.shadow.color = LV_COLOR_RED; 70 | bar_indic.body.shadow.width = 20; 71 | bar_indic.body.padding.ver = 10; /*Make the indicator thinner*/ 72 | 73 | lv_obj_t * bar4 = lv_bar_create(lv_scr_act(), bar2); 74 | lv_obj_align(bar4, bar2, LV_ALIGN_OUT_RIGHT_MID, 20, 0); 75 | lv_bar_set_style(bar4, LV_BAR_STYLE_BG, &bar_bg); 76 | lv_bar_set_style(bar4, LV_BAR_STYLE_INDIC, &bar_indic); 77 | 78 | /* Copy 'bar4' but set its size to be vertical*/ 79 | lv_obj_t * bar5 = lv_bar_create(lv_scr_act(), bar4); 80 | lv_obj_set_size(bar5, 50, 200); 81 | lv_obj_align(bar5, bar4, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 82 | 83 | } 84 | 85 | 86 | /********************** 87 | * STATIC FUNCTIONS 88 | **********************/ 89 | 90 | #endif /*USE_LV_BAR && USE_LV_TESTS*/ 91 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_gauge/lv_test_gauge.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_gauge.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_gauge.h" 10 | 11 | #if USE_LV_GAUGE && USE_LV_TESTS 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL FUNCTIONS 35 | **********************/ 36 | 37 | /** 38 | * Create gauges to test their functionalities 39 | */ 40 | void lv_test_gauge_1(void) 41 | { 42 | /* Create a default object*/ 43 | lv_obj_t * gauge1 = lv_gauge_create(lv_scr_act(), NULL); 44 | lv_obj_set_pos(gauge1, 10, 10); 45 | lv_gauge_set_value(gauge1, 0, 75); 46 | 47 | /*Copy the previous gauge and set smaller size for it*/ 48 | lv_obj_t * gauge2 = lv_gauge_create(lv_scr_act(), gauge1); 49 | lv_obj_set_size(gauge2, 2 * lv_obj_get_width(gauge1) / 3, 2 * lv_obj_get_height(gauge1) / 3); 50 | lv_obj_align(gauge2, gauge1, LV_ALIGN_OUT_BOTTOM_MID, 0, 10); 51 | 52 | /*Copy the first gauge add more needles and set new style*/ 53 | #if LV_COMPILER_NON_CONST_INIT_SUPPORTED 54 | static lv_color_t needle_colors[3] = {LV_COLOR_BLUE, LV_COLOR_PURPLE, LV_COLOR_TEAL}; 55 | #else 56 | static lv_color_t needle_colors[3] = { {{0}}, {{0}}, {{0}} }; 57 | #endif 58 | /*Create a styled gauge*/ 59 | static lv_style_t style3; 60 | lv_style_copy(&style3, &lv_style_pretty); 61 | style3.body.main_color = LV_COLOR_GREEN; 62 | style3.body.grad_color = LV_COLOR_RED; 63 | style3.body.padding.hor = 6; 64 | style3.body.padding.inner = 10; 65 | style3.body.padding.ver = 8; 66 | style3.body.border.color = LV_COLOR_GRAY; 67 | style3.line.width = 2; 68 | 69 | lv_obj_t * gauge3 = lv_gauge_create(lv_scr_act(), gauge1); 70 | lv_obj_align(gauge3, gauge1, LV_ALIGN_OUT_RIGHT_MID, 20, 0); 71 | lv_obj_set_style(gauge3, &style3); 72 | lv_gauge_set_scale(gauge3, 270, 41, 5); 73 | lv_gauge_set_needle_count(gauge3, 3, needle_colors); 74 | lv_gauge_set_value(gauge3, 0, 20); 75 | lv_gauge_set_value(gauge3, 1, 40); 76 | lv_gauge_set_value(gauge3, 2, 60); 77 | 78 | /*Copy the modified 'gauge3' and set a smaller size for it*/ 79 | lv_obj_t * gauge4 = lv_gauge_create(lv_scr_act(), gauge3); 80 | lv_obj_set_size(gauge4, 100, 100); 81 | lv_obj_align(gauge4, gauge3, LV_ALIGN_OUT_BOTTOM_MID, 0, 10); 82 | 83 | } 84 | 85 | /********************** 86 | * STATIC FUNCTIONS 87 | **********************/ 88 | 89 | #endif /*USE_LV_GAUGE && USE_LV_TESTS*/ 90 | 91 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_btnm/lv_test_btnm.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_btnm.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include /*For printf in the action*/ 10 | 11 | #include "lv_test_btnm.h" 12 | 13 | #if USE_LV_BTNM && USE_LV_TESTS 14 | 15 | /********************* 16 | * DEFINES 17 | *********************/ 18 | 19 | /********************** 20 | * TYPEDEFS 21 | **********************/ 22 | 23 | /********************** 24 | * STATIC PROTOTYPES 25 | **********************/ 26 | static lv_res_t btnm_action(lv_obj_t * btnm, const char * txt); 27 | 28 | /********************** 29 | * STATIC VARIABLES 30 | **********************/ 31 | #if LV_TXT_UTF8 != 0 32 | static const char * btnm_map[] = {"One line", "\n", "\212", "\242Ina", "\204üŰöŐ", "\221éÉ", "\n", "\214", "\202Left", ""}; 33 | #else 34 | static const char * btnm_map[] = {"One line", "\n", "\212", "\242Ina", "\204long", "\221short", "\n", "\214", "\202Left", ""}; 35 | #endif 36 | /********************** 37 | * MACROS 38 | **********************/ 39 | 40 | /********************** 41 | * GLOBAL FUNCTIONS 42 | **********************/ 43 | 44 | /** 45 | * Create button matrixes to test their functionalities 46 | */ 47 | void lv_test_btnm_1(void) 48 | { 49 | /* Default object 50 | * GOAL: A button matrix with default buttons */ 51 | lv_obj_t * btnm1 = lv_btnm_create(lv_scr_act(), NULL); 52 | 53 | /* Test map, size and position. Also try some features. 54 | * GOAL: A button matrix with default buttons. */ 55 | static lv_style_t rel; 56 | lv_style_copy(&rel, &lv_style_btn_tgl_rel); 57 | rel.body.main_color = LV_COLOR_RED; 58 | rel.body.grad_color = LV_COLOR_BLACK; 59 | rel.text.color = LV_COLOR_YELLOW; 60 | 61 | static lv_style_t pr; 62 | lv_style_copy(&pr, &lv_style_btn_tgl_rel); 63 | pr.body.main_color = LV_COLOR_ORANGE; 64 | pr.body.grad_color = LV_COLOR_BLACK; 65 | pr.text.color = LV_COLOR_WHITE; 66 | 67 | 68 | lv_obj_t * btnm2 = lv_btnm_create(lv_scr_act(), NULL); 69 | lv_btnm_set_map(btnm2, btnm_map); 70 | lv_obj_set_size(btnm2, LV_HOR_RES / 2, LV_VER_RES / 3); 71 | lv_obj_align(btnm2, btnm1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 72 | lv_btnm_set_toggle(btnm2, true, 2); 73 | lv_btnm_set_action(btnm2, btnm_action); 74 | lv_btnm_set_style(btnm2, LV_BTNM_STYLE_BTN_REL, &rel); 75 | lv_btnm_set_style(btnm2, LV_BTNM_STYLE_BTN_PR, &pr); 76 | 77 | 78 | lv_obj_t * btnm3 = lv_btnm_create(lv_scr_act(), btnm2); 79 | lv_obj_align(btnm3, btnm1, LV_ALIGN_OUT_BOTTOM_RIGHT, 0, 20); 80 | } 81 | 82 | /********************** 83 | * STATIC FUNCTIONS 84 | **********************/ 85 | 86 | static lv_res_t btnm_action(lv_obj_t * btnm, const char * txt) 87 | { 88 | (void) btnm; /*Unused*/ 89 | 90 | #if LV_EX_PRINTF 91 | printf("Key pressed: %s\n", txt); 92 | #endif 93 | return LV_RES_OK; 94 | } 95 | 96 | #endif /* USE_LV_BTNM && USE_LV_TESTS*/ 97 | -------------------------------------------------------------------------------- /SDL2/SDL_loadso.h: -------------------------------------------------------------------------------- 1 | /* 2 | Simple DirectMedia Layer 3 | Copyright (C) 1997-2018 Sam Lantinga 4 | 5 | This software is provided 'as-is', without any express or implied 6 | warranty. In no event will the authors be held liable for any damages 7 | arising from the use of this software. 8 | 9 | Permission is granted to anyone to use this software for any purpose, 10 | including commercial applications, and to alter it and redistribute it 11 | freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not 14 | claim that you wrote the original software. If you use this software 15 | in a product, an acknowledgment in the product documentation would be 16 | appreciated but is not required. 17 | 2. Altered source versions must be plainly marked as such, and must not be 18 | misrepresented as being the original software. 19 | 3. This notice may not be removed or altered from any source distribution. 20 | */ 21 | 22 | /** 23 | * \file SDL_loadso.h 24 | * 25 | * System dependent library loading routines 26 | * 27 | * Some things to keep in mind: 28 | * \li These functions only work on C function names. Other languages may 29 | * have name mangling and intrinsic language support that varies from 30 | * compiler to compiler. 31 | * \li Make sure you declare your function pointers with the same calling 32 | * convention as the actual library function. Your code will crash 33 | * mysteriously if you do not do this. 34 | * \li Avoid namespace collisions. If you load a symbol from the library, 35 | * it is not defined whether or not it goes into the global symbol 36 | * namespace for the application. If it does and it conflicts with 37 | * symbols in your code or other shared libraries, you will not get 38 | * the results you expect. :) 39 | */ 40 | 41 | #ifndef SDL_loadso_h_ 42 | #define SDL_loadso_h_ 43 | 44 | #include "SDL_stdinc.h" 45 | #include "SDL_error.h" 46 | 47 | #include "begin_code.h" 48 | /* Set up for C function definitions, even when using C++ */ 49 | #ifdef __cplusplus 50 | extern "C" { 51 | #endif 52 | 53 | /** 54 | * This function dynamically loads a shared object and returns a pointer 55 | * to the object handle (or NULL if there was an error). 56 | * The 'sofile' parameter is a system dependent name of the object file. 57 | */ 58 | extern DECLSPEC void *SDLCALL SDL_LoadObject(const char *sofile); 59 | 60 | /** 61 | * Given an object handle, this function looks up the address of the 62 | * named function in the shared object and returns it. This address 63 | * is no longer valid after calling SDL_UnloadObject(). 64 | */ 65 | extern DECLSPEC void *SDLCALL SDL_LoadFunction(void *handle, 66 | const char *name); 67 | 68 | /** 69 | * Unload a shared object from memory. 70 | */ 71 | extern DECLSPEC void SDLCALL SDL_UnloadObject(void *handle); 72 | 73 | /* Ends C function definitions when using C++ */ 74 | #ifdef __cplusplus 75 | } 76 | #endif 77 | #include "close_code.h" 78 | 79 | #endif /* SDL_loadso_h_ */ 80 | 81 | /* vi: set ts=4 sw=4 expandtab: */ 82 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_ddlist/lv_test_ddlist.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_ddlist.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | 10 | #include "lv_test_ddlist.h" 11 | 12 | #if LV_EX_PRINTF 13 | #include 14 | #endif 15 | 16 | 17 | #if USE_LV_DDLIST && USE_LV_TESTS 18 | 19 | /********************* 20 | * DEFINES 21 | *********************/ 22 | 23 | 24 | /********************** 25 | * TYPEDEFS 26 | **********************/ 27 | 28 | /********************** 29 | * STATIC PROTOTYPES 30 | **********************/ 31 | static lv_res_t ddlist_action(lv_obj_t * ddlist); 32 | 33 | /********************** 34 | * STATIC VARIABLES 35 | **********************/ 36 | 37 | /********************** 38 | * MACROS 39 | **********************/ 40 | 41 | /********************** 42 | * GLOBAL FUNCTIONS 43 | **********************/ 44 | 45 | /** 46 | * Create drop down lists to test their functionalities 47 | */ 48 | void lv_test_ddlist_1(void) 49 | { 50 | /* Create a default object*/ 51 | lv_obj_t * ddlist1 = lv_ddlist_create(lv_scr_act(), NULL); 52 | lv_obj_set_pos(ddlist1, 10, 10); 53 | 54 | /* Create a drop down list with a lot of options, fix height and anim time. 55 | * Open it by default without animation and assign an action*/ 56 | lv_obj_t * ddlist2 = lv_ddlist_create(lv_scr_act(), NULL); 57 | lv_obj_align(ddlist2, ddlist1, LV_ALIGN_OUT_RIGHT_MID, 20, 0); 58 | lv_ddlist_set_options(ddlist2, "First\nSecond\nThird\nForth\nFifth\nSixth"); 59 | lv_ddlist_set_fix_height(ddlist2, LV_DPI); 60 | lv_ddlist_set_selected(ddlist2, 2); 61 | lv_ddlist_set_anim_time(ddlist2, 100); 62 | lv_ddlist_open(ddlist2, false); 63 | lv_ddlist_set_hor_fit(ddlist2, false); 64 | lv_ddlist_set_action(ddlist2, ddlist_action); 65 | lv_obj_set_width(ddlist2, LV_DPI * 2); 66 | 67 | /*Copy the previous drop down list and modify its style*/ 68 | static lv_style_t ddlist3_style; 69 | lv_style_copy(&ddlist3_style, &lv_style_pretty); 70 | ddlist3_style.body.main_color = LV_COLOR_GRAY; 71 | ddlist3_style.body.grad_color = LV_COLOR_BLACK; 72 | ddlist3_style.body.padding.hor = 20; 73 | ddlist3_style.body.padding.ver = 30; 74 | 75 | ddlist3_style.text.color = LV_COLOR_RED; 76 | ddlist3_style.text.letter_space = 5; 77 | ddlist3_style.text.line_space = 15; 78 | 79 | lv_obj_t * ddlist3 = lv_ddlist_create(lv_scr_act(), ddlist2); 80 | lv_obj_align(ddlist3, ddlist2, LV_ALIGN_OUT_RIGHT_TOP, 20, 0); 81 | lv_ddlist_set_style(ddlist3, LV_DDLIST_STYLE_BG, &ddlist3_style); 82 | lv_ddlist_set_style(ddlist3, LV_DDLIST_STYLE_SEL, &lv_style_plain_color); 83 | } 84 | 85 | /********************** 86 | * STATIC FUNCTIONS 87 | **********************/ 88 | 89 | static lv_res_t ddlist_action(lv_obj_t * ddlist) 90 | { 91 | 92 | #if LV_EX_PRINTF 93 | char buf[64]; 94 | lv_ddlist_get_selected_str(ddlist, buf); 95 | printf("New option selected on a drop down list: %s\n", buf); 96 | #endif 97 | 98 | return LV_RES_OK; 99 | } 100 | 101 | #endif /*USE_LV_DDLIST && USE_LV_TESTS*/ 102 | 103 | -------------------------------------------------------------------------------- /lv_examples/lv_tests/lv_test_objx/lv_test_slider/lv_test_slider.c: -------------------------------------------------------------------------------- 1 | /** 2 | * @file lv_test_slider.c 3 | * 4 | */ 5 | 6 | /********************* 7 | * INCLUDES 8 | *********************/ 9 | #include "lv_test_slider.h" 10 | 11 | #if USE_LV_SLIDER != 0 12 | 13 | /********************* 14 | * DEFINES 15 | *********************/ 16 | 17 | /********************** 18 | * TYPEDEFS 19 | **********************/ 20 | 21 | /********************** 22 | * STATIC PROTOTYPES 23 | **********************/ 24 | 25 | /********************** 26 | * STATIC VARIABLES 27 | **********************/ 28 | 29 | /********************** 30 | * MACROS 31 | **********************/ 32 | 33 | /********************** 34 | * GLOBAL FUNCTIONS 35 | **********************/ 36 | 37 | /** 38 | * Create sliders to test their functionalities 39 | */ 40 | void lv_test_slider_1(void) 41 | { 42 | /* Create a default object*/ 43 | lv_obj_t * slider1 = lv_slider_create(lv_scr_act(), NULL); 44 | lv_obj_set_pos(slider1, 10, 10); 45 | 46 | /* Modify size and position, range and set to 75 % */ 47 | lv_obj_t * slider2 = lv_slider_create(lv_scr_act(), NULL); 48 | lv_obj_set_size(slider2, 150, 50); 49 | lv_obj_align(slider2, slider1, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 50 | lv_slider_set_range(slider2, -50, 50); 51 | lv_slider_set_value(slider2, 25); 52 | 53 | /* Copy 'slider2' but set its size to be vertical (indicator at 75%)*/ 54 | lv_obj_t * slider3 = lv_slider_create(lv_scr_act(), slider2); 55 | lv_obj_set_size(slider3, 50, 150); 56 | lv_obj_align(slider3, slider2, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 57 | 58 | 59 | /* Copy 'slider2' and set new style for it 60 | * (like 'slider2' on its left but dark bg, thin red indicator with big light)*/ 61 | static lv_style_t slider_bg; 62 | lv_style_copy(&slider_bg, &lv_style_pretty); 63 | slider_bg.body.main_color = LV_COLOR_BLACK; 64 | 65 | static lv_style_t slider_indic; 66 | lv_style_copy(&slider_indic, &lv_style_pretty); 67 | slider_indic.body.main_color = LV_COLOR_RED; 68 | slider_indic.body.grad_color = LV_COLOR_MAROON; 69 | slider_indic.body.shadow.color = LV_COLOR_RED; 70 | slider_indic.body.shadow.width = 20; 71 | slider_indic.body.padding.ver = 0; 72 | slider_indic.body.padding.hor = 0; 73 | 74 | static lv_style_t slider_knob; 75 | lv_style_copy(&slider_knob, &lv_style_pretty); 76 | slider_knob.body.radius = LV_RADIUS_CIRCLE; 77 | slider_knob.body.border.color = LV_COLOR_BLUE; 78 | slider_knob.body.empty = 1; 79 | 80 | lv_obj_t * slider4 = lv_slider_create(lv_scr_act(), slider2); 81 | lv_obj_align(slider4, slider2, LV_ALIGN_OUT_RIGHT_MID, 20, 0); 82 | lv_slider_set_style(slider4, LV_SLIDER_STYLE_BG, &slider_bg); 83 | lv_slider_set_style(slider4, LV_SLIDER_STYLE_INDIC, &slider_indic); 84 | lv_slider_set_style(slider4, LV_SLIDER_STYLE_KNOB, &slider_knob); 85 | 86 | /* Copy 'slider4' but set its size to be vertical*/ 87 | lv_obj_t * slider5 = lv_slider_create(lv_scr_act(), slider4); 88 | lv_obj_set_size(slider5, 50, 150); 89 | lv_obj_align(slider5, slider4, LV_ALIGN_OUT_BOTTOM_LEFT, 0, 20); 90 | 91 | } 92 | 93 | 94 | /********************** 95 | * STATIC FUNCTIONS 96 | **********************/ 97 | 98 | #endif /*USE_LV_SLIDER && USE_LV_TESTS*/ 99 | --------------------------------------------------------------------------------