1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 03:57:43 +00:00

WindowServer: Refactor more of the menu APIs to be message-based.

This is all pretty verbose but I can whittle it down later. :^)
This commit is contained in:
Andreas Kling 2019-02-13 18:48:22 +01:00
parent fbbf57b61c
commit cf432b4c3d
13 changed files with 229 additions and 171 deletions

View file

@ -292,23 +292,6 @@ DisplayInfo Process::set_video_resolution(int width, int height)
return info;
}
int Process::gui$menubar_add_menu(int menubar_id, int menu_id)
{
return WSWindowManager::the().api$menubar_add_menu(menubar_id, menu_id);
}
int Process::gui$menu_create(const char* name)
{
if (!validate_read_str(name))
return -EFAULT;
return WSWindowManager::the().api$menu_create(String(name));
}
int Process::gui$menu_destroy(int menu_id)
{
return WSWindowManager::the().api$menu_destroy(menu_id);
}
int Process::gui$menu_add_separator(int menu_id)
{
return WSWindowManager::the().api$menu_add_separator(menu_id);
@ -320,8 +303,3 @@ int Process::gui$menu_add_item(int menu_id, unsigned identifier, const char* tex
return -EFAULT;
return WSWindowManager::the().api$menu_add_item(menu_id, identifier, String(text));
}
int Process::gui$set_menubar(int menubar_id)
{
return WSWindowManager::the().api$app_set_menubar(menubar_id);
}