mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
sys: Implement more functionality into splash screen (#223)
* build: Add libcurl * build: Stop the whole static linking on Windows mess. There's no use anymore * sys: Added update detector and moved some startup tasks to splash screen * sys: Updated ImHex icon * fix: Settings button on welcome page once again works * build: Fix build on Linux * sys: Fixed splash window not searching all paths for resources
This commit is contained in:
30
plugins/libimhex/include/hex/helpers/net.hpp
Normal file
30
plugins/libimhex/include/hex/helpers/net.hpp
Normal file
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
|
||||
#include <hex.hpp>
|
||||
#include <future>
|
||||
|
||||
#include <curl/curl.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
|
||||
namespace hex {
|
||||
|
||||
template<typename T>
|
||||
struct Response {
|
||||
u32 code;
|
||||
T response;
|
||||
};
|
||||
|
||||
class Net {
|
||||
public:
|
||||
Net();
|
||||
~Net();
|
||||
|
||||
Response<std::string> getString(std::string_view url);
|
||||
Response<nlohmann::json> getJson(std::string_view url);
|
||||
|
||||
private:
|
||||
CURL *m_ctx;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -43,6 +43,7 @@ namespace hex {
|
||||
static void drawCommonInterfaces();
|
||||
|
||||
static void showErrorPopup(std::string_view errorMessage);
|
||||
static void showFatalPopup(std::string_view errorMessage);
|
||||
|
||||
virtual bool hasViewMenuItemEntry();
|
||||
virtual ImVec2 getMinSize();
|
||||
|
||||
Reference in New Issue
Block a user