1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-20 12:45:07 +00:00
serenity/Servers/WindowServer/WSClipboard.h
Andreas Kling de184d0999 WindowServer: Port WindowServer to LibCore.
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!
2019-04-14 05:15:22 +02:00

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 };
};