mirror of
https://github.com/RGBCube/serenity
synced 2025-07-14 10:37:38 +00:00

This was a workaround to be able to build on case-insensitive file systems where it might get confused about <string.h> vs <String.h>. Let's just not support building that way, so String.h can have an objectively nicer name. :^)
27 lines
459 B
C++
27 lines
459 B
C++
#pragma once
|
|
|
|
#include <AK/String.h>
|
|
#include <SharedBuffer.h>
|
|
|
|
class WSClipboard {
|
|
public:
|
|
static WSClipboard& the();
|
|
~WSClipboard();
|
|
|
|
bool has_data() const
|
|
{
|
|
return m_shared_buffer;
|
|
}
|
|
|
|
const u8* data() const;
|
|
int size() const;
|
|
|
|
void clear();
|
|
void set_data(NonnullRefPtr<SharedBuffer>&&, int contents_size);
|
|
|
|
private:
|
|
WSClipboard();
|
|
|
|
RefPtr<SharedBuffer> m_shared_buffer;
|
|
int m_contents_size { 0 };
|
|
};
|