ci: upgrade astyle tool (#4776)

Install from source to use the latest version
This commit is contained in:
Viktor Szépe
2023-11-10 15:37:23 +01:00
committed by GitHub
parent df910893e4
commit cc6581ae03
321 changed files with 14 additions and 948 deletions
+9 -3
View File
@@ -13,11 +13,17 @@ jobs:
with:
persist-credentials: false
fetch-depth: 0
- name: Checkout astyle
uses: actions/checkout@v4
with:
repository: szepeviktor/astyle
path: astyle
- name: Install astyle
run: |
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
sudo apt-get update -y -qq
sudo apt-get install astyle
cd astyle/build/gcc/
make
sudo make install
astyle --version
- name: Format code
run: python code-format.py
working-directory: scripts
-10
View File
@@ -141,7 +141,6 @@ static void rotated_argb_image_cb(void)
lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_SPACE_EVENLY, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START);
lv_obj_set_style_pad_row(lv_screen_active(), 20, 0);
LV_IMG_DECLARE(img_benchmark_cogwheel_argb);
uint32_t hor_cnt = (lv_display_get_horizontal_resolution(NULL) - 16) / 116;
uint32_t ver_cnt = (lv_display_get_vertical_resolution(NULL) - 116) / 116;
@@ -233,7 +232,6 @@ static void multiple_arcs_cb(void)
}
}
static void containers_cb(void)
{
@@ -416,7 +414,6 @@ void lv_demo_benchmark(void)
* STATIC FUNCTIONS
**********************/
static void load_scene(uint32_t scene)
{
lv_obj_t * scr = lv_screen_active();
@@ -429,7 +426,6 @@ static void load_scene(uint32_t scene)
lv_obj_set_layout(scr, LV_LAYOUT_NONE);
lv_obj_set_flex_align(lv_screen_active(), LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START, LV_FLEX_ALIGN_START);
lv_anim_delete(scr, scroll_anim_y_cb);
lv_anim_delete(scr, shake_anim_y_cb);
lv_anim_delete(scr, color_anim_cb);
@@ -441,8 +437,6 @@ static void load_scene(uint32_t scene)
if(scenes[scene].create_cb) scenes[scene].create_cb();
}
static void next_scene_timer_cb(lv_timer_t * timer)
{
LV_UNUSED(timer);
@@ -477,7 +471,6 @@ static void sysmon_perf_observer_cb(lv_subject_t * subject, lv_observer_t * obse
* SCENE HELPERS
*----------------*/
static void color_anim_cb(void * var, int32_t v)
{
LV_UNUSED(v);
@@ -558,7 +551,6 @@ static void shake_anim(lv_obj_t * obj, int32_t y_max)
lv_anim_start(&a);
}
static lv_obj_t * card_create(void)
{
lv_obj_t * panel = lv_obj_create(lv_screen_active());
@@ -586,8 +578,6 @@ static lv_obj_t * card_create(void)
child = lv_label_create(child);
lv_label_set_text(child, "Connect");
return panel;
}
@@ -25,7 +25,6 @@
#define SPINBOX_EVENT_ATTACH(item) \
lv_obj_add_event(ui->ctrl_pad.tab.layout.spinbox_##item, ctrl_pad_spinbox_event_handler, LV_EVENT_VALUE_CHANGED, ui);
/**********************
* TYPEDEFS
**********************/
-2
View File
@@ -226,7 +226,6 @@ static lv_obj_t * add_list_button(lv_obj_t * parent, uint32_t track_id)
return btn;
}
static void btn_click_event_cb(lv_event_t * e)
{
lv_obj_t * btn = lv_event_get_target(e);
@@ -252,4 +251,3 @@ static void list_delete_event_cb(lv_event_t * e)
}
}
#endif /*LV_USE_DEMO_MUSIC*/
-3
View File
@@ -1000,7 +1000,6 @@ static void next_click_event_cb(lv_event_t * e)
}
}
static void timer_cb(lv_timer_t * t)
{
LV_UNUSED(t);
@@ -1015,7 +1014,6 @@ static void spectrum_end_cb(lv_anim_t * a)
_lv_demo_music_album_next(true);
}
static void stop_start_anim(lv_timer_t * t)
{
LV_UNUSED(t);
@@ -1028,4 +1026,3 @@ static void album_fade_anim_cb(void * var, int32_t v)
lv_obj_set_style_image_opa(var, v, 0);
}
#endif /*LV_USE_DEMO_MUSIC*/
-1
View File
@@ -38,7 +38,6 @@ void _lv_demo_music_album_next(bool next);
**********************/
#endif /*LV_USE_DEMO_MUSIC*/
#ifdef __cplusplus
} /* extern "C" */
#endif
-7
View File
@@ -274,7 +274,6 @@ static void box_shadow_cb(lv_obj_t * parent)
}
}
static lv_obj_t * text_obj_create(lv_obj_t * parent, int32_t col, int32_t row)
{
@@ -311,7 +310,6 @@ static void text_cb(lv_obj_t * parent)
obj = text_obj_create(parent, 3, 5);
lv_obj_set_style_text_decor(obj, LV_TEXT_DECOR_UNDERLINE | LV_TEXT_DECOR_STRIKETHROUGH, 0);
}
static lv_obj_t * image_obj_create(lv_obj_t * parent, int32_t col, int32_t row, bool recolor)
@@ -395,7 +393,6 @@ static void image_core_cb(lv_obj_t * parent, bool recolor)
}
}
static void image_normal_cb(lv_obj_t * parent)
{
image_core_cb(parent, false);
@@ -406,7 +403,6 @@ static void image_recolored_cb(lv_obj_t * parent)
image_core_cb(parent, true);
}
static lv_obj_t * line_obj_create(lv_obj_t * parent, int32_t col, int32_t row, lv_point_precise_t p[])
{
lv_obj_t * obj = lv_line_create(parent);
@@ -537,7 +533,6 @@ static void triangle_draw_event_cb(lv_event_t * e)
lv_draw_triangle(lv_event_get_layer(e), &dsc);
}
static lv_obj_t * triangle_obj_create(lv_obj_t * parent, int32_t col, int32_t row, lv_point_t p[])
{
lv_obj_t * obj = lv_arc_create(parent);
@@ -612,7 +607,6 @@ static void triangle_cb(lv_obj_t * parent)
}
}
static lv_obj_t * layer_obj_create(lv_obj_t * parent, int32_t col, int32_t row, lv_blend_mode_t blend_mode)
{
lv_obj_t * obj = lv_obj_create(parent);
@@ -761,7 +755,6 @@ void lv_demo_render(lv_demo_render_scene_t id, lv_opa_t opa)
if(scenes[id].create_cb) scenes[id].create_cb(main_parent);
}
const char * lv_demo_render_get_scene_name(lv_demo_render_scene_t id)
{
if(id > _LV_DEMO_RENDER_SCENE_NUM) return NULL;
-1
View File
@@ -65,7 +65,6 @@ void lv_demo_scroll(void)
switch_create(panel, "Elastic scroll", LV_OBJ_FLAG_SCROLL_ELASTIC, true);
switch_create(panel, "Add scroll momentum", LV_OBJ_FLAG_SCROLL_MOMENTUM, true);
/*Show the switches first*/
lv_obj_move_foreground(list);
-1
View File
@@ -88,7 +88,6 @@ static void obj_test_task_cb(lv_timer_t * tmr)
lv_obj_set_size(main_page, LV_HOR_RES / 2, LV_VER_RES);
lv_obj_set_flex_flow(main_page, LV_FLEX_FLOW_COLUMN);
obj = lv_button_create(main_page);
lv_obj_set_size(obj, 100, 70);
obj = lv_label_create(obj);
-15
View File
@@ -211,7 +211,6 @@ void lv_demo_widgets(void)
color_changer_create(tv);
}
void lv_demo_widgets_start_slideshow(void)
{
lv_obj_update_layout(tv);
@@ -378,7 +377,6 @@ static void profile_create(lv_obj_t * parent)
LV_GRID_TEMPLATE_LAST
};
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
lv_obj_set_grid_cell(panel1, LV_GRID_ALIGN_STRETCH, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
@@ -406,7 +404,6 @@ static void profile_create(lv_obj_t * parent)
lv_obj_set_grid_cell(gender, LV_GRID_ALIGN_STRETCH, 0, 1, LV_GRID_ALIGN_CENTER, 6, 1);
lv_obj_set_grid_cell(gender_label, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 5, 1);
lv_obj_set_grid_cell(panel3, LV_GRID_ALIGN_STRETCH, 1, 1, LV_GRID_ALIGN_STRETCH, 1, 1);
lv_obj_set_grid_dsc_array(panel3, grid_2_col_dsc, grid_2_row_dsc);
lv_obj_set_grid_cell(panel3_title, LV_GRID_ALIGN_START, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
@@ -421,7 +418,6 @@ static void profile_create(lv_obj_t * parent)
static int32_t grid_main_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
static int32_t grid_main_row_dsc[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST};
/*Create the top panel*/
static int32_t grid_1_col_dsc[] = {LV_GRID_CONTENT, 1, LV_GRID_CONTENT, LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
static int32_t grid_1_row_dsc[] = {
@@ -449,7 +445,6 @@ static void profile_create(lv_obj_t * parent)
LV_GRID_TEMPLATE_LAST
};
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
lv_obj_set_grid_cell(panel1, LV_GRID_ALIGN_STRETCH, 0, 2, LV_GRID_ALIGN_CENTER, 0, 1);
@@ -494,7 +489,6 @@ static void profile_create(lv_obj_t * parent)
static int32_t grid_main_row_dsc[] = {LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_CONTENT, LV_GRID_TEMPLATE_LAST};
lv_obj_set_grid_dsc_array(parent, grid_main_col_dsc, grid_main_row_dsc);
/*Create the top panel*/
static int32_t grid_1_col_dsc[] = {LV_GRID_CONTENT, LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
static int32_t grid_1_row_dsc[] = {LV_GRID_CONTENT, /*Avatar*/
@@ -509,7 +503,6 @@ static void profile_create(lv_obj_t * parent)
lv_obj_set_grid_dsc_array(panel1, grid_1_col_dsc, grid_1_row_dsc);
static int32_t grid_2_col_dsc[] = {LV_GRID_FR(1), LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
static int32_t grid_2_row_dsc[] = {
LV_GRID_CONTENT, /*Title*/
@@ -564,7 +557,6 @@ static void profile_create(lv_obj_t * parent)
}
}
static lv_obj_t * create_chart_with_scales(lv_obj_t * parent, const char * title, const char * hor_text[])
{
static const int32_t col_dsc[] = {40, LV_GRID_FR(1), LV_GRID_TEMPLATE_LAST};
@@ -625,7 +617,6 @@ static void analytics_create(lv_obj_t * parent)
lv_obj_set_style_max_height(chart1_cont, 300, 0);
lv_obj_set_flex_grow(chart1_cont, 1);
static const char * chart1_texts[] = {"Jan", "Feb", "March", "April", "May", "Jun", "July", "Aug", "Sept", "Oct", "Nov", "Dec", NULL};
chart1 = create_chart_with_scales(chart1_cont, "Unique visitors", chart1_texts);
@@ -641,7 +632,6 @@ static void analytics_create(lv_obj_t * parent)
lv_obj_set_flex_grow(chart2_cont, 1);
lv_obj_add_flag(chart2_cont, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK);
static const char * chart2_texts[] = {"I", "II", "III", "IV", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII", NULL};
chart2 = create_chart_with_scales(chart2_cont, "Monthly revenue", chart2_texts);
lv_chart_set_type(chart2, LV_CHART_TYPE_BAR);
@@ -925,7 +915,6 @@ void shop_create(lv_obj_t * parent)
lv_obj_set_size(chart3, lv_pct(100), lv_pct(100));
lv_obj_set_style_pad_column(chart3, LV_DPX(30), 0);
lv_obj_set_grid_dsc_array(panel1, grid1_col_dsc, grid1_row_dsc);
lv_obj_set_grid_cell(title, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 0, 1);
lv_obj_set_grid_cell(date, LV_GRID_ALIGN_START, 0, 1, LV_GRID_ALIGN_START, 1, 1);
@@ -1041,7 +1030,6 @@ void shop_create(lv_obj_t * parent)
cb = lv_checkbox_create(notifications);
lv_checkbox_set_text(cb, "Out of stock");
}
static void color_changer_create(lv_obj_t * parent)
@@ -1549,13 +1537,11 @@ static void chart_event_cb(lv_event_t * e)
}
}
static void shop_chart_event_cb(lv_event_t * e)
{
LV_UNUSED(e);
}
static void scale1_indic1_anim_cb(void * var, int32_t v)
{
lv_arc_set_value(var, v);
@@ -1573,7 +1559,6 @@ static void scale2_timer_cb(lv_timer_t * timer)
static bool down2 = false;
static bool down3 = false;
if(down1) {
session_desktop -= 137;
if(session_desktop < 1400) down1 = false;
-1
View File
@@ -43,7 +43,6 @@ void lv_example_anim_1(void)
lv_label_set_text(label, "Hello animations!");
lv_obj_set_pos(label, 100, 10);
lv_obj_t * sw = lv_switch_create(lv_screen_active());
lv_obj_center(sw);
lv_obj_add_state(sw, LV_STATE_CHECKED);
-1
View File
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_SWITCH
static void anim_x_cb(void * var, int32_t v)
{
lv_obj_set_x(var, v);
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_GRID && LV_BUILD_EXAMPLES
/**
* Demonstrate cell placement and span
*/
@@ -9,7 +9,6 @@ void lv_example_grid_4(void)
static int32_t col_dsc[] = {60, 60, 60, LV_GRID_TEMPLATE_LAST};
static int32_t row_dsc[] = {45, 45, 45, LV_GRID_TEMPLATE_LAST};
/*Add space between the columns and move the rows to the bottom (end)*/
/*Create a container with grid*/
@@ -2,7 +2,6 @@
#if LV_BUILD_EXAMPLES
#if LV_USE_FFMPEG
/**
* Open an image from a file
*/
-1
View File
@@ -1,6 +1,5 @@
#include "../../../lvgl.h"
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
-1
View File
@@ -1,7 +1,6 @@
#include "../../../lvgl.h"
#if LV_USE_LODEPNG && LV_BUILD_EXAMPLES
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif
@@ -32,7 +32,6 @@ void lv_example_tiny_ttf_3(void)
lv_obj_align_to(slider_label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10);
lv_label_bind_text(slider_label, &subject_font, "%d");
/*Create a label with the new style*/
lv_obj_t * label = lv_label_create(lv_screen_active());
lv_obj_add_style(label, &style, 0);
@@ -40,7 +39,6 @@ void lv_example_tiny_ttf_3(void)
lv_label_set_text(label, "Hello world!");
lv_obj_center(label);
lv_subject_add_observer(&subject_font, font_size_observer_cb, &style);
}
@@ -20,7 +20,6 @@ static void exch_table_item(lv_obj_t * tb, int16_t i, int16_t j)
lv_table_set_cell_value(tb, j, 1, lv_table_get_cell_value(tb, 0, 2));
}
/*Quick sort 3 way*/
static void sort_by_file_kind(lv_obj_t * tb, int16_t lo, int16_t hi)
{
@@ -43,7 +42,6 @@ static void sort_by_file_kind(lv_obj_t * tb, int16_t lo, int16_t hi)
sort_by_file_kind(tb, gt + 1, hi);
}
static void file_explorer_event_handler(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
@@ -37,7 +37,6 @@ void lv_example_fragment_1(void)
lv_fragment_manager_replace(manager, fragment, &root);
}
static void sample_fragment_ctor(lv_fragment_t * self, void * args)
{
((struct sample_fragment_t *) self)->name = args;
@@ -66,7 +66,6 @@ void lv_example_fragment_2(void)
lv_obj_add_event(pop_btn, sample_pop_click, LV_EVENT_CLICKED, manager);
}
static void sample_fragment_ctor(lv_fragment_t * self, void * args)
{
LV_UNUSED(args);
@@ -16,7 +16,6 @@ void lv_example_gridnav_2(void)
lv_obj_set_style_bg_color(list1, lv_palette_lighten(LV_PALETTE_BLUE, 5), LV_STATE_FOCUSED);
lv_group_add_obj(lv_group_get_default(), list1);
char buf[32];
uint32_t i;
for(i = 0; i < 15; i++) {
@@ -46,7 +46,6 @@ void lv_example_gridnav_3(void)
label = lv_label_create(btn);
lv_label_set_text(label, "Button 2");
/*Create an other container with long text to show how LV_GRIDNAV_CTRL_SCROLL_FIRST works*/
lv_obj_t * cont_sub1 = lv_obj_create(cont_main);
lv_obj_set_size(cont_sub1, lv_pct(100), 100);
@@ -93,9 +92,6 @@ void lv_example_gridnav_3(void)
label = lv_label_create(btn);
lv_label_set_text(label, "Button 4");
}
#endif
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_GRIDNAV && LV_USE_FLEX && LV_BUILD_EXAMPLES
static void event_handler(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
@@ -21,5 +21,4 @@ void lv_example_observer_1(void)
lv_label_bind_text(label, &temperature_subject, "%d °C");
}
#endif
@@ -18,7 +18,6 @@ void lv_example_observer_2(void)
ui_init();
}
/*--------------------------------------------------
* APPLICATION
*
@@ -60,14 +60,12 @@ void lv_example_observer_3(void)
lv_obj_t * set_label = lv_label_create(set_btn);
lv_label_set_text(set_label, "Set");
/*Update some subjects to see if the UI is updated as well*/
lv_subject_set_int(&hour_subject, 9);
lv_subject_set_int(&minute_subject, 30);
lv_subject_set_int(&am_pm_subject, TIME_PM);
}
static void set_btn_clicked_event_cb(lv_event_t * e)
{
lv_obj_t * set_btn = lv_event_get_target(e);
@@ -149,7 +149,6 @@ static void cont_observer_cb(lv_subject_t * subject, lv_observer_t * observer)
}
static void btn_create(lv_obj_t * parent, const char * text)
{
lv_obj_t * btn = lv_button_create(parent);
@@ -6,7 +6,6 @@ typedef enum {
THEME_MODE_DARK,
} theme_mode_t;
static lv_obj_t * my_panel_create(lv_obj_t * parent);
static lv_obj_t * my_button_create(lv_obj_t * parent, const char * text, lv_event_cb_t event_cb);
static void switch_theme_event_cb(lv_event_t * e);
@@ -45,7 +44,6 @@ static void switch_theme_event_cb(lv_event_t * e)
else lv_subject_set_int(&theme_subject, THEME_MODE_LIGHT);
}
/*-----------------------------------------
* my_panel.c
*
@@ -80,7 +80,6 @@ void lv_port_indev_init(void)
* You should shape them according to your hardware
*/
/*------------------
* Touchpad
* -----------------*/
@@ -122,7 +121,6 @@ void lv_port_indev_init(void)
lv_indev_set_type(indev_keypad, LV_INDEV_TYPE_KEYPAD);
lv_indev_set_read_cb(indev_keypad, keypad_read);
/*Later you should create group(s) with `lv_group_t * group = lv_group_create()`,
*add objects to the group with `lv_group_add_obj(group, obj)`
*and assign this input device to group to navigate in it:
-1
View File
@@ -32,7 +32,6 @@ void lv_example_scroll_4(void);
void lv_example_scroll_5(void);
void lv_example_scroll_6(void);
/**********************
* MACROS
**********************/
-2
View File
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_LIST
/**
* Styling the scrollbars
*/
@@ -28,7 +27,6 @@ void lv_example_scroll_4(void)
"Fusce molestie rhoncus nisi sit amet tincidunt. \n"
"Suspendisse a nunc ut magna ornare volutpat.");
/*Remove the style of scrollbar to have clean start*/
lv_obj_remove_style(obj, NULL, LV_PART_SCROLLBAR | LV_STATE_ANY);
-1
View File
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_FONT_DEJAVU_16_PERSIAN_HEBREW
/**
* Scrolling with Right To Left base direction
*/
-3
View File
@@ -1,7 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_IMG
static lv_style_t style_btn;
/*Will be called when the styles of the base theme are already added
@@ -36,8 +35,6 @@ static void new_theme_init_and_set(void)
lv_display_set_theme(NULL, &th_new);
}
/**
* Extending the current theme
*/
-2
View File
@@ -1,8 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_BTN && LV_USE_LABEL
/**
* Opacity and Transformations
*/
-2
View File
@@ -30,8 +30,6 @@ void lv_example_arc_2(void)
lv_anim_set_values(&a, 0, 100);
lv_anim_start(&a);
}
#endif
-1
View File
@@ -36,5 +36,4 @@ void lv_example_bar_3(void)
lv_anim_start(&a);
}
#endif
-1
View File
@@ -8,7 +8,6 @@ void lv_example_bar_5(void)
{
lv_obj_t * label;
lv_obj_t * bar_ltr = lv_bar_create(lv_screen_active());
lv_obj_set_size(bar_ltr, 200, 20);
lv_bar_set_value(bar_ltr, 70, LV_ANIM_OFF);
-1
View File
@@ -8,7 +8,6 @@ void lv_example_bar_7(void)
{
lv_obj_t * label;
lv_obj_t * bar_tob = lv_bar_create(lv_screen_active());
lv_obj_set_size(bar_tob, 20, 200);
lv_bar_set_range(bar_tob, 100, 0);
@@ -13,7 +13,6 @@ static void event_handler(lv_event_t * e)
}
}
static const char * btnm_map[] = {"1", "2", "3", "4", "5", "\n",
"6", "7", "8", "9", "0", "\n",
"Action1", "Action2", ""
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_BTNMATRIX && LV_BUILD_EXAMPLES
static void event_cb(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
@@ -34,7 +34,6 @@ void lv_example_buttonmatrix_3(void)
lv_style_set_radius(&style_bg, LV_RADIUS_CIRCLE);
lv_style_set_border_width(&style_bg, 0);
static lv_style_t style_btn;
lv_style_init(&style_btn);
lv_style_set_radius(&style_btn, 0);
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_CANVAS && LV_BUILD_EXAMPLES
#define CANVAS_WIDTH 200
#define CANVAS_HEIGHT 150
@@ -35,14 +34,12 @@ void lv_example_canvas_1(void)
lv_obj_center(canvas);
lv_canvas_fill_bg(canvas, lv_palette_lighten(LV_PALETTE_GREY, 3), LV_OPA_COVER);
lv_layer_t layer;
lv_canvas_init_layer(canvas, &layer);
lv_area_t coords_rect = {30, 20, 100, 70};
lv_draw_rect(&layer, &rect_dsc, &coords_rect);
lv_area_t coords_text = {40, 80, 100, 120};
lv_draw_label(&layer, &label_dsc, &coords_text);
@@ -35,6 +35,5 @@ void lv_example_canvas_7(void)
lv_canvas_finish_layer(canvas, &layer);
}
#endif
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_CHART && LV_BUILD_EXAMPLES
static void event_cb(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
@@ -19,7 +19,6 @@ static void draw_event_cb(lv_event_t * e)
}
}
/**
* Recolor the bars of a chart based on their value
*/
@@ -54,7 +54,6 @@ static void add_faded_area(lv_event_t * e)
lv_draw_task_t * draw_task = lv_event_get_draw_task(e);
lv_draw_dsc_base_t * base_dsc = draw_task->draw_dsc;
const lv_chart_series_t * ser = lv_chart_get_series_next(obj, NULL);
/*Draw a triangle below the line witch some opacity gradient*/
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_CHART && LV_DRAW_SW_COMPLEX && LV_BUILD_EXAMPLES
static void add_data(lv_timer_t * t)
{
lv_obj_t * chart = t->user_data;
@@ -24,7 +24,6 @@ static void radio_event_handler(lv_event_t * e)
LV_LOG_USER("Selected radio buttons: %d, %d", (int)active_index_1, (int)active_index_2);
}
static void radiobutton_create(lv_obj_t * parent, const char * txt)
{
lv_obj_t * obj = lv_checkbox_create(parent);
@@ -44,7 +43,6 @@ void lv_example_checkbox_2(void)
* A variable is passed as event user data where the index of the active
* radiobutton is saved */
lv_style_init(&style_radio);
lv_style_set_radius(&style_radio, LV_RADIUS_CIRCLE);
@@ -82,5 +80,4 @@ void lv_example_checkbox_2(void)
lv_obj_add_state(lv_obj_get_child(cont2, 0), LV_STATE_CHECKED);
}
#endif
@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_DROPDOWN && LV_BUILD_EXAMPLES
/**
* Create a drop down, up, left and right menus
*/

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