ladybird/Servers/WindowServer/WSClipboard.h
Andreas Kling 27f699ef0c AK: Rename the common integer typedefs to make it obvious what they are.
These types can be picked up by including <AK/Types.h>:

* u8, u16, u32, u64 (unsigned)
* i8, i16, i32, i64 (signed)
2019-07-03 21:20:13 +02:00

28 lines
461 B
C++

#pragma once
#include <AK/AKString.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 };
};