summaryrefslogtreecommitdiffstats
path: root/platform/android/java_godot_lib_jni.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Replace NULL with nullptrlupoDharkael2020-04-021-9/+9
|
* Refactored input, goes all via windows now.Juan Linietsky2020-03-261-1/+3
| | | | Also renamed Input to InputFilter because all it does is filter events.
* Refactored Input, create DisplayServer and DisplayServerX11Juan Linietsky2020-03-261-1/+1
|
* Update the naming scheme for the GodotPlugin's methods in preparate of the ↵fhuya2020-03-191-1/+1
| | | | vulkan integration.
* Re-architecture of the Godot Android plugin.fhuya2020-03-051-88/+1
|
* Miscellaneous cleanup for the Android codebase:fhuya2020-03-041-928/+66
| | | | | | | | - update gradle plugins versions - add formatting rules for AndroidManifest and gradle build files - cleanup java_godot_lib_jni Note: logic was mostly moved around and no new logic/functionality was added.
* Merge pull request #36682 from nekomatata/android-compilation-fixRémi Verschelde2020-03-041-15/+11
|\ | | | | Compilation fixes on Android
| * Compilation fixes on AndroidPouleyKetchoupp2020-03-041-15/+11
| |
* | Merge pull request #18020 from bruvzg/input_fix_non_latin_and_add_hw_scancodesRémi Verschelde2020-03-011-8/+9
|\ \ | |/ |/| Fix non-latin layout scancodes on Linux, adds access to physical scancodes.
| * Rename `scancode` to `keycode`.bruvzg2020-02-251-8/+9
| | | | | | | | | | Add `physical_keycode` (keyboard layout independent keycodes) to InputEventKey and InputMap. Fix non-latin keyboard layout keycodes on Linux/X11 (fallback to physical keycodes).
* | Variant: Added 64-bit packed arrays, renamed Variant::REAL to FLOAT.Juan Linietsky2020-02-251-12/+19
|/ | | | | | | | | | | | | | | | | | | | | - 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.
* Reworked signal connection system, added support for Callable and Signal ↵Juan Linietsky2020-02-201-7/+7
| | | | objects and made them default.
* PoolVector is gone, replaced by VectorJuan Linietsky2020-02-181-32/+32
| | | | | Typed `PoolTypeArray` types are now renamed `PackedTypeArray` and are sugar for `Vector<Type>`.
* Fix ClassDB API portability with some android and editor classesIgnacio Etcheverry2020-01-191-2/+1
| | | | | | | | | | | | | | | | | | - `EditorNavigationMeshGenerator` was being registered as part of the Core API, even after d3f48f88bb84d22b7805ce971ac86cf1953a29fd. We must make sure to set Editor as the current ClassDB API type before creating an instance. - The `VisualScriptEngineSingleton.constant` property has a property hint string that's different between tools and non-tools builds. This commit makes the hint string to no longer be set in `_bind_methods`, and to instead set it in `_validate_property`. This way it's ignored when calculating the API hash. - `JavaClassWrapper` is now registered in ClassDB on all platforms, using a dummy implementation on platforms other than Android. This fixes API portability between Android and other platforms. - Updated `--class-db-json` command to ignore non-virtual methods that start with an underscore (see: 4be87c6016a5893cbde897924e540df4c988cee5).