mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00

This patch introduces code generation for the WindowServer IPC with its clients. The client/server endpoints are defined by the two .ipc files in Servers/WindowServer/: WindowServer.ipc and WindowClient.ipc It now becomes significantly easier to add features and capabilities to WindowServer since you don't have to know nearly as much about all the intricate paths that IPC messages take between LibGUI and WSWindow. The new system also uses significantly less IPC bandwidth since we're now doing packed serialization instead of passing fixed-sized structs of ~600 bytes for each message. Some repaint coalescing optimizations are lost in this conversion and we'll need to look at how to implement those in the new world. The old CoreIPC::Client::Connection and CoreIPC::Server::Connection classes are removed by this patch and replaced by use of ConnectionNG, which will be renamed eventually. Goodbye, old WindowServer IPC. You served us well :^)
68 lines
2.6 KiB
Text
68 lines
2.6 KiB
Text
endpoint WindowServer = 2
|
|
{
|
|
Greet(i32 client_pid) => (i32 server_pid, i32 client_id, Rect screen_rect)
|
|
|
|
CreateMenubar() => (i32 menubar_id)
|
|
DestroyMenubar(i32 menubar_id) => ()
|
|
|
|
CreateMenu(String menu_title) => (i32 menu_id)
|
|
DestroyMenu(i32 menu_id) => ()
|
|
|
|
AddMenuToMenubar(i32 menubar_id, i32 menu_id) => ()
|
|
SetApplicationMenubar(i32 menubar_id) => ()
|
|
|
|
AddMenuItem(i32 menu_id, i32 identifier, i32 submenu_id, String text, bool enabled, bool checkable, bool checked, String shortcut, i32 icon_buffer_id) => ()
|
|
AddMenuSeparator(i32 menu_id) => ()
|
|
|
|
UpdateMenuItem(i32 menu_id, i32 identifier, i32 submenu_id, String text, bool enabled, bool checkable, bool checked, String shortcut) => ()
|
|
|
|
CreateWindow(
|
|
Rect rect,
|
|
bool has_alpha_channel,
|
|
bool modal,
|
|
bool resizable,
|
|
bool fullscreen,
|
|
bool show_titlebar,
|
|
float opacity,
|
|
Color background_color,
|
|
Size base_size,
|
|
Size size_increment,
|
|
i32 type,
|
|
String title) => (i32 window_id)
|
|
|
|
DestroyWindow(i32 window_id) => ()
|
|
|
|
SetWindowTitle(i32 window_id, String title) => ()
|
|
GetWindowTitle(i32 window_id) => (String title)
|
|
|
|
SetWindowRect(i32 window_id, Rect rect) => ()
|
|
GetWindowRect(i32 window_id) => (Rect rect)
|
|
|
|
InvalidateRect(i32 window_id, Vector<Rect> rects) =|
|
|
DidFinishPainting(i32 window_id, Vector<Rect> rects) =|
|
|
|
|
SetGlobalCursorTracking(i32 window_id, bool enabled) => ()
|
|
SetWindowOpacity(i32 window_id, float opacity) => ()
|
|
|
|
SetWindowBackingStore(i32 window_id, i32 bpp, i32 pitch, i32 shared_buffer_id, bool has_alpha_channel, Size size, bool flush_immediately) => ()
|
|
GetClipboardContents() => (i32 shared_buffer_id, i32 content_size, String content_type)
|
|
SetClipboardContents(i32 shared_buffer_id, i32 content_size, String content_type) => ()
|
|
|
|
WM_SetActiveWindow(i32 client_id, i32 window_id) =|
|
|
WM_SetWindowMinimized(i32 client_id, i32 window_id, bool minimized) =|
|
|
WM_StartWindowResize(i32 client_id, i32 window_id) =|
|
|
WM_PopupWindowMenu(i32 client_id, i32 window_id, Point screen_position) =|
|
|
|
|
SetWindowHasAlphaChannel(i32 window_id, bool has_alpha_channel) => ()
|
|
MoveWindowToFront(i32 window_id) => ()
|
|
SetFullscreen(i32 window_id, bool fullscreen) => ()
|
|
PopupMenu(i32 menu_id, Point screen_position) => ()
|
|
DismissMenu(i32 menu_id) => ()
|
|
|
|
AsyncSetWallpaper(String path) =|
|
|
SetResolution(Size resolution) => ()
|
|
SetWindowIconBitmap(i32 window_id, i32 icon_buffer_id, Size icon_size) => ()
|
|
|
|
GetWallpaper() => (String path)
|
|
SetWindowOverrideCursor(i32 window_id, i32 cursor_type) => ()
|
|
}
|