mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 21:58:10 +00:00
Kernel+LibC: Rename shared buffer syscalls to use a prefix
This feels a lot more consistent and Unixy: create_shared_buffer() => shbuf_create() share_buffer_with() => shbuf_allow_pid() share_buffer_globally() => shbuf_allow_all() get_shared_buffer() => shbuf_get() release_shared_buffer() => shbuf_release() seal_shared_buffer() => shbuf_seal() get_shared_buffer_size() => shbuf_get_size() Also, "shared_buffer_id" is shortened to "shbuf_id" all around.
This commit is contained in:
parent
8460d02651
commit
f72e5bbb17
36 changed files with 549 additions and 549 deletions
|
@ -46,9 +46,9 @@ Clipboard::Clipboard()
|
|||
Clipboard::DataAndType Clipboard::data_and_type() const
|
||||
{
|
||||
auto response = WindowServerConnection::the().send_sync<Messages::WindowServer::GetClipboardContents>();
|
||||
if (response->shared_buffer_id() < 0)
|
||||
if (response->shbuf_id() < 0)
|
||||
return {};
|
||||
auto shared_buffer = SharedBuffer::create_from_shared_buffer_id(response->shared_buffer_id());
|
||||
auto shared_buffer = SharedBuffer::create_from_shbuf_id(response->shbuf_id());
|
||||
if (!shared_buffer) {
|
||||
dbgprintf("GUI::Clipboard::data() failed to attach to the shared buffer\n");
|
||||
return {};
|
||||
|
@ -76,7 +76,7 @@ void Clipboard::set_data(const StringView& data, const String& type)
|
|||
shared_buffer->seal();
|
||||
shared_buffer->share_with(WindowServerConnection::the().server_pid());
|
||||
|
||||
WindowServerConnection::the().send_sync<Messages::WindowServer::SetClipboardContents>(shared_buffer->shared_buffer_id(), data.length(), type);
|
||||
WindowServerConnection::the().send_sync<Messages::WindowServer::SetClipboardContents>(shared_buffer->shbuf_id(), data.length(), type);
|
||||
}
|
||||
|
||||
void Clipboard::did_receive_clipboard_contents_changed(Badge<WindowServerConnection>, const String& data_type)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue