mirror of
https://github.com/InstanceBrick/nightcap.git
synced 2026-10-23 10:01:01 +02:00
29 lines
741 B
C++
29 lines
741 B
C++
#ifndef MOCKTAIL_PLATFORM_TEXT_CLIPBOARD_H_
|
|
#define MOCKTAIL_PLATFORM_TEXT_CLIPBOARD_H_
|
|
|
|
#include <memory>
|
|
#include <string>
|
|
|
|
#include "mocktail/status.h"
|
|
|
|
namespace mocktail {
|
|
namespace platform {
|
|
|
|
// Main-thread platform boundary for UTF-8 clipboard text. Implementations and
|
|
// consumers must not log clipboard contents.
|
|
class TextClipboard {
|
|
public:
|
|
virtual ~TextClipboard() = default;
|
|
|
|
virtual Status ReadText(std::string* text) = 0;
|
|
virtual Status WriteText(const std::string& text) = 0;
|
|
};
|
|
|
|
// Creates the SDL3 clipboard adapter used by both XWayland and native Wayland.
|
|
std::unique_ptr<TextClipboard> CreateSdlTextClipboard();
|
|
|
|
} // namespace platform
|
|
} // namespace mocktail
|
|
|
|
#endif // MOCKTAIL_PLATFORM_TEXT_CLIPBOARD_H_
|