ladybird/Services/WindowServer/WindowServer.ipc
Peter Elliott 5ae9eee4a3 LibGUI+WindowServer: Provide default placement to windows
This prevents windows from being opened directly on top of eachother,
and provides default behavior for when window position is not specified.

The new behavior is as follows:
- Windows that have been created without a set position are assigned one
  by WindowServer.
- The assigned position is either offset from the last window that is
  still in an assigned position, or a default position if no such window
  is available.
2020-08-01 08:06:48 +02:00

108 lines
3.8 KiB
Plaintext

endpoint WindowServer = 2
{
Greet() => (i32 client_id, Gfx::IntRect screen_rect, i32 system_theme_buffer_id)
CreateMenubar() => (i32 menubar_id)
DestroyMenubar(i32 menubar_id) => ()
CreateMenu([UTF8] 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,
[UTF8] String text,
bool enabled,
bool checkable,
bool checked,
bool is_default,
[UTF8] String shortcut,
i32 icon_buffer_id,
bool exclusive) => ()
AddMenuSeparator(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) => ()
CreateWindow(
Gfx::IntRect rect,
bool auto_position,
bool has_alpha_channel,
bool modal,
bool minimizable,
bool resizable,
bool fullscreen,
bool frameless,
bool accessory,
float opacity,
Gfx::IntSize base_size,
Gfx::IntSize size_increment,
i32 type,
[UTF8] String title,
i32 parent_window_id) => (i32 window_id)
DestroyWindow(i32 window_id) => (Vector<i32> destroyed_window_ids)
SetWindowTitle(i32 window_id, [UTF8] String title) => ()
GetWindowTitle(i32 window_id) => ([UTF8] String title)
SetWindowProgress(i32 window_id, i32 progress) =|
SetWindowRect(i32 window_id, Gfx::IntRect rect) => (Gfx::IntRect rect)
GetWindowRect(i32 window_id) => (Gfx::IntRect rect)
GetWindowRectInMenubar(i32 window_id) => (Gfx::IntRect rect)
IsMaximized(i32 window_id) => (bool maximized)
InvalidateRect(i32 window_id, Vector<Gfx::IntRect> rects, bool ignore_occlusion) =|
DidFinishPainting(i32 window_id, Vector<Gfx::IntRect> 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::IntSize size, bool flush_immediately) => ()
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::IntPoint screen_position) =|
WM_SetWindowTaskbarRect(i32 client_id, i32 window_id, Gfx::IntRect rect) =|
SetWindowHasAlphaChannel(i32 window_id, bool has_alpha_channel) => ()
MoveWindowToFront(i32 window_id) => ()
SetFullscreen(i32 window_id, bool fullscreen) => ()
PopupMenu(i32 menu_id, Gfx::IntPoint screen_position) => ()
DismissMenu(i32 menu_id) => ()
AsyncSetWallpaper(String path) =|
SetBackgroundColor(String background_color) => ()
SetWallpaperMode(String mode) => ()
SetResolution(Gfx::IntSize resolution) => (bool success, Gfx::IntSize resolution)
SetWindowIconBitmap(i32 window_id, Gfx::ShareableBitmap icon) => ()
GetWallpaper() => (String path)
SetWindowOverrideCursor(i32 window_id, i32 cursor_type) => ()
SetWindowCustomOverrideCursor(i32 window_id, Gfx::ShareableBitmap cursor) => ()
StartDrag([UTF8] String text, String data_type, String data, i32 bitmap_id, Gfx::IntSize bitmap_size) => (bool started)
SetSystemTheme(String theme_path, [UTF8] String theme_name) => (bool success)
GetSystemTheme() => ([UTF8] String theme_name)
SetWindowBaseSizeAndSizeIncrement(i32 window_id, Gfx::IntSize base_size, Gfx::IntSize size_increment) => ()
EnableDisplayLink() =|
DisableDisplayLink() =|
Pong() =|
}