mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge commit godotengine/godot@cb411fa960
This commit is contained in:
@@ -134,6 +134,10 @@ ResourceUID::ID ResourceLoader::get_resource_uid(const String &p_path) {
|
||||
return ::ResourceLoader::get_resource_uid(p_path);
|
||||
}
|
||||
|
||||
Vector<String> ResourceLoader::list_directory(const String &p_directory) {
|
||||
return ::ResourceLoader::list_directory(p_directory);
|
||||
}
|
||||
|
||||
void ResourceLoader::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("load_threaded_request", "path", "type_hint", "use_sub_threads", "cache_mode"), &ResourceLoader::load_threaded_request, DEFVAL(""), DEFVAL(false), DEFVAL(CACHE_MODE_REUSE));
|
||||
ClassDB::bind_method(D_METHOD("load_threaded_get_status", "path", "progress"), &ResourceLoader::load_threaded_get_status, DEFVAL_ARRAY);
|
||||
@@ -149,6 +153,7 @@ void ResourceLoader::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_cached_ref", "path"), &ResourceLoader::get_cached_ref);
|
||||
ClassDB::bind_method(D_METHOD("exists", "path", "type_hint"), &ResourceLoader::exists, DEFVAL(""));
|
||||
ClassDB::bind_method(D_METHOD("get_resource_uid", "path"), &ResourceLoader::get_resource_uid);
|
||||
ClassDB::bind_method(D_METHOD("list_directory", "directory_path"), &ResourceLoader::list_directory);
|
||||
|
||||
BIND_ENUM_CONSTANT(THREAD_LOAD_INVALID_RESOURCE);
|
||||
BIND_ENUM_CONSTANT(THREAD_LOAD_IN_PROGRESS);
|
||||
@@ -305,8 +310,24 @@ Error OS::shell_show_in_file_manager(const String &p_path, bool p_open_folder) {
|
||||
return ::OS::get_singleton()->shell_show_in_file_manager(p_path, p_open_folder);
|
||||
}
|
||||
|
||||
String OS::read_string_from_stdin() {
|
||||
return ::OS::get_singleton()->get_stdin_string();
|
||||
String OS::read_string_from_stdin(int64_t p_buffer_size) {
|
||||
return ::OS::get_singleton()->get_stdin_string(p_buffer_size);
|
||||
}
|
||||
|
||||
PackedByteArray OS::read_buffer_from_stdin(int64_t p_buffer_size) {
|
||||
return ::OS::get_singleton()->get_stdin_buffer(p_buffer_size);
|
||||
}
|
||||
|
||||
OS::StdHandleType OS::get_stdin_type() const {
|
||||
return (OS::StdHandleType)::OS::get_singleton()->get_stdin_type();
|
||||
}
|
||||
|
||||
OS::StdHandleType OS::get_stdout_type() const {
|
||||
return (OS::StdHandleType)::OS::get_singleton()->get_stdout_type();
|
||||
}
|
||||
|
||||
OS::StdHandleType OS::get_stderr_type() const {
|
||||
return (OS::StdHandleType)::OS::get_singleton()->get_stderr_type();
|
||||
}
|
||||
|
||||
int OS::execute(const String &p_path, const Vector<String> &p_arguments, Array r_output, bool p_read_stderr, bool p_open_console) {
|
||||
@@ -630,7 +651,13 @@ void OS::_bind_methods() {
|
||||
ClassDB::bind_method(D_METHOD("get_system_font_path", "font_name", "weight", "stretch", "italic"), &OS::get_system_font_path, DEFVAL(400), DEFVAL(100), DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("get_system_font_path_for_text", "font_name", "text", "locale", "script", "weight", "stretch", "italic"), &OS::get_system_font_path_for_text, DEFVAL(String()), DEFVAL(String()), DEFVAL(400), DEFVAL(100), DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("get_executable_path"), &OS::get_executable_path);
|
||||
ClassDB::bind_method(D_METHOD("read_string_from_stdin"), &OS::read_string_from_stdin);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("read_string_from_stdin", "buffer_size"), &OS::read_string_from_stdin);
|
||||
ClassDB::bind_method(D_METHOD("read_buffer_from_stdin", "buffer_size"), &OS::read_buffer_from_stdin);
|
||||
ClassDB::bind_method(D_METHOD("get_stdin_type"), &OS::get_stdin_type);
|
||||
ClassDB::bind_method(D_METHOD("get_stdout_type"), &OS::get_stdout_type);
|
||||
ClassDB::bind_method(D_METHOD("get_stderr_type"), &OS::get_stderr_type);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("execute", "path", "arguments", "output", "read_stderr", "open_console"), &OS::execute, DEFVAL_ARRAY, DEFVAL(false), DEFVAL(false));
|
||||
ClassDB::bind_method(D_METHOD("execute_with_pipe", "path", "arguments", "blocking"), &OS::execute_with_pipe, DEFVAL(true));
|
||||
ClassDB::bind_method(D_METHOD("create_process", "path", "arguments", "open_console"), &OS::create_process, DEFVAL(false));
|
||||
@@ -722,6 +749,12 @@ void OS::_bind_methods() {
|
||||
BIND_ENUM_CONSTANT(SYSTEM_DIR_MUSIC);
|
||||
BIND_ENUM_CONSTANT(SYSTEM_DIR_PICTURES);
|
||||
BIND_ENUM_CONSTANT(SYSTEM_DIR_RINGTONES);
|
||||
|
||||
BIND_ENUM_CONSTANT(STD_HANDLE_INVALID);
|
||||
BIND_ENUM_CONSTANT(STD_HANDLE_CONSOLE);
|
||||
BIND_ENUM_CONSTANT(STD_HANDLE_FILE);
|
||||
BIND_ENUM_CONSTANT(STD_HANDLE_PIPE);
|
||||
BIND_ENUM_CONSTANT(STD_HANDLE_UNKNOWN);
|
||||
}
|
||||
|
||||
////// Geometry2D //////
|
||||
|
||||
Reference in New Issue
Block a user