Files
tessesframework-webapp/include/TF_WebApp.hpp
2025-10-14 23:17:27 -05:00

14 lines
1.2 KiB
C++

#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);
};