This commit is contained in:
Ilusha 2024-03-16 12:07:49 +03:00 committed by Ilya Shurupov
parent afab59eb21
commit 69a17a609e
71 changed files with 199 additions and 282 deletions

View file

@ -11,7 +11,7 @@ file(GLOB HEADERS "./public/*.hpp" "./public/*/*.hpp" "./applications/*.hpp")
add_library(${PROJECT_NAME} STATIC ${SOURCES} ${HEADERS})
target_include_directories(${PROJECT_NAME} PUBLIC ./public/ ${BINDINGS_INCLUDE} ./ext/)
target_link_libraries(${PROJECT_NAME} PUBLIC Graphics Connection Widgets)
target_link_libraries(${PROJECT_NAME} PUBLIC Graphics Connection Widgets Strings)
target_link_libraries(${PROJECT_NAME} PUBLIC ${BINDINGS_LIBS})
file(COPY "library" DESTINATION "${CMAKE_BINARY_DIR}/${PROJECT_NAME}")

View file

@ -33,7 +33,7 @@ void runApp() {
auto area = window->getCanvas().getAvaliableArea();
gui.proc(window->getEvents(), {}, { area.x, area.y, area.z, area.w });
gui.proc(window->getEvents(), { area.x, area.y, area.z, area.w }, { area.x, area.y, area.z, area.w });
gui.draw(window->getCanvas());
// tp::sleep(100);
@ -54,6 +54,8 @@ int main() {
return 1;
}
tp::HeapAllocGlobal::disableCallstack();
runApp();
binModule.deinitialize();

View file

@ -7,7 +7,7 @@
#include <filesystem>
namespace tp {
static ModuleManifest* deps[] = { &gModuleGraphics, &gModuleConnection, &gModuleWidgets, nullptr };
static ModuleManifest* deps[] = { &gModuleGraphics, &gModuleStrings, &gModuleAllocators, nullptr };
ModuleManifest gModuleLibraryViewer = ModuleManifest("LibraryViewer", nullptr, nullptr, deps);
}
@ -51,7 +51,7 @@ bool Library::loadJson(const String& path) {
LocalConnection libraryFile;
Buffer<int1> libraryFileMem;
if (!libraryFile.connect(LocalConnection::Location(path), LocalConnection::Type(true))) return false;
if (!libraryFile.connect(LocalConnection::Location(path.read()), LocalConnection::Type(true))) return false;
libraryFileMem.reserve(libraryFile.size());
libraryFile.readBytes(libraryFileMem.getBuff(), libraryFile.size());

View file

@ -1,6 +1,7 @@
#pragma once
#include "Window.hpp"
#include "Strings.hpp"
typedef tp::ualni SongId;
enum class SONG_FORMAT { WAV, FLAC, NONE };