mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 10:19:03 +03:00
27f699ef0c
These types can be picked up by including <AK/Types.h>: * u8, u16, u32, u64 (unsigned) * i8, i16, i32, i64 (signed)
28 lines
461 B
C++
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 };
|
|
};
|