summaryrefslogtreecommitdiffstats
path: root/platform/android/java_godot_lib_jni.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Godot Android re-architectureFredia Huya-Kouadio2023-07-161-1/+1
| | | | Decouples the Godot java entry point from the Android Fragment component. This enables the Godot component to be more easily reused across different types of Android components including Activities and Services.
* [Android] Set `echo` property for the physical keyboard events.bruvzg2023-07-061-2/+2
|
* Style: Harmonize header includes in platform portsRémi Verschelde2023-06-081-12/+11
| | | | | | | | | | | | | | | | This applies our existing style guide, and adds a new rule to that style guide for modular components such as platform ports and modules: Includes from the platform port or module should be included with relative paths (relative to the root folder of the modular component, e.g. `platform/linuxbsd/`), in their own section before Godot's "core" includes. The `api` and `export` subfolders also need to be handled as self-contained (and thus use relative paths for their "local" includes) as they are all compiled for each editor platform, without necessarily having the api/export matching platform folder in the include path. E.g. the Linux editor build will compile `platform/android/{api,export}/*.cpp` and those need to use relative includes for it to work.
* Add `audio/general/text_to_speech` project setting to enable/disable TTS.bruvzg2023-05-181-3/+4
|
* [Android] Fix dynamic Variant params stack constructions in JNI callbacksshendo2023-05-011-23/+10
| | | | | | | | Emitting signals with params from Android plugins could crash due to object assignment with uninitialised mem. Instead, use 'memnew_placement' to construct into stack addresses. Make similar JNI callbacks consistent. Fixes #75754.
* Fix issue with resizing the display on Android when using the compatibility ↵Fredia Huya-Kouadio2023-04-261-3/+2
| | | | renderer.
* Fix thread IDs.Juan Linietsky2023-04-241-1/+1
| | | | | | | | | On Linux, thread IDs were not properly assigned with the current approach. The line: `std::thread new_thread(&Thread::callback, _thread_id_hash(thread.get_id()), p_settings, p_callback, p_user);` does not work because the thread ID is not assigned until the thread starts. This PR changes the behavior to use manually generated thread IDs. Additionally, if a thread is (or may have been created) outside Godot, the method `Thread::attach_external_thread` was added.
* Enable granular control of touchscreen related settingsFredia Huya-Kouadio2023-02-221-0/+16
|
* Further refactoring to AudioDriver implementations after #69120.Emmanouil Papadeas2023-02-091-1/+1
| | | | | | | | | | | | - Rename all instances of `capture_start()` and `capture_end()` to their new names. Fixes #72892. - More internal renames to match what was started in #69120. - Use `override` consistently so that such refactoring bugs can be caught. - Harmonize the order of definition of the overridden virtual methods in each audio driver. - Harmonize prototype for `set_output_device` and `set_input_device`. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
* Cleanup and unify keyboard input.bruvzg2023-01-231-2/+2
| | | | | | | | | | - Unify keycode values (secondary label printed on a key), remove unused hardcoded Latin-1 codes. - Unify IME behaviour, add inline composition string display on Windows and X11. - Add key_label (localized label printed on a key) value to the key events, and allow mapping actions to the unshifted Unicode events. - Add support for physical keyboard (Bluetooth or Sidecar) handling on iOS. - Add support for media key handling on macOS. Co-authored-by: Raul Santos <raulsntos@gmail.com>
* 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.