[turbine] Cleanup
This commit is contained in:
parent
abcf2adc56
commit
9937a01042
@ -34,7 +34,7 @@ void setClipboardText(Context &ctx, ox::StringViewCR text) noexcept;
|
||||
|
||||
void setClipboardObject(Context &ctx, ox::UPtr<BaseClipboardObject> &&obj) noexcept;
|
||||
|
||||
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringView typeId) noexcept;
|
||||
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringViewCR typeId) noexcept;
|
||||
|
||||
template<typename T>
|
||||
ox::Result<T*> getClipboardObject(Context &ctx) noexcept {
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <ox/std/string.hpp>
|
||||
|
||||
#include <turbine/context.hpp>
|
||||
#include <turbine/clipboard.hpp>
|
||||
|
||||
namespace turbine {
|
||||
|
||||
@ -15,4 +16,8 @@ ox::String getClipboardText(Context&) noexcept {
|
||||
void setClipboardText(Context&, ox::StringViewCR) noexcept {
|
||||
}
|
||||
|
||||
ox::Result<BaseClipboardObject*> getClipboardData(Context&, ox::StringViewCR) noexcept {
|
||||
return ox::Error{1, "not implemented"};
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ void setClipboardObject(Context &ctx, ox::UPtr<BaseClipboardObject> &&obj) noexc
|
||||
ctx.clipboard = std::move(obj);
|
||||
}
|
||||
|
||||
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringView typeId) noexcept {
|
||||
ox::Result<BaseClipboardObject*> getClipboardData(Context &ctx, ox::StringViewCR typeId) noexcept {
|
||||
if (ctx.clipboard && ctx.clipboard->typeId() == typeId) {
|
||||
return ctx.clipboard.get();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user