add screen library
This commit is contained in:
		| @@ -0,0 +1,9 @@ | ||||
| /*********************************************************************************/ | ||||
| /********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/ | ||||
| /*********************************************************************************/ | ||||
| #include <touchgfx/hal/HAL.hpp> | ||||
| #include <touchgfx/lcd/LCD.hpp> | ||||
|  | ||||
| void setupSimulator(int argc, char** argv, touchgfx::HAL& hal); | ||||
|  | ||||
| touchgfx::LCD& setupLCD(); | ||||
| @@ -0,0 +1,31 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||
|   <ImportGroup Label="PropertySheets" /> | ||||
|   <PropertyGroup Label="UserMacros" /> | ||||
|   <PropertyGroup> | ||||
|     <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup> | ||||
|     <LocalDebuggerEnvironment>PATH=$(TouchGFXReleasePath)\lib\sdl\win32</LocalDebuggerEnvironment> | ||||
|   </PropertyGroup> | ||||
|   <ItemDefinitionGroup> | ||||
|     <ClCompile> | ||||
|       <AdditionalIncludeDirectories>$(ApplicationRoot)\gui\include;$(ApplicationRoot)\generated\images\include;$(ApplicationRoot)\generated\bitmaps\include;$(ApplicationRoot)\generated\fonts\include;$(ApplicationRoot)\generated\texts\include;$(ApplicationRoot)\generated\gui_generated\include;$(ApplicationRoot)\generated\simulator\include;$(TouchGFXReleasePath)\framework\common\include;$(TouchGFXReleasePath)\framework\mvp\include;$(TouchGFXReleasePath)\framework\include\platform\hal\simulator\sdl\vendor\win32;$(TouchGFXReleasePath)\framework\platform\hal\simulator\sdl\3rdparty\sdl\include\win32;$(TouchGFXReleasePath)\framework\include</AdditionalIncludeDirectories> | ||||
|       <AdditionalOptions>$(UseBPPOption)</AdditionalOptions> | ||||
|       <PreprocessorDefinitions>SIMULATOR;_ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> | ||||
|       <DisableSpecificWarnings>4355</DisableSpecificWarnings> | ||||
|     </ClCompile> | ||||
|   </ItemDefinitionGroup> | ||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||||
|     <Link> | ||||
|       <AdditionalDependencies>$(TouchGFXReleasePath)\lib\sdl\win32\SDL.lib;$(TouchGFXReleasePath)\lib\sdl\win32\SDLmain.lib;$(TouchGFXReleasePath)\lib\sdl\win32\SDL_image.lib;$(TouchGFXReleasePath)\lib\win\msvs\libtouchgfx_$(PlatformToolset)_debug.lib;user32.lib;shell32.lib</AdditionalDependencies> | ||||
|       <AdditionalOptions>/NODEFAULTLIB:msvcrt.lib</AdditionalOptions> | ||||
|     </Link> | ||||
|   </ItemDefinitionGroup> | ||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||||
|     <Link> | ||||
|       <AdditionalDependencies>$(TouchGFXReleasePath)\lib\sdl\win32\SDL.lib;$(TouchGFXReleasePath)\lib\sdl\win32\SDLmain.lib;$(TouchGFXReleasePath)\lib\sdl\win32\SDL_image.lib;$(TouchGFXReleasePath)\lib\win\msvs\libtouchgfx_$(PlatformToolset).lib;user32.lib;shell32.lib</AdditionalDependencies> | ||||
|     </Link> | ||||
|   </ItemDefinitionGroup> | ||||
|   <ItemGroup /> | ||||
| </Project> | ||||
| @@ -0,0 +1,64 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||
|   <ItemGroup> | ||||
|     <AllGeneratedFiles Include="$(ApplicationRoot)\generated\fonts\**\*.*;$(ApplicationRoot)\generated\images\**\*.*;$(ApplicationRoot)\generated\texts\**\*.*" /> | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <ItemGroup> | ||||
|     <ImageConvertExecutable Include="$(TouchGFXReleasePath)\framework\tools\imageconvert\build\msvs\ImageConvert.exe"/> | ||||
|   </ItemGroup> | ||||
|  | ||||
|   <PropertyGroup> | ||||
|     <UseBPPOption>/DUSE_BPP=$(UseBPP)</UseBPPOption> | ||||
|   </PropertyGroup> | ||||
|    | ||||
|   <PropertyGroup Condition="'$(LCD)'!=''"> | ||||
|     <LCDOption>/D$(LCD)</LCDOption> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup Condition="'$(LCD)'==''"> | ||||
|     <LCDOption/> | ||||
|   </PropertyGroup> | ||||
|    | ||||
|   <PropertyGroup> | ||||
|     <touchgfx_env Condition="'$(TouchGFXEnvPath)'==''">$(TouchGFXReleasePath)\..\env</touchgfx_env> | ||||
|     <touchgfx_env Condition="'$(TouchGFXEnvPath)'!=''">$(TouchGFXEnvPath)</touchgfx_env> | ||||
|   </PropertyGroup> | ||||
|  | ||||
|   <Target Name="GenerateBitmapDatabaseFiles" BeforeTargets="ClCompile"> | ||||
|     <Message Text="Converting images"/> | ||||
|     <Exec Command="echo Converting images"/> | ||||
|     <Exec Command=""%(ImageConvertExecutable.FullPath)" -r assets\images -w generated\images" WorkingDirectory="$(ApplicationRoot)"/> | ||||
|   </Target> | ||||
|  | ||||
|   <Target Name="GenerateTextsAndFontsFiles" BeforeTargets="ClCompile"> | ||||
|     <Message Text="Converting texts and fonts" /> | ||||
|     <Exec Command="echo Converting texts and fonts"/> | ||||
|     <Exec Command=""$(touchgfx_env)\MinGW\msys\1.0\ruby193\bin\ruby.exe" "$(TouchGFXReleasePath)\framework\tools\textconvert\main.rb" "$(ApplicationRoot)\assets\texts\texts.xlsx" "$(TouchGFXReleasePath)\framework\tools\fontconvert\build\win\fontconvert.out" "$(ApplicationRoot)\generated\fonts" "$(ApplicationRoot)\generated\texts" "$(ApplicationRoot)\assets\fonts" "$(ApplicationRoot)""/> | ||||
|   </Target> | ||||
|  | ||||
|   <Target Name="CompileAllGeneratedFiles" BeforeTargets="ClCompile"> | ||||
|     <ItemGroup> | ||||
|       <AllGeneratedCompileFiles Include="$(ApplicationRoot)\generated\fonts\**\*.cpp;$(ApplicationRoot)\generated\images\**\*.cpp;$(ApplicationRoot)\generated\texts\**\*.cpp;" /> | ||||
|     </ItemGroup> | ||||
|     <Message Text="Creating compile items for all generated source files: @(AllGeneratedCompileFiles)"/> | ||||
|     <Exec Command="echo Creating compile items for all generated source files: @(AllGeneratedCompileFiles)"/> | ||||
|     <CreateItem Include="@(AllGeneratedCompileFiles)"> | ||||
|       <Output TaskParameter="Include" ItemName="ClCompile"/> | ||||
|     </CreateItem> | ||||
|   </Target> | ||||
|  | ||||
|   <Target Name="CleanupGeneratedFiles" AfterTargets="Clean"> | ||||
|     <Message Text="Clean-up generated files: @(AllGeneratedFiles)"/> | ||||
|     <Exec Command="echo Clean-up generated files: @(AllGeneratedFiles)"/> | ||||
|     <Delete Files="@(AllGeneratedFiles)"/> | ||||
|   </Target> | ||||
|  | ||||
|   <Target Name="PostBuild" AfterTargets="ClCompile"> | ||||
|     <Exec Command="copy $(TouchGFXReleasePath)\lib\sdl2\win32\SDL2.dll $(OutDir) > nul" /> | ||||
|     <Exec Command="copy $(TouchGFXReleasePath)\lib\sdl2\win32\SDL2_image.dll $(OutDir) > nul" /> | ||||
|     <Exec Command="copy $(TouchGFXReleasePath)\lib\sdl2\win32\libpng16-16.dll $(OutDir) > nul" /> | ||||
|     <Exec Command="copy $(TouchGFXReleasePath)\lib\sdl2\win32\zlib1.dll $(OutDir) > nul"/> | ||||
|     <Exec Command="if exist $(ApplicationRoot)\simulator\landscape.png copy /y $(ApplicationRoot)\simulator\landscape.png $(OutDir) > nul" /> | ||||
|     <Exec Command="if exist $(ApplicationRoot)\simulator\portrait.png copy /y $(ApplicationRoot)\simulator\portrait.png $(OutDir) > nul" /> | ||||
|   </Target> | ||||
| </Project> | ||||
| @@ -0,0 +1,31 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||||
|   <ImportGroup Label="PropertySheets" /> | ||||
|   <PropertyGroup Label="UserMacros" /> | ||||
|   <PropertyGroup> | ||||
|     <DisableFastUpToDateCheck>true</DisableFastUpToDateCheck> | ||||
|   </PropertyGroup> | ||||
|   <PropertyGroup> | ||||
|     <LocalDebuggerEnvironment>PATH=$(TouchGFXReleasePath)\lib\sdl2\win32</LocalDebuggerEnvironment> | ||||
|   </PropertyGroup> | ||||
|   <ItemDefinitionGroup> | ||||
|     <ClCompile> | ||||
|       <AdditionalIncludeDirectories>$(ApplicationRoot)\gui\include;$(ApplicationRoot)\generated\images\include;$(ApplicationRoot)\generated\bitmaps\include;$(ApplicationRoot)\generated\fonts\include;$(ApplicationRoot)\generated\texts\include;$(ApplicationRoot)\generated\gui_generated\include;$(ApplicationRoot)\generated\simulator\include;$(TouchGFXReleasePath)\framework\common\include;$(TouchGFXReleasePath)\framework\mvp\include;$(TouchGFXReleasePath)\framework\include\platform\hal\simulator\sdl2\vendor;$(TouchGFXReleasePath)\framework\include</AdditionalIncludeDirectories> | ||||
|       <AdditionalOptions>$(UseBPPOption)</AdditionalOptions> | ||||
|       <PreprocessorDefinitions>SIMULATOR;_ITERATOR_DEBUG_LEVEL=0</PreprocessorDefinitions> | ||||
|       <DisableSpecificWarnings>4355</DisableSpecificWarnings> | ||||
|     </ClCompile> | ||||
|   </ItemDefinitionGroup> | ||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||||
|     <Link> | ||||
|       <AdditionalDependencies>$(TouchGFXReleasePath)\lib\sdl2\win32\SDL2.lib;$(TouchGFXReleasePath)\lib\sdl2\win32\SDL2_image.lib;$(TouchGFXReleasePath)\lib\win\msvs\libtouchgfx_$(PlatformToolset)_debug.lib;user32.lib;shell32.lib</AdditionalDependencies> | ||||
|       <AdditionalOptions>/NODEFAULTLIB:msvcrt.lib</AdditionalOptions> | ||||
|     </Link> | ||||
|   </ItemDefinitionGroup> | ||||
|   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||||
|     <Link> | ||||
|       <AdditionalDependencies>$(TouchGFXReleasePath)\lib\sdl2\win32\SDL2.lib;$(TouchGFXReleasePath)\lib\sdl2\win32\SDL2_image.lib;$(TouchGFXReleasePath)\lib\win\msvs\libtouchgfx_$(PlatformToolset).lib;user32.lib;shell32.lib</AdditionalDependencies> | ||||
|     </Link> | ||||
|   </ItemDefinitionGroup> | ||||
|   <ItemGroup /> | ||||
| </Project> | ||||
| @@ -0,0 +1,25 @@ | ||||
| /*********************************************************************************/ | ||||
| /********** THIS FILE IS GENERATED BY TOUCHGFX DESIGNER, DO NOT MODIFY ***********/ | ||||
| /*********************************************************************************/ | ||||
| #include <simulator/mainBase.hpp> | ||||
| #include <platform/hal/simulator/sdl2/HALSDL2.hpp> | ||||
| #include <common/TouchGFXInit.hpp> | ||||
| #include <platform/driver/lcd/LCD16bpp.hpp> | ||||
| #include <string.h> | ||||
|  | ||||
|  | ||||
| void setupSimulator(int argc, char** argv, touchgfx::HAL& hal) { | ||||
|   // Simulate hardware running at 60Hz generating a vsync every 16.6667 ms | ||||
|   static_cast<touchgfx::HALSDL2&>(hal).setVsyncInterval(16.6667f); | ||||
|   static_cast<touchgfx::HALSDL2&>(hal).setWindowTitle("STM32F746G_DISCO"); | ||||
|  | ||||
|   // Initialize SDL | ||||
|   bool sdl_init_result = static_cast<touchgfx::HALSDL2&>(hal).sdl_init(argc, argv); | ||||
|   assert(sdl_init_result && "Error during SDL initialization"); | ||||
|  | ||||
| } | ||||
|  | ||||
| touchgfx::LCD16bpp lcd; | ||||
| touchgfx::LCD& setupLCD() { | ||||
|   return lcd; | ||||
| } | ||||
							
								
								
									
										
											BIN
										
									
								
								ide-touchgfx-gen/TouchGFX/generated/simulator/touchgfx.ico
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								ide-touchgfx-gen/TouchGFX/generated/simulator/touchgfx.ico
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 97 KiB | 
| @@ -0,0 +1 @@ | ||||
| id ICON touchgfx.ico | ||||
							
								
								
									
										
											BIN
										
									
								
								ide-touchgfx-gen/TouchGFX/generated/simulator/touchgfx.res
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								ide-touchgfx-gen/TouchGFX/generated/simulator/touchgfx.res
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							
		Reference in New Issue
	
	Block a user