Initial commit, getting all the stuff from PlatformIO
This commit is contained in:
1
.pio/libdeps/esp32dev/1_hello_world/screens/README.md
Normal file
1
.pio/libdeps/esp32dev/1_hello_world/screens/README.md
Normal file
@@ -0,0 +1 @@
|
||||
Create XML files here that start with a `<screen>` tag
|
||||
@@ -0,0 +1,13 @@
|
||||
<screen>
|
||||
<styles>
|
||||
<style name="style_main" bg_color="0x008a04" />
|
||||
</styles>
|
||||
|
||||
<view>
|
||||
<style name="style_main" />
|
||||
|
||||
<lv_button align="center" style_bg_color="0x3620be" width="250" height="50">
|
||||
<lv_label text="Greentings Humans" style_text_font="font_medium" width="205" height="26" x="8" y="4" />
|
||||
</lv_button>
|
||||
</view>
|
||||
</screen>
|
||||
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* @file screen_hello_world_gen.c
|
||||
* @brief Template source file for LVGL objects
|
||||
*/
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#include "screen_hello_world_gen.h"
|
||||
#include "ui_hello_world.h"
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/***********************
|
||||
* STATIC VARIABLES
|
||||
**********************/
|
||||
|
||||
/***********************
|
||||
* STATIC PROTOTYPES
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL FUNCTIONS
|
||||
**********************/
|
||||
|
||||
lv_obj_t * screen_hello_world_create(void)
|
||||
{
|
||||
LV_TRACE_OBJ_CREATE("begin");
|
||||
|
||||
static lv_style_t style_main;
|
||||
|
||||
static bool style_inited = false;
|
||||
|
||||
if (!style_inited) {
|
||||
lv_style_init(&style_main);
|
||||
lv_style_set_bg_color(&style_main, lv_color_hex(0x008a04));
|
||||
|
||||
style_inited = true;
|
||||
}
|
||||
|
||||
lv_obj_t * lv_obj_0 = lv_obj_create(NULL);
|
||||
lv_obj_set_name_static(lv_obj_0, "screen_hello_world_#");
|
||||
|
||||
lv_obj_add_style(lv_obj_0, &style_main, 0);
|
||||
lv_obj_t * lv_button_0 = lv_button_create(lv_obj_0);
|
||||
lv_obj_set_align(lv_button_0, LV_ALIGN_CENTER);
|
||||
lv_obj_set_style_bg_color(lv_button_0, lv_color_hex(0x3620be), 0);
|
||||
lv_obj_set_width(lv_button_0, 250);
|
||||
lv_obj_set_height(lv_button_0, 50);
|
||||
lv_obj_t * lv_label_0 = lv_label_create(lv_button_0);
|
||||
lv_label_set_text(lv_label_0, "Greentings Humans");
|
||||
lv_obj_set_style_text_font(lv_label_0, font_medium, 0);
|
||||
lv_obj_set_width(lv_label_0, 205);
|
||||
lv_obj_set_height(lv_label_0, 26);
|
||||
lv_obj_set_x(lv_label_0, 8);
|
||||
lv_obj_set_y(lv_label_0, 4);
|
||||
|
||||
LV_TRACE_OBJ_CREATE("finished");
|
||||
|
||||
return lv_obj_0;
|
||||
}
|
||||
|
||||
/**********************
|
||||
* STATIC FUNCTIONS
|
||||
**********************/
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* @file screen_hello_world_gen.h
|
||||
*/
|
||||
|
||||
#ifndef SCREEN_HELLO_WORLD_H
|
||||
#define SCREEN_HELLO_WORLD_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* INCLUDES
|
||||
*********************/
|
||||
|
||||
#ifdef LV_LVGL_H_INCLUDE_SIMPLE
|
||||
#include "lvgl.h"
|
||||
#else
|
||||
#include "../../lvgl/lvgl.h"
|
||||
#endif
|
||||
|
||||
/*********************
|
||||
* DEFINES
|
||||
*********************/
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
**********************/
|
||||
|
||||
/**********************
|
||||
* GLOBAL PROTOTYPES
|
||||
**********************/
|
||||
|
||||
|
||||
|
||||
lv_obj_t * screen_hello_world_create(void);
|
||||
|
||||
/**********************
|
||||
* MACROS
|
||||
**********************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /*extern "C"*/
|
||||
#endif
|
||||
|
||||
#endif /*SCREEN_HELLO_WORLD_H*/
|
||||
Reference in New Issue
Block a user