[windows] App assets loading correctly

This commit is contained in:
Lea Anthony
2021-04-30 21:14:09 +10:00
parent 247df54ef0
commit 5da198de7e
7 changed files with 154 additions and 39 deletions

View File

@@ -9,8 +9,15 @@
#include <windows.h>
#include <wingdi.h>
#include <functional>
#include <codecvt>
#include "windows/WebView2.h"
#include "assets.h"
// TODO:
//#include "userdialogicons.h"
struct Application{
// Window specific
HWND window;
@@ -34,6 +41,8 @@ struct Application{
LONG maxWidth;
LONG maxHeight;
int frame;
char* bindings;
};
#define ON_MAIN_THREAD(code) dispatch( [=]{ code; } )
@@ -44,5 +53,12 @@ typedef std::function<void(ICoreWebView2Controller *)> comHandlerCallback;
void center(struct Application*);
void setTitle(struct Application* app, const char *title);
char* LPWSTRToCstr(LPWSTR input);
void loadAssets(struct Application* app);
// Callback
extern "C" {
void messageFromWindowCallback(const char *);
}
#endif