summaryrefslogtreecommitdiff
path: root/core/bind
AgeCommit message (Collapse)Author
2020-04-28Warn when trying to open `res://` or `user://` with `OS.shell_open()`Hugo Locurcio
`OS.shell_open()` will pass on the path directly to the OS' shell handler (which can handle file paths or URLs). It can't handle Godot-specific paths, so these need to be converted with `ProjectSettings.globalize_path()` first.
2020-04-02Replace NULL with nullptrlupoDharkael
2020-03-30SCons: Format buildsystem files with psf/blackRémi Verschelde
Configured for a max line length of 120 characters. psf/black is very opinionated and purposely doesn't leave much room for configuration. The output is mostly OK so that should be fine for us, but some things worth noting: - Manually wrapped strings will be reflowed, so by using a line length of 120 for the sake of preserving readability for our long command calls, it also means that some manually wrapped strings are back on the same line and should be manually merged again. - Code generators using string concatenation extensively look awful, since black puts each operand on a single line. We need to refactor these generators to use more pythonic string formatting, for which many options are available (`%`, `format` or f-strings). - CI checks and a pre-commit hook will be added to ensure that future buildsystem changes are well-formatted.
2020-03-26Effective DisplayServer separation, rename X11 -> LinuxBSDJuan Linietsky
2020-03-18doc: Sync classref with current sourceRémi Verschelde
Fix wrong binding after #37111.
2020-03-17Merge pull request #37111 from RandomShaper/imvu/unexpose_include_driveRémi Verschelde
Remove meaningless parameter from bindings
2020-03-17Remove meaningless parameter from bindingsPedro J. Estébanez
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-05Merge pull request #36752 from RandomShaper/rework_semaphoreRémi Verschelde
Drop old semaphore implementation
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-03-03Improve UX of drive lettersPedro J. Estébanez
Namely, move the drive dropdown to just the left of the path text box and don't include the former in the latter. This improves the UX on Windows. In the UNIX case, since its concept of drives is (ab)used to provide shortcuts to useful paths, its dropdown is kept at the original location.
2020-03-01Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde
Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
2020-02-29doc: Sync classref with current sourceRémi Verschelde
2020-02-28Removed interactive loader, added proper thread loading.Juan Linietsky
2020-02-26Reimplement Mutex with C++'s <mutex>Pedro J. Estébanez
Main: - It's now implemented thanks to `<mutex>`. No more platform-specific implementations. - `BinaryMutex` (non-recursive) is added, as an alternative for special cases. - Doesn't need allocation/deallocation anymore. It can live in the stack and be part of other classes. - Because of that, it's methods are now `const` and the inner mutex is `mutable` so it can be easily used in `const` contexts. - A no-op implementation is provided if `NO_THREADS` is defined. No more need to add `#ifdef NO_THREADS` just for this. - `MutexLock` now takes a reference. At this point the cases of null `Mutex`es are rare. If you ever need that, just don't use `MutexLock`. - Thread-safe utilities are therefore simpler now. Misc.: - `ScopedMutexLock` is dropped and replaced by `MutexLock`, because they were pretty much the same. - Every case of lock, do-something, unlock is replaced by `MutexLock` (complex cases where it's not straightfoward are kept as as explicit lock and unlock). - `ShaderRD` contained an `std::mutex`, which has been replaced by `Mutex`.
2020-02-25Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky
- Renames PackedIntArray to PackedInt32Array. - Renames PackedFloatArray to PackedFloat32Array. - Adds PackedInt64Array and PackedFloat64Array. - Renames Variant::REAL to Variant::FLOAT for consistency. Packed arrays are for storing large amount of data and creating stuff like meshes, buffers. textures, etc. Forcing them to be 64 is a huge waste of memory. That said, many users requested the ability to have 64 bits packed arrays for their games, so this is just an optional added type. For Variant, the float datatype is always 64 bits, and exposed as `float`. We still have `real_t` which is the datatype that can change from 32 to 64 bits depending on a compile flag (not entirely working right now, but that's the idea). It affects math related datatypes and code only. Neither Variant nor PackedArray make use of real_t, which is only intended for math precision, so the term is removed from there to keep only float.
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-24Core: Change _Marshall class inherit from Reference to ObjectMateo Dev .59
2020-02-20Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky
objects and made them default.
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-13Remove more deprecated methods and codeRémi Verschelde
2020-02-13Remove obsolete GLES3 backendRémi Verschelde
Due to the port to Vulkan and complete redesign of the rendering backend, the `drivers/gles3` code is no longer usable in this state and is not planned to be ported to the new architecture. The GLES2 backend is kept (while still disabled and non-working) as it will eventually be ported to serve as the low-end renderer for Godot 4.0. Some GLES3 features might be selectively ported to the updated GLES2 backend if there's a need for them, and extensions we can use for that. So long, OpenGL driver bugs!
2020-02-11Merge pull request #29993 from bruvzg/vulkanRémi Verschelde
Initial Vulkan support for macOS (MoltenVK) and Windows
2020-02-11Add static Vulkan loader.bruvzg
Initial Vulkan support for Windows. Initial Vulkan support for macOS.
2020-02-11Added a spinlock template as well as a thread work pool class.Juan Linietsky
Also, optimized shader compilation to happen on threads.
2020-02-05Remove duplicate WARN_PRINT macro.Marcel Admiraal
2020-02-05Remove duplicate ERR_PRINT macro.Marcel Admiraal
2020-01-23Make `OS.execute()` blocking by default if not specifiedHugo Locurcio
This makes `OS.execute()` calls quicker to set up when calling programs in a blocking fashion.
2020-01-22Thread: Fix typo in destructor error messageRémi Verschelde
2020-01-14Merge pull request #35092 from AndreaCatania/frames_expRémi Verschelde
Exposed physics frame count and idle frame count
2020-01-13Exposed physics frame count and idle frame countAndrea Catania
2020-01-13Revert "Enable Vsync via Compositor by default"Rémi Verschelde
This reverts commit 9600fd5dde1f85b7dd2dd8558d52ff86b18651e7. Add comment warning about possible implications of using this option. Fixes #35038.
2020-01-09Enable Vsync via Compositor by defaultHugo Locurcio
This feature was added in #33414 but it was disabled by default. Now that it got some testing, it's probably safe to enable it by default.
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-29Print a warning message if `OS.exit_code` is set to a non-portable valueHugo Locurcio
This also improves the related documentation.
2019-12-04Added support for vertical syncing via the Windows OS compositor (DWM.)TerminalJack
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-08Expose the `OS.low_processor_usage_mode_sleep_usec` propertyHugo Locurcio
This makes it possible to change it at runtime in projects.
2019-10-31Provide and print error messages for JSON parsingAndrii Doroshenko (Xrayez)
Core is not touched, only for binding and scripting.
2019-10-22Add request permission automatically at androidCagdas
2019-09-26Added an exit code to the blocking mode of OS::executeRuslan Mullayanov
Updated documentation accordingly. Fixes #31881.
2019-09-25Added some obvious errors explanationsqarmin
2019-09-01Remove redundant transform method in Geometry singletonAndrii Doroshenko (Xrayez)
Transform2D's xform method can be used instead which handles `PoolVector2Array` now (as well as 3D version).
2019-08-27Add 'is_point_in_circle()' to Geometry class, and general file cleanupMichael Alexsander Silva Dias
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-19Move CryptoCore to it's own folder.Fabio Alessandrelli
Crypto classes will be placed in core/crypto.
2019-08-17Replace 'ERR_EXPLAIN' with 'ERR_FAIL_*_MSG' in 'core/' and 'editor/'Braden Bodily
Condensed some if and ERR statements. Added dots to end of error messages Couldn't figure out EXPLAINC. These files gave me trouble: core/error_macros.h, core/io/file_access_buffered_fa.h (where is it?), core/os/memory.cpp, drivers/png/png_driver_common.cpp, drivers/xaudio2/audio_driver_xaudio2.cpp (where is it?)
2019-07-18Merge pull request #30226 from lawnjelly/interpolateRémi Verschelde
Add access to interpolation fraction for fixed timestep interpolation