summaryrefslogtreecommitdiff
path: root/platform/osx/os_osx.mm
AgeCommit message (Collapse)Author
2022-04-29Add GDNativeInterface::get_library_path to GDExtensionEmmanuel Leblond
2022-04-11Make FileAccess and DirAccess classes reference counted.bruvzg
2022-04-04[macOS] Add bundle launch code for older (pre 10.15) macOS versions.bruvzg
2022-03-04[macOS] Disable window redraw during resize, when rendering in the separate ↵bruvzg
thread.
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-15Add an `OS.get_processor_name()` methodHugo Locurcio
This method can be used to get the CPU model name. It can be used in conjunction with `RenderingServer.get_video_adapter_name()` and `RenderingServer.get_video_adapter_vendor()` for annotating benchmarks and automatic graphics quality configuration.
2022-02-01[macOS] Cleanup and split Objective-C objects to the separate filesbruvzg
2022-02-01[macOS] Enable Objective-C ARCbruvzg
2022-01-17Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde
2022-01-11[macOS] Improve window activation hack.bruvzg
2022-01-06Fix multiple missing UTF-8 decoding.bruvzg
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2021-12-18[Windows] Improve console handling and execute/create_process.bruvzg
Always build with the GUI subsystem. Redirect stdout and stderr output to the parent process console. Use CreateProcessW for blocking `execute` calls with piped stdout and stderr (prevent console windows for popping up when used with the GUI subsystem build, and have more consistent behavior with `create_process`). Add `open_console` argument to the `execute` and `create_process` to open a new console window. Remove `interface/editor/hide_console_window` editor setting. Remove `Toggle System Console` menu option. Remove `set_console_visible` and `is_console_visible` functions.
2021-11-26Fix console colors on WindowsYuri Roubinsky
2021-11-08[macOS] Use pre-wait observer to keep main run loop running and redraw ↵bruvzg
window during the window resize and displaying modal popups.
2021-11-01[macOS] Add `create_instance` function to spawn editor copies.bruvzg
[macOS] Modify `create_project` function to detect and run app bundles using NSWorkspace to ensure app window is registered and activated correctly.
2021-10-14Implement toast notifications in the editorGilles Roudière
2021-10-01Implement TextServer GDExtension interface, remove TextServer GDNative ↵bruvzg
interface.
2021-09-30Merge pull request #48685 from bruvzg/bundle_icon_4Rémi Verschelde
2021-08-16Add partial support for Android scoped storage.ne0fhyk
This is done by providing API access to app specific directories which don't have any limitations and allows us to bump the target sdk version to 30. In addition, we're also bumping the min sdk version to 19 as version 18 is no longer supported by Google Play Services and only account of 0.3% of Android devices.
2021-07-25Fix various typos with codespellluz paz
Found via `codespell -q 3 -S ./thirdparty,*.po,./DONORS.md -L ackward,ang,ans,ba,beng,cas,childs,childrens,dof,doubleclick,fave,findn,hist,inout,leapyear,lod,nd,numer,ois,ony,paket,seeked,sinc,switchs,te,uint`
2021-07-22Move `alert` function from `DisplayServer` to `OS`.bruvzg
2021-06-03Rename `String.is_abs_path()` to `String.is_absolute_path()`Hugo Locurcio
This is more consistent with `NodePath.is_absolute()`.
2021-05-21OS: Remove code duplicate in XDG paths handlingRémi Verschelde
Follow-up to #48542.
2021-05-20Only allow absolute paths in XDG environment variablesHugo Locurcio
The XDG Base Directory specification does not allow using relative paths (which broke things in Godot anyway). If a relative path is detected, it should be ignored.
2021-05-13[macOS] Prefer .app bundle icon over the default one.bruvzg
2021-04-29Replace remaining uses of `NULL` with `nullptr`Rémi Verschelde
Follow-up to #38736 (these uses were likely added after this PR was merged).
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-28Merge pull request #44593 from madmiraal/rename-mainloop-methodsRémi Verschelde
Rename MainLoop methods to match Node methods
2020-12-28Rename empty() to is_empty()Marcel Admiraal
2020-12-22Rename MainLoop methods to match Node methodsMarcel Admiraal
2020-12-10Merge pull request #40708 from bruvzg/improve_os_localeRémi Verschelde
Improve `OS::get_locale()` and documentation.
2020-08-16Port ClassDB tests to use doctestAndrii Doroshenko (Xrayez)
Extracted the most minimal core initialization functionality from `setup()` and `setup2()` so that `ClassDB` could be tested properly (input, audio, rendering, physics etc, are excluded). Display and rendering servers/singletons are not initialized at all. Due to the fact that most subsystems are disabled, fixed various crashes in the process (in order): - `AcceptDialog` OK/cancel swap behavior (used `DisplayServer` while `register_scene_types()`); - `make_default_theme` which depends on `RenderingServer`; - `XRServer` singleton access while calling `register_modules_types()`; - hidden bug in a way joypads are cleaned up (MacOS and Linux only). Removed manual `ClassDB` init/cleanup calls from `test_validate_testing.h`. ClassDB tests: Co-authored-by: Ignacio Etcheverry <ignalfonsore@gmail.com>
2020-08-11Improve `OS::get_locale()` on macOS and Windows, replace "-" with "_" and ↵bruvzg
use system macros instead of bitwise AND. Add locale format info to the documentation.
2020-07-13Commit other files changed by file_format.shAaron Franke
2020-07-03Fix opening URLS with special characters in macOSDaniel Ting
The Online Tutorials section of InputMap in the editor's built-in documentation viewer contains this link: docs.godotengine.org/en/latest/tutorials/inputs/inputevent.html#inputmap The macOS implementation for opening a link percent-encodes it before sending it to the browser, resulting in a 404. This is to fix #13422 where filenames with special characters could not be opened in Finder. However, this breaks URLS so I added a check to see if the resource scheme is file:// and if so, only then is it escaped. This allows other schemes like `http`, `ftp`, and `mailto` to be used.
2020-05-14Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde
Which means that reduz' beloved style which we all became used to will now be changed automatically to remove the first empty line. This makes us lean closer to 1TBS (the one true brace style) instead of hybridating it with some Allman-inspired spacing. There's still the case of braces around single-statement blocks that needs to be addressed (but clang-format can't help with that, but clang-tidy may if we agree about it). Part of #33027.
2020-04-28Rename InputFilter back to InputRémi Verschelde
It changed name as part of the DisplayServer and input refactoring in #37317, with the rationale that input no longer goes through the main loop, so the previous Input singleton now only does filtering. But the gains in consistency are quite limited in the renaming, and it breaks compatibility for all scripts and tutorials that access the Input singleton via the scripting language. A temporary option was suggested to keep the scripting singleton named `Input` even if its type is `InputFilter`, but that adds inconsistency and breaks C#. Fixes godotengine/godot-proposals#639. Fixes #37319. Fixes #37690.
2020-04-26[macOS] Re-add define for build with 10.14 SDK, remove unsupported 10.12 checks.bruvzg
2020-03-26Add macOS DisplayServer implementation.bruvzg
Change global menu to use Callable, add support for check items and submenus.
2020-03-17Style: Set clang-format Standard to Cpp11Rémi Verschelde
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
2020-03-03Drop old semaphore implementationPedro J. Estébanez
- Removed platform-specific implementations. - Now all semaphores are in-object, unless they need to be conditionally created. - Similarly to `Mutex`, provided a dummy implementation for when `NO_THREADS` is defined. - Similarly to `Mutex`, methods are made `const` for easy use in such contexts. - Language bindings updated: `wait()` and `post()` are now `void`. - Language bindings updated: `try_wait()` added. Bonus: - Rewritten the `#ifdef` in `mutex.h` to meet the code style.
2020-02-25Rename `scancode` to `keycode`.bruvzg
Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
2020-02-22Travis: Use Ubuntu 18.04 (bionic) as base imageRémi Verschelde
It's now available and allows us to have a better default environment, with GCC 7.4.0 and Clang 7. We now need GCC 7+ for C++17 support so it's more efficient to upgrade the image than to install it on Ubuntu 16.04 (xenial). Also fixes a couple -Wdeprecated-declarations warnings on macOS now that we build against macOS 10.12.
2020-02-18PoolVector is gone, replaced by VectorJuan Linietsky
Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
2020-02-14Remove incomplete battery status/power APIRémi Verschelde
It was initially implemented in #5871 for Godot 3.0, but never really completed or thoroughly tested for most platforms. It then stayed in limbo and nobody seems really keen to finish it, so it's better to remove it in 4.0, and re-add eventually (possibly with a different API) if there's demand and an implementation confirmed working on all platforms. Closes #8770.
2020-02-11Restore parts of #33783 and #32809 missing after rebase.bruvzg
2020-02-11Fix code formatting issues and VS compilationRémi Verschelde
Also temporarily disable multicheck build so that we get a full build even when there are style issues on Vulkan. Fixes #33356.
2020-02-11Merge pull request #32821 from bruvzg/vlk_fix_macos_exitRémi Verschelde
[Vulkan, macOS] Fix RID leaks and crashes on exit.
2020-02-11Move Vulkan context/rendering_device destruction to windowWillClose ↵bruvzg
notification.