Browse Source

Remove `display_server.h` transitive include from `node.h`.

Lukas Tenbrink 2 months ago
parent
commit
1e0b41ab27

+ 1 - 0
editor/inspector/editor_preview_plugins.h

@@ -30,6 +30,7 @@
 
 #pragma once
 
+#include "core/io/image.h"
 #include "editor/inspector/editor_resource_preview.h"
 
 class ScriptLanguage;

+ 1 - 0
modules/multiplayer/multiplayer_debugger.cpp

@@ -34,6 +34,7 @@
 #include "scene_replication_config.h"
 
 #include "core/debugger/engine_debugger.h"
+#include "core/os/os.h"
 #include "scene/main/node.h"
 
 List<Ref<EngineProfiler>> multiplayer_profilers;

+ 0 - 3
modules/multiplayer/scene_multiplayer.cpp

@@ -32,10 +32,7 @@
 
 #include "core/debugger/engine_debugger.h"
 #include "core/io/marshalls.h"
-
-#ifdef DEBUG_ENABLED
 #include "core/os/os.h"
-#endif
 
 #ifdef DEBUG_ENABLED
 _FORCE_INLINE_ void SceneMultiplayer::_profile_bandwidth(const String &p_what, int p_value) {

+ 1 - 0
modules/multiplayer/scene_replication_interface.cpp

@@ -34,6 +34,7 @@
 
 #include "core/debugger/engine_debugger.h"
 #include "core/io/marshalls.h"
+#include "core/os/os.h"
 #include "scene/main/node.h"
 
 #define MAKE_ROOM(m_amount)             \

+ 1 - 0
modules/multiplayer/scene_replication_interface.h

@@ -34,6 +34,7 @@
 #include "multiplayer_synchronizer.h"
 
 #include "core/object/ref_counted.h"
+#include "core/templates/rb_set.h"
 
 class SceneMultiplayer;
 class SceneCacheInterface;

+ 1 - 0
scene/audio/audio_stream_player.cpp

@@ -33,6 +33,7 @@
 
 #include "scene/audio/audio_stream_player_internal.h"
 #include "servers/audio/audio_stream.h"
+#include "servers/display/display_server.h"
 
 void AudioStreamPlayer::_notification(int p_what) {
 	if (p_what == NOTIFICATION_ACCESSIBILITY_UPDATE) {

+ 3 - 0
scene/main/node.cpp

@@ -33,7 +33,10 @@
 
 STATIC_ASSERT_INCOMPLETE_TYPE(class, Mesh);
 STATIC_ASSERT_INCOMPLETE_TYPE(class, RenderingServer);
+STATIC_ASSERT_INCOMPLETE_TYPE(class, DisplayServer);
 STATIC_ASSERT_INCOMPLETE_TYPE(class, Shader);
+STATIC_ASSERT_INCOMPLETE_TYPE(class, OS);
+STATIC_ASSERT_INCOMPLETE_TYPE(class, Engine);
 
 #include "core/config/project_settings.h"
 #include "core/io/resource_loader.h"

+ 2 - 0
scene/main/node.h

@@ -30,6 +30,8 @@
 
 #pragma once
 
+#include "core/input/input_event.h"
+#include "core/io/resource.h"
 #include "core/string/node_path.h"
 #include "core/templates/iterable.h"
 #include "core/variant/typed_array.h"

+ 2 - 2
scene/main/scene_tree.h

@@ -35,12 +35,12 @@
 #include "core/templates/paged_allocator.h"
 #include "core/templates/self_list.h"
 #include "scene/main/scene_tree_fti.h"
-#include "servers/display/display_server.h"
 
 #undef Window
 
 class ArrayMesh;
 class PackedScene;
+class InputEvent;
 class Node;
 #ifndef _3D_DISABLED
 class Node3D;
@@ -337,7 +337,7 @@ public:
 	void _accessibility_force_update();
 	void _accessibility_notify_change(const Node *p_node, bool p_remove = false);
 	void _flush_accessibility_changes();
-	void _process_accessibility_changes(DisplayServer::WindowID p_window_id);
+	void _process_accessibility_changes(int p_window_id); // Effectively DisplayServer::WindowID
 
 	virtual void initialize() override;
 

+ 2 - 0
scene/main/timer.cpp

@@ -30,6 +30,8 @@
 
 #include "timer.h"
 
+#include "core/config/engine.h"
+
 void Timer::_notification(int p_what) {
 	switch (p_what) {
 		case NOTIFICATION_READY: {

+ 1 - 0
scene/main/viewport.h

@@ -32,6 +32,7 @@
 
 #include "scene/main/node.h"
 #include "scene/resources/texture.h"
+#include "servers/display/display_server.h"
 
 #ifndef _3D_DISABLED
 class Camera3D;

+ 1 - 0
scene/resources/resource_format_text.h

@@ -33,6 +33,7 @@
 #include "core/io/file_access.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_saver.h"
+#include "core/templates/rb_map.h"
 #include "core/variant/variant_parser.h"
 #include "scene/resources/packed_scene.h"