summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/CODEOWNERS4
-rw-r--r--.github/workflows/ios_builds.yml2
-rw-r--r--.github/workflows/macos_builds.yml4
-rw-r--r--SConstruct18
-rw-r--r--core/SCsub2
-rw-r--r--core/config/project_settings.cpp2
-rw-r--r--core/input/input_builders.py4
-rw-r--r--core/os/keyboard.cpp2
-rw-r--r--doc/classes/EditorExportPlugin.xml2
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.cpp20
-rw-r--r--drivers/coreaudio/audio_driver_coreaudio.h6
-rw-r--r--drivers/gl_context/SCsub2
-rw-r--r--drivers/gles3/rasterizer_gles3.cpp2
-rw-r--r--drivers/unix/os_unix.cpp2
-rw-r--r--drivers/vulkan/SCsub6
-rw-r--r--editor/editor_export.cpp10
-rw-r--r--editor/editor_export.h8
-rw-r--r--editor/editor_fonts.cpp2
-rw-r--r--editor/editor_settings.cpp8
-rw-r--r--editor/editor_spin_slider.cpp2
-rw-r--r--editor/project_manager.cpp2
-rw-r--r--main/main.cpp4
-rw-r--r--methods.py10
-rw-r--r--misc/dist/ios_xcode/libgodot.ios.debug.xcframework/Info.plist (renamed from misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/Info.plist)0
-rw-r--r--misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/empty (renamed from misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/empty)0
-rw-r--r--misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/empty (renamed from misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/empty)0
-rw-r--r--misc/dist/ios_xcode/libgodot.ios.release.xcframework/Info.plist (renamed from misc/dist/ios_xcode/libgodot.iphone.release.xcframework/Info.plist)0
-rw-r--r--misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64/empty (renamed from misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/empty)0
-rw-r--r--misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/empty (renamed from misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/empty)0
-rw-r--r--misc/dist/macos/editor.entitlements (renamed from misc/dist/osx/editor.entitlements)0
-rw-r--r--misc/dist/macos_template.app/Contents/Info.plist (renamed from misc/dist/osx_template.app/Contents/Info.plist)0
-rw-r--r--misc/dist/macos_template.app/Contents/PkgInfo (renamed from misc/dist/osx_template.app/Contents/PkgInfo)0
-rw-r--r--misc/dist/macos_template.app/Contents/Resources/icon.icns (renamed from misc/dist/osx_template.app/Contents/Resources/icon.icns)bin67500 -> 67500 bytes
-rw-r--r--misc/dist/macos_tools.app/Contents/Info.plist (renamed from misc/dist/osx_tools.app/Contents/Info.plist)0
-rw-r--r--misc/dist/macos_tools.app/Contents/PkgInfo (renamed from misc/dist/osx_tools.app/Contents/PkgInfo)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/GDScript.icns (renamed from misc/dist/osx_tools.app/Contents/Resources/GDScript.icns)bin185973 -> 185973 bytes
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/Godot.icns (renamed from misc/dist/osx_tools.app/Contents/Resources/Godot.icns)bin271163 -> 271163 bytes
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/Project.icns (renamed from misc/dist/osx_tools.app/Contents/Resources/Project.icns)bin208221 -> 208221 bytes
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/Resource.icns (renamed from misc/dist/osx_tools.app/Contents/Resources/Resource.icns)bin176973 -> 176973 bytes
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/Scene.icns (renamed from misc/dist/osx_tools.app/Contents/Resources/Scene.icns)bin150612 -> 150612 bytes
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/Shader.icns (renamed from misc/dist/osx_tools.app/Contents/Resources/Shader.icns)bin162062 -> 162062 bytes
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/af.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/af.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/az.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/az.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/br.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/br.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/da.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/da.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/de.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/de.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/el.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/el.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/en.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/en.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/es.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/es.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/et.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/et.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/he.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/he.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/id.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/id.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/is.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/is.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/it.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/it.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/km.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/km.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/or.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/or.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/si.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/si.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/te.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/te.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/th.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/th.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/macos_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings (renamed from misc/dist/osx_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings)0
-rw-r--r--misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json7
-rw-r--r--misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json7
-rw-r--r--modules/camera/SCsub4
-rw-r--r--modules/camera/camera_macos.h (renamed from modules/camera/camera_osx.h)12
-rw-r--r--modules/camera/camera_macos.mm (renamed from modules/camera/camera_osx.mm)36
-rw-r--r--modules/camera/config.py2
-rw-r--r--modules/camera/register_types.cpp8
-rw-r--r--modules/denoise/config.py2
-rw-r--r--modules/gltf/editor/editor_scene_importer_blend.cpp4
-rw-r--r--modules/mobile_vr/mobile_vr_interface.cpp2
-rw-r--r--modules/mono/SCsub2
-rw-r--r--modules/mono/build_scripts/mono_configure.py16
-rw-r--r--modules/mono/config.py4
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props6
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs4
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs10
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs2
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs4
-rw-r--r--modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs4
-rw-r--r--modules/mono/editor/editor_internal_calls.cpp10
-rw-r--r--modules/mono/godotsharp_dirs.cpp4
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp8
-rw-r--r--modules/mono/mono_gd/gd_mono_log.h2
-rw-r--r--modules/mono/mono_gd/gd_mono_method_thunk.h2
-rw-r--r--modules/mono/mono_gd/support/ios_support.h4
-rw-r--r--modules/mono/mono_gd/support/ios_support.mm4
-rw-r--r--modules/mono/utils/macos_utils.cpp (renamed from modules/mono/utils/osx_utils.cpp)8
-rw-r--r--modules/mono/utils/macos_utils.h (renamed from modules/mono/utils/osx_utils.h)12
-rw-r--r--modules/text_server_adv/gdextension_build/SConstruct10
-rw-r--r--modules/text_server_adv/gdextension_build/methods.py2
-rw-r--r--modules/text_server_adv/gdextension_build/text_server_adv.gdextension4
-rw-r--r--modules/text_server_fb/gdextension_build/SConstruct10
-rw-r--r--modules/text_server_fb/gdextension_build/methods.py2
-rw-r--r--modules/text_server_fb/gdextension_build/text_server_fb.gdextension4
-rw-r--r--modules/visual_script/editor/visual_script_editor.cpp18
-rw-r--r--platform/ios/SCsub (renamed from platform/iphone/SCsub)18
-rw-r--r--platform/ios/api/api.cpp (renamed from platform/iphone/api/api.cpp)10
-rw-r--r--platform/ios/api/api.h (renamed from platform/iphone/api/api.h)12
-rw-r--r--platform/ios/app_delegate.h (renamed from platform/iphone/app_delegate.h)0
-rw-r--r--platform/ios/app_delegate.mm (renamed from platform/iphone/app_delegate.mm)18
-rw-r--r--platform/ios/detect.py (renamed from platform/iphone/detect.py)30
-rw-r--r--platform/ios/device_metrics.h (renamed from platform/iphone/device_metrics.h)0
-rw-r--r--platform/ios/device_metrics.m (renamed from platform/iphone/device_metrics.m)0
-rw-r--r--platform/ios/display_layer.h (renamed from platform/iphone/display_layer.h)0
-rw-r--r--platform/ios/display_layer.mm (renamed from platform/iphone/display_layer.mm)4
-rw-r--r--platform/ios/display_server_ios.h (renamed from platform/iphone/display_server_iphone.h)24
-rw-r--r--platform/ios/display_server_ios.mm (renamed from platform/iphone/display_server_iphone.mm)196
-rw-r--r--platform/ios/export/export.cpp (renamed from platform/iphone/export/export.cpp)2
-rw-r--r--platform/ios/export/export.h (renamed from platform/osx/export/export.h)8
-rw-r--r--platform/ios/export/export_plugin.cpp (renamed from platform/iphone/export/export_plugin.cpp)22
-rw-r--r--platform/ios/export/export_plugin.h (renamed from platform/iphone/export/export_plugin.h)6
-rw-r--r--platform/ios/export/godot_plugin_config.cpp (renamed from platform/iphone/export/godot_plugin_config.cpp)0
-rw-r--r--platform/ios/export/godot_plugin_config.h (renamed from platform/iphone/export/godot_plugin_config.h)4
-rw-r--r--platform/ios/godot_app_delegate.h (renamed from platform/iphone/godot_app_delegate.h)0
-rw-r--r--platform/ios/godot_app_delegate.m (renamed from platform/iphone/godot_app_delegate.m)0
-rw-r--r--platform/ios/godot_ios.mm (renamed from platform/iphone/godot_iphone.mm)18
-rw-r--r--platform/ios/godot_view.h (renamed from platform/iphone/godot_view.h)0
-rw-r--r--platform/ios/godot_view.mm (renamed from platform/iphone/godot_view.mm)46
-rw-r--r--platform/ios/godot_view_gesture_recognizer.h (renamed from platform/iphone/godot_view_gesture_recognizer.h)0
-rw-r--r--platform/ios/godot_view_gesture_recognizer.mm (renamed from platform/iphone/godot_view_gesture_recognizer.mm)0
-rw-r--r--platform/ios/godot_view_renderer.h (renamed from platform/iphone/godot_view_renderer.h)0
-rw-r--r--platform/ios/godot_view_renderer.mm (renamed from platform/iphone/godot_view_renderer.mm)10
-rw-r--r--platform/ios/ios.h (renamed from platform/iphone/ios.h)0
-rw-r--r--platform/ios/ios.mm (renamed from platform/iphone/ios.mm)0
-rw-r--r--platform/ios/joypad_ios.h (renamed from platform/iphone/joypad_iphone.h)12
-rw-r--r--platform/ios/joypad_ios.mm (renamed from platform/iphone/joypad_iphone.mm)18
-rw-r--r--platform/ios/keyboard_input_view.h (renamed from platform/iphone/keyboard_input_view.h)0
-rw-r--r--platform/ios/keyboard_input_view.mm (renamed from platform/iphone/keyboard_input_view.mm)12
-rw-r--r--platform/ios/logo.png (renamed from platform/iphone/logo.png)bin1297 -> 1297 bytes
-rw-r--r--platform/ios/main.m (renamed from platform/iphone/main.m)0
-rw-r--r--platform/ios/os_ios.h (renamed from platform/iphone/os_iphone.h)26
-rw-r--r--platform/ios/os_ios.mm (renamed from platform/iphone/os_iphone.mm)98
-rw-r--r--platform/ios/platform_config.h (renamed from platform/iphone/platform_config.h)0
-rw-r--r--platform/ios/tts_ios.h (renamed from platform/iphone/tts_ios.h)0
-rw-r--r--platform/ios/tts_ios.mm (renamed from platform/iphone/tts_ios.mm)0
-rw-r--r--platform/ios/view_controller.h (renamed from platform/iphone/view_controller.h)0
-rw-r--r--platform/ios/view_controller.mm (renamed from platform/iphone/view_controller.mm)20
-rw-r--r--platform/ios/vulkan_context_ios.h (renamed from platform/iphone/vulkan_context_iphone.h)14
-rw-r--r--platform/ios/vulkan_context_ios.mm (renamed from platform/iphone/vulkan_context_iphone.mm)12
-rw-r--r--platform/macos/SCsub30
-rw-r--r--platform/macos/crash_handler_macos.h (renamed from platform/osx/crash_handler_osx.h)8
-rw-r--r--platform/macos/crash_handler_macos.mm (renamed from platform/osx/crash_handler_osx.mm)4
-rw-r--r--platform/macos/detect.py (renamed from platform/osx/detect.py)12
-rw-r--r--platform/macos/dir_access_macos.h (renamed from platform/osx/dir_access_osx.h)8
-rw-r--r--platform/macos/dir_access_macos.mm (renamed from platform/osx/dir_access_osx.mm)12
-rw-r--r--platform/macos/display_server_macos.h (renamed from platform/osx/display_server_osx.h)30
-rw-r--r--platform/macos/display_server_macos.mm (renamed from platform/osx/display_server_osx.mm)456
-rw-r--r--platform/macos/export/codesign.cpp (renamed from platform/osx/export/codesign.cpp)0
-rw-r--r--platform/macos/export/codesign.h (renamed from platform/osx/export/codesign.h)0
-rw-r--r--platform/macos/export/export.cpp (renamed from platform/osx/export/export.cpp)4
-rw-r--r--platform/macos/export/export.h (renamed from platform/iphone/export/export.h)8
-rw-r--r--platform/macos/export/export_plugin.cpp (renamed from platform/osx/export/export_plugin.cpp)76
-rw-r--r--platform/macos/export/export_plugin.h (renamed from platform/osx/export/export_plugin.h)18
-rw-r--r--platform/macos/export/lipo.cpp (renamed from platform/osx/export/lipo.cpp)0
-rw-r--r--platform/macos/export/lipo.h (renamed from platform/osx/export/lipo.h)0
-rw-r--r--platform/macos/export/macho.cpp (renamed from platform/osx/export/macho.cpp)0
-rw-r--r--platform/macos/export/macho.h (renamed from platform/osx/export/macho.h)0
-rw-r--r--platform/macos/export/plist.cpp (renamed from platform/osx/export/plist.cpp)0
-rw-r--r--platform/macos/export/plist.h (renamed from platform/osx/export/plist.h)0
-rw-r--r--platform/macos/gl_manager_macos_legacy.h (renamed from platform/osx/gl_manager_osx_legacy.h)18
-rw-r--r--platform/macos/gl_manager_macos_legacy.mm (renamed from platform/osx/gl_manager_osx_legacy.mm)42
-rw-r--r--platform/macos/godot_application.h (renamed from platform/osx/godot_application.h)0
-rw-r--r--platform/macos/godot_application.mm (renamed from platform/osx/godot_application.mm)4
-rw-r--r--platform/macos/godot_application_delegate.h (renamed from platform/osx/godot_application_delegate.h)0
-rw-r--r--platform/macos/godot_application_delegate.mm (renamed from platform/osx/godot_application_delegate.mm)18
-rw-r--r--platform/macos/godot_content_view.h (renamed from platform/osx/godot_content_view.h)0
-rw-r--r--platform/macos/godot_content_view.mm (renamed from platform/osx/godot_content_view.mm)126
-rw-r--r--platform/macos/godot_main_macos.mm (renamed from platform/osx/godot_main_osx.mm)6
-rw-r--r--platform/macos/godot_menu_item.h (renamed from platform/osx/godot_menu_item.h)0
-rw-r--r--platform/macos/godot_window.h (renamed from platform/osx/godot_window.h)0
-rw-r--r--platform/macos/godot_window.mm (renamed from platform/osx/godot_window.mm)12
-rw-r--r--platform/macos/godot_window_delegate.h (renamed from platform/osx/godot_window_delegate.h)0
-rw-r--r--platform/macos/godot_window_delegate.mm (renamed from platform/osx/godot_window_delegate.mm)66
-rw-r--r--platform/macos/joypad_macos.cpp (renamed from platform/osx/joypad_osx.cpp)32
-rw-r--r--platform/macos/joypad_macos.h (renamed from platform/osx/joypad_osx.h)14
-rw-r--r--platform/macos/key_mapping_macos.h (renamed from platform/osx/key_mapping_osx.h)12
-rw-r--r--platform/macos/key_mapping_macos.mm (renamed from platform/osx/key_mapping_osx.mm)24
-rw-r--r--platform/macos/logo.png (renamed from platform/osx/logo.png)bin7195 -> 7195 bytes
-rw-r--r--platform/macos/macos_terminal_logger.h (renamed from platform/osx/osx_terminal_logger.h)14
-rw-r--r--platform/macos/macos_terminal_logger.mm (renamed from platform/osx/osx_terminal_logger.mm)10
-rw-r--r--platform/macos/os_macos.h (renamed from platform/osx/os_osx.h)18
-rw-r--r--platform/macos/os_macos.mm (renamed from platform/osx/os_osx.mm)100
-rw-r--r--platform/macos/platform_config.h (renamed from platform/osx/platform_config.h)0
-rw-r--r--platform/macos/platform_macos_builders.py (renamed from platform/osx/platform_osx_builders.py)2
-rw-r--r--platform/macos/tts_macos.h (renamed from platform/osx/tts_osx.h)10
-rw-r--r--platform/macos/tts_macos.mm (renamed from platform/osx/tts_osx.mm)6
-rw-r--r--platform/macos/vulkan_context_macos.h (renamed from platform/osx/vulkan_context_osx.h)14
-rw-r--r--platform/macos/vulkan_context_macos.mm (renamed from platform/osx/vulkan_context_osx.mm)12
-rw-r--r--platform/osx/SCsub30
-rw-r--r--scene/gui/code_edit.cpp2
-rw-r--r--servers/rendering/renderer_rd/effects_rd.cpp2
-rw-r--r--servers/rendering/renderer_rd/renderer_scene_render_rd.cpp14
-rw-r--r--servers/rendering/renderer_rd/shader_rd.cpp2
-rw-r--r--tests/scene/test_code_edit.h2
-rw-r--r--tests/scene/test_text_edit.h16
245 files changed, 1151 insertions, 1149 deletions
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index ebbbe345fd..e7e88e95d7 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -139,10 +139,10 @@ doc_classes/* @godotengine/documentation
# Platform
/platform/android/ @godotengine/android
-/platform/iphone/ @godotengine/ios
+/platform/ios/ @godotengine/ios
/platform/javascript/ @godotengine/html5
/platform/linuxbsd/ @godotengine/linux-bsd
-/platform/osx/ @godotengine/macos
+/platform/macos/ @godotengine/macos
/platform/uwp/ @godotengine/uwp
/platform/windows/ @godotengine/windows
diff --git a/.github/workflows/ios_builds.yml b/.github/workflows/ios_builds.yml
index 40f091e234..03277edc1d 100644
--- a/.github/workflows/ios_builds.yml
+++ b/.github/workflows/ios_builds.yml
@@ -30,7 +30,7 @@ jobs:
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }}
- platform: iphone
+ platform: ios
target: release
tools: false
tests: false
diff --git a/.github/workflows/macos_builds.yml b/.github/workflows/macos_builds.yml
index 9b8ffc45a7..0cb037bfae 100644
--- a/.github/workflows/macos_builds.yml
+++ b/.github/workflows/macos_builds.yml
@@ -24,7 +24,7 @@ jobs:
target: release_debug
tools: true
tests: true
- bin: "./bin/godot.osx.opt.tools.64"
+ bin: "./bin/godot.macos.opt.tools.64"
- name: Template (target=release, tools=no)
cache-name: macos-template
@@ -49,7 +49,7 @@ jobs:
uses: ./.github/actions/godot-build
with:
sconsflags: ${{ env.SCONSFLAGS }}
- platform: osx
+ platform: macos
target: ${{ matrix.target }}
tools: ${{ matrix.tools }}
tests: ${{ matrix.tests }}
diff --git a/SConstruct b/SConstruct
index 0eba93e4ff..74f9d1158c 100644
--- a/SConstruct
+++ b/SConstruct
@@ -260,7 +260,7 @@ else:
):
selected_platform = "linuxbsd"
elif sys.platform == "darwin":
- selected_platform = "osx"
+ selected_platform = "macos"
elif sys.platform == "win32":
selected_platform = "windows"
else:
@@ -272,6 +272,20 @@ else:
if selected_platform != "":
print("Automatically detected platform: " + selected_platform)
+if selected_platform in ["macos", "osx"]:
+ if selected_platform == "osx":
+ # Deprecated alias kept for compatibility.
+ print('Platform "osx" has been renamed to "macos" in Godot 4.0. Building for platform "macos".')
+ # Alias for convenience.
+ selected_platform = "macos"
+
+if selected_platform in ["ios", "iphone"]:
+ if selected_platform == "iphone":
+ # Deprecated alias kept for compatibility.
+ print('Platform "iphone" has been renamed to "ios" in Godot 4.0. Building for platform "ios".')
+ # Alias for convenience.
+ selected_platform = "ios"
+
if selected_platform in ["linux", "bsd", "x11"]:
if selected_platform == "x11":
# Deprecated alias kept for compatibility.
@@ -554,7 +568,7 @@ if selected_platform in platform_list:
)
# Apple LLVM versions differ from upstream LLVM version \o/, compare
# in https://en.wikipedia.org/wiki/Xcode#Toolchain_versions
- elif env["platform"] == "osx" or env["platform"] == "iphone":
+ elif env["platform"] == "macos" or env["platform"] == "ios":
vanilla = methods.is_vanilla_clang(env)
if vanilla and cc_version_major < 6:
print(
diff --git a/core/SCsub b/core/SCsub
index df3e7a547a..97080b8710 100644
--- a/core/SCsub
+++ b/core/SCsub
@@ -129,7 +129,7 @@ if env["builtin_zstd"]:
"decompress/zstd_decompress_block.c",
"decompress/zstd_decompress.c",
]
- if env["platform"] in ["android", "iphone", "linuxbsd", "osx"]:
+ if env["platform"] in ["android", "ios", "linuxbsd", "macos"]:
# Match platforms with ZSTD_ASM_SUPPORTED in common/portability_macros.h
thirdparty_zstd_sources.append("decompress/huf_decompress_amd64.S")
thirdparty_zstd_sources = [thirdparty_zstd_dir + file for file in thirdparty_zstd_sources]
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 7145e628c1..f9bac58ffa 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -488,7 +488,7 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b
// We need to test both possibilities as extensions for Linux binaries are optional
// (so both 'mygame.bin' and 'mygame' should be able to find 'mygame.pck').
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
if (!found) {
// Attempt to load PCK from macOS .app bundle resources.
found = _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_basename + ".pck")) || _load_resource_pack(OS::get_singleton()->get_bundle_resource_dir().plus_file(exec_filename + ".pck"));
diff --git a/core/input/input_builders.py b/core/input/input_builders.py
index 748ec06133..c0dac26f02 100644
--- a/core/input/input_builders.py
+++ b/core/input/input_builders.py
@@ -47,9 +47,9 @@ def make_default_controller_mappings(target, source, env):
platform_variables = {
"Linux": "#if X11_ENABLED",
"Windows": "#ifdef WINDOWS_ENABLED",
- "Mac OS X": "#ifdef OSX_ENABLED",
+ "Mac OS X": "#ifdef MACOS_ENABLED",
"Android": "#if defined(__ANDROID__)",
- "iOS": "#ifdef IPHONE_ENABLED",
+ "iOS": "#ifdef IOS_ENABLED",
"Javascript": "#ifdef JAVASCRIPT_ENABLED",
"UWP": "#ifdef UWP_ENABLED",
}
diff --git a/core/os/keyboard.cpp b/core/os/keyboard.cpp
index 3e690991d9..a592791d06 100644
--- a/core/os/keyboard.cpp
+++ b/core/os/keyboard.cpp
@@ -61,7 +61,7 @@ static const _KeyCodeText _keycodes[] = {
{Key::PAGEDOWN ,"PageDown"},
{Key::SHIFT ,"Shift"},
{Key::CTRL ,"Ctrl"},
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
{Key::META ,"Command"},
#else
{Key::META ,"Meta"},
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index 8aa2db2cf8..f217fbaf48 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -96,7 +96,7 @@
Adds a static lib from the given [code]path[/code] to the iOS project.
</description>
</method>
- <method name="add_osx_plugin_file">
+ <method name="add_macos_plugin_file">
<return type="void" />
<argument index="0" name="path" type="String" />
<description>
diff --git a/drivers/coreaudio/audio_driver_coreaudio.cpp b/drivers/coreaudio/audio_driver_coreaudio.cpp
index 276e69e470..cc38c2352f 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.cpp
+++ b/drivers/coreaudio/audio_driver_coreaudio.cpp
@@ -38,7 +38,7 @@
#define kOutputBus 0
#define kInputBus 1
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
OSStatus AudioDriverCoreAudio::input_device_address_cb(AudioObjectID inObjectID,
UInt32 inNumberAddresses, const AudioObjectPropertyAddress *inAddresses,
void *inClientData) {
@@ -72,7 +72,7 @@ Error AudioDriverCoreAudio::init() {
AudioComponentDescription desc;
memset(&desc, 0, sizeof(desc));
desc.componentType = kAudioUnitType_Output;
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
desc.componentSubType = kAudioUnitSubType_HALOutput;
#else
desc.componentSubType = kAudioUnitSubType_RemoteIO;
@@ -85,7 +85,7 @@ Error AudioDriverCoreAudio::init() {
OSStatus result = AudioComponentInstanceNew(comp, &audio_unit);
ERR_FAIL_COND_V(result != noErr, FAILED);
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
AudioObjectPropertyAddress prop;
prop.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
prop.mScope = kAudioObjectPropertyScopeGlobal;
@@ -135,7 +135,7 @@ Error AudioDriverCoreAudio::init() {
// Sample rate is independent of channels (ref: https://stackoverflow.com/questions/11048825/audio-sample-frequency-rely-on-channels)
buffer_frames = closest_power_of_2(latency * mix_rate / 1000);
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
result = AudioUnitSetProperty(audio_unit, kAudioDevicePropertyBufferFrameSize, kAudioUnitScope_Global, kOutputBus, &buffer_frames, sizeof(UInt32));
ERR_FAIL_COND_V(result != noErr, FAILED);
#endif
@@ -313,7 +313,7 @@ void AudioDriverCoreAudio::finish() {
ERR_PRINT("AudioUnitUninitialize failed");
}
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
AudioObjectPropertyAddress prop;
prop.mSelector = kAudioHardwarePropertyDefaultOutputDevice;
prop.mScope = kAudioObjectPropertyScopeGlobal;
@@ -339,7 +339,7 @@ Error AudioDriverCoreAudio::capture_init() {
AudioComponentDescription desc;
memset(&desc, 0, sizeof(desc));
desc.componentType = kAudioUnitType_Output;
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
desc.componentSubType = kAudioUnitSubType_HALOutput;
#else
desc.componentSubType = kAudioUnitSubType_RemoteIO;
@@ -352,7 +352,7 @@ Error AudioDriverCoreAudio::capture_init() {
OSStatus result = AudioComponentInstanceNew(comp, &input_unit);
ERR_FAIL_COND_V(result != noErr, FAILED);
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
AudioObjectPropertyAddress prop;
prop.mSelector = kAudioHardwarePropertyDefaultInputDevice;
prop.mScope = kAudioObjectPropertyScopeGlobal;
@@ -370,7 +370,7 @@ Error AudioDriverCoreAudio::capture_init() {
ERR_FAIL_COND_V(result != noErr, FAILED);
UInt32 size;
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
AudioDeviceID deviceId;
size = sizeof(AudioDeviceID);
AudioObjectPropertyAddress property = { kAudioHardwarePropertyDefaultInputDevice, kAudioObjectPropertyScopeGlobal, kAudioObjectPropertyElementMaster };
@@ -447,7 +447,7 @@ void AudioDriverCoreAudio::capture_finish() {
ERR_PRINT("AudioUnitUninitialize failed");
}
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
AudioObjectPropertyAddress prop;
prop.mSelector = kAudioHardwarePropertyDefaultInputDevice;
prop.mScope = kAudioObjectPropertyScopeGlobal;
@@ -491,7 +491,7 @@ Error AudioDriverCoreAudio::capture_stop() {
return OK;
}
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
Array AudioDriverCoreAudio::_get_device_list(bool capture) {
Array list;
diff --git a/drivers/coreaudio/audio_driver_coreaudio.h b/drivers/coreaudio/audio_driver_coreaudio.h
index f86037f092..0a4bbd662d 100644
--- a/drivers/coreaudio/audio_driver_coreaudio.h
+++ b/drivers/coreaudio/audio_driver_coreaudio.h
@@ -36,7 +36,7 @@
#include "servers/audio_server.h"
#import <AudioUnit/AudioUnit.h>
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
#import <CoreAudio/AudioHardware.h>
#endif
@@ -58,7 +58,7 @@ class AudioDriverCoreAudio : public AudioDriver {
Vector<int32_t> samples_in;
Vector<int16_t> input_buf;
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
Array _get_device_list(bool capture = false);
void _set_device(const String &device, bool capture = false);
@@ -106,7 +106,7 @@ public:
bool try_lock();
void stop();
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
virtual Array get_device_list();
virtual String get_device();
virtual void set_device(String device);
diff --git a/drivers/gl_context/SCsub b/drivers/gl_context/SCsub
index ddeec6f4c6..7e8bd22960 100644
--- a/drivers/gl_context/SCsub
+++ b/drivers/gl_context/SCsub
@@ -2,7 +2,7 @@
Import("env")
-if env["platform"] in ["haiku", "osx", "windows", "linuxbsd"]:
+if env["platform"] in ["haiku", "macos", "windows", "linuxbsd"]:
# Thirdparty source files
thirdparty_dir = "#thirdparty/glad/"
thirdparty_sources = [
diff --git a/drivers/gles3/rasterizer_gles3.cpp b/drivers/gles3/rasterizer_gles3.cpp
index 613a7f37d9..33303b1e38 100644
--- a/drivers/gles3/rasterizer_gles3.cpp
+++ b/drivers/gles3/rasterizer_gles3.cpp
@@ -69,7 +69,7 @@
#endif
#endif
-#if !defined(IPHONE_ENABLED) && !defined(JAVASCRIPT_ENABLED)
+#if !defined(IOS_ENABLED) && !defined(JAVASCRIPT_ENABLED)
// We include EGL below to get debug callback on GLES2 platforms,
// but EGL is not available on iOS.
#define CAN_DEBUG
diff --git a/drivers/unix/os_unix.cpp b/drivers/unix/os_unix.cpp
index 091287c652..5bf14056ab 100644
--- a/drivers/unix/os_unix.cpp
+++ b/drivers/unix/os_unix.cpp
@@ -65,7 +65,7 @@
#include <time.h>
#include <unistd.h>
-#if defined(OSX_ENABLED) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28)
+#if defined(MACOS_ENABLED) || (defined(__ANDROID_API__) && __ANDROID_API__ >= 28)
// Random location for getentropy. Fitting.
#include <sys/random.h>
#define UNIX_GET_ENTROPY
diff --git a/drivers/vulkan/SCsub b/drivers/vulkan/SCsub
index f7de2c4a7e..a076c0ac54 100644
--- a/drivers/vulkan/SCsub
+++ b/drivers/vulkan/SCsub
@@ -15,11 +15,11 @@ if env["use_volk"]:
if env["platform"] == "android":
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_ANDROID_KHR"])
-elif env["platform"] == "iphone":
+elif env["platform"] == "ios":
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_IOS_MVK"])
elif env["platform"] == "linuxbsd" and env["x11"]:
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_XLIB_KHR"])
-elif env["platform"] == "osx":
+elif env["platform"] == "macos":
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_MACOS_MVK"])
elif env["platform"] == "windows":
env.AppendUnique(CPPDEFINES=["VK_USE_PLATFORM_WIN32_KHR"])
@@ -40,7 +40,7 @@ elif env["platform"] == "android":
# Our current NDK version only provides old Vulkan headers,
# so we have to limit VMA.
env_thirdparty_vma.AppendUnique(CPPDEFINES=["VMA_VULKAN_VERSION=1000000"])
-elif env["platform"] == "osx" or env["platform"] == "iphone":
+elif env["platform"] == "macos" or env["platform"] == "ios":
# MoltenVK supports only Vulkan 1.1 API, limit VMA to the same version.
env_thirdparty_vma.AppendUnique(CPPDEFINES=["VMA_VULKAN_VERSION=1001000"])
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index bb9d930cf5..873bb0e1e5 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -698,12 +698,12 @@ String EditorExportPlugin::get_ios_cpp_code() const {
return ios_cpp_code;
}
-void EditorExportPlugin::add_osx_plugin_file(const String &p_path) {
- osx_plugin_files.push_back(p_path);
+void EditorExportPlugin::add_macos_plugin_file(const String &p_path) {
+ macos_plugin_files.push_back(p_path);
}
-const Vector<String> &EditorExportPlugin::get_osx_plugin_files() const {
- return osx_plugin_files;
+const Vector<String> &EditorExportPlugin::get_macos_plugin_files() const {
+ return macos_plugin_files;
}
void EditorExportPlugin::add_ios_project_static_lib(const String &p_path) {
@@ -746,7 +746,7 @@ void EditorExportPlugin::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_ios_linker_flags", "flags"), &EditorExportPlugin::add_ios_linker_flags);
ClassDB::bind_method(D_METHOD("add_ios_bundle_file", "path"), &EditorExportPlugin::add_ios_bundle_file);
ClassDB::bind_method(D_METHOD("add_ios_cpp_code", "code"), &EditorExportPlugin::add_ios_cpp_code);
- ClassDB::bind_method(D_METHOD("add_osx_plugin_file", "path"), &EditorExportPlugin::add_osx_plugin_file);
+ ClassDB::bind_method(D_METHOD("add_macos_plugin_file", "path"), &EditorExportPlugin::add_macos_plugin_file);
ClassDB::bind_method(D_METHOD("skip"), &EditorExportPlugin::skip);
GDVIRTUAL_BIND(_export_file, "path", "type", "features");
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 6f41736d2d..9179a3e2b0 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -366,7 +366,7 @@ class EditorExportPlugin : public RefCounted {
Vector<String> ios_bundle_files;
String ios_cpp_code;
- Vector<String> osx_plugin_files;
+ Vector<String> macos_plugin_files;
_FORCE_INLINE_ void _clear() {
shared_objects.clear();
@@ -381,7 +381,7 @@ class EditorExportPlugin : public RefCounted {
ios_plist_content = "";
ios_linker_flags = "";
ios_cpp_code = "";
- osx_plugin_files.clear();
+ macos_plugin_files.clear();
}
void _export_file_script(const String &p_path, const String &p_type, const Vector<String> &p_features);
@@ -402,7 +402,7 @@ protected:
void add_ios_linker_flags(const String &p_flags);
void add_ios_bundle_file(const String &p_path);
void add_ios_cpp_code(const String &p_code);
- void add_osx_plugin_file(const String &p_path);
+ void add_macos_plugin_file(const String &p_path);
void skip();
@@ -423,7 +423,7 @@ public:
String get_ios_linker_flags() const;
Vector<String> get_ios_bundle_files() const;
String get_ios_cpp_code() const;
- const Vector<String> &get_osx_plugin_files() const;
+ const Vector<String> &get_macos_plugin_files() const;
EditorExportPlugin();
};
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index d58dc98f07..a02051c8ee 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -102,7 +102,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
// - macOS doesn't use font hinting.
// - Windows uses ClearType, which is in between "Light" and "Normal" hinting.
// - Linux has configurable font hinting, but most distributions including Ubuntu default to "Light".
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
font_hinting = TextServer::HINTING_NONE;
#else
font_hinting = TextServer::HINTING_LIGHT;
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index fa8643af86..abb1b73a18 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -414,7 +414,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/editor/code_font_custom_opentype_features", "");
_initial_set("interface/editor/code_font_custom_variations", "");
_initial_set("interface/editor/font_antialiased", true);
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (None),None,Light,Normal")
#else
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/font_hinting", 0, "Auto (Light),None,Light,Normal")
@@ -1370,7 +1370,7 @@ String EditorSettings::get_editor_layouts_config() const {
}
float EditorSettings::get_auto_display_scale() const {
-#if defined(OSX_ENABLED) || defined(ANDROID_ENABLED)
+#if defined(MACOS_ENABLED) || defined(ANDROID_ENABLED)
return DisplayServer::get_singleton()->screen_get_max_scale();
#else
const int screen = DisplayServer::get_singleton()->window_get_current_screen();
@@ -1489,7 +1489,7 @@ void ED_SHORTCUT_OVERRIDE_ARRAY(const String &p_path, const String &p_feature, c
for (int i = 0; i < p_keycodes.size(); i++) {
Key keycode = (Key)p_keycodes[i];
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
if (keycode == Key::KEY_DELETE) {
keycode = KeyModifierMask::CMD | Key::BACKSPACE;
@@ -1519,7 +1519,7 @@ Ref<Shortcut> ED_SHORTCUT_ARRAY(const String &p_path, const String &p_name, cons
for (int i = 0; i < p_keycodes.size(); i++) {
Key keycode = (Key)p_keycodes[i];
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
// Use Cmd+Backspace as a general replacement for Delete shortcuts on macOS
if (keycode == Key::KEY_DELETE) {
keycode = KeyModifierMask::CMD | Key::BACKSPACE;
diff --git a/editor/editor_spin_slider.cpp b/editor/editor_spin_slider.cpp
index 5c0ccd11f0..20e9d7a3df 100644
--- a/editor/editor_spin_slider.cpp
+++ b/editor/editor_spin_slider.cpp
@@ -37,7 +37,7 @@
String EditorSpinSlider::get_tooltip(const Point2 &p_pos) const {
if (grabber->is_visible()) {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
Key key = Key::META;
#else
Key key = Key::CTRL;
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index a98578ad7d..327ff6bb2d 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1998,7 +1998,7 @@ void ProjectManager::shortcut_input(const Ref<InputEvent> &p_ev) {
// Pressing Command + Q quits the Project Manager
// This is handled by the platform implementation on macOS,
// so only define the shortcut on other platforms
-#ifndef OSX_ENABLED
+#ifndef MACOS_ENABLED
if (k->get_keycode_with_modifiers() == (KeyModifierMask::CMD | Key::Q)) {
_dim_window();
get_tree()->quit();
diff --git a/main/main.cpp b/main/main.cpp
index 8f4f348dba..12d1196cdf 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -685,7 +685,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
I = args.front();
while (I) {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
// Ignore the process serial number argument passed by macOS Gatekeeper.
// Otherwise, Godot would try to open a non-existent project on the first start and abort.
if (I->get().begins_with("-psn_")) {
@@ -2668,7 +2668,7 @@ bool Main::start() {
ERR_FAIL_COND_V_MSG(!scene, false, "Failed loading scene: " + local_game_path);
sml->add_current_scene(scene);
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
String mac_iconpath = GLOBAL_DEF("application/config/macos_native_icon", "Variant()");
if (!mac_iconpath.is_empty()) {
DisplayServer::get_singleton()->set_native_icon(mac_iconpath);
diff --git a/methods.py b/methods.py
index b4a55cab79..1db3a8aa01 100644
--- a/methods.py
+++ b/methods.py
@@ -833,15 +833,15 @@ def Run(env, function, short_message, subprocess=True):
def detect_darwin_sdk_path(platform, env):
sdk_name = ""
- if platform == "osx":
+ if platform == "macos":
sdk_name = "macosx"
var_name = "MACOS_SDK_PATH"
- elif platform == "iphone":
+ elif platform == "ios":
sdk_name = "iphoneos"
- var_name = "IPHONESDK"
- elif platform == "iphonesimulator":
+ var_name = "IOS_SDK_PATH"
+ elif platform == "iossimulator":
sdk_name = "iphonesimulator"
- var_name = "IPHONESDK"
+ var_name = "IOS_SDK_PATH"
else:
raise Exception("Invalid platform argument passed to detect_darwin_sdk_path")
diff --git a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/Info.plist b/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/Info.plist
index 846533594f..846533594f 100644
--- a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/Info.plist
+++ b/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/Info.plist
diff --git a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/empty b/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/empty
index bd3e894333..bd3e894333 100644
--- a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64/empty
+++ b/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/empty
diff --git a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/empty b/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/empty
index bd3e894333..bd3e894333 100644
--- a/misc/dist/ios_xcode/libgodot.iphone.debug.xcframework/ios-arm64_x86_64-simulator/empty
+++ b/misc/dist/ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/empty
diff --git a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/Info.plist b/misc/dist/ios_xcode/libgodot.ios.release.xcframework/Info.plist
index 846533594f..846533594f 100644
--- a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/Info.plist
+++ b/misc/dist/ios_xcode/libgodot.ios.release.xcframework/Info.plist
diff --git a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/empty b/misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64/empty
index bd3e894333..bd3e894333 100644
--- a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64/empty
+++ b/misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64/empty
diff --git a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/empty b/misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/empty
index bd3e894333..bd3e894333 100644
--- a/misc/dist/ios_xcode/libgodot.iphone.release.xcframework/ios-arm64_x86_64-simulator/empty
+++ b/misc/dist/ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/empty
diff --git a/misc/dist/osx/editor.entitlements b/misc/dist/macos/editor.entitlements
index d0137910a3..d0137910a3 100644
--- a/misc/dist/osx/editor.entitlements
+++ b/misc/dist/macos/editor.entitlements
diff --git a/misc/dist/osx_template.app/Contents/Info.plist b/misc/dist/macos_template.app/Contents/Info.plist
index 542146cdb8..542146cdb8 100644
--- a/misc/dist/osx_template.app/Contents/Info.plist
+++ b/misc/dist/macos_template.app/Contents/Info.plist
diff --git a/misc/dist/osx_template.app/Contents/PkgInfo b/misc/dist/macos_template.app/Contents/PkgInfo
index 6f749b0f37..6f749b0f37 100644
--- a/misc/dist/osx_template.app/Contents/PkgInfo
+++ b/misc/dist/macos_template.app/Contents/PkgInfo
diff --git a/misc/dist/osx_template.app/Contents/Resources/icon.icns b/misc/dist/macos_template.app/Contents/Resources/icon.icns
index be9254630c..be9254630c 100644
--- a/misc/dist/osx_template.app/Contents/Resources/icon.icns
+++ b/misc/dist/macos_template.app/Contents/Resources/icon.icns
Binary files differ
diff --git a/misc/dist/osx_tools.app/Contents/Info.plist b/misc/dist/macos_tools.app/Contents/Info.plist
index 886df87cc6..886df87cc6 100644
--- a/misc/dist/osx_tools.app/Contents/Info.plist
+++ b/misc/dist/macos_tools.app/Contents/Info.plist
diff --git a/misc/dist/osx_tools.app/Contents/PkgInfo b/misc/dist/macos_tools.app/Contents/PkgInfo
index 6f749b0f37..6f749b0f37 100644
--- a/misc/dist/osx_tools.app/Contents/PkgInfo
+++ b/misc/dist/macos_tools.app/Contents/PkgInfo
diff --git a/misc/dist/osx_tools.app/Contents/Resources/GDScript.icns b/misc/dist/macos_tools.app/Contents/Resources/GDScript.icns
index b08e8df339..b08e8df339 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/GDScript.icns
+++ b/misc/dist/macos_tools.app/Contents/Resources/GDScript.icns
Binary files differ
diff --git a/misc/dist/osx_tools.app/Contents/Resources/Godot.icns b/misc/dist/macos_tools.app/Contents/Resources/Godot.icns
index 61697976c6..61697976c6 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/Godot.icns
+++ b/misc/dist/macos_tools.app/Contents/Resources/Godot.icns
Binary files differ
diff --git a/misc/dist/osx_tools.app/Contents/Resources/Project.icns b/misc/dist/macos_tools.app/Contents/Resources/Project.icns
index 10e31528e4..10e31528e4 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/Project.icns
+++ b/misc/dist/macos_tools.app/Contents/Resources/Project.icns
Binary files differ
diff --git a/misc/dist/osx_tools.app/Contents/Resources/Resource.icns b/misc/dist/macos_tools.app/Contents/Resources/Resource.icns
index 9648cb616e..9648cb616e 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/Resource.icns
+++ b/misc/dist/macos_tools.app/Contents/Resources/Resource.icns
Binary files differ
diff --git a/misc/dist/osx_tools.app/Contents/Resources/Scene.icns b/misc/dist/macos_tools.app/Contents/Resources/Scene.icns
index c8c3dee07e..c8c3dee07e 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/Scene.icns
+++ b/misc/dist/macos_tools.app/Contents/Resources/Scene.icns
Binary files differ
diff --git a/misc/dist/osx_tools.app/Contents/Resources/Shader.icns b/misc/dist/macos_tools.app/Contents/Resources/Shader.icns
index a76e648a1a..a76e648a1a 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/Shader.icns
+++ b/misc/dist/macos_tools.app/Contents/Resources/Shader.icns
Binary files differ
diff --git a/misc/dist/osx_tools.app/Contents/Resources/af.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/af.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/af.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/af.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ar.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/az.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/az.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/az.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/az.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/bg.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/bn.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/br.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/br.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/br.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/br.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ca.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/cs.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/da.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/da.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/da.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/da.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/de.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/de.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/de.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/de.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/el.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/el.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/el.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/el.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/en.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/en.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/en.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/en.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/eo.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/es.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/es.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/es.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/es.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/es_AR.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/et.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/et.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/et.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/et.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/eu.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/fa.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/fi.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/fil.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/fr.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ga.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/gl.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/he.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/he.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/he.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/he.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/hi.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/hr.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/hu.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/id.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/id.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/id.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/id.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/is.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/is.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/is.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/is.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/it.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/it.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/it.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/it.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ja.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ka.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/km.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/km.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/km.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/km.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ko.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/lt.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/lv.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/mi.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/mk.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ml.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/mr.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ms.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/nb.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/nl.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/or.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/or.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/or.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/or.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/pl.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/pt.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/pt_BR.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ro.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ru.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/si.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/si.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/si.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/si.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/sk.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/sl.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/sq.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/sr-Cyrl.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/sr-Latn.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/sv.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ta.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/te.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/te.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/te.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/te.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/th.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/th.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/th.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/th.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/tr.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/tt.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/tzm.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/uk.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/ur_PK.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/vi.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/zh_CN.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/zh_HK.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings b/misc/dist/macos_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings
index e69de29bb2..e69de29bb2 100644
--- a/misc/dist/osx_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings
+++ b/misc/dist/macos_tools.app/Contents/Resources/zh_TW.lproj/InfoPlist.strings
diff --git a/misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json b/misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json
deleted file mode 100644
index c4f8f71d0e..0000000000
--- a/misc/dist/osx_template.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "file_format_version" : "1.0.0",
- "ICD": {
- "library_path": "../../../Frameworks/libMoltenVK.dylib",
- "api_version" : "1.1.0"
- }
-}
diff --git a/misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json b/misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json
deleted file mode 100644
index c4f8f71d0e..0000000000
--- a/misc/dist/osx_tools.app/Contents/Resources/vulkan/icd.d/MoltenVK_icd.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "file_format_version" : "1.0.0",
- "ICD": {
- "library_path": "../../../Frameworks/libMoltenVK.dylib",
- "api_version" : "1.1.0"
- }
-}
diff --git a/modules/camera/SCsub b/modules/camera/SCsub
index de97724d09..9a6147d433 100644
--- a/modules/camera/SCsub
+++ b/modules/camera/SCsub
@@ -9,6 +9,6 @@ if env["platform"] == "windows":
env_camera.add_source_files(env.modules_sources, "register_types.cpp")
env_camera.add_source_files(env.modules_sources, "camera_win.cpp")
-elif env["platform"] == "osx":
+elif env["platform"] == "macos":
env_camera.add_source_files(env.modules_sources, "register_types.cpp")
- env_camera.add_source_files(env.modules_sources, "camera_osx.mm")
+ env_camera.add_source_files(env.modules_sources, "camera_macos.mm")
diff --git a/modules/camera/camera_osx.h b/modules/camera/camera_macos.h
index b0db844599..badf78f0e8 100644
--- a/modules/camera/camera_osx.h
+++ b/modules/camera/camera_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* camera_osx.h */
+/* camera_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,19 +28,19 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef CAMERAOSX_H
-#define CAMERAOSX_H
+#ifndef CAMERA_MACOS_H
+#define CAMERA_MACOS_H
///@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 "servers/camera_server.h"
-class CameraOSX : public CameraServer {
+class CameraMacOS : public CameraServer {
public:
- CameraOSX();
+ CameraMacOS();
void update_feeds();
};
-#endif /* CAMERAOSX_H */
+#endif /* CAMERA_MACOS_H */
diff --git a/modules/camera/camera_osx.mm b/modules/camera/camera_macos.mm
index d199c31b2f..0b9696a3e9 100644
--- a/modules/camera/camera_osx.mm
+++ b/modules/camera/camera_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* camera_osx.mm */
+/* camera_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -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_osx.h"
+#include "camera_macos.h"
#include "servers/camera/camera_feed.h"
#import <AVFoundation/AVFoundation.h>
@@ -191,9 +191,9 @@
@end
//////////////////////////////////////////////////////////////////////////
-// CameraFeedOSX - Subclass for camera feeds in OSX
+// CameraFeedMacOS - Subclass for camera feeds in macOS
-class CameraFeedOSX : public CameraFeed {
+class CameraFeedMacOS : public CameraFeed {
private:
AVCaptureDevice *device;
MyCaptureSession *capture_session;
@@ -201,7 +201,7 @@ private:
public:
AVCaptureDevice *get_device() const;
- CameraFeedOSX();
+ CameraFeedMacOS();
void set_device(AVCaptureDevice *p_device);
@@ -209,16 +209,16 @@ public:
void deactivate_feed();
};
-AVCaptureDevice *CameraFeedOSX::get_device() const {
+AVCaptureDevice *CameraFeedMacOS::get_device() const {
return device;
};
-CameraFeedOSX::CameraFeedOSX() {
+CameraFeedMacOS::CameraFeedMacOS() {
device = nullptr;
capture_session = nullptr;
};
-void CameraFeedOSX::set_device(AVCaptureDevice *p_device) {
+void CameraFeedMacOS::set_device(AVCaptureDevice *p_device) {
device = p_device;
// get some info
@@ -232,7 +232,7 @@ void CameraFeedOSX::set_device(AVCaptureDevice *p_device) {
};
};
-bool CameraFeedOSX::activate_feed() {
+bool CameraFeedMacOS::activate_feed() {
if (capture_session) {
// Already recording!
} else {
@@ -258,7 +258,7 @@ bool CameraFeedOSX::activate_feed() {
return true;
};
-void CameraFeedOSX::deactivate_feed() {
+void CameraFeedMacOS::deactivate_feed() {
// end camera capture if we have one
if (capture_session) {
[capture_session cleanup];
@@ -271,7 +271,7 @@ void CameraFeedOSX::deactivate_feed() {
// when devices are connected/disconnected
@interface MyDeviceNotifications : NSObject {
- CameraOSX *camera_server;
+ CameraMacOS *camera_server;
}
@end
@@ -282,7 +282,7 @@ void CameraFeedOSX::deactivate_feed() {
camera_server->update_feeds();
}
-- (id)initForServer:(CameraOSX *)p_server {
+- (id)initForServer:(CameraMacOS *)p_server {
if (self = [super init]) {
camera_server = p_server;
@@ -303,9 +303,9 @@ void CameraFeedOSX::deactivate_feed() {
MyDeviceNotifications *device_notifications = nil;
//////////////////////////////////////////////////////////////////////////
-// CameraOSX - Subclass for our camera server on OSX
+// CameraMacOS - Subclass for our camera server on macOS
-void CameraOSX::update_feeds() {
+void CameraMacOS::update_feeds() {
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
AVCaptureDeviceDiscoverySession *session = [AVCaptureDeviceDiscoverySession discoverySessionWithDeviceTypes:[NSArray arrayWithObjects:AVCaptureDeviceTypeExternalUnknown, AVCaptureDeviceTypeBuiltInWideAngleCamera, nil] mediaType:AVMediaTypeVideo position:AVCaptureDevicePositionUnspecified];
NSArray *devices = session.devices;
@@ -315,7 +315,7 @@ void CameraOSX::update_feeds() {
// remove devices that are gone..
for (int i = feeds.size() - 1; i >= 0; i--) {
- Ref<CameraFeedOSX> feed = (Ref<CameraFeedOSX>)feeds[i];
+ Ref<CameraFeedMacOS> feed = (Ref<CameraFeedMacOS>)feeds[i];
if (![devices containsObject:feed->get_device()]) {
// remove it from our array, this will also destroy it ;)
@@ -326,14 +326,14 @@ void CameraOSX::update_feeds() {
for (AVCaptureDevice *device in devices) {
bool found = false;
for (int i = 0; i < feeds.size() && !found; i++) {
- Ref<CameraFeedOSX> feed = (Ref<CameraFeedOSX>)feeds[i];
+ Ref<CameraFeedMacOS> feed = (Ref<CameraFeedMacOS>)feeds[i];
if (feed->get_device() == device) {
found = true;
};
};
if (!found) {
- Ref<CameraFeedOSX> newfeed;
+ Ref<CameraFeedMacOS> newfeed;
newfeed.instantiate();
newfeed->set_device(device);
@@ -346,7 +346,7 @@ void CameraOSX::update_feeds() {
};
};
-CameraOSX::CameraOSX() {
+CameraMacOS::CameraMacOS() {
// Find available cameras we have at this time
update_feeds();
diff --git a/modules/camera/config.py b/modules/camera/config.py
index 8a22751aa7..d2b2542dd9 100644
--- a/modules/camera/config.py
+++ b/modules/camera/config.py
@@ -1,5 +1,5 @@
def can_build(env, platform):
- return platform == "osx" or platform == "windows"
+ return platform == "macos" or platform == "windows"
def configure(env):
diff --git a/modules/camera/register_types.cpp b/modules/camera/register_types.cpp
index 98a4b5ca1a..40e2224d6b 100644
--- a/modules/camera/register_types.cpp
+++ b/modules/camera/register_types.cpp
@@ -33,8 +33,8 @@
#if defined(WINDOWS_ENABLED)
#include "camera_win.h"
#endif
-#if defined(OSX_ENABLED)
-#include "camera_osx.h"
+#if defined(MACOS_ENABLED)
+#include "camera_macos.h"
#endif
void initialize_camera_module(ModuleInitializationLevel p_level) {
@@ -45,8 +45,8 @@ void initialize_camera_module(ModuleInitializationLevel p_level) {
#if defined(WINDOWS_ENABLED)
CameraServer::make_default<CameraWindows>();
#endif
-#if defined(OSX_ENABLED)
- CameraServer::make_default<CameraOSX>();
+#if defined(MACOS_ENABLED)
+ CameraServer::make_default<CameraMacOS>();
#endif
}
diff --git a/modules/denoise/config.py b/modules/denoise/config.py
index 3aa840acb0..521115dae5 100644
--- a/modules/denoise/config.py
+++ b/modules/denoise/config.py
@@ -4,7 +4,7 @@ def can_build(env, platform):
# It's also only relevant for tools build and desktop platforms,
# as doing lightmap generation and denoising on Android or HTML5
# would be a bit far-fetched.
- desktop_platforms = ["linuxbsd", "osx", "windows"]
+ desktop_platforms = ["linuxbsd", "macos", "windows"]
supported_arch = env["bits"] == "64"
if env["arch"] == "arm64":
supported_arch = False
diff --git a/modules/gltf/editor/editor_scene_importer_blend.cpp b/modules/gltf/editor/editor_scene_importer_blend.cpp
index 033591a0b9..8002c185c7 100644
--- a/modules/gltf/editor/editor_scene_importer_blend.cpp
+++ b/modules/gltf/editor/editor_scene_importer_blend.cpp
@@ -292,7 +292,7 @@ static bool _test_blender_path(const String &p_path, String *r_err = nullptr) {
path = path.plus_file("blender");
#endif
-#if defined(OSX_ENABLED)
+#if defined(MACOS_ENABLED)
if (!FileAccess::exists(path)) {
path = path.plus_file("Blender");
}
@@ -468,7 +468,7 @@ bool EditorFileSystemImportFormatSupportQueryBlend::query() {
// Autodetect
auto_detected_path = "";
-#if defined(OSX_ENABLED)
+#if defined(MACOS_ENABLED)
{
Vector<String> mdfind_paths;
diff --git a/modules/mobile_vr/mobile_vr_interface.cpp b/modules/mobile_vr/mobile_vr_interface.cpp
index 5876b6cbf3..95f1a657a4 100644
--- a/modules/mobile_vr/mobile_vr_interface.cpp
+++ b/modules/mobile_vr/mobile_vr_interface.cpp
@@ -45,7 +45,7 @@ uint32_t MobileVRInterface::get_capabilities() const {
Vector3 MobileVRInterface::scale_magneto(const Vector3 &p_magnetometer) {
// Our magnetometer doesn't give us nice clean data.
- // Well it may on Mac OS X because we're getting a calibrated value in the current implementation but Android we're getting raw data.
+ // Well it may on macOS because we're getting a calibrated value in the current implementation but Android we're getting raw data.
// This is a fairly simple adjustment we can do to correct for the magnetometer data being elliptical
Vector3 mag_raw = p_magnetometer;
diff --git a/modules/mono/SCsub b/modules/mono/SCsub
index 3bafa351a9..d10ebc7b47 100644
--- a/modules/mono/SCsub
+++ b/modules/mono/SCsub
@@ -55,7 +55,7 @@ env_mono.add_source_files(env.modules_sources, "utils/*.cpp")
env_mono.add_source_files(env.modules_sources, "mono_gd/support/*.cpp")
-if env["platform"] in ["osx", "iphone"]:
+if env["platform"] in ["macos", "ios"]:
env_mono.add_source_files(env.modules_sources, "mono_gd/support/*.mm")
env_mono.add_source_files(env.modules_sources, "mono_gd/support/*.m")
elif env["platform"] == "android":
diff --git a/modules/mono/build_scripts/mono_configure.py b/modules/mono/build_scripts/mono_configure.py
index 8e441e7e07..e69904c54b 100644
--- a/modules/mono/build_scripts/mono_configure.py
+++ b/modules/mono/build_scripts/mono_configure.py
@@ -63,15 +63,15 @@ def copy_file(src_dir, dst_dir, src_name, dst_name=""):
def is_desktop(platform):
- return platform in ["windows", "osx", "linuxbsd", "server", "uwp", "haiku"]
+ return platform in ["windows", "macos", "linuxbsd", "server", "uwp", "haiku"]
def is_unix_like(platform):
- return platform in ["osx", "linuxbsd", "server", "android", "haiku", "iphone"]
+ return platform in ["macos", "linuxbsd", "server", "android", "haiku", "ios"]
def module_supports_tools_on(platform):
- return platform not in ["android", "javascript", "iphone"]
+ return platform not in ["android", "javascript", "ios"]
def find_wasm_src_dir(mono_root):
@@ -89,7 +89,7 @@ def configure(env, env_mono):
bits = env["bits"]
is_android = env["platform"] == "android"
is_javascript = env["platform"] == "javascript"
- is_ios = env["platform"] == "iphone"
+ is_ios = env["platform"] == "ios"
is_ios_sim = is_ios and env["arch"] in ["x86", "x86_64"]
tools_enabled = env["tools"]
@@ -206,7 +206,7 @@ def configure(env, env_mono):
copy_file(mono_bin_path, "#bin", mono_dll_file)
else:
- is_apple = env["platform"] in ["osx", "iphone"]
+ is_apple = env["platform"] in ["macos", "ios"]
is_macos = is_apple and not is_ios
sharedlib_ext = ".dylib" if is_apple else ".so"
@@ -221,7 +221,7 @@ def configure(env, env_mono):
)
if not mono_root and is_macos:
- # Try with some known directories under OSX
+ # Try with some known directories under macOS
hint_dirs = ["/Library/Frameworks/Mono.framework/Versions/Current", "/usr/local/var/homebrew/linked/mono"]
for hint_dir in hint_dirs:
if os.path.isdir(hint_dir):
@@ -270,7 +270,7 @@ def configure(env, env_mono):
def copy_mono_lib(libname_wo_ext):
copy_file(
- mono_lib_path, "#bin", libname_wo_ext + ".a", "%s.iphone.%s.a" % (libname_wo_ext, arch)
+ mono_lib_path, "#bin", libname_wo_ext + ".a", "%s.ios.%s.a" % (libname_wo_ext, arch)
)
# Copy Mono libraries to the output folder. These are meant to be bundled with
@@ -539,7 +539,7 @@ def copy_mono_shared_libs(env, mono_root, target_mono_root_dir):
os.makedirs(target_mono_lib_dir)
lib_file_names = []
- if platform == "osx":
+ if platform == "macos":
lib_file_names = [
lib_name + ".dylib"
for lib_name in ["libmono-btls-shared", "libmono-native-compat", "libMonoPosixHelper"]
diff --git a/modules/mono/config.py b/modules/mono/config.py
index df02d9a309..3e6584590c 100644
--- a/modules/mono/config.py
+++ b/modules/mono/config.py
@@ -1,4 +1,4 @@
-supported_platforms = ["windows", "osx", "linuxbsd", "server", "android", "haiku", "javascript", "iphone"]
+supported_platforms = ["windows", "macos", "linuxbsd", "server", "android", "haiku", "javascript", "ios"]
def can_build(env, platform):
@@ -15,7 +15,7 @@ def configure(env):
from SCons.Script import BoolVariable, PathVariable, Variables, Help
- default_mono_static = platform in ["iphone", "javascript"]
+ default_mono_static = platform in ["ios", "javascript"]
default_mono_bundles_zlib = platform in ["javascript"]
envvars = Variables()
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props
index 0128f5c706..5a499742e9 100644
--- a/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.NET.Sdk/Sdk/Sdk.props
@@ -57,7 +57,7 @@
<PropertyGroup Condition=" '$(GodotTargetPlatform)' == '' ">
<GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(Linux))' ">linuxbsd</GodotTargetPlatform>
<GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(FreeBSD))' ">linuxbsd</GodotTargetPlatform>
- <GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(OSX))' ">osx</GodotTargetPlatform>
+ <GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(OSX))' ">macos</GodotTargetPlatform>
<GodotTargetPlatform Condition=" '$([MSBuild]::IsOsPlatform(Windows))' ">windows</GodotTargetPlatform>
</PropertyGroup>
@@ -76,12 +76,12 @@
-->
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'windows' ">GODOT_WINDOWS;GODOT_PC</GodotPlatformConstants>
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'linuxbsd' ">GODOT_LINUXBSD;GODOT_PC</GodotPlatformConstants>
- <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'osx' ">GODOT_OSX;GODOT_MACOS;GODOT_PC</GodotPlatformConstants>
+ <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'macos' ">GODOT_OSX;GODOT_MACOS;GODOT_PC</GodotPlatformConstants>
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'server' ">GODOT_SERVER;GODOT_PC</GodotPlatformConstants>
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'uwp' ">GODOT_UWP;GODOT_PC</GodotPlatformConstants>
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'haiku' ">GODOT_HAIKU;GODOT_PC</GodotPlatformConstants>
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'android' ">GODOT_ANDROID;GODOT_MOBILE</GodotPlatformConstants>
- <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'iphone' ">GODOT_IPHONE;GODOT_IOS;GODOT_MOBILE</GodotPlatformConstants>
+ <GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'ios' ">GODOT_IPHONE;GODOT_IOS;GODOT_MOBILE</GodotPlatformConstants>
<GodotPlatformConstants Condition=" '$(GodotTargetPlatform)' == 'javascript' ">GODOT_JAVASCRIPT;GODOT_HTML5;GODOT_WASM;GODOT_WEB</GodotPlatformConstants>
<GodotDefineConstants>$(GodotDefineConstants);$(GodotPlatformConstants)</GodotDefineConstants>
diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs b/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs
index e2f4d2f5fd..6a80e81fdd 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Export/AotBuilder.cs
@@ -336,10 +336,10 @@ MONO_AOT_MODE_LAST = 1000,
// Add the required Mono libraries to the Xcode project
- string MonoLibFile(string libFileName) => libFileName + ".iphone.fat.a";
+ string MonoLibFile(string libFileName) => libFileName + ".ios.fat.a";
string MonoLibFromTemplate(string libFileName) =>
- Path.Combine(Internal.FullTemplatesDir, "iphone-mono-libs", MonoLibFile(libFileName));
+ Path.Combine(Internal.FullTemplatesDir, "ios-mono-libs", MonoLibFile(libFileName));
exporter.AddIosProjectStaticLib(MonoLibFromTemplate("libmonosgen-2.0"));
diff --git a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
index 3e46a89b7c..6a9ead9aa1 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Export/ExportPlugin.cs
@@ -380,7 +380,7 @@ namespace GodotTools.Export
private static bool PlatformHasTemplateDir(string platform)
{
- // OSX export templates are contained in a zip, so we place our custom template inside it and let Godot do the rest.
+ // macOS export templates are contained in a zip, so we place our custom template inside it and let Godot do the rest.
return !new[] { OS.Platforms.MacOS, OS.Platforms.Android, OS.Platforms.iOS, OS.Platforms.HTML5 }.Contains(platform);
}
diff --git a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
index 69960bdbeb..b39c3d1c0d 100644
--- a/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
@@ -263,16 +263,16 @@ namespace GodotTools
var args = new List<string>();
- bool osxAppBundleInstalled = false;
+ bool macOSAppBundleInstalled = false;
if (OS.IsMacOS)
{
// The package path is '/Applications/Visual Studio Code.app'
const string vscodeBundleId = "com.microsoft.VSCode";
- osxAppBundleInstalled = Internal.IsOsxAppBundleInstalled(vscodeBundleId);
+ macOSAppBundleInstalled = Internal.IsMacOSAppBundleInstalled(vscodeBundleId);
- if (osxAppBundleInstalled)
+ if (macOSAppBundleInstalled)
{
args.Add("-b");
args.Add(vscodeBundleId);
@@ -307,13 +307,13 @@ namespace GodotTools
if (OS.IsMacOS)
{
- if (!osxAppBundleInstalled && string.IsNullOrEmpty(_vsCodePath))
+ if (!macOSAppBundleInstalled && string.IsNullOrEmpty(_vsCodePath))
{
GD.PushError("Cannot find code editor: VSCode");
return Error.FileNotFound;
}
- command = osxAppBundleInstalled ? "/usr/bin/open" : _vsCodePath;
+ command = macOSAppBundleInstalled ? "/usr/bin/open" : _vsCodePath;
}
else
{
diff --git a/modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs b/modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs
index 3f1d5ac3ca..7a0983a8cb 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Ides/MonoDevelop/Instance.cs
@@ -30,7 +30,7 @@ namespace GodotTools.Ides.MonoDevelop
{
string bundleId = BundleIds[_editorId];
- if (Internal.IsOsxAppBundleInstalled(bundleId))
+ if (Internal.IsMacOSAppBundleInstalled(bundleId))
{
command = "open";
diff --git a/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs b/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
index 77370090ec..72985db292 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Internals/Internal.cs
@@ -17,7 +17,7 @@ namespace GodotTools.Internals
public static string SimplifyGodotPath(this string path) => internal_SimplifyGodotPath(path);
- public static bool IsOsxAppBundleInstalled(string bundleId) => internal_IsOsxAppBundleInstalled(bundleId);
+ public static bool IsMacOSAppBundleInstalled(string bundleId) => internal_IsMacOSAppBundleInstalled(bundleId);
public static bool GodotIs32Bits() => internal_GodotIs32Bits();
@@ -63,7 +63,7 @@ namespace GodotTools.Internals
private static extern string internal_SimplifyGodotPath(this string path);
[MethodImpl(MethodImplOptions.InternalCall)]
- private static extern bool internal_IsOsxAppBundleInstalled(string bundleId);
+ private static extern bool internal_IsMacOSAppBundleInstalled(string bundleId);
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool internal_GodotIs32Bits();
diff --git a/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs b/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs
index 2db549c623..5cef6e5c3c 100644
--- a/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs
+++ b/modules/mono/editor/GodotTools/GodotTools/Utils/OS.cs
@@ -37,13 +37,13 @@ namespace GodotTools.Utils
public static class Platforms
{
public const string Windows = "windows";
- public const string MacOS = "osx";
+ public const string MacOS = "macos";
public const string LinuxBSD = "linuxbsd";
public const string Server = "server";
public const string UWP = "uwp";
public const string Haiku = "haiku";
public const string Android = "android";
- public const string iOS = "iphone";
+ public const string iOS = "ios";
public const string HTML5 = "javascript";
}
diff --git a/modules/mono/editor/editor_internal_calls.cpp b/modules/mono/editor/editor_internal_calls.cpp
index f7f710f3f1..5bf3839e94 100644
--- a/modules/mono/editor/editor_internal_calls.cpp
+++ b/modules/mono/editor/editor_internal_calls.cpp
@@ -47,7 +47,7 @@
#include "../glue/cs_glue_version.gen.h"
#include "../godotsharp_dirs.h"
#include "../mono_gd/gd_mono_marshal.h"
-#include "../utils/osx_utils.h"
+#include "../utils/macos_utils.h"
#include "code_completion.h"
#include "godotsharp_export.h"
@@ -198,10 +198,10 @@ MonoString *godot_icall_Internal_SimplifyGodotPath(MonoString *p_path) {
return GDMonoMarshal::mono_string_from_godot(path.simplify_path());
}
-MonoBoolean godot_icall_Internal_IsOsxAppBundleInstalled(MonoString *p_bundle_id) {
-#ifdef OSX_ENABLED
+MonoBoolean godot_icall_Internal_IsMacOSAppBundleInstalled(MonoString *p_bundle_id) {
+#ifdef MACOS_ENABLED
String bundle_id = GDMonoMarshal::mono_string_to_godot(p_bundle_id);
- return (MonoBoolean)osx_is_app_bundle_installed(bundle_id);
+ return (MonoBoolean)macos_is_app_bundle_installed(bundle_id);
#else
(void)p_bundle_id; // UNUSED
return (MonoBoolean) false;
@@ -366,7 +366,7 @@ void register_editor_internal_calls() {
GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_UpdateApiAssembliesFromPrebuilt", godot_icall_Internal_UpdateApiAssembliesFromPrebuilt);
GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_FullTemplatesDir", godot_icall_Internal_FullTemplatesDir);
GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_SimplifyGodotPath", godot_icall_Internal_SimplifyGodotPath);
- GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_IsOsxAppBundleInstalled", godot_icall_Internal_IsOsxAppBundleInstalled);
+ GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_IsMacOSAppBundleInstalled", godot_icall_Internal_IsMacOSAppBundleInstalled);
GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GodotIs32Bits", godot_icall_Internal_GodotIs32Bits);
GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GodotIsRealTDouble", godot_icall_Internal_GodotIsRealTDouble);
GDMonoUtils::add_internal_call("GodotTools.Internals.Internal::internal_GodotMainIteration", godot_icall_Internal_GodotMainIteration);
diff --git a/modules/mono/godotsharp_dirs.cpp b/modules/mono/godotsharp_dirs.cpp
index cb2b60fcce..f17b24e399 100644
--- a/modules/mono/godotsharp_dirs.cpp
+++ b/modules/mono/godotsharp_dirs.cpp
@@ -184,7 +184,7 @@ private:
data_mono_bin_dir = data_mono_root_dir.plus_file("bin");
#endif
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
if (!DirAccess::exists(data_editor_tools_dir)) {
data_editor_tools_dir = exe_dir.plus_file("../Resources/GodotSharp/Tools");
}
@@ -222,7 +222,7 @@ private:
data_mono_bin_dir = data_mono_root_dir.plus_file("bin");
#endif
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
if (!DirAccess::exists(data_mono_root_dir)) {
data_mono_etc_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/etc");
data_mono_lib_dir = exe_dir.plus_file("../Resources/GodotSharp/Mono/lib");
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index 39a8ef22b7..d3d3bb2bef 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -55,7 +55,7 @@
#ifdef ANDROID_ENABLED
#include "android_mono_config.h"
#include "support/android_support.h"
-#elif defined(IPHONE_ENABLED)
+#elif defined(IOS_ENABLED)
#include "support/ios_support.h"
#endif
@@ -188,7 +188,7 @@ MonoDomain *gd_initialize_mono_runtime() {
MonoDomain *gd_initialize_mono_runtime() {
gd_mono_debug_init();
-#if defined(IPHONE_ENABLED) || defined(ANDROID_ENABLED)
+#if defined(IOS_ENABLED) || defined(ANDROID_ENABLED)
// I don't know whether this actually matters or not
const char *runtime_version = "mobile";
#else
@@ -263,7 +263,7 @@ void GDMono::determine_mono_dirs(String &r_assembly_rootdir, String &r_config_di
if (mono_reg_info.config_dir.length() && DirAccess::exists(mono_reg_info.config_dir)) {
r_config_dir = mono_reg_info.config_dir;
}
-#elif defined(OSX_ENABLED)
+#elif defined(MACOS_ENABLED)
const char *c_assembly_rootdir = mono_assembly_getrootdir();
const char *c_config_dir = mono_get_config_dir();
@@ -343,7 +343,7 @@ void GDMono::initialize() {
#if defined(ANDROID_ENABLED)
gdmono::android::support::initialize();
-#elif defined(IPHONE_ENABLED)
+#elif defined(IOS_ENABLED)
gdmono::ios::support::initialize();
#endif
diff --git a/modules/mono/mono_gd/gd_mono_log.h b/modules/mono/mono_gd/gd_mono_log.h
index 9fc35f8e31..93ba6a410e 100644
--- a/modules/mono/mono_gd/gd_mono_log.h
+++ b/modules/mono/mono_gd/gd_mono_log.h
@@ -35,7 +35,7 @@
#include "core/typedefs.h"
-#if !defined(JAVASCRIPT_ENABLED) && !defined(IPHONE_ENABLED)
+#if !defined(JAVASCRIPT_ENABLED) && !defined(IOS_ENABLED)
// We have custom mono log callbacks for WASM and iOS
#define GD_MONO_LOG_ENABLED
#endif
diff --git a/modules/mono/mono_gd/gd_mono_method_thunk.h b/modules/mono/mono_gd/gd_mono_method_thunk.h
index bb163b89bc..0180dee3ea 100644
--- a/modules/mono/mono_gd/gd_mono_method_thunk.h
+++ b/modules/mono/mono_gd/gd_mono_method_thunk.h
@@ -39,7 +39,7 @@
#include "gd_mono_method.h"
#include "gd_mono_utils.h"
-#if !defined(JAVASCRIPT_ENABLED) && !defined(IPHONE_ENABLED)
+#if !defined(JAVASCRIPT_ENABLED) && !defined(IOS_ENABLED)
#define HAVE_METHOD_THUNKS
#endif
diff --git a/modules/mono/mono_gd/support/ios_support.h b/modules/mono/mono_gd/support/ios_support.h
index 2f444d5089..03e86df698 100644
--- a/modules/mono/mono_gd/support/ios_support.h
+++ b/modules/mono/mono_gd/support/ios_support.h
@@ -31,7 +31,7 @@
#ifndef IOS_SUPPORT_H
#define IOS_SUPPORT_H
-#if defined(IPHONE_ENABLED)
+#if defined(IOS_ENABLED)
#include "core/string/ustring.h"
@@ -45,6 +45,6 @@ void cleanup();
} // namespace ios
} // namespace gdmono
-#endif // IPHONE_ENABLED
+#endif // IOS_ENABLED
#endif // IOS_SUPPORT_H
diff --git a/modules/mono/mono_gd/support/ios_support.mm b/modules/mono/mono_gd/support/ios_support.mm
index df97dfba49..7c941b9d1e 100644
--- a/modules/mono/mono_gd/support/ios_support.mm
+++ b/modules/mono/mono_gd/support/ios_support.mm
@@ -30,7 +30,7 @@
#include "ios_support.h"
-#if defined(IPHONE_ENABLED)
+#if defined(IOS_ENABLED)
#import <Foundation/Foundation.h>
#include <os/log.h>
@@ -147,4 +147,4 @@ GD_PINVOKE_EXPORT void xamarin_start_wwan(const char *p_uri) {
os_log_error(OS_LOG_DEFAULT, "Not implemented: 'xamarin_start_wwan'");
}
-#endif // IPHONE_ENABLED
+#endif // IOS_ENABLED
diff --git a/modules/mono/utils/osx_utils.cpp b/modules/mono/utils/macos_utils.cpp
index abb59420eb..cd4f7a827e 100644
--- a/modules/mono/utils/osx_utils.cpp
+++ b/modules/mono/utils/macos_utils.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* osx_utils.cpp */
+/* macos_utils.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,16 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "osx_utils.h"
+#include "macos_utils.h"
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
#include "core/string/print_string.h"
#import <CoreFoundation/CoreFoundation.h>
#import <CoreServices/CoreServices.h>
-bool osx_is_app_bundle_installed(const String &p_bundle_id) {
+bool macos_is_app_bundle_installed(const String &p_bundle_id) {
CFStringRef bundle_id = CFStringCreateWithCString(nullptr, p_bundle_id.utf8(), kCFStringEncodingUTF8);
CFArrayRef result = LSCopyApplicationURLsForBundleIdentifier(bundle_id, nullptr);
CFRelease(bundle_id);
diff --git a/modules/mono/utils/osx_utils.h b/modules/mono/utils/macos_utils.h
index 2f6c6dad51..7892cb2785 100644
--- a/modules/mono/utils/osx_utils.h
+++ b/modules/mono/utils/macos_utils.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* osx_utils.h */
+/* macos_utils.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,13 +30,13 @@
#include "core/string/ustring.h"
-#ifndef OSX_UTILS_H
-#define OSX_UTILS_H
+#ifndef MACOS_UTILS_H
+#define MACOS_UTILS_H
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
-bool osx_is_app_bundle_installed(const String &p_bundle_id);
+bool macos_is_app_bundle_installed(const String &p_bundle_id);
#endif
-#endif // OSX_UTILS_H
+#endif // MACOS_UTILS_H
diff --git a/modules/text_server_adv/gdextension_build/SConstruct b/modules/text_server_adv/gdextension_build/SConstruct
index 69848a9e52..0170c007ae 100644
--- a/modules/text_server_adv/gdextension_build/SConstruct
+++ b/modules/text_server_adv/gdextension_build/SConstruct
@@ -624,15 +624,15 @@ env.Append(CPPDEFINES=["GDEXTENSION"])
env.Append(CPPPATH=["../"])
sources = Glob("../*.cpp")
-if env["platform"] == "osx":
- methods.write_osx_plist(
- f'./bin/libtextserver_advanced.osx.{env["target"]}.framework',
- f'libtextserver_advanced.osx.{env["target"]}',
+if env["platform"] == "macos":
+ methods.write_macos_plist(
+ f'./bin/libtextserver_advanced.macos.{env["target"]}.framework',
+ f'libtextserver_advanced.macos.{env["target"]}',
"org.godotengine.textserver_advanced",
"ICU / HarfBuzz / Graphite Text Server",
)
library = env.SharedLibrary(
- f'./bin/libtextserver_advanced.osx.{env["target"]}.framework/libtextserver_advanced.osx.{env["target"]}',
+ f'./bin/libtextserver_advanced.macos.{env["target"]}.framework/libtextserver_advanced.macos.{env["target"]}',
source=sources,
)
else:
diff --git a/modules/text_server_adv/gdextension_build/methods.py b/modules/text_server_adv/gdextension_build/methods.py
index d404f2851e..3c5229462c 100644
--- a/modules/text_server_adv/gdextension_build/methods.py
+++ b/modules/text_server_adv/gdextension_build/methods.py
@@ -98,7 +98,7 @@ def make_icu_data(target, source, env):
g.write("#endif")
-def write_osx_plist(target, binary_name, identifier, name):
+def write_macos_plist(target, binary_name, identifier, name):
os.makedirs(f"{target}/Resourece/", exist_ok=True)
f = open(f"{target}/Resourece/Info.plist", "w")
diff --git a/modules/text_server_adv/gdextension_build/text_server_adv.gdextension b/modules/text_server_adv/gdextension_build/text_server_adv.gdextension
index 5956476a5e..11ed271ae9 100644
--- a/modules/text_server_adv/gdextension_build/text_server_adv.gdextension
+++ b/modules/text_server_adv/gdextension_build/text_server_adv.gdextension
@@ -8,5 +8,5 @@ linux.64.debug = "bin/libtextserver_advanced.linux.debug.64.so"
linux.64.release = "bin/libtextserver_advanced.linux.release.64.so"
windows.64.debug = "bin/libtextserver_advanced.windows.debug.64.dll"
windows.64.release = "bin/libtextserver_advanced.windows.release.64.dll"
-macos.debug = "bin/libtextserver_advanced.osx.debug.framework"
-macos.release = "bin/libtextserver_advanced.osx.release.framework"
+macos.debug = "bin/libtextserver_advanced.macos.debug.framework"
+macos.release = "bin/libtextserver_advanced.macos.release.framework"
diff --git a/modules/text_server_fb/gdextension_build/SConstruct b/modules/text_server_fb/gdextension_build/SConstruct
index 6c9e10db18..de0a549900 100644
--- a/modules/text_server_fb/gdextension_build/SConstruct
+++ b/modules/text_server_fb/gdextension_build/SConstruct
@@ -184,15 +184,15 @@ env.Append(CPPDEFINES=["GDEXTENSION"])
env.Append(CPPPATH=["../"])
sources = Glob("../*.cpp")
-if env["platform"] == "osx":
- methods.write_osx_plist(
- f'./bin/libtextserver_fallback.osx.{env["target"]}.framework',
- f'libtextserver_fallback.osx.{env["target"]}',
+if env["platform"] == "macos":
+ methods.write_macos_plist(
+ f'./bin/libtextserver_fallback.macos.{env["target"]}.framework',
+ f'libtextserver_fallback.macos.{env["target"]}',
"org.godotengine.textserver_fallback",
"Fallback Text Server",
)
library = env.SharedLibrary(
- f'./bin/libtextserver_fallback.osx.{env["target"]}.framework/libtextserver_fallback.osx.{env["target"]}',
+ f'./bin/libtextserver_fallback.macos.{env["target"]}.framework/libtextserver_fallback.macos.{env["target"]}',
source=sources,
)
else:
diff --git a/modules/text_server_fb/gdextension_build/methods.py b/modules/text_server_fb/gdextension_build/methods.py
index d404f2851e..3c5229462c 100644
--- a/modules/text_server_fb/gdextension_build/methods.py
+++ b/modules/text_server_fb/gdextension_build/methods.py
@@ -98,7 +98,7 @@ def make_icu_data(target, source, env):
g.write("#endif")
-def write_osx_plist(target, binary_name, identifier, name):
+def write_macos_plist(target, binary_name, identifier, name):
os.makedirs(f"{target}/Resourece/", exist_ok=True)
f = open(f"{target}/Resourece/Info.plist", "w")
diff --git a/modules/text_server_fb/gdextension_build/text_server_fb.gdextension b/modules/text_server_fb/gdextension_build/text_server_fb.gdextension
index 1026c6cb85..9236555d63 100644
--- a/modules/text_server_fb/gdextension_build/text_server_fb.gdextension
+++ b/modules/text_server_fb/gdextension_build/text_server_fb.gdextension
@@ -8,5 +8,5 @@ linux.64.debug = "bin/libtextserver_fallback.linux.debug.64.so"
linux.64.release = "bin/libtextserver_fallback.linux.release.64.so"
windows.64.debug = "bin/libtextserver_fallback.windows.debug.64.dll"
windows.64.release = "bin/libtextserver_fallback.windows.release.64.dll"
-macos.debug = "bin/libtextserver_fallback.osx.debug.framework"
-macos.release = "bin/libtextserver_fallback.osx.release.framework"
+macos.debug = "bin/libtextserver_fallback.macos.debug.framework"
+macos.release = "bin/libtextserver_fallback.macos.release.framework"
diff --git a/modules/visual_script/editor/visual_script_editor.cpp b/modules/visual_script/editor/visual_script_editor.cpp
index 61ff56b62a..522ed8719b 100644
--- a/modules/visual_script/editor/visual_script_editor.cpp
+++ b/modules/visual_script/editor/visual_script_editor.cpp
@@ -1227,7 +1227,7 @@ void VisualScriptEditor::_member_selected() {
selected = ti->get_metadata(0);
if (ti->get_parent() == members->get_root()->get_first_child()) {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool held_ctrl = Input::get_singleton()->is_key_pressed(Key::META);
#else
bool held_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL);
@@ -2208,7 +2208,7 @@ bool VisualScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
String(d["type"]) == "files" ||
String(d["type"]) == "nodes")) {
if (String(d["type"]) == "obj_property") {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
const_cast<VisualScriptEditor *>(this)->_show_hint(vformat(TTR("Hold %s to drop a Getter. Hold Shift to drop a generic signature."), find_keycode_name(Key::META)));
#else
const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Ctrl to drop a Getter. Hold Shift to drop a generic signature."));
@@ -2216,7 +2216,7 @@ bool VisualScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
}
if (String(d["type"]) == "nodes") {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
const_cast<VisualScriptEditor *>(this)->_show_hint(vformat(TTR("Hold %s to drop a simple reference to the node."), find_keycode_name(Key::META)));
#else
const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Ctrl to drop a simple reference to the node."));
@@ -2224,7 +2224,7 @@ bool VisualScriptEditor::can_drop_data_fw(const Point2 &p_point, const Variant &
}
if (String(d["type"]) == "visual_script_variable_drag") {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
const_cast<VisualScriptEditor *>(this)->_show_hint(vformat(TTR("Hold %s to drop a Variable Setter."), find_keycode_name(Key::META)));
#else
const_cast<VisualScriptEditor *>(this)->_show_hint(TTR("Hold Ctrl to drop a Variable Setter."));
@@ -2287,7 +2287,7 @@ void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
}
if (String(d["type"]) == "visual_script_variable_drag") {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool use_set = Input::get_singleton()->is_key_pressed(Key::META);
#else
bool use_set = Input::get_singleton()->is_key_pressed(Key::CTRL);
@@ -2396,7 +2396,7 @@ void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
}
if (String(d["type"]) == "files") {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool use_preload = Input::get_singleton()->is_key_pressed(Key::META);
#else
bool use_preload = Input::get_singleton()->is_key_pressed(Key::CTRL);
@@ -2459,7 +2459,7 @@ void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
return;
}
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool use_node = Input::get_singleton()->is_key_pressed(Key::META);
#else
bool use_node = Input::get_singleton()->is_key_pressed(Key::CTRL);
@@ -2524,7 +2524,7 @@ void VisualScriptEditor::drop_data_fw(const Point2 &p_point, const Variant &p_da
Node *node = Object::cast_to<Node>(obj);
Vector2 pos = _get_pos_in_graph(p_point);
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool use_get = Input::get_singleton()->is_key_pressed(Key::META);
#else
bool use_get = Input::get_singleton()->is_key_pressed(Key::CTRL);
@@ -3378,7 +3378,7 @@ void VisualScriptEditor::connect_data(Ref<VisualScriptNode> vnode_old, Ref<Visua
}
void VisualScriptEditor::_selected_connect_node(const String &p_text, const String &p_category, const bool p_connecting) {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool held_ctrl = Input::get_singleton()->is_key_pressed(Key::META);
#else
bool held_ctrl = Input::get_singleton()->is_key_pressed(Key::CTRL);
diff --git a/platform/iphone/SCsub b/platform/ios/SCsub
index 5e10bf5646..bf12ab6dd7 100644
--- a/platform/iphone/SCsub
+++ b/platform/ios/SCsub
@@ -2,16 +2,16 @@
Import("env")
-iphone_lib = [
- "godot_iphone.mm",
- "os_iphone.mm",
+ios_lib = [
+ "godot_ios.mm",
+ "os_ios.mm",
"main.m",
"app_delegate.mm",
"view_controller.mm",
"ios.mm",
- "vulkan_context_iphone.mm",
- "display_server_iphone.mm",
- "joypad_iphone.mm",
+ "vulkan_context_ios.mm",
+ "display_server_ios.mm",
+ "joypad_ios.mm",
"godot_view.mm",
"tts_ios.mm",
"display_layer.mm",
@@ -23,7 +23,7 @@ iphone_lib = [
]
env_ios = env.Clone()
-ios_lib = env_ios.add_library("iphone", iphone_lib)
+ios_lib = env_ios.add_library("ios", ios_lib)
# (iOS) Enable module support
env_ios.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
@@ -32,9 +32,9 @@ env_ios.Append(CCFLAGS=["-fmodules", "-fcxx-modules"])
def combine_libs(target=None, source=None, env=None):
lib_path = target[0].srcnode().abspath
if "osxcross" in env:
- libtool = "$IPHONEPATH/usr/bin/${ios_triple}libtool"
+ libtool = "$IOS_TOOLCHAIN_PATH/usr/bin/${ios_triple}libtool"
else:
- libtool = "$IPHONEPATH/usr/bin/libtool"
+ libtool = "$IOS_TOOLCHAIN_PATH/usr/bin/libtool"
env.Execute(
libtool + ' -static -o "' + lib_path + '" ' + " ".join([('"' + lib.srcnode().abspath + '"') for lib in source])
)
diff --git a/platform/iphone/api/api.cpp b/platform/ios/api/api.cpp
index f2e6fd7a7a..00c76a9256 100644
--- a/platform/iphone/api/api.cpp
+++ b/platform/ios/api/api.cpp
@@ -30,19 +30,19 @@
#include "api.h"
-#if defined(IPHONE_ENABLED)
+#if defined(IOS_ENABLED)
-void register_iphone_api() {
+void register_ios_api() {
godot_ios_plugins_initialize();
}
-void unregister_iphone_api() {
+void unregister_ios_api() {
godot_ios_plugins_deinitialize();
}
#else
-void register_iphone_api() {}
-void unregister_iphone_api() {}
+void register_ios_api() {}
+void unregister_ios_api() {}
#endif
diff --git a/platform/iphone/api/api.h b/platform/ios/api/api.h
index ece91a9f1a..c7fd4ce77b 100644
--- a/platform/iphone/api/api.h
+++ b/platform/ios/api/api.h
@@ -28,15 +28,15 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef IPHONE_API_H
-#define IPHONE_API_H
+#ifndef IOS_API_H
+#define IOS_API_H
-#if defined(IPHONE_ENABLED)
+#if defined(IOS_ENABLED)
extern void godot_ios_plugins_initialize();
extern void godot_ios_plugins_deinitialize();
#endif
-void register_iphone_api();
-void unregister_iphone_api();
+void register_ios_api();
+void unregister_ios_api();
-#endif // IPHONE_API_H
+#endif // IOS_API_H
diff --git a/platform/iphone/app_delegate.h b/platform/ios/app_delegate.h
index 0ec1dc071b..0ec1dc071b 100644
--- a/platform/iphone/app_delegate.h
+++ b/platform/ios/app_delegate.h
diff --git a/platform/iphone/app_delegate.mm b/platform/ios/app_delegate.mm
index c5c9b5a5f9..fb183d52d4 100644
--- a/platform/iphone/app_delegate.mm
+++ b/platform/ios/app_delegate.mm
@@ -34,7 +34,7 @@
#include "drivers/coreaudio/audio_driver_coreaudio.h"
#import "godot_view.h"
#include "main/main.h"
-#include "os_iphone.h"
+#include "os_ios.h"
#import "view_controller.h"
#import <AVFoundation/AVFoundation.h>
@@ -45,8 +45,8 @@
extern int gargc;
extern char **gargv;
-extern int iphone_main(int, char **, String, String);
-extern void iphone_finish();
+extern int ios_main(int, char **, String, String);
+extern void ios_finish();
@implementation AppDelegate
@@ -71,7 +71,7 @@ static ViewController *mainViewController = nil;
paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *cacheDirectory = [paths objectAtIndex:0];
- int err = iphone_main(gargc, gargv, String::utf8([documentsDirectory UTF8String]), String::utf8([cacheDirectory UTF8String]));
+ int err = ios_main(gargc, gargv, String::utf8([documentsDirectory UTF8String]), String::utf8([cacheDirectory UTF8String]));
if (err != 0) {
// bail, things did not go very well for us, should probably output a message on screen with our error code...
@@ -106,10 +106,10 @@ static ViewController *mainViewController = nil;
if ([notification.name isEqualToString:AVAudioSessionInterruptionNotification]) {
if ([[notification.userInfo valueForKey:AVAudioSessionInterruptionTypeKey] isEqualToNumber:[NSNumber numberWithInt:AVAudioSessionInterruptionTypeBegan]]) {
NSLog(@"Audio interruption began");
- OSIPhone::get_singleton()->on_focus_out();
+ OS_IOS::get_singleton()->on_focus_out();
} else if ([[notification.userInfo valueForKey:AVAudioSessionInterruptionTypeKey] isEqualToNumber:[NSNumber numberWithInt:AVAudioSessionInterruptionTypeEnded]]) {
NSLog(@"Audio interruption ended");
- OSIPhone::get_singleton()->on_focus_in();
+ OS_IOS::get_singleton()->on_focus_in();
}
}
}
@@ -121,7 +121,7 @@ static ViewController *mainViewController = nil;
}
- (void)applicationWillTerminate:(UIApplication *)application {
- iphone_finish();
+ ios_finish();
}
// When application goes to background (e.g. user switches to another app or presses Home),
@@ -135,11 +135,11 @@ static ViewController *mainViewController = nil;
// notification panel by swiping from the upper part of the screen.
- (void)applicationWillResignActive:(UIApplication *)application {
- OSIPhone::get_singleton()->on_focus_out();
+ OS_IOS::get_singleton()->on_focus_out();
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
- OSIPhone::get_singleton()->on_focus_in();
+ OS_IOS::get_singleton()->on_focus_in();
}
- (void)dealloc {
diff --git a/platform/iphone/detect.py b/platform/ios/detect.py
index 862f1fe50b..67c90b10a0 100644
--- a/platform/iphone/detect.py
+++ b/platform/ios/detect.py
@@ -23,11 +23,11 @@ def get_opts():
return [
(
- "IPHONEPATH",
- "Path to iPhone toolchain",
+ "IOS_TOOLCHAIN_PATH",
+ "Path to iOS toolchain",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain",
),
- ("IPHONESDK", "Path to the iPhone SDK", ""),
+ ("IOS_SDK_PATH", "Path to the iOS SDK", ""),
BoolVariable("ios_simulator", "Build for iOS Simulator", False),
BoolVariable("ios_exceptions", "Enable exceptions", False),
("ios_triple", "Triple for ios toolchain", ""),
@@ -75,10 +75,10 @@ def configure(env):
if "OSXCROSS_IOS" in os.environ:
env["osxcross"] = True
- env["ENV"]["PATH"] = env["IPHONEPATH"] + "/Developer/usr/bin/:" + env["ENV"]["PATH"]
+ env["ENV"]["PATH"] = env["IOS_TOOLCHAIN_PATH"] + "/Developer/usr/bin/:" + env["ENV"]["PATH"]
- compiler_path = "$IPHONEPATH/usr/bin/${ios_triple}"
- s_compiler_path = "$IPHONEPATH/Developer/usr/bin/"
+ compiler_path = "$IOS_TOOLCHAIN_PATH/usr/bin/${ios_triple}"
+ s_compiler_path = "$IOS_TOOLCHAIN_PATH/Developer/usr/bin/"
ccache_path = os.environ.get("CCACHE")
if ccache_path is None:
@@ -97,12 +97,12 @@ def configure(env):
## Compile flags
if env["ios_simulator"]:
- detect_darwin_sdk_path("iphonesimulator", env)
+ detect_darwin_sdk_path("iossimulator", env)
env.Append(ASFLAGS=["-mios-simulator-version-min=13.0"])
env.Append(CCFLAGS=["-mios-simulator-version-min=13.0"])
env.extra_suffix = ".simulator" + env.extra_suffix
else:
- detect_darwin_sdk_path("iphone", env)
+ detect_darwin_sdk_path("ios", env)
env.Append(ASFLAGS=["-miphoneos-version-min=11.0"])
env.Append(CCFLAGS=["-miphoneos-version-min=11.0"])
@@ -112,7 +112,7 @@ def configure(env):
CCFLAGS=(
"-fobjc-arc -arch x86_64"
" -fobjc-abi-version=2 -fobjc-legacy-dispatch -fmessage-length=0 -fpascal-strings -fblocks"
- " -fasm-blocks -isysroot $IPHONESDK"
+ " -fasm-blocks -isysroot $IOS_SDK_PATH"
).split()
)
env.Append(ASFLAGS=["-arch", "x86_64"])
@@ -122,7 +122,7 @@ def configure(env):
"-fobjc-arc -arch arm64 -fmessage-length=0 -fno-strict-aliasing"
" -fdiagnostics-print-source-range-info -fdiagnostics-show-category=id -fdiagnostics-parseable-fixits"
" -fpascal-strings -fblocks -fvisibility=hidden -MMD -MT dependencies"
- " -isysroot $IPHONESDK".split()
+ " -isysroot $IOS_SDK_PATH".split()
)
)
env.Append(ASFLAGS=["-arch", "arm64"])
@@ -135,18 +135,18 @@ def configure(env):
else:
env.Append(CCFLAGS=["-fno-exceptions"])
- # Temp fix for ABS/MAX/MIN macros in iPhone SDK blocking compilation
+ # Temp fix for ABS/MAX/MIN macros in iOS SDK blocking compilation
env.Append(CCFLAGS=["-Wno-ambiguous-macro"])
env.Prepend(
CPPPATH=[
- "$IPHONESDK/usr/include",
- "$IPHONESDK/System/Library/Frameworks/AudioUnit.framework/Headers",
+ "$IOS_SDK_PATH/usr/include",
+ "$IOS_SDK_PATH/System/Library/Frameworks/AudioUnit.framework/Headers",
]
)
- env.Prepend(CPPPATH=["#platform/iphone"])
- env.Append(CPPDEFINES=["IPHONE_ENABLED", "UNIX_ENABLED", "COREAUDIO_ENABLED"])
+ env.Prepend(CPPPATH=["#platform/ios"])
+ env.Append(CPPDEFINES=["IOS_ENABLED", "UNIX_ENABLED", "COREAUDIO_ENABLED"])
if env["vulkan"]:
env.Append(CPPDEFINES=["VULKAN_ENABLED"])
diff --git a/platform/iphone/device_metrics.h b/platform/ios/device_metrics.h
index b9fb9b2fd9..b9fb9b2fd9 100644
--- a/platform/iphone/device_metrics.h
+++ b/platform/ios/device_metrics.h
diff --git a/platform/iphone/device_metrics.m b/platform/ios/device_metrics.m
index ec4dd8130d..ec4dd8130d 100644
--- a/platform/iphone/device_metrics.m
+++ b/platform/ios/device_metrics.m
diff --git a/platform/iphone/display_layer.h b/platform/ios/display_layer.h
index a17c75dba1..a17c75dba1 100644
--- a/platform/iphone/display_layer.h
+++ b/platform/ios/display_layer.h
diff --git a/platform/iphone/display_layer.mm b/platform/ios/display_layer.mm
index 92e81448ac..7c83494768 100644
--- a/platform/iphone/display_layer.mm
+++ b/platform/ios/display_layer.mm
@@ -32,9 +32,9 @@
#include "core/config/project_settings.h"
#include "core/os/keyboard.h"
-#include "display_server_iphone.h"
+#include "display_server_ios.h"
#include "main/main.h"
-#include "os_iphone.h"
+#include "os_ios.h"
#include "servers/audio_server.h"
#import <AudioToolbox/AudioServices.h>
diff --git a/platform/iphone/display_server_iphone.h b/platform/ios/display_server_ios.h
index 7af222e3f8..bfd611adb7 100644
--- a/platform/iphone/display_server_iphone.h
+++ b/platform/ios/display_server_ios.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* display_server_iphone.h */
+/* display_server_ios.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef display_server_iphone_h
-#define display_server_iphone_h
+#ifndef display_server_ios_h
+#define display_server_ios_h
#include "core/input/input.h"
#include "servers/display_server.h"
@@ -38,7 +38,7 @@
#include "drivers/vulkan/rendering_device_vulkan.h"
#include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
-#include "vulkan_context_iphone.h"
+#include "vulkan_context_ios.h"
#import <QuartzCore/CAMetalLayer.h>
#ifdef USE_VOLK
@@ -48,13 +48,13 @@
#endif
#endif
-class DisplayServerIPhone : public DisplayServer {
- GDCLASS(DisplayServerIPhone, DisplayServer)
+class DisplayServerIOS : public DisplayServer {
+ GDCLASS(DisplayServerIOS, DisplayServer)
_THREAD_SAFE_CLASS_
#if defined(VULKAN_ENABLED)
- VulkanContextIPhone *context_vulkan = nullptr;
+ VulkanContextIOS *context_vulkan = nullptr;
RenderingDeviceVulkan *rendering_device_vulkan = nullptr;
#endif
@@ -73,15 +73,15 @@ class DisplayServerIPhone : public DisplayServer {
void perform_event(const Ref<InputEvent> &p_event);
- DisplayServerIPhone(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
- ~DisplayServerIPhone();
+ DisplayServerIOS(const String &p_rendering_driver, DisplayServer::WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ ~DisplayServerIOS();
public:
String rendering_driver;
- static DisplayServerIPhone *get_singleton();
+ static DisplayServerIOS *get_singleton();
- static void register_iphone_driver();
+ static void register_ios_driver();
static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
static Vector<String> get_rendering_drivers_func();
@@ -214,4 +214,4 @@ public:
void resize_window(CGSize size);
};
-#endif /* display_server_iphone_h */
+#endif /* DISPLAY_SERVER_IOS_H */
diff --git a/platform/iphone/display_server_iphone.mm b/platform/ios/display_server_ios.mm
index 28ffc9595e..73d4a2a427 100644
--- a/platform/iphone/display_server_iphone.mm
+++ b/platform/ios/display_server_ios.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* display_server_iphone.mm */
+/* display_server_ios.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "display_server_iphone.h"
+#include "display_server_ios.h"
#import "app_delegate.h"
#include "core/config/project_settings.h"
@@ -37,20 +37,20 @@
#import "godot_view.h"
#include "ios.h"
#import "keyboard_input_view.h"
-#include "os_iphone.h"
+#include "os_ios.h"
#include "tts_ios.h"
#import "view_controller.h"
#import <Foundation/Foundation.h>
#import <sys/utsname.h>
-static const float kDisplayServerIPhoneAcceleration = 1;
+static const float kDisplayServerIOSAcceleration = 1.f;
-DisplayServerIPhone *DisplayServerIPhone::get_singleton() {
- return (DisplayServerIPhone *)DisplayServer::get_singleton();
+DisplayServerIOS *DisplayServerIOS::get_singleton() {
+ return (DisplayServerIOS *)DisplayServer::get_singleton();
}
-DisplayServerIPhone::DisplayServerIPhone(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+DisplayServerIOS::DisplayServerIOS(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
rendering_driver = p_rendering_driver;
// Init TTS
@@ -101,7 +101,7 @@ DisplayServerIPhone::DisplayServerIPhone(const String &p_rendering_driver, Windo
rendering_device_vulkan = nullptr;
if (rendering_driver == "vulkan") {
- context_vulkan = memnew(VulkanContextIPhone);
+ context_vulkan = memnew(VulkanContextIOS);
if (context_vulkan->initialize() != OK) {
memdelete(context_vulkan);
context_vulkan = nullptr;
@@ -136,7 +136,7 @@ DisplayServerIPhone::DisplayServerIPhone(const String &p_rendering_driver, Windo
r_error = OK;
}
-DisplayServerIPhone::~DisplayServerIPhone() {
+DisplayServerIOS::~DisplayServerIOS() {
#if defined(VULKAN_ENABLED)
if (rendering_device_vulkan) {
rendering_device_vulkan->finalize();
@@ -152,11 +152,11 @@ DisplayServerIPhone::~DisplayServerIPhone() {
#endif
}
-DisplayServer *DisplayServerIPhone::create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
- return memnew(DisplayServerIPhone(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
+DisplayServer *DisplayServerIOS::create_func(const String &p_rendering_driver, WindowMode p_mode, DisplayServer::VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+ return memnew(DisplayServerIOS(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
}
-Vector<String> DisplayServerIPhone::get_rendering_drivers_func() {
+Vector<String> DisplayServerIOS::get_rendering_drivers_func() {
Vector<String> drivers;
#if defined(VULKAN_ENABLED)
@@ -169,52 +169,52 @@ Vector<String> DisplayServerIPhone::get_rendering_drivers_func() {
return drivers;
}
-void DisplayServerIPhone::register_iphone_driver() {
- register_create_function("iphone", create_func, get_rendering_drivers_func);
+void DisplayServerIOS::register_ios_driver() {
+ register_create_function("iOS", create_func, get_rendering_drivers_func);
}
// MARK: Events
-void DisplayServerIPhone::window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerIOS::window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window) {
window_resize_callback = p_callable;
}
-void DisplayServerIPhone::window_set_window_event_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerIOS::window_set_window_event_callback(const Callable &p_callable, WindowID p_window) {
window_event_callback = p_callable;
}
-void DisplayServerIPhone::window_set_input_event_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerIOS::window_set_input_event_callback(const Callable &p_callable, WindowID p_window) {
input_event_callback = p_callable;
}
-void DisplayServerIPhone::window_set_input_text_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerIOS::window_set_input_text_callback(const Callable &p_callable, WindowID p_window) {
input_text_callback = p_callable;
}
-void DisplayServerIPhone::window_set_drop_files_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerIOS::window_set_drop_files_callback(const Callable &p_callable, WindowID p_window) {
// Probably not supported for iOS
}
-void DisplayServerIPhone::process_events() {
+void DisplayServerIOS::process_events() {
Input::get_singleton()->flush_buffered_events();
}
-void DisplayServerIPhone::_dispatch_input_events(const Ref<InputEvent> &p_event) {
- DisplayServerIPhone::get_singleton()->send_input_event(p_event);
+void DisplayServerIOS::_dispatch_input_events(const Ref<InputEvent> &p_event) {
+ DisplayServerIOS::get_singleton()->send_input_event(p_event);
}
-void DisplayServerIPhone::send_input_event(const Ref<InputEvent> &p_event) const {
+void DisplayServerIOS::send_input_event(const Ref<InputEvent> &p_event) const {
_window_callback(input_event_callback, p_event);
}
-void DisplayServerIPhone::send_input_text(const String &p_text) const {
+void DisplayServerIOS::send_input_text(const String &p_text) const {
_window_callback(input_text_callback, p_text);
}
-void DisplayServerIPhone::send_window_event(DisplayServer::WindowEvent p_event) const {
+void DisplayServerIOS::send_window_event(DisplayServer::WindowEvent p_event) const {
_window_callback(window_event_callback, int(p_event));
}
-void DisplayServerIPhone::_window_callback(const Callable &p_callable, const Variant &p_arg) const {
+void DisplayServerIOS::_window_callback(const Callable &p_callable, const Variant &p_arg) const {
if (!p_callable.is_null()) {
const Variant *argp = &p_arg;
Variant ret;
@@ -227,7 +227,7 @@ void DisplayServerIPhone::_window_callback(const Callable &p_callable, const Var
// MARK: Touches
-void DisplayServerIPhone::touch_press(int p_idx, int p_x, int p_y, bool p_pressed, bool p_double_click) {
+void DisplayServerIOS::touch_press(int p_idx, int p_x, int p_y, bool p_pressed, bool p_double_click) {
if (!GLOBAL_DEF("debug/disable_touch", false)) {
Ref<InputEventScreenTouch> ev;
ev.instantiate();
@@ -239,7 +239,7 @@ void DisplayServerIPhone::touch_press(int p_idx, int p_x, int p_y, bool p_presse
}
}
-void DisplayServerIPhone::touch_drag(int p_idx, int p_prev_x, int p_prev_y, int p_x, int p_y) {
+void DisplayServerIOS::touch_drag(int p_idx, int p_prev_x, int p_prev_y, int p_x, int p_y) {
if (!GLOBAL_DEF("debug/disable_touch", false)) {
Ref<InputEventScreenDrag> ev;
ev.instantiate();
@@ -250,17 +250,17 @@ void DisplayServerIPhone::touch_drag(int p_idx, int p_prev_x, int p_prev_y, int
}
}
-void DisplayServerIPhone::perform_event(const Ref<InputEvent> &p_event) {
+void DisplayServerIOS::perform_event(const Ref<InputEvent> &p_event) {
Input::get_singleton()->parse_input_event(p_event);
}
-void DisplayServerIPhone::touches_cancelled(int p_idx) {
+void DisplayServerIOS::touches_cancelled(int p_idx) {
touch_press(p_idx, -1, -1, false, false);
}
// MARK: Keyboard
-void DisplayServerIPhone::key(Key p_key, bool p_pressed) {
+void DisplayServerIOS::key(Key p_key, bool p_pressed) {
Ref<InputEventKey> ev;
ev.instantiate();
ev->set_echo(false);
@@ -273,31 +273,31 @@ void DisplayServerIPhone::key(Key p_key, bool p_pressed) {
// MARK: Motion
-void DisplayServerIPhone::update_gravity(float p_x, float p_y, float p_z) {
+void DisplayServerIOS::update_gravity(float p_x, float p_y, float p_z) {
Input::get_singleton()->set_gravity(Vector3(p_x, p_y, p_z));
}
-void DisplayServerIPhone::update_accelerometer(float p_x, float p_y, float p_z) {
+void DisplayServerIOS::update_accelerometer(float p_x, float p_y, float p_z) {
// Found out the Z should not be negated! Pass as is!
Vector3 v_accelerometer = Vector3(
- p_x / kDisplayServerIPhoneAcceleration,
- p_y / kDisplayServerIPhoneAcceleration,
- p_z / kDisplayServerIPhoneAcceleration);
+ p_x / kDisplayServerIOSAcceleration,
+ p_y / kDisplayServerIOSAcceleration,
+ p_z / kDisplayServerIOSAcceleration);
Input::get_singleton()->set_accelerometer(v_accelerometer);
}
-void DisplayServerIPhone::update_magnetometer(float p_x, float p_y, float p_z) {
+void DisplayServerIOS::update_magnetometer(float p_x, float p_y, float p_z) {
Input::get_singleton()->set_magnetometer(Vector3(p_x, p_y, p_z));
}
-void DisplayServerIPhone::update_gyroscope(float p_x, float p_y, float p_z) {
+void DisplayServerIOS::update_gyroscope(float p_x, float p_y, float p_z) {
Input::get_singleton()->set_gyroscope(Vector3(p_x, p_y, p_z));
}
// MARK: -
-bool DisplayServerIPhone::has_feature(Feature p_feature) const {
+bool DisplayServerIOS::has_feature(Feature p_feature) const {
switch (p_feature) {
// case FEATURE_CURSOR_SHAPE:
// case FEATURE_CUSTOM_CURSOR_SHAPE:
@@ -322,46 +322,46 @@ bool DisplayServerIPhone::has_feature(Feature p_feature) const {
}
}
-String DisplayServerIPhone::get_name() const {
- return "iPhone";
+String DisplayServerIOS::get_name() const {
+ return "iOS";
}
-bool DisplayServerIPhone::tts_is_speaking() const {
+bool DisplayServerIOS::tts_is_speaking() const {
ERR_FAIL_COND_V(!tts, false);
return [tts isSpeaking];
}
-bool DisplayServerIPhone::tts_is_paused() const {
+bool DisplayServerIOS::tts_is_paused() const {
ERR_FAIL_COND_V(!tts, false);
return [tts isPaused];
}
-Array DisplayServerIPhone::tts_get_voices() const {
+Array DisplayServerIOS::tts_get_voices() const {
ERR_FAIL_COND_V(!tts, Array());
return [tts getVoices];
}
-void DisplayServerIPhone::tts_speak(const String &p_text, const String &p_voice, int p_volume, float p_pitch, float p_rate, int p_utterance_id, bool p_interrupt) {
+void DisplayServerIOS::tts_speak(const String &p_text, const String &p_voice, int p_volume, float p_pitch, float p_rate, int p_utterance_id, bool p_interrupt) {
ERR_FAIL_COND(!tts);
[tts speak:p_text voice:p_voice volume:p_volume pitch:p_pitch rate:p_rate utterance_id:p_utterance_id interrupt:p_interrupt];
}
-void DisplayServerIPhone::tts_pause() {
+void DisplayServerIOS::tts_pause() {
ERR_FAIL_COND(!tts);
[tts pauseSpeaking];
}
-void DisplayServerIPhone::tts_resume() {
+void DisplayServerIOS::tts_resume() {
ERR_FAIL_COND(!tts);
[tts resumeSpeaking];
}
-void DisplayServerIPhone::tts_stop() {
+void DisplayServerIOS::tts_stop() {
ERR_FAIL_COND(!tts);
[tts stopSpeaking];
}
-Rect2i DisplayServerIPhone::get_display_safe_area() const {
+Rect2i DisplayServerIOS::get_display_safe_area() const {
if (@available(iOS 11, *)) {
UIEdgeInsets insets = UIEdgeInsetsZero;
UIView *view = AppDelegate.viewController.godotView;
@@ -377,15 +377,15 @@ Rect2i DisplayServerIPhone::get_display_safe_area() const {
}
}
-int DisplayServerIPhone::get_screen_count() const {
+int DisplayServerIOS::get_screen_count() const {
return 1;
}
-Point2i DisplayServerIPhone::screen_get_position(int p_screen) const {
+Point2i DisplayServerIOS::screen_get_position(int p_screen) const {
return Size2i();
}
-Size2i DisplayServerIPhone::screen_get_size(int p_screen) const {
+Size2i DisplayServerIOS::screen_get_size(int p_screen) const {
CALayer *layer = AppDelegate.viewController.godotView.renderingLayer;
if (!layer) {
@@ -395,11 +395,11 @@ Size2i DisplayServerIPhone::screen_get_size(int p_screen) const {
return Size2i(layer.bounds.size.width, layer.bounds.size.height) * screen_get_scale(p_screen);
}
-Rect2i DisplayServerIPhone::screen_get_usable_rect(int p_screen) const {
+Rect2i DisplayServerIOS::screen_get_usable_rect(int p_screen) const {
return Rect2i(screen_get_position(p_screen), screen_get_size(p_screen));
}
-int DisplayServerIPhone::screen_get_dpi(int p_screen) const {
+int DisplayServerIOS::screen_get_dpi(int p_screen) const {
struct utsname systemInfo;
uname(&systemInfo);
@@ -436,25 +436,25 @@ int DisplayServerIPhone::screen_get_dpi(int p_screen) const {
}
}
-float DisplayServerIPhone::screen_get_refresh_rate(int p_screen) const {
+float DisplayServerIOS::screen_get_refresh_rate(int p_screen) const {
return [UIScreen mainScreen].maximumFramesPerSecond;
}
-float DisplayServerIPhone::screen_get_scale(int p_screen) const {
+float DisplayServerIOS::screen_get_scale(int p_screen) const {
return [UIScreen mainScreen].nativeScale;
}
-Vector<DisplayServer::WindowID> DisplayServerIPhone::get_window_list() const {
+Vector<DisplayServer::WindowID> DisplayServerIOS::get_window_list() const {
Vector<DisplayServer::WindowID> list;
list.push_back(MAIN_WINDOW_ID);
return list;
}
-DisplayServer::WindowID DisplayServerIPhone::get_window_at_screen_position(const Point2i &p_position) const {
+DisplayServer::WindowID DisplayServerIOS::get_window_at_screen_position(const Point2i &p_position) const {
return MAIN_WINDOW_ID;
}
-int64_t DisplayServerIPhone::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
+int64_t DisplayServerIOS::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
ERR_FAIL_COND_V(p_window != MAIN_WINDOW_ID, 0);
switch (p_handle_type) {
case DISPLAY_HANDLE: {
@@ -472,120 +472,120 @@ int64_t DisplayServerIPhone::window_get_native_handle(HandleType p_handle_type,
}
}
-void DisplayServerIPhone::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
+void DisplayServerIOS::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
window_attached_instance_id = p_instance;
}
-ObjectID DisplayServerIPhone::window_get_attached_instance_id(WindowID p_window) const {
+ObjectID DisplayServerIOS::window_get_attached_instance_id(WindowID p_window) const {
return window_attached_instance_id;
}
-void DisplayServerIPhone::window_set_title(const String &p_title, WindowID p_window) {
+void DisplayServerIOS::window_set_title(const String &p_title, WindowID p_window) {
// Probably not supported for iOS
}
-int DisplayServerIPhone::window_get_current_screen(WindowID p_window) const {
+int DisplayServerIOS::window_get_current_screen(WindowID p_window) const {
return SCREEN_OF_MAIN_WINDOW;
}
-void DisplayServerIPhone::window_set_current_screen(int p_screen, WindowID p_window) {
+void DisplayServerIOS::window_set_current_screen(int p_screen, WindowID p_window) {
// Probably not supported for iOS
}
-Point2i DisplayServerIPhone::window_get_position(WindowID p_window) const {
+Point2i DisplayServerIOS::window_get_position(WindowID p_window) const {
return Point2i();
}
-void DisplayServerIPhone::window_set_position(const Point2i &p_position, WindowID p_window) {
+void DisplayServerIOS::window_set_position(const Point2i &p_position, WindowID p_window) {
// Probably not supported for single window iOS app
}
-void DisplayServerIPhone::window_set_transient(WindowID p_window, WindowID p_parent) {
+void DisplayServerIOS::window_set_transient(WindowID p_window, WindowID p_parent) {
// Probably not supported for iOS
}
-void DisplayServerIPhone::window_set_max_size(const Size2i p_size, WindowID p_window) {
+void DisplayServerIOS::window_set_max_size(const Size2i p_size, WindowID p_window) {
// Probably not supported for iOS
}
-Size2i DisplayServerIPhone::window_get_max_size(WindowID p_window) const {
+Size2i DisplayServerIOS::window_get_max_size(WindowID p_window) const {
return Size2i();
}
-void DisplayServerIPhone::window_set_min_size(const Size2i p_size, WindowID p_window) {
+void DisplayServerIOS::window_set_min_size(const Size2i p_size, WindowID p_window) {
// Probably not supported for iOS
}
-Size2i DisplayServerIPhone::window_get_min_size(WindowID p_window) const {
+Size2i DisplayServerIOS::window_get_min_size(WindowID p_window) const {
return Size2i();
}
-void DisplayServerIPhone::window_set_size(const Size2i p_size, WindowID p_window) {
+void DisplayServerIOS::window_set_size(const Size2i p_size, WindowID p_window) {
// Probably not supported for iOS
}
-Size2i DisplayServerIPhone::window_get_size(WindowID p_window) const {
+Size2i DisplayServerIOS::window_get_size(WindowID p_window) const {
CGRect screenBounds = [UIScreen mainScreen].bounds;
return Size2i(screenBounds.size.width, screenBounds.size.height) * screen_get_max_scale();
}
-Size2i DisplayServerIPhone::window_get_real_size(WindowID p_window) const {
+Size2i DisplayServerIOS::window_get_real_size(WindowID p_window) const {
return window_get_size(p_window);
}
-void DisplayServerIPhone::window_set_mode(WindowMode p_mode, WindowID p_window) {
+void DisplayServerIOS::window_set_mode(WindowMode p_mode, WindowID p_window) {
// Probably not supported for iOS
}
-DisplayServer::WindowMode DisplayServerIPhone::window_get_mode(WindowID p_window) const {
+DisplayServer::WindowMode DisplayServerIOS::window_get_mode(WindowID p_window) const {
return WindowMode::WINDOW_MODE_FULLSCREEN;
}
-bool DisplayServerIPhone::window_is_maximize_allowed(WindowID p_window) const {
+bool DisplayServerIOS::window_is_maximize_allowed(WindowID p_window) const {
return false;
}
-void DisplayServerIPhone::window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window) {
+void DisplayServerIOS::window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window) {
// Probably not supported for iOS
}
-bool DisplayServerIPhone::window_get_flag(WindowFlags p_flag, WindowID p_window) const {
+bool DisplayServerIOS::window_get_flag(WindowFlags p_flag, WindowID p_window) const {
return false;
}
-void DisplayServerIPhone::window_request_attention(WindowID p_window) {
+void DisplayServerIOS::window_request_attention(WindowID p_window) {
// Probably not supported for iOS
}
-void DisplayServerIPhone::window_move_to_foreground(WindowID p_window) {
+void DisplayServerIOS::window_move_to_foreground(WindowID p_window) {
// Probably not supported for iOS
}
-float DisplayServerIPhone::screen_get_max_scale() const {
+float DisplayServerIOS::screen_get_max_scale() const {
return screen_get_scale(SCREEN_OF_MAIN_WINDOW);
}
-void DisplayServerIPhone::screen_set_orientation(DisplayServer::ScreenOrientation p_orientation, int p_screen) {
+void DisplayServerIOS::screen_set_orientation(DisplayServer::ScreenOrientation p_orientation, int p_screen) {
screen_orientation = p_orientation;
}
-DisplayServer::ScreenOrientation DisplayServerIPhone::screen_get_orientation(int p_screen) const {
+DisplayServer::ScreenOrientation DisplayServerIOS::screen_get_orientation(int p_screen) const {
return screen_orientation;
}
-bool DisplayServerIPhone::window_can_draw(WindowID p_window) const {
+bool DisplayServerIOS::window_can_draw(WindowID p_window) const {
return true;
}
-bool DisplayServerIPhone::can_any_window_draw() const {
+bool DisplayServerIOS::can_any_window_draw() const {
return true;
}
-bool DisplayServerIPhone::screen_is_touchscreen(int p_screen) const {
+bool DisplayServerIOS::screen_is_touchscreen(int p_screen) const {
return true;
}
-void DisplayServerIPhone::virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect, bool p_multiline, int p_max_length, int p_cursor_start, int p_cursor_end) {
+void DisplayServerIOS::virtual_keyboard_show(const String &p_existing_text, const Rect2 &p_screen_rect, bool p_multiline, int p_max_length, int p_cursor_start, int p_cursor_end) {
NSString *existingString = [[NSString alloc] initWithUTF8String:p_existing_text.utf8().get_data()];
[AppDelegate.viewController.keyboardView
@@ -595,37 +595,37 @@ void DisplayServerIPhone::virtual_keyboard_show(const String &p_existing_text, c
cursorEnd:p_cursor_end];
}
-void DisplayServerIPhone::virtual_keyboard_hide() {
+void DisplayServerIOS::virtual_keyboard_hide() {
[AppDelegate.viewController.keyboardView resignFirstResponder];
}
-void DisplayServerIPhone::virtual_keyboard_set_height(int height) {
+void DisplayServerIOS::virtual_keyboard_set_height(int height) {
virtual_keyboard_height = height * screen_get_max_scale();
}
-int DisplayServerIPhone::virtual_keyboard_get_height() const {
+int DisplayServerIOS::virtual_keyboard_get_height() const {
return virtual_keyboard_height;
}
-void DisplayServerIPhone::clipboard_set(const String &p_text) {
+void DisplayServerIOS::clipboard_set(const String &p_text) {
[UIPasteboard generalPasteboard].string = [NSString stringWithUTF8String:p_text.utf8()];
}
-String DisplayServerIPhone::clipboard_get() const {
+String DisplayServerIOS::clipboard_get() const {
NSString *text = [UIPasteboard generalPasteboard].string;
return String::utf8([text UTF8String]);
}
-void DisplayServerIPhone::screen_set_keep_on(bool p_enable) {
+void DisplayServerIOS::screen_set_keep_on(bool p_enable) {
[UIApplication sharedApplication].idleTimerDisabled = p_enable;
}
-bool DisplayServerIPhone::screen_is_kept_on() const {
+bool DisplayServerIOS::screen_is_kept_on() const {
return [UIApplication sharedApplication].idleTimerDisabled;
}
-void DisplayServerIPhone::resize_window(CGSize viewSize) {
+void DisplayServerIOS::resize_window(CGSize viewSize) {
Size2i size = Size2i(viewSize.width, viewSize.height) * screen_get_max_scale();
#if defined(VULKAN_ENABLED)
@@ -638,14 +638,14 @@ void DisplayServerIPhone::resize_window(CGSize viewSize) {
_window_callback(window_resize_callback, resize_rect);
}
-void DisplayServerIPhone::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
+void DisplayServerIOS::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
_THREAD_SAFE_METHOD_
#if defined(VULKAN_ENABLED)
context_vulkan->set_vsync_mode(p_window, p_vsync_mode);
#endif
}
-DisplayServer::VSyncMode DisplayServerIPhone::window_get_vsync_mode(WindowID p_window) const {
+DisplayServer::VSyncMode DisplayServerIOS::window_get_vsync_mode(WindowID p_window) const {
_THREAD_SAFE_METHOD_
#if defined(VULKAN_ENABLED)
return context_vulkan->get_vsync_mode(p_window);
diff --git a/platform/iphone/export/export.cpp b/platform/ios/export/export.cpp
index 3b02e661c1..1531c2bde5 100644
--- a/platform/iphone/export/export.cpp
+++ b/platform/ios/export/export.cpp
@@ -32,7 +32,7 @@
#include "export_plugin.h"
-void register_iphone_exporter() {
+void register_ios_exporter() {
Ref<EditorExportPlatformIOS> platform;
platform.instantiate();
diff --git a/platform/osx/export/export.h b/platform/ios/export/export.h
index b386337a09..756a1356ea 100644
--- a/platform/osx/export/export.h
+++ b/platform/ios/export/export.h
@@ -28,9 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef OSX_EXPORT_H
-#define OSX_EXPORT_H
+#ifndef IOS_EXPORT_H
+#define IOS_EXPORT_H
-void register_osx_exporter();
+void register_ios_exporter();
-#endif // OSX_EXPORT_H
+#endif // IOS_EXPORT_H
diff --git a/platform/iphone/export/export_plugin.cpp b/platform/ios/export/export_plugin.cpp
index 3b92bd19be..a2e80d33fd 100644
--- a/platform/iphone/export/export_plugin.cpp
+++ b/platform/ios/export/export_plugin.cpp
@@ -418,7 +418,7 @@ void EditorExportPlatformIOS::_fix_config_file(const Ref<EditorExportPreset> &p_
}
// !BAS! I'm assuming the 9 in the original code was a typo. I've added -1 or else it seems to also be adding our terminating zero...
- // should apply the same fix in our OSX export.
+ // should apply the same fix in our macOS export.
CharString cs = strnew.utf8();
pfile.resize(cs.size() - 1);
for (int i = 0; i < cs.size() - 1; i++) {
@@ -1394,7 +1394,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
if (src_pkg_name.is_empty()) {
String err;
- src_pkg_name = find_export_template("iphone.zip", &err);
+ src_pkg_name = find_export_template("ios.zip", &err);
if (src_pkg_name.is_empty()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Templates"), TTR("Export template not found."));
return ERR_FILE_NOT_FOUND;
@@ -1444,7 +1444,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
return ERR_SKIP;
}
- String library_to_use = "libgodot.iphone." + String(p_debug ? "debug" : "release") + ".xcframework";
+ String library_to_use = "libgodot.ios." + String(p_debug ? "debug" : "release") + ".xcframework";
print_line("Static framework: " + library_to_use);
String pkg_name;
@@ -1502,7 +1502,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
int ret = unzGoToFirstFile(src_pkg_zip);
Vector<uint8_t> project_file_data;
while (ret == UNZ_OK) {
-#if defined(OSX_ENABLED) || defined(X11_ENABLED)
+#if defined(MACOS_ENABLED) || defined(X11_ENABLED)
bool is_execute = false;
#endif
@@ -1527,17 +1527,17 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
//write
- file = file.replace_first("iphone/", "");
+ file = file.replace_first("ios/", "");
if (files_to_parse.has(file)) {
_fix_config_file(p_preset, data, config_data, p_debug);
- } else if (file.begins_with("libgodot.iphone")) {
+ } else if (file.begins_with("libgodot.ios")) {
if (!file.begins_with(library_to_use) || file.ends_with(String("/empty"))) {
ret = unzGoToNextFile(src_pkg_zip);
continue; //ignore!
}
found_library = true;
-#if defined(OSX_ENABLED) || defined(X11_ENABLED)
+#if defined(MACOS_ENABLED) || defined(X11_ENABLED)
is_execute = true;
#endif
file = file.replace(library_to_use, binary_name + ".xcframework");
@@ -1580,7 +1580,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
f->store_buffer(data.ptr(), data.size());
}
-#if defined(OSX_ENABLED) || defined(X11_ENABLED)
+#if defined(MACOS_ENABLED) || defined(X11_ENABLED)
if (is_execute) {
// we need execute rights on this file
chmod(file.utf8().get_data(), 0755);
@@ -1725,7 +1725,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
f->store_buffer(project_file_data.ptr(), project_file_data.size());
}
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
{
if (ep.step("Code-signing dylibs", 2)) {
return ERR_SKIP;
@@ -1790,7 +1790,7 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset
// Look for export templates (first official, and if defined custom templates).
- bool dvalid = exists_export_template("iphone.zip", &err);
+ bool dvalid = exists_export_template("ios.zip", &err);
bool rvalid = dvalid; // Both in the same ZIP.
if (p_preset->get("custom_template/debug") != "") {
@@ -1838,7 +1838,7 @@ bool EditorExportPlatformIOS::can_export(const Ref<EditorExportPreset> &p_preset
}
EditorExportPlatformIOS::EditorExportPlatformIOS() {
- logo = ImageTexture::create_from_image(memnew(Image(_iphone_logo)));
+ logo = ImageTexture::create_from_image(memnew(Image(_ios_logo)));
plugins_changed.set();
check_for_changes_thread.start(_check_for_changes_poll_thread, this);
}
diff --git a/platform/iphone/export/export_plugin.h b/platform/ios/export/export_plugin.h
index 1db7418e3f..a30cb4644f 100644
--- a/platform/iphone/export/export_plugin.h
+++ b/platform/ios/export/export_plugin.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef IPHONE_EXPORT_PLUGIN_H
-#define IPHONE_EXPORT_PLUGIN_H
+#ifndef IOS_EXPORT_PLUGIN_H
+#define IOS_EXPORT_PLUGIN_H
#include "core/config/project_settings.h"
#include "core/io/file_access.h"
@@ -43,7 +43,7 @@
#include "editor/editor_export.h"
#include "editor/editor_settings.h"
#include "main/splash.gen.h"
-#include "platform/iphone/logo.gen.h"
+#include "platform/ios/logo.gen.h"
#include "string.h"
#include "godot_plugin_config.h"
diff --git a/platform/iphone/export/godot_plugin_config.cpp b/platform/ios/export/godot_plugin_config.cpp
index 9118b95337..9118b95337 100644
--- a/platform/iphone/export/godot_plugin_config.cpp
+++ b/platform/ios/export/godot_plugin_config.cpp
diff --git a/platform/iphone/export/godot_plugin_config.h b/platform/ios/export/godot_plugin_config.h
index 9ef8aa8c6d..d2a2de4947 100644
--- a/platform/iphone/export/godot_plugin_config.h
+++ b/platform/ios/export/godot_plugin_config.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef IPHONE_GODOT_PLUGIN_CONFIG_H
-#define IPHONE_GODOT_PLUGIN_CONFIG_H
+#ifndef IOS_GODOT_PLUGIN_CONFIG_H
+#define IOS_GODOT_PLUGIN_CONFIG_H
#include "core/error/error_list.h"
#include "core/io/config_file.h"
diff --git a/platform/iphone/godot_app_delegate.h b/platform/ios/godot_app_delegate.h
index 703a906bda..703a906bda 100644
--- a/platform/iphone/godot_app_delegate.h
+++ b/platform/ios/godot_app_delegate.h
diff --git a/platform/iphone/godot_app_delegate.m b/platform/ios/godot_app_delegate.m
index 84347f9a30..84347f9a30 100644
--- a/platform/iphone/godot_app_delegate.m
+++ b/platform/ios/godot_app_delegate.m
diff --git a/platform/iphone/godot_iphone.mm b/platform/ios/godot_ios.mm
index 59fdfa9dcd..5f3e786b8a 100644
--- a/platform/iphone/godot_iphone.mm
+++ b/platform/ios/godot_ios.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* godot_iphone.mm */
+/* godot_ios.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,17 +30,17 @@
#include "core/string/ustring.h"
#include "main/main.h"
-#include "os_iphone.h"
+#include "os_ios.h"
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-static OSIPhone *os = nullptr;
+static OS_IOS *os = nullptr;
int add_path(int, char **);
int add_cmdline(int, char **);
-int iphone_main(int, char **, String);
+int ios_main(int, char **, String);
int add_path(int p_argc, char **p_args) {
NSString *str = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"godot_path"];
@@ -74,7 +74,7 @@ int add_cmdline(int p_argc, char **p_args) {
return p_argc;
}
-int iphone_main(int argc, char **argv, String data_dir, String cache_dir) {
+int ios_main(int argc, char **argv, String data_dir, String cache_dir) {
size_t len = strlen(argv[0]);
while (len--) {
@@ -91,11 +91,11 @@ int iphone_main(int argc, char **argv, String data_dir, String cache_dir) {
chdir(path);
}
- printf("godot_iphone %s\n", argv[0]);
+ printf("godot_ios %s\n", argv[0]);
char cwd[512];
getcwd(cwd, sizeof(cwd));
printf("cwd %s\n", cwd);
- os = new OSIPhone(data_dir, cache_dir);
+ os = new OS_IOS(data_dir, cache_dir);
// We must override main when testing is enabled
TEST_MAIN_OVERRIDE
@@ -124,8 +124,8 @@ int iphone_main(int argc, char **argv, String data_dir, String cache_dir) {
return 0;
}
-void iphone_finish() {
- printf("iphone_finish\n");
+void ios_finish() {
+ printf("ios_finish\n");
Main::cleanup();
delete os;
}
diff --git a/platform/iphone/godot_view.h b/platform/ios/godot_view.h
index fcb97fa63a..fcb97fa63a 100644
--- a/platform/iphone/godot_view.h
+++ b/platform/ios/godot_view.h
diff --git a/platform/iphone/godot_view.mm b/platform/ios/godot_view.mm
index e48dd2e507..9ed219508c 100644
--- a/platform/iphone/godot_view.mm
+++ b/platform/ios/godot_view.mm
@@ -33,7 +33,7 @@
#include "core/os/keyboard.h"
#include "core/string/ustring.h"
#import "display_layer.h"
-#include "display_server_iphone.h"
+#include "display_server_ios.h"
#import "godot_view_gesture_recognizer.h"
#import "godot_view_renderer.h"
@@ -281,8 +281,8 @@ static const float earth_gravity = 9.80665;
self.renderingLayer.frame = self.bounds;
[self.renderingLayer layoutDisplayLayer];
- if (DisplayServerIPhone::get_singleton()) {
- DisplayServerIPhone::get_singleton()->resize_window(self.bounds.size);
+ if (DisplayServerIOS::get_singleton()) {
+ DisplayServerIOS::get_singleton()->resize_window(self.bounds.size);
}
}
@@ -348,7 +348,7 @@ static const float earth_gravity = 9.80665;
int tid = [self getTouchIDForTouch:touch];
ERR_FAIL_COND(tid == -1);
CGPoint touchPoint = [touch locationInView:self];
- DisplayServerIPhone::get_singleton()->touch_press(tid, touchPoint.x * self.contentScaleFactor, touchPoint.y * self.contentScaleFactor, true, touch.tapCount > 1);
+ DisplayServerIOS::get_singleton()->touch_press(tid, touchPoint.x * self.contentScaleFactor, touchPoint.y * self.contentScaleFactor, true, touch.tapCount > 1);
}
}
}
@@ -362,7 +362,7 @@ static const float earth_gravity = 9.80665;
ERR_FAIL_COND(tid == -1);
CGPoint touchPoint = [touch locationInView:self];
CGPoint prev_point = [touch previousLocationInView:self];
- DisplayServerIPhone::get_singleton()->touch_drag(tid, prev_point.x * self.contentScaleFactor, prev_point.y * self.contentScaleFactor, touchPoint.x * self.contentScaleFactor, touchPoint.y * self.contentScaleFactor);
+ DisplayServerIOS::get_singleton()->touch_drag(tid, prev_point.x * self.contentScaleFactor, prev_point.y * self.contentScaleFactor, touchPoint.x * self.contentScaleFactor, touchPoint.y * self.contentScaleFactor);
}
}
}
@@ -376,7 +376,7 @@ static const float earth_gravity = 9.80665;
ERR_FAIL_COND(tid == -1);
[self removeTouch:touch];
CGPoint touchPoint = [touch locationInView:self];
- DisplayServerIPhone::get_singleton()->touch_press(tid, touchPoint.x * self.contentScaleFactor, touchPoint.y * self.contentScaleFactor, false, false);
+ DisplayServerIOS::get_singleton()->touch_press(tid, touchPoint.x * self.contentScaleFactor, touchPoint.y * self.contentScaleFactor, false, false);
}
}
}
@@ -388,7 +388,7 @@ static const float earth_gravity = 9.80665;
UITouch *touch = [tlist objectAtIndex:i];
int tid = [self getTouchIDForTouch:touch];
ERR_FAIL_COND(tid == -1);
- DisplayServerIPhone::get_singleton()->touches_cancelled(tid);
+ DisplayServerIOS::get_singleton()->touches_cancelled(tid);
}
}
[self clearTouches];
@@ -452,28 +452,28 @@ static const float earth_gravity = 9.80665;
switch (interfaceOrientation) {
case UIInterfaceOrientationLandscapeLeft: {
- DisplayServerIPhone::get_singleton()->update_gravity(-gravity.y, gravity.x, gravity.z);
- DisplayServerIPhone::get_singleton()->update_accelerometer(-(acceleration.y + gravity.y), (acceleration.x + gravity.x), acceleration.z + gravity.z);
- DisplayServerIPhone::get_singleton()->update_magnetometer(-magnetic.y, magnetic.x, magnetic.z);
- DisplayServerIPhone::get_singleton()->update_gyroscope(-rotation.y, rotation.x, rotation.z);
+ DisplayServerIOS::get_singleton()->update_gravity(-gravity.y, gravity.x, gravity.z);
+ DisplayServerIOS::get_singleton()->update_accelerometer(-(acceleration.y + gravity.y), (acceleration.x + gravity.x), acceleration.z + gravity.z);
+ DisplayServerIOS::get_singleton()->update_magnetometer(-magnetic.y, magnetic.x, magnetic.z);
+ DisplayServerIOS::get_singleton()->update_gyroscope(-rotation.y, rotation.x, rotation.z);
} break;
case UIInterfaceOrientationLandscapeRight: {
- DisplayServerIPhone::get_singleton()->update_gravity(gravity.y, -gravity.x, gravity.z);
- DisplayServerIPhone::get_singleton()->update_accelerometer((acceleration.y + gravity.y), -(acceleration.x + gravity.x), acceleration.z + gravity.z);
- DisplayServerIPhone::get_singleton()->update_magnetometer(magnetic.y, -magnetic.x, magnetic.z);
- DisplayServerIPhone::get_singleton()->update_gyroscope(rotation.y, -rotation.x, rotation.z);
+ DisplayServerIOS::get_singleton()->update_gravity(gravity.y, -gravity.x, gravity.z);
+ DisplayServerIOS::get_singleton()->update_accelerometer((acceleration.y + gravity.y), -(acceleration.x + gravity.x), acceleration.z + gravity.z);
+ DisplayServerIOS::get_singleton()->update_magnetometer(magnetic.y, -magnetic.x, magnetic.z);
+ DisplayServerIOS::get_singleton()->update_gyroscope(rotation.y, -rotation.x, rotation.z);
} break;
case UIInterfaceOrientationPortraitUpsideDown: {
- DisplayServerIPhone::get_singleton()->update_gravity(-gravity.x, gravity.y, gravity.z);
- DisplayServerIPhone::get_singleton()->update_accelerometer(-(acceleration.x + gravity.x), (acceleration.y + gravity.y), acceleration.z + gravity.z);
- DisplayServerIPhone::get_singleton()->update_magnetometer(-magnetic.x, magnetic.y, magnetic.z);
- DisplayServerIPhone::get_singleton()->update_gyroscope(-rotation.x, rotation.y, rotation.z);
+ DisplayServerIOS::get_singleton()->update_gravity(-gravity.x, gravity.y, gravity.z);
+ DisplayServerIOS::get_singleton()->update_accelerometer(-(acceleration.x + gravity.x), (acceleration.y + gravity.y), acceleration.z + gravity.z);
+ DisplayServerIOS::get_singleton()->update_magnetometer(-magnetic.x, magnetic.y, magnetic.z);
+ DisplayServerIOS::get_singleton()->update_gyroscope(-rotation.x, rotation.y, rotation.z);
} break;
default: { // assume portrait
- DisplayServerIPhone::get_singleton()->update_gravity(gravity.x, gravity.y, gravity.z);
- DisplayServerIPhone::get_singleton()->update_accelerometer(acceleration.x + gravity.x, acceleration.y + gravity.y, acceleration.z + gravity.z);
- DisplayServerIPhone::get_singleton()->update_magnetometer(magnetic.x, magnetic.y, magnetic.z);
- DisplayServerIPhone::get_singleton()->update_gyroscope(rotation.x, rotation.y, rotation.z);
+ DisplayServerIOS::get_singleton()->update_gravity(gravity.x, gravity.y, gravity.z);
+ DisplayServerIOS::get_singleton()->update_accelerometer(acceleration.x + gravity.x, acceleration.y + gravity.y, acceleration.z + gravity.z);
+ DisplayServerIOS::get_singleton()->update_magnetometer(magnetic.x, magnetic.y, magnetic.z);
+ DisplayServerIOS::get_singleton()->update_gyroscope(rotation.x, rotation.y, rotation.z);
} break;
}
}
diff --git a/platform/iphone/godot_view_gesture_recognizer.h b/platform/ios/godot_view_gesture_recognizer.h
index 9fd8a6b222..9fd8a6b222 100644
--- a/platform/iphone/godot_view_gesture_recognizer.h
+++ b/platform/ios/godot_view_gesture_recognizer.h
diff --git a/platform/iphone/godot_view_gesture_recognizer.mm b/platform/ios/godot_view_gesture_recognizer.mm
index 49a92add5e..49a92add5e 100644
--- a/platform/iphone/godot_view_gesture_recognizer.mm
+++ b/platform/ios/godot_view_gesture_recognizer.mm
diff --git a/platform/iphone/godot_view_renderer.h b/platform/ios/godot_view_renderer.h
index b3ee23ae4f..b3ee23ae4f 100644
--- a/platform/iphone/godot_view_renderer.h
+++ b/platform/ios/godot_view_renderer.h
diff --git a/platform/iphone/godot_view_renderer.mm b/platform/ios/godot_view_renderer.mm
index 32477ae41c..140410fbef 100644
--- a/platform/iphone/godot_view_renderer.mm
+++ b/platform/ios/godot_view_renderer.mm
@@ -32,9 +32,9 @@
#include "core/config/project_settings.h"
#include "core/os/keyboard.h"
-#import "display_server_iphone.h"
+#import "display_server_ios.h"
#include "main/main.h"
-#include "os_iphone.h"
+#include "os_ios.h"
#include "servers/audio_server.h"
#import <AudioToolbox/AudioServices.h>
@@ -69,7 +69,7 @@
if (!self.hasStartedMain) {
self.hasStartedMain = YES;
- OSIPhone::get_singleton()->start();
+ OS_IOS::get_singleton()->start();
return YES;
}
@@ -108,11 +108,11 @@
}
- (void)renderOnView:(UIView *)view {
- if (!OSIPhone::get_singleton()) {
+ if (!OS_IOS::get_singleton()) {
return;
}
- OSIPhone::get_singleton()->iterate();
+ OS_IOS::get_singleton()->iterate();
}
@end
diff --git a/platform/iphone/ios.h b/platform/ios/ios.h
index 0607d7b395..0607d7b395 100644
--- a/platform/iphone/ios.h
+++ b/platform/ios/ios.h
diff --git a/platform/iphone/ios.mm b/platform/ios/ios.mm
index 79baae028a..79baae028a 100644
--- a/platform/iphone/ios.mm
+++ b/platform/ios/ios.mm
diff --git a/platform/iphone/joypad_iphone.h b/platform/ios/joypad_ios.h
index 37e272a2c9..66c4b090bc 100644
--- a/platform/iphone/joypad_iphone.h
+++ b/platform/ios/joypad_ios.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joypad_iphone.h */
+/* joypad_ios.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,7 +30,7 @@
#import <GameController/GameController.h>
-@interface JoypadIPhoneObserver : NSObject
+@interface JoypadIOSObserver : NSObject
- (void)startObserving;
- (void)startProcessing;
@@ -38,13 +38,13 @@
@end
-class JoypadIPhone {
+class JoypadIOS {
private:
- JoypadIPhoneObserver *observer;
+ JoypadIOSObserver *observer;
public:
- JoypadIPhone();
- ~JoypadIPhone();
+ JoypadIOS();
+ ~JoypadIOS();
void start_processing();
};
diff --git a/platform/iphone/joypad_iphone.mm b/platform/ios/joypad_ios.mm
index 9c2feeaaca..e147cb2527 100644
--- a/platform/iphone/joypad_iphone.mm
+++ b/platform/ios/joypad_ios.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joypad_iphone.mm */
+/* joypad_ios.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#import "joypad_iphone.h"
+#import "joypad_ios.h"
#include "core/config/project_settings.h"
#include "drivers/coreaudio/audio_driver_coreaudio.h"
@@ -36,27 +36,27 @@
#import "godot_view.h"
-#include "os_iphone.h"
+#include "os_ios.h"
-JoypadIPhone::JoypadIPhone() {
- observer = [[JoypadIPhoneObserver alloc] init];
+JoypadIOS::JoypadIOS() {
+ observer = [[JoypadIOSObserver alloc] init];
[observer startObserving];
}
-JoypadIPhone::~JoypadIPhone() {
+JoypadIOS::~JoypadIOS() {
if (observer) {
[observer finishObserving];
observer = nil;
}
}
-void JoypadIPhone::start_processing() {
+void JoypadIOS::start_processing() {
if (observer) {
[observer startProcessing];
}
}
-@interface JoypadIPhoneObserver ()
+@interface JoypadIOSObserver ()
@property(assign, nonatomic) BOOL isObserving;
@property(assign, nonatomic) BOOL isProcessing;
@@ -65,7 +65,7 @@ void JoypadIPhone::start_processing() {
@end
-@implementation JoypadIPhoneObserver
+@implementation JoypadIOSObserver
- (instancetype)init {
self = [super init];
diff --git a/platform/iphone/keyboard_input_view.h b/platform/ios/keyboard_input_view.h
index 33fa5d571a..33fa5d571a 100644
--- a/platform/iphone/keyboard_input_view.h
+++ b/platform/ios/keyboard_input_view.h
diff --git a/platform/iphone/keyboard_input_view.mm b/platform/ios/keyboard_input_view.mm
index f2a7b22483..76e3f23c9d 100644
--- a/platform/iphone/keyboard_input_view.mm
+++ b/platform/ios/keyboard_input_view.mm
@@ -31,8 +31,8 @@
#import "keyboard_input_view.h"
#include "core/os/keyboard.h"
-#include "display_server_iphone.h"
-#include "os_iphone.h"
+#include "display_server_ios.h"
+#include "os_ios.h"
@interface GodotKeyboardInputView () <UITextViewDelegate>
@@ -115,8 +115,8 @@
- (void)deleteText:(NSInteger)charactersToDelete {
for (int i = 0; i < charactersToDelete; i++) {
- DisplayServerIPhone::get_singleton()->key(Key::BACKSPACE, true);
- DisplayServerIPhone::get_singleton()->key(Key::BACKSPACE, false);
+ DisplayServerIOS::get_singleton()->key(Key::BACKSPACE, true);
+ DisplayServerIOS::get_singleton()->key(Key::BACKSPACE, false);
}
}
@@ -138,8 +138,8 @@
break;
}
- DisplayServerIPhone::get_singleton()->key((Key)character, true);
- DisplayServerIPhone::get_singleton()->key((Key)character, false);
+ DisplayServerIOS::get_singleton()->key((Key)character, true);
+ DisplayServerIOS::get_singleton()->key((Key)character, false);
}
}
diff --git a/platform/iphone/logo.png b/platform/ios/logo.png
index 966d8aa70a..966d8aa70a 100644
--- a/platform/iphone/logo.png
+++ b/platform/ios/logo.png
Binary files differ
diff --git a/platform/iphone/main.m b/platform/ios/main.m
index acfa7ab731..acfa7ab731 100644
--- a/platform/iphone/main.m
+++ b/platform/ios/main.m
diff --git a/platform/iphone/os_iphone.h b/platform/ios/os_ios.h
index d03403bbb4..bbc77d48de 100644
--- a/platform/iphone/os_iphone.h
+++ b/platform/ios/os_ios.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* os_iphone.h */
+/* os_ios.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,24 +28,24 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifdef IPHONE_ENABLED
+#ifdef IOS_ENABLED
-#ifndef OS_IPHONE_H
-#define OS_IPHONE_H
+#ifndef OS_IOS_H
+#define OS_IOS_H
#include "drivers/coreaudio/audio_driver_coreaudio.h"
#include "drivers/unix/os_unix.h"
#include "ios.h"
-#include "joypad_iphone.h"
+#include "joypad_ios.h"
#include "servers/audio_server.h"
#include "servers/rendering/renderer_compositor.h"
#if defined(VULKAN_ENABLED)
#include "drivers/vulkan/rendering_device_vulkan.h"
-#include "platform/iphone/vulkan_context_iphone.h"
+#include "platform/ios/vulkan_context_ios.h"
#endif
-class OSIPhone : public OS_Unix {
+class OS_IOS : public OS_Unix {
private:
static HashMap<String, void *> dynamic_symbol_lookup_table;
friend void register_dynamic_symbol(char *name, void *address);
@@ -54,7 +54,7 @@ private:
iOS *ios = nullptr;
- JoypadIPhone *joypad_iphone = nullptr;
+ JoypadIOS *joypad_ios = nullptr;
MainLoop *main_loop = nullptr;
@@ -79,10 +79,10 @@ private:
void deinitialize_modules();
public:
- static OSIPhone *get_singleton();
+ static OS_IOS *get_singleton();
- OSIPhone(String p_data_dir, String p_cache_dir);
- ~OSIPhone();
+ OS_IOS(String p_data_dir, String p_cache_dir);
+ ~OS_IOS();
void initialize_modules();
@@ -119,6 +119,6 @@ public:
void on_focus_in();
};
-#endif // OS_IPHONE_H
+#endif // OS_IOS_H
-#endif // IPHONE_ENABLED
+#endif // IOS_ENABLED
diff --git a/platform/iphone/os_iphone.mm b/platform/ios/os_ios.mm
index 95b06b728e..880315209e 100644
--- a/platform/iphone/os_iphone.mm
+++ b/platform/ios/os_ios.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* os_iphone.mm */
+/* os_ios.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,16 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifdef IPHONE_ENABLED
+#ifdef IOS_ENABLED
-#include "os_iphone.h"
+#include "os_ios.h"
#import "app_delegate.h"
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
#include "core/io/file_access.h"
#include "core/io/file_access_pack.h"
-#include "display_server_iphone.h"
+#include "display_server_ios.h"
#include "drivers/unix/syslog_logger.h"
#import "godot_view.h"
#include "main/main.h"
@@ -65,7 +65,7 @@ typedef void (*init_callback)();
static init_callback *ios_init_callbacks = nullptr;
static int ios_init_callbacks_count = 0;
static int ios_init_callbacks_capacity = 0;
-HashMap<String, void *> OSIPhone::dynamic_symbol_lookup_table;
+HashMap<String, void *> OS_IOS::dynamic_symbol_lookup_table;
void add_ios_init_callback(init_callback cb) {
if (ios_init_callbacks_count == ios_init_callbacks_capacity) {
@@ -82,14 +82,14 @@ void add_ios_init_callback(init_callback cb) {
}
void register_dynamic_symbol(char *name, void *address) {
- OSIPhone::dynamic_symbol_lookup_table[String(name)] = address;
+ OS_IOS::dynamic_symbol_lookup_table[String(name)] = address;
}
-OSIPhone *OSIPhone::get_singleton() {
- return (OSIPhone *)OS::get_singleton();
+OS_IOS *OS_IOS::get_singleton() {
+ return (OS_IOS *)OS::get_singleton();
}
-OSIPhone::OSIPhone(String p_data_dir, String p_cache_dir) {
+OS_IOS::OS_IOS(String p_data_dir, String p_cache_dir) {
for (int i = 0; i < ios_init_callbacks_count; ++i) {
ios_init_callbacks[i]();
}
@@ -116,37 +116,37 @@ OSIPhone::OSIPhone(String p_data_dir, String p_cache_dir) {
AudioDriverManager::add_driver(&audio_driver);
- DisplayServerIPhone::register_iphone_driver();
+ DisplayServerIOS::register_ios_driver();
}
-OSIPhone::~OSIPhone() {}
+OS_IOS::~OS_IOS() {}
-void OSIPhone::alert(const String &p_alert, const String &p_title) {
+void OS_IOS::alert(const String &p_alert, const String &p_title) {
const CharString utf8_alert = p_alert.utf8();
const CharString utf8_title = p_title.utf8();
iOS::alert(utf8_alert.get_data(), utf8_title.get_data());
}
-void OSIPhone::initialize_core() {
+void OS_IOS::initialize_core() {
OS_Unix::initialize_core();
set_user_data_dir(user_data_dir);
}
-void OSIPhone::initialize() {
+void OS_IOS::initialize() {
initialize_core();
}
-void OSIPhone::initialize_modules() {
+void OS_IOS::initialize_modules() {
ios = memnew(iOS);
Engine::get_singleton()->add_singleton(Engine::Singleton("iOS", ios));
- joypad_iphone = memnew(JoypadIPhone);
+ joypad_ios = memnew(JoypadIOS);
}
-void OSIPhone::deinitialize_modules() {
- if (joypad_iphone) {
- memdelete(joypad_iphone);
+void OS_IOS::deinitialize_modules() {
+ if (joypad_ios) {
+ memdelete(joypad_ios);
}
if (ios) {
@@ -154,7 +154,7 @@ void OSIPhone::deinitialize_modules() {
}
}
-void OSIPhone::set_main_loop(MainLoop *p_main_loop) {
+void OS_IOS::set_main_loop(MainLoop *p_main_loop) {
main_loop = p_main_loop;
if (main_loop) {
@@ -162,11 +162,11 @@ void OSIPhone::set_main_loop(MainLoop *p_main_loop) {
}
}
-MainLoop *OSIPhone::get_main_loop() const {
+MainLoop *OS_IOS::get_main_loop() const {
return main_loop;
}
-void OSIPhone::delete_main_loop() {
+void OS_IOS::delete_main_loop() {
if (main_loop) {
main_loop->finalize();
memdelete(main_loop);
@@ -175,7 +175,7 @@ void OSIPhone::delete_main_loop() {
main_loop = nullptr;
}
-bool OSIPhone::iterate() {
+bool OS_IOS::iterate() {
if (!main_loop) {
return true;
}
@@ -187,15 +187,15 @@ bool OSIPhone::iterate() {
return Main::iteration();
}
-void OSIPhone::start() {
+void OS_IOS::start() {
Main::start();
- if (joypad_iphone) {
- joypad_iphone->start_processing();
+ if (joypad_ios) {
+ joypad_ios->start_processing();
}
}
-void OSIPhone::finalize() {
+void OS_IOS::finalize() {
deinitialize_modules();
// Already gets called
@@ -204,7 +204,7 @@ void OSIPhone::finalize() {
// MARK: Dynamic Libraries
-Error OSIPhone::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
+Error OS_IOS::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
if (p_path.length() == 0) {
p_library_handle = RTLD_SELF;
@@ -217,16 +217,16 @@ Error OSIPhone::open_dynamic_library(const String p_path, void *&p_library_handl
return OS_Unix::open_dynamic_library(p_path, p_library_handle, p_also_set_library_path, r_resolved_path);
}
-Error OSIPhone::close_dynamic_library(void *p_library_handle) {
+Error OS_IOS::close_dynamic_library(void *p_library_handle) {
if (p_library_handle == RTLD_SELF) {
return OK;
}
return OS_Unix::close_dynamic_library(p_library_handle);
}
-Error OSIPhone::get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional) {
+Error OS_IOS::get_dynamic_library_symbol_handle(void *p_library_handle, const String p_name, void *&p_symbol_handle, bool p_optional) {
if (p_library_handle == RTLD_SELF) {
- void **ptr = OSIPhone::dynamic_symbol_lookup_table.getptr(p_name);
+ void **ptr = OS_IOS::dynamic_symbol_lookup_table.getptr(p_name);
if (ptr) {
p_symbol_handle = *ptr;
return OK;
@@ -235,11 +235,11 @@ Error OSIPhone::get_dynamic_library_symbol_handle(void *p_library_handle, const
return OS_Unix::get_dynamic_library_symbol_handle(p_library_handle, p_name, p_symbol_handle, p_optional);
}
-String OSIPhone::get_name() const {
+String OS_IOS::get_name() const {
return "iOS";
}
-String OSIPhone::get_model_name() const {
+String OS_IOS::get_model_name() const {
String model = ios->get_model();
if (model != "") {
return model;
@@ -248,7 +248,7 @@ String OSIPhone::get_model_name() const {
return OS_Unix::get_model_name();
}
-Error OSIPhone::shell_open(String p_uri) {
+Error OS_IOS::shell_open(String p_uri) {
NSString *urlPath = [[NSString alloc] initWithUTF8String:p_uri.utf8().get_data()];
NSURL *url = [NSURL URLWithString:urlPath];
@@ -263,21 +263,21 @@ Error OSIPhone::shell_open(String p_uri) {
return OK;
}
-void OSIPhone::set_user_data_dir(String p_dir) {
+void OS_IOS::set_user_data_dir(String p_dir) {
Ref<DirAccess> da = DirAccess::open(p_dir);
user_data_dir = da->get_current_dir();
printf("setting data dir to %s from %s\n", user_data_dir.utf8().get_data(), p_dir.utf8().get_data());
}
-String OSIPhone::get_user_data_dir() const {
+String OS_IOS::get_user_data_dir() const {
return user_data_dir;
}
-String OSIPhone::get_cache_path() const {
+String OS_IOS::get_cache_path() const {
return cache_dir;
}
-String OSIPhone::get_locale() const {
+String OS_IOS::get_locale() const {
NSString *preferedLanguage = [NSLocale preferredLanguages].firstObject;
if (preferedLanguage) {
@@ -288,12 +288,12 @@ String OSIPhone::get_locale() const {
return String::utf8([localeIdentifier UTF8String]).replace("-", "_");
}
-String OSIPhone::get_unique_id() const {
+String OS_IOS::get_unique_id() const {
NSString *uuid = [UIDevice currentDevice].identifierForVendor.UUIDString;
return String::utf8([uuid UTF8String]);
}
-String OSIPhone::get_processor_name() const {
+String OS_IOS::get_processor_name() const {
char buffer[256];
size_t buffer_len = 256;
if (sysctlbyname("machdep.cpu.brand_string", &buffer, &buffer_len, NULL, 0) == 0) {
@@ -302,7 +302,7 @@ String OSIPhone::get_processor_name() const {
ERR_FAIL_V_MSG("", String("Couldn't get the CPU model name. Returning an empty string."));
}
-void OSIPhone::vibrate_handheld(int p_duration_ms) {
+void OS_IOS::vibrate_handheld(int p_duration_ms) {
if (ios->supports_haptic_engine()) {
ios->vibrate_haptic_engine((float)p_duration_ms / 1000.f);
} else {
@@ -311,16 +311,16 @@ void OSIPhone::vibrate_handheld(int p_duration_ms) {
}
}
-bool OSIPhone::_check_internal_feature_support(const String &p_feature) {
+bool OS_IOS::_check_internal_feature_support(const String &p_feature) {
return p_feature == "mobile";
}
-void OSIPhone::on_focus_out() {
+void OS_IOS::on_focus_out() {
if (is_focused) {
is_focused = false;
- if (DisplayServerIPhone::get_singleton()) {
- DisplayServerIPhone::get_singleton()->send_window_event(DisplayServer::WINDOW_EVENT_FOCUS_OUT);
+ if (DisplayServerIOS::get_singleton()) {
+ DisplayServerIOS::get_singleton()->send_window_event(DisplayServer::WINDOW_EVENT_FOCUS_OUT);
}
[AppDelegate.viewController.godotView stopRendering];
@@ -329,12 +329,12 @@ void OSIPhone::on_focus_out() {
}
}
-void OSIPhone::on_focus_in() {
+void OS_IOS::on_focus_in() {
if (!is_focused) {
is_focused = true;
- if (DisplayServerIPhone::get_singleton()) {
- DisplayServerIPhone::get_singleton()->send_window_event(DisplayServer::WINDOW_EVENT_FOCUS_IN);
+ if (DisplayServerIOS::get_singleton()) {
+ DisplayServerIOS::get_singleton()->send_window_event(DisplayServer::WINDOW_EVENT_FOCUS_IN);
}
[AppDelegate.viewController.godotView startRendering];
@@ -343,4 +343,4 @@ void OSIPhone::on_focus_in() {
}
}
-#endif // IPHONE_ENABLED
+#endif // IOS_ENABLED
diff --git a/platform/iphone/platform_config.h b/platform/ios/platform_config.h
index fed77d8932..fed77d8932 100644
--- a/platform/iphone/platform_config.h
+++ b/platform/ios/platform_config.h
diff --git a/platform/iphone/tts_ios.h b/platform/ios/tts_ios.h
index 064316b0b2..064316b0b2 100644
--- a/platform/iphone/tts_ios.h
+++ b/platform/ios/tts_ios.h
diff --git a/platform/iphone/tts_ios.mm b/platform/ios/tts_ios.mm
index a079d02add..a079d02add 100644
--- a/platform/iphone/tts_ios.mm
+++ b/platform/ios/tts_ios.mm
diff --git a/platform/iphone/view_controller.h b/platform/ios/view_controller.h
index c8b37a4d11..c8b37a4d11 100644
--- a/platform/iphone/view_controller.h
+++ b/platform/ios/view_controller.h
diff --git a/platform/iphone/view_controller.mm b/platform/ios/view_controller.mm
index 4f4ef4f046..43669d3f94 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/ios/view_controller.mm
@@ -30,11 +30,11 @@
#import "view_controller.h"
#include "core/config/project_settings.h"
-#include "display_server_iphone.h"
+#include "display_server_ios.h"
#import "godot_view.h"
#import "godot_view_renderer.h"
#import "keyboard_input_view.h"
-#include "os_iphone.h"
+#include "os_ios.h"
#import <AVFoundation/AVFoundation.h>
#import <GameController/GameController.h>
@@ -168,11 +168,11 @@
}
- (BOOL)shouldAutorotate {
- if (!DisplayServerIPhone::get_singleton()) {
+ if (!DisplayServerIOS::get_singleton()) {
return NO;
}
- switch (DisplayServerIPhone::get_singleton()->screen_get_orientation(DisplayServer::SCREEN_OF_MAIN_WINDOW)) {
+ switch (DisplayServerIOS::get_singleton()->screen_get_orientation(DisplayServer::SCREEN_OF_MAIN_WINDOW)) {
case DisplayServer::SCREEN_SENSOR:
case DisplayServer::SCREEN_SENSOR_LANDSCAPE:
case DisplayServer::SCREEN_SENSOR_PORTRAIT:
@@ -183,11 +183,11 @@
}
- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
- if (!DisplayServerIPhone::get_singleton()) {
+ if (!DisplayServerIOS::get_singleton()) {
return UIInterfaceOrientationMaskAll;
}
- switch (DisplayServerIPhone::get_singleton()->screen_get_orientation(DisplayServer::SCREEN_OF_MAIN_WINDOW)) {
+ switch (DisplayServerIOS::get_singleton()->screen_get_orientation(DisplayServer::SCREEN_OF_MAIN_WINDOW)) {
case DisplayServer::SCREEN_PORTRAIT:
return UIInterfaceOrientationMaskPortrait;
case DisplayServer::SCREEN_REVERSE_LANDSCAPE:
@@ -226,14 +226,14 @@
CGRect rawFrame = [value CGRectValue];
CGRect keyboardFrame = [self.view convertRect:rawFrame fromView:nil];
- if (DisplayServerIPhone::get_singleton()) {
- DisplayServerIPhone::get_singleton()->virtual_keyboard_set_height(keyboardFrame.size.height);
+ if (DisplayServerIOS::get_singleton()) {
+ DisplayServerIOS::get_singleton()->virtual_keyboard_set_height(keyboardFrame.size.height);
}
}
- (void)keyboardHidden:(NSNotification *)notification {
- if (DisplayServerIPhone::get_singleton()) {
- DisplayServerIPhone::get_singleton()->virtual_keyboard_set_height(0);
+ if (DisplayServerIOS::get_singleton()) {
+ DisplayServerIOS::get_singleton()->virtual_keyboard_set_height(0);
}
}
diff --git a/platform/iphone/vulkan_context_iphone.h b/platform/ios/vulkan_context_ios.h
index 7576525755..e9c09e087a 100644
--- a/platform/iphone/vulkan_context_iphone.h
+++ b/platform/ios/vulkan_context_ios.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* vulkan_context_iphone.h */
+/* vulkan_context_ios.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,21 +28,21 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef VULKAN_CONTEXT_IPHONE_H
-#define VULKAN_CONTEXT_IPHONE_H
+#ifndef VULKAN_CONTEXT_IOS_H
+#define VULKAN_CONTEXT_IOS_H
#include "drivers/vulkan/vulkan_context.h"
#import <UIKit/UIKit.h>
-class VulkanContextIPhone : public VulkanContext {
+class VulkanContextIOS : public VulkanContext {
virtual const char *_get_platform_surface_extension() const;
public:
Error window_create(DisplayServer::WindowID p_window_id, DisplayServer::VSyncMode p_vsync_mode, CALayer *p_metal_layer, int p_width, int p_height);
- VulkanContextIPhone();
- ~VulkanContextIPhone();
+ VulkanContextIOS();
+ ~VulkanContextIOS();
};
-#endif // VULKAN_CONTEXT_IPHONE_H
+#endif // VULKAN_CONTEXT_IOS_H
diff --git a/platform/iphone/vulkan_context_iphone.mm b/platform/ios/vulkan_context_ios.mm
index 17cb0f6009..09cd369aa5 100644
--- a/platform/iphone/vulkan_context_iphone.mm
+++ b/platform/ios/vulkan_context_ios.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* vulkan_context_iphone.mm */
+/* vulkan_context_ios.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,18 +28,18 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "vulkan_context_iphone.h"
+#include "vulkan_context_ios.h"
#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
-const char *VulkanContextIPhone::_get_platform_surface_extension() const {
+const char *VulkanContextIOS::_get_platform_surface_extension() const {
return VK_MVK_IOS_SURFACE_EXTENSION_NAME;
}
-Error VulkanContextIPhone::window_create(DisplayServer::WindowID p_window_id, DisplayServer::VSyncMode p_vsync_mode, CALayer *p_metal_layer, int p_width, int p_height) {
+Error VulkanContextIOS::window_create(DisplayServer::WindowID p_window_id, DisplayServer::VSyncMode p_vsync_mode, CALayer *p_metal_layer, int p_width, int p_height) {
VkIOSSurfaceCreateInfoMVK createInfo;
createInfo.sType = VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK;
createInfo.pNext = nullptr;
@@ -54,6 +54,6 @@ Error VulkanContextIPhone::window_create(DisplayServer::WindowID p_window_id, Di
return _window_create(p_window_id, p_vsync_mode, surface, p_width, p_height);
}
-VulkanContextIPhone::VulkanContextIPhone() {}
+VulkanContextIOS::VulkanContextIOS() {}
-VulkanContextIPhone::~VulkanContextIPhone() {}
+VulkanContextIOS::~VulkanContextIOS() {}
diff --git a/platform/macos/SCsub b/platform/macos/SCsub
new file mode 100644
index 0000000000..d0856c709a
--- /dev/null
+++ b/platform/macos/SCsub
@@ -0,0 +1,30 @@
+#!/usr/bin/env python
+
+Import("env")
+
+from platform_methods import run_in_subprocess
+import platform_macos_builders
+
+files = [
+ "os_macos.mm",
+ "godot_application.mm",
+ "godot_application_delegate.mm",
+ "crash_handler_macos.mm",
+ "macos_terminal_logger.mm",
+ "display_server_macos.mm",
+ "godot_content_view.mm",
+ "godot_window_delegate.mm",
+ "godot_window.mm",
+ "key_mapping_macos.mm",
+ "godot_main_macos.mm",
+ "dir_access_macos.mm",
+ "tts_macos.mm",
+ "joypad_macos.cpp",
+ "vulkan_context_macos.mm",
+ "gl_manager_macos_legacy.mm",
+]
+
+prog = env.add_program("#bin/godot", files)
+
+if env["debug_symbols"] and env["separate_debug_symbols"]:
+ env.AddPostAction(prog, run_in_subprocess(platform_macos_builders.make_debug_macos))
diff --git a/platform/osx/crash_handler_osx.h b/platform/macos/crash_handler_macos.h
index 72938e5e0a..c9b0e77dc4 100644
--- a/platform/osx/crash_handler_osx.h
+++ b/platform/macos/crash_handler_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* crash_handler_osx.h */
+/* crash_handler_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef CRASH_HANDLER_OSX_H
-#define CRASH_HANDLER_OSX_H
+#ifndef CRASH_HANDLER_MACOS_H
+#define CRASH_HANDLER_MACOS_H
class CrashHandler {
bool disabled;
@@ -44,4 +44,4 @@ public:
~CrashHandler();
};
-#endif // CRASH_HANDLER_OSX_H
+#endif // CRASH_HANDLER_MACOS_H
diff --git a/platform/osx/crash_handler_osx.mm b/platform/macos/crash_handler_macos.mm
index a798ba3b46..74bd012f0c 100644
--- a/platform/osx/crash_handler_osx.mm
+++ b/platform/macos/crash_handler_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* crash_handler_osx.mm */
+/* crash_handler_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "crash_handler_osx.h"
+#include "crash_handler_macos.h"
#include "core/config/project_settings.h"
#include "core/os/os.h"
diff --git a/platform/osx/detect.py b/platform/macos/detect.py
index 47765cff71..20e7afa772 100644
--- a/platform/osx/detect.py
+++ b/platform/macos/detect.py
@@ -8,7 +8,7 @@ def is_active():
def get_name():
- return "OSX"
+ return "macOS"
def can_build():
@@ -98,7 +98,7 @@ def configure(env):
## Architecture
- # Mac OS X no longer runs on 32-bit since 10.7 which is unsupported since 2014
+ # macOS no longer runs on 32-bit since 10.7 which is unsupported since 2014
# As such, we only support 64-bit
env["bits"] = "64"
@@ -134,7 +134,7 @@ def configure(env):
env["CC"] = "clang"
env["CXX"] = "clang++"
- detect_darwin_sdk_path("osx", env)
+ detect_darwin_sdk_path("macos", env)
env.Append(CCFLAGS=["-isysroot", "$MACOS_SDK_PATH"])
env.Append(LINKFLAGS=["-isysroot", "$MACOS_SDK_PATH"])
@@ -191,8 +191,10 @@ def configure(env):
## Flags
- env.Prepend(CPPPATH=["#platform/osx"])
- env.Append(CPPDEFINES=["OSX_ENABLED", "UNIX_ENABLED", "APPLE_STYLE_KEYS", "COREAUDIO_ENABLED", "COREMIDI_ENABLED"])
+ env.Prepend(CPPPATH=["#platform/macos"])
+ env.Append(
+ CPPDEFINES=["MACOS_ENABLED", "UNIX_ENABLED", "APPLE_STYLE_KEYS", "COREAUDIO_ENABLED", "COREMIDI_ENABLED"]
+ )
env.Append(
LINKFLAGS=[
"-framework",
diff --git a/platform/osx/dir_access_osx.h b/platform/macos/dir_access_macos.h
index 3c66c81d4f..2b234ad96c 100644
--- a/platform/osx/dir_access_osx.h
+++ b/platform/macos/dir_access_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* dir_access_osx.h */
+/* dir_access_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef DIR_ACCESS_OSX_H
-#define DIR_ACCESS_OSX_H
+#ifndef DIR_ACCESS_MACOS_H
+#define DIR_ACCESS_MACOS_H
#if defined(UNIX_ENABLED) || defined(LIBC_FILEIO_ENABLED)
@@ -41,7 +41,7 @@
#include "core/io/dir_access.h"
#include "drivers/unix/dir_access_unix.h"
-class DirAccessOSX : public DirAccessUnix {
+class DirAccessMacOS : public DirAccessUnix {
protected:
virtual String fix_unicode_name(const char *p_name) const;
diff --git a/platform/osx/dir_access_osx.mm b/platform/macos/dir_access_macos.mm
index 6bafb9470d..8f3906c6b8 100644
--- a/platform/osx/dir_access_osx.mm
+++ b/platform/macos/dir_access_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* dir_access_osx.mm */
+/* dir_access_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "dir_access_osx.h"
+#include "dir_access_macos.h"
#if defined(UNIX_ENABLED) || defined(LIBC_FILEIO_ENABLED)
@@ -37,7 +37,7 @@
#import <AppKit/NSWorkspace.h>
#import <Foundation/Foundation.h>
-String DirAccessOSX::fix_unicode_name(const char *p_name) const {
+String DirAccessMacOS::fix_unicode_name(const char *p_name) const {
String fname;
NSString *nsstr = [[NSString stringWithUTF8String:p_name] precomposedStringWithCanonicalMapping];
@@ -46,14 +46,14 @@ String DirAccessOSX::fix_unicode_name(const char *p_name) const {
return fname;
}
-int DirAccessOSX::get_drive_count() {
+int DirAccessMacOS::get_drive_count() {
NSArray *res_keys = [NSArray arrayWithObjects:NSURLVolumeURLKey, NSURLIsSystemImmutableKey, nil];
NSArray *vols = [[NSFileManager defaultManager] mountedVolumeURLsIncludingResourceValuesForKeys:res_keys options:NSVolumeEnumerationSkipHiddenVolumes];
return [vols count];
}
-String DirAccessOSX::get_drive(int p_drive) {
+String DirAccessMacOS::get_drive(int p_drive) {
NSArray *res_keys = [NSArray arrayWithObjects:NSURLVolumeURLKey, NSURLIsSystemImmutableKey, nil];
NSArray *vols = [[NSFileManager defaultManager] mountedVolumeURLsIncludingResourceValuesForKeys:res_keys options:NSVolumeEnumerationSkipHiddenVolumes];
int count = [vols count];
@@ -68,7 +68,7 @@ String DirAccessOSX::get_drive(int p_drive) {
return volname;
}
-bool DirAccessOSX::is_hidden(const String &p_name) {
+bool DirAccessMacOS::is_hidden(const String &p_name) {
String f = get_current_dir().plus_file(p_name);
NSURL *url = [NSURL fileURLWithPath:@(f.utf8().get_data())];
NSNumber *hidden = nil;
diff --git a/platform/osx/display_server_osx.h b/platform/macos/display_server_macos.h
index 9575cb29a2..41031ec81b 100644
--- a/platform/osx/display_server_osx.h
+++ b/platform/macos/display_server_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* display_server_osx.h */
+/* display_server_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef DISPLAY_SERVER_OSX_H
-#define DISPLAY_SERVER_OSX_H
+#ifndef DISPLAY_SERVER_MACOS_H
+#define DISPLAY_SERVER_MACOS_H
#define BitMap _QDBitMap // Suppress deprecated QuickDraw definition.
@@ -37,12 +37,12 @@
#include "servers/display_server.h"
#if defined(GLES3_ENABLED)
-#include "gl_manager_osx_legacy.h"
+#include "gl_manager_macos_legacy.h"
#endif // GLES3_ENABLED
#if defined(VULKAN_ENABLED)
#include "drivers/vulkan/rendering_device_vulkan.h"
-#include "platform/osx/vulkan_context_osx.h"
+#include "platform/macos/vulkan_context_macos.h"
#endif // VULKAN_ENABLED
#import <AppKit/AppKit.h>
@@ -54,15 +54,15 @@
#undef BitMap
#undef CursorShape
-class DisplayServerOSX : public DisplayServer {
- GDCLASS(DisplayServerOSX, DisplayServer)
+class DisplayServerMacOS : public DisplayServer {
+ GDCLASS(DisplayServerMacOS, DisplayServer)
_THREAD_SAFE_CLASS_
public:
struct KeyEvent {
WindowID window_id = INVALID_WINDOW_ID;
- unsigned int osx_state = false;
+ unsigned int macos_state = false;
bool pressed = false;
bool echo = false;
bool raw = false;
@@ -115,10 +115,10 @@ public:
private:
#if defined(GLES3_ENABLED)
- GLManager_OSX *gl_manager = nullptr;
+ GLManager_MacOS *gl_manager = nullptr;
#endif
#if defined(VULKAN_ENABLED)
- VulkanContextOSX *context_vulkan = nullptr;
+ VulkanContextMacOS *context_vulkan = nullptr;
RenderingDeviceVulkan *rendering_device_vulkan = nullptr;
#endif
String rendering_driver;
@@ -203,7 +203,7 @@ public:
void send_event(NSEvent *p_event);
void send_window_event(const WindowData &p_wd, WindowEvent p_event);
void release_pressed_events();
- void get_key_modifier_state(unsigned int p_osx_state, Ref<InputEventWithModifiers> r_state) const;
+ void get_key_modifier_state(unsigned int p_macos_state, Ref<InputEventWithModifiers> r_state) const;
void update_mouse_pos(WindowData &p_wd, NSPoint p_location_in_window);
void push_to_key_event_buffer(const KeyEvent &p_event);
void update_im_text(const Point2i &p_selection, const String &p_text);
@@ -397,10 +397,10 @@ public:
static DisplayServer *create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
static Vector<String> get_rendering_drivers_func();
- static void register_osx_driver();
+ static void register_macos_driver();
- DisplayServerOSX(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
- ~DisplayServerOSX();
+ DisplayServerMacOS(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error);
+ ~DisplayServerMacOS();
};
-#endif // DISPLAY_SERVER_OSX_H
+#endif // DISPLAY_SERVER_MACOS_H
diff --git a/platform/osx/display_server_osx.mm b/platform/macos/display_server_macos.mm
index 11474dac46..07ba5d7497 100644
--- a/platform/osx/display_server_osx.mm
+++ b/platform/macos/display_server_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* display_server_osx.mm */
+/* display_server_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,16 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "display_server_osx.h"
+#include "display_server_macos.h"
#include "godot_content_view.h"
#include "godot_menu_item.h"
#include "godot_window.h"
#include "godot_window_delegate.h"
-#include "key_mapping_osx.h"
-#include "os_osx.h"
+#include "key_mapping_macos.h"
+#include "os_macos.h"
-#include "tts_osx.h"
+#include "tts_macos.h"
#include "core/io/marshalls.h"
#include "core/math/geometry_2d.h"
@@ -60,7 +60,7 @@
#include "servers/rendering/renderer_rd/renderer_compositor_rd.h"
#endif
-const NSMenu *DisplayServerOSX::_get_menu_root(const String &p_menu_root) const {
+const NSMenu *DisplayServerMacOS::_get_menu_root(const String &p_menu_root) const {
const NSMenu *menu = nullptr;
if (p_menu_root == "") {
// Main menu.
@@ -81,7 +81,7 @@ const NSMenu *DisplayServerOSX::_get_menu_root(const String &p_menu_root) const
return menu;
}
-NSMenu *DisplayServerOSX::_get_menu_root(const String &p_menu_root) {
+NSMenu *DisplayServerMacOS::_get_menu_root(const String &p_menu_root) {
NSMenu *menu = nullptr;
if (p_menu_root == "") {
// Main menu.
@@ -105,7 +105,7 @@ NSMenu *DisplayServerOSX::_get_menu_root(const String &p_menu_root) {
return menu;
}
-DisplayServerOSX::WindowID DisplayServerOSX::_create_window(WindowMode p_mode, VSyncMode p_vsync_mode, const Rect2i &p_rect) {
+DisplayServerMacOS::WindowID DisplayServerMacOS::_create_window(WindowMode p_mode, VSyncMode p_vsync_mode, const Rect2i &p_rect) {
WindowID id;
const float scale = screen_get_max_scale();
{
@@ -193,7 +193,7 @@ DisplayServerOSX::WindowID DisplayServerOSX::_create_window(WindowMode p_mode, V
return id;
}
-void DisplayServerOSX::_update_window_style(WindowData p_wd) {
+void DisplayServerMacOS::_update_window_style(WindowData p_wd) {
bool borderless_full = false;
if (p_wd.borderless) {
@@ -222,7 +222,7 @@ void DisplayServerOSX::_update_window_style(WindowData p_wd) {
}
}
-void DisplayServerOSX::_set_window_per_pixel_transparency_enabled(bool p_enabled, WindowID p_window) {
+void DisplayServerMacOS::_set_window_per_pixel_transparency_enabled(bool p_enabled, WindowID p_window) {
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
@@ -267,7 +267,7 @@ void DisplayServerOSX::_set_window_per_pixel_transparency_enabled(bool p_enabled
}
}
-void DisplayServerOSX::_update_displays_arrangement() {
+void DisplayServerMacOS::_update_displays_arrangement() {
origin = Point2i();
for (int i = 0; i < get_screen_count(); i++) {
@@ -282,20 +282,20 @@ void DisplayServerOSX::_update_displays_arrangement() {
displays_arrangement_dirty = false;
}
-Point2i DisplayServerOSX::_get_screens_origin() const {
+Point2i DisplayServerMacOS::_get_screens_origin() const {
// Returns the native top-left screen coordinate of the smallest rectangle
// that encompasses all screens. Needed in get_screen_position(),
// window_get_position, and window_set_position()
// to convert between OS X native screen coordinates and the ones expected by Godot.
if (displays_arrangement_dirty) {
- const_cast<DisplayServerOSX *>(this)->_update_displays_arrangement();
+ const_cast<DisplayServerMacOS *>(this)->_update_displays_arrangement();
}
return origin;
}
-Point2i DisplayServerOSX::_get_native_screen_position(int p_screen) const {
+Point2i DisplayServerMacOS::_get_native_screen_position(int p_screen) const {
NSArray *screenArray = [NSScreen screens];
if ((NSUInteger)p_screen < [screenArray count]) {
NSRect nsrect = [[screenArray objectAtIndex:p_screen] frame];
@@ -306,18 +306,18 @@ Point2i DisplayServerOSX::_get_native_screen_position(int p_screen) const {
return Point2i();
}
-void DisplayServerOSX::_displays_arrangement_changed(CGDirectDisplayID display_id, CGDisplayChangeSummaryFlags flags, void *user_info) {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+void DisplayServerMacOS::_displays_arrangement_changed(CGDirectDisplayID display_id, CGDisplayChangeSummaryFlags flags, void *user_info) {
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
ds->displays_arrangement_dirty = true;
}
}
-void DisplayServerOSX::_dispatch_input_events(const Ref<InputEvent> &p_event) {
- ((DisplayServerOSX *)(get_singleton()))->_dispatch_input_event(p_event);
+void DisplayServerMacOS::_dispatch_input_events(const Ref<InputEvent> &p_event) {
+ ((DisplayServerMacOS *)(get_singleton()))->_dispatch_input_event(p_event);
}
-void DisplayServerOSX::_dispatch_input_event(const Ref<InputEvent> &p_event) {
+void DisplayServerMacOS::_dispatch_input_event(const Ref<InputEvent> &p_event) {
_THREAD_SAFE_METHOD_
if (!in_dispatch_input_event) {
in_dispatch_input_event = true;
@@ -364,12 +364,12 @@ void DisplayServerOSX::_dispatch_input_event(const Ref<InputEvent> &p_event) {
}
}
-void DisplayServerOSX::_push_input(const Ref<InputEvent> &p_event) {
+void DisplayServerMacOS::_push_input(const Ref<InputEvent> &p_event) {
Ref<InputEvent> ev = p_event;
Input::get_singleton()->parse_input_event(ev);
}
-void DisplayServerOSX::_process_key_events() {
+void DisplayServerMacOS::_process_key_events() {
Ref<InputEventKey> k;
for (int i = 0; i < key_event_pos; i++) {
const KeyEvent &ke = key_event_buffer[i];
@@ -378,7 +378,7 @@ void DisplayServerOSX::_process_key_events() {
k.instantiate();
k->set_window_id(ke.window_id);
- get_key_modifier_state(ke.osx_state, k);
+ get_key_modifier_state(ke.macos_state, k);
k->set_pressed(ke.pressed);
k->set_echo(ke.echo);
k->set_keycode(ke.keycode);
@@ -392,7 +392,7 @@ void DisplayServerOSX::_process_key_events() {
k.instantiate();
k->set_window_id(ke.window_id);
- get_key_modifier_state(ke.osx_state, k);
+ get_key_modifier_state(ke.macos_state, k);
k->set_pressed(ke.pressed);
k->set_echo(ke.echo);
k->set_keycode(Key::NONE);
@@ -405,7 +405,7 @@ void DisplayServerOSX::_process_key_events() {
k.instantiate();
k->set_window_id(ke.window_id);
- get_key_modifier_state(ke.osx_state, k);
+ get_key_modifier_state(ke.macos_state, k);
k->set_pressed(ke.pressed);
k->set_echo(ke.echo);
k->set_keycode(ke.keycode);
@@ -423,7 +423,7 @@ void DisplayServerOSX::_process_key_events() {
key_event_pos = 0;
}
-void DisplayServerOSX::_update_keyboard_layouts() {
+void DisplayServerMacOS::_update_keyboard_layouts() {
kbd_layouts.clear();
current_layout = 0;
@@ -468,14 +468,14 @@ void DisplayServerOSX::_update_keyboard_layouts() {
keyboard_layout_dirty = false;
}
-void DisplayServerOSX::_keyboard_layout_changed(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef user_info) {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+void DisplayServerMacOS::_keyboard_layout_changed(CFNotificationCenterRef center, void *observer, CFStringRef name, const void *object, CFDictionaryRef user_info) {
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
ds->keyboard_layout_dirty = true;
}
}
-NSImage *DisplayServerOSX::_convert_to_nsimg(Ref<Image> &p_image) const {
+NSImage *DisplayServerMacOS::_convert_to_nsimg(Ref<Image> &p_image) const {
p_image->convert(Image::FORMAT_RGBA8);
NSBitmapImageRep *imgrep = [[NSBitmapImageRep alloc]
initWithBitmapDataPlanes:NULL
@@ -509,7 +509,7 @@ NSImage *DisplayServerOSX::_convert_to_nsimg(Ref<Image> &p_image) const {
return nsimg;
}
-NSCursor *DisplayServerOSX::_cursor_from_selector(SEL p_selector, SEL p_fallback) {
+NSCursor *DisplayServerMacOS::_cursor_from_selector(SEL p_selector, SEL p_fallback) {
if ([NSCursor respondsToSelector:p_selector]) {
id object = [NSCursor performSelector:p_selector];
if ([object isKindOfClass:[NSCursor class]]) {
@@ -523,11 +523,11 @@ NSCursor *DisplayServerOSX::_cursor_from_selector(SEL p_selector, SEL p_fallback
return [NSCursor arrowCursor];
}
-NSMenu *DisplayServerOSX::get_dock_menu() const {
+NSMenu *DisplayServerMacOS::get_dock_menu() const {
return dock_menu;
}
-void DisplayServerOSX::menu_callback(id p_sender) {
+void DisplayServerMacOS::menu_callback(id p_sender) {
if (![p_sender representedObject]) {
return;
}
@@ -560,15 +560,15 @@ void DisplayServerOSX::menu_callback(id p_sender) {
}
}
-bool DisplayServerOSX::has_window(WindowID p_window) const {
+bool DisplayServerMacOS::has_window(WindowID p_window) const {
return windows.has(p_window);
}
-DisplayServerOSX::WindowData &DisplayServerOSX::get_window(WindowID p_window) {
+DisplayServerMacOS::WindowData &DisplayServerMacOS::get_window(WindowID p_window) {
return windows[p_window];
}
-void DisplayServerOSX::send_event(NSEvent *p_event) {
+void DisplayServerMacOS::send_event(NSEvent *p_event) {
// Special case handling of command-period, which is traditionally a special
// shortcut in macOS and doesn't arrive at our regular keyDown handler.
if ([p_event type] == NSEventTypeKeyDown) {
@@ -577,7 +577,7 @@ void DisplayServerOSX::send_event(NSEvent *p_event) {
k.instantiate();
get_key_modifier_state([p_event modifierFlags], k);
- k->set_window_id(DisplayServerOSX::INVALID_WINDOW_ID);
+ k->set_window_id(DisplayServerMacOS::INVALID_WINDOW_ID);
k->set_pressed(true);
k->set_keycode(Key::PERIOD);
k->set_physical_keycode(Key::PERIOD);
@@ -588,7 +588,7 @@ void DisplayServerOSX::send_event(NSEvent *p_event) {
}
}
-void DisplayServerOSX::send_window_event(const WindowData &wd, WindowEvent p_event) {
+void DisplayServerMacOS::send_window_event(const WindowData &wd, WindowEvent p_event) {
_THREAD_SAFE_METHOD_
if (!wd.event_callback.is_null()) {
@@ -600,21 +600,21 @@ void DisplayServerOSX::send_window_event(const WindowData &wd, WindowEvent p_eve
}
}
-void DisplayServerOSX::release_pressed_events() {
+void DisplayServerMacOS::release_pressed_events() {
_THREAD_SAFE_METHOD_
if (Input::get_singleton()) {
Input::get_singleton()->release_pressed_events();
}
}
-void DisplayServerOSX::get_key_modifier_state(unsigned int p_osx_state, Ref<InputEventWithModifiers> r_state) const {
- r_state->set_shift_pressed((p_osx_state & NSEventModifierFlagShift));
- r_state->set_ctrl_pressed((p_osx_state & NSEventModifierFlagControl));
- r_state->set_alt_pressed((p_osx_state & NSEventModifierFlagOption));
- r_state->set_meta_pressed((p_osx_state & NSEventModifierFlagCommand));
+void DisplayServerMacOS::get_key_modifier_state(unsigned int p_macos_state, Ref<InputEventWithModifiers> r_state) const {
+ r_state->set_shift_pressed((p_macos_state & NSEventModifierFlagShift));
+ r_state->set_ctrl_pressed((p_macos_state & NSEventModifierFlagControl));
+ r_state->set_alt_pressed((p_macos_state & NSEventModifierFlagOption));
+ r_state->set_meta_pressed((p_macos_state & NSEventModifierFlagCommand));
}
-void DisplayServerOSX::update_mouse_pos(DisplayServerOSX::WindowData &p_wd, NSPoint p_location_in_window) {
+void DisplayServerMacOS::update_mouse_pos(DisplayServerMacOS::WindowData &p_wd, NSPoint p_location_in_window) {
const NSRect content_rect = [p_wd.window_view frame];
const float scale = screen_get_max_scale();
p_wd.mouse_pos.x = p_location_in_window.x * scale;
@@ -622,33 +622,33 @@ void DisplayServerOSX::update_mouse_pos(DisplayServerOSX::WindowData &p_wd, NSPo
Input::get_singleton()->set_mouse_position(p_wd.mouse_pos);
}
-void DisplayServerOSX::push_to_key_event_buffer(const DisplayServerOSX::KeyEvent &p_event) {
+void DisplayServerMacOS::push_to_key_event_buffer(const DisplayServerMacOS::KeyEvent &p_event) {
if (key_event_pos >= key_event_buffer.size()) {
key_event_buffer.resize(1 + key_event_pos);
}
key_event_buffer.write[key_event_pos++] = p_event;
}
-void DisplayServerOSX::update_im_text(const Point2i &p_selection, const String &p_text) {
+void DisplayServerMacOS::update_im_text(const Point2i &p_selection, const String &p_text) {
im_selection = p_selection;
im_text = p_text;
OS::get_singleton()->get_main_loop()->notification(MainLoop::NOTIFICATION_OS_IME_UPDATE);
}
-void DisplayServerOSX::set_last_focused_window(WindowID p_window) {
+void DisplayServerMacOS::set_last_focused_window(WindowID p_window) {
last_focused_window = p_window;
}
-void DisplayServerOSX::set_is_resizing(bool p_is_resizing) {
+void DisplayServerMacOS::set_is_resizing(bool p_is_resizing) {
is_resizing = p_is_resizing;
}
-bool DisplayServerOSX::get_is_resizing() const {
+bool DisplayServerMacOS::get_is_resizing() const {
return is_resizing;
}
-void DisplayServerOSX::window_update(WindowID p_window) {
+void DisplayServerMacOS::window_update(WindowID p_window) {
#if defined(GLES3_ENABLED)
if (gl_manager) {
gl_manager->window_update(p_window);
@@ -656,7 +656,7 @@ void DisplayServerOSX::window_update(WindowID p_window) {
#endif
}
-void DisplayServerOSX::window_destroy(WindowID p_window) {
+void DisplayServerMacOS::window_destroy(WindowID p_window) {
#if defined(GLES3_ENABLED)
if (gl_manager) {
gl_manager->window_destroy(p_window);
@@ -670,7 +670,7 @@ void DisplayServerOSX::window_destroy(WindowID p_window) {
windows.erase(p_window);
}
-void DisplayServerOSX::window_resize(WindowID p_window, int p_width, int p_height) {
+void DisplayServerMacOS::window_resize(WindowID p_window, int p_width, int p_height) {
#if defined(GLES3_ENABLED)
if (gl_manager) {
gl_manager->window_resize(p_window, p_width, p_height);
@@ -683,7 +683,7 @@ void DisplayServerOSX::window_resize(WindowID p_window, int p_width, int p_heigh
#endif
}
-bool DisplayServerOSX::has_feature(Feature p_feature) const {
+bool DisplayServerMacOS::has_feature(Feature p_feature) const {
switch (p_feature) {
case FEATURE_GLOBAL_MENU:
case FEATURE_SUBWINDOWS:
@@ -709,16 +709,16 @@ bool DisplayServerOSX::has_feature(Feature p_feature) const {
return false;
}
-String DisplayServerOSX::get_name() const {
- return "OSX";
+String DisplayServerMacOS::get_name() const {
+ return "macOS";
}
-void DisplayServerOSX::global_menu_add_item(const String &p_menu_root, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
+void DisplayServerMacOS::global_menu_add_item(const String &p_menu_root, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
if (menu) {
- String keycode = KeyMappingOSX::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
+ String keycode = KeyMappingMacOS::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
NSMenuItem *menu_item;
if (p_index != -1) {
menu_item = [menu insertItemWithTitle:[NSString stringWithUTF8String:p_label.utf8().get_data()] action:@selector(globalMenuCallback:) keyEquivalent:[NSString stringWithUTF8String:keycode.utf8().get_data()] atIndex:p_index];
@@ -731,17 +731,17 @@ void DisplayServerOSX::global_menu_add_item(const String &p_menu_root, const Str
obj->checkable_type = CHECKABLE_TYPE_NONE;
obj->max_states = 0;
obj->state = 0;
- [menu_item setKeyEquivalentModifierMask:KeyMappingOSX::keycode_get_native_mask(p_accel)];
+ [menu_item setKeyEquivalentModifierMask:KeyMappingMacOS::keycode_get_native_mask(p_accel)];
[menu_item setRepresentedObject:obj];
}
}
-void DisplayServerOSX::global_menu_add_check_item(const String &p_menu_root, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
+void DisplayServerMacOS::global_menu_add_check_item(const String &p_menu_root, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
if (menu) {
- String keycode = KeyMappingOSX::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
+ String keycode = KeyMappingMacOS::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
NSMenuItem *menu_item;
if (p_index != -1) {
menu_item = [menu insertItemWithTitle:[NSString stringWithUTF8String:p_label.utf8().get_data()] action:@selector(globalMenuCallback:) keyEquivalent:[NSString stringWithUTF8String:keycode.utf8().get_data()] atIndex:p_index];
@@ -754,17 +754,17 @@ void DisplayServerOSX::global_menu_add_check_item(const String &p_menu_root, con
obj->checkable_type = CHECKABLE_TYPE_CHECK_BOX;
obj->max_states = 0;
obj->state = 0;
- [menu_item setKeyEquivalentModifierMask:KeyMappingOSX::keycode_get_native_mask(p_accel)];
+ [menu_item setKeyEquivalentModifierMask:KeyMappingMacOS::keycode_get_native_mask(p_accel)];
[menu_item setRepresentedObject:obj];
}
}
-void DisplayServerOSX::global_menu_add_icon_item(const String &p_menu_root, const Ref<Texture2D> &p_icon, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
+void DisplayServerMacOS::global_menu_add_icon_item(const String &p_menu_root, const Ref<Texture2D> &p_icon, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
if (menu) {
- String keycode = KeyMappingOSX::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
+ String keycode = KeyMappingMacOS::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
NSMenuItem *menu_item;
if (p_index != -1) {
menu_item = [menu insertItemWithTitle:[NSString stringWithUTF8String:p_label.utf8().get_data()] action:@selector(globalMenuCallback:) keyEquivalent:[NSString stringWithUTF8String:keycode.utf8().get_data()] atIndex:p_index];
@@ -786,17 +786,17 @@ void DisplayServerOSX::global_menu_add_icon_item(const String &p_menu_root, cons
obj->img->resize(16, 16, Image::INTERPOLATE_LANCZOS);
[menu_item setImage:_convert_to_nsimg(obj->img)];
}
- [menu_item setKeyEquivalentModifierMask:KeyMappingOSX::keycode_get_native_mask(p_accel)];
+ [menu_item setKeyEquivalentModifierMask:KeyMappingMacOS::keycode_get_native_mask(p_accel)];
[menu_item setRepresentedObject:obj];
}
}
-void DisplayServerOSX::global_menu_add_icon_check_item(const String &p_menu_root, const Ref<Texture2D> &p_icon, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
+void DisplayServerMacOS::global_menu_add_icon_check_item(const String &p_menu_root, const Ref<Texture2D> &p_icon, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
if (menu) {
- String keycode = KeyMappingOSX::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
+ String keycode = KeyMappingMacOS::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
NSMenuItem *menu_item;
if (p_index != -1) {
menu_item = [menu insertItemWithTitle:[NSString stringWithUTF8String:p_label.utf8().get_data()] action:@selector(globalMenuCallback:) keyEquivalent:[NSString stringWithUTF8String:keycode.utf8().get_data()] atIndex:p_index];
@@ -818,17 +818,17 @@ void DisplayServerOSX::global_menu_add_icon_check_item(const String &p_menu_root
obj->img->resize(16, 16, Image::INTERPOLATE_LANCZOS);
[menu_item setImage:_convert_to_nsimg(obj->img)];
}
- [menu_item setKeyEquivalentModifierMask:KeyMappingOSX::keycode_get_native_mask(p_accel)];
+ [menu_item setKeyEquivalentModifierMask:KeyMappingMacOS::keycode_get_native_mask(p_accel)];
[menu_item setRepresentedObject:obj];
}
}
-void DisplayServerOSX::global_menu_add_radio_check_item(const String &p_menu_root, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
+void DisplayServerMacOS::global_menu_add_radio_check_item(const String &p_menu_root, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
if (menu) {
- String keycode = KeyMappingOSX::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
+ String keycode = KeyMappingMacOS::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
NSMenuItem *menu_item;
if (p_index != -1) {
menu_item = [menu insertItemWithTitle:[NSString stringWithUTF8String:p_label.utf8().get_data()] action:@selector(globalMenuCallback:) keyEquivalent:[NSString stringWithUTF8String:keycode.utf8().get_data()] atIndex:p_index];
@@ -841,17 +841,17 @@ void DisplayServerOSX::global_menu_add_radio_check_item(const String &p_menu_roo
obj->checkable_type = CHECKABLE_TYPE_RADIO_BUTTON;
obj->max_states = 0;
obj->state = 0;
- [menu_item setKeyEquivalentModifierMask:KeyMappingOSX::keycode_get_native_mask(p_accel)];
+ [menu_item setKeyEquivalentModifierMask:KeyMappingMacOS::keycode_get_native_mask(p_accel)];
[menu_item setRepresentedObject:obj];
}
}
-void DisplayServerOSX::global_menu_add_icon_radio_check_item(const String &p_menu_root, const Ref<Texture2D> &p_icon, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
+void DisplayServerMacOS::global_menu_add_icon_radio_check_item(const String &p_menu_root, const Ref<Texture2D> &p_icon, const String &p_label, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
if (menu) {
- String keycode = KeyMappingOSX::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
+ String keycode = KeyMappingMacOS::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
NSMenuItem *menu_item;
if (p_index != -1) {
menu_item = [menu insertItemWithTitle:[NSString stringWithUTF8String:p_label.utf8().get_data()] action:@selector(globalMenuCallback:) keyEquivalent:[NSString stringWithUTF8String:keycode.utf8().get_data()] atIndex:p_index];
@@ -873,17 +873,17 @@ void DisplayServerOSX::global_menu_add_icon_radio_check_item(const String &p_men
obj->img->resize(16, 16, Image::INTERPOLATE_LANCZOS);
[menu_item setImage:_convert_to_nsimg(obj->img)];
}
- [menu_item setKeyEquivalentModifierMask:KeyMappingOSX::keycode_get_native_mask(p_accel)];
+ [menu_item setKeyEquivalentModifierMask:KeyMappingMacOS::keycode_get_native_mask(p_accel)];
[menu_item setRepresentedObject:obj];
}
}
-void DisplayServerOSX::global_menu_add_multistate_item(const String &p_menu_root, const String &p_label, int p_max_states, int p_default_state, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
+void DisplayServerMacOS::global_menu_add_multistate_item(const String &p_menu_root, const String &p_label, int p_max_states, int p_default_state, const Callable &p_callback, const Variant &p_tag, Key p_accel, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
if (menu) {
- String keycode = KeyMappingOSX::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
+ String keycode = KeyMappingMacOS::keycode_get_native_string(p_accel & KeyModifierMask::CODE_MASK);
NSMenuItem *menu_item;
if (p_index != -1) {
menu_item = [menu insertItemWithTitle:[NSString stringWithUTF8String:p_label.utf8().get_data()] action:@selector(globalMenuCallback:) keyEquivalent:[NSString stringWithUTF8String:keycode.utf8().get_data()] atIndex:p_index];
@@ -896,12 +896,12 @@ void DisplayServerOSX::global_menu_add_multistate_item(const String &p_menu_root
obj->checkable_type = CHECKABLE_TYPE_NONE;
obj->max_states = p_max_states;
obj->state = p_default_state;
- [menu_item setKeyEquivalentModifierMask:KeyMappingOSX::keycode_get_native_mask(p_accel)];
+ [menu_item setKeyEquivalentModifierMask:KeyMappingMacOS::keycode_get_native_mask(p_accel)];
[menu_item setRepresentedObject:obj];
}
}
-void DisplayServerOSX::global_menu_add_submenu_item(const String &p_menu_root, const String &p_label, const String &p_submenu, int p_index) {
+void DisplayServerMacOS::global_menu_add_submenu_item(const String &p_menu_root, const String &p_label, const String &p_submenu, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -926,7 +926,7 @@ void DisplayServerOSX::global_menu_add_submenu_item(const String &p_menu_root, c
}
}
-void DisplayServerOSX::global_menu_add_separator(const String &p_menu_root, int p_index) {
+void DisplayServerMacOS::global_menu_add_separator(const String &p_menu_root, int p_index) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -939,7 +939,7 @@ void DisplayServerOSX::global_menu_add_separator(const String &p_menu_root, int
}
}
-int DisplayServerOSX::global_menu_get_item_index_from_text(const String &p_menu_root, const String &p_text) const {
+int DisplayServerMacOS::global_menu_get_item_index_from_text(const String &p_menu_root, const String &p_text) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -950,7 +950,7 @@ int DisplayServerOSX::global_menu_get_item_index_from_text(const String &p_menu_
return -1;
}
-int DisplayServerOSX::global_menu_get_item_index_from_tag(const String &p_menu_root, const Variant &p_tag) const {
+int DisplayServerMacOS::global_menu_get_item_index_from_tag(const String &p_menu_root, const Variant &p_tag) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -969,7 +969,7 @@ int DisplayServerOSX::global_menu_get_item_index_from_tag(const String &p_menu_r
return -1;
}
-bool DisplayServerOSX::global_menu_is_item_checked(const String &p_menu_root, int p_idx) const {
+bool DisplayServerMacOS::global_menu_is_item_checked(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -982,7 +982,7 @@ bool DisplayServerOSX::global_menu_is_item_checked(const String &p_menu_root, in
return false;
}
-bool DisplayServerOSX::global_menu_is_item_checkable(const String &p_menu_root, int p_idx) const {
+bool DisplayServerMacOS::global_menu_is_item_checkable(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -998,7 +998,7 @@ bool DisplayServerOSX::global_menu_is_item_checkable(const String &p_menu_root,
return false;
}
-bool DisplayServerOSX::global_menu_is_item_radio_checkable(const String &p_menu_root, int p_idx) const {
+bool DisplayServerMacOS::global_menu_is_item_radio_checkable(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1014,7 +1014,7 @@ bool DisplayServerOSX::global_menu_is_item_radio_checkable(const String &p_menu_
return false;
}
-Callable DisplayServerOSX::global_menu_get_item_callback(const String &p_menu_root, int p_idx) const {
+Callable DisplayServerMacOS::global_menu_get_item_callback(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1030,7 +1030,7 @@ Callable DisplayServerOSX::global_menu_get_item_callback(const String &p_menu_ro
return Callable();
}
-Variant DisplayServerOSX::global_menu_get_item_tag(const String &p_menu_root, int p_idx) const {
+Variant DisplayServerMacOS::global_menu_get_item_tag(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1046,7 +1046,7 @@ Variant DisplayServerOSX::global_menu_get_item_tag(const String &p_menu_root, in
return Variant();
}
-String DisplayServerOSX::global_menu_get_item_text(const String &p_menu_root, int p_idx) const {
+String DisplayServerMacOS::global_menu_get_item_text(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1059,7 +1059,7 @@ String DisplayServerOSX::global_menu_get_item_text(const String &p_menu_root, in
return String();
}
-String DisplayServerOSX::global_menu_get_item_submenu(const String &p_menu_root, int p_idx) const {
+String DisplayServerMacOS::global_menu_get_item_submenu(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1079,7 +1079,7 @@ String DisplayServerOSX::global_menu_get_item_submenu(const String &p_menu_root,
return String();
}
-Key DisplayServerOSX::global_menu_get_item_accelerator(const String &p_menu_root, int p_idx) const {
+Key DisplayServerMacOS::global_menu_get_item_accelerator(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1110,7 +1110,7 @@ Key DisplayServerOSX::global_menu_get_item_accelerator(const String &p_menu_root
return Key::NONE;
}
-bool DisplayServerOSX::global_menu_is_item_disabled(const String &p_menu_root, int p_idx) const {
+bool DisplayServerMacOS::global_menu_is_item_disabled(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1123,7 +1123,7 @@ bool DisplayServerOSX::global_menu_is_item_disabled(const String &p_menu_root, i
return false;
}
-String DisplayServerOSX::global_menu_get_item_tooltip(const String &p_menu_root, int p_idx) const {
+String DisplayServerMacOS::global_menu_get_item_tooltip(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1136,7 +1136,7 @@ String DisplayServerOSX::global_menu_get_item_tooltip(const String &p_menu_root,
return String();
}
-int DisplayServerOSX::global_menu_get_item_state(const String &p_menu_root, int p_idx) const {
+int DisplayServerMacOS::global_menu_get_item_state(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1152,7 +1152,7 @@ int DisplayServerOSX::global_menu_get_item_state(const String &p_menu_root, int
return 0;
}
-int DisplayServerOSX::global_menu_get_item_max_states(const String &p_menu_root, int p_idx) const {
+int DisplayServerMacOS::global_menu_get_item_max_states(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1168,7 +1168,7 @@ int DisplayServerOSX::global_menu_get_item_max_states(const String &p_menu_root,
return 0;
}
-Ref<Texture2D> DisplayServerOSX::global_menu_get_item_icon(const String &p_menu_root, int p_idx) const {
+Ref<Texture2D> DisplayServerMacOS::global_menu_get_item_icon(const String &p_menu_root, int p_idx) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1186,7 +1186,7 @@ Ref<Texture2D> DisplayServerOSX::global_menu_get_item_icon(const String &p_menu_
return Ref<Texture2D>();
}
-void DisplayServerOSX::global_menu_set_item_checked(const String &p_menu_root, int p_idx, bool p_checked) {
+void DisplayServerMacOS::global_menu_set_item_checked(const String &p_menu_root, int p_idx, bool p_checked) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1205,7 +1205,7 @@ void DisplayServerOSX::global_menu_set_item_checked(const String &p_menu_root, i
}
}
-void DisplayServerOSX::global_menu_set_item_checkable(const String &p_menu_root, int p_idx, bool p_checkable) {
+void DisplayServerMacOS::global_menu_set_item_checkable(const String &p_menu_root, int p_idx, bool p_checkable) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1221,7 +1221,7 @@ void DisplayServerOSX::global_menu_set_item_checkable(const String &p_menu_root,
}
}
-void DisplayServerOSX::global_menu_set_item_radio_checkable(const String &p_menu_root, int p_idx, bool p_checkable) {
+void DisplayServerMacOS::global_menu_set_item_radio_checkable(const String &p_menu_root, int p_idx, bool p_checkable) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1237,7 +1237,7 @@ void DisplayServerOSX::global_menu_set_item_radio_checkable(const String &p_menu
}
}
-void DisplayServerOSX::global_menu_set_item_callback(const String &p_menu_root, int p_idx, const Callable &p_callback) {
+void DisplayServerMacOS::global_menu_set_item_callback(const String &p_menu_root, int p_idx, const Callable &p_callback) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1253,7 +1253,7 @@ void DisplayServerOSX::global_menu_set_item_callback(const String &p_menu_root,
}
}
-void DisplayServerOSX::global_menu_set_item_tag(const String &p_menu_root, int p_idx, const Variant &p_tag) {
+void DisplayServerMacOS::global_menu_set_item_tag(const String &p_menu_root, int p_idx, const Variant &p_tag) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1269,7 +1269,7 @@ void DisplayServerOSX::global_menu_set_item_tag(const String &p_menu_root, int p
}
}
-void DisplayServerOSX::global_menu_set_item_text(const String &p_menu_root, int p_idx, const String &p_text) {
+void DisplayServerMacOS::global_menu_set_item_text(const String &p_menu_root, int p_idx, const String &p_text) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1284,7 +1284,7 @@ void DisplayServerOSX::global_menu_set_item_text(const String &p_menu_root, int
}
}
-void DisplayServerOSX::global_menu_set_item_submenu(const String &p_menu_root, int p_idx, const String &p_submenu) {
+void DisplayServerMacOS::global_menu_set_item_submenu(const String &p_menu_root, int p_idx, const String &p_submenu) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1308,7 +1308,7 @@ void DisplayServerOSX::global_menu_set_item_submenu(const String &p_menu_root, i
}
}
-void DisplayServerOSX::global_menu_set_item_accelerator(const String &p_menu_root, int p_idx, Key p_keycode) {
+void DisplayServerMacOS::global_menu_set_item_accelerator(const String &p_menu_root, int p_idx, Key p_keycode) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1318,14 +1318,14 @@ void DisplayServerOSX::global_menu_set_item_accelerator(const String &p_menu_roo
}
NSMenuItem *menu_item = [menu itemAtIndex:p_idx];
if (menu_item) {
- [menu_item setKeyEquivalentModifierMask:KeyMappingOSX::keycode_get_native_mask(p_keycode)];
- String keycode = KeyMappingOSX::keycode_get_native_string(p_keycode & KeyModifierMask::CODE_MASK);
+ [menu_item setKeyEquivalentModifierMask:KeyMappingMacOS::keycode_get_native_mask(p_keycode)];
+ String keycode = KeyMappingMacOS::keycode_get_native_string(p_keycode & KeyModifierMask::CODE_MASK);
[menu_item setKeyEquivalent:[NSString stringWithUTF8String:keycode.utf8().get_data()]];
}
}
}
-void DisplayServerOSX::global_menu_set_item_disabled(const String &p_menu_root, int p_idx, bool p_disabled) {
+void DisplayServerMacOS::global_menu_set_item_disabled(const String &p_menu_root, int p_idx, bool p_disabled) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1340,7 +1340,7 @@ void DisplayServerOSX::global_menu_set_item_disabled(const String &p_menu_root,
}
}
-void DisplayServerOSX::global_menu_set_item_tooltip(const String &p_menu_root, int p_idx, const String &p_tooltip) {
+void DisplayServerMacOS::global_menu_set_item_tooltip(const String &p_menu_root, int p_idx, const String &p_tooltip) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1355,7 +1355,7 @@ void DisplayServerOSX::global_menu_set_item_tooltip(const String &p_menu_root, i
}
}
-void DisplayServerOSX::global_menu_set_item_state(const String &p_menu_root, int p_idx, int p_state) {
+void DisplayServerMacOS::global_menu_set_item_state(const String &p_menu_root, int p_idx, int p_state) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1373,7 +1373,7 @@ void DisplayServerOSX::global_menu_set_item_state(const String &p_menu_root, int
}
}
-void DisplayServerOSX::global_menu_set_item_max_states(const String &p_menu_root, int p_idx, int p_max_states) {
+void DisplayServerMacOS::global_menu_set_item_max_states(const String &p_menu_root, int p_idx, int p_max_states) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1391,7 +1391,7 @@ void DisplayServerOSX::global_menu_set_item_max_states(const String &p_menu_root
}
}
-void DisplayServerOSX::global_menu_set_item_icon(const String &p_menu_root, int p_idx, const Ref<Texture2D> &p_icon) {
+void DisplayServerMacOS::global_menu_set_item_icon(const String &p_menu_root, int p_idx, const Ref<Texture2D> &p_icon) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1418,7 +1418,7 @@ void DisplayServerOSX::global_menu_set_item_icon(const String &p_menu_root, int
}
}
-int DisplayServerOSX::global_menu_get_item_count(const String &p_menu_root) const {
+int DisplayServerMacOS::global_menu_get_item_count(const String &p_menu_root) const {
_THREAD_SAFE_METHOD_
const NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1429,7 +1429,7 @@ int DisplayServerOSX::global_menu_get_item_count(const String &p_menu_root) cons
}
}
-void DisplayServerOSX::global_menu_remove_item(const String &p_menu_root, int p_idx) {
+void DisplayServerMacOS::global_menu_remove_item(const String &p_menu_root, int p_idx) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1441,7 +1441,7 @@ void DisplayServerOSX::global_menu_remove_item(const String &p_menu_root, int p_
}
}
-void DisplayServerOSX::global_menu_clear(const String &p_menu_root) {
+void DisplayServerMacOS::global_menu_clear(const String &p_menu_root) {
_THREAD_SAFE_METHOD_
NSMenu *menu = _get_menu_root(p_menu_root);
@@ -1455,42 +1455,42 @@ void DisplayServerOSX::global_menu_clear(const String &p_menu_root) {
}
}
-bool DisplayServerOSX::tts_is_speaking() const {
+bool DisplayServerMacOS::tts_is_speaking() const {
ERR_FAIL_COND_V(!tts, false);
return [tts isSpeaking];
}
-bool DisplayServerOSX::tts_is_paused() const {
+bool DisplayServerMacOS::tts_is_paused() const {
ERR_FAIL_COND_V(!tts, false);
return [tts isPaused];
}
-Array DisplayServerOSX::tts_get_voices() const {
+Array DisplayServerMacOS::tts_get_voices() const {
ERR_FAIL_COND_V(!tts, Array());
return [tts getVoices];
}
-void DisplayServerOSX::tts_speak(const String &p_text, const String &p_voice, int p_volume, float p_pitch, float p_rate, int p_utterance_id, bool p_interrupt) {
+void DisplayServerMacOS::tts_speak(const String &p_text, const String &p_voice, int p_volume, float p_pitch, float p_rate, int p_utterance_id, bool p_interrupt) {
ERR_FAIL_COND(!tts);
[tts speak:p_text voice:p_voice volume:p_volume pitch:p_pitch rate:p_rate utterance_id:p_utterance_id interrupt:p_interrupt];
}
-void DisplayServerOSX::tts_pause() {
+void DisplayServerMacOS::tts_pause() {
ERR_FAIL_COND(!tts);
[tts pauseSpeaking];
}
-void DisplayServerOSX::tts_resume() {
+void DisplayServerMacOS::tts_resume() {
ERR_FAIL_COND(!tts);
[tts resumeSpeaking];
}
-void DisplayServerOSX::tts_stop() {
+void DisplayServerMacOS::tts_stop() {
ERR_FAIL_COND(!tts);
[tts stopSpeaking];
}
-Error DisplayServerOSX::dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) {
+Error DisplayServerMacOS::dialog_show(String p_title, String p_description, Vector<String> p_buttons, const Callable &p_callback) {
_THREAD_SAFE_METHOD_
NSAlert *window = [[NSAlert alloc] init];
@@ -1528,7 +1528,7 @@ Error DisplayServerOSX::dialog_show(String p_title, String p_description, Vector
return OK;
}
-Error DisplayServerOSX::dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) {
+Error DisplayServerMacOS::dialog_input_text(String p_title, String p_description, String p_partial, const Callable &p_callback) {
_THREAD_SAFE_METHOD_
NSAlert *window = [[NSAlert alloc] init];
@@ -1560,7 +1560,7 @@ Error DisplayServerOSX::dialog_input_text(String p_title, String p_description,
return OK;
}
-void DisplayServerOSX::mouse_set_mode(MouseMode p_mode) {
+void DisplayServerMacOS::mouse_set_mode(MouseMode p_mode) {
_THREAD_SAFE_METHOD_
if (p_mode == mouse_mode) {
@@ -1615,11 +1615,11 @@ void DisplayServerOSX::mouse_set_mode(MouseMode p_mode) {
}
}
-DisplayServer::MouseMode DisplayServerOSX::mouse_get_mode() const {
+DisplayServer::MouseMode DisplayServerMacOS::mouse_get_mode() const {
return mouse_mode;
}
-bool DisplayServerOSX::update_mouse_wrap(WindowData &p_wd, NSPoint &r_delta, NSPoint &r_mpos, NSTimeInterval p_timestamp) {
+bool DisplayServerMacOS::update_mouse_wrap(WindowData &p_wd, NSPoint &r_delta, NSPoint &r_mpos, NSTimeInterval p_timestamp) {
_THREAD_SAFE_METHOD_
if (ignore_warp) {
@@ -1641,7 +1641,7 @@ bool DisplayServerOSX::update_mouse_wrap(WindowData &p_wd, NSPoint &r_delta, NSP
List<WarpEvent>::Element *F = warp_events.front();
while (F) {
if (F->get().timestamp < p_timestamp) {
- List<DisplayServerOSX::WarpEvent>::Element *E = F;
+ List<DisplayServerMacOS::WarpEvent>::Element *E = F;
r_delta.x -= E->get().delta.x;
r_delta.y -= E->get().delta.y;
F = F->next();
@@ -1669,7 +1669,7 @@ bool DisplayServerOSX::update_mouse_wrap(WindowData &p_wd, NSPoint &r_delta, NSP
// Save warp data.
last_warp = [[NSProcessInfo processInfo] systemUptime];
- DisplayServerOSX::WarpEvent ev;
+ DisplayServerMacOS::WarpEvent ev;
ev.timestamp = last_warp;
ev.delta = r_delta;
warp_events.push_back(ev);
@@ -1678,7 +1678,7 @@ bool DisplayServerOSX::update_mouse_wrap(WindowData &p_wd, NSPoint &r_delta, NSP
return false;
}
-void DisplayServerOSX::warp_mouse(const Point2i &p_position) {
+void DisplayServerMacOS::warp_mouse(const Point2i &p_position) {
_THREAD_SAFE_METHOD_
if (mouse_mode != MOUSE_MODE_CAPTURED) {
@@ -1705,7 +1705,7 @@ void DisplayServerOSX::warp_mouse(const Point2i &p_position) {
}
}
-Point2i DisplayServerOSX::mouse_get_position() const {
+Point2i DisplayServerMacOS::mouse_get_position() const {
_THREAD_SAFE_METHOD_
const NSPoint mouse_pos = [NSEvent mouseLocation];
@@ -1724,15 +1724,15 @@ Point2i DisplayServerOSX::mouse_get_position() const {
return Vector2i();
}
-void DisplayServerOSX::mouse_set_button_state(MouseButton p_state) {
+void DisplayServerMacOS::mouse_set_button_state(MouseButton p_state) {
last_button_state = p_state;
}
-MouseButton DisplayServerOSX::mouse_get_button_state() const {
+MouseButton DisplayServerMacOS::mouse_get_button_state() const {
return last_button_state;
}
-void DisplayServerOSX::clipboard_set(const String &p_text) {
+void DisplayServerMacOS::clipboard_set(const String &p_text) {
_THREAD_SAFE_METHOD_
NSString *copiedString = [NSString stringWithUTF8String:p_text.utf8().get_data()];
@@ -1743,7 +1743,7 @@ void DisplayServerOSX::clipboard_set(const String &p_text) {
[pasteboard writeObjects:copiedStringArray];
}
-String DisplayServerOSX::clipboard_get() const {
+String DisplayServerMacOS::clipboard_get() const {
_THREAD_SAFE_METHOD_
NSPasteboard *pasteboard = [NSPasteboard generalPasteboard];
@@ -1764,14 +1764,14 @@ String DisplayServerOSX::clipboard_get() const {
return ret;
}
-int DisplayServerOSX::get_screen_count() const {
+int DisplayServerMacOS::get_screen_count() const {
_THREAD_SAFE_METHOD_
NSArray *screenArray = [NSScreen screens];
return [screenArray count];
}
-Point2i DisplayServerOSX::screen_get_position(int p_screen) const {
+Point2i DisplayServerMacOS::screen_get_position(int p_screen) const {
_THREAD_SAFE_METHOD_
if (p_screen == SCREEN_OF_MAIN_WINDOW) {
@@ -1785,7 +1785,7 @@ Point2i DisplayServerOSX::screen_get_position(int p_screen) const {
return position;
}
-Size2i DisplayServerOSX::screen_get_size(int p_screen) const {
+Size2i DisplayServerMacOS::screen_get_size(int p_screen) const {
_THREAD_SAFE_METHOD_
if (p_screen == SCREEN_OF_MAIN_WINDOW) {
@@ -1802,7 +1802,7 @@ Size2i DisplayServerOSX::screen_get_size(int p_screen) const {
return Size2i();
}
-int DisplayServerOSX::screen_get_dpi(int p_screen) const {
+int DisplayServerMacOS::screen_get_dpi(int p_screen) const {
_THREAD_SAFE_METHOD_
if (p_screen == SCREEN_OF_MAIN_WINDOW) {
@@ -1826,7 +1826,7 @@ int DisplayServerOSX::screen_get_dpi(int p_screen) const {
return 72;
}
-float DisplayServerOSX::screen_get_scale(int p_screen) const {
+float DisplayServerMacOS::screen_get_scale(int p_screen) const {
_THREAD_SAFE_METHOD_
if (p_screen == SCREEN_OF_MAIN_WINDOW) {
@@ -1844,14 +1844,14 @@ float DisplayServerOSX::screen_get_scale(int p_screen) const {
return 1.f;
}
-float DisplayServerOSX::screen_get_max_scale() const {
+float DisplayServerMacOS::screen_get_max_scale() const {
_THREAD_SAFE_METHOD_
// Note: Do not update max display scale on screen configuration change, existing editor windows can't be rescaled on the fly.
return display_max_scale;
}
-Rect2i DisplayServerOSX::screen_get_usable_rect(int p_screen) const {
+Rect2i DisplayServerMacOS::screen_get_usable_rect(int p_screen) const {
_THREAD_SAFE_METHOD_
if (p_screen == SCREEN_OF_MAIN_WINDOW) {
@@ -1873,7 +1873,7 @@ Rect2i DisplayServerOSX::screen_get_usable_rect(int p_screen) const {
return Rect2i();
}
-float DisplayServerOSX::screen_get_refresh_rate(int p_screen) const {
+float DisplayServerMacOS::screen_get_refresh_rate(int p_screen) const {
_THREAD_SAFE_METHOD_
if (p_screen == SCREEN_OF_MAIN_WINDOW) {
@@ -1891,7 +1891,7 @@ float DisplayServerOSX::screen_get_refresh_rate(int p_screen) const {
return SCREEN_REFRESH_RATE_FALLBACK;
}
-Vector<DisplayServer::WindowID> DisplayServerOSX::get_window_list() const {
+Vector<DisplayServer::WindowID> DisplayServerMacOS::get_window_list() const {
_THREAD_SAFE_METHOD_
Vector<int> ret;
@@ -1901,7 +1901,7 @@ Vector<DisplayServer::WindowID> DisplayServerOSX::get_window_list() const {
return ret;
}
-DisplayServer::WindowID DisplayServerOSX::create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect) {
+DisplayServer::WindowID DisplayServerMacOS::create_sub_window(WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Rect2i &p_rect) {
_THREAD_SAFE_METHOD_
WindowID id = _create_window(p_mode, p_vsync_mode, p_rect);
@@ -1914,7 +1914,7 @@ DisplayServer::WindowID DisplayServerOSX::create_sub_window(WindowMode p_mode, V
return id;
}
-void DisplayServerOSX::show_window(WindowID p_id) {
+void DisplayServerMacOS::show_window(WindowID p_id) {
WindowData &wd = windows[p_id];
popup_open(p_id);
@@ -1925,7 +1925,7 @@ void DisplayServerOSX::show_window(WindowID p_id) {
}
}
-void DisplayServerOSX::delete_sub_window(WindowID p_id) {
+void DisplayServerMacOS::delete_sub_window(WindowID p_id) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_id));
@@ -1937,7 +1937,7 @@ void DisplayServerOSX::delete_sub_window(WindowID p_id) {
[wd.window_object close];
}
-void DisplayServerOSX::window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerMacOS::window_set_rect_changed_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -1945,7 +1945,7 @@ void DisplayServerOSX::window_set_rect_changed_callback(const Callable &p_callab
wd.rect_changed_callback = p_callable;
}
-void DisplayServerOSX::window_set_window_event_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerMacOS::window_set_window_event_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -1953,7 +1953,7 @@ void DisplayServerOSX::window_set_window_event_callback(const Callable &p_callab
wd.event_callback = p_callable;
}
-void DisplayServerOSX::window_set_input_event_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerMacOS::window_set_input_event_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -1961,21 +1961,21 @@ void DisplayServerOSX::window_set_input_event_callback(const Callable &p_callabl
wd.input_event_callback = p_callable;
}
-void DisplayServerOSX::window_set_input_text_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerMacOS::window_set_input_text_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
wd.input_text_callback = p_callable;
}
-void DisplayServerOSX::window_set_drop_files_callback(const Callable &p_callable, WindowID p_window) {
+void DisplayServerMacOS::window_set_drop_files_callback(const Callable &p_callable, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
wd.drop_files_callback = p_callable;
}
-void DisplayServerOSX::window_set_title(const String &p_title, WindowID p_window) {
+void DisplayServerMacOS::window_set_title(const String &p_title, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -1984,7 +1984,7 @@ void DisplayServerOSX::window_set_title(const String &p_title, WindowID p_window
[wd.window_object setTitle:[NSString stringWithUTF8String:p_title.utf8().get_data()]];
}
-void DisplayServerOSX::window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window) {
+void DisplayServerMacOS::window_set_mouse_passthrough(const Vector<Vector2> &p_region, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -1993,7 +1993,7 @@ void DisplayServerOSX::window_set_mouse_passthrough(const Vector<Vector2> &p_reg
wd.mpath = p_region;
}
-int DisplayServerOSX::window_get_current_screen(WindowID p_window) const {
+int DisplayServerMacOS::window_get_current_screen(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), -1);
const WindowData &wd = windows[p_window];
@@ -2002,7 +2002,7 @@ int DisplayServerOSX::window_get_current_screen(WindowID p_window) const {
return (index == NSNotFound) ? 0 : index;
}
-void DisplayServerOSX::window_set_current_screen(int p_screen, WindowID p_window) {
+void DisplayServerMacOS::window_set_current_screen(int p_screen, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2028,7 +2028,7 @@ void DisplayServerOSX::window_set_current_screen(int p_screen, WindowID p_window
}
}
-void DisplayServerOSX::window_set_exclusive(WindowID p_window, bool p_exclusive) {
+void DisplayServerMacOS::window_set_exclusive(WindowID p_window, bool p_exclusive) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
WindowData &wd = windows[p_window];
@@ -2046,7 +2046,7 @@ void DisplayServerOSX::window_set_exclusive(WindowID p_window, bool p_exclusive)
}
}
-Point2i DisplayServerOSX::window_get_position(WindowID p_window) const {
+Point2i DisplayServerMacOS::window_get_position(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Point2i());
@@ -2069,7 +2069,7 @@ Point2i DisplayServerOSX::window_get_position(WindowID p_window) const {
return pos;
}
-void DisplayServerOSX::window_set_position(const Point2i &p_position, WindowID p_window) {
+void DisplayServerMacOS::window_set_position(const Point2i &p_position, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2097,7 +2097,7 @@ void DisplayServerOSX::window_set_position(const Point2i &p_position, WindowID p
update_mouse_pos(wd, [wd.window_object mouseLocationOutsideOfEventStream]);
}
-void DisplayServerOSX::window_set_transient(WindowID p_window, WindowID p_parent) {
+void DisplayServerMacOS::window_set_transient(WindowID p_window, WindowID p_parent) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(p_window == p_parent);
@@ -2136,7 +2136,7 @@ void DisplayServerOSX::window_set_transient(WindowID p_window, WindowID p_parent
}
}
-void DisplayServerOSX::window_set_max_size(const Size2i p_size, WindowID p_window) {
+void DisplayServerMacOS::window_set_max_size(const Size2i p_size, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2156,7 +2156,7 @@ void DisplayServerOSX::window_set_max_size(const Size2i p_size, WindowID p_windo
}
}
-Size2i DisplayServerOSX::window_get_max_size(WindowID p_window) const {
+Size2i DisplayServerMacOS::window_get_max_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
@@ -2164,7 +2164,7 @@ Size2i DisplayServerOSX::window_get_max_size(WindowID p_window) const {
return wd.max_size;
}
-void DisplayServerOSX::window_set_min_size(const Size2i p_size, WindowID p_window) {
+void DisplayServerMacOS::window_set_min_size(const Size2i p_size, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2184,7 +2184,7 @@ void DisplayServerOSX::window_set_min_size(const Size2i p_size, WindowID p_windo
}
}
-Size2i DisplayServerOSX::window_get_min_size(WindowID p_window) const {
+Size2i DisplayServerMacOS::window_get_min_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
@@ -2193,7 +2193,7 @@ Size2i DisplayServerOSX::window_get_min_size(WindowID p_window) const {
return wd.min_size;
}
-void DisplayServerOSX::window_set_size(const Size2i p_size, WindowID p_window) {
+void DisplayServerMacOS::window_set_size(const Size2i p_size, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2217,7 +2217,7 @@ void DisplayServerOSX::window_set_size(const Size2i p_size, WindowID p_window) {
_update_window_style(wd);
}
-Size2i DisplayServerOSX::window_get_size(WindowID p_window) const {
+Size2i DisplayServerMacOS::window_get_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
@@ -2225,7 +2225,7 @@ Size2i DisplayServerOSX::window_get_size(WindowID p_window) const {
return wd.size;
}
-Size2i DisplayServerOSX::window_get_real_size(WindowID p_window) const {
+Size2i DisplayServerMacOS::window_get_real_size(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Size2i());
@@ -2234,7 +2234,7 @@ Size2i DisplayServerOSX::window_get_real_size(WindowID p_window) const {
return Size2i(frame.size.width, frame.size.height) * screen_get_max_scale();
}
-void DisplayServerOSX::window_set_mode(WindowMode p_mode, WindowID p_window) {
+void DisplayServerMacOS::window_set_mode(WindowMode p_mode, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2303,7 +2303,7 @@ void DisplayServerOSX::window_set_mode(WindowMode p_mode, WindowID p_window) {
}
}
-DisplayServer::WindowMode DisplayServerOSX::window_get_mode(WindowID p_window) const {
+DisplayServer::WindowMode DisplayServerMacOS::window_get_mode(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), WINDOW_MODE_WINDOWED);
@@ -2325,11 +2325,11 @@ DisplayServer::WindowMode DisplayServerOSX::window_get_mode(WindowID p_window) c
return WINDOW_MODE_WINDOWED;
}
-bool DisplayServerOSX::window_is_maximize_allowed(WindowID p_window) const {
+bool DisplayServerMacOS::window_is_maximize_allowed(WindowID p_window) const {
return true;
}
-void DisplayServerOSX::window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window) {
+void DisplayServerMacOS::window_set_flag(WindowFlags p_flag, bool p_enabled, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2404,7 +2404,7 @@ void DisplayServerOSX::window_set_flag(WindowFlags p_flag, bool p_enabled, Windo
}
}
-bool DisplayServerOSX::window_get_flag(WindowFlags p_flag, WindowID p_window) const {
+bool DisplayServerMacOS::window_get_flag(WindowFlags p_flag, WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), false);
@@ -2440,12 +2440,12 @@ bool DisplayServerOSX::window_get_flag(WindowFlags p_flag, WindowID p_window) co
return false;
}
-void DisplayServerOSX::window_request_attention(WindowID p_window) {
+void DisplayServerMacOS::window_request_attention(WindowID p_window) {
// It's app global, ignore window id.
[NSApp requestUserAttention:NSCriticalRequest];
}
-void DisplayServerOSX::window_move_to_foreground(WindowID p_window) {
+void DisplayServerMacOS::window_move_to_foreground(WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2459,11 +2459,11 @@ void DisplayServerOSX::window_move_to_foreground(WindowID p_window) {
}
}
-bool DisplayServerOSX::window_can_draw(WindowID p_window) const {
+bool DisplayServerMacOS::window_can_draw(WindowID p_window) const {
return window_get_mode(p_window) != WINDOW_MODE_MINIMIZED;
}
-bool DisplayServerOSX::can_any_window_draw() const {
+bool DisplayServerMacOS::can_any_window_draw() const {
_THREAD_SAFE_METHOD_
for (const KeyValue<WindowID, WindowData> &E : windows) {
@@ -2474,7 +2474,7 @@ bool DisplayServerOSX::can_any_window_draw() const {
return false;
}
-void DisplayServerOSX::window_set_ime_active(const bool p_active, WindowID p_window) {
+void DisplayServerMacOS::window_set_ime_active(const bool p_active, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2487,7 +2487,7 @@ void DisplayServerOSX::window_set_ime_active(const bool p_active, WindowID p_win
}
}
-void DisplayServerOSX::window_set_ime_position(const Point2i &p_pos, WindowID p_window) {
+void DisplayServerMacOS::window_set_ime_position(const Point2i &p_pos, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -2496,7 +2496,7 @@ void DisplayServerOSX::window_set_ime_position(const Point2i &p_pos, WindowID p_
wd.im_position = p_pos;
}
-DisplayServer::WindowID DisplayServerOSX::get_window_at_screen_position(const Point2i &p_position) const {
+DisplayServer::WindowID DisplayServerMacOS::get_window_at_screen_position(const Point2i &p_position) const {
Point2i position = p_position;
position.y *= -1;
position += _get_screens_origin();
@@ -2511,7 +2511,7 @@ DisplayServer::WindowID DisplayServerOSX::get_window_at_screen_position(const Po
return INVALID_WINDOW_ID;
}
-int64_t DisplayServerOSX::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
+int64_t DisplayServerMacOS::window_get_native_handle(HandleType p_handle_type, WindowID p_window) const {
ERR_FAIL_COND_V(!windows.has(p_window), 0);
switch (p_handle_type) {
case DISPLAY_HANDLE: {
@@ -2529,27 +2529,27 @@ int64_t DisplayServerOSX::window_get_native_handle(HandleType p_handle_type, Win
}
}
-void DisplayServerOSX::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
+void DisplayServerMacOS::window_attach_instance_id(ObjectID p_instance, WindowID p_window) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
windows[p_window].instance_id = p_instance;
}
-ObjectID DisplayServerOSX::window_get_attached_instance_id(WindowID p_window) const {
+ObjectID DisplayServerMacOS::window_get_attached_instance_id(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), ObjectID());
return windows[p_window].instance_id;
}
-void DisplayServerOSX::gl_window_make_current(DisplayServer::WindowID p_window_id) {
+void DisplayServerMacOS::gl_window_make_current(DisplayServer::WindowID p_window_id) {
#if defined(GLES3_ENABLED)
gl_manager->window_make_current(p_window_id);
#endif
}
-void DisplayServerOSX::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
+void DisplayServerMacOS::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mode, WindowID p_window) {
_THREAD_SAFE_METHOD_
#if defined(GLES3_ENABLED)
if (gl_manager) {
@@ -2563,7 +2563,7 @@ void DisplayServerOSX::window_set_vsync_mode(DisplayServer::VSyncMode p_vsync_mo
#endif
}
-DisplayServer::VSyncMode DisplayServerOSX::window_get_vsync_mode(WindowID p_window) const {
+DisplayServer::VSyncMode DisplayServerMacOS::window_get_vsync_mode(WindowID p_window) const {
_THREAD_SAFE_METHOD_
#if defined(GLES3_ENABLED)
if (gl_manager) {
@@ -2578,15 +2578,15 @@ DisplayServer::VSyncMode DisplayServerOSX::window_get_vsync_mode(WindowID p_wind
return DisplayServer::VSYNC_ENABLED;
}
-Point2i DisplayServerOSX::ime_get_selection() const {
+Point2i DisplayServerMacOS::ime_get_selection() const {
return im_selection;
}
-String DisplayServerOSX::ime_get_text() const {
+String DisplayServerMacOS::ime_get_text() const {
return im_text;
}
-void DisplayServerOSX::cursor_update_shape() {
+void DisplayServerMacOS::cursor_update_shape() {
_THREAD_SAFE_METHOD_
if (cursors[cursor_shape] != nullptr) {
@@ -2650,7 +2650,7 @@ void DisplayServerOSX::cursor_update_shape() {
}
}
-void DisplayServerOSX::cursor_set_shape(CursorShape p_shape) {
+void DisplayServerMacOS::cursor_set_shape(CursorShape p_shape) {
_THREAD_SAFE_METHOD_
ERR_FAIL_INDEX(p_shape, CURSOR_MAX);
@@ -2668,11 +2668,11 @@ void DisplayServerOSX::cursor_set_shape(CursorShape p_shape) {
cursor_update_shape();
}
-DisplayServerOSX::CursorShape DisplayServerOSX::cursor_get_shape() const {
+DisplayServerMacOS::CursorShape DisplayServerMacOS::cursor_get_shape() const {
return cursor_shape;
}
-void DisplayServerOSX::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
+void DisplayServerMacOS::cursor_set_custom_image(const Ref<Resource> &p_cursor, CursorShape p_shape, const Vector2 &p_hotspot) {
_THREAD_SAFE_METHOD_
if (p_cursor.is_valid()) {
@@ -2784,20 +2784,20 @@ void DisplayServerOSX::cursor_set_custom_image(const Ref<Resource> &p_cursor, Cu
}
}
-bool DisplayServerOSX::get_swap_cancel_ok() {
+bool DisplayServerMacOS::get_swap_cancel_ok() {
return false;
}
-int DisplayServerOSX::keyboard_get_layout_count() const {
+int DisplayServerMacOS::keyboard_get_layout_count() const {
if (keyboard_layout_dirty) {
- const_cast<DisplayServerOSX *>(this)->_update_keyboard_layouts();
+ const_cast<DisplayServerMacOS *>(this)->_update_keyboard_layouts();
}
return kbd_layouts.size();
}
-void DisplayServerOSX::keyboard_set_current_layout(int p_index) {
+void DisplayServerMacOS::keyboard_set_current_layout(int p_index) {
if (keyboard_layout_dirty) {
- const_cast<DisplayServerOSX *>(this)->_update_keyboard_layouts();
+ const_cast<DisplayServerMacOS *>(this)->_update_keyboard_layouts();
}
ERR_FAIL_INDEX(p_index, kbd_layouts.size());
@@ -2825,44 +2825,44 @@ void DisplayServerOSX::keyboard_set_current_layout(int p_index) {
}
}
-int DisplayServerOSX::keyboard_get_current_layout() const {
+int DisplayServerMacOS::keyboard_get_current_layout() const {
if (keyboard_layout_dirty) {
- const_cast<DisplayServerOSX *>(this)->_update_keyboard_layouts();
+ const_cast<DisplayServerMacOS *>(this)->_update_keyboard_layouts();
}
return current_layout;
}
-String DisplayServerOSX::keyboard_get_layout_language(int p_index) const {
+String DisplayServerMacOS::keyboard_get_layout_language(int p_index) const {
if (keyboard_layout_dirty) {
- const_cast<DisplayServerOSX *>(this)->_update_keyboard_layouts();
+ const_cast<DisplayServerMacOS *>(this)->_update_keyboard_layouts();
}
ERR_FAIL_INDEX_V(p_index, kbd_layouts.size(), "");
return kbd_layouts[p_index].code;
}
-String DisplayServerOSX::keyboard_get_layout_name(int p_index) const {
+String DisplayServerMacOS::keyboard_get_layout_name(int p_index) const {
if (keyboard_layout_dirty) {
- const_cast<DisplayServerOSX *>(this)->_update_keyboard_layouts();
+ const_cast<DisplayServerMacOS *>(this)->_update_keyboard_layouts();
}
ERR_FAIL_INDEX_V(p_index, kbd_layouts.size(), "");
return kbd_layouts[p_index].name;
}
-Key DisplayServerOSX::keyboard_get_keycode_from_physical(Key p_keycode) const {
+Key DisplayServerMacOS::keyboard_get_keycode_from_physical(Key p_keycode) const {
if (p_keycode == Key::PAUSE) {
return p_keycode;
}
Key modifiers = p_keycode & KeyModifierMask::MODIFIER_MASK;
Key keycode_no_mod = p_keycode & KeyModifierMask::CODE_MASK;
- unsigned int osx_keycode = KeyMappingOSX::unmap_key((Key)keycode_no_mod);
- return (Key)(KeyMappingOSX::remap_key(osx_keycode, 0) | modifiers);
+ unsigned int macos_keycode = KeyMappingMacOS::unmap_key((Key)keycode_no_mod);
+ return (Key)(KeyMappingMacOS::remap_key(macos_keycode, 0) | modifiers);
}
-void DisplayServerOSX::process_events() {
+void DisplayServerMacOS::process_events() {
_THREAD_SAFE_METHOD_
while (true) {
@@ -2905,7 +2905,7 @@ void DisplayServerOSX::process_events() {
}
}
-void DisplayServerOSX::force_process_and_drop_events() {
+void DisplayServerMacOS::force_process_and_drop_events() {
_THREAD_SAFE_METHOD_
drop_events = true;
@@ -2913,13 +2913,13 @@ void DisplayServerOSX::force_process_and_drop_events() {
drop_events = false;
}
-void DisplayServerOSX::release_rendering_thread() {
+void DisplayServerMacOS::release_rendering_thread() {
}
-void DisplayServerOSX::make_rendering_thread() {
+void DisplayServerMacOS::make_rendering_thread() {
}
-void DisplayServerOSX::swap_buffers() {
+void DisplayServerMacOS::swap_buffers() {
#if defined(GLES3_ENABLED)
if (gl_manager) {
gl_manager->swap_buffers();
@@ -2927,7 +2927,7 @@ void DisplayServerOSX::swap_buffers() {
#endif
}
-void DisplayServerOSX::set_native_icon(const String &p_filename) {
+void DisplayServerMacOS::set_native_icon(const String &p_filename) {
_THREAD_SAFE_METHOD_
Ref<FileAccess> f = FileAccess::open(p_filename, FileAccess::READ);
@@ -2947,7 +2947,7 @@ void DisplayServerOSX::set_native_icon(const String &p_filename) {
[NSApp setApplicationIconImage:icon];
}
-void DisplayServerOSX::set_icon(const Ref<Image> &p_icon) {
+void DisplayServerMacOS::set_icon(const Ref<Image> &p_icon) {
_THREAD_SAFE_METHOD_
Ref<Image> img = p_icon;
@@ -2986,15 +2986,15 @@ void DisplayServerOSX::set_icon(const Ref<Image> &p_icon) {
[NSApp setApplicationIconImage:nsimg];
}
-DisplayServer *DisplayServerOSX::create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
- DisplayServer *ds = memnew(DisplayServerOSX(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
+DisplayServer *DisplayServerMacOS::create_func(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+ DisplayServer *ds = memnew(DisplayServerMacOS(p_rendering_driver, p_mode, p_vsync_mode, p_flags, p_resolution, r_error));
if (r_error != OK) {
OS::get_singleton()->alert("Your video card driver does not support any of the supported Vulkan or OpenGL versions.", "Unable to initialize Video driver");
}
return ds;
}
-Vector<String> DisplayServerOSX::get_rendering_drivers_func() {
+Vector<String> DisplayServerMacOS::get_rendering_drivers_func() {
Vector<String> drivers;
#if defined(VULKAN_ENABLED)
@@ -3007,11 +3007,11 @@ Vector<String> DisplayServerOSX::get_rendering_drivers_func() {
return drivers;
}
-void DisplayServerOSX::register_osx_driver() {
- register_create_function("osx", create_func, get_rendering_drivers_func);
+void DisplayServerMacOS::register_macos_driver() {
+ register_create_function("macos", create_func, get_rendering_drivers_func);
}
-DisplayServer::WindowID DisplayServerOSX::window_get_active_popup() const {
+DisplayServer::WindowID DisplayServerMacOS::window_get_active_popup() const {
const List<WindowID>::Element *E = popup_list.back();
if (E) {
return E->get();
@@ -3020,7 +3020,7 @@ DisplayServer::WindowID DisplayServerOSX::window_get_active_popup() const {
}
}
-void DisplayServerOSX::window_set_popup_safe_rect(WindowID p_window, const Rect2i &p_rect) {
+void DisplayServerMacOS::window_set_popup_safe_rect(WindowID p_window, const Rect2i &p_rect) {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND(!windows.has(p_window));
@@ -3028,7 +3028,7 @@ void DisplayServerOSX::window_set_popup_safe_rect(WindowID p_window, const Rect2
wd.parent_safe_rect = p_rect;
}
-Rect2i DisplayServerOSX::window_get_popup_safe_rect(WindowID p_window) const {
+Rect2i DisplayServerMacOS::window_get_popup_safe_rect(WindowID p_window) const {
_THREAD_SAFE_METHOD_
ERR_FAIL_COND_V(!windows.has(p_window), Rect2i());
@@ -3036,7 +3036,7 @@ Rect2i DisplayServerOSX::window_get_popup_safe_rect(WindowID p_window) const {
return wd.parent_safe_rect;
}
-void DisplayServerOSX::popup_open(WindowID p_window) {
+void DisplayServerMacOS::popup_open(WindowID p_window) {
_THREAD_SAFE_METHOD_
WindowData &wd = windows[p_window];
@@ -3054,7 +3054,7 @@ void DisplayServerOSX::popup_open(WindowID p_window) {
}
}
if (C) {
- send_window_event(windows[C->get()], DisplayServerOSX::WINDOW_EVENT_CLOSE_REQUEST);
+ send_window_event(windows[C->get()], DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
}
if (was_empty && popup_list.is_empty()) {
@@ -3066,7 +3066,7 @@ void DisplayServerOSX::popup_open(WindowID p_window) {
}
}
-void DisplayServerOSX::popup_close(WindowID p_window) {
+void DisplayServerMacOS::popup_close(WindowID p_window) {
_THREAD_SAFE_METHOD_
bool was_empty = popup_list.is_empty();
@@ -3076,7 +3076,7 @@ void DisplayServerOSX::popup_close(WindowID p_window) {
WindowID win_id = E->get();
popup_list.erase(E);
- send_window_event(windows[win_id], DisplayServerOSX::WINDOW_EVENT_CLOSE_REQUEST);
+ send_window_event(windows[win_id], DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
E = F;
}
if (!was_empty && popup_list.is_empty()) {
@@ -3085,7 +3085,7 @@ void DisplayServerOSX::popup_close(WindowID p_window) {
}
}
-bool DisplayServerOSX::mouse_process_popups(bool p_close) {
+bool DisplayServerMacOS::mouse_process_popups(bool p_close) {
_THREAD_SAFE_METHOD_
bool was_empty = popup_list.is_empty();
@@ -3094,7 +3094,7 @@ bool DisplayServerOSX::mouse_process_popups(bool p_close) {
// Close all popups.
List<WindowID>::Element *E = popup_list.front();
if (E) {
- send_window_event(windows[E->get()], DisplayServerOSX::WINDOW_EVENT_CLOSE_REQUEST);
+ send_window_event(windows[E->get()], DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
closed = true;
}
if (!was_empty) {
@@ -3126,7 +3126,7 @@ bool DisplayServerOSX::mouse_process_popups(bool p_close) {
}
}
if (C) {
- send_window_event(windows[C->get()], DisplayServerOSX::WINDOW_EVENT_CLOSE_REQUEST);
+ send_window_event(windows[C->get()], DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
closed = true;
}
if (!was_empty && popup_list.is_empty()) {
@@ -3137,7 +3137,7 @@ bool DisplayServerOSX::mouse_process_popups(bool p_close) {
return closed;
}
-DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
+DisplayServerMacOS::DisplayServerMacOS(const String &p_rendering_driver, WindowMode p_mode, VSyncMode p_vsync_mode, uint32_t p_flags, const Vector2i &p_resolution, Error &r_error) {
Input::get_singleton()->set_event_dispatch_function(_dispatch_input_events);
r_error = OK;
@@ -3164,7 +3164,7 @@ DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode
CGDisplayRegisterReconfigurationCallback(_displays_arrangement_changed, nullptr);
// Init TTS
- tts = [[TTS_OSX alloc] init];
+ tts = [[TTS_MacOS alloc] init];
NSMenuItem *menu_item;
NSString *title;
@@ -3218,8 +3218,8 @@ DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode
#if defined(GLES3_ENABLED)
if (rendering_driver == "opengl3") {
- GLManager_OSX::ContextType opengl_api_type = GLManager_OSX::GLES_3_0_COMPATIBLE;
- gl_manager = memnew(GLManager_OSX(opengl_api_type));
+ GLManager_MacOS::ContextType opengl_api_type = GLManager_MacOS::GLES_3_0_COMPATIBLE;
+ gl_manager = memnew(GLManager_MacOS(opengl_api_type));
if (gl_manager->initialize() != OK) {
memdelete(gl_manager);
gl_manager = nullptr;
@@ -3231,7 +3231,7 @@ DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode
#endif
#if defined(VULKAN_ENABLED)
if (rendering_driver == "vulkan") {
- context_vulkan = memnew(VulkanContextOSX);
+ context_vulkan = memnew(VulkanContextMacOS);
if (context_vulkan->initialize() != OK) {
memdelete(context_vulkan);
context_vulkan = nullptr;
@@ -3268,7 +3268,7 @@ DisplayServerOSX::DisplayServerOSX(const String &p_rendering_driver, WindowMode
#endif
}
-DisplayServerOSX::~DisplayServerOSX() {
+DisplayServerMacOS::~DisplayServerMacOS() {
// Destroy all windows.
for (HashMap<WindowID, WindowData>::Iterator E = windows.begin(); E;) {
HashMap<WindowID, WindowData>::Iterator F = E;
diff --git a/platform/osx/export/codesign.cpp b/platform/macos/export/codesign.cpp
index fd044c00cc..fd044c00cc 100644
--- a/platform/osx/export/codesign.cpp
+++ b/platform/macos/export/codesign.cpp
diff --git a/platform/osx/export/codesign.h b/platform/macos/export/codesign.h
index 3a08c0ea86..3a08c0ea86 100644
--- a/platform/osx/export/codesign.h
+++ b/platform/macos/export/codesign.h
diff --git a/platform/osx/export/export.cpp b/platform/macos/export/export.cpp
index bd35b39e9e..ff7457081f 100644
--- a/platform/osx/export/export.cpp
+++ b/platform/macos/export/export.cpp
@@ -32,11 +32,11 @@
#include "export_plugin.h"
-void register_osx_exporter() {
+void register_macos_exporter() {
EDITOR_DEF("export/macos/force_builtin_codesign", false);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::BOOL, "export/macos/force_builtin_codesign", PROPERTY_HINT_NONE));
- Ref<EditorExportPlatformOSX> platform;
+ Ref<EditorExportPlatformMacOS> platform;
platform.instantiate();
EditorExport::get_singleton()->add_export_platform(platform);
diff --git a/platform/iphone/export/export.h b/platform/macos/export/export.h
index adb3c23957..260c691209 100644
--- a/platform/iphone/export/export.h
+++ b/platform/macos/export/export.h
@@ -28,9 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef IPHONE_EXPORT_H
-#define IPHONE_EXPORT_H
+#ifndef MACOS_EXPORT_H
+#define MACOS_EXPORT_H
-void register_iphone_exporter();
+void register_macos_exporter();
-#endif // IPHONE_EXPORT_H
+#endif // MACOS_EXPORT_H
diff --git a/platform/osx/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp
index a22d7e5e3d..162a188f95 100644
--- a/platform/osx/export/export_plugin.cpp
+++ b/platform/macos/export/export_plugin.cpp
@@ -37,7 +37,7 @@
#include "modules/modules_enabled.gen.h" // For regex.
-void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
+void EditorExportPlatformMacOS::get_preset_features(const Ref<EditorExportPreset> &p_preset, List<String> *r_features) {
if (p_preset->get("texture_format/s3tc")) {
r_features->push_back("s3tc");
}
@@ -51,7 +51,7 @@ void EditorExportPlatformOSX::get_preset_features(const Ref<EditorExportPreset>
r_features->push_back("64");
}
-bool EditorExportPlatformOSX::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const {
+bool EditorExportPlatformMacOS::get_export_option_visibility(const String &p_option, const HashMap<StringName, Variant> &p_options) const {
// These options are not supported by built-in codesign, used on non macOS host.
if (!OS::get_singleton()->has_feature("macos")) {
if (p_option == "codesign/identity" || p_option == "codesign/timestamp" || p_option == "codesign/hardened_runtime" || p_option == "codesign/custom_options" || p_option.begins_with("notarization/")) {
@@ -68,7 +68,7 @@ bool EditorExportPlatformOSX::get_export_option_visibility(const String &p_optio
return true;
}
-void EditorExportPlatformOSX::get_export_options(List<ExportOption> *r_options) {
+void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options) {
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/debug", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "custom_template/release", PROPERTY_HINT_GLOBAL_FILE, "*.zip"), ""));
@@ -214,7 +214,7 @@ void _rgba8_to_packbits_encode(int p_ch, int p_size, Vector<uint8_t> &p_source,
memcpy(&p_dest.write[ofs], result.ptr(), res_size);
}
-void EditorExportPlatformOSX::_make_icon(const Ref<Image> &p_icon, Vector<uint8_t> &p_data) {
+void EditorExportPlatformMacOS::_make_icon(const Ref<Image> &p_icon, Vector<uint8_t> &p_data) {
Ref<ImageTexture> it = memnew(ImageTexture);
Vector<uint8_t> data;
@@ -320,7 +320,7 @@ void EditorExportPlatformOSX::_make_icon(const Ref<Image> &p_icon, Vector<uint8_
p_data = data;
}
-void EditorExportPlatformOSX::_fix_plist(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &plist, const String &p_binary) {
+void EditorExportPlatformMacOS::_fix_plist(const Ref<EditorExportPreset> &p_preset, Vector<uint8_t> &plist, const String &p_binary) {
String str;
String strnew;
str.parse_utf8((const char *)plist.ptr(), plist.size());
@@ -407,14 +407,14 @@ void EditorExportPlatformOSX::_fix_plist(const Ref<EditorExportPreset> &p_preset
}
/**
- * If we're running the OSX version of the Godot editor we'll:
+ * If we're running the macOS version of the Godot editor we'll:
* - export our application bundle to a temporary folder
* - attempt to code sign it
* - and then wrap it up in a DMG
*/
-Error EditorExportPlatformOSX::_notarize(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
-#ifdef OSX_ENABLED
+Error EditorExportPlatformMacOS::_notarize(const Ref<EditorExportPreset> &p_preset, const String &p_path) {
+#ifdef MACOS_ENABLED
List<String> args;
args.push_back("altool");
@@ -468,7 +468,7 @@ Error EditorExportPlatformOSX::_notarize(const Ref<EditorExportPreset> &p_preset
return OK;
}
-Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path, const String &p_ent_path, bool p_warn) {
+Error EditorExportPlatformMacOS::_code_sign(const Ref<EditorExportPreset> &p_preset, const String &p_path, const String &p_ent_path, bool p_warn) {
bool force_builtin_codesign = EditorSettings::get_singleton()->get("export/macos/force_builtin_codesign");
bool ad_hoc = (p_preset->get("codesign/identity") == "" || p_preset->get("codesign/identity") == "-");
@@ -476,7 +476,7 @@ Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_prese
print_verbose("using built-in codesign...");
#ifdef MODULE_REGEX_ENABLED
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
if (p_preset->get("codesign/timestamp") && p_warn) {
add_message(EXPORT_MESSAGE_INFO, TTR("Code Signing"), TTR("Timestamping is not compatible with ad-hoc signature, and was disabled!"));
}
@@ -566,9 +566,9 @@ Error EditorExportPlatformOSX::_code_sign(const Ref<EditorExportPreset> &p_prese
}
}
-Error EditorExportPlatformOSX::_code_sign_directory(const Ref<EditorExportPreset> &p_preset, const String &p_path,
+Error EditorExportPlatformMacOS::_code_sign_directory(const Ref<EditorExportPreset> &p_preset, const String &p_path,
const String &p_ent_path, bool p_should_error_on_non_code) {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
static Vector<String> extensions_to_sign;
if (extensions_to_sign.is_empty()) {
@@ -615,7 +615,7 @@ Error EditorExportPlatformOSX::_code_sign_directory(const Ref<EditorExportPreset
return OK;
}
-Error EditorExportPlatformOSX::_copy_and_sign_files(Ref<DirAccess> &dir_access, const String &p_src_path,
+Error EditorExportPlatformMacOS::_copy_and_sign_files(Ref<DirAccess> &dir_access, const String &p_src_path,
const String &p_in_app_path, bool p_sign_enabled,
const Ref<EditorExportPreset> &p_preset, const String &p_ent_path,
bool p_should_error_on_non_code_sign) {
@@ -644,14 +644,14 @@ Error EditorExportPlatformOSX::_copy_and_sign_files(Ref<DirAccess> &dir_access,
return err;
}
-Error EditorExportPlatformOSX::_export_osx_plugins_for(Ref<EditorExportPlugin> p_editor_export_plugin,
+Error EditorExportPlatformMacOS::_export_macos_plugins_for(Ref<EditorExportPlugin> p_editor_export_plugin,
const String &p_app_path_name, Ref<DirAccess> &dir_access,
bool p_sign_enabled, const Ref<EditorExportPreset> &p_preset,
const String &p_ent_path) {
Error error{ OK };
- const Vector<String> &osx_plugins{ p_editor_export_plugin->get_osx_plugin_files() };
- for (int i = 0; i < osx_plugins.size(); ++i) {
- String src_path{ ProjectSettings::get_singleton()->globalize_path(osx_plugins[i]) };
+ const Vector<String> &macos_plugins{ p_editor_export_plugin->get_macos_plugin_files() };
+ for (int i = 0; i < macos_plugins.size(); ++i) {
+ String src_path{ ProjectSettings::get_singleton()->globalize_path(macos_plugins[i]) };
String path_in_app{ p_app_path_name + "/Contents/PlugIns/" + src_path.get_file() };
error = _copy_and_sign_files(dir_access, src_path, path_in_app, p_sign_enabled, p_preset, p_ent_path, false);
if (error != OK) {
@@ -661,7 +661,7 @@ Error EditorExportPlatformOSX::_export_osx_plugins_for(Ref<EditorExportPlugin> p
return error;
}
-Error EditorExportPlatformOSX::_create_dmg(const String &p_dmg_path, const String &p_pkg_name, const String &p_app_path_name) {
+Error EditorExportPlatformMacOS::_create_dmg(const String &p_dmg_path, const String &p_pkg_name, const String &p_app_path_name) {
List<String> args;
if (FileAccess::exists(p_dmg_path)) {
@@ -697,7 +697,7 @@ Error EditorExportPlatformOSX::_create_dmg(const String &p_dmg_path, const Strin
return OK;
}
-Error EditorExportPlatformOSX::_export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path) {
+Error EditorExportPlatformMacOS::_export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path) {
Ref<FileAccess> f = FileAccess::open(p_path, FileAccess::WRITE);
if (f.is_null()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Debug Script Export"), vformat(TTR("Could not open file \"%s\"."), p_path));
@@ -713,12 +713,12 @@ Error EditorExportPlatformOSX::_export_debug_script(const Ref<EditorExportPreset
return OK;
}
-Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
+Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
ExportNotifier notifier(*this, p_preset, p_debug, p_path, p_flags);
String src_pkg_name;
- EditorProgress ep("export", "Exporting for OSX", 3, true);
+ EditorProgress ep("export", "Exporting for macOS", 3, true);
if (p_debug) {
src_pkg_name = p_preset->get("custom_template/debug");
@@ -728,7 +728,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
if (src_pkg_name.is_empty()) {
String err;
- src_pkg_name = find_export_template("osx.zip", &err);
+ src_pkg_name = find_export_template("macos.zip", &err);
if (src_pkg_name.is_empty()) {
add_message(EXPORT_MESSAGE_ERROR, TTR("Prepare Templates"), TTR("Export template not found."));
return ERR_FILE_NOT_FOUND;
@@ -755,7 +755,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
int ret = unzGoToFirstFile(src_pkg_zip);
- String binary_to_use = "godot_osx_" + String(p_debug ? "debug" : "release") + ".64";
+ String binary_to_use = "godot_macos_" + String(p_debug ? "debug" : "release") + ".64";
String pkg_name;
if (String(ProjectSettings::get_singleton()->get("application/config/name")) != "") {
@@ -984,7 +984,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
unzCloseCurrentFile(src_pkg_zip);
// Write.
- file = file.replace_first("osx_template.app/", "");
+ file = file.replace_first("macos_template.app/", "");
if (((info.external_fa >> 16L) & 0120000) == 0120000) {
#ifndef UNIX_ENABLED
@@ -1053,19 +1053,19 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
}
if (data.size() > 0) {
- if (file.find("/data.mono.osx.64.release_debug/") != -1) {
+ if (file.find("/data.mono.macos.64.release_debug/") != -1) {
if (!p_debug) {
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
- file = file.replace("/data.mono.osx.64.release_debug/", "/GodotSharp/");
+ file = file.replace("/data.mono.macos.64.release_debug/", "/GodotSharp/");
}
- if (file.find("/data.mono.osx.64.release/") != -1) {
+ if (file.find("/data.mono.macos.64.release/") != -1) {
if (p_debug) {
ret = unzGoToNextFile(src_pkg_zip);
continue; // skip
}
- file = file.replace("/data.mono.osx.64.release/", "/GodotSharp/");
+ file = file.replace("/data.mono.macos.64.release/", "/GodotSharp/");
}
if (file.ends_with(".dylib")) {
@@ -1299,7 +1299,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
bool ad_hoc = true;
if (err == OK) {
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
String sign_identity = p_preset->get("codesign/identity");
#else
String sign_identity = "-";
@@ -1330,7 +1330,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
Vector<Ref<EditorExportPlugin>> export_plugins{ EditorExport::get_singleton()->get_export_plugins() };
for (int i = 0; i < export_plugins.size(); ++i) {
- err = _export_osx_plugins_for(export_plugins[i], tmp_app_path_name, da, sign_enabled, p_preset, ent_path);
+ err = _export_macos_plugins_for(export_plugins[i], tmp_app_path_name, da, sign_enabled, p_preset, ent_path);
if (err != OK) {
break;
}
@@ -1387,7 +1387,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
}
}
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool noto_enabled = p_preset->get("notarization/enable");
if (err == OK && noto_enabled) {
if (export_format == "app") {
@@ -1420,7 +1420,7 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
return err;
}
-void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String &p_root_path, const String &p_folder, const String &p_pkg_name) {
+void EditorExportPlatformMacOS::_zip_folder_recursive(zipFile &p_zip, const String &p_root_path, const String &p_folder, const String &p_pkg_name) {
String dir = p_folder.is_empty() ? p_root_path : p_root_path.plus_file(p_folder);
Ref<DirAccess> da = DirAccess::open(dir);
@@ -1537,7 +1537,7 @@ void EditorExportPlatformOSX::_zip_folder_recursive(zipFile &p_zip, const String
da->list_dir_end();
}
-bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
+bool EditorExportPlatformMacOS::can_export(const Ref<EditorExportPreset> &p_preset, String &r_error, bool &r_missing_templates) const {
String err;
bool valid = false;
@@ -1560,7 +1560,7 @@ bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset
// Look for export templates (official templates, check only is custom templates are not set).
if (!dvalid || !rvalid) {
- dvalid = exists_export_template("osx.zip", &err);
+ dvalid = exists_export_template("macos.zip", &err);
rvalid = dvalid; // Both in the same ZIP.
}
@@ -1576,7 +1576,7 @@ bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset
bool sign_enabled = p_preset->get("codesign/enable");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool noto_enabled = p_preset->get("notarization/enable");
bool ad_hoc = ((p_preset->get("codesign/identity") == "") || (p_preset->get("codesign/identity") == "-"));
@@ -1665,9 +1665,9 @@ bool EditorExportPlatformOSX::can_export(const Ref<EditorExportPreset> &p_preset
return valid;
}
-EditorExportPlatformOSX::EditorExportPlatformOSX() {
- logo = ImageTexture::create_from_image(memnew(Image(_osx_logo)));
+EditorExportPlatformMacOS::EditorExportPlatformMacOS() {
+ logo = ImageTexture::create_from_image(memnew(Image(_macos_logo)));
}
-EditorExportPlatformOSX::~EditorExportPlatformOSX() {
+EditorExportPlatformMacOS::~EditorExportPlatformMacOS() {
}
diff --git a/platform/osx/export/export_plugin.h b/platform/macos/export/export_plugin.h
index ec97d4139f..410ec22545 100644
--- a/platform/osx/export/export_plugin.h
+++ b/platform/macos/export/export_plugin.h
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef OSX_EXPORT_PLUGIN_H
-#define OSX_EXPORT_PLUGIN_H
+#ifndef MACOS_EXPORT_PLUGIN_H
+#define MACOS_EXPORT_PLUGIN_H
#include "core/config/project_settings.h"
#include "core/io/dir_access.h"
@@ -41,12 +41,12 @@
#include "core/version.h"
#include "editor/editor_export.h"
#include "editor/editor_settings.h"
-#include "platform/osx/logo.gen.h"
+#include "platform/macos/logo.gen.h"
#include <sys/stat.h>
-class EditorExportPlatformOSX : public EditorExportPlatform {
- GDCLASS(EditorExportPlatformOSX, EditorExportPlatform);
+class EditorExportPlatformMacOS : public EditorExportPlatform {
+ GDCLASS(EditorExportPlatformMacOS, EditorExportPlatform);
int version_code = 0;
@@ -61,7 +61,7 @@ class EditorExportPlatformOSX : public EditorExportPlatform {
Error _copy_and_sign_files(Ref<DirAccess> &dir_access, const String &p_src_path, const String &p_in_app_path,
bool p_sign_enabled, const Ref<EditorExportPreset> &p_preset, const String &p_ent_path,
bool p_should_error_on_non_code_sign);
- Error _export_osx_plugins_for(Ref<EditorExportPlugin> p_editor_export_plugin, const String &p_app_path_name,
+ Error _export_macos_plugins_for(Ref<EditorExportPlugin> p_editor_export_plugin, const String &p_app_path_name,
Ref<DirAccess> &dir_access, bool p_sign_enabled, const Ref<EditorExportPreset> &p_preset,
const String &p_ent_path);
Error _create_dmg(const String &p_dmg_path, const String &p_pkg_name, const String &p_app_path_name);
@@ -69,7 +69,7 @@ class EditorExportPlatformOSX : public EditorExportPlatform {
Error _export_debug_script(const Ref<EditorExportPreset> &p_preset, const String &p_app_name, const String &p_pkg_name, const String &p_path);
bool use_codesign() const { return true; }
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
bool use_dmg() const { return true; }
#else
bool use_dmg() const { return false; }
@@ -130,8 +130,8 @@ public:
virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override {
}
- EditorExportPlatformOSX();
- ~EditorExportPlatformOSX();
+ EditorExportPlatformMacOS();
+ ~EditorExportPlatformMacOS();
};
#endif
diff --git a/platform/osx/export/lipo.cpp b/platform/macos/export/lipo.cpp
index 82baf18c52..82baf18c52 100644
--- a/platform/osx/export/lipo.cpp
+++ b/platform/macos/export/lipo.cpp
diff --git a/platform/osx/export/lipo.h b/platform/macos/export/lipo.h
index 0e419be17e..0e419be17e 100644
--- a/platform/osx/export/lipo.h
+++ b/platform/macos/export/lipo.h
diff --git a/platform/osx/export/macho.cpp b/platform/macos/export/macho.cpp
index e6e67eff06..e6e67eff06 100644
--- a/platform/osx/export/macho.cpp
+++ b/platform/macos/export/macho.cpp
diff --git a/platform/osx/export/macho.h b/platform/macos/export/macho.h
index 6cfc3c44f5..6cfc3c44f5 100644
--- a/platform/osx/export/macho.h
+++ b/platform/macos/export/macho.h
diff --git a/platform/osx/export/plist.cpp b/platform/macos/export/plist.cpp
index 36de9dd34b..36de9dd34b 100644
--- a/platform/osx/export/plist.cpp
+++ b/platform/macos/export/plist.cpp
diff --git a/platform/osx/export/plist.h b/platform/macos/export/plist.h
index ba9eaec196..ba9eaec196 100644
--- a/platform/osx/export/plist.h
+++ b/platform/macos/export/plist.h
diff --git a/platform/osx/gl_manager_osx_legacy.h b/platform/macos/gl_manager_macos_legacy.h
index 2d4913a7a6..9f866f2b32 100644
--- a/platform/osx/gl_manager_osx_legacy.h
+++ b/platform/macos/gl_manager_macos_legacy.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* gl_manager_osx_legacy.h */
+/* gl_manager_macos_legacy.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,10 +28,10 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef GL_MANAGER_OSX_LEGACY_H
-#define GL_MANAGER_OSX_LEGACY_H
+#ifndef GL_MANAGER_MACOS_LEGACY_H
+#define GL_MANAGER_MACOS_LEGACY_H
-#if defined(OSX_ENABLED) && defined(GLES3_ENABLED)
+#if defined(MACOS_ENABLED) && defined(GLES3_ENABLED)
#include "core/error/error_list.h"
#include "core/os/os.h"
@@ -42,7 +42,7 @@
#import <ApplicationServices/ApplicationServices.h>
#import <CoreVideo/CoreVideo.h>
-class GLManager_OSX {
+class GLManager_MacOS {
public:
enum ContextType {
GLES_3_0_COMPATIBLE,
@@ -89,9 +89,9 @@ public:
void set_use_vsync(bool p_use);
bool is_using_vsync() const;
- GLManager_OSX(ContextType p_context_type);
- ~GLManager_OSX();
+ GLManager_MacOS(ContextType p_context_type);
+ ~GLManager_MacOS();
};
-#endif // OSX_ENABLED && GLES3_ENABLED
-#endif // GL_MANAGER_OSX_LEGACY_H
+#endif // MACOS_ENABLED && GLES3_ENABLED
+#endif // GL_MANAGER_MACOS_LEGACY_H
diff --git a/platform/osx/gl_manager_osx_legacy.mm b/platform/macos/gl_manager_macos_legacy.mm
index c769d7f5c5..e6bb7aaa85 100644
--- a/platform/osx/gl_manager_osx_legacy.mm
+++ b/platform/macos/gl_manager_macos_legacy.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* gl_manager_osx_legacy.mm */
+/* gl_manager_macos_legacy.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,15 +28,15 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "gl_manager_osx_legacy.h"
+#include "gl_manager_macos_legacy.h"
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
#ifdef GLES3_ENABLED
#include <stdio.h>
#include <stdlib.h>
-Error GLManager_OSX::create_context(GLWindow &win) {
+Error GLManager_MacOS::create_context(GLWindow &win) {
NSOpenGLPixelFormatAttribute attributes[] = {
NSOpenGLPFADoubleBuffer,
NSOpenGLPFAClosestPolicy,
@@ -62,7 +62,7 @@ Error GLManager_OSX::create_context(GLWindow &win) {
return OK;
}
-Error GLManager_OSX::window_create(DisplayServer::WindowID p_window_id, id p_view, int p_width, int p_height) {
+Error GLManager_MacOS::window_create(DisplayServer::WindowID p_window_id, id p_view, int p_width, int p_height) {
GLWindow win;
win.width = p_width;
win.height = p_height;
@@ -78,7 +78,7 @@ Error GLManager_OSX::window_create(DisplayServer::WindowID p_window_id, id p_vie
return OK;
}
-void GLManager_OSX::window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) {
+void GLManager_MacOS::window_resize(DisplayServer::WindowID p_window_id, int p_width, int p_height) {
if (!windows.has(p_window_id)) {
return;
}
@@ -102,7 +102,7 @@ void GLManager_OSX::window_resize(DisplayServer::WindowID p_window_id, int p_wid
[win.context update];
}
-int GLManager_OSX::window_get_width(DisplayServer::WindowID p_window_id) {
+int GLManager_MacOS::window_get_width(DisplayServer::WindowID p_window_id) {
if (!windows.has(p_window_id)) {
return 0;
}
@@ -111,7 +111,7 @@ int GLManager_OSX::window_get_width(DisplayServer::WindowID p_window_id) {
return win.width;
}
-int GLManager_OSX::window_get_height(DisplayServer::WindowID p_window_id) {
+int GLManager_MacOS::window_get_height(DisplayServer::WindowID p_window_id) {
if (!windows.has(p_window_id)) {
return 0;
}
@@ -120,7 +120,7 @@ int GLManager_OSX::window_get_height(DisplayServer::WindowID p_window_id) {
return win.height;
}
-void GLManager_OSX::window_destroy(DisplayServer::WindowID p_window_id) {
+void GLManager_MacOS::window_destroy(DisplayServer::WindowID p_window_id) {
if (!windows.has(p_window_id)) {
return;
}
@@ -132,7 +132,7 @@ void GLManager_OSX::window_destroy(DisplayServer::WindowID p_window_id) {
windows.erase(p_window_id);
}
-void GLManager_OSX::release_current() {
+void GLManager_MacOS::release_current() {
if (current_window == DisplayServer::INVALID_WINDOW_ID) {
return;
}
@@ -140,7 +140,7 @@ void GLManager_OSX::release_current() {
[NSOpenGLContext clearCurrentContext];
}
-void GLManager_OSX::window_make_current(DisplayServer::WindowID p_window_id) {
+void GLManager_MacOS::window_make_current(DisplayServer::WindowID p_window_id) {
if (current_window == p_window_id) {
return;
}
@@ -154,7 +154,7 @@ void GLManager_OSX::window_make_current(DisplayServer::WindowID p_window_id) {
current_window = p_window_id;
}
-void GLManager_OSX::make_current() {
+void GLManager_MacOS::make_current() {
if (current_window == DisplayServer::INVALID_WINDOW_ID) {
return;
}
@@ -166,13 +166,13 @@ void GLManager_OSX::make_current() {
[win.context makeCurrentContext];
}
-void GLManager_OSX::swap_buffers() {
+void GLManager_MacOS::swap_buffers() {
for (const KeyValue<DisplayServer::WindowID, GLWindow> &E : windows) {
[E.value.context flushBuffer];
}
}
-void GLManager_OSX::window_update(DisplayServer::WindowID p_window_id) {
+void GLManager_MacOS::window_update(DisplayServer::WindowID p_window_id) {
if (!windows.has(p_window_id)) {
return;
}
@@ -181,7 +181,7 @@ void GLManager_OSX::window_update(DisplayServer::WindowID p_window_id) {
[win.context update];
}
-void GLManager_OSX::window_set_per_pixel_transparency_enabled(DisplayServer::WindowID p_window_id, bool p_enabled) {
+void GLManager_MacOS::window_set_per_pixel_transparency_enabled(DisplayServer::WindowID p_window_id, bool p_enabled) {
if (!windows.has(p_window_id)) {
return;
}
@@ -197,11 +197,11 @@ void GLManager_OSX::window_set_per_pixel_transparency_enabled(DisplayServer::Win
[win.context update];
}
-Error GLManager_OSX::initialize() {
+Error GLManager_MacOS::initialize() {
return OK;
}
-void GLManager_OSX::set_use_vsync(bool p_use) {
+void GLManager_MacOS::set_use_vsync(bool p_use) {
use_vsync = p_use;
CGLContextObj ctx = CGLGetCurrentContext();
@@ -212,17 +212,17 @@ void GLManager_OSX::set_use_vsync(bool p_use) {
}
}
-bool GLManager_OSX::is_using_vsync() const {
+bool GLManager_MacOS::is_using_vsync() const {
return use_vsync;
}
-GLManager_OSX::GLManager_OSX(ContextType p_context_type) {
+GLManager_MacOS::GLManager_MacOS(ContextType p_context_type) {
context_type = p_context_type;
}
-GLManager_OSX::~GLManager_OSX() {
+GLManager_MacOS::~GLManager_MacOS() {
release_current();
}
#endif // GLES3_ENABLED
-#endif // OSX
+#endif // MACOS_ENABLED
diff --git a/platform/osx/godot_application.h b/platform/macos/godot_application.h
index 8d48a659f3..8d48a659f3 100644
--- a/platform/osx/godot_application.h
+++ b/platform/macos/godot_application.h
diff --git a/platform/osx/godot_application.mm b/platform/macos/godot_application.mm
index 13313a025a..3f71c77fd1 100644
--- a/platform/osx/godot_application.mm
+++ b/platform/macos/godot_application.mm
@@ -30,12 +30,12 @@
#include "godot_application.h"
-#include "display_server_osx.h"
+#include "display_server_macos.h"
@implementation GodotApplication
- (void)sendEvent:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
if ([event type] == NSEventTypeLeftMouseDown || [event type] == NSEventTypeRightMouseDown || [event type] == NSEventTypeOtherMouseDown) {
if (ds->mouse_process_popups()) {
diff --git a/platform/osx/godot_application_delegate.h b/platform/macos/godot_application_delegate.h
index f5b67b580f..f5b67b580f 100644
--- a/platform/osx/godot_application_delegate.h
+++ b/platform/macos/godot_application_delegate.h
diff --git a/platform/osx/godot_application_delegate.mm b/platform/macos/godot_application_delegate.mm
index 4d3558b273..bacdcc2bc4 100644
--- a/platform/osx/godot_application_delegate.mm
+++ b/platform/macos/godot_application_delegate.mm
@@ -30,8 +30,8 @@
#include "godot_application_delegate.h"
-#include "display_server_osx.h"
-#include "os_osx.h"
+#include "display_server_macos.h"
+#include "os_macos.h"
@implementation GodotApplicationDelegate
@@ -78,7 +78,7 @@
}
- (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent {
- OS_OSX *os = (OS_OSX *)OS::get_singleton();
+ OS_MacOS *os = (OS_MacOS *)OS::get_singleton();
if (!event || !os) {
return;
}
@@ -114,7 +114,7 @@
}
- (void)applicationDidResignActive:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
ds->mouse_process_popups(true);
}
@@ -130,14 +130,14 @@
}
- (void)globalMenuCallback:(id)sender {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
return ds->menu_callback(sender);
}
}
- (NSMenu *)applicationDockMenu:(NSApplication *)sender {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
return ds->get_dock_menu();
} else {
@@ -146,15 +146,15 @@
}
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
- ds->send_window_event(ds->get_window(DisplayServerOSX::MAIN_WINDOW_ID), DisplayServerOSX::WINDOW_EVENT_CLOSE_REQUEST);
+ ds->send_window_event(ds->get_window(DisplayServerMacOS::MAIN_WINDOW_ID), DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
}
return NSTerminateCancel;
}
- (void)showAbout:(id)sender {
- OS_OSX *os = (OS_OSX *)OS::get_singleton();
+ OS_MacOS *os = (OS_MacOS *)OS::get_singleton();
if (os && os->get_main_loop()) {
os->get_main_loop()->notification(MainLoop::NOTIFICATION_WM_ABOUT);
}
diff --git a/platform/osx/godot_content_view.h b/platform/macos/godot_content_view.h
index 353305aec1..353305aec1 100644
--- a/platform/osx/godot_content_view.h
+++ b/platform/macos/godot_content_view.h
diff --git a/platform/osx/godot_content_view.mm b/platform/macos/godot_content_view.mm
index 018b90e629..9ca7498a15 100644
--- a/platform/osx/godot_content_view.mm
+++ b/platform/macos/godot_content_view.mm
@@ -30,8 +30,8 @@
#include "godot_content_view.h"
-#include "display_server_osx.h"
-#include "key_mapping_osx.h"
+#include "display_server_macos.h"
+#include "key_mapping_macos.h"
@implementation GodotContentView
@@ -56,7 +56,7 @@
return self;
}
-- (void)setWindowID:(DisplayServerOSX::WindowID)wid {
+- (void)setWindowID:(DisplayServerMacOS::WindowID)wid {
window_id = wid;
}
@@ -67,7 +67,7 @@
}
- (void)updateLayer {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
ds->window_update(window_id);
[super updateLayer];
}
@@ -106,12 +106,12 @@
return;
}
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
if (wd.im_active) {
ime_input_event_in_progress = true;
ds->update_im_text(Point2i(selectedRange.location, selectedRange.length), String::utf8([[marked_text mutableString] UTF8String]));
@@ -126,12 +126,12 @@
ime_input_event_in_progress = false;
[[marked_text mutableString] setString:@""];
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
if (wd.im_active) {
ds->update_im_text(Point2i(), String());
}
@@ -150,12 +150,12 @@
}
- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return NSMakeRect(0, 0, 0, 0);
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
const NSRect content_rect = [wd.window_view frame];
const float scale = ds->screen_get_max_scale();
NSRect point_in_window_rect = NSMakeRect(wd.im_position.x / scale, content_rect.size.height - (wd.im_position.y / scale) - 1, 0, 0);
@@ -191,7 +191,7 @@
return;
}
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
[self cancelComposition];
return;
@@ -210,10 +210,10 @@
continue;
}
- DisplayServerOSX::KeyEvent ke;
+ DisplayServerMacOS::KeyEvent ke;
ke.window_id = window_id;
- ke.osx_state = [event modifierFlags];
+ ke.macos_state = [event modifierFlags];
ke.pressed = true;
ke.echo = false;
ke.raw = false; // IME input event.
@@ -237,12 +237,12 @@
}
- (BOOL)performDragOperation:(id<NSDraggingInfo>)sender {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return NO;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
if (!wd.drop_files_callback.is_null()) {
Vector<String> files;
NSPasteboard *pboard = [sender draggingPasteboard];
@@ -276,12 +276,12 @@
// MARK: Focus
- (BOOL)canBecomeKeyView {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return YES;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
return !wd.no_focus && !wd.is_popup;
}
@@ -292,7 +292,7 @@
// MARK: Mouse
- (void)cursorUpdate:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds) {
return;
}
@@ -301,12 +301,12 @@
}
- (void)processMouseEvent:(NSEvent *)event index:(MouseButton)index mask:(MouseButton)mask pressed:(bool)pressed {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
MouseButton last_button_state = ds->mouse_get_button_state();
if (pressed) {
@@ -356,12 +356,12 @@
}
- (void)mouseMoved:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
NSPoint delta = NSMakePoint([event deltaX], [event deltaY]);
NSPoint mpos = [event locationInWindow];
@@ -438,38 +438,38 @@
}
- (void)mouseExited:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
if (ds->mouse_get_mode() != DisplayServer::MOUSE_MODE_CAPTURED) {
- ds->send_window_event(wd, DisplayServerOSX::WINDOW_EVENT_MOUSE_EXIT);
+ ds->send_window_event(wd, DisplayServerMacOS::WINDOW_EVENT_MOUSE_EXIT);
}
}
- (void)mouseEntered:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
if (ds->mouse_get_mode() != DisplayServer::MOUSE_MODE_CAPTURED) {
- ds->send_window_event(wd, DisplayServerOSX::WINDOW_EVENT_MOUSE_ENTER);
+ ds->send_window_event(wd, DisplayServerMacOS::WINDOW_EVENT_MOUSE_ENTER);
}
ds->cursor_update_shape();
}
- (void)magnifyWithEvent:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
Ref<InputEventMagnifyGesture> ev;
ev.instantiate();
@@ -497,12 +497,12 @@
// MARK: Keyboard
- (void)keyDown:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
ignore_momentum_scroll = true;
@@ -511,7 +511,7 @@
NSString *characters = [event characters];
NSUInteger length = [characters length];
- if (!wd.im_active && length > 0 && keycode_has_unicode(KeyMappingOSX::remap_key([event keyCode], [event modifierFlags]))) {
+ if (!wd.im_active && length > 0 && keycode_has_unicode(KeyMappingMacOS::remap_key([event keyCode], [event modifierFlags]))) {
// Fallback unicode character handler used if IME is not active.
Char16String text;
text.resize([characters length] + 1);
@@ -523,28 +523,28 @@
for (int i = 0; i < u32text.length(); i++) {
const char32_t codepoint = u32text[i];
- DisplayServerOSX::KeyEvent ke;
+ DisplayServerMacOS::KeyEvent ke;
ke.window_id = window_id;
- ke.osx_state = [event modifierFlags];
+ ke.macos_state = [event modifierFlags];
ke.pressed = true;
ke.echo = [event isARepeat];
- ke.keycode = KeyMappingOSX::remap_key([event keyCode], [event modifierFlags]);
- ke.physical_keycode = KeyMappingOSX::translate_key([event keyCode]);
+ ke.keycode = KeyMappingMacOS::remap_key([event keyCode], [event modifierFlags]);
+ ke.physical_keycode = KeyMappingMacOS::translate_key([event keyCode]);
ke.raw = true;
ke.unicode = codepoint;
ds->push_to_key_event_buffer(ke);
}
} else {
- DisplayServerOSX::KeyEvent ke;
+ DisplayServerMacOS::KeyEvent ke;
ke.window_id = window_id;
- ke.osx_state = [event modifierFlags];
+ ke.macos_state = [event modifierFlags];
ke.pressed = true;
ke.echo = [event isARepeat];
- ke.keycode = KeyMappingOSX::remap_key([event keyCode], [event modifierFlags]);
- ke.physical_keycode = KeyMappingOSX::translate_key([event keyCode]);
+ ke.keycode = KeyMappingMacOS::remap_key([event keyCode], [event modifierFlags]);
+ ke.physical_keycode = KeyMappingMacOS::translate_key([event keyCode]);
ke.raw = false;
ke.unicode = 0;
@@ -559,7 +559,7 @@
}
- (void)flagsChanged:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
@@ -567,7 +567,7 @@
// Ignore all input if IME input is in progress
if (!ime_input_event_in_progress) {
- DisplayServerOSX::KeyEvent ke;
+ DisplayServerMacOS::KeyEvent ke;
ke.window_id = window_id;
ke.echo = false;
@@ -608,9 +608,9 @@
return;
}
- ke.osx_state = mod;
- ke.keycode = KeyMappingOSX::remap_key(key, mod);
- ke.physical_keycode = KeyMappingOSX::translate_key(key);
+ ke.macos_state = mod;
+ ke.keycode = KeyMappingMacOS::remap_key(key, mod);
+ ke.physical_keycode = KeyMappingMacOS::translate_key(key);
ke.unicode = 0;
ds->push_to_key_event_buffer(ke);
@@ -618,12 +618,12 @@
}
- (void)keyUp:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
// Ignore all input if IME input is in progress.
if (!ime_input_event_in_progress) {
@@ -631,7 +631,7 @@
NSUInteger length = [characters length];
// Fallback unicode character handler used if IME is not active.
- if (!wd.im_active && length > 0 && keycode_has_unicode(KeyMappingOSX::remap_key([event keyCode], [event modifierFlags]))) {
+ if (!wd.im_active && length > 0 && keycode_has_unicode(KeyMappingMacOS::remap_key([event keyCode], [event modifierFlags]))) {
Char16String text;
text.resize([characters length] + 1);
[characters getCharacters:(unichar *)text.ptrw() range:NSMakeRange(0, [characters length])];
@@ -641,28 +641,28 @@
for (int i = 0; i < u32text.length(); i++) {
const char32_t codepoint = u32text[i];
- DisplayServerOSX::KeyEvent ke;
+ DisplayServerMacOS::KeyEvent ke;
ke.window_id = window_id;
- ke.osx_state = [event modifierFlags];
+ ke.macos_state = [event modifierFlags];
ke.pressed = false;
ke.echo = [event isARepeat];
- ke.keycode = KeyMappingOSX::remap_key([event keyCode], [event modifierFlags]);
- ke.physical_keycode = KeyMappingOSX::translate_key([event keyCode]);
+ ke.keycode = KeyMappingMacOS::remap_key([event keyCode], [event modifierFlags]);
+ ke.physical_keycode = KeyMappingMacOS::translate_key([event keyCode]);
ke.raw = true;
ke.unicode = codepoint;
ds->push_to_key_event_buffer(ke);
}
} else {
- DisplayServerOSX::KeyEvent ke;
+ DisplayServerMacOS::KeyEvent ke;
ke.window_id = window_id;
- ke.osx_state = [event modifierFlags];
+ ke.macos_state = [event modifierFlags];
ke.pressed = false;
ke.echo = [event isARepeat];
- ke.keycode = KeyMappingOSX::remap_key([event keyCode], [event modifierFlags]);
- ke.physical_keycode = KeyMappingOSX::translate_key([event keyCode]);
+ ke.keycode = KeyMappingMacOS::remap_key([event keyCode], [event modifierFlags]);
+ ke.physical_keycode = KeyMappingMacOS::translate_key([event keyCode]);
ke.raw = true;
ke.unicode = 0;
@@ -674,12 +674,12 @@
// MARK: Scroll and pan
- (void)processScrollEvent:(NSEvent *)event button:(MouseButton)button factor:(double)factor {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
MouseButton mask = mouse_button_to_mask(button);
Ref<InputEventMouseButton> sc;
@@ -713,12 +713,12 @@
}
- (void)processPanEvent:(NSEvent *)event dx:(double)dx dy:(double)dy {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
Ref<InputEventPanGesture> pg;
pg.instantiate();
@@ -732,12 +732,12 @@
}
- (void)scrollWheel:(NSEvent *)event {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
ds->update_mouse_pos(wd, [event locationInWindow]);
double delta_x = [event scrollingDeltaX];
diff --git a/platform/osx/godot_main_osx.mm b/platform/macos/godot_main_macos.mm
index 722928ad60..66071f1404 100644
--- a/platform/osx/godot_main_osx.mm
+++ b/platform/macos/godot_main_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* godot_main_osx.mm */
+/* godot_main_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -30,7 +30,7 @@
#include "main/main.h"
-#include "os_osx.h"
+#include "os_macos.h"
#include <string.h>
#include <unistd.h>
@@ -68,7 +68,7 @@ int main(int argc, char **argv) {
printf("Current path: %s\n", cwd);
#endif
- OS_OSX os;
+ OS_MacOS os;
Error err;
// We must override main when testing is enabled.
diff --git a/platform/osx/godot_menu_item.h b/platform/macos/godot_menu_item.h
index 2c12897f10..2c12897f10 100644
--- a/platform/osx/godot_menu_item.h
+++ b/platform/macos/godot_menu_item.h
diff --git a/platform/osx/godot_window.h b/platform/macos/godot_window.h
index 16ff101142..16ff101142 100644
--- a/platform/osx/godot_window.h
+++ b/platform/macos/godot_window.h
diff --git a/platform/osx/godot_window.mm b/platform/macos/godot_window.mm
index d43853a94b..e205e7546d 100644
--- a/platform/osx/godot_window.mm
+++ b/platform/macos/godot_window.mm
@@ -30,7 +30,7 @@
#include "godot_window.h"
-#include "display_server_osx.h"
+#include "display_server_macos.h"
@implementation GodotWindow
@@ -40,29 +40,29 @@
return self;
}
-- (void)setWindowID:(DisplayServerOSX::WindowID)wid {
+- (void)setWindowID:(DisplayServerMacOS::WindowID)wid {
window_id = wid;
}
- (BOOL)canBecomeKeyWindow {
// Required for NSWindowStyleMaskBorderless windows.
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return YES;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
return !wd.no_focus && !wd.is_popup;
}
- (BOOL)canBecomeMainWindow {
// Required for NSWindowStyleMaskBorderless windows.
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return YES;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
return !wd.no_focus && !wd.is_popup;
}
diff --git a/platform/osx/godot_window_delegate.h b/platform/macos/godot_window_delegate.h
index 8a1f681fcd..8a1f681fcd 100644
--- a/platform/osx/godot_window_delegate.h
+++ b/platform/macos/godot_window_delegate.h
diff --git a/platform/osx/godot_window_delegate.mm b/platform/macos/godot_window_delegate.mm
index 521127f01b..e1e88274f0 100644
--- a/platform/osx/godot_window_delegate.mm
+++ b/platform/macos/godot_window_delegate.mm
@@ -30,7 +30,7 @@
#include "godot_window_delegate.h"
-#include "display_server_osx.h"
+#include "display_server_macos.h"
@implementation GodotWindowDelegate
@@ -39,42 +39,42 @@
}
- (BOOL)windowShouldClose:(id)sender {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return YES;
}
- ds->send_window_event(ds->get_window(window_id), DisplayServerOSX::WINDOW_EVENT_CLOSE_REQUEST);
+ ds->send_window_event(ds->get_window(window_id), DisplayServerMacOS::WINDOW_EVENT_CLOSE_REQUEST);
return NO;
}
- (void)windowWillClose:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
ds->popup_close(window_id);
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
while (wd.transient_children.size()) {
- ds->window_set_transient(*wd.transient_children.begin(), DisplayServerOSX::INVALID_WINDOW_ID);
+ ds->window_set_transient(*wd.transient_children.begin(), DisplayServerMacOS::INVALID_WINDOW_ID);
}
- if (wd.transient_parent != DisplayServerOSX::INVALID_WINDOW_ID) {
- ds->window_set_transient(window_id, DisplayServerOSX::INVALID_WINDOW_ID);
+ if (wd.transient_parent != DisplayServerMacOS::INVALID_WINDOW_ID) {
+ ds->window_set_transient(window_id, DisplayServerMacOS::INVALID_WINDOW_ID);
}
ds->window_destroy(window_id);
}
- (void)windowDidEnterFullScreen:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
wd.fullscreen = true;
// Reset window size limits.
[wd.window_object setContentMinSize:NSMakeSize(0, 0)];
@@ -85,12 +85,12 @@
}
- (void)windowDidExitFullScreen:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
wd.fullscreen = false;
// Set window size limits.
@@ -119,12 +119,12 @@
}
- (void)windowDidChangeBackingProperties:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
CGFloat new_scale_factor = [wd.window_object backingScaleFactor];
CGFloat old_scale_factor = [[[notification userInfo] objectForKey:@"NSBackingPropertyOldScaleFactorKey"] doubleValue];
@@ -137,7 +137,7 @@
wd.size.width = content_rect.size.width * scale;
wd.size.height = content_rect.size.height * scale;
- ds->send_window_event(wd, DisplayServerOSX::WINDOW_EVENT_DPI_CHANGE);
+ ds->send_window_event(wd, DisplayServerMacOS::WINDOW_EVENT_DPI_CHANGE);
CALayer *layer = [wd.window_view layer];
if (layer) {
@@ -150,26 +150,26 @@
}
- (void)windowWillStartLiveResize:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
ds->set_is_resizing(true);
}
}
- (void)windowDidEndLiveResize:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (ds) {
ds->set_is_resizing(false);
}
}
- (void)windowDidResize:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
const NSRect content_rect = [wd.window_view frame];
const float scale = ds->screen_get_max_scale();
wd.size.width = content_rect.size.width * scale;
@@ -192,12 +192,12 @@
}
- (void)windowDidMove:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
ds->release_pressed_events();
if (!wd.rect_changed_callback.is_null()) {
@@ -210,12 +210,12 @@
}
- (void)windowDidBecomeKey:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
if (ds->mouse_get_mode() == DisplayServer::MOUSE_MODE_CAPTURED) {
const NSRect content_rect = [wd.window_view frame];
@@ -228,43 +228,43 @@
}
ds->set_last_focused_window(window_id);
- ds->send_window_event(wd, DisplayServerOSX::WINDOW_EVENT_FOCUS_IN);
+ ds->send_window_event(wd, DisplayServerMacOS::WINDOW_EVENT_FOCUS_IN);
}
- (void)windowDidResignKey:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
ds->release_pressed_events();
- ds->send_window_event(wd, DisplayServerOSX::WINDOW_EVENT_FOCUS_OUT);
+ ds->send_window_event(wd, DisplayServerMacOS::WINDOW_EVENT_FOCUS_OUT);
}
- (void)windowDidMiniaturize:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
ds->release_pressed_events();
- ds->send_window_event(wd, DisplayServerOSX::WINDOW_EVENT_FOCUS_OUT);
+ ds->send_window_event(wd, DisplayServerMacOS::WINDOW_EVENT_FOCUS_OUT);
}
- (void)windowDidDeminiaturize:(NSNotification *)notification {
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (!ds || !ds->has_window(window_id)) {
return;
}
- DisplayServerOSX::WindowData &wd = ds->get_window(window_id);
+ DisplayServerMacOS::WindowData &wd = ds->get_window(window_id);
ds->set_last_focused_window(window_id);
- ds->send_window_event(wd, DisplayServerOSX::WINDOW_EVENT_FOCUS_IN);
+ ds->send_window_event(wd, DisplayServerMacOS::WINDOW_EVENT_FOCUS_IN);
}
@end
diff --git a/platform/osx/joypad_osx.cpp b/platform/macos/joypad_macos.cpp
index be9567e17c..1ddcfec1b5 100644
--- a/platform/osx/joypad_osx.cpp
+++ b/platform/macos/joypad_macos.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joypad_osx.cpp */
+/* joypad_macos.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "joypad_osx.h"
+#include "joypad_macos.h"
#include <machine/endian.h>
#define GODOT_JOY_LOOP_RUN_MODE CFSTR("GodotJoypad")
-static JoypadOSX *self = nullptr;
+static JoypadMacOS *self = nullptr;
joypad::joypad() {
ff_constant_force.lMagnitude = 10000;
@@ -235,7 +235,7 @@ static bool is_joypad(IOHIDDeviceRef p_device_ref) {
return true;
}
-void JoypadOSX::_device_added(IOReturn p_res, IOHIDDeviceRef p_device) {
+void JoypadMacOS::_device_added(IOReturn p_res, IOHIDDeviceRef p_device) {
if (p_res != kIOReturnSuccess || have_device(p_device)) {
return;
}
@@ -258,7 +258,7 @@ void JoypadOSX::_device_added(IOReturn p_res, IOHIDDeviceRef p_device) {
IOHIDDeviceScheduleWithRunLoop(p_device, CFRunLoopGetCurrent(), GODOT_JOY_LOOP_RUN_MODE);
}
-void JoypadOSX::_device_removed(IOReturn p_res, IOHIDDeviceRef p_device) {
+void JoypadMacOS::_device_removed(IOReturn p_res, IOHIDDeviceRef p_device) {
int device = get_joy_ref(p_device);
ERR_FAIL_COND(device == -1);
@@ -278,7 +278,7 @@ static String _hex_str(uint8_t p_byte) {
return ret;
}
-bool JoypadOSX::configure_joypad(IOHIDDeviceRef p_device_ref, joypad *p_joy) {
+bool JoypadMacOS::configure_joypad(IOHIDDeviceRef p_device_ref, joypad *p_joy) {
p_joy->device_ref = p_device_ref;
// Get device name.
String name;
@@ -445,7 +445,7 @@ static HatMask process_hat_value(int p_min, int p_max, int p_value, bool p_offse
return hat_value;
}
-void JoypadOSX::poll_joypads() const {
+void JoypadMacOS::poll_joypads() const {
while (CFRunLoopRunInMode(GODOT_JOY_LOOP_RUN_MODE, 0, TRUE) == kCFRunLoopRunHandledSource) {
// No-op. Pending callbacks will fire.
}
@@ -456,7 +456,7 @@ static float axis_correct(int p_value, int p_min, int p_max) {
return 2.0f * (p_value - p_min) / (p_max - p_min) - 1.0f;
}
-void JoypadOSX::process_joypads() {
+void JoypadMacOS::process_joypads() {
poll_joypads();
for (int i = 0; i < device_list.size(); i++) {
@@ -494,7 +494,7 @@ void JoypadOSX::process_joypads() {
}
}
-void JoypadOSX::joypad_vibration_start(int p_id, float p_magnitude, float p_duration, uint64_t p_timestamp) {
+void JoypadMacOS::joypad_vibration_start(int p_id, float p_magnitude, float p_duration, uint64_t p_timestamp) {
joypad *joy = &device_list.write[get_joy_index(p_id)];
joy->ff_timestamp = p_timestamp;
joy->ff_effect.dwDuration = p_duration * FF_SECONDS;
@@ -503,13 +503,13 @@ void JoypadOSX::joypad_vibration_start(int p_id, float p_magnitude, float p_dura
FFEffectStart(joy->ff_object, 1, 0);
}
-void JoypadOSX::joypad_vibration_stop(int p_id, uint64_t p_timestamp) {
+void JoypadMacOS::joypad_vibration_stop(int p_id, uint64_t p_timestamp) {
joypad *joy = &device_list.write[get_joy_index(p_id)];
joy->ff_timestamp = p_timestamp;
FFEffectStop(joy->ff_object);
}
-int JoypadOSX::get_joy_index(int p_id) const {
+int JoypadMacOS::get_joy_index(int p_id) const {
for (int i = 0; i < device_list.size(); i++) {
if (device_list[i].id == p_id) {
return i;
@@ -518,7 +518,7 @@ int JoypadOSX::get_joy_index(int p_id) const {
return -1;
}
-int JoypadOSX::get_joy_ref(IOHIDDeviceRef p_device) const {
+int JoypadMacOS::get_joy_ref(IOHIDDeviceRef p_device) const {
for (int i = 0; i < device_list.size(); i++) {
if (device_list[i].device_ref == p_device) {
return i;
@@ -527,7 +527,7 @@ int JoypadOSX::get_joy_ref(IOHIDDeviceRef p_device) const {
return -1;
}
-bool JoypadOSX::have_device(IOHIDDeviceRef p_device) const {
+bool JoypadMacOS::have_device(IOHIDDeviceRef p_device) const {
for (int i = 0; i < device_list.size(); i++) {
if (device_list[i].device_ref == p_device) {
return true;
@@ -561,7 +561,7 @@ static CFDictionaryRef create_match_dictionary(const UInt32 page, const UInt32 u
return retval;
}
-void JoypadOSX::config_hid_manager(CFArrayRef p_matching_array) const {
+void JoypadMacOS::config_hid_manager(CFArrayRef p_matching_array) const {
CFRunLoopRef runloop = CFRunLoopGetCurrent();
IOReturn ret = IOHIDManagerOpen(hid_manager, kIOHIDOptionsTypeNone);
ERR_FAIL_COND(ret != kIOReturnSuccess);
@@ -576,7 +576,7 @@ void JoypadOSX::config_hid_manager(CFArrayRef p_matching_array) const {
}
}
-JoypadOSX::JoypadOSX(Input *in) {
+JoypadMacOS::JoypadMacOS(Input *in) {
self = this;
input = in;
@@ -604,7 +604,7 @@ JoypadOSX::JoypadOSX(Input *in) {
}
}
-JoypadOSX::~JoypadOSX() {
+JoypadMacOS::~JoypadMacOS() {
for (int i = 0; i < device_list.size(); i++) {
device_list.write[i].free();
}
diff --git a/platform/osx/joypad_osx.h b/platform/macos/joypad_macos.h
index 3f89048ce6..4b14fed6d5 100644
--- a/platform/osx/joypad_osx.h
+++ b/platform/macos/joypad_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* joypad_osx.h */
+/* joypad_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef JOYPADOSX_H
-#define JOYPADOSX_H
+#ifndef JOYPAD_MACOS_H
+#define JOYPAD_MACOS_H
#ifdef MACOS_10_0_4
#import <IOKit/hidsystem/IOHIDUsageTables.h>
@@ -88,7 +88,7 @@ struct joypad {
joypad();
};
-class JoypadOSX {
+class JoypadMacOS {
enum {
JOYPADS_MAX = 16,
};
@@ -117,8 +117,8 @@ public:
void _device_added(IOReturn p_res, IOHIDDeviceRef p_device);
void _device_removed(IOReturn p_res, IOHIDDeviceRef p_device);
- JoypadOSX(Input *in);
- ~JoypadOSX();
+ JoypadMacOS(Input *in);
+ ~JoypadMacOS();
};
-#endif // JOYPADOSX_H
+#endif // JOYPAD_MACOS_H
diff --git a/platform/osx/key_mapping_osx.h b/platform/macos/key_mapping_macos.h
index 252cc907bb..fc5b791e44 100644
--- a/platform/osx/key_mapping_osx.h
+++ b/platform/macos/key_mapping_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* key_mapping_osx.h */
+/* key_mapping_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef KEY_MAPPING_OSX_H
-#define KEY_MAPPING_OSX_H
+#ifndef KEY_MAPPING_MACOS_H
+#define KEY_MAPPING_MACOS_H
#include "core/os/keyboard.h"
-class KeyMappingOSX {
- KeyMappingOSX() {}
+class KeyMappingMacOS {
+ KeyMappingMacOS() {}
static bool is_numpad_key(unsigned int key);
@@ -49,4 +49,4 @@ public:
static unsigned int keycode_get_native_mask(Key p_keycode);
};
-#endif // KEY_MAPPING_OSX_H
+#endif // KEY_MAPPING_MACOS_H
diff --git a/platform/osx/key_mapping_osx.mm b/platform/macos/key_mapping_macos.mm
index 0bf6bc7d1c..f6cff7124b 100644
--- a/platform/osx/key_mapping_osx.mm
+++ b/platform/macos/key_mapping_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* key_mapping_osx.mm */
+/* key_mapping_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,12 +28,12 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "key_mapping_osx.h"
+#include "key_mapping_macos.h"
#import <Carbon/Carbon.h>
#import <Cocoa/Cocoa.h>
-bool KeyMappingOSX::is_numpad_key(unsigned int key) {
+bool KeyMappingMacOS::is_numpad_key(unsigned int key) {
static const unsigned int table[] = {
0x41, /* kVK_ANSI_KeypadDecimal */
0x43, /* kVK_ANSI_KeypadMultiply */
@@ -65,7 +65,7 @@ bool KeyMappingOSX::is_numpad_key(unsigned int key) {
}
// Keyboard symbol translation table.
-static const Key _osx_to_godot_table[128] = {
+static const Key _macos_to_godot_table[128] = {
/* 00 */ Key::A,
/* 01 */ Key::S,
/* 02 */ Key::D,
@@ -197,18 +197,18 @@ static const Key _osx_to_godot_table[128] = {
};
// Translates a OS X keycode to a Godot keycode.
-Key KeyMappingOSX::translate_key(unsigned int key) {
+Key KeyMappingMacOS::translate_key(unsigned int key) {
if (key >= 128) {
return Key::UNKNOWN;
}
- return _osx_to_godot_table[key];
+ return _macos_to_godot_table[key];
}
-// Translates a Godot keycode back to a OSX keycode.
-unsigned int KeyMappingOSX::unmap_key(Key key) {
+// Translates a Godot keycode back to a macOS keycode.
+unsigned int KeyMappingMacOS::unmap_key(Key key) {
for (int i = 0; i <= 126; i++) {
- if (_osx_to_godot_table[i] == key) {
+ if (_macos_to_godot_table[i] == key) {
return i;
}
}
@@ -279,7 +279,7 @@ static const _KeyCodeMap _keycodes[55] = {
};
// Remap key according to current keyboard layout.
-Key KeyMappingOSX::remap_key(unsigned int key, unsigned int state) {
+Key KeyMappingMacOS::remap_key(unsigned int key, unsigned int state) {
if (is_numpad_key(key)) {
return translate_key(key);
}
@@ -463,7 +463,7 @@ static const _KeyCodeText _native_keycodes[] = {
/* clang-format on */
};
-String KeyMappingOSX::keycode_get_native_string(Key p_keycode) {
+String KeyMappingMacOS::keycode_get_native_string(Key p_keycode) {
const _KeyCodeText *kct = &_native_keycodes[0];
while (kct->text) {
@@ -475,7 +475,7 @@ String KeyMappingOSX::keycode_get_native_string(Key p_keycode) {
return String();
}
-unsigned int KeyMappingOSX::keycode_get_native_mask(Key p_keycode) {
+unsigned int KeyMappingMacOS::keycode_get_native_mask(Key p_keycode) {
unsigned int mask = 0;
if ((p_keycode & KeyModifierMask::CTRL) != Key::NONE) {
mask |= NSEventModifierFlagControl;
diff --git a/platform/osx/logo.png b/platform/macos/logo.png
index b5a660b165..b5a660b165 100644
--- a/platform/osx/logo.png
+++ b/platform/macos/logo.png
Binary files differ
diff --git a/platform/osx/osx_terminal_logger.h b/platform/macos/macos_terminal_logger.h
index 8413509c4b..bad2c1d657 100644
--- a/platform/osx/osx_terminal_logger.h
+++ b/platform/macos/macos_terminal_logger.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* osx_terminal_logger.h */
+/* macos_terminal_logger.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,17 +28,17 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef OSX_TERMINAL_LOGGER_H
-#define OSX_TERMINAL_LOGGER_H
+#ifndef MACOS_TERMINAL_LOGGER_H
+#define MACOS_TERMINAL_LOGGER_H
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
#include "core/io/logger.h"
-class OSXTerminalLogger : public StdLogger {
+class MacOSTerminalLogger : public StdLogger {
public:
virtual void 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 = false, ErrorType p_type = ERR_ERROR) override;
};
-#endif // OSX_ENABLED
-#endif // OSX_TERMINAL_LOGGER_H
+#endif // MACOS_ENABLED
+#endif // MACOS_TERMINAL_LOGGER_H
diff --git a/platform/osx/osx_terminal_logger.mm b/platform/macos/macos_terminal_logger.mm
index 48e26f42bf..b5ea2938ee 100644
--- a/platform/osx/osx_terminal_logger.mm
+++ b/platform/macos/macos_terminal_logger.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* osx_terminal_logger.mm */
+/* macos_terminal_logger.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,13 +28,13 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "osx_terminal_logger.h"
+#include "macos_terminal_logger.h"
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
#include <os/log.h>
-void OSXTerminalLogger::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) {
+void MacOSTerminalLogger::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)) {
return;
}
@@ -79,4 +79,4 @@ void OSXTerminalLogger::log_error(const char *p_function, const char *p_file, in
}
}
-#endif // OSX_ENABLED
+#endif // MACOS_ENABLED
diff --git a/platform/osx/os_osx.h b/platform/macos/os_macos.h
index b105be4a06..914cdb9af7 100644
--- a/platform/osx/os_osx.h
+++ b/platform/macos/os_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* os_osx.h */
+/* os_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,21 +28,21 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef OS_OSX_H
-#define OS_OSX_H
+#ifndef OS_MACOS_H
+#define OS_MACOS_H
#include "core/input/input.h"
-#include "crash_handler_osx.h"
+#include "crash_handler_macos.h"
#include "drivers/coreaudio/audio_driver_coreaudio.h"
#include "drivers/coremidi/midi_driver_coremidi.h"
#include "drivers/unix/os_unix.h"
-#include "joypad_osx.h"
+#include "joypad_macos.h"
#include "servers/audio_server.h"
-class OS_OSX : public OS_Unix {
+class OS_MacOS : public OS_Unix {
bool force_quit = false;
- JoypadOSX *joypad_osx = nullptr;
+ JoypadMacOS *joypad_macos = nullptr;
#ifdef COREAUDIO_ENABLED
AudioDriverCoreAudio audio_driver;
@@ -113,8 +113,8 @@ public:
void run();
- OS_OSX();
- ~OS_OSX();
+ OS_MacOS();
+ ~OS_MacOS();
};
#endif
diff --git a/platform/osx/os_osx.mm b/platform/macos/os_macos.mm
index 5230ed4155..2c6cd7de0b 100644
--- a/platform/osx/os_osx.mm
+++ b/platform/macos/os_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* os_osx.mm */
+/* os_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,16 +28,16 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "os_osx.h"
+#include "os_macos.h"
#include "core/version_generated.gen.h"
#include "main/main.h"
-#include "dir_access_osx.h"
-#include "display_server_osx.h"
+#include "dir_access_macos.h"
+#include "display_server_macos.h"
#include "godot_application.h"
#include "godot_application_delegate.h"
-#include "osx_terminal_logger.h"
+#include "macos_terminal_logger.h"
#include <dlfcn.h>
#include <libproc.h>
@@ -45,7 +45,7 @@
#include <os/log.h>
#include <sys/sysctl.h>
-_FORCE_INLINE_ String OS_OSX::get_framework_executable(const String &p_path) {
+_FORCE_INLINE_ String OS_MacOS::get_framework_executable(const String &p_path) {
// Append framework executable name, or return as is if p_path is not a framework.
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
if (da->dir_exists(p_path) && da->file_exists(p_path.plus_file(p_path.get_file().get_basename()))) {
@@ -55,10 +55,10 @@ _FORCE_INLINE_ String OS_OSX::get_framework_executable(const String &p_path) {
}
}
-void OS_OSX::pre_wait_observer_cb(CFRunLoopObserverRef p_observer, CFRunLoopActivity p_activiy, void *p_context) {
+void OS_MacOS::pre_wait_observer_cb(CFRunLoopObserverRef p_observer, CFRunLoopActivity p_activiy, void *p_context) {
// Prevent main loop from sleeping and redraw window during resize / modal popups.
- DisplayServerOSX *ds = (DisplayServerOSX *)DisplayServer::get_singleton();
+ DisplayServerMacOS *ds = (DisplayServerMacOS *)DisplayServer::get_singleton();
if (get_singleton()->get_main_loop() && ds && (get_singleton()->get_render_thread_mode() != RENDER_SEPARATE_THREAD || !ds->get_is_resizing())) {
Main::force_redraw();
if (!Main::is_iterating()) { // Avoid cyclic loop.
@@ -69,13 +69,13 @@ void OS_OSX::pre_wait_observer_cb(CFRunLoopObserverRef p_observer, CFRunLoopActi
CFRunLoopWakeUp(CFRunLoopGetCurrent()); // Prevent main loop from sleeping.
}
-void OS_OSX::initialize() {
+void OS_MacOS::initialize() {
crash_handler.initialize();
initialize_core();
}
-String OS_OSX::get_processor_name() const {
+String OS_MacOS::get_processor_name() const {
char buffer[256];
size_t buffer_len = 256;
if (sysctlbyname("machdep.cpu.brand_string", &buffer, &buffer_len, NULL, 0) == 0) {
@@ -84,35 +84,35 @@ String OS_OSX::get_processor_name() const {
ERR_FAIL_V_MSG("", String("Couldn't get the CPU model name. Returning an empty string."));
}
-void OS_OSX::initialize_core() {
+void OS_MacOS::initialize_core() {
OS_Unix::initialize_core();
- DirAccess::make_default<DirAccessOSX>(DirAccess::ACCESS_RESOURCES);
- DirAccess::make_default<DirAccessOSX>(DirAccess::ACCESS_USERDATA);
- DirAccess::make_default<DirAccessOSX>(DirAccess::ACCESS_FILESYSTEM);
+ DirAccess::make_default<DirAccessMacOS>(DirAccess::ACCESS_RESOURCES);
+ DirAccess::make_default<DirAccessMacOS>(DirAccess::ACCESS_USERDATA);
+ DirAccess::make_default<DirAccessMacOS>(DirAccess::ACCESS_FILESYSTEM);
}
-void OS_OSX::finalize() {
+void OS_MacOS::finalize() {
#ifdef COREMIDI_ENABLED
midi_driver.close();
#endif
delete_main_loop();
- if (joypad_osx) {
- memdelete(joypad_osx);
+ if (joypad_macos) {
+ memdelete(joypad_macos);
}
}
-void OS_OSX::initialize_joypads() {
- joypad_osx = memnew(JoypadOSX(Input::get_singleton()));
+void OS_MacOS::initialize_joypads() {
+ joypad_macos = memnew(JoypadMacOS(Input::get_singleton()));
}
-void OS_OSX::set_main_loop(MainLoop *p_main_loop) {
+void OS_MacOS::set_main_loop(MainLoop *p_main_loop) {
main_loop = p_main_loop;
}
-void OS_OSX::delete_main_loop() {
+void OS_MacOS::delete_main_loop() {
if (!main_loop) {
return;
}
@@ -121,19 +121,19 @@ void OS_OSX::delete_main_loop() {
main_loop = nullptr;
}
-void OS_OSX::set_cmdline_platform_args(const List<String> &p_args) {
+void OS_MacOS::set_cmdline_platform_args(const List<String> &p_args) {
launch_service_args = p_args;
}
-List<String> OS_OSX::get_cmdline_platform_args() const {
+List<String> OS_MacOS::get_cmdline_platform_args() const {
return launch_service_args;
}
-String OS_OSX::get_name() const {
+String OS_MacOS::get_name() const {
return "macOS";
}
-void OS_OSX::alert(const String &p_alert, const String &p_title) {
+void OS_MacOS::alert(const String &p_alert, const String &p_title) {
NSAlert *window = [[NSAlert alloc] init];
NSString *ns_title = [NSString stringWithUTF8String:p_title.utf8().get_data()];
NSString *ns_alert = [NSString stringWithUTF8String:p_alert.utf8().get_data()];
@@ -150,7 +150,7 @@ void OS_OSX::alert(const String &p_alert, const String &p_title) {
}
}
-Error OS_OSX::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
+Error OS_MacOS::open_dynamic_library(const String p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path) {
String path = get_framework_executable(p_path);
if (!FileAccess::exists(path)) {
@@ -173,11 +173,11 @@ Error OS_OSX::open_dynamic_library(const String p_path, void *&p_library_handle,
return OK;
}
-MainLoop *OS_OSX::get_main_loop() const {
+MainLoop *OS_MacOS::get_main_loop() const {
return main_loop;
}
-String OS_OSX::get_config_path() const {
+String OS_MacOS::get_config_path() const {
// The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on macOS as well.
if (has_environment("XDG_CONFIG_HOME")) {
if (get_environment("XDG_CONFIG_HOME").is_absolute_path()) {
@@ -192,7 +192,7 @@ String OS_OSX::get_config_path() const {
return ".";
}
-String OS_OSX::get_data_path() const {
+String OS_MacOS::get_data_path() const {
// The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on macOS as well.
if (has_environment("XDG_DATA_HOME")) {
if (get_environment("XDG_DATA_HOME").is_absolute_path()) {
@@ -204,7 +204,7 @@ String OS_OSX::get_data_path() const {
return get_config_path();
}
-String OS_OSX::get_cache_path() const {
+String OS_MacOS::get_cache_path() const {
// The XDG Base Directory specification technically only applies on Linux/*BSD, but it doesn't hurt to support it on macOS as well.
if (has_environment("XDG_CACHE_HOME")) {
if (get_environment("XDG_CACHE_HOME").is_absolute_path()) {
@@ -219,7 +219,7 @@ String OS_OSX::get_cache_path() const {
return get_config_path();
}
-String OS_OSX::get_bundle_resource_dir() const {
+String OS_MacOS::get_bundle_resource_dir() const {
String ret;
NSBundle *main = [NSBundle mainBundle];
@@ -230,7 +230,7 @@ String OS_OSX::get_bundle_resource_dir() const {
return ret;
}
-String OS_OSX::get_bundle_icon_path() const {
+String OS_MacOS::get_bundle_icon_path() const {
String ret;
NSBundle *main = [NSBundle mainBundle];
@@ -244,11 +244,11 @@ String OS_OSX::get_bundle_icon_path() const {
}
// Get properly capitalized engine name for system paths
-String OS_OSX::get_godot_dir_name() const {
+String OS_MacOS::get_godot_dir_name() const {
return String(VERSION_SHORT_NAME).capitalize();
}
-String OS_OSX::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
+String OS_MacOS::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
NSSearchPathDirectory id;
bool found = true;
@@ -287,7 +287,7 @@ String OS_OSX::get_system_dir(SystemDir p_dir, bool p_shared_storage) const {
return ret;
}
-Error OS_OSX::shell_open(String p_uri) {
+Error OS_MacOS::shell_open(String p_uri) {
NSString *string = [NSString stringWithUTF8String:p_uri.utf8().get_data()];
NSURL *uri = [[NSURL alloc] initWithString:string];
// Escape special characters in filenames
@@ -298,12 +298,12 @@ Error OS_OSX::shell_open(String p_uri) {
return OK;
}
-String OS_OSX::get_locale() const {
+String OS_MacOS::get_locale() const {
NSString *locale_code = [[NSLocale preferredLanguages] objectAtIndex:0];
return String([locale_code UTF8String]).replace("-", "_");
}
-String OS_OSX::get_executable_path() const {
+String OS_MacOS::get_executable_path() const {
char pathbuf[PROC_PIDPATHINFO_MAXSIZE];
int pid = getpid();
pid_t ret = proc_pidpath(pid, pathbuf, sizeof(pathbuf));
@@ -317,7 +317,7 @@ String OS_OSX::get_executable_path() const {
}
}
-Error OS_OSX::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) {
+Error OS_MacOS::create_process(const String &p_path, const List<String> &p_arguments, ProcessID *r_child_id, bool p_open_console) {
// Use NSWorkspace if path is an .app bundle.
NSURL *url = [NSURL fileURLWithPath:@(p_path.utf8().get_data())];
NSBundle *bundle = [NSBundle bundleWithURL:url];
@@ -375,7 +375,7 @@ Error OS_OSX::create_process(const String &p_path, const List<String> &p_argumen
}
}
-Error OS_OSX::create_instance(const List<String> &p_arguments, ProcessID *r_child_id) {
+Error OS_MacOS::create_instance(const List<String> &p_arguments, ProcessID *r_child_id) {
// If executable is bundled, always execute editor instances as an app bundle to ensure app window is registered and activated correctly.
NSString *nsappname = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
if (nsappname != nil) {
@@ -387,7 +387,7 @@ Error OS_OSX::create_instance(const List<String> &p_arguments, ProcessID *r_chil
}
}
-String OS_OSX::get_unique_id() const {
+String OS_MacOS::get_unique_id() const {
static String serial_number;
if (serial_number.is_empty()) {
@@ -412,19 +412,19 @@ String OS_OSX::get_unique_id() const {
return serial_number;
}
-bool OS_OSX::_check_internal_feature_support(const String &p_feature) {
+bool OS_MacOS::_check_internal_feature_support(const String &p_feature) {
return p_feature == "pc";
}
-void OS_OSX::disable_crash_handler() {
+void OS_MacOS::disable_crash_handler() {
crash_handler.disable();
}
-bool OS_OSX::is_disable_crash_handler() const {
+bool OS_MacOS::is_disable_crash_handler() const {
return crash_handler.is_disabled();
}
-Error OS_OSX::move_to_trash(const String &p_path) {
+Error OS_MacOS::move_to_trash(const String &p_path) {
NSFileManager *fm = [NSFileManager defaultManager];
NSURL *url = [NSURL fileURLWithPath:@(p_path.utf8().get_data())];
NSError *err;
@@ -437,7 +437,7 @@ Error OS_OSX::move_to_trash(const String &p_path) {
return OK;
}
-void OS_OSX::run() {
+void OS_MacOS::run() {
force_quit = false;
if (!main_loop) {
@@ -452,7 +452,7 @@ void OS_OSX::run() {
if (DisplayServer::get_singleton()) {
DisplayServer::get_singleton()->process_events(); // Get rid of pending events.
}
- joypad_osx->process_joypads();
+ joypad_macos->process_joypads();
if (Main::iteration()) {
quit = true;
@@ -465,19 +465,19 @@ void OS_OSX::run() {
main_loop->finalize();
}
-OS_OSX::OS_OSX() {
+OS_MacOS::OS_MacOS() {
main_loop = nullptr;
force_quit = false;
Vector<Logger *> loggers;
- loggers.push_back(memnew(OSXTerminalLogger));
+ loggers.push_back(memnew(MacOSTerminalLogger));
_set_logger(memnew(CompositeLogger(loggers)));
#ifdef COREAUDIO_ENABLED
AudioDriverManager::add_driver(&audio_driver);
#endif
- DisplayServerOSX::register_osx_driver();
+ DisplayServerMacOS::register_macos_driver();
// Implicitly create shared NSApplication instance.
[GodotApplication sharedApplication];
@@ -518,7 +518,7 @@ OS_OSX::OS_OSX() {
[NSApp activateIgnoringOtherApps:YES];
}
-OS_OSX::~OS_OSX() {
+OS_MacOS::~OS_MacOS() {
CFRunLoopRemoveObserver(CFRunLoopGetCurrent(), pre_wait_observer, kCFRunLoopCommonModes);
CFRelease(pre_wait_observer);
}
diff --git a/platform/osx/platform_config.h b/platform/macos/platform_config.h
index e114606b82..e114606b82 100644
--- a/platform/osx/platform_config.h
+++ b/platform/macos/platform_config.h
diff --git a/platform/osx/platform_osx_builders.py b/platform/macos/platform_macos_builders.py
index 953ed479db..3a1cc92bd2 100644
--- a/platform/osx/platform_osx_builders.py
+++ b/platform/macos/platform_macos_builders.py
@@ -7,7 +7,7 @@ import os
from platform_methods import subprocess_main
-def make_debug_osx(target, source, env):
+def make_debug_macos(target, source, env):
if env["macports_clang"] != "no":
mpprefix = os.environ.get("MACPORTS_PREFIX", "/opt/local")
mpclangver = env["macports_clang"]
diff --git a/platform/osx/tts_osx.h b/platform/macos/tts_macos.h
index 449418e48f..344676868a 100644
--- a/platform/osx/tts_osx.h
+++ b/platform/macos/tts_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* tts_osx.h */
+/* tts_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef TTS_OSX_H
-#define TTS_OSX_H
+#ifndef TTS_MACOS_H
+#define TTS_MACOS_H
#include "core/string/ustring.h"
#include "core/templates/list.h"
@@ -45,7 +45,7 @@
#import <AVFoundation/AVFoundation.h>
#endif
-@interface TTS_OSX : NSObject <AVSpeechSynthesizerDelegate> {
+@interface TTS_MacOS : NSObject <AVSpeechSynthesizerDelegate> {
// AVSpeechSynthesizer
bool speaking;
HashMap<id, int> ids;
@@ -68,4 +68,4 @@
- (Array)getVoices;
@end
-#endif // TTS_OSX_H
+#endif // TTS_MACOS_H
diff --git a/platform/osx/tts_osx.mm b/platform/macos/tts_macos.mm
index e6a5236cd9..3c101b9531 100644
--- a/platform/osx/tts_osx.mm
+++ b/platform/macos/tts_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* tts_osx.mm */
+/* tts_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,9 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "tts_osx.h"
+#include "tts_macos.h"
-@implementation TTS_OSX
+@implementation TTS_MacOS
- (id)init {
self = [super init];
diff --git a/platform/osx/vulkan_context_osx.h b/platform/macos/vulkan_context_macos.h
index ade0f4a4c9..4dc6a12756 100644
--- a/platform/osx/vulkan_context_osx.h
+++ b/platform/macos/vulkan_context_macos.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* vulkan_context_osx.h */
+/* vulkan_context_macos.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,20 +28,20 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef VULKAN_DEVICE_OSX_H
-#define VULKAN_DEVICE_OSX_H
+#ifndef VULKAN_DEVICE_MACOS_H
+#define VULKAN_DEVICE_MACOS_H
#include "drivers/vulkan/vulkan_context.h"
#import <AppKit/AppKit.h>
-class VulkanContextOSX : public VulkanContext {
+class VulkanContextMacOS : public VulkanContext {
virtual const char *_get_platform_surface_extension() const;
public:
Error window_create(DisplayServer::WindowID p_window_id, DisplayServer::VSyncMode p_vsync_mode, id p_window, int p_width, int p_height);
- VulkanContextOSX();
- ~VulkanContextOSX();
+ VulkanContextMacOS();
+ ~VulkanContextMacOS();
};
-#endif // VULKAN_DEVICE_OSX_H
+#endif // VULKAN_DEVICE_MACOS_H
diff --git a/platform/osx/vulkan_context_osx.mm b/platform/macos/vulkan_context_macos.mm
index bdabc24c28..cf317f3c68 100644
--- a/platform/osx/vulkan_context_osx.mm
+++ b/platform/macos/vulkan_context_macos.mm
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* vulkan_context_osx.mm */
+/* vulkan_context_macos.mm */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,18 +28,18 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "vulkan_context_osx.h"
+#include "vulkan_context_macos.h"
#ifdef USE_VOLK
#include <volk.h>
#else
#include <vulkan/vulkan.h>
#endif
-const char *VulkanContextOSX::_get_platform_surface_extension() const {
+const char *VulkanContextMacOS::_get_platform_surface_extension() const {
return VK_MVK_MACOS_SURFACE_EXTENSION_NAME;
}
-Error VulkanContextOSX::window_create(DisplayServer::WindowID p_window_id, DisplayServer::VSyncMode p_vsync_mode, id p_window, int p_width, int p_height) {
+Error VulkanContextMacOS::window_create(DisplayServer::WindowID p_window_id, DisplayServer::VSyncMode p_vsync_mode, id p_window, int p_width, int p_height) {
VkMacOSSurfaceCreateInfoMVK createInfo;
createInfo.sType = VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK;
createInfo.pNext = nullptr;
@@ -52,8 +52,8 @@ Error VulkanContextOSX::window_create(DisplayServer::WindowID p_window_id, Displ
return _window_create(p_window_id, p_vsync_mode, surface, p_width, p_height);
}
-VulkanContextOSX::VulkanContextOSX() {
+VulkanContextMacOS::VulkanContextMacOS() {
}
-VulkanContextOSX::~VulkanContextOSX() {
+VulkanContextMacOS::~VulkanContextMacOS() {
}
diff --git a/platform/osx/SCsub b/platform/osx/SCsub
deleted file mode 100644
index 3a4c95613d..0000000000
--- a/platform/osx/SCsub
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-
-Import("env")
-
-from platform_methods import run_in_subprocess
-import platform_osx_builders
-
-files = [
- "os_osx.mm",
- "godot_application.mm",
- "godot_application_delegate.mm",
- "crash_handler_osx.mm",
- "osx_terminal_logger.mm",
- "display_server_osx.mm",
- "godot_content_view.mm",
- "godot_window_delegate.mm",
- "godot_window.mm",
- "key_mapping_osx.mm",
- "godot_main_osx.mm",
- "dir_access_osx.mm",
- "tts_osx.mm",
- "joypad_osx.cpp",
- "vulkan_context_osx.mm",
- "gl_manager_osx_legacy.mm",
-]
-
-prog = env.add_program("#bin/godot", files)
-
-if env["debug_symbols"] and env["separate_debug_symbols"]:
- env.AddPostAction(prog, run_in_subprocess(platform_osx_builders.make_debug_osx))
diff --git a/scene/gui/code_edit.cpp b/scene/gui/code_edit.cpp
index 22f968eac7..8968c1cc17 100644
--- a/scene/gui/code_edit.cpp
+++ b/scene/gui/code_edit.cpp
@@ -407,7 +407,7 @@ void CodeEdit::gui_input(const Ref<InputEvent> &p_gui_input) {
}
/* Ctrl + Hover symbols */
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
if (k->get_keycode() == Key::META) {
#else
if (k->get_keycode() == Key::CTRL) {
diff --git a/servers/rendering/renderer_rd/effects_rd.cpp b/servers/rendering/renderer_rd/effects_rd.cpp
index f731a0007a..ad30985a46 100644
--- a/servers/rendering/renderer_rd/effects_rd.cpp
+++ b/servers/rendering/renderer_rd/effects_rd.cpp
@@ -1304,7 +1304,7 @@ EffectsRD::EffectsRD(bool p_prefer_raster_effects) {
{
Vector<String> FSR_upscale_modes;
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
// MoltenVK does not support some of the operations used by the normal mode of FSR. Fallback works just fine though.
FSR_upscale_modes.push_back("\n#define MODE_FSR_UPSCALE_FALLBACK\n");
#else
diff --git a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
index a2a0538e04..5ede2e761d 100644
--- a/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
+++ b/servers/rendering/renderer_rd/renderer_scene_render_rd.cpp
@@ -4263,7 +4263,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
rb->volumetric_fog->fog_map = RD::get_singleton()->texture_create(tf, RD::TextureView());
RD::get_singleton()->set_resource_name(rb->volumetric_fog->fog_map, "Fog map");
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
Vector<uint8_t> dm;
dm.resize(target_width * target_height * volumetric_fog_depth * 4);
dm.fill(0);
@@ -4352,7 +4352,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
{
RD::Uniform u;
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
#else
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
@@ -4372,7 +4372,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
{
RD::Uniform u;
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
#else
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
@@ -4384,7 +4384,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
{
RD::Uniform u;
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
#else
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
@@ -4656,7 +4656,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
}
{
RD::Uniform u;
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
#else
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
@@ -4667,7 +4667,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
}
{
RD::Uniform u;
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
#else
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
@@ -4679,7 +4679,7 @@ void RendererSceneRenderRD::_update_volumetric_fog(RID p_render_buffers, RID p_e
{
RD::Uniform u;
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
u.uniform_type = RD::UNIFORM_TYPE_STORAGE_BUFFER;
#else
u.uniform_type = RD::UNIFORM_TYPE_IMAGE;
diff --git a/servers/rendering/renderer_rd/shader_rd.cpp b/servers/rendering/renderer_rd/shader_rd.cpp
index 04e05380f1..176465234e 100644
--- a/servers/rendering/renderer_rd/shader_rd.cpp
+++ b/servers/rendering/renderer_rd/shader_rd.cpp
@@ -177,7 +177,7 @@ void ShaderRD::_build_variant_code(StringBuilder &builder, uint32_t p_variant, c
for (const KeyValue<StringName, CharString> &E : p_version->code_sections) {
builder.append(String("#define ") + String(E.key) + "_CODE_USED\n");
}
-#if defined(OSX_ENABLED) || defined(IPHONE_ENABLED)
+#if defined(MACOS_ENABLED) || defined(IOS_ENABLED)
builder.append("#define MOLTENVK_USED\n");
#endif
} break;
diff --git a/tests/scene/test_code_edit.h b/tests/scene/test_code_edit.h
index d28380d056..7605f24cf8 100644
--- a/tests/scene/test_code_edit.h
+++ b/tests/scene/test_code_edit.h
@@ -3251,7 +3251,7 @@ TEST_CASE("[SceneTree][CodeEdit] symbol lookup") {
SIGNAL_WATCH(code_edit, "symbol_validate");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(code_edit, Key::META);
#else
SEND_GUI_KEY_EVENT(code_edit, Key::CTRL);
diff --git a/tests/scene/test_text_edit.h b/tests/scene/test_text_edit.h
index 5d969b1fbc..0fce359c5a 100644
--- a/tests/scene/test_text_edit.h
+++ b/tests/scene/test_text_edit.h
@@ -724,7 +724,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
CHECK(text_edit->has_selection());
CHECK(text_edit->get_selected_text() == "t");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(text_edit, Key::RIGHT | KeyModifierMask::SHIFT | KeyModifierMask::ALT)
#else
SEND_GUI_KEY_EVENT(text_edit, Key::RIGHT | KeyModifierMask::SHIFT | KeyModifierMask::CMD)
@@ -736,7 +736,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
CHECK(text_edit->has_selection());
CHECK(text_edit->get_selected_text() == "tes");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(text_edit, Key::LEFT | KeyModifierMask::SHIFT | KeyModifierMask::ALT)
#else
SEND_GUI_KEY_EVENT(text_edit, Key::LEFT | KeyModifierMask::SHIFT | KeyModifierMask::CMD)
@@ -1902,7 +1902,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
SIGNAL_DISCARD("lines_edited_from");
SIGNAL_DISCARD("caret_changed");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(text_edit, Key::LEFT | KeyModifierMask::ALT | KeyModifierMask::SHIFT);
#else
SEND_GUI_KEY_EVENT(text_edit, Key::LEFT | KeyModifierMask::CMD | KeyModifierMask::SHIFT);
@@ -2013,7 +2013,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
SIGNAL_DISCARD("lines_edited_from");
SIGNAL_DISCARD("caret_changed");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(text_edit, Key::RIGHT | KeyModifierMask::ALT | KeyModifierMask::SHIFT);
#else
SEND_GUI_KEY_EVENT(text_edit, Key::RIGHT | KeyModifierMask::CMD | KeyModifierMask::SHIFT);
@@ -2244,7 +2244,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
SIGNAL_DISCARD("lines_edited_from");
SIGNAL_DISCARD("caret_changed");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(text_edit, Key::UP | KeyModifierMask::CMD | KeyModifierMask::SHIFT);
#else
SEND_GUI_KEY_EVENT(text_edit, Key::HOME | KeyModifierMask::CMD | KeyModifierMask::SHIFT);
@@ -2285,7 +2285,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
SIGNAL_DISCARD("lines_edited_from");
SIGNAL_DISCARD("caret_changed");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(text_edit, Key::DOWN | KeyModifierMask::CMD | KeyModifierMask::SHIFT);
#else
SEND_GUI_KEY_EVENT(text_edit, Key::END | KeyModifierMask::CMD | KeyModifierMask::SHIFT);
@@ -2326,7 +2326,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
SIGNAL_DISCARD("lines_edited_from");
SIGNAL_DISCARD("caret_changed");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(text_edit, Key::LEFT | KeyModifierMask::CMD | KeyModifierMask::SHIFT);
#else
SEND_GUI_KEY_EVENT(text_edit, Key::HOME | KeyModifierMask::SHIFT);
@@ -2383,7 +2383,7 @@ TEST_CASE("[SceneTree][TextEdit] text entry") {
SIGNAL_DISCARD("lines_edited_from");
SIGNAL_DISCARD("caret_changed");
-#ifdef OSX_ENABLED
+#ifdef MACOS_ENABLED
SEND_GUI_KEY_EVENT(text_edit, Key::RIGHT | KeyModifierMask::CMD | KeyModifierMask::SHIFT);
#else
SEND_GUI_KEY_EVENT(text_edit, Key::END | KeyModifierMask::SHIFT);