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

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);

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);

View File

@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_GRID && LV_BUILD_EXAMPLES
/**
* Demonstrate cell placement and span
*/

View File

@@ -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*/

View File

@@ -2,7 +2,6 @@
#if LV_BUILD_EXAMPLES
#if LV_USE_FFMPEG
/**
* Open an image from a file
*/

View File

@@ -1,6 +1,5 @@
#include "../../../lvgl.h"
#ifndef LV_ATTRIBUTE_MEM_ALIGN
#define LV_ATTRIBUTE_MEM_ALIGN
#endif

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

View File

@@ -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);
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -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);

View File

@@ -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++) {

View File

@@ -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

View File

@@ -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);

View File

@@ -21,5 +21,4 @@ void lv_example_observer_1(void)
lv_label_bind_text(label, &temperature_subject, "%d °C");
}
#endif

View File

@@ -18,7 +18,6 @@ void lv_example_observer_2(void)
ui_init();
}
/*--------------------------------------------------
* APPLICATION
*

View File

@@ -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);

View File

@@ -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);

View File

@@ -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
*

View File

@@ -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:

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
**********************/

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);

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
*/

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
*/

View File

@@ -1,8 +1,6 @@
#include "../lv_examples.h"
#if LV_BUILD_EXAMPLES && LV_USE_BTN && LV_USE_LABEL
/**
* Opacity and Transformations
*/

View File

@@ -30,8 +30,6 @@ void lv_example_arc_2(void)
lv_anim_set_values(&a, 0, 100);
lv_anim_start(&a);
}
#endif

View File

@@ -36,5 +36,4 @@ void lv_example_bar_3(void)
lv_anim_start(&a);
}
#endif

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);

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);

View File

@@ -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", ""

View File

@@ -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);

View File

@@ -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);

View File

@@ -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);

View File

@@ -35,6 +35,5 @@ void lv_example_canvas_7(void)
lv_canvas_finish_layer(canvas, &layer);
}
#endif

View File

@@ -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);

View File

@@ -19,7 +19,6 @@ static void draw_event_cb(lv_event_t * e)
}
}
/**
* Recolor the bars of a chart based on their value
*/

View File

@@ -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*/

View File

@@ -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;

View File

@@ -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

View File

@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_DROPDOWN && LV_BUILD_EXAMPLES
/**
* Create a drop down, up, left and right menus
*/

View File

@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_IMG && LV_BUILD_EXAMPLES
void lv_example_image_1(void)
{
LV_IMAGE_DECLARE(img_cogwheel_argb);

View File

@@ -7,7 +7,6 @@ static void slider_event_cb(lv_event_t * e);
static lv_obj_t * red_slider, * green_slider, * blue_slider, * intense_slider;
static lv_obj_t * img1;
/**
* Demonstrate runtime image re-coloring
*/

View File

@@ -11,7 +11,6 @@ static void set_zoom(void * img, int32_t v)
lv_image_set_zoom(img, v);
}
/**
* Show transformations (zoom and rotation) using a pivot point.
*/

View File

@@ -1,6 +1,5 @@
#include <stdlib.h>
#include "../../lv_examples.h"
#if LV_USE_LIST && LV_BUILD_EXAMPLES

View File

@@ -16,7 +16,6 @@ static void drag_event_handler(lv_event_t * e)
lv_obj_set_pos(obj, x, y);
}
/**
* Make an object draggable.
*/

View File

@@ -1,8 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_SLIDER && LV_BUILD_EXAMPLES
/**
* Show how to style a slider.
*/

View File

@@ -3,7 +3,6 @@
static lv_obj_t * spinbox;
static void lv_spinbox_increment_event_cb(lv_event_t * e)
{
lv_event_code_t code = lv_event_get_code(e);
@@ -20,7 +19,6 @@ static void lv_spinbox_decrement_event_cb(lv_event_t * e)
}
}
void lv_example_spinbox_1(void)
{
spinbox = lv_spinbox_create(lv_screen_active());

View File

@@ -41,7 +41,6 @@ static void draw_event_cb(lv_event_t * e)
}
}
void lv_example_table_1(void)
{
lv_obj_t * table = lv_table_create(lv_screen_active());

View File

@@ -54,7 +54,6 @@ static void change_event_cb(lv_event_t * e)
else lv_table_add_cell_ctrl(obj, row, 0, LV_TABLE_CELL_CTRL_CUSTOM_1);
}
/**
* A very light-weighted list created from table
*/

View File

@@ -14,7 +14,6 @@ void lv_example_tabview_2(void)
lv_obj_set_style_text_color(tab_buttons, lv_palette_lighten(LV_PALETTE_GREY, 5), 0);
lv_obj_set_style_border_side(tab_buttons, LV_BORDER_SIDE_RIGHT, LV_PART_ITEMS | LV_STATE_CHECKED);
/*Add 3 tabs (the tabs are page (lv_page) and can be scrolled*/
lv_obj_t * tab1 = lv_tabview_add_tab(tabview, "Tab 1");
lv_obj_t * tab2 = lv_tabview_add_tab(tabview, "Tab 2");

View File

@@ -29,7 +29,6 @@ void lv_example_textarea_2(void)
lv_obj_add_event(text_ta, ta_event_cb, LV_EVENT_ALL, NULL);
lv_obj_align(text_ta, LV_ALIGN_TOP_RIGHT, -5, 20);
/*Create a label and position it above the text box*/
lv_obj_t * oneline_label = lv_label_create(lv_screen_active());
lv_label_set_text(oneline_label, "Text:");

View File

@@ -16,7 +16,6 @@ void lv_example_tileview_1(void)
lv_label_set_text(label, "Scroll down");
lv_obj_center(label);
/*Tile2: a button*/
lv_obj_t * tile2 = lv_tileview_add_tile(tv, 0, 1, LV_DIR_TOP | LV_DIR_RIGHT);

View File

@@ -1,7 +1,6 @@
#include "../../lv_examples.h"
#if LV_USE_WIN && LV_BUILD_EXAMPLES
static void event_handler(lv_event_t * e)
{
lv_obj_t * obj = lv_event_get_target(e);
@@ -40,7 +39,6 @@ void lv_example_win_1(void)
"sure it\n"
"overflows. :)");
}
#endif