Replace Array return types with TypedArray
This commit is contained in:
parent
b9ea0e1338
commit
8be27dc59e
110 changed files with 298 additions and 272 deletions
|
|
@ -83,7 +83,7 @@ bool DisplayServerAndroid::tts_is_paused() const {
|
|||
return TTS_Android::is_paused();
|
||||
}
|
||||
|
||||
Array DisplayServerAndroid::tts_get_voices() const {
|
||||
TypedArray<Dictionary> DisplayServerAndroid::tts_get_voices() const {
|
||||
return TTS_Android::get_voices();
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +136,7 @@ bool DisplayServerAndroid::clipboard_has() const {
|
|||
}
|
||||
}
|
||||
|
||||
Array DisplayServerAndroid::get_display_cutouts() const {
|
||||
TypedArray<Rect2> DisplayServerAndroid::get_display_cutouts() const {
|
||||
GodotIOJavaWrapper *godot_io_java = OS_Android::get_singleton()->get_godot_io_java();
|
||||
ERR_FAIL_NULL_V(godot_io_java, Array());
|
||||
return godot_io_java->get_display_cutouts();
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ public:
|
|||
|
||||
virtual bool tts_is_speaking() const override;
|
||||
virtual bool tts_is_paused() const override;
|
||||
virtual Array tts_get_voices() const override;
|
||||
virtual TypedArray<Dictionary> tts_get_voices() const override;
|
||||
|
||||
virtual void tts_speak(const String &p_text, const String &p_voice, int p_volume = 50, float p_pitch = 1.f, float p_rate = 1.f, int p_utterance_id = 0, bool p_interrupt = false) override;
|
||||
virtual void tts_pause() override;
|
||||
|
|
@ -104,7 +104,7 @@ public:
|
|||
virtual String clipboard_get() const override;
|
||||
virtual bool clipboard_has() const override;
|
||||
|
||||
virtual Array get_display_cutouts() const override;
|
||||
virtual TypedArray<Rect2> get_display_cutouts() const override;
|
||||
virtual Rect2i get_display_safe_area() const override;
|
||||
|
||||
virtual void screen_set_keep_on(bool p_enable) override;
|
||||
|
|
|
|||
|
|
@ -165,8 +165,8 @@ float GodotIOJavaWrapper::get_screen_refresh_rate(float fallback) {
|
|||
return fallback;
|
||||
}
|
||||
|
||||
Array GodotIOJavaWrapper::get_display_cutouts() {
|
||||
Array result;
|
||||
TypedArray<Rect2> GodotIOJavaWrapper::get_display_cutouts() {
|
||||
TypedArray<Rect2> result;
|
||||
ERR_FAIL_NULL_V(_get_display_cutouts, result);
|
||||
JNIEnv *env = get_jni_env();
|
||||
ERR_FAIL_NULL_V(env, result);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include <jni.h>
|
||||
|
||||
#include "core/math/rect2i.h"
|
||||
#include "core/variant/array.h"
|
||||
#include "core/variant/typed_array.h"
|
||||
#include "string_android.h"
|
||||
|
||||
// Class that makes functions in java/src/org/godotengine/godot/GodotIO.java callable from C++
|
||||
|
|
@ -78,7 +78,7 @@ public:
|
|||
int get_screen_dpi();
|
||||
float get_scaled_density();
|
||||
float get_screen_refresh_rate(float fallback);
|
||||
Array get_display_cutouts();
|
||||
TypedArray<Rect2> get_display_cutouts();
|
||||
Rect2i get_display_safe_area();
|
||||
String get_unique_id();
|
||||
bool has_vk();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue