Move DisplayServer enums and typedefs to DisplayServerEnums

This will allow decoupling `display_server.h` from a number of headers in the
codebase which only require those enums and not all the DisplayServer API.
This commit is contained in:
Rémi Verschelde 2026-02-26 12:36:47 +01:00
parent 778cf54dab
commit a447ac95ec
No known key found for this signature in database
GPG key ID: C3336907360768E1
160 changed files with 4584 additions and 4520 deletions

View file

@ -193,7 +193,7 @@ void EmbeddedProcess::embed_process(OS::ProcessID p_pid) {
return;
}
ERR_FAIL_COND_MSG(!DisplayServer::get_singleton()->has_feature(DisplayServer::FEATURE_WINDOW_EMBEDDING), "Embedded process not supported by this display server.");
ERR_FAIL_COND_MSG(!DisplayServer::get_singleton()->has_feature(DisplayServerEnums::FEATURE_WINDOW_EMBEDDING), "Embedded process not supported by this display server.");
if (current_process_id != 0) {
// Stop embedding the last process.
@ -369,7 +369,7 @@ void EmbeddedProcess::_check_mouse_over() {
}
// Don't grab the focus if mouse over another window.
DisplayServer::WindowID window_id_over = DisplayServer::get_singleton()->get_window_at_screen_position(mouse_position);
DisplayServerEnums::WindowID window_id_over = DisplayServer::get_singleton()->get_window_at_screen_position(mouse_position);
if (window_id_over > 0 && window_id_over != window->get_window_id()) {
return;
}
@ -377,8 +377,8 @@ void EmbeddedProcess::_check_mouse_over() {
// Check if there's an exclusive popup, an open menu, or a tooltip.
// We don't want to grab focus to prevent the game window from coming to the front of the modal window
// or the open menu from closing when the mouse cursor moves outside the menu and over the embedded game.
Vector<DisplayServer::WindowID> wl = DisplayServer::get_singleton()->get_window_list();
for (const DisplayServer::WindowID &window_id : wl) {
Vector<DisplayServerEnums::WindowID> wl = DisplayServer::get_singleton()->get_window_list();
for (const DisplayServerEnums::WindowID &window_id : wl) {
Window *w = Window::get_from_id(window_id);
if (w && (w->is_exclusive() || w->get_flag(Window::FLAG_POPUP))) {
return;
@ -428,8 +428,8 @@ void EmbeddedProcess::_check_focused_process_id() {
}
Window *EmbeddedProcess::_get_current_modal_window() {
Vector<DisplayServer::WindowID> wl = DisplayServer::get_singleton()->get_window_list();
for (const DisplayServer::WindowID &window_id : wl) {
Vector<DisplayServerEnums::WindowID> wl = DisplayServer::get_singleton()->get_window_list();
for (const DisplayServerEnums::WindowID &window_id : wl) {
Window *w = Window::get_from_id(window_id);
if (!w) {
continue;