summaryrefslogtreecommitdiff
path: root/platform/osx/os_osx.mm
AgeCommit message (Collapse)Author
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.
2020-02-11Improve HiDPI handling, fix incorrect window viewport clipping.bruvzg
2020-02-11Add runtime GLES2 / Vulkan context selection.bruvzg
2020-02-11Add static Vulkan loader.bruvzg
Initial Vulkan support for Windows. Initial Vulkan support for macOS.
2020-02-11Texture refactorJuan Linietsky
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
2020-02-10Merge pull request #35301 from Calinou/improve-console-error-loggingRémi Verschelde
Improve the console error logging appearance
2020-02-05Remove duplicate ERR_PRINT macro.Marcel Admiraal
2020-01-31Adds extra cursors for macOSHaoyu Qiu
Before, plain arrow cursor or unsuitable ones were used.
2020-01-19Improve the console error logging appearanceHugo Locurcio
This makes secondary information less visually prominent to improve overall readability. Various loggers were also tweaked for consistency.
2020-01-14Fixes IME input backspace on macOSHaoyu Qiu
2020-01-10[macOS] Load PCK from the .app bundle resources, instead of changing working ↵bruvzg
directory.
2020-01-06Merge pull request #33967 from Calinou/add-os-is-window-focusedRémi Verschelde
Add an `OS.is_window_focused()` getter
2020-01-01Update copyright statements to 2020Rémi Verschelde
Happy new year to the wonderful Godot community! We're starting a new decade with a well-established, non-profit, free and open source game engine, and tons of further improvements in the pipeline from hundreds of contributors. Godot will keep getting better, and we're looking forward to all the games that the community will keep developing and releasing with it.
2019-12-08[macOS] Send resize event without actually resizing window on backing change.bruvzg
Co-authored-by: Haoyu Qiu <timothyqiu32@gmail.com>
2019-12-01iOS modular build and export implementation.bruvzg
2019-11-28Add an `OS.is_window_focused()` getterHugo Locurcio
This makes it possible to know whether the window is focused at a given time, without having to track the focus state manually using `NOTIFICATION_WM_FOCUS_IN` and `NOTIFICATION_WM_FOCUS_OUT`. This partially addresses #33928.
2019-11-25[macOS] Fix locale detection.bruvzg
2019-11-21[macOS] Remove CVDisplayLink v-sync hack.bruvzg
2019-10-30[macOS, Windows, X11] Add graphic tablet pen pressure and tilt support to ↵bruvzg
InputEventMouseMotion event.
2019-10-24Fix compilation warnings in macOS build, enable `warnings=extra werror=yes` ↵bruvzg
for macOS CI.
2019-10-13Fix non-HiDPI mode on HiDPI displays on macOS Catalina.bruvzg
2019-10-03Properly revert cursor when using set_custom_mouse_cursor with nullPouleyKetchoupp
Fixes #32486
2019-08-26[macOS] Add methods to modify global and dock menus. Add ability to open ↵bruvzg
multiple editor/project manager instances, recent/favourite project list to project manager dock menu and opened scene list to editor dock menu.
2019-08-09Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in "platform", ↵Robin Hübner
"modules/gdnative", "modules/gdscript" directories.
2019-07-30Turn `OS.set_min/max_window_size()` warnings into errorsHugo Locurcio
Since invalid values will cause the setting to be discarded, it makes more sense to display an error message instead of a warning message.
2019-07-24Fix crash caused by a9a0d0fb15cc5e028dbf8dab8b46d3dc197c4678Guilherme Felipe
2019-07-09Fix cursor blinking in integrated GPUsGuilherme Felipe
Optimization for Input::set_custom_mouse_cursor when used inside _process function. (Avoids cursor blinking in low end devices)
2019-06-18Update macOS global mouse position at startupbruvzg