mirror of
https://onedev.site.tesses.net/tesses-framework/tessesframework-webapp
synced 2026-02-08 08:25:46 +00:00
14 lines
1.2 KiB
C++
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);
|
|
}; |