feat: add Data Model
This commit is contained in:
@@ -13,19 +13,19 @@
|
|||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
|
|
||||||
#if _MSC_VER >= 1200
|
#if _MSC_VER >= 1200
|
||||||
// Disable compilation warnings.
|
// Disable compilation warnings.
|
||||||
#pragma warning(push)
|
#pragma warning(push)
|
||||||
// nonstandard extension used : bit field types other than int
|
// nonstandard extension used : bit field types other than int
|
||||||
#pragma warning(disable:4214)
|
#pragma warning(disable : 4214)
|
||||||
// 'conversion' conversion from 'type1' to 'type2', possible loss of data
|
// 'conversion' conversion from 'type1' to 'type2', possible loss of data
|
||||||
#pragma warning(disable:4244)
|
#pragma warning(disable : 4244)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lvgl/lvgl.h"
|
#include "lvgl/lvgl.h"
|
||||||
#include "lvgl/examples/lv_examples.h"
|
#include "lvgl/examples/lv_examples.h"
|
||||||
#include "lvgl/demos/lv_demos.h"
|
#include "lvgl/demos/lv_demos.h"
|
||||||
#include "lv_drivers/win32drv/win32drv.h"
|
#include "lv_drivers/win32drv/win32drv.h"
|
||||||
#include "lvgl_mydemo/demo_init.h"
|
#include "lvgl_mydemo/lvgl_app.h"
|
||||||
|
|
||||||
#if _MSC_VER >= 1200
|
#if _MSC_VER >= 1200
|
||||||
// Restore compilation warnings.
|
// Restore compilation warnings.
|
||||||
@@ -34,8 +34,7 @@
|
|||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
int main()
|
int main() {
|
||||||
{
|
|
||||||
lv_init();
|
lv_init();
|
||||||
|
|
||||||
if (!lv_win32_init(
|
if (!lv_win32_init(
|
||||||
@@ -43,8 +42,7 @@ int main()
|
|||||||
SW_SHOW,
|
SW_SHOW,
|
||||||
800,
|
800,
|
||||||
480,
|
480,
|
||||||
LoadIconW(GetModuleHandleW(NULL), MAKEINTRESOURCE(IDI_LVGL))))
|
LoadIconW(GetModuleHandleW(NULL), MAKEINTRESOURCE(IDI_LVGL)))) {
|
||||||
{
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,24 +61,24 @@ int main()
|
|||||||
|
|
||||||
///*Init freetype library
|
///*Init freetype library
|
||||||
// *Cache max 64 faces and 1 size*/
|
// *Cache max 64 faces and 1 size*/
|
||||||
//lv_freetype_init(64, 1, 0);
|
// lv_freetype_init(64, 1, 0);
|
||||||
|
|
||||||
///*Create a font*/
|
///*Create a font*/
|
||||||
//static lv_ft_info_t info;
|
// static lv_ft_info_t info;
|
||||||
//info.name = "./lvgl/src/extra/libs/freetype/arial.ttf";
|
// info.name = "./lvgl/src/extra/libs/freetype/arial.ttf";
|
||||||
//info.weight = 36;
|
// info.weight = 36;
|
||||||
//info.style = FT_FONT_STYLE_NORMAL;
|
// info.style = FT_FONT_STYLE_NORMAL;
|
||||||
//lv_ft_font_init(&info);
|
// lv_ft_font_init(&info);
|
||||||
|
|
||||||
///*Create style with the new font*/
|
///*Create style with the new font*/
|
||||||
//static lv_style_t style;
|
// static lv_style_t style;
|
||||||
//lv_style_init(&style);
|
// lv_style_init(&style);
|
||||||
//lv_style_set_text_font(&style, info.font);
|
// lv_style_set_text_font(&style, info.font);
|
||||||
|
|
||||||
///*Create a label with the new style*/
|
///*Create a label with the new style*/
|
||||||
//lv_obj_t* label = lv_label_create(lv_scr_act());
|
// lv_obj_t* label = lv_label_create(lv_scr_act());
|
||||||
//lv_obj_add_style(label, &style, 0);
|
// lv_obj_add_style(label, &style, 0);
|
||||||
//lv_label_set_text(label, "FreeType Arial Test");
|
// lv_label_set_text(label, "FreeType Arial Test");
|
||||||
|
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
// my Win32 filesystem driver application
|
// my Win32 filesystem driver application
|
||||||
@@ -105,8 +103,8 @@ int main()
|
|||||||
// Demos from lv_examples
|
// Demos from lv_examples
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
|
||||||
//demo_init();
|
lvgl_app_init();
|
||||||
lv_demo_widgets(); // ok
|
// lv_demo_widgets(); // ok
|
||||||
// lv_demo_benchmark();
|
// lv_demo_benchmark();
|
||||||
// lv_demo_keypad_encoder(); // ok
|
// lv_demo_keypad_encoder(); // ok
|
||||||
// lv_demo_music(); // removed from repository
|
// lv_demo_music(); // removed from repository
|
||||||
@@ -259,8 +257,7 @@ int main()
|
|||||||
// Task handler loop
|
// Task handler loop
|
||||||
// ----------------------------------
|
// ----------------------------------
|
||||||
|
|
||||||
while (!lv_win32_quit_signal)
|
while (!lv_win32_quit_signal) {
|
||||||
{
|
|
||||||
lv_task_handler();
|
lv_task_handler();
|
||||||
Sleep(1);
|
Sleep(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,17 @@
|
|||||||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
|
||||||
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
<PreprocessorDefinitions>_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||||
<Optimization Condition="'$(Configuration)'=='Release'">MinSpace</Optimization>
|
<Optimization Condition="'$(Configuration)'=='Release'">MinSpace</Optimization>
|
||||||
|
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">stdcpplatest</LanguageStandard>
|
||||||
|
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">stdc17</LanguageStandard_C>
|
||||||
|
<LanguageStandard_C Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">stdc11</LanguageStandard_C>
|
||||||
|
<LanguageStandard Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">stdcpplatest</LanguageStandard>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
</ItemDefinitionGroup>
|
</ItemDefinitionGroup>
|
||||||
<Import Project="LVGL.Portable.vcxitems" />
|
<Import Project="LVGL.Portable.vcxitems" />
|
||||||
<Import Project="LVGL.Drivers.vcxitems" />
|
<Import Project="LVGL.Drivers.vcxitems" />
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="lvgl_mydemo\demo_init.h" />
|
<ClInclude Include="lvgl_mydemo\data\dataModel.h" />
|
||||||
|
<ClInclude Include="lvgl_mydemo\data\scr_mgr.h" />
|
||||||
<ClInclude Include="lv_conf.h" />
|
<ClInclude Include="lv_conf.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -45,7 +50,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="LVGL.Simulator.cpp" />
|
<ClCompile Include="LVGL.Simulator.cpp" />
|
||||||
<ClCompile Include="lvgl_mydemo\demo_init.c" />
|
<ClCompile Include="lvgl_mydemo\data\dataModel.c" />
|
||||||
|
<ClCompile Include="lvgl_mydemo\data\scr_mgr.c" />
|
||||||
|
<ClCompile Include="lvgl_mydemo\lvgl_app.c" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="LVGL.Simulator.rc" />
|
<ResourceCompile Include="LVGL.Simulator.rc" />
|
||||||
|
|||||||
@@ -5,8 +5,11 @@
|
|||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="lv_conf.h" />
|
<ClInclude Include="lv_conf.h" />
|
||||||
<ClInclude Include="lv_drv_conf.h" />
|
<ClInclude Include="lv_drv_conf.h" />
|
||||||
<ClInclude Include="lvgl_mydemo\demo_init.h">
|
<ClInclude Include="lvgl_mydemo\data\dataModel.h">
|
||||||
<Filter>lvgl_mydemo</Filter>
|
<Filter>lvgl_mydemo\data</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="lvgl_mydemo\data\scr_mgr.h">
|
||||||
|
<Filter>lvgl_mydemo\data</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -18,9 +21,15 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="LVGL.Simulator.cpp" />
|
<ClCompile Include="LVGL.Simulator.cpp" />
|
||||||
<ClCompile Include="lvgl_mydemo\demo_init.c">
|
<ClCompile Include="lvgl_mydemo\lvgl_app.c">
|
||||||
<Filter>lvgl_mydemo</Filter>
|
<Filter>lvgl_mydemo</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="lvgl_mydemo\data\dataModel.c">
|
||||||
|
<Filter>lvgl_mydemo\data</Filter>
|
||||||
|
</ClCompile>
|
||||||
|
<ClCompile Include="lvgl_mydemo\data\scr_mgr.c">
|
||||||
|
<Filter>lvgl_mydemo\data</Filter>
|
||||||
|
</ClCompile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ResourceCompile Include="LVGL.Simulator.rc" />
|
<ResourceCompile Include="LVGL.Simulator.rc" />
|
||||||
@@ -35,5 +44,23 @@
|
|||||||
<Filter Include="lvgl_mydemo">
|
<Filter Include="lvgl_mydemo">
|
||||||
<UniqueIdentifier>{8c2243de-0fed-467c-aebe-9ceb4d4cae3e}</UniqueIdentifier>
|
<UniqueIdentifier>{8c2243de-0fed-467c-aebe-9ceb4d4cae3e}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="lvgl_mydemo\assert">
|
||||||
|
<UniqueIdentifier>{253c6444-7e69-4837-a228-93424f9d3129}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="lvgl_mydemo\data">
|
||||||
|
<UniqueIdentifier>{ff621371-a878-40b4-91ab-cd7be0dc2d4b}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="lvgl_mydemo\srceen">
|
||||||
|
<UniqueIdentifier>{c5934b62-3853-4f42-9324-6ffd65bd3527}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="lvgl_mydemo\widgets">
|
||||||
|
<UniqueIdentifier>{f2c004d7-0d9c-41e8-abc9-72caf2c7be27}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="lvgl_mydemo\assert\font">
|
||||||
|
<UniqueIdentifier>{7097f629-8b0d-4ec3-93c8-d8860a89b3e1}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="lvgl_mydemo\assert\image">
|
||||||
|
<UniqueIdentifier>{5aec906d-b671-4778-9999-6dcadc840600}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
Submodule LVGL.Simulator/lvgl_mydemo updated: f6e00345b9...6b1cacea04
Reference in New Issue
Block a user