First Commit

This commit is contained in:
2025-10-14 23:17:27 -05:00
commit f5890d070f
6 changed files with 243 additions and 0 deletions

14
include/TF_WebApp.hpp Normal file
View File

@@ -0,0 +1,14 @@
#pragma once
#include <TessesFramework/TessesFramework.hpp>
namespace Tesses::Framework {
#if defined(_WIN32)
int TF_Main(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd, std::function<std::shared_ptr<Tesses::Framework::Http::IHttpServer>(std::vector<std::string>& args)> cb, std::function<void(std::shared_ptr<Tesses::Framework::Http::IHttpServer>)> clo);
#define TF_WebApp(fn,clo) std::shared_ptr<Tesses::Framework::Http::IHttpServer> fn(std::vector<std::string>& args); int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) { return Tesses::Framework::TF_Main(hInstance,hPrevInstance,lpCmdLine,nShowCmd,fn,clo);}
#else
int TF_Main(int argc, char** argv, std::function<std::shared_ptr<Tesses::Framework::Http::IHttpServer>(std::vector<std::string>& args)> cb, std::function<void(std::shared_ptr<Tesses::Framework::Http::IHttpServer>)> clo);
#define TF_WebApp(fn,clo) std::shared_ptr<Tesses::Framework::Http::IHttpServer> fn(std::vector<std::string>& args); int main(int argc, char** argv) { return Tesses::Framework::TF_Main(argc, argv, fn, clo); }
#endif
void TF_WebAppSetTitle(std::string title);
};