1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-10 01:51:03 +09:00
ladybird/Servers/WindowServer/WindowServer.ipc
Andreas Kling 424a3f5ac3 WindowServer+LibGUI: Add a way to get notified at display refresh rate
This patch adds GUI::DisplayLink, a mechanism for registering callbacks
that will fire at the display refresh rate.

Note that we don't actually know the screen refresh rate, but this is
instead completely driven by WindowServer's compositing timer. For all
current intents and purposes it does the job well enough. :^)
2020-03-22 21:13:23 +01:00

91 lines
3.3 KiB
Text

endpoint WindowServer = 2
{
Greet() => (i32 client_id, Gfx::Rect screen_rect, i32 system_theme_buffer_id)
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) => ()
SetSystemMenu(i32 menu_id) => ()
AddMenuItem(
i32 menu_id,
i32 identifier,
i32 submenu_id,
String text,
bool enabled,
bool checkable,
bool checked,
String shortcut,
i32 icon_buffer_id,
bool exclusive) => ()
AddMenuSeparator(i32 menu_id) => ()
UpdateMenuItem(i32 menu_id, i32 identifier, i32 submenu_id, String text, bool enabled, bool checkable, bool checked, String shortcut) => ()
CreateWindow(
Gfx::Rect rect,
bool has_alpha_channel,
bool modal,
bool minimizable,
bool resizable,
bool fullscreen,
bool show_titlebar,
float opacity,
Gfx::Size base_size,
Gfx::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, Gfx::Rect rect) => ()
GetWindowRect(i32 window_id) => (Gfx::Rect rect)
InvalidateRect(i32 window_id, Vector<Gfx::Rect> rects, bool ignore_occlusion) =|
DidFinishPainting(i32 window_id, Vector<Gfx::Rect> rects) =|
SetGlobalCursorTracking(i32 window_id, bool enabled) => ()
SetWindowOpacity(i32 window_id, float opacity) => ()
SetWindowBackingStore(i32 window_id, i32 bpp, i32 pitch, i32 shbuf_id, bool has_alpha_channel, Gfx::Size size, bool flush_immediately) => ()
GetClipboardContents() => (i32 shbuf_id, i32 content_size, String content_type)
SetClipboardContents(i32 shbuf_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, Gfx::Point screen_position) =|
WM_SetWindowTaskbarRect(i32 client_id, i32 window_id, Gfx::Rect rect) =|
SetWindowHasAlphaChannel(i32 window_id, bool has_alpha_channel) => ()
MoveWindowToFront(i32 window_id) => ()
SetFullscreen(i32 window_id, bool fullscreen) => ()
PopupMenu(i32 menu_id, Gfx::Point screen_position) => ()
DismissMenu(i32 menu_id) => ()
AsyncSetWallpaper(String path) =|
SetResolution(Gfx::Size resolution) => (bool success, Gfx::Size resolution)
SetWindowIconBitmap(i32 window_id, i32 icon_buffer_id, Gfx::Size icon_size) => ()
GetWallpaper() => (String path)
SetWindowOverrideCursor(i32 window_id, i32 cursor_type) => ()
StartDrag(String text, String data_type, String data, i32 bitmap_id, Gfx::Size bitmap_size) => (bool started)
SetSystemTheme(String theme_path, String theme_name) => (bool success)
SetWindowBaseSizeAndSizeIncrement(i32 window_id, Gfx::Size base_size, Gfx::Size size_increment) => ()
EnableDisplayLink() =|
DisableDisplayLink() =|
}