summaryrefslogtreecommitdiffstats
path: root/platform/android/java_godot_lib_jni.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use BitField<> in core type masksJuan Linietsky2023-01-081-5/+5
| | | | | | | | * All core types masks are now correctly marked as bitfields. * The enum hacks in MouseButtonMask and many other types are gone. This ensures that binders to other languages non C++ can actually implement type safe bitmasks. * Most bitmask operations replaced by functions in BitField<> * Key is still a problem because its enum and mask at the same time. While it kind of works in C++, this most likely can't be implemented safely in other languages and will have to be changed at some point. Mostly left as-is. * Documentation and API dump updated to reflect bitfields in core types.
* One Copyright Update to rule them allRémi Verschelde2023-01-051-29/+29
| | | | | | | | | | | | | | | | | | | | As many open source projects have started doing it, we're removing the current year from the copyright notice, so that we don't need to bump it every year. It seems like only the first year of publication is technically relevant for copyright notices, and even that seems to be something that many companies stopped listing altogether (in a version controlled codebase, the commits are a much better source of date of publication than a hardcoded copyright statement). We also now list Godot Engine contributors first as we're collectively the current maintainers of the project, and we clarify that the "exclusive" copyright of the co-founders covers the timespan before opensourcing (their further contributions are included as part of Godot Engine contributors). Also fixed "cf." Frenchism - it's meant as "refer to / see".
* Fix 'save & restart' logic for the Android EditorFredia Huya-Kouadio2022-11-161-21/+36
|
* Merge pull request #67578 from KoBeWi/GEDITORRémi Verschelde2022-10-311-1/+1
|\ | | | | | | Unify usage of GLOBAL/EDITOR_GET
| * Unify usage of GLOBAL/EDITOR_GETkobewi2022-10-181-1/+1
| |
* | Add double_tap attribute to InputEventScreenTouchFredia Huya-Kouadio2022-10-221-2/+2
|/ | | | This provides parity with the `InputEventMouseButton` allowing for proper conversion between the two events.
* Merge pull request #65501 from m4gr3d/fix_invalid_project_manager_path_mainRémi Verschelde2022-09-081-6/+7
|\ | | | | | | Fix issue causing the project manager to crash because of missing path argument
| * Fix issue causing the project manager to crash because of missing path argumentFredia Huya-Kouadio2022-09-071-6/+7
| | | | | | | | In the process, the initialization logic is updated to show an error message and gracefully close the engine when setup errors occur.
* | Cleanup the Android input logic implementationFredia Huya-Kouadio2022-09-071-27/+17
|/
* Fix incorrect Android scancodesMarcel Admiraal2022-07-131-3/+2
|
* Add full support for Android scoped storage.Fredia Huya-Kouadio2022-07-051-6/+8
| | | | | This was done by refactoring directory and file access handling for the Android platform so that any general filesystem access type go through the Android layer. This allows us to validate whether the access is unrestricted, or whether it falls under scoped storage and thus act appropriately.
* Fix exit code of --help and --version, and test them in CIJan Haller2022-07-021-0/+1
| | | | Corrects prior regression which caused ERROR output and exit code of 1.
* Remove broken scroll gesture on AndroidMarcel Admiraal2022-06-211-9/+0
|
* Cleanup Android C++ codeMarcel Admiraal2022-05-311-19/+12
|
* Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and ↵bruvzg2022-04-281-0/+6
| | | | | | Windows. Implement TextServer word break method.
* Fix the issue causing the screen to be black after resuming when in low ↵Fredy Huya-Kouadio2022-04-251-0/+2
| | | | | | processor mode. This is done by forcing a redraw and buffers swap when resuming the app.
* Fix flickering issues with low processor mode on AndroidFredia Huya-Kouadio2022-03-291-5/+8
|
* Android port of the Godot EditorFredy Huya-Kouadio2022-03-281-1/+5
| | | | | | | These set of changes focus primarily on getting the core logic and overall Godot Editor UI and functionality up and running natively on Android devices. UI tweaks / cleanup / polish, as well configuration for Android specific functionality / restrictions will be addressed in follow-up PRs iteratively based on feedback. Co-authored-by: thebestnom <shoval.arad@gmail.com>
* Remove VARIANT_ARG* macrosreduz2022-03-091-5/+7
| | | | | | | | * Very old macros from the time Godot was created. * Limited arguments to 5 (then later changed to 8) in many places. * They were replaced by C++11 Variadic Templates. * Renamed methods that take argument pointers to have a "p" suffix. This was used in some places and not in others, so made it standard. * Also added a dereference check for Variant*. Helped catch a couple of bugs.
* Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde2022-02-161-16/+30
| | | | | Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* Use "enum class" for input enumsAaron Franke2021-11-121-11/+15
|
* Drop broken Android 32-bit framebuffer setting for a reliable one for depth ↵Pedro J. Estébanez2021-11-011-2/+1
| | | | buffer
* Switch to input buffering on AndroidPedro J. Estébanez2021-08-131-40/+59
| | | | | | | | | | Key, touch and joystick events will be passed directly from the UI thread to Godot, so they can benefit from agile input flushing. As another consequence of this new way of passing events, less Java object are created at runtime (`Runnable`), which is good since the garbage collector needs to run less. `AndroidInputHandler` is introduced to have a smaller cross-thread surface. `main_loop_request_go_back()` is removed in favor just inline calling `send_window_event()` at the most caller's convenience (i.e., leveraging the new `p_deferred`` parameter as appropriate). Lastly, `get_mouse_position()` and `get_mouse_button_state()` now just call through `Input` to avoid the need of sync of mouse data tracked on the UI thread.
* Merge pull request #50206 from groud/undoredo_increase_args_countRémi Verschelde2021-07-201-2/+2
|\ | | | | Increase the number of arguments accepted by UndoRedo methods
| * Increase the number of arguments accepted by UndoRedo methodsGilles Roudière2021-07-061-2/+2
| |
* | Optimize StringName usagereduz2021-07-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | * Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
* | Implement the ability to disable classesreduz2021-07-131-1/+1
|/ | | | | | | * This PR adds the ability to disable classes when building. * For now it's only possible to do this via command like: `scons disable_classes=RayCast2D,Area3D` * Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
* Move many input enums to their own fileAaron Franke2021-06-201-4/+4
|
* Remove unused AudioDriverAndroid from AndroidMarcel Admiraal2021-06-101-7/+0
|
* Fixed screen orientation on AndroidSzymon Majewski2021-05-241-0/+1
|
* Leverage java annotations to simplify the logic used to register the Godot ↵Fredia Huya-Kouadio2021-03-161-2/+3
| | | | plugin methods.
* Replace malloc's with Godot's memalloc macroEv1lbl0w2021-03-131-4/+6
|
* Modernize ThreadPedro J. Estébanez2021-01-291-4/+4
| | | | | | | | | - Based on C++11's `thread` and `thread_local` - No more need to allocate-deallocate or check for null - No pointer anymore, just a member variable - Platform-specific implementations no longer needed (except for the few cases of non-portable functions) - Simpler for `NO_THREADS` - Thread ids are now the same across platforms (main is 1; others follow)
* Update copyright statements to 2021Rémi Verschelde2021-01-011-2/+2
| | | | | | | | | | | | | | 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 🎆
* Remove unused FileAccessJAndroid.Fabio Alessandrelli2020-12-091-5/+0
|
* Android: Allow Mouse Capture thebestnom2020-12-081-3/+2
|
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-2/+2
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Android: Mouse Implementationthebestnom2020-10-091-13/+25
| | | | | Implement mouse Move touch to inputManager Change to use android/input.h
* Add a separate application focus/in notification out from Window focus ↵Juan Linietsky2020-06-301-2/+2
| | | | notification.
* Enable the ability to use Godot as a subview within an Android appFredia Huya-Kouadio2020-06-251-3/+3
|
* Add static_assert checks where code assumes VARIANT_ARG_MAX == 5Timo Schwarzer2020-05-251-0/+1
|
* Merge pull request #39004 from nekomatata/android-reset-surfaceRémi Verschelde2020-05-241-3/+14
|\ | | | | Proper surface reset when resuming app on Android
| * Proper surface reset when resuming app on AndroidPouleyKetchoupp2020-05-241-3/+14
| | | | | | | | Just re-creating the window instead of restarting the app entirely.
* | Use long instead of int for object id in Android java wrapperPouleyKetchoupp2020-05-241-4/+4
|/ | | | | Using int for 64-bit values might cause issues with objects not found in ObjectDB when the id is truncated.
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-14/+0
| | | | | | | | | | | | | | 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.
* Rename InputFilter back to InputRémi Verschelde2020-04-281-6/+6
| | | | | | | | | | | | | | | | 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.
* Add signal support to Godot Android plugin:fhuya2020-04-101-0/+2
| | | | Supports registering and emitting signal from a Godot Android plugin
* Display Server supportPouleyKetchoupp2020-04-081-50/+27
|
* Vulkan rendering for AndroidPouleyKetchoupp2020-04-031-3/+8
|