Windows fixes; experimental UWP framework (not working)

This commit is contained in:
Jack Andersen
2017-10-23 17:09:50 -10:00
parent 41d225bd64
commit d1b980b529
12 changed files with 1114 additions and 134 deletions

View File

@@ -38,7 +38,7 @@ public:
Cocoa = 4,
CocoaTouch = 5,
Win32 = 6,
WinRT = 7,
UWP = 7,
Revolution = 8,
Cafe = 9
};
@@ -80,6 +80,38 @@ ApplicationRun(IApplication::EPlatformType platform,
args.push_back(argv[i]);
return ApplicationRun(platform, cb, uniqueName, friendlyName, argv[0], args, singleInstance);
}
#if WINAPI_FAMILY && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP
using namespace Windows::ApplicationModel::Core;
ref struct ViewProvider sealed : IFrameworkViewSource
{
ViewProvider(boo::IApplicationCallback& appCb,
const SystemString& uniqueName,
const SystemString& friendlyName,
const SystemString& pname,
Platform::Array<Platform::String^>^ params,
bool singleInstance)
: m_appCb(appCb), m_uniqueName(uniqueName), m_friendlyName(friendlyName),
m_pname(pname), m_singleInstance(singleInstance)
{
SystemChar selfPath[1024];
GetModuleFileNameW(nullptr, selfPath, 1024);
m_args.reserve(params.size() + 1);
m_args.emplace_back(selfPath);
for (Platform::String^ str : params)
m_args.emplace_back(str.Data());
}
IFrameworkView^ CreateView();
boo::IApplicationCallback& m_appCb;
SystemString m_uniqueName;
SystemString m_friendlyName;
SystemString m_pname;
std::vector<SystemString> m_args;
bool m_singleInstance;
};
#endif
}