Plan clipboard text actions in app core
This commit is contained in:
@@ -63,6 +63,9 @@ void webgl_sync();
|
||||
|
||||
std::string App::clipboard_get_text()
|
||||
{
|
||||
if (pp::app::plan_clipboard_read() != pp::app::ClipboardReadAction::read_text)
|
||||
return {};
|
||||
|
||||
#if _WIN32
|
||||
return win32_clipboard_get_text();
|
||||
#elif __IOS__
|
||||
@@ -76,6 +79,9 @@ std::string App::clipboard_get_text()
|
||||
|
||||
bool App::clipboard_set_text(const std::string& s)
|
||||
{
|
||||
if (pp::app::plan_clipboard_write(s) != pp::app::ClipboardWriteAction::write_text)
|
||||
return false;
|
||||
|
||||
#if _WIN32
|
||||
return win32_clipboard_set_text(s);
|
||||
#elif __IOS__
|
||||
|
||||
Reference in New Issue
Block a user