add the prototypes of the examples

This commit is contained in:
Gabor Kiss-Vamosi
2021-02-19 18:19:32 +01:00
parent fe20d47b6e
commit ca4f11e9f4
18 changed files with 168 additions and 26 deletions
@@ -2,7 +2,7 @@
#if LV_USE_BTNMATRIX && LV_BUILD_EXAMPLES
void event_cb(lv_obj_t * obj, lv_event_t e)
static void event_cb(lv_obj_t * obj, lv_event_t e)
{
if(e == LV_EVENT_DRAW_PART_BEGIN) {
lv_obj_draw_hook_dsc_t * dsc = lv_event_get_param();
+1 -2
View File
@@ -1,11 +1,10 @@
#include "../../../lvgl.h"
#if LV_USE_IMG && LV_BUILD_EXAMPLES
/* Find the image here: https://github.com/lvgl/lv_examples/tree/master/assets */
LV_IMG_DECLARE(img_cogwheel_argb);
void lv_example_img_1(void)
{
LV_IMG_DECLARE(img_cogwheel_argb);
lv_obj_t * img1 = lv_img_create(lv_scr_act(), NULL);
lv_img_set_src(img1, &img_cogwheel_argb);
lv_obj_align(img1, NULL, LV_ALIGN_CENTER, 0, -20);
+1 -1
View File
@@ -30,7 +30,7 @@ void lv_example_img_2(void)
lv_obj_align(intense_slider, blue_slider, LV_ALIGN_OUT_RIGHT_MID, 25, 0);
/* Now create the actual image */
LV_IMG_DECLARE(img_cogwheel_argb);
LV_IMG_DECLARE(img_cogwheel_argb)
img1 = lv_img_create(lv_scr_act(), NULL);
lv_img_set_src(img1, &img_cogwheel_argb);
lv_obj_align(img1, NULL, LV_ALIGN_IN_RIGHT_MID, -20, 0);
+2 -1
View File
@@ -1,13 +1,14 @@
#include "../../../lvgl.h"
#if LV_USE_IMG && LV_BUILD_EXAMPLES
LV_IMG_DECLARE(img_cogwheel_argb);
/**
* Show transformations (zoom and rotation) using a pivot point.
*/
void lv_example_img_3(void)
{
LV_IMG_DECLARE(img_cogwheel_argb);
/* Now create the actual image */
lv_obj_t * img = lv_img_create(lv_scr_act(), NULL);
lv_img_set_src(img, &img_cogwheel_argb);
+2 -2
View File
@@ -1,13 +1,13 @@
#include "../../../lvgl.h"
#if LV_USE_IMG && LV_BUILD_EXAMPLES
LV_IMG_DECLARE(img_skew_strip);
/**
* Image styling and offset
*/
void lv_example_img_4(void)
{
LV_IMG_DECLARE(img_skew_strip);
static lv_style_t style;
lv_style_init(&style);
lv_style_set_bg_color(&style, LV_COLOR_YELLOW);
@@ -15,7 +15,7 @@ static void ta_event_cb(lv_obj_t * ta, lv_event_t e)
}
}
void lv_keyboard_example_1(void)
void lv_example_keyboard_1(void)
{
/*Create a keyboard to use it with an of the text areas*/
lv_obj_t *kb = lv_keyboard_create(lv_scr_act());
+1 -1
View File
@@ -7,7 +7,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event)
LV_LOG_USER("Clicked: %s\n", lv_list_get_btn_text(obj));
}
}
void lv_list_example_1(void)
void lv_example_list_1(void)
{
/*Create a list*/
lv_obj_t * list1 = lv_list_create(lv_scr_act());
+57 -10
View File
@@ -27,45 +27,92 @@ extern "C" {
**********************/
void lv_example_arc_1(void);
void lv_example_arc_2(void);
void lv_example_bar_1(void);
void lv_example_bar_2(void);
void lv_example_bar_3(void);
void lv_example_bar_4(void);
void lv_example_bar_5(void);
void lv_example_bar_6(void);
void lv_example_btn_1(void);
void lv_example_btn_2(void);
void lv_example_btn_3(void);
void lv_example_btnmatrix_1(void);
void lv_example_btnmatrix_2(void);
void lv_example_btnmatrix_3(void);
void lv_example_calendar_1(void);
void lv_example_canvas_1(void);
void lv_example_canvas_2(void);
void lv_example_checkbox_1(void);
void lv_example_chart_1(void);
void lv_example_chart_2(void);
void lv_example_chart_3(void);
void lv_example_chart_4(void);
void lv_example_checkbox_1(void);
void lv_example_colorwheel_1(void);
void lv_example_dropdown_1(void);
void lv_example_dropdown_2(void);
void lv_example_gauge_1(void);
void lv_example_gauge_2(void);
void lv_example_dropdown_3(void);
void lv_example_img_1(void);
void lv_example_img_2(void);
void lv_example_img_3(void);
void lv_example_img_4(void);
void lv_example_imgbtn_1(void);
void lv_example_keyboard_1(void);
void lv_example_label_1(void);
void lv_example_label_2(void);
void lv_example_label_3(void);
void lv_example_led_1(void);
void lv_example_line_1(void);
void lv_example_list_1(void);
void lv_example_linemeter_1(void);
void lv_example_meter_1(void);
void lv_example_meter_2(void);
void lv_example_meter_3(void);
void lv_example_meter_4(void);
void lv_example_msgbox_1(void);
void lv_example_msgbox_2(void);
void lv_example_obj_1(void);
void lv_example_spinner_1(void);
void lv_example_roller_1(void);
void lv_example_roller_2(void);
void lv_example_slider_1(void);
void lv_example_slider_2(void);
void lv_example_slider_3(void);
void lv_example_spinbox_1(void);
void lv_example_spinner_1(void);
void lv_example_switch_1(void);
void lv_example_textarea_1(void);
void lv_example_objmask_1(void);
void lv_example_objmask_2(void);
void lv_example_table_1(void);
void lv_example_tabview_1(void);
void lv_example_textarea_1(void);
void lv_example_textarea_2(void);
void lv_example_textarea_3(void);
void lv_example_tileview_1(void);
void lv_example_win_1(void);
/**********************
* MACROS
**********************/
@@ -1,5 +1,5 @@
#include "../../../lvgl.h"
#if LV_USE_ROLLER && LV_BUILD_EXAMPLES
#if LV_USE_ROLLER && LV_FONT_MONTSERRAT_22 && LV_BUILD_EXAMPLES
static void event_handler(lv_obj_t * obj, lv_event_t event)
{