summaryrefslogtreecommitdiffstats
path: root/platform/javascript/display_server_javascript.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace most uses of Map by HashMapreduz2022-05-161-1/+1
| | | | | | | | | | | | * 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!
* Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`Hugo Locurcio2022-05-031-1/+1
| | | | | | These typedefs don't save much typing compared to the full `Ref<Resource>` and `Ref<RefCounted>`, yet they sometimes introduce confusion among new contributors.
* Implement text-to-speech support on Android, iOS, HTML5, Linux, macOS and ↵bruvzg2022-04-281-0/+16
| | | | | | Windows. Implement TextServer word break method.
* Add screen_get_refresh_rate to DisplayServerjordi2022-02-031-0/+1
|
* Update copyright statements to 2022Rémi Verschelde2022-01-031-2/+2
| | | | Happy new year to the wonderful Godot community!
* [HTML5] Add WebGL2 (GLES3) support using the OpenGL renderer.Fabio Alessandrelli2021-11-191-2/+5
| | | | | | | Note, the editor build requires the mbedtls module to be manually enabled, as it is currently needed as a ResourceUID dependency. This will need to be addressed in a separate PR.
* Use "enum class" for input enumsAaron Franke2021-11-121-1/+1
|
* [HTML5] Implement window blur in JS library.Fabio Alessandrelli2021-10-051-3/+1
| | | | Removes more emscripten HTML5 library dependencies.
* [HTML5] Implement fullscreenchange in JS library.Fabio Alessandrelli2021-10-051-2/+1
| | | | Removes more emscripten HTML5 library dependencies.
* [HTML5] Implement mouse/touch/key events in JS library.Fabio Alessandrelli2021-10-051-18/+20
| | | | | This makes us more independent from emscripten libraries, giving us more control on the application lifecycle.
* Release pressed events when the window is blurred on HTML5 platformSelgesel2021-09-231-0/+2
|
* Move `alert` function from `DisplayServer` to `OS`.bruvzg2021-07-221-1/+0
|
* Modernize Display server to use override keywordHendrik Brucker2021-07-161-54/+54
|
* [HTML5] Fix build (with module_webxr_enabled=no).Fabio Alessandrelli2021-07-151-2/+2
| | | | | The XR API changed a bit, and it's not just a rename, though probably an easy update for someone who is qualified :).
* [HTML5] Opt-in virtual keyboard support.Fabio Alessandrelli2021-03-111-0/+5
| | | | | | | | | | | | | | | Added as an export option "Experimental Virtual Keyboard". There is no zoom, so text/line edit must be in the top part of the screen, or it will get hidden by the virtual keyboard. UTF8/Latin-1 only (I think regular UTF-8 should work out of the box in 4.0 but I can't test it). It uses an hidden textarea or input, based on the multiline variable, and only gets activated if the device has a touchscreen. This could cause problems on devices with both touchscreen and a real keyboard (although input should still work in general with some minor focus issues). I'm thinking of a system to detect the first physical keystroke and disable it in case, but it might do more harm then good, so it must be well thought.
* [HTML5] Better fullscreen, canvas resizing.Fabio Alessandrelli2021-02-191-3/+0
| | | | | | | | | | | Three canvas resize policies: - `None`: Godot window settings are ignored. - `Project`: Godot handles the canvas like a native app (resizing it when setting the window size). - `Adaptive`: Canvas size will always adapt to browser window size. Use `None` if you want to control the canvas size with custom JavaScript code.
* [HTML5] Detect screen scale and DPI.Fabio Alessandrelli2021-02-121-0/+1
| | | | | | | | `OS.get_screen_scale` will now return the `window.devicePixelRatio` value, `OS.get_screen_dpi` uses CSS media queries to find approximate DPI value for the current display. `OS.get_screen_size` also return the actual screen size (not the CSS pixel size).
* [HTML5] Custom Gamepad library to allow remapping.Fabio Alessandrelli2021-01-181-1/+1
| | | | | | | No longer use emscripten functions for gamepads, implement them as library functions in library_godot_display.js instead. This allows us to do a better job at "guessing" vendorId, productId, OS, etc. thus allowing us to better find the remapping for the controller.
* 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 🎆
* [HTML5] Port JavaScript inline code to libraries.Fabio Alessandrelli2020-11-101-19/+16
| | | | | | | | | The API is implemented in javascript, and generates C functions that can be called from godot. This allows much cleaner code replacing all `EM_ASM` calls in our C++ code with plain C function calls. This also gets rid of few hacks and comes with few optimizations (e.g. custom cursor shapes should be much faster now).
* [HTML5] Add override keyword, cleanup methods.Fabio Alessandrelli2020-09-181-52/+52
|
* Implement HTML5 cancel/ok button swap on Windows.Fabio Alessandrelli2020-07-271-0/+3
| | | | Platform is detected on init via the `navigator.platform` string.
* [JS] Check canvas size each loop, force redraw.Fabio Alessandrelli2020-07-011-0/+6
| | | | Fix compatibility issues, achieve smoother resizing.
* More static methods in DisplayServerJavaScript.Fabio Alessandrelli2020-07-011-0/+11
| | | | Were static functions in cpp file, polluting global namespace.
* Refactor canvas ID and locale handling.Fabio Alessandrelli2020-07-011-1/+2
|
* Style: clang-format: Disable KeepEmptyLinesAtTheStartOfBlocksRémi Verschelde2020-05-141-1/+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.
* Add drop files functionFabio Alessandrelli2020-05-101-0/+1
|
* DisplayServerJavaScript implementation.Fabio Alessandrelli2020-05-101-0/+187