mirror of
https://onedev.site.tesses.net/tesses-framework/tessesframework-webapp
synced 2026-02-08 08:25:46 +00:00
First Commit
This commit is contained in:
14
include/TF_WebApp.hpp
Normal file
14
include/TF_WebApp.hpp
Normal 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);
|
||||
};
|
||||
Reference in New Issue
Block a user