341 lines
9.1 KiB
C

// This file was generated by SquareLine Studio
// SquareLine Studio version: SquareLine Studio 1.5.0
// LVGL version: 8.3.6
// Project name: han-wt32
#include "ui.h"
#include "ui_helpers.h"
///////////////////// VARIABLES ////////////////////
// SCREEN: ui_SplashScreen
void ui_SplashScreen_screen_init(void);
lv_obj_t * ui_SplashScreen;
lv_obj_t * ui_lblpassword;
lv_obj_t * ui_lblssid;
lv_obj_t * ui_lblversion;
// CUSTOM VARIABLES
// SCREEN: ui_HomeScreen
void ui_HomeScreen_screen_init(void);
lv_obj_t * ui_HomeScreen;
lv_obj_t * ui_Container1;
void ui_event_btnconfirm(lv_event_t * e);
lv_obj_t * ui_btnconfirm;
void ui_event_btnpost(lv_event_t * e);
lv_obj_t * ui_btnpost;
lv_obj_t * ui_barhashrate;
void ui_event_btndelete(lv_event_t * e);
lv_obj_t * ui_btndelete;
lv_obj_t * ui_lblhashrate;
lv_obj_t * ui_lblbestdiff;
lv_obj_t * ui_lbltemplates;
lv_obj_t * ui_lblvalid;
lv_obj_t * ui_lblshares32;
lv_obj_t * ui_lblclock;
void ui_event_btnpre(lv_event_t * e);
lv_obj_t * ui_btnpre;
lv_obj_t * ui_lbltotalhashrate;
lv_obj_t * ui_lbltemperature;
lv_obj_t * ui_Label5;
lv_obj_t * ui_Label9;
lv_obj_t * ui_Label3;
lv_obj_t * ui_Label4;
lv_obj_t * ui_Label6;
lv_obj_t * ui_Label7;
lv_obj_t * ui_Label8;
lv_obj_t * ui_Label10;
lv_obj_t * ui_Label11;
lv_obj_t * ui_Label12;
lv_obj_t * ui_Container2;
lv_obj_t * ui_Container3;
lv_obj_t * ui_Container4;
lv_obj_t * ui_Label13;
lv_obj_t * ui_Label18;
// CUSTOM VARIABLES
// SCREEN: ui_StatsScreen
void ui_StatsScreen_screen_init(void);
lv_obj_t * ui_StatsScreen;
lv_obj_t * ui_Label2;
void ui_event_btnpre2(lv_event_t * e);
lv_obj_t * ui_btnpre2;
void ui_event_btnconfirm2(lv_event_t * e);
lv_obj_t * ui_btnconfirm2;
void ui_event_btnpost2(lv_event_t * e);
lv_obj_t * ui_btnpost2;
void ui_event_btndelete2(lv_event_t * e);
lv_obj_t * ui_btndelete2;
lv_obj_t * ui_Label16;
lv_obj_t * ui_Label20;
lv_obj_t * ui_Label23;
lv_obj_t * ui_Label26;
lv_obj_t * ui_Container10;
lv_obj_t * ui_Container11;
lv_obj_t * ui_Container12;
lv_obj_t * ui_Container9;
lv_obj_t * ui_Container13;
lv_obj_t * ui_Label34;
lv_obj_t * ui_Label35;
lv_obj_t * ui_lblPrice;
lv_obj_t * ui_lblGlobalHashrate;
lv_obj_t * ui_lblDifficulty;
lv_obj_t * ui_Label32;
lv_obj_t * ui_Label33;
lv_obj_t * ui_Label36;
lv_obj_t * ui_Label39;
lv_obj_t * ui_Label41;
lv_obj_t * ui_lblWorkers;
lv_obj_t * ui_lblTotHashrate;
lv_obj_t * ui_lblMaxDifficulty;
// CUSTOM VARIABLES
// SCREEN: ui_ClockScreen
void ui_ClockScreen_screen_init(void);
lv_obj_t * ui_ClockScreen;
lv_obj_t * ui_Label14;
lv_obj_t * ui_lblclock2;
void ui_event_btnpre3(lv_event_t * e);
lv_obj_t * ui_btnpre3;
void ui_event_btnconfirm3(lv_event_t * e);
lv_obj_t * ui_btnconfirm3;
void ui_event_btnpost3(lv_event_t * e);
lv_obj_t * ui_btnpost3;
void ui_event_btndelete3(lv_event_t * e);
lv_obj_t * ui_btndelete3;
lv_obj_t * ui_Label17;
lv_obj_t * ui_Label21;
lv_obj_t * ui_Label24;
lv_obj_t * ui_Label27;
lv_obj_t * ui_lblHeight2;
lv_obj_t * ui_Label37;
lv_obj_t * ui_Label38;
lv_obj_t * ui_Label40;
lv_obj_t * ui_barhalving;
// CUSTOM VARIABLES
// SCREEN: ui_SettingsScreen
void ui_SettingsScreen_screen_init(void);
lv_obj_t * ui_SettingsScreen;
lv_obj_t * ui_Label15;
void ui_event_btnpre4(lv_event_t * e);
lv_obj_t * ui_btnpre4;
void ui_event_btnconfirm4(lv_event_t * e);
lv_obj_t * ui_btnconfirm4;
void ui_event_btnpost4(lv_event_t * e);
lv_obj_t * ui_btnpost4;
void ui_event_btndelete4(lv_event_t * e);
lv_obj_t * ui_btndelete4;
lv_obj_t * ui_Label19;
lv_obj_t * ui_Label22;
lv_obj_t * ui_Label25;
lv_obj_t * ui_Label28;
void ui_event_btndelete1(lv_event_t * e);
lv_obj_t * ui_btndelete1;
lv_obj_t * ui_Label1;
lv_obj_t * ui_Container6;
lv_obj_t * ui_Container7;
lv_obj_t * ui_Container8;
lv_obj_t * ui_Label30;
lv_obj_t * ui_Label29;
lv_obj_t * ui_Label31;
lv_obj_t * ui_Container5;
lv_obj_t * ui_lblIp;
lv_obj_t * ui_lblPool;
lv_obj_t * ui_lblAddress;
lv_obj_t * ui_lblversion2;
lv_obj_t * ui_Label42;
// CUSTOM VARIABLES
// EVENTS
lv_obj_t * ui____initial_actions0;
// IMAGES AND IMAGE SETS
const lv_img_dsc_t * ui_imgset_2063710799[1] = {&ui_img_1552732429};
///////////////////// TEST LVGL SETTINGS ////////////////////
#if LV_COLOR_DEPTH != 16
#error "LV_COLOR_DEPTH should be 16bit to match SquareLine Studio's settings"
#endif
#if LV_COLOR_16_SWAP !=1
#error "LV_COLOR_16_SWAP should be 1 to match SquareLine Studio's settings"
#endif
///////////////////// ANIMATIONS ////////////////////
///////////////////// FUNCTIONS ////////////////////
void ui_event_btnconfirm(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_StatsScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_StatsScreen_screen_init);
}
}
void ui_event_btnpost(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_ClockScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_ClockScreen_screen_init);
}
}
void ui_event_btndelete(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_SettingsScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_SettingsScreen_screen_init);
}
}
void ui_event_btnpre(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_HomeScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_HomeScreen_screen_init);
}
}
void ui_event_btnpre2(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_HomeScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_HomeScreen_screen_init);
}
}
void ui_event_btnconfirm2(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_StatsScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_StatsScreen_screen_init);
}
}
void ui_event_btnpost2(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_ClockScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_ClockScreen_screen_init);
}
}
void ui_event_btndelete2(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_SettingsScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_SettingsScreen_screen_init);
}
}
void ui_event_btnpre3(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_HomeScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_HomeScreen_screen_init);
}
}
void ui_event_btnconfirm3(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_StatsScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_StatsScreen_screen_init);
}
}
void ui_event_btnpost3(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_ClockScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_ClockScreen_screen_init);
}
}
void ui_event_btndelete3(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_SettingsScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_SettingsScreen_screen_init);
}
}
void ui_event_btnpre4(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_HomeScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_HomeScreen_screen_init);
}
}
void ui_event_btnconfirm4(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_StatsScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_StatsScreen_screen_init);
}
}
void ui_event_btnpost4(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_ClockScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_ClockScreen_screen_init);
}
}
void ui_event_btndelete4(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_CLICKED) {
_ui_screen_change(&ui_SettingsScreen, LV_SCR_LOAD_ANIM_FADE_ON, 500, 0, &ui_SettingsScreen_screen_init);
}
}
void ui_event_btndelete1(lv_event_t * e)
{
lv_event_code_t event_code = lv_event_get_code(e);
if(event_code == LV_EVENT_LONG_PRESSED) {
reset_configuration_event(e);
}
}
///////////////////// SCREENS ////////////////////
void ui_init(void)
{
lv_disp_t * dispp = lv_disp_get_default();
lv_theme_t * theme = lv_theme_default_init(dispp, lv_palette_main(LV_PALETTE_BLUE), lv_palette_main(LV_PALETTE_RED),
true, LV_FONT_DEFAULT);
lv_disp_set_theme(dispp, theme);
ui_SplashScreen_screen_init();
ui_HomeScreen_screen_init();
ui_StatsScreen_screen_init();
ui_ClockScreen_screen_init();
ui_SettingsScreen_screen_init();
ui____initial_actions0 = lv_obj_create(NULL);
lv_disp_load_scr(ui_SplashScreen);
}