{"id":27781252,"url":"https://github.com/thebest12dev/cinnamontoast","last_synced_at":"2025-04-30T12:43:50.062Z","repository":{"id":284193850,"uuid":"951707813","full_name":"thebest12dev/cinnamontoast","owner":"thebest12dev","description":"A framework with an easy learning curve","archived":false,"fork":false,"pushed_at":"2025-04-26T11:38:11.000Z","size":911,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-26T12:34:24.012Z","etag":null,"topics":["cmake","cpp20","luajit","mit","openssl","tinyxml2","vcpkg"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thebest12dev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-20T05:43:44.000Z","updated_at":"2025-04-26T11:37:12.000Z","dependencies_parsed_at":"2025-04-13T15:27:10.088Z","dependency_job_id":"d938b288-8246-44c5-a8b7-f2f4d2a3d7f6","html_url":"https://github.com/thebest12dev/cinnamontoast","commit_stats":null,"previous_names":["thebest12dev/cinnamontoast"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebest12dev%2Fcinnamontoast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebest12dev%2Fcinnamontoast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebest12dev%2Fcinnamontoast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thebest12dev%2Fcinnamontoast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thebest12dev","download_url":"https://codeload.github.com/thebest12dev/cinnamontoast/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251702869,"owners_count":21630109,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cmake","cpp20","luajit","mit","openssl","tinyxml2","vcpkg"],"created_at":"2025-04-30T12:43:48.475Z","updated_at":"2025-04-30T12:43:50.056Z","avatar_url":"https://github.com/thebest12dev.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./resources/pctoast.png\"\u003e\n\n# Project \"CinnamonToast\"\nProject CinnamonToast (as referred by it's codename) is a project that creates a cross-platform UI framework that's fast, modern and easy to work with. It's based on .xml and shared library files, separating the declaration from the definition. as well as an IDE (CinnamonToast IDE) written in .NET. \nSince the codebase is all written in C++, for a more user-friendly approach, we'll be using a custom IDE with support for drag-and-drop elements (like Visual Studio Designer) and also support for Lua, as an external library though this may add extra overhead to the codebase.\n\nCurrently, since its a very early project, there are still a TON of problems (like memory leaks, performance issues or UI issues) that will be addressed in the future.\n\u003cimg src=\"./resources/screenshot.png\"\u003e\n## Creating a program\nTo create a simple GUI, you can directly modify the .xml files, but you can use the IDE for convenience.\n\nExample:\n```xml\n\u003c!-- xml file --\u003e\n\u003croot version=\"1\" uiVersion=\"1.0.0\"\u003e\n    \u003cwindow title=\"Program\" width=\"800\" height=\"500\" bgColor=\"systemDefault\" id=\"mainWindow\"\u003e\n      \u003c!-- Lua main file location for the implementation --\u003e\n      \u003clibrary type=\"lua\" location=\"main.lua\"/\u003e\n\n      \u003c!-- Alternatively, you can use direct .dlls (this may require some C++ programming)\n      \u003clibrary location=\"main.dll\"\u003e\n      --\u003e\n\n      \u003clabel x=\"330\" y=\"60\" font=\"Segoe UI\" fontSize=\"16\" id=\"label1\"\u003eHello, world!\u003c/label\u003e\n    \u003c/window\u003e\n\u003c/root\u003e\n```\n\nFor the implementation (written in Lua), insert:\n```lua\n-- main.lua\n\nprint(\"Loaded!\")\nlocal label = CinnamonToast.getComponentById(\"label1\")\nprint(label.getText())\n\n```\n\nor you can directly use C++ (faster, but more complicated):\n```cpp\n#include \u003cCToastAPI.h\u003e // CinnamonToast API\n#include \u003cstring\u003e\n#include \u003ciostream\u003e\n#include \u003cwindows.h\u003e\nextern \"C\" __declspec(dllexport) void CToastMain(CinnamonToast::CToastAPI* api) {\n    std::cout \u003c\u003c \"Loaded!\" \u003c\u003c std::endl;\n    CinnamonToast::ComponentId id = api-\u003eGetComponentById(\"label1\");\n    const char* string = api-\u003eGetComponentText(id);\n    std::cout \u003c\u003c string \u003c\u003c std::endl;\n};\n```\n\n## Building\nTo build CinnamonToast, you need CMake and a C++ compiler (like MSVC, or g++). Then simply do these steps:\n### If using Visual Studio IDE\n1. Open the project in Visual Studio\n2. Select the configuration (Debug or Release)\n3. Select ctoasti.exe as the target\n4. Finally, build the project (as it will be automatically be built)\n\n### If using plain CMake and VS Build Tools\n1. Open a terminal\n2. Navigate to the project directory\n3. Run `python3 DownloadLibraries.py` to download the libraries source (like tinyxml2)\n4. If you're using MSBuild, run\n```cmd\ncmake -G \"Visual Studio xx xxxx\" -A x64\n```\nIf you're using Ninja, run\n```cmd\ncmake -G \"Ninja\" -DCMAKE_TOOLCHAIN_FILE=path/to/vcpkg/cmake -DTRIPLET=x64-windows\"\n```\n5. Now, build the project\n```cmd\ncmake --build . --config Release\n```\n### If building on Linux\n1. Open a terminal\n2. Install CMake and g++ if you haven't already: `sudo apt install cmake g++ ninja-build`\n3. Navigate to the project directory\n5. Run `cmake . -G \"Ninja\" -DCMAKE_TOOLCHAIN_FILE=\u003cpath to vcpkg.cmake\u003e -DTRIPLET=x64-linux`\n6. Run `ninja`\n\nThis will build the project and create the launcher (ctoasti) as well as the shared libraries (CinnamonToast.Core, etc.) that you can link with your projects.\n\n## Security and sandboxing\nFor native code, there isn't any sandboxing, so beware of malicious programs. \n\nFor Lua, it's fully sandboxed, so it won't be able to access the filesystem or any other system resources. It can only access the CinnamonToast API and the Lua standard library.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebest12dev%2Fcinnamontoast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthebest12dev%2Fcinnamontoast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthebest12dev%2Fcinnamontoast/lists"}