1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-10-19 23:52:27 +00:00
serenity/Userland/Services/WebContent/WebContentServer.ipc
sin-ack 62af6cd4f9 IPCCompiler: Remove hardcoded endpoint magic, attempt deux
This patch removes the IPC endpoint numbers that needed to be specified
in the IPC files.  Since the string hash is a (hopefully) collision free
number that depends on the name of the endpoint, we now use that
instead. :^)

Additionally, endpoint magic is now treated as a u32, because endpoint
numbers were never negative anyway.

For cases where the endpoint number does have to be hardcoded (a current
case is LookupServer because the endpoint number must be known in LibC),
the syntax has been made more explicit to avoid confusing those
unfamiliar.  To hardcode the endpoint magic, the following syntax is now
used:

endpoint EndpointName [magic=1234]
2021-04-25 14:06:56 +02:00

28 lines
1 KiB
Text

endpoint WebContentServer
{
Greet() => ()
UpdateSystemTheme(Core::AnonymousBuffer theme_buffer) =|
UpdateScreenRect(Gfx::IntRect rect) =|
LoadURL(URL url) =|
LoadHTML(String html, URL url) =|
AddBackingStore(i32 backing_store_id, Gfx::ShareableBitmap bitmap) =|
RemoveBackingStore(i32 backing_store_id) =|
Paint(Gfx::IntRect content_rect, i32 backing_store_id) =|
SetViewportRect(Gfx::IntRect rect) =|
MouseDown(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
MouseMove(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
MouseUp(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers) =|
MouseWheel(Gfx::IntPoint position, unsigned button, unsigned buttons, unsigned modifiers, i32 wheel_delta) =|
KeyDown(i32 key, unsigned modifiers, u32 code_point) =|
DebugRequest(String request, String argument) =|
GetSource() =|
JSConsoleInitialize() =|
JSConsoleInput(String js_source) =|
}