mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-02-05 11:30:07 +08:00
Update release
This commit is contained in:
@@ -1331,6 +1331,7 @@ UnitTestSnapshotFrame
|
||||
|
||||
class UnitTestSnapshotFrame : public Object, public virtual IUnitTestSnapshotFrame
|
||||
{
|
||||
friend const remoteprotocol::UnitTest_RenderingFrame& GetRenderingFrame(Ptr<IUnitTestSnapshotFrame> frame);
|
||||
protected:
|
||||
vint index;
|
||||
UnitTest_RenderingFrame frame;
|
||||
@@ -1339,11 +1340,6 @@ UnitTestSnapshotFrame
|
||||
WString dom;
|
||||
JsonFormatting formatting;
|
||||
|
||||
friend const remoteprotocol::UnitTest_RenderingFrame& GetRenderingFrame(Ptr<IUnitTestSnapshotFrame> frame)
|
||||
{
|
||||
return frame.Cast<UnitTestSnapshotFrame>()->frame;
|
||||
}
|
||||
|
||||
public:
|
||||
UnitTestSnapshotFrame(vint _index, UnitTest_RenderingFrame _frame)
|
||||
: index(_index)
|
||||
@@ -1386,22 +1382,23 @@ UnitTestSnapshotFrame
|
||||
}
|
||||
};
|
||||
|
||||
const remoteprotocol::UnitTest_RenderingFrame& GetRenderingFrame(Ptr<IUnitTestSnapshotFrame> frame)
|
||||
{
|
||||
return frame.Cast<UnitTestSnapshotFrame>()->frame;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
UnitTestSnapshotFileNode
|
||||
***********************************************************************/
|
||||
|
||||
class UnitTestSnapshotFileNode : public Object, public virtual IUnitTestSnapshotFileNode
|
||||
{
|
||||
friend const remoteprotocol::UnitTest_RenderingTrace& GetRenderingTrace(Ptr<gaclib_controls::IUnitTestSnapshotFileNode> node);
|
||||
protected:
|
||||
File file;
|
||||
Ptr<UnitTest_RenderingTrace> renderingTrace;
|
||||
List<Ptr<UnitTestSnapshotFrame>> frames;
|
||||
|
||||
friend const remoteprotocol::UnitTest_RenderingTrace& GetRenderingTrace(Ptr<gaclib_controls::IUnitTestSnapshotFileNode> node)
|
||||
{
|
||||
return *node.Cast<UnitTestSnapshotFileNode>()->renderingTrace.Obj();
|
||||
}
|
||||
|
||||
void EnsureLoaded()
|
||||
{
|
||||
if (!renderingTrace)
|
||||
@@ -1462,6 +1459,11 @@ UnitTestSnapshotFileNode
|
||||
}
|
||||
};
|
||||
|
||||
const remoteprotocol::UnitTest_RenderingTrace& GetRenderingTrace(Ptr<gaclib_controls::IUnitTestSnapshotFileNode> node)
|
||||
{
|
||||
return *node.Cast<UnitTestSnapshotFileNode>()->renderingTrace.Obj();
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
UnitTestSnapshotFolderNode
|
||||
***********************************************************************/
|
||||
|
||||
@@ -285,6 +285,15 @@ void GacUIUnitTest_LogDiffs(const WString& appName, UnitTestRemoteProtocol& unit
|
||||
RenderingDom_DiffsInOrder diffs;
|
||||
DiffDom(dom, domIndex, loggedFrame->renderingDom, nextDomIndex, diffs);
|
||||
diffList = diffs.diffsInOrder;
|
||||
|
||||
auto copiedDom = CopyDom(dom);
|
||||
DomIndex copiedDomIndex;
|
||||
BuildDomIndex(copiedDom, copiedDomIndex);
|
||||
UpdateDomInplace(copiedDom, copiedDomIndex, diffs);
|
||||
|
||||
auto expectedJson = JsonToString(remoteprotocol::ConvertCustomTypeToJson(loggedFrame->renderingDom));
|
||||
auto actualJson = JsonToString(remoteprotocol::ConvertCustomTypeToJson(copiedDom));
|
||||
TEST_ASSERT(actualJson == expectedJson);
|
||||
}
|
||||
|
||||
if (diffList)
|
||||
|
||||
278
Import/GacUI.cpp
278
Import/GacUI.cpp
@@ -2721,7 +2721,7 @@ GuiWindow
|
||||
}
|
||||
else if (frameConfig == BoolOption::AlwaysFalse || templateConfig == BoolOption::AlwaysFalse)
|
||||
{
|
||||
variable = true;
|
||||
variable = false;
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -40604,6 +40604,42 @@ ChannelPackageSemantic
|
||||
GuiRemoteProtocolFromJsonChannel
|
||||
***********************************************************************/
|
||||
|
||||
#define EVENT_NOREQ(NAME, REQUEST)\
|
||||
void GuiRemoteProtocolFromJsonChannel::OnReceive_Event_ ## NAME (Ptr<glr::json::JsonNode> jsonArguments)\
|
||||
{\
|
||||
events->On ## NAME();\
|
||||
}\
|
||||
|
||||
#define EVENT_REQ(NAME, REQUEST)\
|
||||
void GuiRemoteProtocolFromJsonChannel::OnReceive_Event_ ## NAME (Ptr<glr::json::JsonNode> jsonArguments)\
|
||||
{\
|
||||
REQUEST arguments;\
|
||||
ConvertJsonToCustomType(jsonArguments, arguments);\
|
||||
events->On ## NAME(arguments);\
|
||||
}\
|
||||
|
||||
#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST)
|
||||
GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER)
|
||||
#undef EVENT_HANDLER
|
||||
#undef EVENT_REQ
|
||||
#undef EVENT_NOREQ
|
||||
|
||||
#define MESSAGE_NORES(NAME, RESPONSE)
|
||||
|
||||
#define MESSAGE_RES(NAME, RESPONSE)\
|
||||
void GuiRemoteProtocolFromJsonChannel::OnReceive_Response_ ## NAME (vint id, Ptr<glr::json::JsonNode> jsonArguments)\
|
||||
{\
|
||||
RESPONSE arguments;\
|
||||
ConvertJsonToCustomType(jsonArguments, arguments);\
|
||||
events->Respond ## NAME(id, arguments);\
|
||||
}\
|
||||
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_RES
|
||||
#undef MESSAGE_NORES
|
||||
|
||||
void GuiRemoteProtocolFromJsonChannel::OnReceive(const Ptr<glr::json::JsonObject>& package)
|
||||
{
|
||||
#define ERROR_MESSAGE_PREFIX L"vl::presentation::remoteprotocol::channeling::GuiRemoteProtocolFromJsonChannel::OnReceive(const Ptr<JsonNode>&)#"
|
||||
@@ -40614,55 +40650,35 @@ GuiRemoteProtocolFromJsonChannel
|
||||
Ptr<glr::json::JsonNode> jsonArguments;
|
||||
JsonChannelUnpack(package, semantic, id, name, jsonArguments);
|
||||
|
||||
#define EVENT_NOREQ(NAME, REQUEST)\
|
||||
if (name == L ## #NAME)\
|
||||
{\
|
||||
events->On ## NAME();\
|
||||
} else\
|
||||
|
||||
#define EVENT_REQ(NAME, REQUEST)\
|
||||
if (name == L ## #NAME)\
|
||||
{\
|
||||
REQUEST arguments;\
|
||||
ConvertJsonToCustomType(jsonArguments, arguments);\
|
||||
events->On ## NAME(arguments);\
|
||||
} else\
|
||||
|
||||
#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST)
|
||||
if (semantic == ChannelPackageSemantic::Event)
|
||||
{
|
||||
GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER)
|
||||
vint index = onReceiveEventHandlers.Keys().IndexOf(name);
|
||||
if (index == -1)
|
||||
{
|
||||
CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unrecognized event name");
|
||||
}
|
||||
else
|
||||
{
|
||||
(this->*onReceiveEventHandlers.Values()[index])(jsonArguments);
|
||||
}
|
||||
}
|
||||
else
|
||||
#undef EVENT_HANDLER
|
||||
#undef EVENT_REQ
|
||||
#undef EVENT_NOREQ
|
||||
|
||||
#define MESSAGE_NORES(NAME, RESPONSE)
|
||||
#define MESSAGE_RES(NAME, RESPONSE)\
|
||||
if (name == L ## #NAME)\
|
||||
{\
|
||||
RESPONSE arguments;\
|
||||
ConvertJsonToCustomType(jsonArguments, arguments);\
|
||||
events->Respond ## NAME(id, arguments);\
|
||||
} else\
|
||||
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE)
|
||||
if (semantic == ChannelPackageSemantic::Response)
|
||||
else if (semantic == ChannelPackageSemantic::Response)
|
||||
{
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
vint index = onReceiveResponseHandlers.Keys().IndexOf(name);
|
||||
if (index == -1)
|
||||
{
|
||||
CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unrecognized response name");
|
||||
}
|
||||
} else
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_RES
|
||||
#undef MESSAGE_NORES
|
||||
else
|
||||
{
|
||||
(this->*onReceiveResponseHandlers.Values()[index])(id, jsonArguments);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unrecognized category name");
|
||||
}
|
||||
|
||||
CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unrecognized category name");
|
||||
#undef ERROR_MESSAGE_PREFIX
|
||||
}
|
||||
|
||||
@@ -40709,6 +40725,21 @@ GuiRemoteProtocolFromJsonChannel
|
||||
GuiRemoteProtocolFromJsonChannel::GuiRemoteProtocolFromJsonChannel(IJsonChannel* _channel)
|
||||
: channel(_channel)
|
||||
{
|
||||
#define EVENT_NOREQ(NAME, REQUEST) onReceiveEventHandlers.Add(WString::Unmanaged(L ## #NAME), &GuiRemoteProtocolFromJsonChannel::OnReceive_Event_ ## NAME);
|
||||
#define EVENT_REQ(NAME, REQUEST) onReceiveEventHandlers.Add(WString::Unmanaged(L ## #NAME), &GuiRemoteProtocolFromJsonChannel::OnReceive_Event_ ## NAME);
|
||||
#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST)
|
||||
GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER)
|
||||
#undef EVENT_HANDLER
|
||||
#undef EVENT_REQ
|
||||
#undef EVENT_NOREQ
|
||||
|
||||
#define MESSAGE_NORES(NAME, RESPONSE)
|
||||
#define MESSAGE_RES(NAME, RESPONSE) onReceiveResponseHandlers.Add(WString::Unmanaged(L ## #NAME), &GuiRemoteProtocolFromJsonChannel::OnReceive_Response_ ## NAME);
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_RES
|
||||
#undef MESSAGE_NORES
|
||||
}
|
||||
|
||||
GuiRemoteProtocolFromJsonChannel::~GuiRemoteProtocolFromJsonChannel()
|
||||
@@ -40777,9 +40808,56 @@ GuiRemoteJsonChannelFromProtocol
|
||||
#undef MESSAGE_RES
|
||||
#undef MESSAGE_NORES
|
||||
|
||||
#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE)\
|
||||
void GuiRemoteJsonChannelFromProtocol::Write_ ## NAME(vint id, Ptr<glr::json::JsonNode> jsonArguments)\
|
||||
{\
|
||||
protocol->Request ## NAME();\
|
||||
}\
|
||||
|
||||
#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE)\
|
||||
void GuiRemoteJsonChannelFromProtocol::Write_ ## NAME(vint id, Ptr<glr::json::JsonNode> jsonArguments)\
|
||||
{\
|
||||
protocol->Request ## NAME(id);\
|
||||
}\
|
||||
|
||||
#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE)\
|
||||
void GuiRemoteJsonChannelFromProtocol::Write_ ## NAME(vint id, Ptr<glr::json::JsonNode> jsonArguments)\
|
||||
{\
|
||||
REQUEST arguments;\
|
||||
ConvertJsonToCustomType(jsonArguments, arguments);\
|
||||
protocol->Request ## NAME(arguments);\
|
||||
}\
|
||||
|
||||
#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE)\
|
||||
void GuiRemoteJsonChannelFromProtocol::Write_ ## NAME(vint id, Ptr<glr::json::JsonNode> jsonArguments)\
|
||||
{\
|
||||
REQUEST arguments;\
|
||||
ConvertJsonToCustomType(jsonArguments, arguments);\
|
||||
protocol->Request ## NAME(id, arguments);\
|
||||
}\
|
||||
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_REQ_RES
|
||||
#undef MESSAGE_REQ_NORES
|
||||
#undef MESSAGE_NOREQ_RES
|
||||
#undef MESSAGE_NOREQ_NORES
|
||||
|
||||
GuiRemoteJsonChannelFromProtocol::GuiRemoteJsonChannelFromProtocol(IGuiRemoteProtocol* _protocol)
|
||||
: protocol(_protocol)
|
||||
{
|
||||
#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE) writeHandlers.Add(WString::Unmanaged(L ## #NAME), &GuiRemoteJsonChannelFromProtocol::Write_ ## NAME);;
|
||||
#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE) writeHandlers.Add(WString::Unmanaged(L ## #NAME), &GuiRemoteJsonChannelFromProtocol::Write_ ## NAME);;
|
||||
#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE) writeHandlers.Add(WString::Unmanaged(L ## #NAME), &GuiRemoteJsonChannelFromProtocol::Write_ ## NAME);;
|
||||
#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE) writeHandlers.Add(WString::Unmanaged(L ## #NAME), &GuiRemoteJsonChannelFromProtocol::Write_ ## NAME);;
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_REQ_RES
|
||||
#undef MESSAGE_REQ_NORES
|
||||
#undef MESSAGE_NOREQ_RES
|
||||
#undef MESSAGE_NOREQ_NORES
|
||||
}
|
||||
|
||||
GuiRemoteJsonChannelFromProtocol::~GuiRemoteJsonChannelFromProtocol()
|
||||
@@ -40807,44 +40885,15 @@ GuiRemoteJsonChannelFromProtocol
|
||||
Ptr<glr::json::JsonNode> jsonArguments;
|
||||
JsonChannelUnpack(package, semantic, id, name, jsonArguments);
|
||||
|
||||
#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE)\
|
||||
if (name == L ## #NAME)\
|
||||
{\
|
||||
protocol->Request ## NAME();\
|
||||
} else\
|
||||
|
||||
#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE)\
|
||||
if (name == L ## #NAME)\
|
||||
{\
|
||||
protocol->Request ## NAME(id);\
|
||||
} else\
|
||||
|
||||
#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE)\
|
||||
if (name == L ## #NAME)\
|
||||
{\
|
||||
REQUEST arguments;\
|
||||
ConvertJsonToCustomType(jsonArguments, arguments);\
|
||||
protocol->Request ## NAME(arguments);\
|
||||
} else\
|
||||
|
||||
#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE)\
|
||||
if (name == L ## #NAME)\
|
||||
{\
|
||||
REQUEST arguments;\
|
||||
ConvertJsonToCustomType(jsonArguments, arguments);\
|
||||
protocol->Request ## NAME(id, arguments);\
|
||||
} else\
|
||||
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
vint index = writeHandlers.Keys().IndexOf(name);
|
||||
if (index == -1)
|
||||
{
|
||||
CHECK_FAIL(ERROR_MESSAGE_PREFIX L"Unrecognized request name");
|
||||
}
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_REQ_RES
|
||||
#undef MESSAGE_REQ_NORES
|
||||
#undef MESSAGE_NOREQ_RES
|
||||
#undef MESSAGE_NOREQ_NORES
|
||||
else
|
||||
{
|
||||
(this->*writeHandlers.Values()[index])(id, jsonArguments);
|
||||
}
|
||||
|
||||
#undef ERROR_MESSAGE_PREFIX
|
||||
}
|
||||
@@ -41946,7 +41995,11 @@ GuiRemoteWindow (INativeWindow)
|
||||
}
|
||||
for (auto l : listeners) l->AfterClosing();
|
||||
}
|
||||
remote->DestroyNativeWindow(this);
|
||||
|
||||
remote->AsyncService()->InvokeInMainThread(this, [this]()
|
||||
{
|
||||
remote->DestroyNativeWindow(this);
|
||||
});
|
||||
}
|
||||
|
||||
bool GuiRemoteWindow::IsVisible()
|
||||
@@ -42539,32 +42592,18 @@ namespace vl::presentation::remoteprotocol
|
||||
from.dom->children = Ptr(new List<Ptr<RenderingDom>>);
|
||||
for (vint childId : *to.children.Obj())
|
||||
{
|
||||
// Binary search in index for childId
|
||||
vint start = 0;
|
||||
vint end = index.Count() - 1;
|
||||
bool found = false;
|
||||
while (start <= end)
|
||||
{
|
||||
vint mid = (start + end) / 2;
|
||||
vint midId = index[mid].id;
|
||||
if (childId < midId)
|
||||
{
|
||||
end = mid - 1;
|
||||
}
|
||||
else if (childId > midId)
|
||||
{
|
||||
start = mid + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Fill parentId of the new DOM node
|
||||
index[mid].parentId = from.id;
|
||||
from.dom->children->Add(index[mid].dom);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
CHECK_ERROR(found, ERROR_MESSAGE_PREFIX L"Unknown DOM id in diff.");
|
||||
vint indexToInsert = 0;
|
||||
vint indexOfChild = BinarySearchLambda(
|
||||
&index[0],
|
||||
index.Count(),
|
||||
childId,
|
||||
indexToInsert,
|
||||
[](const DomIndexItem& item, vint id) { return item.id <=> id; }
|
||||
);
|
||||
CHECK_ERROR(indexOfChild != -1, ERROR_MESSAGE_PREFIX L"Unknown DOM id in diff.");
|
||||
|
||||
index[indexOfChild].parentId = from.id;
|
||||
from.dom->children->Add(index[indexOfChild].dom);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -44464,6 +44503,7 @@ namespace vl::presentation::remote_renderer
|
||||
|
||||
void GuiRemoteRendererSingle::UnregisterMainWindow()
|
||||
{
|
||||
UnregisterGlobalShortcutKeys();
|
||||
GetCurrentController()->CallbackService()->UninstallListener(this);
|
||||
}
|
||||
|
||||
@@ -44550,9 +44590,41 @@ namespace vl::presentation::remote_renderer
|
||||
* Rendering (Commands)
|
||||
***********************************************************************/
|
||||
|
||||
void GuiRemoteRendererSingle::UnregisterGlobalShortcutKeys()
|
||||
{
|
||||
auto inputService = GetCurrentController()->InputService();
|
||||
for (vint id : globalShortcuts.Keys())
|
||||
{
|
||||
inputService->UnregisterGlobalShortcutKey(id);
|
||||
}
|
||||
globalShortcuts.Clear();
|
||||
|
||||
}
|
||||
|
||||
void GuiRemoteRendererSingle::GlobalShortcutKeyActivated(vint id)
|
||||
{
|
||||
vint index = globalShortcuts.Keys().IndexOf(id);
|
||||
if (index != -1)
|
||||
{
|
||||
events->OnIOGlobalShortcutKey(globalShortcuts.Values()[index].id);
|
||||
}
|
||||
}
|
||||
|
||||
void GuiRemoteRendererSingle::RequestIOUpdateGlobalShortcutKey(const Ptr<collections::List<remoteprotocol::GlobalShortcutKey>>& arguments)
|
||||
{
|
||||
CHECK_ERROR(arguments->Count() == 0, L"Not Implemented");
|
||||
UnregisterGlobalShortcutKeys();
|
||||
if (arguments)
|
||||
{
|
||||
auto inputService = GetCurrentController()->InputService();
|
||||
for (auto&& shortcut : *arguments.Obj())
|
||||
{
|
||||
vint id = inputService->RegisterGlobalShortcutKey(shortcut.ctrl, shortcut.shift, shortcut.alt, shortcut.code);
|
||||
if (id != -1)
|
||||
{
|
||||
globalShortcuts.Add(id, shortcut);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GuiRemoteRendererSingle::RequestIORequireCapture()
|
||||
@@ -44653,10 +44725,12 @@ namespace vl::presentation::remote_renderer
|
||||
|
||||
void GuiRemoteRendererSingle::HorizontalWheel(const NativeWindowMouseInfo& info)
|
||||
{
|
||||
events->OnIOHWheel(info);
|
||||
}
|
||||
|
||||
void GuiRemoteRendererSingle::VerticalWheel(const NativeWindowMouseInfo& info)
|
||||
{
|
||||
events->OnIOVWheel(info);
|
||||
}
|
||||
|
||||
void GuiRemoteRendererSingle::MouseMoving(const NativeWindowMouseInfo& info)
|
||||
|
||||
106
Import/GacUI.h
106
Import/GacUI.h
@@ -23556,17 +23556,6 @@ Serialization
|
||||
String Transformation
|
||||
***********************************************************************/
|
||||
|
||||
template<typename TFrom, typename TTo>
|
||||
static void ConvertUtfString(const ObjectString<TFrom>& source, ObjectString<TTo>& dest)
|
||||
{
|
||||
vint len = _utftoutf<TFrom, TTo>(source.Buffer(), nullptr, 0);
|
||||
if (len < 1) dest = {};
|
||||
TTo* buffer = new TTo[len];
|
||||
memset(buffer, 0, len * sizeof(TTo));
|
||||
_utftoutf<TFrom, TTo>(source.Buffer(), buffer, len);
|
||||
dest = ObjectString<TTo>::TakeOver(buffer, len - 1);
|
||||
}
|
||||
|
||||
template<typename TFrom, typename TTo>
|
||||
struct UtfStringSerializer
|
||||
{
|
||||
@@ -24126,8 +24115,32 @@ GuiRemoteProtocolFromJsonChannel
|
||||
, protected IJsonChannelReceiver
|
||||
{
|
||||
protected:
|
||||
IJsonChannel* channel = nullptr;
|
||||
IGuiRemoteProtocolEvents* events = nullptr;
|
||||
IJsonChannel* channel = nullptr;
|
||||
IGuiRemoteProtocolEvents* events = nullptr;
|
||||
|
||||
using OnReceiveEventHandler = void (GuiRemoteProtocolFromJsonChannel::*)(Ptr<glr::json::JsonNode>);
|
||||
using OnReceiveEventHandlerMap = collections::Dictionary<WString, OnReceiveEventHandler>;
|
||||
OnReceiveEventHandlerMap onReceiveEventHandlers;
|
||||
|
||||
using OnReceiveResponseHandler = void (GuiRemoteProtocolFromJsonChannel::*)(vint, Ptr<glr::json::JsonNode>);
|
||||
using OnReceiveResponseHandlerMap = collections::Dictionary<WString, OnReceiveResponseHandler>;
|
||||
OnReceiveResponseHandlerMap onReceiveResponseHandlers;
|
||||
|
||||
#define EVENT_NOREQ(NAME, REQUEST) void OnReceive_Event_ ## NAME (Ptr<glr::json::JsonNode> jsonArguments);
|
||||
#define EVENT_REQ(NAME, REQUEST) void OnReceive_Event_ ## NAME (Ptr<glr::json::JsonNode> jsonArguments);
|
||||
#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST)
|
||||
GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER)
|
||||
#undef EVENT_HANDLER
|
||||
#undef EVENT_REQ
|
||||
#undef EVENT_NOREQ
|
||||
|
||||
#define MESSAGE_NORES(NAME, RESPONSE)
|
||||
#define MESSAGE_RES(NAME, RESPONSE) void OnReceive_Response_ ## NAME (vint id, Ptr<glr::json::JsonNode> jsonArguments);
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_RES
|
||||
#undef MESSAGE_NORES
|
||||
|
||||
void OnReceive(const Ptr<glr::json::JsonObject>& package) override;
|
||||
|
||||
@@ -24169,7 +24182,7 @@ GuiRemoteJsonChannelFromProtocol
|
||||
|
||||
#define EVENT_NOREQ(NAME, REQUEST) void On ## NAME() override;
|
||||
#define EVENT_REQ(NAME, REQUEST) void On ## NAME(const REQUEST& arguments) override;
|
||||
#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST)
|
||||
#define EVENT_HANDLER(NAME, REQUEST, REQTAG, ...) EVENT_ ## REQTAG(NAME, REQUEST)
|
||||
GACUI_REMOTEPROTOCOL_EVENTS(EVENT_HANDLER)
|
||||
#undef EVENT_HANDLER
|
||||
#undef EVENT_REQ
|
||||
@@ -24178,10 +24191,29 @@ GuiRemoteJsonChannelFromProtocol
|
||||
#define MESSAGE_NORES(NAME, RESPONSE)
|
||||
#define MESSAGE_RES(NAME, RESPONSE) void Respond ## NAME(vint id, const RESPONSE& arguments) override;
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## RESTAG(NAME, RESPONSE)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_RES
|
||||
#undef MESSAGE_NORES
|
||||
|
||||
protected:
|
||||
|
||||
using WriteHandler = void (GuiRemoteJsonChannelFromProtocol::*)(vint, Ptr<glr::json::JsonNode>);
|
||||
using WriteHandlerMap = collections::Dictionary<WString, WriteHandler>;
|
||||
WriteHandlerMap writeHandlers;
|
||||
|
||||
#define MESSAGE_NOREQ_NORES(NAME, REQUEST, RESPONSE) void Write_ ## NAME (vint id, Ptr<glr::json::JsonNode> jsonArguments);
|
||||
#define MESSAGE_NOREQ_RES(NAME, REQUEST, RESPONSE) void Write_ ## NAME (vint id, Ptr<glr::json::JsonNode> jsonArguments);
|
||||
#define MESSAGE_REQ_NORES(NAME, REQUEST, RESPONSE) void Write_ ## NAME (vint id, Ptr<glr::json::JsonNode> jsonArguments);
|
||||
#define MESSAGE_REQ_RES(NAME, REQUEST, RESPONSE) void Write_ ## NAME (vint id, Ptr<glr::json::JsonNode> jsonArguments);
|
||||
#define MESSAGE_HANDLER(NAME, REQUEST, RESPONSE, REQTAG, RESTAG, ...) MESSAGE_ ## REQTAG ## _ ## RESTAG(NAME, REQUEST, RESPONSE)
|
||||
GACUI_REMOTEPROTOCOL_MESSAGES(MESSAGE_HANDLER)
|
||||
#undef MESSAGE_HANDLER
|
||||
#undef MESSAGE_REQ_RES
|
||||
#undef MESSAGE_REQ_NORES
|
||||
#undef MESSAGE_NOREQ_RES
|
||||
#undef MESSAGE_NOREQ_NORES
|
||||
|
||||
public:
|
||||
|
||||
GuiRemoteJsonChannelFromProtocol(IGuiRemoteProtocol* _protocol);
|
||||
@@ -24644,6 +24676,14 @@ namespace vl::presentation::remote_renderer
|
||||
void RenderingAsActivated() override;
|
||||
void RenderingAsDeactivated() override;
|
||||
|
||||
protected:
|
||||
using GlobalShortcutMap = collections::Dictionary<vint, remoteprotocol::GlobalShortcutKey>;
|
||||
|
||||
GlobalShortcutMap globalShortcuts;
|
||||
|
||||
void UnregisterGlobalShortcutKeys();
|
||||
void GlobalShortcutKeyActivated(vint id) override;
|
||||
|
||||
protected:
|
||||
struct SolidLabelMeasuring
|
||||
{
|
||||
@@ -25803,23 +25843,37 @@ Vczh Library++ 3.0
|
||||
Developer: Zihan Chen(vczh)
|
||||
GacUI Header Files and Common Namespaces
|
||||
|
||||
Global Objects:
|
||||
Resource:
|
||||
vl::reflection::description:: GetGlobalTypeManager
|
||||
vl::presentation:: GetParserManager
|
||||
vl::presentation:: GetResourceResolverManager
|
||||
vl::presentation:: GetCurrentController
|
||||
vl::presentation:: GetInstanceLoaderManager
|
||||
vl::presentation::elements:: GetGuiGraphicsResourceManager
|
||||
vl::presentation::controls:: GetApplication
|
||||
vl::presentation::controls:: GetPluginManager
|
||||
vl::presentation::theme:: GetCurrentTheme
|
||||
vl::presentation:: GetResourceResolverManager
|
||||
vl::presentation:: GetResourceManager
|
||||
|
||||
vl::presentation::windows:: GetDirect2DFactory
|
||||
vl::presentation::windows:: GetDirectWriteFactory
|
||||
vl::presentation::elements_windows_gdi:: GetWindowsGDIResourceManager
|
||||
vl::presentation::elements_windows_gdi:: GetWindowsGDIObjectProvider
|
||||
Platform:
|
||||
vl::presentation:: GetCurrentController
|
||||
vl::presentation:: GetNativeServiceSubstitution
|
||||
vl::presentation::elements:: GetGuiGraphicsResourceManager
|
||||
vl::presentation::IGuiHostedApplication:: GetHostedApplication
|
||||
|
||||
GacUI:
|
||||
vl::presentation::controls:: GetApplication
|
||||
vl::presentation::theme:: GetCurrentTheme
|
||||
vl::presentation:: GetInstanceLoaderManager
|
||||
vl::presentation:: Workflow_GetSharedManager
|
||||
|
||||
Windows:
|
||||
vl::presentation::windows:: GetD3D11Device
|
||||
vl::presentation::elements_windows_d2d:: GetWindowsDirect2DResourceManager
|
||||
vl::presentation::elements_windows_d2d:: GetWindowsDirect2DObjectProvider
|
||||
{
|
||||
vl::presentation::windows:: GetDirect2DFactory
|
||||
vl::presentation::windows:: GetDirectWriteFactory
|
||||
}
|
||||
vl::presentation::elements_windows_gdi:: GetWindowsGDIResourceManager
|
||||
vl::presentation::elements_windows_gdi:: GetWindowsGDIObjectProvider
|
||||
vl::presentation::windows:: GetWindowsNativeController
|
||||
|
||||
***********************************************************************/
|
||||
|
||||
#ifndef VCZH_PRESENTATION_GACUI
|
||||
|
||||
@@ -698,7 +698,7 @@ String Conversions (buffer walkthrough)
|
||||
template vint _utftoutf<wchar_t, char32_t>(const wchar_t* s, char32_t* d, vint chars);
|
||||
|
||||
/***********************************************************************
|
||||
String Conversions (direct)
|
||||
String Conversions (ObjectString)
|
||||
***********************************************************************/
|
||||
|
||||
template<typename TFrom, typename TTo, vint(*Convert)(const TFrom*, TTo*, vint)>
|
||||
@@ -711,6 +711,75 @@ String Conversions (direct)
|
||||
Convert(source.Buffer(), buffer, len);
|
||||
return ObjectString<TTo>::TakeOver(buffer, len - 1);
|
||||
}
|
||||
|
||||
template<typename TFrom, typename TTo>
|
||||
ObjectString<TTo> ConvertUtfString(const ObjectString<TFrom>& source)
|
||||
{
|
||||
return ConvertStringDirect<TFrom, TTo, _utftoutf<TFrom, TTo>>(source);
|
||||
}
|
||||
|
||||
#if defined VCZH_WCHAR_UTF16
|
||||
template<>
|
||||
ObjectString<char16_t> ConvertUtfString<wchar_t, char16_t>(const ObjectString<wchar_t>& source)
|
||||
{
|
||||
return ObjectString<char16_t>::UnsafeCastFrom<wchar_t>(source);
|
||||
}
|
||||
template<>
|
||||
ObjectString<wchar_t> ConvertUtfString<char16_t, wchar_t>(const ObjectString<char16_t>& source)
|
||||
{
|
||||
return ObjectString<wchar_t>::UnsafeCastFrom<char16_t>(source);
|
||||
}
|
||||
template ObjectString<wchar_t> ConvertUtfString<char32_t, wchar_t>(const ObjectString<char32_t>& source);
|
||||
template ObjectString<char32_t> ConvertUtfString<wchar_t, char32_t>(const ObjectString<wchar_t>& source);
|
||||
#elif defined VCZH_WCHAR_UTF32
|
||||
template<>
|
||||
ObjectString<char32_t> ConvertUtfString<wchar_t, char32_t>(const ObjectString<wchar_t>& source)
|
||||
{
|
||||
return ObjectString<char32_t>::UnsafeCastFrom<wchar_t>(source);
|
||||
}
|
||||
template<>
|
||||
ObjectString<wchar_t> ConvertUtfString<char32_t, wchar_t>(const ObjectString<char32_t>& source)
|
||||
{
|
||||
return ObjectString<wchar_t>::UnsafeCastFrom<char32_t>(source);
|
||||
}
|
||||
template ObjectString<char16_t> ConvertUtfString<wchar_t, char16_t>(const ObjectString<wchar_t>& source);
|
||||
template ObjectString<wchar_t> ConvertUtfString<char16_t, wchar_t>(const ObjectString<char16_t>& source);
|
||||
#endif
|
||||
|
||||
template ObjectString<char8_t> ConvertUtfString<wchar_t, char8_t>(const ObjectString<wchar_t>& source);
|
||||
template ObjectString<wchar_t> ConvertUtfString<char8_t, wchar_t>(const ObjectString<char8_t>& source);
|
||||
template ObjectString<char16_t> ConvertUtfString<char8_t, char16_t>(const ObjectString<char8_t>& source);
|
||||
template ObjectString<char8_t> ConvertUtfString<char16_t, char8_t>(const ObjectString<char16_t>& source);
|
||||
|
||||
template ObjectString<char8_t> ConvertUtfString<char32_t, char8_t>(const ObjectString<char32_t>& source);
|
||||
template ObjectString<char16_t> ConvertUtfString<char32_t, char16_t>(const ObjectString<char32_t>& source);
|
||||
template ObjectString<char32_t> ConvertUtfString<char8_t, char32_t>(const ObjectString<char8_t>& source);
|
||||
template ObjectString<char32_t> ConvertUtfString<char16_t, char32_t>(const ObjectString<char16_t>& source);
|
||||
|
||||
template<typename TFrom, typename TTo>
|
||||
void ConvertUtfString(const ObjectString<TFrom>& source, ObjectString<TTo>& dest)
|
||||
{
|
||||
dest = ConvertUtfString<TFrom, TTo>(source);
|
||||
}
|
||||
|
||||
template void ConvertUtfString<wchar_t, char8_t>(const ObjectString<wchar_t>& source, ObjectString<char8_t>& dest);
|
||||
template void ConvertUtfString<wchar_t, char16_t>(const ObjectString<wchar_t>& source, ObjectString<char16_t>& dest);
|
||||
template void ConvertUtfString<char8_t, wchar_t>(const ObjectString<char8_t>& source, ObjectString<wchar_t>& dest);
|
||||
template void ConvertUtfString<char8_t, char16_t>(const ObjectString<char8_t>& source, ObjectString<char16_t>& dest);
|
||||
template void ConvertUtfString<char16_t, wchar_t>(const ObjectString<char16_t>& source, ObjectString<wchar_t>& dest);
|
||||
template void ConvertUtfString<char16_t, char8_t>(const ObjectString<char16_t>& source, ObjectString<char8_t>& dest);
|
||||
|
||||
template void ConvertUtfString<char32_t, char8_t>(const ObjectString<char32_t>& source, ObjectString<char8_t>& dest);
|
||||
template void ConvertUtfString<char32_t, char16_t>(const ObjectString<char32_t>& source, ObjectString<char16_t>& dest);
|
||||
template void ConvertUtfString<char32_t, wchar_t>(const ObjectString<char32_t>& source, ObjectString<wchar_t>& dest);
|
||||
template void ConvertUtfString<char8_t, char32_t>(const ObjectString<char8_t>& source, ObjectString<char32_t>& dest);
|
||||
template void ConvertUtfString<char16_t, char32_t>(const ObjectString<char16_t>& source, ObjectString<char32_t>& dest);
|
||||
template void ConvertUtfString<wchar_t, char32_t>(const ObjectString<wchar_t>& source, ObjectString<char32_t>& dest);
|
||||
|
||||
/***********************************************************************
|
||||
String Conversions (direct)
|
||||
***********************************************************************/
|
||||
|
||||
#if defined VCZH_WCHAR_UTF16
|
||||
U32String wtou32 (const WString& source) { return ConvertStringDirect<wchar_t, char32_t, _utftoutf<wchar_t, char32_t>>(source); }
|
||||
WString u32tow (const U32String& source) { return ConvertStringDirect<char32_t, wchar_t, _utftoutf<char32_t, wchar_t>>(source); }
|
||||
|
||||
153
Import/Vlpp.h
153
Import/Vlpp.h
@@ -2270,6 +2270,72 @@ List
|
||||
/***********************************************************************
|
||||
SortedList
|
||||
***********************************************************************/
|
||||
|
||||
/// <summary>Get the position of an element in an array by performing binary search.</summary>
|
||||
/// <typeparam name="T">Type of elements in the array.</typeparam>
|
||||
/// <typeparam name="K">Type of the element to find.</typeparam>
|
||||
/// <typeparam name="F">The comparison function.</typeparam>
|
||||
/// <returns>Returns the position. Returns -1 if it does not exist.</returns>
|
||||
/// <param name="buffer">The array to find in.</param>
|
||||
/// <param name="count">The number of elements in the array.</param>
|
||||
/// <param name="item">The element to find.</param>
|
||||
/// <param name="index">
|
||||
/// If the element exist, this argument returns one of the element that equals to the specified value.
|
||||
/// If the element doesn not exist,
|
||||
/// this argument returns either the greatest element that less than the specified value,
|
||||
/// or the least element that greater than the specified value.
|
||||
/// </param>
|
||||
/// <param name="orderer">The comparar for two elements returning std::(strong|weak)_ordering.</param>
|
||||
template<typename T, typename K, typename F>
|
||||
vint BinarySearchLambda(const T* buffer, vint count, const K& item, vint& index, F&& orderer)
|
||||
{
|
||||
vint start = 0;
|
||||
vint end = count - 1;
|
||||
index = -1;
|
||||
while (start <= end)
|
||||
{
|
||||
index = start + (end - start) / 2;
|
||||
auto ordering = orderer(buffer[index], item);
|
||||
if constexpr (!std::is_same_v<decltype(ordering), std::partial_ordering>)
|
||||
{
|
||||
// VS2022 seems not happy with
|
||||
// requires(!std::is_same_v<decltype(std::declval<F>()(std::declval<T>(), std::declval<K>())), std::partial_ordering>)
|
||||
CHECK_ERROR(ordering != std::partial_ordering::unordered, L"vl::collections::BinarySearchLambda<T, K, F>(const T*, vint, const K&, vint&, F&&)#This function could not apply on elements in partial ordering.");
|
||||
}
|
||||
|
||||
if (ordering < 0)
|
||||
{
|
||||
start = index + 1;
|
||||
}
|
||||
else if (ordering > 0)
|
||||
{
|
||||
end = index - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
/// <summary>Get the position of an element in an array by performing binary search.</summary>
|
||||
/// <typeparam name="T">Type of elements in the array.</typeparam>
|
||||
/// <returns>Returns the position. Returns -1 if it does not exist.</returns>
|
||||
/// <param name="buffer">The array to find in.</param>
|
||||
/// <param name="count">The number of elements in the array.</param>
|
||||
/// <param name="item">The element to find.</param>
|
||||
/// <param name="index">
|
||||
/// If the element exist, this argument returns one of the element that equals to the specified value.
|
||||
/// If the element doesn not exist,
|
||||
/// this argument returns either the greatest element that less than the specified value,
|
||||
/// or the least element that greater than the specified value.
|
||||
/// </param>
|
||||
template<typename T>
|
||||
vint BinarySearchLambda2(const T* buffer, vint count, const T& item, vint& index)
|
||||
{
|
||||
return BinarySearchLambda<T, T>(buffer, count, item, index, [](const T& a, const T& b) { return a <=> b; });
|
||||
}
|
||||
|
||||
/// <summary>SortedList: linear container with dynamic size in runtime for ordered values. All elements are kept in order, and are contiguous in memory.</summary>
|
||||
/// <typeparam name="T">Type of elements.</typeparam>
|
||||
@@ -2279,45 +2345,10 @@ SortedList
|
||||
using K = typename KeyType<T>::Type;
|
||||
protected:
|
||||
|
||||
/// <summary>Get the position of an element in this list by performing binary search.</summary>
|
||||
/// <typeparam name="Key">Type of the element to find.</typeparam>
|
||||
/// <returns>Returns the position. Returns -1 if it does not exist.</returns>
|
||||
/// <param name="item">The element to find.</param>
|
||||
/// <param name="index">
|
||||
/// If the element exist, this argument returns one of the element that equals to the specified value.
|
||||
/// If the element doesn not exist,
|
||||
/// this argument returns either the greatest element that less than the specified value,
|
||||
/// or the lest element that greater than the specified value.
|
||||
/// </param>
|
||||
template<typename Key>
|
||||
vint IndexOfInternal(const Key& item, vint& index)const
|
||||
{
|
||||
vint start = 0;
|
||||
vint end = this->count - 1;
|
||||
index = -1;
|
||||
while (start <= end)
|
||||
{
|
||||
index = start + (end - start) / 2;
|
||||
auto ordering = this->buffer[index] <=> item;
|
||||
if constexpr (std::is_same_v<decltype(ordering), std::partial_ordering>)
|
||||
{
|
||||
CHECK_ERROR(ordering != std::partial_ordering::unordered, L"vl::collections::SortedList<T>::IndexOfInternal(Key&, vint&)#This function could not apply on elements in partial ordering.");
|
||||
}
|
||||
|
||||
if (ordering < 0)
|
||||
{
|
||||
start = index + 1;
|
||||
}
|
||||
else if (ordering > 0)
|
||||
{
|
||||
end = index - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
return index;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return BinarySearchLambda<T, Key>(this->buffer, this->count, item, index, [](const T& a, const Key& b) { return a <=> b; });
|
||||
}
|
||||
|
||||
vint Insert(vint index, const T& item)
|
||||
@@ -9076,6 +9107,56 @@ String Conversions (buffer walkthrough)
|
||||
extern template vint _utftoutf<char16_t, char32_t>(const char16_t* s, char32_t* d, vint chars);
|
||||
extern template vint _utftoutf<wchar_t, char32_t>(const wchar_t* s, char32_t* d, vint chars);
|
||||
|
||||
/***********************************************************************
|
||||
String Conversions (ObjectString)
|
||||
***********************************************************************/
|
||||
|
||||
template<typename TFrom, typename TTo>
|
||||
ObjectString<TTo> ConvertUtfString(const ObjectString<TFrom>& source);
|
||||
|
||||
#if defined VCZH_WCHAR_UTF16
|
||||
template<>
|
||||
ObjectString<char16_t> ConvertUtfString<wchar_t, char16_t>(const ObjectString<wchar_t>& source);
|
||||
template<>
|
||||
ObjectString<wchar_t> ConvertUtfString<char16_t, wchar_t>(const ObjectString<char16_t>& source);
|
||||
extern template ObjectString<wchar_t> ConvertUtfString<char32_t, wchar_t>(const ObjectString<char32_t>& source);
|
||||
extern template ObjectString<char32_t> ConvertUtfString<wchar_t, char32_t>(const ObjectString<wchar_t>& source);
|
||||
#elif defined VCZH_WCHAR_UTF32
|
||||
template<>
|
||||
ObjectString<char32_t> ConvertUtfString<wchar_t, char32_t>(const ObjectString<wchar_t>& source);
|
||||
template<>
|
||||
ObjectString<wchar_t> ConvertUtfString<char32_t, wchar_t>(const ObjectString<char32_t>& source);
|
||||
extern template ObjectString<char16_t> ConvertUtfString<wchar_t, char16_t>(const ObjectString<wchar_t>& source);
|
||||
extern template ObjectString<wchar_t> ConvertUtfString<char16_t, wchar_t>(const ObjectString<char16_t>& source);
|
||||
#endif
|
||||
|
||||
extern template ObjectString<char8_t> ConvertUtfString<wchar_t, char8_t>(const ObjectString<wchar_t>& source);
|
||||
extern template ObjectString<wchar_t> ConvertUtfString<char8_t, wchar_t>(const ObjectString<char8_t>& source);
|
||||
extern template ObjectString<char16_t> ConvertUtfString<char8_t, char16_t>(const ObjectString<char8_t>& source);
|
||||
extern template ObjectString<char8_t> ConvertUtfString<char16_t, char8_t>(const ObjectString<char16_t>& source);
|
||||
|
||||
extern template ObjectString<char8_t> ConvertUtfString<char32_t, char8_t>(const ObjectString<char32_t>& source);
|
||||
extern template ObjectString<char16_t> ConvertUtfString<char32_t, char16_t>(const ObjectString<char32_t>& source);
|
||||
extern template ObjectString<char32_t> ConvertUtfString<char8_t, char32_t>(const ObjectString<char8_t>& source);
|
||||
extern template ObjectString<char32_t> ConvertUtfString<char16_t, char32_t>(const ObjectString<char16_t>& source);
|
||||
|
||||
template<typename TFrom, typename TTo>
|
||||
void ConvertUtfString(const ObjectString<TFrom>& source, ObjectString<TTo>& dest);
|
||||
|
||||
extern template void ConvertUtfString<wchar_t, char8_t>(const ObjectString<wchar_t>&source, ObjectString<char8_t>& dest);
|
||||
extern template void ConvertUtfString<wchar_t, char16_t>(const ObjectString<wchar_t>&source, ObjectString<char16_t>& dest);
|
||||
extern template void ConvertUtfString<char8_t, wchar_t>(const ObjectString<char8_t>&source, ObjectString<wchar_t>& dest);
|
||||
extern template void ConvertUtfString<char8_t, char16_t>(const ObjectString<char8_t>&source, ObjectString<char16_t>& dest);
|
||||
extern template void ConvertUtfString<char16_t, wchar_t>(const ObjectString<char16_t>&source, ObjectString<wchar_t>& dest);
|
||||
extern template void ConvertUtfString<char16_t, char8_t>(const ObjectString<char16_t>&source, ObjectString<char8_t>& dest);
|
||||
|
||||
extern template void ConvertUtfString<char32_t, char8_t>(const ObjectString<char32_t>&source, ObjectString<char8_t>& dest);
|
||||
extern template void ConvertUtfString<char32_t, char16_t>(const ObjectString<char32_t>&source, ObjectString<char16_t>& dest);
|
||||
extern template void ConvertUtfString<char32_t, wchar_t>(const ObjectString<char32_t>&source, ObjectString<wchar_t>& dest);
|
||||
extern template void ConvertUtfString<char8_t, char32_t>(const ObjectString<char8_t>&source, ObjectString<char32_t>& dest);
|
||||
extern template void ConvertUtfString<char16_t, char32_t>(const ObjectString<char16_t>&source, ObjectString<char32_t>& dest);
|
||||
extern template void ConvertUtfString<wchar_t, char32_t>(const ObjectString<wchar_t>&source, ObjectString<char32_t>& dest);
|
||||
|
||||
/***********************************************************************
|
||||
String Conversions (Utf)
|
||||
***********************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user