mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +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:
parent
fbbf57b61c
commit
cf432b4c3d
13 changed files with 229 additions and 171 deletions
24
LibC/gui.cpp
24
LibC/gui.cpp
|
@ -69,24 +69,6 @@ int gui_set_global_cursor_tracking_enabled(int window_id, bool enabled)
|
|||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int gui_menubar_add_menu(int menubar_id, int menu_id)
|
||||
{
|
||||
int rc = syscall(SC_gui_menubar_add_menu, menubar_id, menu_id);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int gui_menu_create(const char* name)
|
||||
{
|
||||
int rc = syscall(SC_gui_menu_create, name);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int gui_menu_destroy(int menu_id)
|
||||
{
|
||||
int rc = syscall(SC_gui_menu_destroy, menu_id);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int gui_menu_add_separator(int menu_id)
|
||||
{
|
||||
int rc = syscall(SC_gui_menu_add_separator, menu_id);
|
||||
|
@ -98,9 +80,3 @@ int gui_menu_add_item(int menu_id, unsigned identifier, const char* text)
|
|||
int rc = syscall(SC_gui_menu_add_item, menu_id, identifier, text);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
||||
int gui_app_set_menubar(int menubar_id)
|
||||
{
|
||||
int rc = syscall(SC_gui_app_set_menubar, menubar_id);
|
||||
__RETURN_WITH_ERRNO(rc, rc, -1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue