mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 12:45:07 +00:00

This was pretty straightforward thanks to the work I did separating out LibCore from LibGUI already. :^) - WSMessageLoop now inherits from CEventLoop. - WSMessage now inherits from CEvent. - WSMessageReceiver goes away. Now there is only one event loop in Serenity. Very nice!
27 lines
461 B
C++
27 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 byte* data() const;
|
|
int size() const;
|
|
|
|
void clear();
|
|
void set_data(Retained<SharedBuffer>&&, int contents_size);
|
|
|
|
private:
|
|
WSClipboard();
|
|
|
|
RetainPtr<SharedBuffer> m_shared_buffer;
|
|
int m_contents_size { 0 };
|
|
};
|