1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 09:58:11 +00:00
serenity/Userland/Services/WebContent/WebContentClient.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

30 lines
1.5 KiB
Text

endpoint WebContentClient
{
DidStartLoading(URL url) =|
DidFinishLoading(URL url) =|
DidPaint(Gfx::IntRect content_rect, i32 bitmap_id) =|
DidInvalidateContentRect(Gfx::IntRect content_rect) =|
DidChangeSelection() =|
DidRequestCursorChange(i32 cursor_type) =|
DidLayout(Gfx::IntSize content_size) =|
DidChangeTitle(String title) =|
DidRequestScroll(int wheel_delta) =|
DidRequestScrollIntoView(Gfx::IntRect rect) =|
DidEnterTooltipArea(Gfx::IntPoint content_position, String title) =|
DidLeaveTooltipArea() =|
DidHoverLink(URL url) =|
DidUnhoverLink() =|
DidClickLink(URL url, String target, unsigned modifiers) =|
DidMiddleClickLink(URL url, String target, unsigned modifiers) =|
DidRequestContextMenu(Gfx::IntPoint content_position) =|
DidRequestLinkContextMenu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers) =|
DidRequestImageContextMenu(Gfx::IntPoint content_position, URL url, String target, unsigned modifiers, Gfx::ShareableBitmap bitmap) =|
DidRequestAlert(String message) => ()
DidRequestConfirm(String message) => (bool result)
DidRequestPrompt(String message, String default_) => (String response)
DidGetSource(URL url, String source) =|
DidJSConsoleOutput(String method, String line) =|
DidChangeFavicon(Gfx::ShareableBitmap favicon) =|
DidRequestCookie(URL url, u8 source) => (String cookie)
DidSetCookie(URL url, Web::Cookie::ParsedCookie cookie, u8 source) =|
}