mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:07:45 +00:00
Userland: Change IPC funcs to use plain arguments instead of a struct
Instead of having a single overloaded handle method each method gets its own unique method name now.
This commit is contained in:
parent
d47f15ab8b
commit
065040872f
50 changed files with 897 additions and 839 deletions
|
@ -27,7 +27,7 @@ private:
|
|||
: IPC::ServerConnection<ClipboardClientEndpoint, ClipboardServerEndpoint>(*this, "/tmp/portal/clipboard")
|
||||
{
|
||||
}
|
||||
virtual void handle(const Messages::ClipboardClient::ClipboardDataChanged&) override;
|
||||
virtual void clipboard_data_changed(String const& mime_type) override;
|
||||
};
|
||||
|
||||
Clipboard& Clipboard::the()
|
||||
|
@ -78,11 +78,11 @@ void Clipboard::set_data(ReadonlyBytes data, const String& type, const HashMap<S
|
|||
connection().send_sync<Messages::ClipboardServer::SetClipboardData>(move(buffer), type, metadata);
|
||||
}
|
||||
|
||||
void ClipboardServerConnection::handle(const Messages::ClipboardClient::ClipboardDataChanged& message)
|
||||
void ClipboardServerConnection::clipboard_data_changed(String const& mime_type)
|
||||
{
|
||||
auto& clipboard = Clipboard::the();
|
||||
if (clipboard.on_change)
|
||||
clipboard.on_change(message.mime_type());
|
||||
clipboard.on_change(mime_type);
|
||||
}
|
||||
|
||||
RefPtr<Gfx::Bitmap> Clipboard::bitmap() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue