ladybird/Userland/Services/WindowServer/WindowServer.ipc
Andreas Kling 6a132d8672 WindowServer+LibGUI: Allow specifying a "launch origin" for new windows
The launch_origin_rect parameter to create_window() specifies where on
screen the window was launched from. It's optional, but if you provide
it, the new window will have a short wireframe animation from the origin
to the initial window frame rect.

GUI::Window looks for the "__libgui_launch_origin_rect" environment
variable. Put your launch origin rect in there with the format
"<x>,<y>,<width>,<height>" and the first GUI::Window shown by the app
will use that as the launch origin rect.

Also it looks pretty neat, although I'm sure we can improve it. :^)
2021-06-27 19:38:11 +02:00

140 lines
5.0 KiB
Plaintext

endpoint WindowServer
{
create_menubar(i32 menubar_id) =|
destroy_menubar(i32 menubar_id) =|
create_menu(i32 menu_id, [UTF8] String menu_title) =|
destroy_menu(i32 menu_id) =|
add_menu_to_menubar(i32 menubar_id, i32 menu_id) =|
add_menu_item(
i32 menu_id,
i32 identifier,
i32 submenu_id,
[UTF8] String text,
bool enabled,
bool checkable,
bool checked,
bool is_default,
[UTF8] String shortcut,
Gfx::ShareableBitmap icon,
bool exclusive) =|
add_menu_separator(i32 menu_id) =|
update_menu_item(i32 menu_id, i32 identifier, i32 submenu_id, [UTF8] String text, bool enabled, bool checkable, bool checked, bool is_default, [UTF8] String shortcut) =|
create_window(
i32 window_id,
Gfx::IntRect rect,
bool auto_position,
bool has_alpha_channel,
bool modal,
bool minimizable,
bool resizable,
bool fullscreen,
bool frameless,
bool accessory,
float opacity,
float alpha_hit_threshold,
Gfx::IntSize base_size,
Gfx::IntSize size_increment,
Gfx::IntSize minimum_size,
Optional<Gfx::IntSize> resize_aspect_ratio,
i32 type,
[UTF8] String title,
i32 parent_window_id,
Gfx::IntRect launch_origin_rect) =|
destroy_window(i32 window_id) => (Vector<i32> destroyed_window_ids)
set_window_menubar(i32 window_id, i32 menubar_id) =|
set_window_title(i32 window_id, [UTF8] String title) =|
get_window_title(i32 window_id) => ([UTF8] String title)
set_window_progress(i32 window_id, Optional<i32> progress) =|
set_window_modified(i32 window_id, bool modified) =|
is_window_modified(i32 window_id) => (bool modified)
set_window_rect(i32 window_id, Gfx::IntRect rect) => (Gfx::IntRect rect)
get_window_rect(i32 window_id) => (Gfx::IntRect rect)
set_window_minimum_size(i32 window_id, Gfx::IntSize size) =|
get_window_minimum_size(i32 window_id) => (Gfx::IntSize size)
get_applet_rect_on_screen(i32 window_id) => (Gfx::IntRect rect)
start_window_resize(i32 window_id) =|
is_maximized(i32 window_id) => (bool maximized)
set_maximized(i32 window_id, bool maximized) =|
invalidate_rect(i32 window_id, Vector<Gfx::IntRect> rects, bool ignore_occlusion) =|
did_finish_painting(i32 window_id, Vector<Gfx::IntRect> rects) =|
set_global_cursor_tracking(i32 window_id, bool enabled) => ()
set_window_opacity(i32 window_id, float opacity) =|
set_window_alpha_hit_threshold(i32 window_id, float threshold) =|
set_window_backing_store(i32 window_id, i32 bpp, i32 pitch, IPC::File anon_file, i32 serial, bool has_alpha_channel, Gfx::IntSize size, bool flush_immediately) => ()
set_window_has_alpha_channel(i32 window_id, bool has_alpha_channel) =|
move_window_to_front(i32 window_id) =|
set_fullscreen(i32 window_id, bool fullscreen) => ()
set_frameless(i32 window_id, bool frameless) => ()
popup_menu(i32 menu_id, Gfx::IntPoint screen_position) =|
dismiss_menu(i32 menu_id) =|
set_wallpaper(String path) =|
set_background_color(String background_color) =|
set_wallpaper_mode(String mode) =|
set_screen_layout(::WindowServer::ScreenLayout screen_layout, bool save) => (bool success, String error_msg)
get_screen_layout() => (::WindowServer::ScreenLayout screen_layout)
save_screen_layout() => (bool success, String error_msg)
show_screen_numbers(bool show) =|
set_window_icon_bitmap(i32 window_id, Gfx::ShareableBitmap icon) =|
get_wallpaper() => (String path)
set_window_cursor(i32 window_id, i32 cursor_type) =|
set_window_custom_cursor(i32 window_id, Gfx::ShareableBitmap cursor) =|
start_drag([UTF8] String text, HashMap<String,ByteBuffer> mime_data, Gfx::ShareableBitmap drag_bitmap) => (bool started)
set_system_theme(String theme_path, [UTF8] String theme_name) => (bool success)
get_system_theme() => ([UTF8] String theme_name)
refresh_system_theme() =|
set_system_fonts(String default_font_query, String fixed_width_font_query) => (bool success)
set_window_base_size_and_size_increment(i32 window_id, Gfx::IntSize base_size, Gfx::IntSize size_increment) =|
set_window_resize_aspect_ratio(i32 window_id, Optional<Gfx::IntSize> resize_aspect_ratio) =|
enable_display_link() =|
disable_display_link() =|
get_global_cursor_position() => (Gfx::IntPoint position)
set_mouse_acceleration(float factor) => ()
get_mouse_acceleration() => (float factor)
set_scroll_step_size(u32 step_size) => ()
get_scroll_step_size() => (u32 step_size)
get_screen_bitmap(Optional<Gfx::IntRect> rect, Optional<u32> screen_index) => (Gfx::ShareableBitmap bitmap)
get_screen_bitmap_around_cursor(Gfx::IntSize size) => (Gfx::ShareableBitmap bitmap)
pong() =|
set_double_click_speed(int speed) => ()
get_double_click_speed() => (int speed)
get_desktop_display_scale(u32 screen_index) => (int desktop_display_scale)
}