From 46bf32517f12ec0473dd75bf1527e60bd180592a Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Sun, 5 Jan 2025 21:03:20 -0600 Subject: [PATCH] Style: Standardize Obj-C `#import` syntax --- .pre-commit-config.yaml | 8 ++++++- drivers/SCsub | 3 ++- drivers/apple/joypad_apple.mm | 2 +- drivers/coreaudio/audio_driver_coreaudio.h | 5 ---- drivers/coreaudio/audio_driver_coreaudio.mm | 2 +- drivers/coremidi/SCsub | 2 +- drivers/coremidi/midi_driver_coremidi.h | 5 ---- ...r_coremidi.cpp => midi_driver_coremidi.mm} | 4 ++-- drivers/metal/metal_device_properties.h | 7 +----- drivers/metal/metal_objects.h | 7 +----- drivers/metal/metal_utils.h | 5 ---- drivers/metal/pixel_formats.h | 7 +----- .../metal/rendering_context_driver_metal.h | 9 ++----- drivers/metal/rendering_device_driver_metal.h | 7 +----- .../metal/rendering_device_driver_metal.mm | 8 +++---- modules/camera/camera_macos.mm | 2 +- modules/mono/utils/macos_utils.cpp | 4 ++-- .../platform/openxr_metal_extension.mm | 5 ++-- platform/android/platform_config.h | 5 ++++ platform/ios/display_server_ios.h | 7 +----- platform/ios/ios.h | 5 ---- platform/ios/ios_terminal_logger.h | 5 ---- platform/ios/ios_terminal_logger.mm | 4 ++-- platform/ios/key_mapping_ios.h | 5 ---- platform/ios/os_ios.h | 5 ---- platform/ios/platform_config.h | 5 ++++ .../ios/rendering_context_driver_vulkan_ios.h | 5 ---- platform/ios/tts_ios.h | 5 ---- platform/linuxbsd/platform_config.h | 5 ++++ platform/macos/crash_handler_macos.h | 5 ---- platform/macos/crash_handler_macos.mm | 6 ++--- platform/macos/dir_access_macos.h | 5 ---- platform/macos/dir_access_macos.mm | 6 ++--- platform/macos/display_server_macos.h | 11 +++------ platform/macos/display_server_macos.mm | 24 +++++++++---------- platform/macos/gl_manager_macos_angle.h | 11 +++------ platform/macos/gl_manager_macos_angle.mm | 4 ++-- platform/macos/gl_manager_macos_legacy.h | 5 ---- platform/macos/gl_manager_macos_legacy.mm | 2 +- platform/macos/godot_application.h | 5 ---- platform/macos/godot_application.mm | 4 ++-- platform/macos/godot_application_delegate.h | 5 ---- platform/macos/godot_application_delegate.mm | 8 +++---- platform/macos/godot_button_view.h | 5 ---- platform/macos/godot_button_view.mm | 2 +- platform/macos/godot_content_view.h | 5 ---- platform/macos/godot_content_view.mm | 6 ++--- platform/macos/godot_main_macos.mm | 2 +- platform/macos/godot_menu_delegate.h | 5 ---- platform/macos/godot_menu_delegate.mm | 10 ++++---- platform/macos/godot_menu_item.h | 5 ---- platform/macos/godot_menu_item.mm | 2 +- platform/macos/godot_open_save_delegate.h | 5 ---- platform/macos/godot_open_save_delegate.mm | 2 +- platform/macos/godot_status_item.h | 5 ---- platform/macos/godot_status_item.mm | 4 ++-- platform/macos/godot_window.h | 5 ---- platform/macos/godot_window.mm | 4 ++-- platform/macos/godot_window_delegate.h | 5 ---- platform/macos/godot_window_delegate.mm | 8 +++---- platform/macos/key_mapping_macos.h | 5 ---- platform/macos/key_mapping_macos.mm | 2 +- platform/macos/macos_terminal_logger.h | 5 ---- platform/macos/macos_terminal_logger.mm | 2 +- platform/macos/native_menu_macos.h | 5 ---- platform/macos/native_menu_macos.mm | 8 +++---- platform/macos/os_macos.h | 7 +----- platform/macos/os_macos.mm | 14 +++++------ platform/macos/platform_config.h | 5 ++++ .../rendering_context_driver_vulkan_macos.h | 5 ---- .../rendering_context_driver_vulkan_macos.mm | 2 +- platform/macos/tts_macos.h | 5 ---- platform/macos/tts_macos.mm | 2 +- platform/web/platform_config.h | 5 ++++ platform/windows/platform_config.h | 5 ++++ 75 files changed, 132 insertions(+), 274 deletions(-) rename drivers/coremidi/{midi_driver_coremidi.cpp => midi_driver_coremidi.mm} (98%) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9127ad86e08..829da2d0297 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -154,7 +154,13 @@ repos: language: python entry: python misc/scripts/header_guards.py files: \.(h|hpp|hh|hxx)$ - exclude: ^.*/(dummy|thread|platform_config|platform_gl)\.h$ + exclude: | + (?x)^( + core/os/thread\.h| + drivers/(apple/coreaudio|coremidi|metal)/.*| + misc/dist/ios_xcode/.*| + platform/(ios|macos)/(?!platform_(config|gl))[^/]*\.h + )$ - id: file-format name: file-format diff --git a/drivers/SCsub b/drivers/SCsub index 153298c99e9..cc07a40f091 100644 --- a/drivers/SCsub +++ b/drivers/SCsub @@ -31,7 +31,8 @@ if env["platform"] in ["macos", "ios"]: SConscript("apple/SCsub") # Midi drivers SConscript("alsamidi/SCsub") -SConscript("coremidi/SCsub") +if env["platform"] in ["macos", "ios"]: + SConscript("coremidi/SCsub") SConscript("winmidi/SCsub") # Graphics drivers diff --git a/drivers/apple/joypad_apple.mm b/drivers/apple/joypad_apple.mm index 148ec4cb271..6c13627ebea 100644 --- a/drivers/apple/joypad_apple.mm +++ b/drivers/apple/joypad_apple.mm @@ -30,7 +30,7 @@ #import "joypad_apple.h" -#include +#import #import #include "core/config/project_settings.h" diff --git a/drivers/coreaudio/audio_driver_coreaudio.h b/drivers/coreaudio/audio_driver_coreaudio.h index 54e02514ec4..7b89b4cd2ab 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.h +++ b/drivers/coreaudio/audio_driver_coreaudio.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef AUDIO_DRIVER_COREAUDIO_H -#define AUDIO_DRIVER_COREAUDIO_H - #ifdef COREAUDIO_ENABLED #include "servers/audio_server.h" @@ -126,5 +123,3 @@ public: }; #endif // COREAUDIO_ENABLED - -#endif // AUDIO_DRIVER_COREAUDIO_H diff --git a/drivers/coreaudio/audio_driver_coreaudio.mm b/drivers/coreaudio/audio_driver_coreaudio.mm index 4e6ff2edb39..62e0b53ec6e 100644 --- a/drivers/coreaudio/audio_driver_coreaudio.mm +++ b/drivers/coreaudio/audio_driver_coreaudio.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "audio_driver_coreaudio.h" +#import "audio_driver_coreaudio.h" #ifdef COREAUDIO_ENABLED diff --git a/drivers/coremidi/SCsub b/drivers/coremidi/SCsub index 69d667c57bf..83ac27f4b61 100644 --- a/drivers/coremidi/SCsub +++ b/drivers/coremidi/SCsub @@ -4,4 +4,4 @@ from misc.utility.scons_hints import * Import("env") # Driver source files -env.add_source_files(env.drivers_sources, "*.cpp") +env.add_source_files(env.drivers_sources, "*.mm") diff --git a/drivers/coremidi/midi_driver_coremidi.h b/drivers/coremidi/midi_driver_coremidi.h index 02cbc6234c5..9e5fd36ba4c 100644 --- a/drivers/coremidi/midi_driver_coremidi.h +++ b/drivers/coremidi/midi_driver_coremidi.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef MIDI_DRIVER_COREMIDI_H -#define MIDI_DRIVER_COREMIDI_H - #ifdef COREMIDI_ENABLED #include "core/os/midi_driver.h" @@ -67,5 +64,3 @@ public: }; #endif // COREMIDI_ENABLED - -#endif // MIDI_DRIVER_COREMIDI_H diff --git a/drivers/coremidi/midi_driver_coremidi.cpp b/drivers/coremidi/midi_driver_coremidi.mm similarity index 98% rename from drivers/coremidi/midi_driver_coremidi.cpp rename to drivers/coremidi/midi_driver_coremidi.mm index f6cc59471ed..b280d20960a 100644 --- a/drivers/coremidi/midi_driver_coremidi.cpp +++ b/drivers/coremidi/midi_driver_coremidi.mm @@ -1,5 +1,5 @@ /**************************************************************************/ -/* midi_driver_coremidi.cpp */ +/* midi_driver_coremidi.mm */ /**************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "midi_driver_coremidi.h" +#import "midi_driver_coremidi.h" #ifdef COREMIDI_ENABLED diff --git a/drivers/metal/metal_device_properties.h b/drivers/metal/metal_device_properties.h index 815af367648..3b0bcf87f6c 100644 --- a/drivers/metal/metal_device_properties.h +++ b/drivers/metal/metal_device_properties.h @@ -48,10 +48,7 @@ /* permissions and limitations under the License. */ /**************************************************************************/ -#ifndef METAL_DEVICE_PROPERTIES_H -#define METAL_DEVICE_PROPERTIES_H - -#import "servers/rendering/rendering_device.h" +#include "servers/rendering/rendering_device.h" #import #import @@ -150,5 +147,3 @@ public: private: static const SampleCount sample_count[RenderingDevice::TextureSamples::TEXTURE_SAMPLES_MAX]; }; - -#endif // METAL_DEVICE_PROPERTIES_H diff --git a/drivers/metal/metal_objects.h b/drivers/metal/metal_objects.h index 4dc9b6d3f3d..f23c2ecd448 100644 --- a/drivers/metal/metal_objects.h +++ b/drivers/metal/metal_objects.h @@ -48,14 +48,11 @@ /* permissions and limitations under the License. */ /**************************************************************************/ -#ifndef METAL_OBJECTS_H -#define METAL_OBJECTS_H - #import "metal_device_properties.h" #import "metal_utils.h" #import "pixel_formats.h" -#import "servers/rendering/rendering_device_driver.h" +#include "servers/rendering/rendering_device_driver.h" #import #import @@ -976,5 +973,3 @@ auto release(RDD::ID p_id) { } } // namespace rid - -#endif // METAL_OBJECTS_H diff --git a/drivers/metal/metal_utils.h b/drivers/metal/metal_utils.h index 6bb2e2dd158..1747c6a0b41 100644 --- a/drivers/metal/metal_utils.h +++ b/drivers/metal/metal_utils.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef METAL_UTILS_H -#define METAL_UTILS_H - #import #pragma mark - Boolean flags @@ -101,5 +98,3 @@ private: extern os_log_t LOG_DRIVER; // Used for dynamic tracing. extern os_log_t LOG_INTERVALS; - -#endif // METAL_UTILS_H diff --git a/drivers/metal/pixel_formats.h b/drivers/metal/pixel_formats.h index 296e91e709d..2ff54a40f9c 100644 --- a/drivers/metal/pixel_formats.h +++ b/drivers/metal/pixel_formats.h @@ -48,16 +48,13 @@ /* permissions and limitations under the License. */ /**************************************************************************/ -#ifndef PIXEL_FORMATS_H -#define PIXEL_FORMATS_H - #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" #import "inflection_map.h" #import "metal_device_properties.h" -#import "servers/rendering/rendering_device.h" +#include "servers/rendering/rendering_device.h" #import @@ -409,5 +406,3 @@ protected: }; #pragma clang diagnostic pop - -#endif // PIXEL_FORMATS_H diff --git a/drivers/metal/rendering_context_driver_metal.h b/drivers/metal/rendering_context_driver_metal.h index 2f6d46d71bb..94aad430ee8 100644 --- a/drivers/metal/rendering_context_driver_metal.h +++ b/drivers/metal/rendering_context_driver_metal.h @@ -28,13 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef RENDERING_CONTEXT_DRIVER_METAL_H -#define RENDERING_CONTEXT_DRIVER_METAL_H - #ifdef METAL_ENABLED -#import "servers/rendering/rendering_context_driver.h" -#import "servers/rendering/rendering_device_driver.h" +#include "servers/rendering/rendering_context_driver.h" +#include "servers/rendering/rendering_device_driver.h" #import @@ -143,5 +140,3 @@ public: }; #endif // METAL_ENABLED - -#endif // RENDERING_CONTEXT_DRIVER_METAL_H diff --git a/drivers/metal/rendering_device_driver_metal.h b/drivers/metal/rendering_device_driver_metal.h index 5ac1bab4c1b..53726b04e01 100644 --- a/drivers/metal/rendering_device_driver_metal.h +++ b/drivers/metal/rendering_device_driver_metal.h @@ -28,12 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef RENDERING_DEVICE_DRIVER_METAL_H -#define RENDERING_DEVICE_DRIVER_METAL_H - #import "metal_objects.h" -#import "servers/rendering/rendering_device_driver.h" +#include "servers/rendering/rendering_device_driver.h" #import #import @@ -444,5 +441,3 @@ public: RenderingDeviceDriverMetal(RenderingContextDriverMetal *p_context_driver); ~RenderingDeviceDriverMetal(); }; - -#endif // RENDERING_DEVICE_DRIVER_METAL_H diff --git a/drivers/metal/rendering_device_driver_metal.mm b/drivers/metal/rendering_device_driver_metal.mm index 2e32e99c2eb..ce181353d7a 100644 --- a/drivers/metal/rendering_device_driver_metal.mm +++ b/drivers/metal/rendering_device_driver_metal.mm @@ -53,10 +53,10 @@ #import "pixel_formats.h" #import "rendering_context_driver_metal.h" -#import "core/io/compression.h" -#import "core/io/marshalls.h" -#import "core/string/ustring.h" -#import "core/templates/hash_map.h" +#include "core/io/compression.h" +#include "core/io/marshalls.h" +#include "core/string/ustring.h" +#include "core/templates/hash_map.h" #import #import diff --git a/modules/camera/camera_macos.mm b/modules/camera/camera_macos.mm index d242444b0b5..3d0e08045bf 100644 --- a/modules/camera/camera_macos.mm +++ b/modules/camera/camera_macos.mm @@ -31,7 +31,7 @@ ///@TODO this is a near duplicate of CameraIOS, we should find a way to combine those to minimize code duplication!!!! // If you fix something here, make sure you fix it there as well! -#include "camera_macos.h" +#import "camera_macos.h" #include "servers/camera/camera_feed.h" diff --git a/modules/mono/utils/macos_utils.cpp b/modules/mono/utils/macos_utils.cpp index 8563c92dd84..a0662328d5c 100644 --- a/modules/mono/utils/macos_utils.cpp +++ b/modules/mono/utils/macos_utils.cpp @@ -28,10 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "macos_utils.h" - #ifdef MACOS_ENABLED +#import "macos_utils.h" + #include "core/string/print_string.h" #import diff --git a/modules/openxr/extensions/platform/openxr_metal_extension.mm b/modules/openxr/extensions/platform/openxr_metal_extension.mm index 0b141f0b6b7..98dd5de505c 100644 --- a/modules/openxr/extensions/platform/openxr_metal_extension.mm +++ b/modules/openxr/extensions/platform/openxr_metal_extension.mm @@ -28,10 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "openxr_metal_extension.h" +#import "openxr_metal_extension.h" #include "../../openxr_util.h" -#include "drivers/metal/rendering_device_driver_metal.h" + +#import "drivers/metal/rendering_device_driver_metal.h" #include "servers/rendering/rendering_server_globals.h" HashMap OpenXRMetalExtension::get_requested_extensions() { diff --git a/platform/android/platform_config.h b/platform/android/platform_config.h index d2376d2de79..d23856d645f 100644 --- a/platform/android/platform_config.h +++ b/platform/android/platform_config.h @@ -28,5 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#ifndef PLATFORM_CONFIG_H +#define PLATFORM_CONFIG_H + #include #include + +#endif // PLATFORM_CONFIG_H diff --git a/platform/ios/display_server_ios.h b/platform/ios/display_server_ios.h index 696f72b0f8d..d4dd2c7053b 100644 --- a/platform/ios/display_server_ios.h +++ b/platform/ios/display_server_ios.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef DISPLAY_SERVER_IOS_H -#define DISPLAY_SERVER_IOS_H - #include "core/input/input.h" #include "servers/display_server.h" @@ -45,7 +42,7 @@ #endif // VULKAN_ENABLED #if defined(METAL_ENABLED) -#include "drivers/metal/rendering_context_driver_metal.h" +#import "drivers/metal/rendering_context_driver_metal.h" #endif // METAL_ENABLED #endif // RD_ENABLED @@ -235,5 +232,3 @@ public: void resize_window(CGSize size); virtual void swap_buffers() override {} }; - -#endif // DISPLAY_SERVER_IOS_H diff --git a/platform/ios/ios.h b/platform/ios/ios.h index cb5be64cee8..31f1f510d4c 100644 --- a/platform/ios/ios.h +++ b/platform/ios/ios.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef IOS_H -#define IOS_H - #include "core/object/class_db.h" #import @@ -58,5 +55,3 @@ public: iOS(); }; - -#endif // IOS_H diff --git a/platform/ios/ios_terminal_logger.h b/platform/ios/ios_terminal_logger.h index 7f0bc37a077..2f0d9c78867 100644 --- a/platform/ios/ios_terminal_logger.h +++ b/platform/ios/ios_terminal_logger.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef IOS_TERMINAL_LOGGER_H -#define IOS_TERMINAL_LOGGER_H - #ifdef IOS_ENABLED #include "core/io/logger.h" @@ -41,5 +38,3 @@ public: }; #endif // IOS_ENABLED - -#endif // IOS_TERMINAL_LOGGER_H diff --git a/platform/ios/ios_terminal_logger.mm b/platform/ios/ios_terminal_logger.mm index b4c9821cdc7..c5a6d1113ac 100644 --- a/platform/ios/ios_terminal_logger.mm +++ b/platform/ios/ios_terminal_logger.mm @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "ios_terminal_logger.h" +#import "ios_terminal_logger.h" #ifdef IOS_ENABLED -#include +#import void IOSTerminalLogger::log_error(const char *p_function, const char *p_file, int p_line, const char *p_code, const char *p_rationale, bool p_editor_notify, ErrorType p_type) { if (!should_log(true)) { diff --git a/platform/ios/key_mapping_ios.h b/platform/ios/key_mapping_ios.h index 8874da30243..57ad32304ee 100644 --- a/platform/ios/key_mapping_ios.h +++ b/platform/ios/key_mapping_ios.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef KEY_MAPPING_IOS_H -#define KEY_MAPPING_IOS_H - #include "core/os/keyboard.h" #import @@ -43,5 +40,3 @@ public: static Key remap_key(CFIndex p_keycode); static KeyLocation key_location(CFIndex p_keycode); }; - -#endif // KEY_MAPPING_IOS_H diff --git a/platform/ios/os_ios.h b/platform/ios/os_ios.h index 94b38f2c40c..d04bddeea1a 100644 --- a/platform/ios/os_ios.h +++ b/platform/ios/os_ios.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef OS_IOS_H -#define OS_IOS_H - #ifdef IOS_ENABLED #import "ios.h" @@ -136,5 +133,3 @@ public: }; #endif // IOS_ENABLED - -#endif // OS_IOS_H diff --git a/platform/ios/platform_config.h b/platform/ios/platform_config.h index 01b0a12b5d3..0714172a5dc 100644 --- a/platform/ios/platform_config.h +++ b/platform/ios/platform_config.h @@ -28,6 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#ifndef PLATFORM_CONFIG_H +#define PLATFORM_CONFIG_H + #include #define PTHREAD_RENAME_SELF @@ -38,3 +41,5 @@ _Pragma("clang diagnostic ignored \"-Wshadow\"") \ __strong typeof(var) var = GDWeak_##var; \ _Pragma("clang diagnostic pop") + +#endif // PLATFORM_CONFIG_H diff --git a/platform/ios/rendering_context_driver_vulkan_ios.h b/platform/ios/rendering_context_driver_vulkan_ios.h index dc85ff738dc..ef5a8a03931 100644 --- a/platform/ios/rendering_context_driver_vulkan_ios.h +++ b/platform/ios/rendering_context_driver_vulkan_ios.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef RENDERING_CONTEXT_DRIVER_VULKAN_IOS_H -#define RENDERING_CONTEXT_DRIVER_VULKAN_IOS_H - #ifdef VULKAN_ENABLED #include "drivers/vulkan/rendering_context_driver_vulkan.h" @@ -54,5 +51,3 @@ public: }; #endif // VULKAN_ENABLED - -#endif // RENDERING_CONTEXT_DRIVER_VULKAN_IOS_H diff --git a/platform/ios/tts_ios.h b/platform/ios/tts_ios.h index 217f55da662..a0408e2f59f 100644 --- a/platform/ios/tts_ios.h +++ b/platform/ios/tts_ios.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef TTS_IOS_H -#define TTS_IOS_H - #include "core/string/ustring.h" #include "core/templates/hash_map.h" #include "core/templates/list.h" @@ -59,5 +56,3 @@ - (void)speak:(const String &)text voice:(const String &)voice volume:(int)volume pitch:(float)pitch rate:(float)rate utterance_id:(int)utterance_id interrupt:(bool)interrupt; - (Array)getVoices; @end - -#endif // TTS_IOS_H diff --git a/platform/linuxbsd/platform_config.h b/platform/linuxbsd/platform_config.h index c372ef28f6e..1cdf03bdf5e 100644 --- a/platform/linuxbsd/platform_config.h +++ b/platform/linuxbsd/platform_config.h @@ -28,6 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#ifndef PLATFORM_CONFIG_H +#define PLATFORM_CONFIG_H + #ifdef __linux__ #include #endif @@ -43,3 +46,5 @@ #define PTHREAD_BSD_SET_NAME #endif #endif + +#endif // PLATFORM_CONFIG_H diff --git a/platform/macos/crash_handler_macos.h b/platform/macos/crash_handler_macos.h index d52cb7234af..e167b5e5dbf 100644 --- a/platform/macos/crash_handler_macos.h +++ b/platform/macos/crash_handler_macos.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef CRASH_HANDLER_MACOS_H -#define CRASH_HANDLER_MACOS_H - class CrashHandler { bool disabled; @@ -43,5 +40,3 @@ public: CrashHandler(); ~CrashHandler(); }; - -#endif // CRASH_HANDLER_MACOS_H diff --git a/platform/macos/crash_handler_macos.mm b/platform/macos/crash_handler_macos.mm index bc83c077b11..a71cd05e8bb 100644 --- a/platform/macos/crash_handler_macos.mm +++ b/platform/macos/crash_handler_macos.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "crash_handler_macos.h" +#import "crash_handler_macos.h" #include "core/config/project_settings.h" #include "core/os/os.h" @@ -50,8 +50,8 @@ #include #include -#include -#include +#import +#import static uint64_t load_address() { const struct segment_command_64 *cmd = getsegbyname("__TEXT"); diff --git a/platform/macos/dir_access_macos.h b/platform/macos/dir_access_macos.h index 17a00b7f480..7080ca66dc6 100644 --- a/platform/macos/dir_access_macos.h +++ b/platform/macos/dir_access_macos.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef DIR_ACCESS_MACOS_H -#define DIR_ACCESS_MACOS_H - #if defined(UNIX_ENABLED) #include "core/io/dir_access.h" @@ -55,5 +52,3 @@ protected: }; #endif // UNIX ENABLED - -#endif // DIR_ACCESS_MACOS_H diff --git a/platform/macos/dir_access_macos.mm b/platform/macos/dir_access_macos.mm index 8d03dc1c91f..1851d66612a 100644 --- a/platform/macos/dir_access_macos.mm +++ b/platform/macos/dir_access_macos.mm @@ -28,12 +28,12 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "dir_access_macos.h" - -#include "core/config/project_settings.h" +#import "dir_access_macos.h" #if defined(UNIX_ENABLED) +#include "core/config/project_settings.h" + #include #import diff --git a/platform/macos/display_server_macos.h b/platform/macos/display_server_macos.h index 32ab1fc478d..7bbc9d52282 100644 --- a/platform/macos/display_server_macos.h +++ b/platform/macos/display_server_macos.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef DISPLAY_SERVER_MACOS_H -#define DISPLAY_SERVER_MACOS_H - #include "core/input/input.h" #include "servers/display_server.h" @@ -39,16 +36,16 @@ #include "gl_manager_macos_legacy.h" #endif // GLES3_ENABLED -#include "native_menu_macos.h" +#import "native_menu_macos.h" #if defined(RD_ENABLED) #include "servers/rendering/rendering_device.h" #if defined(VULKAN_ENABLED) -#include "rendering_context_driver_vulkan_macos.h" +#import "rendering_context_driver_vulkan_macos.h" #endif // VULKAN_ENABLED #if defined(METAL_ENABLED) -#include "drivers/metal/rendering_context_driver_metal.h" +#import "drivers/metal/rendering_context_driver_metal.h" #endif #endif // RD_ENABLED @@ -461,5 +458,3 @@ public: DisplayServerMacOS(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i *p_position, const Vector2i &p_resolution, int p_screen, Context p_context, int64_t p_parent_window, Error &r_error); ~DisplayServerMacOS(); }; - -#endif // DISPLAY_SERVER_MACOS_H diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index 174e28310ef..b2136ce836b 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -28,19 +28,19 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "display_server_macos.h" +#import "display_server_macos.h" -#include "godot_button_view.h" -#include "godot_content_view.h" -#include "godot_menu_delegate.h" -#include "godot_menu_item.h" -#include "godot_open_save_delegate.h" -#include "godot_status_item.h" -#include "godot_window.h" -#include "godot_window_delegate.h" -#include "key_mapping_macos.h" -#include "os_macos.h" -#include "tts_macos.h" +#import "godot_button_view.h" +#import "godot_content_view.h" +#import "godot_menu_delegate.h" +#import "godot_menu_item.h" +#import "godot_open_save_delegate.h" +#import "godot_status_item.h" +#import "godot_window.h" +#import "godot_window_delegate.h" +#import "key_mapping_macos.h" +#import "os_macos.h" +#import "tts_macos.h" #include "core/config/project_settings.h" #include "core/io/marshalls.h" diff --git a/platform/macos/gl_manager_macos_angle.h b/platform/macos/gl_manager_macos_angle.h index 919b8ec9c86..c39d2096614 100644 --- a/platform/macos/gl_manager_macos_angle.h +++ b/platform/macos/gl_manager_macos_angle.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GL_MANAGER_MACOS_ANGLE_H -#define GL_MANAGER_MACOS_ANGLE_H - #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED) #include "core/error/error_list.h" @@ -39,9 +36,9 @@ #include "drivers/egl/egl_manager.h" #include "servers/display_server.h" -#include -#include -#include +#import +#import +#import class GLManagerANGLE_MacOS : public EGLManager { private: @@ -59,5 +56,3 @@ public: }; #endif // MACOS_ENABLED && GLES3_ENABLED - -#endif // GL_MANAGER_MACOS_ANGLE_H diff --git a/platform/macos/gl_manager_macos_angle.mm b/platform/macos/gl_manager_macos_angle.mm index ac2f20ee7e8..85b0693db89 100644 --- a/platform/macos/gl_manager_macos_angle.mm +++ b/platform/macos/gl_manager_macos_angle.mm @@ -28,14 +28,14 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gl_manager_macos_angle.h" +#import "gl_manager_macos_angle.h" #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED) #include #include -#include +#import const char *GLManagerANGLE_MacOS::_get_platform_extension_name() const { return "EGL_ANGLE_platform_angle"; diff --git a/platform/macos/gl_manager_macos_legacy.h b/platform/macos/gl_manager_macos_legacy.h index 383c5c3306c..e59470ad939 100644 --- a/platform/macos/gl_manager_macos_legacy.h +++ b/platform/macos/gl_manager_macos_legacy.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GL_MANAGER_MACOS_LEGACY_H -#define GL_MANAGER_MACOS_LEGACY_H - #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED) #include "core/error/error_list.h" @@ -94,5 +91,3 @@ public: #pragma clang diagnostic push #endif // MACOS_ENABLED && GLES3_ENABLED - -#endif // GL_MANAGER_MACOS_LEGACY_H diff --git a/platform/macos/gl_manager_macos_legacy.mm b/platform/macos/gl_manager_macos_legacy.mm index a0d037144e2..7dee5780cdd 100644 --- a/platform/macos/gl_manager_macos_legacy.mm +++ b/platform/macos/gl_manager_macos_legacy.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "gl_manager_macos_legacy.h" +#import "gl_manager_macos_legacy.h" #if defined(MACOS_ENABLED) && defined(GLES3_ENABLED) diff --git a/platform/macos/godot_application.h b/platform/macos/godot_application.h index 8749c8fbb0e..fc49c0ead9f 100644 --- a/platform/macos/godot_application.h +++ b/platform/macos/godot_application.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_APPLICATION_H -#define GODOT_APPLICATION_H - #include "core/os/os.h" #import @@ -39,5 +36,3 @@ @interface GodotApplication : NSApplication @end - -#endif // GODOT_APPLICATION_H diff --git a/platform/macos/godot_application.mm b/platform/macos/godot_application.mm index f5e1bb43bf0..f6063dd0d19 100644 --- a/platform/macos/godot_application.mm +++ b/platform/macos/godot_application.mm @@ -28,9 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_application.h" +#import "godot_application.h" -#include "display_server_macos.h" +#import "display_server_macos.h" @implementation GodotApplication diff --git a/platform/macos/godot_application_delegate.h b/platform/macos/godot_application_delegate.h index 45bd85c45cf..6d0ba091fc6 100644 --- a/platform/macos/godot_application_delegate.h +++ b/platform/macos/godot_application_delegate.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_APPLICATION_DELEGATE_H -#define GODOT_APPLICATION_DELEGATE_H - #include "core/os/os.h" #import @@ -42,5 +39,3 @@ - (void)forceUnbundledWindowActivationHackStep3; - (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent; @end - -#endif // GODOT_APPLICATION_DELEGATE_H diff --git a/platform/macos/godot_application_delegate.mm b/platform/macos/godot_application_delegate.mm index 02466bab974..2f69993a16e 100644 --- a/platform/macos/godot_application_delegate.mm +++ b/platform/macos/godot_application_delegate.mm @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_application_delegate.h" +#import "godot_application_delegate.h" -#include "display_server_macos.h" -#include "native_menu_macos.h" -#include "os_macos.h" +#import "display_server_macos.h" +#import "native_menu_macos.h" +#import "os_macos.h" @implementation GodotApplicationDelegate diff --git a/platform/macos/godot_button_view.h b/platform/macos/godot_button_view.h index cbf13f7e5ef..d4bb55cf673 100644 --- a/platform/macos/godot_button_view.h +++ b/platform/macos/godot_button_view.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_BUTTON_VIEW_H -#define GODOT_BUTTON_VIEW_H - #include "servers/display_server.h" #import @@ -53,5 +50,3 @@ - (NSPoint)getOffset; @end - -#endif // GODOT_BUTTON_VIEW_H diff --git a/platform/macos/godot_button_view.mm b/platform/macos/godot_button_view.mm index db4be0441d1..e892fdd8afc 100644 --- a/platform/macos/godot_button_view.mm +++ b/platform/macos/godot_button_view.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_button_view.h" +#import "godot_button_view.h" @implementation GodotButtonView diff --git a/platform/macos/godot_content_view.h b/platform/macos/godot_content_view.h index dc8d11be541..4aa8f7c045a 100644 --- a/platform/macos/godot_content_view.h +++ b/platform/macos/godot_content_view.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_CONTENT_VIEW_H -#define GODOT_CONTENT_VIEW_H - #include "servers/display_server.h" #import @@ -80,5 +77,3 @@ @end #pragma clang diagnostic pop - -#endif // GODOT_CONTENT_VIEW_H diff --git a/platform/macos/godot_content_view.mm b/platform/macos/godot_content_view.mm index eff33208db4..7ec93b099d9 100644 --- a/platform/macos/godot_content_view.mm +++ b/platform/macos/godot_content_view.mm @@ -28,10 +28,10 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_content_view.h" +#import "godot_content_view.h" -#include "display_server_macos.h" -#include "key_mapping_macos.h" +#import "display_server_macos.h" +#import "key_mapping_macos.h" #include "main/main.h" diff --git a/platform/macos/godot_main_macos.mm b/platform/macos/godot_main_macos.mm index eebaed0eaf5..c3a6449564e 100644 --- a/platform/macos/godot_main_macos.mm +++ b/platform/macos/godot_main_macos.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "os_macos.h" +#import "os_macos.h" #include "main/main.h" diff --git a/platform/macos/godot_menu_delegate.h b/platform/macos/godot_menu_delegate.h index c2da3ad09e2..31ebc9f6ed2 100644 --- a/platform/macos/godot_menu_delegate.h +++ b/platform/macos/godot_menu_delegate.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_MENU_DELEGATE_H -#define GODOT_MENU_DELEGATE_H - #import #import @@ -40,5 +37,3 @@ - (void)doNothing:(id)sender; @end - -#endif // GODOT_MENU_DELEGATE_H diff --git a/platform/macos/godot_menu_delegate.mm b/platform/macos/godot_menu_delegate.mm index 16fdd0d189a..86d69f7941c 100644 --- a/platform/macos/godot_menu_delegate.mm +++ b/platform/macos/godot_menu_delegate.mm @@ -28,12 +28,12 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_menu_delegate.h" +#import "godot_menu_delegate.h" -#include "display_server_macos.h" -#include "godot_menu_item.h" -#include "key_mapping_macos.h" -#include "native_menu_macos.h" +#import "display_server_macos.h" +#import "godot_menu_item.h" +#import "key_mapping_macos.h" +#import "native_menu_macos.h" @implementation GodotMenuDelegate diff --git a/platform/macos/godot_menu_item.h b/platform/macos/godot_menu_item.h index e1af317259b..6cf2d330427 100644 --- a/platform/macos/godot_menu_item.h +++ b/platform/macos/godot_menu_item.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_MENU_ITEM_H -#define GODOT_MENU_ITEM_H - #include "servers/display_server.h" #import @@ -59,5 +56,3 @@ enum GlobalMenuCheckType { } @end - -#endif // GODOT_MENU_ITEM_H diff --git a/platform/macos/godot_menu_item.mm b/platform/macos/godot_menu_item.mm index 479542113af..687b4e85a99 100644 --- a/platform/macos/godot_menu_item.mm +++ b/platform/macos/godot_menu_item.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_menu_item.h" +#import "godot_menu_item.h" @implementation GodotMenuItem diff --git a/platform/macos/godot_open_save_delegate.h b/platform/macos/godot_open_save_delegate.h index 12349ef9901..a00969aa72c 100644 --- a/platform/macos/godot_open_save_delegate.h +++ b/platform/macos/godot_open_save_delegate.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_OPEN_SAVE_DELEGATE_H -#define GODOT_OPEN_SAVE_DELEGATE_H - #import #import #import @@ -63,5 +60,3 @@ - (void)setRootPath:(const String &)p_root_path; @end - -#endif // GODOT_OPEN_SAVE_DELEGATE_H diff --git a/platform/macos/godot_open_save_delegate.mm b/platform/macos/godot_open_save_delegate.mm index fa986c02cec..318b25b0a9b 100644 --- a/platform/macos/godot_open_save_delegate.mm +++ b/platform/macos/godot_open_save_delegate.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_open_save_delegate.h" +#import "godot_open_save_delegate.h" @implementation GodotOpenSaveDelegate diff --git a/platform/macos/godot_status_item.h b/platform/macos/godot_status_item.h index 5bc790956ef..db4271948bd 100644 --- a/platform/macos/godot_status_item.h +++ b/platform/macos/godot_status_item.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_STATUS_ITEM_H -#define GODOT_STATUS_ITEM_H - #include "core/input/input_enums.h" #include "core/variant/callable.h" @@ -46,5 +43,3 @@ - (void)setCallback:(const Callable &)callback; @end - -#endif // GODOT_STATUS_ITEM_H diff --git a/platform/macos/godot_status_item.mm b/platform/macos/godot_status_item.mm index 1b16d496a20..56acba0ab26 100644 --- a/platform/macos/godot_status_item.mm +++ b/platform/macos/godot_status_item.mm @@ -28,9 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_status_item.h" +#import "godot_status_item.h" -#include "display_server_macos.h" +#import "display_server_macos.h" @implementation GodotStatusItemDelegate diff --git a/platform/macos/godot_window.h b/platform/macos/godot_window.h index 72aa0420693..25b212175be 100644 --- a/platform/macos/godot_window.h +++ b/platform/macos/godot_window.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_WINDOW_H -#define GODOT_WINDOW_H - #include "servers/display_server.h" #import @@ -45,5 +42,3 @@ - (void)setAnimDuration:(NSTimeInterval)duration; @end - -#endif // GODOT_WINDOW_H diff --git a/platform/macos/godot_window.mm b/platform/macos/godot_window.mm index f4516e5c859..7614c283f31 100644 --- a/platform/macos/godot_window.mm +++ b/platform/macos/godot_window.mm @@ -28,9 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_window.h" +#import "godot_window.h" -#include "display_server_macos.h" +#import "display_server_macos.h" @implementation GodotWindow diff --git a/platform/macos/godot_window_delegate.h b/platform/macos/godot_window_delegate.h index de801029584..3c27612c139 100644 --- a/platform/macos/godot_window_delegate.h +++ b/platform/macos/godot_window_delegate.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef GODOT_WINDOW_DELEGATE_H -#define GODOT_WINDOW_DELEGATE_H - #include "servers/display_server.h" #import @@ -43,5 +40,3 @@ - (void)setWindowID:(DisplayServer::WindowID)wid; @end - -#endif // GODOT_WINDOW_DELEGATE_H diff --git a/platform/macos/godot_window_delegate.mm b/platform/macos/godot_window_delegate.mm index 35c053dca5d..af1f3c8043f 100644 --- a/platform/macos/godot_window_delegate.mm +++ b/platform/macos/godot_window_delegate.mm @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "godot_window_delegate.h" +#import "godot_window_delegate.h" -#include "display_server_macos.h" -#include "godot_button_view.h" -#include "godot_window.h" +#import "display_server_macos.h" +#import "godot_button_view.h" +#import "godot_window.h" @implementation GodotWindowDelegate diff --git a/platform/macos/key_mapping_macos.h b/platform/macos/key_mapping_macos.h index f5b0ff8d023..8c42cb1cf9b 100644 --- a/platform/macos/key_mapping_macos.h +++ b/platform/macos/key_mapping_macos.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef KEY_MAPPING_MACOS_H -#define KEY_MAPPING_MACOS_H - #include "core/os/keyboard.h" class KeyMappingMacOS { @@ -51,5 +48,3 @@ public: static String keycode_get_native_string(Key p_keycode); static unsigned int keycode_get_native_mask(Key p_keycode); }; - -#endif // KEY_MAPPING_MACOS_H diff --git a/platform/macos/key_mapping_macos.mm b/platform/macos/key_mapping_macos.mm index b5e72048e71..997d29c4387 100644 --- a/platform/macos/key_mapping_macos.mm +++ b/platform/macos/key_mapping_macos.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "key_mapping_macos.h" +#import "key_mapping_macos.h" #include "core/templates/hash_map.h" #include "core/templates/hash_set.h" diff --git a/platform/macos/macos_terminal_logger.h b/platform/macos/macos_terminal_logger.h index 0120240c4f2..82589992c91 100644 --- a/platform/macos/macos_terminal_logger.h +++ b/platform/macos/macos_terminal_logger.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef MACOS_TERMINAL_LOGGER_H -#define MACOS_TERMINAL_LOGGER_H - #ifdef MACOS_ENABLED #include "core/io/logger.h" @@ -41,5 +38,3 @@ public: }; #endif // MACOS_ENABLED - -#endif // MACOS_TERMINAL_LOGGER_H diff --git a/platform/macos/macos_terminal_logger.mm b/platform/macos/macos_terminal_logger.mm index 44f37dc3961..cf4a40e3fdc 100644 --- a/platform/macos/macos_terminal_logger.mm +++ b/platform/macos/macos_terminal_logger.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "macos_terminal_logger.h" +#import "macos_terminal_logger.h" #ifdef MACOS_ENABLED diff --git a/platform/macos/native_menu_macos.h b/platform/macos/native_menu_macos.h index 42cf6740d90..f4afc6773db 100644 --- a/platform/macos/native_menu_macos.h +++ b/platform/macos/native_menu_macos.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef NATIVE_MENU_MACOS_H -#define NATIVE_MENU_MACOS_H - #include "core/templates/hash_map.h" #include "core/templates/rid_owner.h" #include "servers/display/native_menu.h" @@ -160,5 +157,3 @@ public: NativeMenuMacOS(); ~NativeMenuMacOS(); }; - -#endif // NATIVE_MENU_MACOS_H diff --git a/platform/macos/native_menu_macos.mm b/platform/macos/native_menu_macos.mm index 802d58dc269..6cca7c2ba66 100644 --- a/platform/macos/native_menu_macos.mm +++ b/platform/macos/native_menu_macos.mm @@ -28,11 +28,11 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "native_menu_macos.h" +#import "native_menu_macos.h" -#include "display_server_macos.h" -#include "godot_menu_item.h" -#include "key_mapping_macos.h" +#import "display_server_macos.h" +#import "godot_menu_item.h" +#import "key_mapping_macos.h" #include "scene/resources/image_texture.h" diff --git a/platform/macos/os_macos.h b/platform/macos/os_macos.h index 334c8eab030..873f7953308 100644 --- a/platform/macos/os_macos.h +++ b/platform/macos/os_macos.h @@ -28,10 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef OS_MACOS_H -#define OS_MACOS_H - -#include "crash_handler_macos.h" +#import "crash_handler_macos.h" #include "core/input/input.h" #import "drivers/apple/joypad_apple.h" @@ -137,5 +134,3 @@ public: OS_MacOS(); ~OS_MacOS(); }; - -#endif // OS_MACOS_H diff --git a/platform/macos/os_macos.mm b/platform/macos/os_macos.mm index fd8156b68fe..c00d48fc5a6 100644 --- a/platform/macos/os_macos.mm +++ b/platform/macos/os_macos.mm @@ -28,13 +28,13 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "os_macos.h" +#import "os_macos.h" -#include "dir_access_macos.h" -#include "display_server_macos.h" -#include "godot_application.h" -#include "godot_application_delegate.h" -#include "macos_terminal_logger.h" +#import "dir_access_macos.h" +#import "display_server_macos.h" +#import "godot_application.h" +#import "godot_application_delegate.h" +#import "macos_terminal_logger.h" #include "core/crypto/crypto_core.h" #include "core/version_generated.gen.h" @@ -42,7 +42,7 @@ #include #include -#include +#import #include #include diff --git a/platform/macos/platform_config.h b/platform/macos/platform_config.h index 01b0a12b5d3..0714172a5dc 100644 --- a/platform/macos/platform_config.h +++ b/platform/macos/platform_config.h @@ -28,6 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#ifndef PLATFORM_CONFIG_H +#define PLATFORM_CONFIG_H + #include #define PTHREAD_RENAME_SELF @@ -38,3 +41,5 @@ _Pragma("clang diagnostic ignored \"-Wshadow\"") \ __strong typeof(var) var = GDWeak_##var; \ _Pragma("clang diagnostic pop") + +#endif // PLATFORM_CONFIG_H diff --git a/platform/macos/rendering_context_driver_vulkan_macos.h b/platform/macos/rendering_context_driver_vulkan_macos.h index 32f8891a2ea..440c1589dd0 100644 --- a/platform/macos/rendering_context_driver_vulkan_macos.h +++ b/platform/macos/rendering_context_driver_vulkan_macos.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef RENDERING_CONTEXT_DRIVER_VULKAN_MACOS_H -#define RENDERING_CONTEXT_DRIVER_VULKAN_MACOS_H - #ifdef VULKAN_ENABLED #include "drivers/vulkan/rendering_context_driver_vulkan.h" @@ -54,5 +51,3 @@ public: }; #endif // VULKAN_ENABLED - -#endif // RENDERING_CONTEXT_DRIVER_VULKAN_MACOS_H diff --git a/platform/macos/rendering_context_driver_vulkan_macos.mm b/platform/macos/rendering_context_driver_vulkan_macos.mm index b617cb8f266..f9567152636 100644 --- a/platform/macos/rendering_context_driver_vulkan_macos.mm +++ b/platform/macos/rendering_context_driver_vulkan_macos.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "rendering_context_driver_vulkan_macos.h" +#import "rendering_context_driver_vulkan_macos.h" #ifdef VULKAN_ENABLED diff --git a/platform/macos/tts_macos.h b/platform/macos/tts_macos.h index 35205bd1ae4..cefae300a3b 100644 --- a/platform/macos/tts_macos.h +++ b/platform/macos/tts_macos.h @@ -28,9 +28,6 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#ifndef TTS_MACOS_H -#define TTS_MACOS_H - #include "core/string/ustring.h" #include "core/templates/hash_map.h" #include "core/templates/list.h" @@ -67,5 +64,3 @@ - (void)speak:(const String &)text voice:(const String &)voice volume:(int)volume pitch:(float)pitch rate:(float)rate utterance_id:(int)utterance_id interrupt:(bool)interrupt; - (Array)getVoices; @end - -#endif // TTS_MACOS_H diff --git a/platform/macos/tts_macos.mm b/platform/macos/tts_macos.mm index 4e6744e2112..47263ef4d9c 100644 --- a/platform/macos/tts_macos.mm +++ b/platform/macos/tts_macos.mm @@ -28,7 +28,7 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ -#include "tts_macos.h" +#import "tts_macos.h" @implementation TTS_MacOS diff --git a/platform/web/platform_config.h b/platform/web/platform_config.h index c3189bccfb1..5dde99e3f56 100644 --- a/platform/web/platform_config.h +++ b/platform/web/platform_config.h @@ -28,4 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#ifndef PLATFORM_CONFIG_H +#define PLATFORM_CONFIG_H + #include + +#endif // PLATFORM_CONFIG_H diff --git a/platform/windows/platform_config.h b/platform/windows/platform_config.h index 964e341ce45..423f2e799aa 100644 --- a/platform/windows/platform_config.h +++ b/platform/windows/platform_config.h @@ -28,4 +28,9 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /**************************************************************************/ +#ifndef PLATFORM_CONFIG_H +#define PLATFORM_CONFIG_H + #include + +#endif // PLATFORM_CONFIG_H