summaryrefslogtreecommitdiffstats
path: root/core/core_bind.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace most uses of Map by HashMapreduz2022-05-161-2/+2
| | | | | | | | | | | | * Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
* Add OS::is_process_running function.mdavisprog2022-05-031-0/+1
| | | | | | | | Adds the is_process_running function to the native OS class and exposes it to script. This is implemented on Windows and Unix platforms. A stub is provided for other platforms that do not support this function. Documentation is updated to reflect new API function.
* Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-031-4/+4
| | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* Expose move_to_trash()kobewi2022-04-271-0/+1
|
* Make FileAccess and DirAccess classes reference counted.bruvzg2022-04-111-4/+2
|
* Zero initialize all pointer class and struct membersRémi Verschelde2022-04-041-1/+1
| | | | | This prevents the pitfall of UB when checking if they have been assigned something valid by comparing to nullptr.
* Merge pull request #59548 from akien-mga/obj-remove-unused-categoriesRémi Verschelde2022-03-281-1/+0
|\
| * Object: Remove unused category boilerplateRémi Verschelde2022-03-261-1/+0
| | | | | | | | | | | | | | | | | | We might want to re-add something like this if/when we find a good use case for it and do the effort to categorize all objects in the API properly. Until then, it's better to remove that boilerplate since it's not needed. Closes #18711.
* | Add GDExtension support to Scriptreduz2022-03-271-0/+5
|/ | | | | | | | | * Ability to create script languages from GDExtension * Some additions to gdnative_extension.h to make this happen * Moved the GDExtension binder to core This now allows creating scripting languages from GDExtension, with the same ease as if it was a module. It replaces the old PluginScript from Godot 3.x. Warning: GodotCPP will need to be updated to support this (it may be a bit of work as ScriptInstance needs to be created over there again).
* Add static method support to ClassDBreduz2022-03-221-1/+1
| | | | | | | | | * Based on the work done for Variant in the past. * Added `ClassDB::bind_static_method` * Cleaned up ClassDB::bind_method to use variadic templates. This adds support for having static methods in Object derived classes. Note that this does not make it work yet in GDScript or Mono and, while it works for GDExtension, GodotCPP needs to be updated.
* Merge pull request #57930 from piiertho/bugfix/add-none-flag-to-resource-saverRémi Verschelde2022-03-071-1/+2
|\
| * Fix ResourceSaver::save method exposition flag parameterPierre-Thomas Meisels2022-03-071-1/+2
| | | | | | | | | | enh: Add FLAG_NONE to SaverFlags in ResourceSaver to fix api inconsistency fix: flags parameter of ResourceSaver::save is now uint32_t to allow flag composition in scripts
* | Add an `OS.get_processor_name()` methodHugo Locurcio2022-02-151-0/+1
| | | | | | | | | | | | | | | | 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.
* | [Debugger] New extensible EngineProfiler class.Fabio Alessandrelli2022-02-061-22/+3
|/ | | | | Uses GDExtension, replaces old Callable system for profilers, and is also used internally.
* Merge pull request #56012 from bruvzg/wt🤎4Rémi Verschelde2022-01-171-2/+2
|\
| * [Windows] Improve console handling and execute/create_process.bruvzg2021-12-181-2/+2
| | | | | | | | | | | | | | | | | | | | 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.
* | Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
|/ | | | Happy new year to the wonderful Godot community!
* Improve Directory content navigationTomasz Chabora2021-12-101-6/+13
|
* Add an `OS.crash()` method for testing system crash handlerHugo Locurcio2021-12-031-0/+1
| | | | | This makes it possible to test the system's crash handler without having to modify engine code or exploit an engine bug.
* Expose Thread::get_main_id in core bindingsBrian Semrau2021-11-121-0/+1
|
* Use "enum class" for input enumsAaron Franke2021-11-121-3/+3
|
* [macOS] Add `create_instance` function to spawn editor copies.bruvzg2021-11-011-0/+1
| | | | [macOS] Modify `create_project` function to detect and run app bundles using NSWorkspace to ensure app window is registered and activated correctly.
* Use OpenGL 3.3 core profile instead of compatibility profileClay John2021-10-311-1/+1
| | | | | | | | | | - Rename OpenGL to GLES3 in the source code per community feedback. - The renderer is still exposed as "OpenGL 3" to the user. - Hide renderer selection dropdown until OpenGL support is more mature. - The renderer can still be changed in the Project Settings or using the `--rendering-driver opengl` command line argument. - Remove commented out exporter code. - Remove some OpenGL/DisplayServer-related debugging prints.
* Rename GLES2 driver to OpenGL to prepare for the upgrade to GLES3Hugo Locurcio2021-10-301-1/+1
| | | | | - Use lowercase driver names for the `--rendering-driver` command line argument.
* Save all 64 bits of get_ticks_msec() in more casesMax Hilbrunner2021-10-261-1/+1
|
* [core_bind] Add `is_alive` to Thread. Replace `is_active` with `is_started`.Brian Semrau2021-10-061-2/+3
| | | | Replacing `is_active` resolves an API discrepancy between core_bind Thread and core/os Thread.
* Use Callable in Thread::startLATRio2021-09-251-3/+2
|
* Implement `OS::get_locale_language()` helper methodRémi Verschelde2021-09-161-0/+1
| | | | | | | | | This method extracts the 2 or 3-letter language code from `OS::get_locale()`, making it easier for users to identify the "main" language code for users that might have different OS locales due to different OS or region, but should be matched to the same translation (e.g. "generic" Spanish). Fixes #40703.
* Expose enum related methods in ClassDBHaoyu Qiu2021-09-111-0/+5
|
* Add ability to register singletons from engine APIreduz2021-08-251-2/+5
| | | | | * Exposed functions in Engine to register and unregister singletons. * Added the concept of user singletons, which can be removed (the system ones can't).
* Namespaces instead of underscore prefix for bindsMax Hilbrunner2021-08-171-84/+92
| | | | | | Thanks to neikeq for the initial work. Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
* Add partial support for Android scoped storage.ne0fhyk2021-08-161-2/+1
| | | | | 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.
* Rename `iterations_per_second` to `physics_ticks_per_second`Hugo Locurcio2021-08-111-2/+2
| | | | | | | | This makes it clearer that this property is only about physics FPS, not rendering FPS. The `physics_fps` project setting was also renamed to `physics_ticks_per_second` for consistency.
* Use doubles for time in many other placesAaron Franke2021-08-091-7/+7
|
* [Core] Expose ResourceLoader.get_resource_uid.Fabio Alessandrelli2021-08-091-0/+1
|
* Fix various typos with codespellluz paz2021-07-251-3/+3
| | | | 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`
* Move `alert` function from `DisplayServer` to `OS`.bruvzg2021-07-221-0/+2
|
* Merge pull request #48359 from Calinou/add-engine-print-error-propertyRémi Verschelde2021-06-201-0/+3
|\
| * Add `Engine.print_error_messages` property to disable printing errorsHugo Locurcio2021-05-011-0/+3
| | | | | | | | | | | | | | | | This can be used during unit test suite runs to hide error and warning messages. Care should be taken when using this feature, as it can hide important information if used wrongly.
* | Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-2/+2
| |
* | Merge pull request #44806 from madmiraal/consolidate_jsonRémi Verschelde2021-06-191-48/+0
|\ \ | | | | | | Consolidate JSON, JSONParseResults and JSONParser into JSON
| * | Consolidate JSON, JSONParseResults and JSONParser into JSONMarcel Admiraal2021-06-191-48/+0
| | | | | | | | | | | | | | | Renames JSON.parse_string() to parse() Renames JSON.decode_data() to stringify()
* | | Expose OS data directory getter methodsHugo Locurcio2021-06-191-0/+3
|/ / | | | | | | | | | | This can be used by editor plugins and non-game applications to store data in the correct directories according to the XDG Base Directory specification.
* | Merge pull request #49123 from aaronfranke/it-is-timeRémi Verschelde2021-06-121-8/+0
|\ \ | | | | | | Add a Time singleton
| * | Add Time singletonAaron Franke2021-06-111-8/+0
| | |
* | | Rename Reference to RefCountedPedro J. Estébanez2021-06-111-12/+12
| | |
* | | Merge pull request #49511 from akien-mga/core-diraccess-fileaccess-ioRémi Verschelde2021-06-111-2/+2
|\ \ \ | | | | | | | | Core: Move DirAccess and FileAccess to `core/io`
| * | | Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-2/+2
| |/ / | | | | | | | | | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* | | Merge pull request #34566 from Heikki00/34541_to_json_precisionRémi Verschelde2021-06-111-1/+1
|\ \ \ | |/ / |/| | Increased String::num default decimal precision
| * | Increase String::num default decimal precisionHeikki Simojoki2021-05-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #34541 Renamed MAX_DIGITS to MAX_DECIMALS, since it only changes the amount of digits after the decimal point. Increased MAX_DECIMALS to 32, and made String::num use MAX_DECIMALS consistently. If -1 is passed as decimal precision to String::num, it now gets changed to the correct precision based on the number's magnitude, instead of using printf default(which is 6) String::num_real also calculates the correct precision now. Also made the types used in floating-point math more consistent in a few places.