mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:57:36 +00:00
Userland: Use snake case names in .ipc files
This updates all .ipc files to have snake case names for IPC methods.
This commit is contained in:
parent
eb21aa65d1
commit
9e22e9ce88
36 changed files with 296 additions and 287 deletions
|
@ -1,6 +1,6 @@
|
||||||
endpoint LanguageClient
|
endpoint LanguageClient
|
||||||
{
|
{
|
||||||
AutoCompleteSuggestions(Vector<GUI::AutocompleteProvider::Entry> suggestions) =|
|
auto_complete_suggestions(Vector<GUI::AutocompleteProvider::Entry> suggestions) =|
|
||||||
DeclarationLocation(GUI::AutocompleteProvider::ProjectLocation location) =|
|
declaration_location(GUI::AutocompleteProvider::ProjectLocation location) =|
|
||||||
DeclarationsInDocument(String filename, Vector<GUI::AutocompleteProvider::Declaration> declarations) =|
|
declarations_in_document(String filename, Vector<GUI::AutocompleteProvider::Declaration> declarations) =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
endpoint LanguageServer
|
endpoint LanguageServer
|
||||||
{
|
{
|
||||||
Greet(String project_root) => ()
|
greet(String project_root) => ()
|
||||||
|
|
||||||
FileOpened(String filename, IPC::File file) =|
|
file_opened(String filename, IPC::File file) =|
|
||||||
FileEditInsertText(String filename, String text, i32 start_line, i32 start_column) =|
|
file_edit_insert_text(String filename, String text, i32 start_line, i32 start_column) =|
|
||||||
FileEditRemoveText(String filename, i32 start_line, i32 start_column, i32 end_line, i32 end_column) =|
|
file_edit_remove_text(String filename, i32 start_line, i32 start_column, i32 end_line, i32 end_column) =|
|
||||||
SetFileContent(String filename, String content) =|
|
set_file_content(String filename, String content) =|
|
||||||
|
|
||||||
AutoCompleteSuggestions(GUI::AutocompleteProvider::ProjectLocation location) =|
|
auto_complete_suggestions(GUI::AutocompleteProvider::ProjectLocation location) =|
|
||||||
SetAutoCompleteMode(String mode) =|
|
set_auto_complete_mode(String mode) =|
|
||||||
FindDeclaration(GUI::AutocompleteProvider::ProjectLocation location) =|
|
find_declaration(GUI::AutocompleteProvider::ProjectLocation location) =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,6 +24,24 @@ struct Parameter {
|
||||||
String name;
|
String name;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static String pascal_case(String const& identifier)
|
||||||
|
{
|
||||||
|
StringBuilder builder;
|
||||||
|
bool was_new_word = true;
|
||||||
|
for (auto ch : identifier) {
|
||||||
|
if (ch == '_') {
|
||||||
|
was_new_word = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (was_new_word) {
|
||||||
|
builder.append(toupper(ch));
|
||||||
|
was_new_word = false;
|
||||||
|
} else
|
||||||
|
builder.append(ch);
|
||||||
|
}
|
||||||
|
return builder.to_string();
|
||||||
|
}
|
||||||
|
|
||||||
struct Message {
|
struct Message {
|
||||||
String name;
|
String name;
|
||||||
bool is_synchronous { false };
|
bool is_synchronous { false };
|
||||||
|
@ -33,7 +51,7 @@ struct Message {
|
||||||
String response_name() const
|
String response_name() const
|
||||||
{
|
{
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
builder.append(name);
|
builder.append(pascal_case(name));
|
||||||
builder.append("Response");
|
builder.append("Response");
|
||||||
return builder.to_string();
|
return builder.to_string();
|
||||||
}
|
}
|
||||||
|
@ -45,21 +63,6 @@ struct Endpoint {
|
||||||
Vector<Message> messages;
|
Vector<Message> messages;
|
||||||
};
|
};
|
||||||
|
|
||||||
static String snake_case(String const& identifier)
|
|
||||||
{
|
|
||||||
StringBuilder builder;
|
|
||||||
bool was_new_word = true;
|
|
||||||
for (auto ch : identifier) {
|
|
||||||
if (!builder.is_empty() && isupper(ch) && !was_new_word) {
|
|
||||||
builder.append('_');
|
|
||||||
was_new_word = true;
|
|
||||||
} else if (!isupper(ch))
|
|
||||||
was_new_word = false;
|
|
||||||
builder.append(tolower(ch));
|
|
||||||
}
|
|
||||||
return builder.to_string();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_primitive_type(String const& type)
|
bool is_primitive_type(String const& type)
|
||||||
{
|
{
|
||||||
return (type == "u8" || type == "i8" || type == "u16" || type == "i16"
|
return (type == "u8" || type == "i8" || type == "u16" || type == "i16"
|
||||||
|
@ -73,7 +76,7 @@ String message_name(String const& endpoint, String& message, bool is_response)
|
||||||
builder.append("Messages::");
|
builder.append("Messages::");
|
||||||
builder.append(endpoint);
|
builder.append(endpoint);
|
||||||
builder.append("::");
|
builder.append("::");
|
||||||
builder.append(message);
|
builder.append(pascal_case(message));
|
||||||
if (is_response)
|
if (is_response)
|
||||||
builder.append("Response");
|
builder.append("Response");
|
||||||
return builder.to_string();
|
return builder.to_string();
|
||||||
|
@ -279,18 +282,20 @@ enum class MessageID : i32 {
|
||||||
|
|
||||||
message_ids.set(message.name, message_ids.size() + 1);
|
message_ids.set(message.name, message_ids.size() + 1);
|
||||||
message_generator.set("message.name", message.name);
|
message_generator.set("message.name", message.name);
|
||||||
|
message_generator.set("message.pascal_name", pascal_case(message.name));
|
||||||
message_generator.set("message.id", String::number(message_ids.size()));
|
message_generator.set("message.id", String::number(message_ids.size()));
|
||||||
|
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
@message.name@ = @message.id@,
|
@message.pascal_name@ = @message.id@,
|
||||||
)~~~");
|
)~~~");
|
||||||
if (message.is_synchronous) {
|
if (message.is_synchronous) {
|
||||||
message_ids.set(message.response_name(), message_ids.size() + 1);
|
message_ids.set(message.response_name(), message_ids.size() + 1);
|
||||||
message_generator.set("message.name", message.response_name());
|
message_generator.set("message.name", message.response_name());
|
||||||
|
message_generator.set("message.pascal_name", pascal_case(message.response_name()));
|
||||||
message_generator.set("message.id", String::number(message_ids.size()));
|
message_generator.set("message.id", String::number(message_ids.size()));
|
||||||
|
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
@message.name@ = @message.id@,
|
@message.pascal_name@ = @message.id@,
|
||||||
)~~~");
|
)~~~");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -333,12 +338,14 @@ enum class MessageID : i32 {
|
||||||
|
|
||||||
auto do_message = [&](const String& name, const Vector<Parameter>& parameters, const String& response_type = {}) {
|
auto do_message = [&](const String& name, const Vector<Parameter>& parameters, const String& response_type = {}) {
|
||||||
auto message_generator = endpoint_generator.fork();
|
auto message_generator = endpoint_generator.fork();
|
||||||
|
auto pascal_name = pascal_case(name);
|
||||||
message_generator.set("message.name", name);
|
message_generator.set("message.name", name);
|
||||||
|
message_generator.set("message.pascal_name", pascal_name);
|
||||||
message_generator.set("message.response_type", response_type);
|
message_generator.set("message.response_type", response_type);
|
||||||
message_generator.set("message.constructor", constructor_for_message(name, parameters));
|
message_generator.set("message.constructor", constructor_for_message(pascal_name, parameters));
|
||||||
|
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
class @message.name@ final : public IPC::Message {
|
class @message.pascal_name@ final : public IPC::Message {
|
||||||
public:
|
public:
|
||||||
)~~~");
|
)~~~");
|
||||||
|
|
||||||
|
@ -348,19 +355,19 @@ public:
|
||||||
)~~~");
|
)~~~");
|
||||||
|
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
@message.name@(decltype(nullptr)) : m_ipc_message_valid(false) { }
|
@message.pascal_name@(decltype(nullptr)) : m_ipc_message_valid(false) { }
|
||||||
@message.name@(@message.name@ const&) = default;
|
@message.pascal_name@(@message.pascal_name@ const&) = default;
|
||||||
@message.name@(@message.name@&&) = default;
|
@message.pascal_name@(@message.pascal_name@&&) = default;
|
||||||
@message.name@& operator=(@message.name@ const&) = default;
|
@message.pascal_name@& operator=(@message.pascal_name@ const&) = default;
|
||||||
@message.constructor@
|
@message.constructor@
|
||||||
virtual ~@message.name@() override {}
|
virtual ~@message.pascal_name@() override {}
|
||||||
|
|
||||||
virtual u32 endpoint_magic() const override { return @endpoint.magic@; }
|
virtual u32 endpoint_magic() const override { return @endpoint.magic@; }
|
||||||
virtual i32 message_id() const override { return (int)MessageID::@message.name@; }
|
virtual i32 message_id() const override { return (int)MessageID::@message.pascal_name@; }
|
||||||
static i32 static_message_id() { return (int)MessageID::@message.name@; }
|
static i32 static_message_id() { return (int)MessageID::@message.pascal_name@; }
|
||||||
virtual const char* message_name() const override { return "@endpoint.name@::@message.name@"; }
|
virtual const char* message_name() const override { return "@endpoint.name@::@message.pascal_name@"; }
|
||||||
|
|
||||||
static OwnPtr<@message.name@> decode(InputMemoryStream& stream, int sockfd)
|
static OwnPtr<@message.pascal_name@> decode(InputMemoryStream& stream, int sockfd)
|
||||||
{
|
{
|
||||||
IPC::Decoder decoder { stream, sockfd };
|
IPC::Decoder decoder { stream, sockfd };
|
||||||
)~~~");
|
)~~~");
|
||||||
|
@ -403,7 +410,7 @@ public:
|
||||||
message_generator.set("message.constructor_call_parameters", builder.build());
|
message_generator.set("message.constructor_call_parameters", builder.build());
|
||||||
|
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
return make<@message.name@>(@message.constructor_call_parameters@);
|
return make<@message.pascal_name@>(@message.constructor_call_parameters@);
|
||||||
}
|
}
|
||||||
)~~~");
|
)~~~");
|
||||||
|
|
||||||
|
@ -417,7 +424,7 @@ public:
|
||||||
IPC::MessageBuffer buffer;
|
IPC::MessageBuffer buffer;
|
||||||
IPC::Encoder stream(buffer);
|
IPC::Encoder stream(buffer);
|
||||||
stream << endpoint_magic();
|
stream << endpoint_magic();
|
||||||
stream << (int)MessageID::@message.name@;
|
stream << (int)MessageID::@message.pascal_name@;
|
||||||
)~~~");
|
)~~~");
|
||||||
|
|
||||||
for (auto& parameter : parameters) {
|
for (auto& parameter : parameters) {
|
||||||
|
@ -498,10 +505,11 @@ public:
|
||||||
return_type = message_name(endpoint.name, message.name, true);
|
return_type = message_name(endpoint.name, message.name, true);
|
||||||
}
|
}
|
||||||
message_generator.set("message.name", message.name);
|
message_generator.set("message.name", message.name);
|
||||||
|
message_generator.set("message.pascal_name", pascal_case(message.name));
|
||||||
message_generator.set("message.complex_return_type", return_type);
|
message_generator.set("message.complex_return_type", return_type);
|
||||||
message_generator.set("async_prefix_maybe", is_synchronous ? "" : "async_");
|
message_generator.set("async_prefix_maybe", is_synchronous ? "" : "async_");
|
||||||
|
|
||||||
message_generator.set("handler_name", snake_case(name));
|
message_generator.set("handler_name", name);
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
@message.complex_return_type@ @async_prefix_maybe@@handler_name@()~~~");
|
@message.complex_return_type@ @async_prefix_maybe@@handler_name@()~~~");
|
||||||
|
|
||||||
|
@ -528,10 +536,10 @@ public:
|
||||||
)~~~");
|
)~~~");
|
||||||
}
|
}
|
||||||
|
|
||||||
message_generator.append("m_connection.template send_sync<Messages::@endpoint.name@::@message.name@>(");
|
message_generator.append("m_connection.template send_sync<Messages::@endpoint.name@::@message.pascal_name@>(");
|
||||||
} else {
|
} else {
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
m_connection.post_message(Messages::@endpoint.name@::@message.name@ { )~~~");
|
m_connection.post_message(Messages::@endpoint.name@::@message.pascal_name@ { )~~~");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < parameters.size(); ++i) {
|
for (size_t i = 0; i < parameters.size(); ++i) {
|
||||||
|
@ -642,10 +650,11 @@ public:
|
||||||
auto message_generator = endpoint_generator.fork();
|
auto message_generator = endpoint_generator.fork();
|
||||||
|
|
||||||
message_generator.set("message.name", name);
|
message_generator.set("message.name", name);
|
||||||
|
message_generator.set("message.pascal_name", pascal_case(name));
|
||||||
|
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
case (int)Messages::@endpoint.name@::MessageID::@message.name@:
|
case (int)Messages::@endpoint.name@::MessageID::@message.pascal_name@:
|
||||||
message = Messages::@endpoint.name@::@message.name@::decode(stream, sockfd);
|
message = Messages::@endpoint.name@::@message.pascal_name@::decode(stream, sockfd);
|
||||||
break;
|
break;
|
||||||
)~~~");
|
)~~~");
|
||||||
};
|
};
|
||||||
|
@ -709,24 +718,24 @@ public:
|
||||||
argument_generator.append(", ");
|
argument_generator.append(", ");
|
||||||
}
|
}
|
||||||
|
|
||||||
message_generator.set("message.name", name);
|
message_generator.set("message.pascal_name", pascal_case(name));
|
||||||
message_generator.set("message.response_type", message.response_name());
|
message_generator.set("message.response_type", pascal_case(message.response_name()));
|
||||||
message_generator.set("handler_name", snake_case(name));
|
message_generator.set("handler_name", name);
|
||||||
message_generator.set("arguments", argument_generator.to_string());
|
message_generator.set("arguments", argument_generator.to_string());
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
case (int)Messages::@endpoint.name@::MessageID::@message.name@: {
|
case (int)Messages::@endpoint.name@::MessageID::@message.pascal_name@: {
|
||||||
)~~~");
|
)~~~");
|
||||||
if (returns_something) {
|
if (returns_something) {
|
||||||
if (message.outputs.is_empty()) {
|
if (message.outputs.is_empty()) {
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
[[maybe_unused]] auto& request = static_cast<const Messages::@endpoint.name@::@message.name@&>(message);
|
[[maybe_unused]] auto& request = static_cast<const Messages::@endpoint.name@::@message.pascal_name@&>(message);
|
||||||
@handler_name@(@arguments@);
|
@handler_name@(@arguments@);
|
||||||
auto response = Messages::@endpoint.name@::@message.response_type@ { };
|
auto response = Messages::@endpoint.name@::@message.response_type@ { };
|
||||||
return make<IPC::MessageBuffer>(response.encode());
|
return make<IPC::MessageBuffer>(response.encode());
|
||||||
)~~~");
|
)~~~");
|
||||||
} else {
|
} else {
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
[[maybe_unused]] auto& request = static_cast<const Messages::@endpoint.name@::@message.name@&>(message);
|
[[maybe_unused]] auto& request = static_cast<const Messages::@endpoint.name@::@message.pascal_name@&>(message);
|
||||||
auto response = @handler_name@(@arguments@);
|
auto response = @handler_name@(@arguments@);
|
||||||
if (!response.valid())
|
if (!response.valid())
|
||||||
return {};
|
return {};
|
||||||
|
@ -735,7 +744,7 @@ public:
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
[[maybe_unused]] auto& request = static_cast<const Messages::@endpoint.name@::@message.name@&>(message);
|
[[maybe_unused]] auto& request = static_cast<const Messages::@endpoint.name@::@message.pascal_name@&>(message);
|
||||||
@handler_name@(@arguments@);
|
@handler_name@(@arguments@);
|
||||||
return {};
|
return {};
|
||||||
)~~~");
|
)~~~");
|
||||||
|
@ -764,7 +773,7 @@ public:
|
||||||
return_type = message_name(endpoint.name, message.name, true);
|
return_type = message_name(endpoint.name, message.name, true);
|
||||||
message_generator.set("message.complex_return_type", return_type);
|
message_generator.set("message.complex_return_type", return_type);
|
||||||
|
|
||||||
message_generator.set("handler_name", snake_case(name));
|
message_generator.set("handler_name", name);
|
||||||
message_generator.append(R"~~~(
|
message_generator.append(R"~~~(
|
||||||
virtual @message.complex_return_type@ @handler_name@()~~~");
|
virtual @message.complex_return_type@ @handler_name@()~~~");
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ static LaunchServerConnection& connection()
|
||||||
|
|
||||||
bool Launcher::add_allowed_url(const URL& url)
|
bool Launcher::add_allowed_url(const URL& url)
|
||||||
{
|
{
|
||||||
auto response = connection().send_sync_but_allow_failure<Messages::LaunchServer::AddAllowedURL>(url);
|
auto response = connection().send_sync_but_allow_failure<Messages::LaunchServer::AddAllowedUrl>(url);
|
||||||
if (!response) {
|
if (!response) {
|
||||||
dbgln("Launcher::add_allowed_url: Failed");
|
dbgln("Launcher::add_allowed_url: Failed");
|
||||||
return false;
|
return false;
|
||||||
|
@ -69,7 +69,7 @@ bool Launcher::add_allowed_url(const URL& url)
|
||||||
|
|
||||||
bool Launcher::add_allowed_handler_with_any_url(const String& handler)
|
bool Launcher::add_allowed_handler_with_any_url(const String& handler)
|
||||||
{
|
{
|
||||||
auto response = connection().send_sync_but_allow_failure<Messages::LaunchServer::AddAllowedHandlerWithAnyURL>(handler);
|
auto response = connection().send_sync_but_allow_failure<Messages::LaunchServer::AddAllowedHandlerWithAnyUrl>(handler);
|
||||||
if (!response) {
|
if (!response) {
|
||||||
dbgln("Launcher::add_allowed_handler_with_any_url: Failed");
|
dbgln("Launcher::add_allowed_handler_with_any_url: Failed");
|
||||||
return false;
|
return false;
|
||||||
|
@ -79,7 +79,7 @@ bool Launcher::add_allowed_handler_with_any_url(const String& handler)
|
||||||
|
|
||||||
bool Launcher::add_allowed_handler_with_only_specific_urls(const String& handler, const Vector<URL>& urls)
|
bool Launcher::add_allowed_handler_with_only_specific_urls(const String& handler, const Vector<URL>& urls)
|
||||||
{
|
{
|
||||||
auto response = connection().send_sync_but_allow_failure<Messages::LaunchServer::AddAllowedHandlerWithOnlySpecificURLs>(handler, urls);
|
auto response = connection().send_sync_but_allow_failure<Messages::LaunchServer::AddAllowedHandlerWithOnlySpecificUrls>(handler, urls);
|
||||||
if (!response) {
|
if (!response) {
|
||||||
dbgln("Launcher::add_allowed_handler_with_only_specific_urls: Failed");
|
dbgln("Launcher::add_allowed_handler_with_only_specific_urls: Failed");
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -391,12 +391,12 @@ void OutOfProcessWebView::get_source()
|
||||||
|
|
||||||
void OutOfProcessWebView::js_console_initialize()
|
void OutOfProcessWebView::js_console_initialize()
|
||||||
{
|
{
|
||||||
client().async_jsconsole_initialize();
|
client().async_js_console_initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
void OutOfProcessWebView::js_console_input(const String& js_source)
|
void OutOfProcessWebView::js_console_input(const String& js_source)
|
||||||
{
|
{
|
||||||
client().async_jsconsole_input(js_source);
|
client().async_js_console_input(js_source);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ void WebContentClient::did_get_source(URL const& url, String const& source)
|
||||||
m_view.notify_server_did_get_source(url, source);
|
m_view.notify_server_did_get_source(url, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContentClient::did_jsconsole_output(String const& method, String const& line)
|
void WebContentClient::did_js_console_output(String const& method, String const& line)
|
||||||
{
|
{
|
||||||
m_view.notify_server_did_js_console_output(method, line);
|
m_view.notify_server_did_js_console_output(method, line);
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,7 +51,7 @@ private:
|
||||||
virtual void did_request_link_context_menu(Gfx::IntPoint const&, URL const&, String const&, unsigned) override;
|
virtual void did_request_link_context_menu(Gfx::IntPoint const&, URL const&, String const&, unsigned) override;
|
||||||
virtual void did_request_image_context_menu(Gfx::IntPoint const&, URL const&, String const&, unsigned, Gfx::ShareableBitmap const&) override;
|
virtual void did_request_image_context_menu(Gfx::IntPoint const&, URL const&, String const&, unsigned, Gfx::ShareableBitmap const&) override;
|
||||||
virtual void did_get_source(URL const&, String const&) override;
|
virtual void did_get_source(URL const&, String const&) override;
|
||||||
virtual void did_jsconsole_output(String const&, String const&) override;
|
virtual void did_js_console_output(String const&, String const&) override;
|
||||||
virtual void did_change_favicon(Gfx::ShareableBitmap const&) override;
|
virtual void did_change_favicon(Gfx::ShareableBitmap const&) override;
|
||||||
virtual void did_request_alert(String const&) override;
|
virtual void did_request_alert(String const&) override;
|
||||||
virtual Messages::WebContentClient::DidRequestConfirmResponse did_request_confirm(String const&) override;
|
virtual Messages::WebContentClient::DidRequestConfirmResponse did_request_confirm(String const&) override;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
endpoint AudioClient
|
endpoint AudioClient
|
||||||
{
|
{
|
||||||
FinishedPlayingBuffer(i32 buffer_id) =|
|
finished_playing_buffer(i32 buffer_id) =|
|
||||||
MutedStateChanged(bool muted) =|
|
muted_state_changed(bool muted) =|
|
||||||
MainMixVolumeChanged(i32 volume) =|
|
main_mix_volume_changed(i32 volume) =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
endpoint AudioServer
|
endpoint AudioServer
|
||||||
{
|
{
|
||||||
// Basic protocol
|
// Basic protocol
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
// Mixer functions
|
// Mixer functions
|
||||||
SetMuted(bool muted) => ()
|
set_muted(bool muted) => ()
|
||||||
GetMuted() => (bool muted)
|
get_muted() => (bool muted)
|
||||||
GetMainMixVolume() => (i32 volume)
|
get_main_mix_volume() => (i32 volume)
|
||||||
SetMainMixVolume(i32 volume) => ()
|
set_main_mix_volume(i32 volume) => ()
|
||||||
|
|
||||||
// Buffer playback
|
// Buffer playback
|
||||||
EnqueueBuffer(Core::AnonymousBuffer buffer, i32 buffer_id, int sample_count) => (bool success)
|
enqueue_buffer(Core::AnonymousBuffer buffer, i32 buffer_id, int sample_count) => (bool success)
|
||||||
SetPaused(bool paused) => ()
|
set_paused(bool paused) => ()
|
||||||
ClearBuffer(bool paused) => ()
|
clear_buffer(bool paused) => ()
|
||||||
|
|
||||||
//Buffer information
|
//Buffer information
|
||||||
GetRemainingSamples() => (int remaining_samples)
|
get_remaining_samples() => (int remaining_samples)
|
||||||
GetPlayedSamples() => (int played_samples)
|
get_played_samples() => (int played_samples)
|
||||||
GetPlayingBuffer() => (i32 buffer_id)
|
get_playing_buffer() => (i32 buffer_id)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
endpoint ClipboardClient
|
endpoint ClipboardClient
|
||||||
{
|
{
|
||||||
ClipboardDataChanged([UTF8] String mime_type) =|
|
clipboard_data_changed([UTF8] String mime_type) =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
endpoint ClipboardServer
|
endpoint ClipboardServer
|
||||||
{
|
{
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
GetClipboardData() => (Core::AnonymousBuffer data, [UTF8] String mime_type, IPC::Dictionary metadata)
|
get_clipboard_data() => (Core::AnonymousBuffer data, [UTF8] String mime_type, IPC::Dictionary metadata)
|
||||||
SetClipboardData(Core::AnonymousBuffer data, [UTF8] String mime_type, IPC::Dictionary metadata) => ()
|
set_clipboard_data(Core::AnonymousBuffer data, [UTF8] String mime_type, IPC::Dictionary metadata) => ()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
endpoint ImageDecoderClient
|
endpoint ImageDecoderClient
|
||||||
{
|
{
|
||||||
Dummy() =|
|
dummy() =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
endpoint ImageDecoderServer
|
endpoint ImageDecoderServer
|
||||||
{
|
{
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
DecodeImage(Core::AnonymousBuffer data) => (bool is_animated, u32 loop_count, Vector<Gfx::ShareableBitmap> bitmaps, Vector<u32> durations)
|
decode_image(Core::AnonymousBuffer data) => (bool is_animated, u32 loop_count, Vector<Gfx::ShareableBitmap> bitmaps, Vector<u32> durations)
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,7 @@ void ClientConnection::greet()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
Messages::LaunchServer::OpenURLResponse ClientConnection::open_url(URL const& url, String const& handler_name)
|
Messages::LaunchServer::OpenUrlResponse ClientConnection::open_url(URL const& url, String const& handler_name)
|
||||||
{
|
{
|
||||||
if (!m_allowlist.is_empty()) {
|
if (!m_allowlist.is_empty()) {
|
||||||
bool allowed = false;
|
bool allowed = false;
|
||||||
|
@ -55,12 +55,12 @@ Messages::LaunchServer::OpenURLResponse ClientConnection::open_url(URL const& ur
|
||||||
return Launcher::the().open_url(url, handler_name);
|
return Launcher::the().open_url(url, handler_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
Messages::LaunchServer::GetHandlersForURLResponse ClientConnection::get_handlers_for_url(URL const& url)
|
Messages::LaunchServer::GetHandlersForUrlResponse ClientConnection::get_handlers_for_url(URL const& url)
|
||||||
{
|
{
|
||||||
return Launcher::the().handlers_for_url(url);
|
return Launcher::the().handlers_for_url(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
Messages::LaunchServer::GetHandlersWithDetailsForURLResponse ClientConnection::get_handlers_with_details_for_url(URL const& url)
|
Messages::LaunchServer::GetHandlersWithDetailsForUrlResponse ClientConnection::get_handlers_with_details_for_url(URL const& url)
|
||||||
{
|
{
|
||||||
return Launcher::the().handlers_with_details_for_url(url);
|
return Launcher::the().handlers_with_details_for_url(url);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,9 @@ private:
|
||||||
explicit ClientConnection(NonnullRefPtr<Core::LocalSocket>, int client_id);
|
explicit ClientConnection(NonnullRefPtr<Core::LocalSocket>, int client_id);
|
||||||
|
|
||||||
virtual void greet() override;
|
virtual void greet() override;
|
||||||
virtual Messages::LaunchServer::OpenURLResponse open_url(URL const&, String const&) override;
|
virtual Messages::LaunchServer::OpenUrlResponse open_url(URL const&, String const&) override;
|
||||||
virtual Messages::LaunchServer::GetHandlersForURLResponse get_handlers_for_url(URL const&) override;
|
virtual Messages::LaunchServer::GetHandlersForUrlResponse get_handlers_for_url(URL const&) override;
|
||||||
virtual Messages::LaunchServer::GetHandlersWithDetailsForURLResponse get_handlers_with_details_for_url(URL const&) override;
|
virtual Messages::LaunchServer::GetHandlersWithDetailsForUrlResponse get_handlers_with_details_for_url(URL const&) override;
|
||||||
virtual void add_allowed_url(URL const&) override;
|
virtual void add_allowed_url(URL const&) override;
|
||||||
virtual void add_allowed_handler_with_any_url(String const&) override;
|
virtual void add_allowed_handler_with_any_url(String const&) override;
|
||||||
virtual void add_allowed_handler_with_only_specific_urls(String const&, Vector<URL> const&) override;
|
virtual void add_allowed_handler_with_only_specific_urls(String const&, Vector<URL> const&) override;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
endpoint LaunchClient
|
endpoint LaunchClient
|
||||||
{
|
{
|
||||||
Dummy() =|
|
dummy() =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
endpoint LaunchServer
|
endpoint LaunchServer
|
||||||
{
|
{
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
OpenURL(URL url, String handler_name) => (bool response)
|
open_url(URL url, String handler_name) => (bool response)
|
||||||
GetHandlersForURL(URL url) => (Vector<String> handlers)
|
get_handlers_for_url(URL url) => (Vector<String> handlers)
|
||||||
GetHandlersWithDetailsForURL(URL url) => (Vector<String> handlers_details)
|
get_handlers_with_details_for_url(URL url) => (Vector<String> handlers_details)
|
||||||
|
|
||||||
AddAllowedURL(URL url) => ()
|
add_allowed_url(URL url) => ()
|
||||||
AddAllowedHandlerWithAnyURL(String handler_name) => ()
|
add_allowed_handler_with_any_url(String handler_name) => ()
|
||||||
AddAllowedHandlerWithOnlySpecificURLs(String handler_name, Vector<URL> urls) => ()
|
add_allowed_handler_with_only_specific_urls(String handler_name, Vector<URL> urls) => ()
|
||||||
SealAllowlist() => ()
|
seal_allowlist() => ()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
endpoint LookupClient
|
endpoint LookupClient
|
||||||
{
|
{
|
||||||
Dummy() =|
|
dummy() =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
endpoint LookupServer [magic=9001]
|
endpoint LookupServer [magic=9001]
|
||||||
{
|
{
|
||||||
LookupName(String name) => (int code, Vector<String> addresses)
|
lookup_name(String name) => (int code, Vector<String> addresses)
|
||||||
LookupAddress(String address) => (int code, String name)
|
lookup_address(String address) => (int code, String name)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
endpoint NotificationClient
|
endpoint NotificationClient
|
||||||
{
|
{
|
||||||
Dummy() =|
|
dummy() =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
endpoint NotificationServer
|
endpoint NotificationServer
|
||||||
{
|
{
|
||||||
// Basic protocol
|
// Basic protocol
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
ShowNotification([UTF8] String text, [UTF8] String title, Gfx::ShareableBitmap icon) => ()
|
show_notification([UTF8] String text, [UTF8] String title, Gfx::ShareableBitmap icon) => ()
|
||||||
|
|
||||||
UpdateNotificationText([UTF8] String text, [UTF8] String title) => (bool still_showing)
|
update_notification_text([UTF8] String text, [UTF8] String title) => (bool still_showing)
|
||||||
|
|
||||||
UpdateNotificationIcon(Gfx::ShareableBitmap icon) => (bool still_showing)
|
update_notification_icon(Gfx::ShareableBitmap icon) => (bool still_showing)
|
||||||
|
|
||||||
IsShowing() => (bool still_showing)
|
is_showing() => (bool still_showing)
|
||||||
|
|
||||||
CloseNotification() => ()
|
close_notification() => ()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
endpoint RequestClient
|
endpoint RequestClient
|
||||||
{
|
{
|
||||||
RequestProgress(i32 request_id, Optional<u32> total_size, u32 downloaded_size) =|
|
request_progress(i32 request_id, Optional<u32> total_size, u32 downloaded_size) =|
|
||||||
RequestFinished(i32 request_id, bool success, u32 total_size) =|
|
request_finished(i32 request_id, bool success, u32 total_size) =|
|
||||||
HeadersBecameAvailable(i32 request_id, IPC::Dictionary response_headers, Optional<u32> status_code) =|
|
headers_became_available(i32 request_id, IPC::Dictionary response_headers, Optional<u32> status_code) =|
|
||||||
|
|
||||||
// Certificate requests
|
// Certificate requests
|
||||||
CertificateRequested(i32 request_id) => ()
|
certificate_requested(i32 request_id) => ()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
endpoint RequestServer
|
endpoint RequestServer
|
||||||
{
|
{
|
||||||
// Basic protocol
|
// Basic protocol
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
// Test if a specific protocol is supported, e.g "http"
|
// Test if a specific protocol is supported, e.g "http"
|
||||||
IsSupportedProtocol(String protocol) => (bool supported)
|
is_supported_protocol(String protocol) => (bool supported)
|
||||||
|
|
||||||
StartRequest(String method, URL url, IPC::Dictionary request_headers, ByteBuffer request_body) => (i32 request_id, Optional<IPC::File> response_fd)
|
start_request(String method, URL url, IPC::Dictionary request_headers, ByteBuffer request_body) => (i32 request_id, Optional<IPC::File> response_fd)
|
||||||
StopRequest(i32 request_id) => (bool success)
|
stop_request(i32 request_id) => (bool success)
|
||||||
SetCertificate(i32 request_id, String certificate, String key) => (bool success)
|
set_certificate(i32 request_id, String certificate, String key) => (bool success)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
endpoint SymbolClient
|
endpoint SymbolClient
|
||||||
{
|
{
|
||||||
Dummy() =|
|
dummy() =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
endpoint SymbolServer
|
endpoint SymbolServer
|
||||||
{
|
{
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
Symbolicate(String path, u32 address) => (bool success, String name, u32 offset, String filename, u32 line)
|
symbolicate(String path, u32 address) => (bool success, String name, u32 offset, String filename, u32 line)
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,7 +213,7 @@ void ClientConnection::get_source()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientConnection::jsconsole_initialize()
|
void ClientConnection::js_console_initialize()
|
||||||
{
|
{
|
||||||
if (auto* document = page().main_frame().document()) {
|
if (auto* document = page().main_frame().document()) {
|
||||||
auto interpreter = document->interpreter().make_weak_ptr();
|
auto interpreter = document->interpreter().make_weak_ptr();
|
||||||
|
@ -226,7 +226,7 @@ void ClientConnection::jsconsole_initialize()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ClientConnection::jsconsole_input(const String& js_source)
|
void ClientConnection::js_console_input(const String& js_source)
|
||||||
{
|
{
|
||||||
if (m_console_client)
|
if (m_console_client)
|
||||||
m_console_client->handle_input(js_source);
|
m_console_client->handle_input(js_source);
|
||||||
|
|
|
@ -48,8 +48,8 @@ private:
|
||||||
virtual void remove_backing_store(i32) override;
|
virtual void remove_backing_store(i32) override;
|
||||||
virtual void debug_request(String const&, String const&) override;
|
virtual void debug_request(String const&, String const&) override;
|
||||||
virtual void get_source() override;
|
virtual void get_source() override;
|
||||||
virtual void jsconsole_initialize() override;
|
virtual void js_console_initialize() override;
|
||||||
virtual void jsconsole_input(String const&) override;
|
virtual void js_console_input(String const&) override;
|
||||||
|
|
||||||
void flush_pending_paint_requests();
|
void flush_pending_paint_requests();
|
||||||
|
|
||||||
|
|
|
@ -1,30 +1,30 @@
|
||||||
endpoint WebContentClient
|
endpoint WebContentClient
|
||||||
{
|
{
|
||||||
DidStartLoading(URL url) =|
|
did_start_loading(URL url) =|
|
||||||
DidFinishLoading(URL url) =|
|
did_finish_loading(URL url) =|
|
||||||
DidPaint(Gfx::IntRect content_rect, i32 bitmap_id) =|
|
did_paint(Gfx::IntRect content_rect, i32 bitmap_id) =|
|
||||||
DidInvalidateContentRect(Gfx::IntRect content_rect) =|
|
did_invalidate_content_rect(Gfx::IntRect content_rect) =|
|
||||||
DidChangeSelection() =|
|
did_change_selection() =|
|
||||||
DidRequestCursorChange(i32 cursor_type) =|
|
did_request_cursor_change(i32 cursor_type) =|
|
||||||
DidLayout(Gfx::IntSize content_size) =|
|
did_layout(Gfx::IntSize content_size) =|
|
||||||
DidChangeTitle(String title) =|
|
did_change_title(String title) =|
|
||||||
DidRequestScroll(int wheel_delta) =|
|
did_request_scroll(int wheel_delta) =|
|
||||||
DidRequestScrollIntoView(Gfx::IntRect rect) =|
|
did_request_scroll_into_view(Gfx::IntRect rect) =|
|
||||||
DidEnterTooltipArea(Gfx::IntPoint content_position, String title) =|
|
did_enter_tooltip_area(Gfx::IntPoint content_position, String title) =|
|
||||||
DidLeaveTooltipArea() =|
|
did_leave_tooltip_area() =|
|
||||||
DidHoverLink(URL url) =|
|
did_hover_link(URL url) =|
|
||||||
DidUnhoverLink() =|
|
did_unhover_link() =|
|
||||||
DidClickLink(URL url, String target, unsigned modifiers) =|
|
did_click_link(URL url, String target, unsigned modifiers) =|
|
||||||
DidMiddleClickLink(URL url, String target, unsigned modifiers) =|
|
did_middle_click_link(URL url, String target, unsigned modifiers) =|
|
||||||
DidRequestContextMenu(Gfx::IntPoint content_position) =|
|
did_request_context_menu(Gfx::IntPoint content_position) =|
|
||||||
DidRequestLinkContextMenu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers) =|
|
did_request_link_context_menu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers) =|
|
||||||
DidRequestImageContextMenu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers, Gfx::ShareableBitmap bitmap) =|
|
did_request_image_context_menu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers, Gfx::ShareableBitmap bitmap) =|
|
||||||
DidRequestAlert(String message) => ()
|
did_request_alert(String message) => ()
|
||||||
DidRequestConfirm(String message) => (bool result)
|
did_request_confirm(String message) => (bool result)
|
||||||
DidRequestPrompt(String message, String default_) => (String response)
|
did_request_prompt(String message, String default_) => (String response)
|
||||||
DidGetSource(URL url, String source) =|
|
did_get_source(URL url, String source) =|
|
||||||
DidJSConsoleOutput(String method, String line) =|
|
did_js_console_output(String method, String line) =|
|
||||||
DidChangeFavicon(Gfx::ShareableBitmap favicon) =|
|
did_change_favicon(Gfx::ShareableBitmap favicon) =|
|
||||||
DidRequestCookie(URL url, u8 source) => (String cookie)
|
did_request_cookie(URL url, u8 source) => (String cookie)
|
||||||
DidSetCookie(URL url, Web::Cookie::ParsedCookie cookie, u8 source) =|
|
did_set_cookie(URL url, Web::Cookie::ParsedCookie cookie, u8 source) =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,12 +51,12 @@ void WebContentConsoleClient::handle_input(const String& js_source)
|
||||||
|
|
||||||
void WebContentConsoleClient::print_html(const String& line)
|
void WebContentConsoleClient::print_html(const String& line)
|
||||||
{
|
{
|
||||||
m_client.async_did_jsconsole_output("html", line);
|
m_client.async_did_js_console_output("html", line);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WebContentConsoleClient::clear_output()
|
void WebContentConsoleClient::clear_output()
|
||||||
{
|
{
|
||||||
m_client.async_did_jsconsole_output("clear_output", {});
|
m_client.async_did_js_console_output("clear_output", {});
|
||||||
}
|
}
|
||||||
|
|
||||||
JS::Value WebContentConsoleClient::log()
|
JS::Value WebContentConsoleClient::log()
|
||||||
|
|
|
@ -1,28 +1,28 @@
|
||||||
endpoint WebContentServer
|
endpoint WebContentServer
|
||||||
{
|
{
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
UpdateSystemTheme(Core::AnonymousBuffer theme_buffer) =|
|
update_system_theme(Core::AnonymousBuffer theme_buffer) =|
|
||||||
UpdateScreenRect(Gfx::IntRect rect) =|
|
update_screen_rect(Gfx::IntRect rect) =|
|
||||||
|
|
||||||
LoadURL(URL url) =|
|
load_url(URL url) =|
|
||||||
LoadHTML(String html, URL url) =|
|
load_html(String html, URL url) =|
|
||||||
|
|
||||||
AddBackingStore(i32 backing_store_id, Gfx::ShareableBitmap bitmap) =|
|
add_backing_store(i32 backing_store_id, Gfx::ShareableBitmap bitmap) =|
|
||||||
RemoveBackingStore(i32 backing_store_id) =|
|
remove_backing_store(i32 backing_store_id) =|
|
||||||
|
|
||||||
Paint(Gfx::IntRect content_rect, i32 backing_store_id) =|
|
paint(Gfx::IntRect content_rect, i32 backing_store_id) =|
|
||||||
SetViewportRect(Gfx::IntRect rect) =|
|
set_viewport_rect(Gfx::IntRect rect) =|
|
||||||
|
|
||||||
MouseDown(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
mouse_down(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
||||||
MouseMove(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
mouse_move(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
||||||
MouseUp(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
mouse_up(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
|
||||||
MouseWheel(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers, i32 wheel_delta) =|
|
mouse_wheel(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers, i32 wheel_delta) =|
|
||||||
|
|
||||||
KeyDown(i32 key, unsigned modifiers, u32 code_point) =|
|
key_down(i32 key, unsigned modifiers, u32 code_point) =|
|
||||||
|
|
||||||
DebugRequest(String request, String argument) =|
|
debug_request(String request, String argument) =|
|
||||||
GetSource() =|
|
get_source() =|
|
||||||
JSConsoleInitialize() =|
|
js_console_initialize() =|
|
||||||
JSConsoleInput(String js_source) =|
|
js_console_input(String js_source) =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
endpoint WebSocketClient
|
endpoint WebSocketClient
|
||||||
{
|
{
|
||||||
// Connection API
|
// Connection API
|
||||||
Connected(i32 connection_id) =|
|
connected(i32 connection_id) =|
|
||||||
Received(i32 connection_id, bool is_text, ByteBuffer data) =|
|
received(i32 connection_id, bool is_text, ByteBuffer data) =|
|
||||||
Errored(i32 connection_id, i32 message) =|
|
errored(i32 connection_id, i32 message) =|
|
||||||
Closed(i32 connection_id, u16 code, String reason, bool clean) =|
|
closed(i32 connection_id, u16 code, String reason, bool clean) =|
|
||||||
|
|
||||||
// Certificate requests
|
// Certificate requests
|
||||||
CertificateRequested(i32 connection_id) =|
|
certificate_requested(i32 connection_id) =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
endpoint WebSocketServer
|
endpoint WebSocketServer
|
||||||
{
|
{
|
||||||
// Basic protocol
|
// Basic protocol
|
||||||
Greet() => ()
|
greet() => ()
|
||||||
|
|
||||||
// Connection API
|
// Connection API
|
||||||
Connect(URL url, String origin, Vector<String> protocols, Vector<String> extensions, IPC::Dictionary additional_request_headers) => (i32 connection_id)
|
connect(URL url, String origin, Vector<String> protocols, Vector<String> extensions, IPC::Dictionary additional_request_headers) => (i32 connection_id)
|
||||||
ReadyState(i32 connection_id) => (u32 ready_state)
|
ready_state(i32 connection_id) => (u32 ready_state)
|
||||||
Send(i32 connection_id, bool is_text, ByteBuffer data) =|
|
send(i32 connection_id, bool is_text, ByteBuffer data) =|
|
||||||
Close(i32 connection_id, u16 code, String reason) =|
|
close(i32 connection_id, u16 code, String reason) =|
|
||||||
|
|
||||||
SetCertificate(i32 connection_id, String certificate, String key) => (bool success)
|
set_certificate(i32 connection_id, String certificate, String key) => (bool success)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,40 +1,40 @@
|
||||||
endpoint WindowClient
|
endpoint WindowClient
|
||||||
{
|
{
|
||||||
Paint(i32 window_id, Gfx::IntSize window_size, Vector<Gfx::IntRect> rects) =|
|
paint(i32 window_id, Gfx::IntSize window_size, Vector<Gfx::IntRect> rects) =|
|
||||||
MouseMove(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta, bool is_drag, Vector<String> mime_types) =|
|
mouse_move(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta, bool is_drag, Vector<String> mime_types) =|
|
||||||
MouseDown(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
mouse_down(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
||||||
MouseDoubleClick(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
mouse_double_click(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
||||||
MouseUp(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
mouse_up(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
||||||
MouseWheel(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
mouse_wheel(i32 window_id, Gfx::IntPoint mouse_position, u32 button, u32 buttons, u32 modifiers, i32 wheel_delta) =|
|
||||||
WindowEntered(i32 window_id) =|
|
window_entered(i32 window_id) =|
|
||||||
WindowLeft(i32 window_id) =|
|
window_left(i32 window_id) =|
|
||||||
WindowInputEntered(i32 window_id) =|
|
window_input_entered(i32 window_id) =|
|
||||||
WindowInputLeft(i32 window_id) =|
|
window_input_left(i32 window_id) =|
|
||||||
KeyDown(i32 window_id, u32 code_point, u32 key, u32 modifiers, u32 scancode) =|
|
key_down(i32 window_id, u32 code_point, u32 key, u32 modifiers, u32 scancode) =|
|
||||||
KeyUp(i32 window_id, u32 code_point, u32 key, u32 modifiers, u32 scancode) =|
|
key_up(i32 window_id, u32 code_point, u32 key, u32 modifiers, u32 scancode) =|
|
||||||
WindowActivated(i32 window_id) =|
|
window_activated(i32 window_id) =|
|
||||||
WindowDeactivated(i32 window_id) =|
|
window_deactivated(i32 window_id) =|
|
||||||
WindowStateChanged(i32 window_id, bool minimized, bool occluded) =|
|
window_state_changed(i32 window_id, bool minimized, bool occluded) =|
|
||||||
WindowCloseRequest(i32 window_id) =|
|
window_close_request(i32 window_id) =|
|
||||||
WindowResized(i32 window_id, Gfx::IntRect new_rect) =|
|
window_resized(i32 window_id, Gfx::IntRect new_rect) =|
|
||||||
|
|
||||||
MenuItemActivated(i32 menu_id, u32 identifier) =|
|
menu_item_activated(i32 menu_id, u32 identifier) =|
|
||||||
MenuItemEntered(i32 menu_id, u32 identifier) =|
|
menu_item_entered(i32 menu_id, u32 identifier) =|
|
||||||
MenuItemLeft(i32 menu_id, u32 identifier) =|
|
menu_item_left(i32 menu_id, u32 identifier) =|
|
||||||
MenuVisibilityDidChange(i32 menu_id, bool visible) =|
|
menu_visibility_did_change(i32 menu_id, bool visible) =|
|
||||||
|
|
||||||
ScreenRectChanged(Gfx::IntRect rect) =|
|
screen_rect_changed(Gfx::IntRect rect) =|
|
||||||
|
|
||||||
SetWallpaperFinished(bool success) =|
|
set_wallpaper_finished(bool success) =|
|
||||||
|
|
||||||
DragAccepted() =|
|
drag_accepted() =|
|
||||||
DragCancelled() =|
|
drag_cancelled() =|
|
||||||
|
|
||||||
DragDropped(i32 window_id, Gfx::IntPoint mouse_position, [UTF8] String text, HashMap<String,ByteBuffer> mime_data) =|
|
drag_dropped(i32 window_id, Gfx::IntPoint mouse_position, [UTF8] String text, HashMap<String,ByteBuffer> mime_data) =|
|
||||||
|
|
||||||
UpdateSystemTheme(Core::AnonymousBuffer theme_buffer) =|
|
update_system_theme(Core::AnonymousBuffer theme_buffer) =|
|
||||||
|
|
||||||
DisplayLinkNotification() =|
|
display_link_notification() =|
|
||||||
|
|
||||||
Ping() =|
|
ping() =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
endpoint WindowManagerClient
|
endpoint WindowManagerClient
|
||||||
{
|
{
|
||||||
WindowRemoved(i32 wm_id, i32 client_id, i32 window_id) =|
|
window_removed(i32 wm_id, i32 client_id, i32 window_id) =|
|
||||||
WindowStateChanged(i32 wm_id, i32 client_id, i32 window_id, i32 parent_client_id, i32 parent_window_id, bool is_active, bool is_minimized, bool is_modal, bool is_frameless, i32 window_type, [UTF8] String title, Gfx::IntRect rect, Optional<i32> progress) =|
|
window_state_changed(i32 wm_id, i32 client_id, i32 window_id, i32 parent_client_id, i32 parent_window_id, bool is_active, bool is_minimized, bool is_modal, bool is_frameless, i32 window_type, [UTF8] String title, Gfx::IntRect rect, Optional<i32> progress) =|
|
||||||
WindowIconBitmapChanged(i32 wm_id, i32 client_id, i32 window_id, Gfx::ShareableBitmap bitmap) =|
|
window_icon_bitmap_changed(i32 wm_id, i32 client_id, i32 window_id, Gfx::ShareableBitmap bitmap) =|
|
||||||
WindowRectChanged(i32 wm_id, i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
window_rect_changed(i32 wm_id, i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
||||||
AppletAreaSizeChanged(i32 wm_id, Gfx::IntSize size) =|
|
applet_area_size_changed(i32 wm_id, Gfx::IntSize size) =|
|
||||||
SuperKeyPressed(i32 wm_id) =|
|
super_key_pressed(i32 wm_id) =|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
endpoint WindowManagerServer
|
endpoint WindowManagerServer
|
||||||
{
|
{
|
||||||
SetEventMask(u32 event_mask) => ()
|
set_event_mask(u32 event_mask) => ()
|
||||||
SetManagerWindow(i32 window_id) => ()
|
set_manager_window(i32 window_id) => ()
|
||||||
|
|
||||||
SetActiveWindow(i32 client_id, i32 window_id) =|
|
set_active_window(i32 client_id, i32 window_id) =|
|
||||||
SetWindowMinimized(i32 client_id, i32 window_id, bool minimized) =|
|
set_window_minimized(i32 client_id, i32 window_id, bool minimized) =|
|
||||||
StartWindowResize(i32 client_id, i32 window_id) =|
|
start_window_resize(i32 client_id, i32 window_id) =|
|
||||||
PopupWindowMenu(i32 client_id, i32 window_id, Gfx::IntPoint screen_position) =|
|
popup_window_menu(i32 client_id, i32 window_id, Gfx::IntPoint screen_position) =|
|
||||||
SetWindowTaskbarRect(i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
set_window_taskbar_rect(i32 client_id, i32 window_id, Gfx::IntRect rect) =|
|
||||||
SetAppletAreaPosition(Gfx::IntPoint position) => ()
|
set_applet_area_position(Gfx::IntPoint position) => ()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
endpoint WindowServer
|
endpoint WindowServer
|
||||||
{
|
{
|
||||||
Greet() => (Gfx::IntRect screen_rect, Core::AnonymousBuffer theme_buffer)
|
greet() => (Gfx::IntRect screen_rect, Core::AnonymousBuffer theme_buffer)
|
||||||
|
|
||||||
CreateMenubar() => (i32 menubar_id)
|
create_menubar() => (i32 menubar_id)
|
||||||
DestroyMenubar(i32 menubar_id) => ()
|
destroy_menubar(i32 menubar_id) => ()
|
||||||
|
|
||||||
CreateMenu([UTF8] String menu_title) => (i32 menu_id)
|
create_menu([UTF8] String menu_title) => (i32 menu_id)
|
||||||
DestroyMenu(i32 menu_id) => ()
|
destroy_menu(i32 menu_id) => ()
|
||||||
|
|
||||||
AddMenuToMenubar(i32 menubar_id, i32 menu_id) => ()
|
add_menu_to_menubar(i32 menubar_id, i32 menu_id) => ()
|
||||||
|
|
||||||
AddMenuItem(
|
add_menu_item(
|
||||||
i32 menu_id,
|
i32 menu_id,
|
||||||
i32 identifier,
|
i32 identifier,
|
||||||
i32 submenu_id,
|
i32 submenu_id,
|
||||||
|
@ -23,11 +23,11 @@ endpoint WindowServer
|
||||||
Gfx::ShareableBitmap icon,
|
Gfx::ShareableBitmap icon,
|
||||||
bool exclusive) => ()
|
bool exclusive) => ()
|
||||||
|
|
||||||
AddMenuSeparator(i32 menu_id) => ()
|
add_menu_separator(i32 menu_id) => ()
|
||||||
|
|
||||||
UpdateMenuItem(i32 menu_id, i32 identifier, i32 submenu_id, [UTF8] String text, bool enabled, bool checkable, bool checked, bool is_default, [UTF8] String shortcut) => ()
|
update_menu_item(i32 menu_id, i32 identifier, i32 submenu_id, [UTF8] String text, bool enabled, bool checkable, bool checked, bool is_default, [UTF8] String shortcut) => ()
|
||||||
|
|
||||||
CreateWindow(
|
create_window(
|
||||||
Gfx::IntRect rect,
|
Gfx::IntRect rect,
|
||||||
bool auto_position,
|
bool auto_position,
|
||||||
bool has_alpha_channel,
|
bool has_alpha_channel,
|
||||||
|
@ -47,83 +47,83 @@ endpoint WindowServer
|
||||||
[UTF8] String title,
|
[UTF8] String title,
|
||||||
i32 parent_window_id) => (i32 window_id)
|
i32 parent_window_id) => (i32 window_id)
|
||||||
|
|
||||||
DestroyWindow(i32 window_id) => (Vector<i32> destroyed_window_ids)
|
destroy_window(i32 window_id) => (Vector<i32> destroyed_window_ids)
|
||||||
|
|
||||||
SetWindowMenubar(i32 window_id, i32 menubar_id) => ()
|
set_window_menubar(i32 window_id, i32 menubar_id) => ()
|
||||||
|
|
||||||
SetWindowTitle(i32 window_id, [UTF8] String title) => ()
|
set_window_title(i32 window_id, [UTF8] String title) => ()
|
||||||
GetWindowTitle(i32 window_id) => ([UTF8] String title)
|
get_window_title(i32 window_id) => ([UTF8] String title)
|
||||||
|
|
||||||
SetWindowProgress(i32 window_id, Optional<i32> progress) =|
|
set_window_progress(i32 window_id, Optional<i32> progress) =|
|
||||||
|
|
||||||
SetWindowModified(i32 window_id, bool modified) =|
|
set_window_modified(i32 window_id, bool modified) =|
|
||||||
IsWindowModified(i32 window_id) => (bool modified)
|
is_window_modified(i32 window_id) => (bool modified)
|
||||||
|
|
||||||
SetWindowRect(i32 window_id, Gfx::IntRect rect) => (Gfx::IntRect rect)
|
set_window_rect(i32 window_id, Gfx::IntRect rect) => (Gfx::IntRect rect)
|
||||||
GetWindowRect(i32 window_id) => (Gfx::IntRect rect)
|
get_window_rect(i32 window_id) => (Gfx::IntRect rect)
|
||||||
|
|
||||||
SetWindowMinimumSize(i32 window_id, Gfx::IntSize size) => ()
|
set_window_minimum_size(i32 window_id, Gfx::IntSize size) => ()
|
||||||
GetWindowMinimumSize(i32 window_id) => (Gfx::IntSize size)
|
get_window_minimum_size(i32 window_id) => (Gfx::IntSize size)
|
||||||
|
|
||||||
GetAppletRectOnScreen(i32 window_id) => (Gfx::IntRect rect)
|
get_applet_rect_on_screen(i32 window_id) => (Gfx::IntRect rect)
|
||||||
|
|
||||||
StartWindowResize(i32 window_id) =|
|
start_window_resize(i32 window_id) =|
|
||||||
|
|
||||||
IsMaximized(i32 window_id) => (bool maximized)
|
is_maximized(i32 window_id) => (bool maximized)
|
||||||
|
|
||||||
InvalidateRect(i32 window_id, Vector<Gfx::IntRect> rects, bool ignore_occlusion) =|
|
invalidate_rect(i32 window_id, Vector<Gfx::IntRect> rects, bool ignore_occlusion) =|
|
||||||
DidFinishPainting(i32 window_id, Vector<Gfx::IntRect> rects) =|
|
did_finish_painting(i32 window_id, Vector<Gfx::IntRect> rects) =|
|
||||||
|
|
||||||
SetGlobalCursorTracking(i32 window_id, bool enabled) => ()
|
set_global_cursor_tracking(i32 window_id, bool enabled) => ()
|
||||||
SetWindowOpacity(i32 window_id, float opacity) => ()
|
set_window_opacity(i32 window_id, float opacity) => ()
|
||||||
|
|
||||||
SetWindowAlphaHitThreshold(i32 window_id, float threshold) => ()
|
set_window_alpha_hit_threshold(i32 window_id, float threshold) => ()
|
||||||
|
|
||||||
SetWindowBackingStore(i32 window_id, i32 bpp, i32 pitch, IPC::File anon_file, i32 serial, bool has_alpha_channel, Gfx::IntSize size, bool flush_immediately) => ()
|
set_window_backing_store(i32 window_id, i32 bpp, i32 pitch, IPC::File anon_file, i32 serial, bool has_alpha_channel, Gfx::IntSize size, bool flush_immediately) => ()
|
||||||
|
|
||||||
SetWindowHasAlphaChannel(i32 window_id, bool has_alpha_channel) => ()
|
set_window_has_alpha_channel(i32 window_id, bool has_alpha_channel) => ()
|
||||||
MoveWindowToFront(i32 window_id) => ()
|
move_window_to_front(i32 window_id) => ()
|
||||||
SetFullscreen(i32 window_id, bool fullscreen) => ()
|
set_fullscreen(i32 window_id, bool fullscreen) => ()
|
||||||
SetFrameless(i32 window_id, bool frameless) => ()
|
set_frameless(i32 window_id, bool frameless) => ()
|
||||||
PopupMenu(i32 menu_id, Gfx::IntPoint screen_position) => ()
|
popup_menu(i32 menu_id, Gfx::IntPoint screen_position) => ()
|
||||||
DismissMenu(i32 menu_id) => ()
|
dismiss_menu(i32 menu_id) => ()
|
||||||
|
|
||||||
SetWallpaper(String path) =|
|
set_wallpaper(String path) =|
|
||||||
|
|
||||||
SetBackgroundColor(String background_color) => ()
|
set_background_color(String background_color) => ()
|
||||||
SetWallpaperMode(String mode) => ()
|
set_wallpaper_mode(String mode) => ()
|
||||||
|
|
||||||
SetResolution(Gfx::IntSize resolution, int scale_factor) => (bool success, Gfx::IntSize resolution, int scale_factor)
|
set_resolution(Gfx::IntSize resolution, int scale_factor) => (bool success, Gfx::IntSize resolution, int scale_factor)
|
||||||
SetWindowIconBitmap(i32 window_id, Gfx::ShareableBitmap icon) => ()
|
set_window_icon_bitmap(i32 window_id, Gfx::ShareableBitmap icon) => ()
|
||||||
|
|
||||||
GetWallpaper() => (String path)
|
get_wallpaper() => (String path)
|
||||||
SetWindowCursor(i32 window_id, i32 cursor_type) => ()
|
set_window_cursor(i32 window_id, i32 cursor_type) => ()
|
||||||
SetWindowCustomCursor(i32 window_id, Gfx::ShareableBitmap cursor) => ()
|
set_window_custom_cursor(i32 window_id, Gfx::ShareableBitmap cursor) => ()
|
||||||
|
|
||||||
StartDrag([UTF8] String text, HashMap<String,ByteBuffer> mime_data, Gfx::ShareableBitmap drag_bitmap) => (bool started)
|
start_drag([UTF8] String text, HashMap<String,ByteBuffer> mime_data, Gfx::ShareableBitmap drag_bitmap) => (bool started)
|
||||||
|
|
||||||
SetSystemTheme(String theme_path, [UTF8] String theme_name) => (bool success)
|
set_system_theme(String theme_path, [UTF8] String theme_name) => (bool success)
|
||||||
GetSystemTheme() => ([UTF8] String theme_name)
|
get_system_theme() => ([UTF8] String theme_name)
|
||||||
RefreshSystemTheme() =|
|
refresh_system_theme() =|
|
||||||
|
|
||||||
SetWindowBaseSizeAndSizeIncrement(i32 window_id, Gfx::IntSize base_size, Gfx::IntSize size_increment) => ()
|
set_window_base_size_and_size_increment(i32 window_id, Gfx::IntSize base_size, Gfx::IntSize size_increment) => ()
|
||||||
SetWindowResizeAspectRatio(i32 window_id, Optional<Gfx::IntSize> resize_aspect_ratio) => ()
|
set_window_resize_aspect_ratio(i32 window_id, Optional<Gfx::IntSize> resize_aspect_ratio) => ()
|
||||||
|
|
||||||
EnableDisplayLink() =|
|
enable_display_link() =|
|
||||||
DisableDisplayLink() =|
|
disable_display_link() =|
|
||||||
|
|
||||||
GetGlobalCursorPosition() => (Gfx::IntPoint position)
|
get_global_cursor_position() => (Gfx::IntPoint position)
|
||||||
|
|
||||||
SetMouseAcceleration(float factor) => ()
|
set_mouse_acceleration(float factor) => ()
|
||||||
GetMouseAcceleration() => (float factor)
|
get_mouse_acceleration() => (float factor)
|
||||||
|
|
||||||
SetScrollStepSize(u32 step_size) => ()
|
set_scroll_step_size(u32 step_size) => ()
|
||||||
GetScrollStepSize() => (u32 step_size)
|
get_scroll_step_size() => (u32 step_size)
|
||||||
|
|
||||||
GetScreenBitmap() => (Gfx::ShareableBitmap bitmap)
|
get_screen_bitmap() => (Gfx::ShareableBitmap bitmap)
|
||||||
|
|
||||||
Pong() =|
|
pong() =|
|
||||||
|
|
||||||
SetDoubleClickSpeed(int speed) => ()
|
set_double_click_speed(int speed) => ()
|
||||||
GetDoubleClickSpeed() => (int speed)
|
get_double_click_speed() => (int speed)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue